anchor.diff:     * Creates documentation for filtered libraries.
      */
     void documentLibraries() {
  -    _libraries.forEach((library) {
  +    _libraries.forEach((lib) {
         // Files belonging to the SDK have a uri that begins with 'dart:'.
  -      if (includeSdk || !library.uri.toString().startsWith('dart:')) {
  -        _currentLibrary = library;
  -        var result = new Library(library.qualifiedName, _getComment(library),
  -            _getVariables(library.variables), _getMethods(library.functions),
  -            _getClasses(library.classes));
  -        if (outputToJson) {
  -          _writeToFile(stringify(result.toMap()), '${result.name}.json');
  -        } 
  -        if (outputToYaml) {
  -          _writeToFile(getYamlString(result.toMap()), '${result.name}.yaml');
  -        }
  -     }
  +      if (includeSdk || !lib.uri.toString().startsWith('dart:')) {
  +        var library = generateLibrary(lib);
  +        outputLibrary(library);
  +      }
       });
       // Outputs a text file with a list of files available after creating all 
       // the libraries. This will help the viewer know what files are available 
       // to read in. 
       _writeToFile(listDir("docs").join('\n'), 'library_list.txt');
  -   }
  +  }
  +
  +  Library generateLibrary(dart2js.Dart2JsLibraryMirror library) {
  +    _currentLibrary = library;
  +    var result = new Library(library.qualifiedName, _getComment(library),
  +        _getVariables(library.variables), _getMethods(library.functions),
  +        _getClasses(library.classes));
  +    logger.fine('Generated library for ${result.name}');
  +    return result;
  +  }
  +
  +  void outputLibrary(Library result) {
  +    if (outputToJson) {
  +      _writeToFile(stringify(result.toMap()), '${result.name}.json');
  +    } 
  +    if (outputToYaml) {
  +      _writeToFile(getYamlString(result.toMap()), '${result.name}.yaml');
  +    }
  +  }
   
     /// Saves list of libraries for Docgen object.
     void set libraries(value){
  
positive.code:    * Also initializes the command line arguments. 
     */
    Docgen(ArgResults argResults) {  
      outputToYaml = argResults['yaml'] || argResults['output-format'] == 'yaml';
      outputToJson = argResults['json'] || argResults['output-format'] == 'json';
      if (outputToYaml && outputToJson) {
  
negative.code:     includePrivate = argResults['include-private'];
      parseSdk = argResults['parse-sdk'];
      includeSdk = parseSdk || argResults['include-sdk'];
    }
    
    List<String> listLibraries(List<String> args) {
  