Support for ObjectId
Replaced HashMap with LinkedHashMap for order of fields