Initial checkin of reference implementation and the addition of folds.
added test for fold{Row,Column}(s).