Many of Tor's complex functions should be refactored
See some discussion on legacy/trac#6177 (moved).
I'm attaching a list of the most complex functions in Tor (by cyclomatic complexity).
Possibly cyclomatic-complexity-per-line would be another good thing to look at.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information