Added a function to flatten a vector of vectors into a single vector.