refactored application.rb