Replace ArrayList with Set/HashSet