Reorganize init of searchbar to a new method