Improve sorting methods