Correct sorting bug and sort by total time

Sorting was incorrect, the sort order was not obvious, and the result result was not very useful. 

Fix sorting, make the order obvious, and make it useful.