Refactor search bar.