Fixed bug in control-flow graph creation code, added headers as well as footers for constructs such as loops.