Sorting put in util.Sort

Sorting taken out of ViewExpense and refactored a bit