Extract command line parsing from output functions.  Add static where necessary.
Play with std::tie to move command line parsing to it's own function.