Rename publish to upload

And fix some code review comments along the way