Added removeDuplicates.