Refactor common output code.
Typos in docs.
Handle defaults more intelligently.
Merge branch 'feature/bugfixes' into develop