Added function folding.