changed message protocol and implemented put/get

messages are now {'type':'msg_type', 'foo':'bar'} instead of
{'type':'msg_type', 'content': {'foo':'bar'}}.
implemented method calling