Cleaned up some code in UI_ControlPanel.