Added main-frame to contain the GUI
Exit after closing main-frame
Use main-frame to start the GUI