include: Simplify code to generate callbacks and closures