Add explicit return values to TreeNode