Fixing bugs with duplicate detection
Removing extraneous print statements