Reduce duplication and make formatters consistent.