Command refactor.  Thank you Lemons for the base code!