Optimization of the front end of CDTE solar cells