Global material and variables

Hi,
I have divided my project into several moduls. I used extendet classes from Mesh and Group.
The structure is more or less like this:


What is the best way to handle e.g. a material for the red nodes?
What is the best way to handle variables on top level that should be consumed on bottom level.
I know I could pass them as a parameter/property from scene->group->group->mesh, but it does not seem to be the best solution.
Is there any standard prefered method?

Thanks