Most scripts separate stuff by: callbacks, commands, defines, variables, functions, etc.
That's perfectly fine, but unrelated. Even if they did they modules like that, they still have to include y_hooks in all files that it is used in (like I said in the comment you quoted).