massive refactor and state simplification of channel ending/erroring, will be buggy