Incorporated changes from work on OG2MetadataConversion