Update GUI.java

Significantly optimised the gui code