Reordered classes to group by similarity