syntactic fixes + foldTree WIP