Initialize method for treenode