Mongo id fixes

Fixes a few issues involving mongodb

Closes #39 
Closes #43

add a space after 'dates'