some OCD refactoring and test cleanup.

Might need a couple more tests