Changed main window to quit on close