Refactor  method to reduce its length.
Test error returns.
Add initial  formatter concept.