LPS-31462 Messaging infrastructure

Hey Mike,

Here is the messaging infrastructure. I've applied some source formatting and bug fixing, if you'd like to see where I can add comments to those lines. Practically it's the same though.

Thanks,

Máté