Bugfixes in gen_hooks.py: better detection of duplicates; proper spacing between arg type + name