memory management fix
Further work on the client handshake. Message order needs to be more strict.
Added helper methods for the client for generating the proxies and slices state
Merge origin/master