Moved ui creation and cleanup to game_loop