Added flatten of sublists