Fix channel.js bug, add defer to APIs for faster page loads