Changes required to support highly nested Mongo documents, and enable schema retrieval.