cleaned up some UI code.