Hydrogen, microstructure and defect density in hydrogenated amorphous silicon