Refactoring / require.js