Moar refactoring!!