added channel support
some small refactoring of names