Changed folds into cata so that tests compile in scala 2.9