Move primitive metadata to shared lib