Rearrange classes