Joined refactoring related to the new channel abstraction and
transport layer.