* Refactoring: the “sortBy” and “sortDir” parameters are processed only if they are used.