Handle functions without parameters

Fixes #1