Feature/mongo 2.6.5 integration

Lots of fixes found during integration with other tools that are using this.
???