Implementing the controller for the action mode.