I spent a few hours trying to do this and couldn't come up with anything remotely clean. This will change a lot in subsequent PRs where I'll add runner hooks into the heart of this method. I'd rather keep it like this for now; I think a linearly structured method of this size is not so bad, and it was definitely more readable than anything else I was able to come up with as a decomposition. 