Remove code duplication in ApplicationController
Merge pull request #1055 from vipulnsward/dedeuplicate_app_controller

Remove code duplication in ApplicationController