Doing some refactoring to allow some further modifictations on some features of CommandHandler.