Add a DedupHandler

Feel free to review and reject!