More refactoring

More refactoring