These are some cleanup patches currently sitting on my 'fix-private-usage' branch but which have nothing to do with the privates change. I'd like to get them merged to master so that I can get the API-change for privates reviewed and integrated soonish.