Finish most of the channel.js rewrite