Implement basic tree balancing.