Command arguments specify time period
Add output headings

Refactor output formatting code