MORE refactoring.

Bet you I undo all of this in a week when I think it's stupid.