Not sure what I was thinking at the time, but this can all be removed and replaced with closing `outputChan`.