Starting to implement folding.