Refactor editor view