Implemented publish/subscribe to/from endpoints and channels.

Refactored some of the models and introduced interfaces where applicable (endpoints, filters and transformers).