Added almost all of the GUI functionality