mod: split up class Tree into Node and Leaf