Convert to use Heroku PostgreSQL database
modified for Heroku deployment
Modified for local deployment