PubSub as a constructor function to allow multiple instances in an app