Sorting, pagination and new search, some bugfixes