Refactor channel management to provide each thread its own channel.