refactoring of channel for testability
refactoring of some class names