More crazy refactoring.