This is the code for the GUI as well as chat together