Refactoring, using require.js
Fix require.js