Optimization of a-SiC:H films for optoelectronic applications