Why not declare these inline?

handler = ... instead of doing it elsewhere?