More work on editor. Model and view updated when OK is clicked.