In going from Eq. 16 to 17, we change from the arbitrary index q to the active index w because only D vw is non-zero (i.e. D vi and D va are always zero). Between Eq. 16 and 17, we separate the sum over an arbitrary index r into a sum over an inactive index i and an active index w as far as the Dvqrs term is concerned. Between Eq. 17 and