More refactoring craziness