More refactoring, more to come