Rewritten controller.