dedupe: cleanups and rate estimation