Remove outdated and commented out code.
Some light re-factoring to make output format case analysis
reusable.
Expose convenience functions for make chunk items.