Changed notation and precomputed l and alpha.