Correcting aberrations caused by inhomogeneities; correcting intrinsic aberrations