Added inter length/frequency sort to freqSort and lenSort.