Adds support of customized PubSub handlers. #6