More refactoring made