Renamed formatter module to formatting to avoid collision with function.

Additionally:
- simplified and improved the formatter function.
- added some docs to the module.
Parse spec handles unknown conversion. No need to repeat.
Added tests for the formatting module.