editor refactoring