add more tests
extracted some general scope out from driver scope
moar refactoring to avoid circular deps
tests for iff