Optimization of nucleation and buffer layer growth for improved GaN quality