SOrting by more than one field, and optimalization
Changed type of sorting and filtering