refractored some of Application.rb