Improvement of a-Si:H devices by analysis, simulations and experiment