Perform some much-needed refactoring.
Refactor everything some more.