Structural and electronic properties of CdTe1-xSex films and their application in solar cells