Changed several instance variables to local variables in application_controller.rb #27