more small changes to server.py to enable deployment on heroku