Most of the publish bits done.

Still need to add in the actual usage of publishCombined(), and make sure my code updating
the modified flag is all valid.