some bug fixes and code cleanup for mondodb insertion
Merge pull request #5 from erulabs/dev

some bug fixes and code cleanup for mondodb insertion