Refactored the cfg analyzer