Make app work on heroku

Updates to make it possible to run app locally and deploy to heroku.