Legendre fcn. implementation, refactoring, and version update.