metadata cleanup