Refactored PubNubService