Finishing first draft of dedup.