Add module field to Export
Avoid attaching to the same function multiple times
Batch target functions
Fix silly variable scope issue