Pass FUN pointer into functions so the same handler can support unrelated functions.