More deduplication of code
Merge pull request #88 from mikeSimonson/refactor-command-more

More deduplication of code