Switched prims to use type_refs