Import Channel API code and partially implemented it.