mongodb stuff for heroku
changed mongodb flow
fix some api bugs
improvements to date handling