Messaging framework

See Issue #3 

This is the first implementation and we should test if this will work correctly. I'll start on a Wiki page describing this part of the framework as soon as possible.