Added basic folding.