refactoring require js dependencies