More refactoring, damnit.