Refactor controllers.