Modifications to work on heroku with mongodb