ALL the refactoring!