Rebuilt most of the search module. Still in progress.