diag: Upgrade Diag code on this branch