Added Tree Balancing Feature