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)