code: function(opts) {
    if(!opts) opts = {};
    var libpath = opts['path'];
  
    this._emitter = new events.EventEmitter();
    this._library = this.createLibrary(libpath);
    this._initCrypto(opts);
    this._options = this._createToxOptions(opts);
    this._initNew(this._options);
    this._initCallbacks();
  
    // Create a child ToxOld if specified for old groupchat functionality
    if(opts.old === true) {
      this._toxold = new ToxOld({ path: libpath, tox: this });
    }
  }
docs: Creates a Tox instance.
  @class
  @param {Object} [opts] Options