Dataset sorting, comparators, and math methods