Updated rpc related functionality to match psi46test version in branch of same name.