Refactors controller response