Refactoring of the spherical harmonics.