Renamed the format function and fix some tests

The new name reflects it’s purpose a little better.