fix some appearances of "rod" instead of "peg"; add a few comments, tweak a few things