- Improved default sort function.