Replace sortAttrs with convertIdsToClassesAndSort