Added support for custom functions.
Updating README