Added error dialogs on open/save, reuse an unmodified window when opening a new file.
Clarify what documentEdited and documentExists mean.
Added code to launch application.