Refactor difficult group totals in crags