Dry up commands with subcommands

TODO: arguments to subcommands are janky. Perhaps
#process_subcommand should take a block, by which we
determine the arguments to pass to the subcommand?