Refactor to make more testable, and not to run actions until after all arguments are parsed

At first this was just to be able to skip existing VMs but a number of bugs surfaced so it starts marching down the path toward having automated tests.