Moar refactoring.