Bundling comment formatting code into a class