Moar refactoring