Set arity on all functions

Use the function arity feature to remove a lot of boilerplate code from
the functions.

take 2, now that puppet 2.x support is deprecated (again kinda)
Fixed. Don't know if it was the rebase that undid some previous spelling fix maybe.