Added code for spherical harmonics.