Preliminary support for functions.
Bugfix. Empty lines were getting lost upon function invocation.