Mechanistic studies of reversible layer-type electrodes