Make local functions local and don't create an unnecessary variable.