Remove TreeSet, still not enough memory