PubSub integration

The pub/sub. Not sure if this should be adapted into a `struct` though