Remove duplicates from a list