Adding the mongo stuff and the unit tests.