Refactoring.
So close, but alas must sleep :( 5am!