Added scalar tree abstraction.