Merge TreeNode and TreeNodeType into tree module