On the development of CdS properties upon processing CdTe devices