Split methods of RPCHandler off to be pure functions.