Update codegen2 for feedback

* src/pf/codegen2.lua: Cleanups from code review.