Added ability to access variables from parent scopes.