Fixing a bug in the Legendre fcn. evaluation.
API refactoring.