Changed get_names to return a set instead of a list.