In a photovoltaic cell, how do electrons make their way back to the N-type layer after traveling through the wire? Is it as simple as the fact that electrons are being knocked out of the N-type layer by photons and there is thus a deficiency of electrons? Also, in talking about semiconductors in general, my chemistry textbook states that "when a p-n junction is made, excess electrons in the n-type material migrate across the junction and some of the holes in the p-type material migrate in the opposite. The result is the buildup of a negative charge on the p-type region and a positive charge on the n-type region." (Chemistry, The Molecular Science, pg. 529). Why doesn't the same thing happen in a photovoltaic cell. That is, why don't the electrons in the N-type layer migrate through the junction into the P-type layer, without traveling through the wire? Thank you very much for your help.