Improved Bisection method and added tests.