consolidation of metadata processing codes