Changes to work with new and improved TreeNode