Added continuation parameter to publish method, refactored callbacks to fit with node conventions (one callback, first param being an err)