DDF-534

Some initial cleanups and the start of the work on making options / arguments common across different console commands.

This isn't enough to solve DDF-534 completely.