Cosmetic: these can all be rolled together, and be a bit terser.
Format as number, don't explicitly convert to string then format as string.