Random style note, but using `State` rather than `State0` here would be great. I know we use `State0` when we want to do minimal changes for diffs, but since this is all new code, there's really no minimal change benefit here.