More refactor for search fragment.