Sorting and renaming.