remove the jquery dependency. Use XMLHttpRequest directly.
Use a struct to represent the channels instead of a map.