Updated to avoid using shared_ptrs of DataMaps.