Refactor of the commands code (removing duplicated code)
Merge pull request #87 from mikeSimonson/refactor-command

Refactor of the commands code (removing duplicated code)