refactoring of requirejs dependencies