GUI cleanup

cleaned up the GUI code a bit