Adapted to be deployed on heroku.