Moving these to the `State` will make all the flushing simpler.