Refactoring ChannelContext