Implement control flow
Merge pull request #183 from Kha/cfg

Implement control flow