Cleaned up the controller.