Pulled common code into base Command class.