revision of mongo_formatter

rebased on the current master
Merge pull request #7 from myi100/master

revision of mongo_formatter