WIP: Callbacks for Writer publish
Added publish callback tests
Small style fixes
Merge pull request #14 from dudleycarr/pub_callbacks

Pub callbacks
Merge master