Ensure argNames and args length matches when instantiating a function

Closes #166