rewrote channel from scratch
got rid of static globals
seems to be slightly more robust with full optimizations, but debug mode is now crashing