Extracted an interface that should be common for all search algorithms.