Refactor and Update search field