Use named functions instead of anonymous functions assigned to variables - makes for better stack traces

Before I go and start mucking around, I want to be sure I have good stack traces.