Refactor of autocomplete support on search field