Prototype for duplicate removal script