Improved sorting capabilities