Changed Application.Js to work on Heroku