Added close menu item and a dialog box for asking if they want to discard unsaved changes.