WIP: adding proper passing of handles through RPC