Conventionalise internal main file names.
Make factory for module definitions.