refactor editor