anchor.diff:  
   
   _openNewScope(scope, k) {
  +
  +
     Map curr = {};
     curr.addAll(scope);
  +
     var ret = k(scope);
  +
     scope.clear();
     scope.addAll(curr);
     return ret;
  -}
  -
  -_addToScope(scope, bindings, k) {
  -  return _openNewScope(scope, (scope) {
  -    scope.addAll(bindings);
  -    k(scope);
  -  });
   }
   
   //TODO (jln): factories should be handled here. in ConstructorName there should be resolved what is a prefix of another library, and what is a factory call.
   
   class IdentifierResolver extends Our.RecursiveElementVisitor {
   
  -  Map<Our.Name, Our.NamedElement> declaredElements = {};
  +  Map<AstNode, Our.NamedElement> declaredElements = {};
     Our.LibraryElement currentLibrary;
     var engine;
   
  
positive.code: 
  class ScopeVisitor extends GeneralizingAstVisitor {
  
    Map<Expression, Our.NamedElement> references = {};
    Map<Our.Name, Our.NamedElement> declaredElements;
    Map<String, Our.NamedElement> scope;
    
    var engine;
    Our.ClassElement _currentClass = null;
    
    List<Map<String,Our.NamedElement>> scopes = <Map<String,Our.NamedElement>>[];
      
    _enterScope(){
      scopes.add(scope);
      scope = new Map<String, Our.NamedElement>.from(scope);
    }
    
    _leaveScope(){
      scope = scopes.removeLast();
    }
    
    ScopeVisitor(this.engine, 
                 this.scope, 
                 this.declaredElements, 
                 this.references); 
  
    visitBlock(Block node) {
      _enterScope();
      super.visitBlock(node);
      _leaveScope();
    }
  
    visitFormalParameter(FormalParameter node) {
      this.scope[node.identifier.toString()] = this.declaredElements[new Our.Name.FromIdentifier(node.identifier)];
      super.visitFormalParameter(node);
    }
    
    visitClassDeclaration(ClassDeclaration node){
      this.scope["this"] = this.declaredElements[new Our.Name.FromIdentifier(node.name)];
      super.visitClassDeclaration(node);
      this.scope.remove("this");
    }
  
    visitVariableDeclaration(VariableDeclaration node) {
      this.scope[node.name.toString()] = this.declaredElements[new Our.Name.FromIdentifier(node.name)];
      super.visitVariableDeclaration(node);
    }
    
    visitFunctionDeclaration(FunctionDeclaration node) {
      if (node.name != null) {
        this.scope[node.name.toString()] = this.declaredElements[new Our.Name.FromIdentifier(node.name)];
      }
      super.visitFunctionDeclaration(node);
    }
    
    visitSimpleIdentifier(SimpleIdentifier node) {
      var element = scope[node.name.toString()];
      if (element != null) {
        references[node] = element;
  
negative.code:   }
    
    void visitSourceElement(Our.SourceElement element) {
  
      if (element.source != this.engine.entrySource) return;
      
      declaredElements.clear();
  