Updated MongoDB driver to version 1.7

Updated MongoDB driver to version 1.7. Removed the obsolete calls and replaced with the new syntax.