Adding better sort functionality for task listing pages.