More idiomatic local functions.