Added aggregate fn for results; sortAsc & sortDesc
Clean debug code