Upgrading code to the latest MongoDB drivers