Deleting duplicates and setting alphabetical order