This PR continues the cleanup of the command package, removing linter warnings, refactoring to use helpers, making tests easier to read, etc.