More refactoring in