move Application private methods to application.rb