Sorry - had a couple of extra commits in there.  I'll close and open pull requests for each.