Improved rebalancing. Added comprehensive integration scenario