Small refactoring in tossing process.
Add DupeDetector.