Upstream fixes

I fiddled with some things so I could push this to heroku.