minor cleanup to cpp merge