Several updates to PubSub module