Clean up and add some folds.