Heroku: postgres support
Reordering of code to support in-process Flask server
Heroku: database env variable fix
Heroku: debug print for url
Heroku: DB url parse fix