Use anonymous functions

Providing names for the functions did not provide extra meaning, as the name is typically redundant with
the name of the enclosing function.