Bunch of fixes

This is basically the worst kind of pull request, but I think these are all the issues that need solving to pull this in read-package-json and npm-www.