Cleanup some UI code.