adding unit tests to simple balancer and some fixings/improvements to the simple balancer