More refactoring, it starts to make sense