Added task sorting.