Refactor even more lambda hooks into named functions.