cleanup of channel api code

further integration within client