Dislocation and morphology control during molecular-beam epitaxy of AlGaN/GaN heterostructures directly on sapphire substrates