clean up the controller helper methods in application controller