Added EditorModel + refactor to use it for eventing