Implement Serialized RPC

Some refactoring was done along the way, e.g. new namespace 'serialization'