Javascript tweak for removing dupes.