Remove duplicates from a vector