More requirejs refactoring