slight refactor
Renamed search_db since it is more generic than that
moar docstrings