Add the tests/unit/search/__init__.py so that nose can discover the tests in this directory.
Simplify the API to allow easier testing, and simplify the implementation.