refactor risky requirejs usage