fixed some bugs and added extra folding support to the jsscope report