fix live search, some cleanup