Added folding to the B-Tree code.