Refactored code (GenerateDGFFromIDA)