Delete unnecessary codes in the controller.