Refactoring to prep for yaml subcommand parsing