Cleaned up some code in UI_manager.cpp