Majorer refactor of the editor.