Added search algorithms and improved tests.