this series up to patch 4 LGTM, and seem uncontroversial. patch 5 adds FIXMEs that should probably actually be fixed, though, rather than just flagged. Thanks to Piotr for identifying these issues and suggesting the cleanup. --dkg