public static void addObject(Object o, Object arg) {
    // Able to handle many different type of objects
    if(o instanceof Recordable)
      ((Recordable)o).record(arg);
    else if(o instanceof List) {
      List l = (List)o;
      if(l.size() != 0 && l.get(0) instanceof Recordable) {
        // If have list of recordable items, can put explicit structure
        for(int i = 0; i < l.size(); i++)
          addEmbedArg("index", i, l.get(i), arg);
      }
      else {
        // Example: (index=0 (value=a)) (index=1 (value=b))
        setStruct("index", "value");
        for(int i = 0; i < l.size(); i++)
          add(""+i, l.get(i));
      }
    }
    else if(o instanceof StatFig) {
      StatFig f = (StatFig)o;
      Record.add("n", f.size());
      Record.add("mean", f.mean());
      if(o instanceof BigStatFig) {
        BigStatFig bf = (BigStatFig)o;
        Record.add("min", bf.getMin());
        Record.add("max", bf.getMax());
      }
      if(o instanceof FullStatFig) {
        FullStatFig ff = (FullStatFig)o;
        Record.add("stddev", ff.stddev());
        Record.add("entropy", ff.entropy());
      }
    }
    else {
      add("value", o);
    }
  }