Fixed various publish issues.
Tidy.