Optimize __fold
Fix performance issue with checker: cloning the document takes a lot of time
Rm dbg msg