Factor out channel setting.
Refactoring.