Update removeDups

Fixed as the other code only removed pairs next to each other.