astyle all of the code so it's at least a consistent level of ugly.
Perform all the spin-unlocks in a single place.

This is way cleaner.
Try out this crazy code reuse thing all the cool kids are talking about.