updated clean to add metadata type
updated clean subset to include metadata element
made wantlist element nillable
updated. added test for appliestotypes-refs-types