Bring codegen up to date

This replaces the `loop`s with `continue`s as appropriate. I didn't update all of the examples, as some of them were involved, but a few of them did run and work.