Improve pagination and some work in advanced search