Updated tree

Now id and node related directly. The tree is in session (recovering
after F5).
Merge