Complete overhaul of RPC routing