Worklist implementation, some improvements in CFG + unit tests.