Small bugfix.
Minor bugfix.
Bugfix.
Various fixes. Also more work towards reenabling user-defined functions.