Modified the return value of publish and added a helper as first paramet...

...er of subscribe handlers