Updates UI and set up search query functionality