Added NestedStack class to Base.
Update Scope and CopyReducer to do variable substitution.