Code modularized, using require.js