simplified search engine

Thanks to Darius Bacon for several suggestions for improvement.