More documentation + fix publish callback bug