refactor main file loop: change the way AnalyzedCode is computed