Application logic moved to a controller.