Added debugging information for tree balancing.
Added back in the tree balance line.
Added generation tracking.