Use the function arity feature to remove a lot of boilerplate code from
the functions.