Create helper class TreeNode