Beginning of RequireJS refactoring