Sort categories.