Cleanup of metadata