Started adding custom balancer and cleaned up the prep_rebalance.
Added balancers (lua-based).