Various changes to the provider to ensure commands are successful,
as well as improvements to the tests.