Move channels to separate package and cleanup code (#2180)* Cleanup handling of casts in a lot of places* Move channels to separate package* Move impl classes and mixins to new package (commit: 11c5bf0)