refactor application controller small