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

Changes to support user-defined functions.