Cleaned up some more and added missing confirmation checks on exiting editor from the menu.