function nexusClient(nexusServer, autoConnectOptions) {
  if(!nexusServer) throw new Error('Missing nexusServer address');
  this.nexusServer = nexusServer;
  this._isConnectedToHost = false;

  this._ws = new WebSocket(nexusServer);
  this._ws.onopen = () => {
    if(this._isConnectedToHost) return;
    this.onServerConnect && this.onServerConnect();
    if(autoConnectOptions) {
      this._ws.send(JSON.stringify(Object.assign({
        type: 'CONNECT',
      }, autoConnectOptions)));
    }
  };

  this._ws.onmessage = (event) => {
    //     console.log('Received:', event.data);
    if(this._isConnectedToHost) {
      this.onMessage && this.onMessage(event.data);
    } else {
      const req = JSON.parse(event.data);
      switch(req.type) {
        case 'LIST':
          if(!this._isConnectedToHost) {
            this.onHostList && this.onHostList(req.payload);
          }
          break;
        case 'CONNECTED':
          if(!this._isConnectedToHost) {
            this._isConnectedToHost = true;
            this.onHostConnect && this.onHostConnect();
          }
          break;
      }
    }
  };
}

nexusClient.prototype.setDefaultCallbacks = function() {
  /* You can set any of these to null to have no callback */

  this.onHostList = (hosts) => {
    /* example callback */
    console.log("+ Recieved list of hosts:");
    hosts.forEach(h=>{
      console.log('  %d: %s', h.hostID, h.hostName);
    });
  };
};

nexusClient.prototype.getHostList = function(callback) {
  if(this._isConnectedToHost) {
    throw new Error('Cannot get host list when connected to a host');
  }

  if(callback) {
    this.onHostList = callback;
  }
  this._ws.send(JSON.stringify({
    type: 'LIST',
  }))
};

nexusClient.prototype.connect = function(connectOptions, callback) {
  if(this._isConnectedToHost) {
    throw new Error('Cannot connect to a host: already connected to one');
  }

  if(callback) {
    this.onHostConnect = callback;
  }

  this._ws.send(JSON.stringify(Object.assign({},{
    type: 'CONNECT',
  }, connectOptions)));
}

nexusClient.prototype.send = function(msg) {
  if(!this._isConnectedToHost) {
    throw new Error('Must be connected to a host before you send anything');
  }
  this._ws.send(msg);
}

nexusClient.prototype.close = function() {
  this._ws.close();
}

@@ -1059,24 +1059,35 @@
 HostConnect(
+req.payload
 );%0A         
@@ -1441,16 +1441,247 @@
 %7D);%0A  %7D;
+%0A%0A  this.onHostConnect = (host) =%3E %7B%0A    /* example callback */%0A    console.log('+ Connected to host:', host);%0A  %7D;%0A%0A  this.onMessage = (message) =%3E %7B%0A    /* example callback */%0A    console.log('+ Recieved message:', message);%0A  %7D;
 %0A%7D;%0A%0Anex

Add default callbacks to client helper