Changed behavior of the gui.

* closing the window now exits the application.
+ added menu item "Hide" to hide the window.