Some Balancing and optimizations.