cleanup tds