Remove diagnostics code