Made changes to make compatible with Heroku