This would be better if it used the new proc/lambda default feature. That said, I don't want to turn this patch into a giant yak shave for you. Maybe if the number of these is reasonably small it would be okay?