RPC improvements and extensions

various enhancements around the RPC module (see commit log for details)