Metadata cleanup