Changed map into a vector of vectors. Maybe should be a vector of sets.