search cleanup: separate evaluation code from search(data)
(fixes)