removed unused variables
added missing assert in tree.php