Move common metadata code to ObjectMetadata 2/2