Rewrite of CFG generation, adds options and fixes issue #459.
Removed obsolete file generate2.py