Replaced string ids with ObjectIds to facilitate proper retrieval of referenced objects