Tree height on deleting branches
The current calculation of tree height:
node_level(root) + (node_count(root) > 0)
is correct provided that one does not delete branches in subnodes. One could fix this by iterating over the branches to look for those emptied, but I think this should be part of a more-detailed look at tree-pruning, possibly we remove node_disconnect_branch
for the 1.0 release pending this review.