Move to RPC instead of REST API