fixes #51 - refactors mongoDb-specific generator code into mongoDb cartridge