DiD: combine some variable clearing