Re-factor application.rb