Adding PubSub and tests