Much better implementations of both rpc services