Some minor tweaks to the setup

This breaks resetting the attributes into its own method and makes
the setup/teardown more about setting up or tearing down cmd runs.

This is a slight improvement in code organization with no behavior
changes.