Added code for GUI in Main