Add option to make folding configurable