Tree and TreeNode working. Depth-first algorithm implemented.
Added functor dependence in tree class.