Added method that removes duplicates in a linked list.