Some modification, mainly on generalized spherical functions in Legendre.h