anchor.diff:    }
   };
   
  -getFile(Map<String, Map> files, String filename) => files[filename] == null ? '' : files[filename]['content'].replaceAll(new RegExp('^$emptyChar\$'), '');
  +getFile(Map<String, Map> files, String filename, {String defaultValue: ''}) =>
  +    files[filename] == null ? defaultValue : files[filename]['content'].replaceAll(new RegExp('^$emptyChar\$'), defaultValue);
  +
  +class Metadata {
  +  final String origin = 'dartlab.org';
  +  final String url = 'http://dartlab.org/#:gistId';
  +  List<String> history = [];
  +
  +  Metadata();
  +  Metadata.fromJson(Map m) : history = m['history'] is List ? m['history'] : [];
  +  Map toJson() => {
  +    'origin': origin,
  +    'url': url,
  +    'history': history
  +  };
  +}
  
positive.code:       body = getFile(files, "body.html");
        css = getFile(files, "style.css");
        dart = getFile(files, "main.dart");
      }).catchError((_) => id = '');
    }
  
    save() {
      var data = {
        "description": description.isEmpty ? "A DartLab experience!" : description,
        "public": true,
        "files": {}
            ..addAll(createFile("body.html", body))
            ..addAll(createFile("style.css", css))
            ..addAll(createFile("main.dart", dart))
  
negative.code: 
  @CustomTag('main-app')
  class MainApp extends PolymerElement {
    @observable String id;
  
    @observable String description;
  
    @observable Metadata metadata;
  
    @observable String body;
  
    @observable String dart;
  
    @observable String css;
  
    Router router = new Router(useFragment: true);
  
    MainApp.created() : super.created() {
      router.root
          ..addRoute(name: 'default', defaultRoute: true, enter: (_) => init())
          ..addRoute(name: 'id', path: ':id', enter: (RouteEvent e) => load(id = e.parameters['id']));
      router.listen();
    }
  
    init() => this
        ..id = ''
        ..description = ''
        ..metadata = new Metadata()
        ..body = ''
        ..dart = 'main() {\n}'
        ..css = '';
  