Completely update method of searching for duplicates, now that I actually know what I'm doing.