Refactor controler methods.