Split up the controller to handle the view and do actions.