Updated underscore methods sortBy and groupBy