Replace invalid var with the proper one
Add missing forms in let bindings
Fix typo
Fix destructuring and parameter name in rooted tree constructor