Changes to support user-defined functions.
Merge pull request #11 from lpatters/master

Changes to support user-defined functions.