cleanup some GUI code