Improved logging
Refactored RPC protocols