Adapted Core to new Stream based BSON layer.