gen_hooks.py: Added comments