Changes to support dynamic scoping of variables

Done per slides for class