Update sort usage. Remove use of length, replace with head-tail operator(s).