Mongodb

Merging in Curtis' mongo changes