remove unnecessary code from application controller