RequireJS refactor