Added code for the GUI