Updated PubNubService.js code a bit for neatness purposes.