Changed the way defaults are handled.
Also broke out formatting to new module.