Speed up search.

I changed implementation of incremental search, because of speed up.