Microstructure and performance of CdTe solar devices