added ajax search, fixed search engine bugs