More refactoring progress