Removed unused variable in tree_sum