Separated Publish and Subscribe

Moved the calls to Subscribe<T>() and Publish<T>() into their own
classes.