Reformat mainclass