Refactoring with RequireJS.