Modified all newChannel functions, added assertions everywhere