add requireAnalyze.js and fix some bugs