Cleaned up GUI code.