Issue #5: Extended Vectorizer by the ability to flatten scope trees and added a convenient tree iteration scheme