Added optimization to GUI.