refactor channels functionality into Transport and Channel objects.