cleanup callgraph generation code