Reformat some codes