Code cleanup items, specifically code formatting fixes.
Restructure code by thread. Concurrency bugs are the highest-risk, and
the code can be clearly organized by thread so future contributers can
see at a glance where thread divisions are.