Restructure client-side module loading using RequireJS