---
Fixes some of the more egregious problems with v1, and also applies properly to the head of git without needing any other patches. Rich.