Pagination functionality and search query updates