web.js change for heroku and small cleanup