Add pubsub implementation

I created a naive and ludicrously simple pub-sub system. It's so simple I fear I must be doing something wrong. But it works quite well so...