Edited for Heroku deployment.