Replace ArrayList with Set/HashSet

Much faster