Pulled out search code into a module.