More refactoring, it's coming to an end