Added CommandChannelHandler, refactored unit tests