Cleaned up some GUI code. Now uses dedicated functions for destroying widgets and changing visibility.