Update to use MongoObject to create flatDoc; fixes #41