Changes entity list to set for easier sorting