More refactoring