Apply better understanding of the requirejs functionality
- Use define to define module and submodules
- Use require in generated javascript files