moduleName customizable using a function

This enables complex setups to have multiple templates being generated.