Refactor channel implementation to use helper queue functions.
Refactor internal API such that input and output ports hold reference only to a channel.