Major architectural work to refactor commands, add hostplatforms and set that up as a factory.