diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6f50027c51ab504fb9d5d741af9e346ac3deec5e..c32bc55c29308a9b91c8b6c9f8e9d808b7795b16 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,9 +17,9 @@ cache:
 variables:
   REPO_DIR: gitlab.com/elixxir
   REPO_NAME: server
-  DOCKER_IMAGE: elixxirlabs/cuda-go:go1.13-cuda11.1
+  DOCKER_IMAGE: elixxirlabs/cuda-go:go1.16-cuda11.1
   # See https://docs.gitlab.com/ee/api/jobs.html#download-a-single-artifact-file-from-specific-tag-or-branch
-  REPOS_API: https://gitlab.com/api/v4/projects/elixxir%2F
+  REPOS_API: https://$GITLAB_SERVER/api/v4/projects/elixxir%2F
   SERVER_URL: ""
   SERVER_GPU_URL: ""
   GPULIB_URL: ""
@@ -57,6 +57,7 @@ installbinaries:
     - ./download_cmix_binaries.sh l d
     - mkdir -p /opt/xxnetwork/lib
     - cp bin/libpowmosm75.so /opt/xxnetwork/lib/
+    - cp bin/libpow.fatbin /opt/xxnetwork/lib/
     - "chmod +x *"
     - bin/server version
     - bin/server-cuda version
@@ -81,14 +82,15 @@ basice2e:
     - rm -fr results
     - rm -fr results-cpu
     - rm -fr results-gpu
-    - ls -lha
-    - ./run.sh
-    - mv results results-cpu
-    - sleep 60
+    # - ls -lha
+    # - ./run.sh
+    # - mv results results-cpu
+    # - sleep 60
     - mkdir -p /opt/xxnetwork/lib
     - cp ../bin/libpowmosm75.so /opt/xxnetwork/lib/
+    - cp ../bin/libpow.fatbin /opt/xxnetwork/lib/
     - sed -i 's/bin\/server/bin\/server-cuda/g' run.sh
-    - sed -i 's/useGpu\:\ false/useGpu\:\ true/g' server-[12345].yaml
+    - sed -i 's/useGPU\:\ false/useGPU\:\ true/g' server-[12345].yaml
     - NSYSENABLED=TRUE ./run.sh
     - mv results results-gpu
     - cd ..
diff --git a/basice2e/betanet.txt b/basice2e/betanet.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e35ebcf24ff6d2bbf54f6c994bfd35de7becbd33
--- /dev/null
+++ b/basice2e/betanet.txt
@@ -0,0 +1,306 @@
+188.187.190.53:22840
+135.181.134.215:22840
+90.64.159.233:22840
+63.224.248.74:22840
+78.63.197.35:22840
+95.217.225.220:22840
+167.86.89.25:22840
+134.17.158.63:22840
+77.92.107.203:22840
+136.50.65.29:22840
+176.99.131.128:22840
+109.251.8.131:22840
+85.237.9.101:22840
+195.93.180.119:22840
+193.106.95.173:22840
+193.106.95.227:22840
+168.119.49.161:22840
+193.106.94.75:22840
+176.99.131.188:22840
+180.150.125.93:22840
+135.181.29.63:22840
+116.202.99.94:22840
+94.130.150.94:22840
+93.81.246.111:22840
+183.99.96.180:22101
+62.171.131.155:22840
+159.65.122.44:22840
+45.122.123.134:22840
+157.90.34.21:22840
+107.182.163.106:22840
+52.124.124.210:22840
+170.187.225.94:22840
+95.217.228.117:22840
+88.99.13.205:22840
+52.183.38.229:22840
+77.223.99.126:22840
+37.228.116.99:22840
+167.99.247.6:22840
+5.45.81.112:22840
+193.47.33.51:22840
+5.45.81.110:22840
+69.197.179.42:22840
+69.197.179.162:22840
+94.244.64.115:22840
+109.100.137.105:22840
+86.57.132.29:22840
+178.248.81.38:22840
+213.55.169.27:22840
+212.24.106.228:22840
+195.181.247.171:22840
+82.148.29.76:22840
+81.163.28.252:22840
+80.249.150.70:22840
+79.98.24.202:22840
+62.173.145.42:22840
+77.223.98.157:22840
+193.47.33.132:22840
+82.148.19.245:22840
+31.184.254.81:22840
+195.64.234.210:22840
+195.64.234.98:22840
+78.26.169.79:22840
+62.77.156.70:22840
+77.223.97.164:22840
+193.47.33.50:22840
+62.173.140.126:22840
+93.81.246.64:22840
+149.210.192.112:22840
+77.120.176.213:22840
+188.138.242.248:22840
+178.168.101.47:22840
+37.97.220.128:22840
+69.197.147.18:22840
+81.240.39.28:22840
+141.105.67.92:22840
+213.10.138.128:22840
+217.136.119.184:22840
+85.201.32.4:22840
+92.64.19.232:22840
+89.221.20.22:22840
+62.167.123.100:22800
+161.230.93.70:22840
+76.65.147.14:22840
+86.7.108.18:22840
+109.129.225.57:22840
+194.158.207.84:22840
+116.203.252.237:22840
+217.12.210.152:22840
+45.115.107.124:22840
+178.128.199.183:22840
+93.107.156.53:22840
+82.15.128.246:22840
+70.75.89.186:22840
+109.87.172.237:22840
+80.90.47.210:22840
+90.189.180.24:22840
+46.98.0.118:22840
+85.221.55.10:22840
+191.32.173.237:22840
+80.5.16.132:22840
+173.212.199.13:22840
+120.88.119.219:22840
+135.19.193.9:22840
+134.249.187.129:22840
+188.194.110.16:22840
+195.38.9.10:22840
+46.42.16.25:22840
+31.165.163.210:22840
+89.232.195.123:22840
+77.122.54.99:22840
+85.105.79.102:22840
+163.172.149.150:22840
+5.53.16.225:22840
+178.124.192.61:22840
+167.99.130.234:22840
+95.158.15.24:22840
+195.239.181.117:22840
+104.158.0.184:22840
+62.171.142.152:22840
+77.122.89.98:22840
+200.37.209.49:22840
+181.43.154.26:22840
+185.230.88.227:22840
+91.169.185.175:62840
+217.136.102.221:22840
+149.210.229.230:22840
+176.37.104.235:22840
+37.97.224.62:22840
+94.107.24.186:22840
+151.252.109.180:22840
+195.93.181.189:22840
+195.93.181.192:22840
+149.210.229.210:22840
+77.122.48.168:22840
+185.4.65.20:22840
+37.97.224.55:22840
+178.170.47.131:22840
+37.97.224.32:22840
+178.170.39.140:22840
+135.181.139.234:22840
+78.129.38.119:22840
+78.181.101.251:22840
+68.183.34.147:22840
+5.255.173.96:22840
+195.177.94.31:22840
+37.57.87.184:22840
+37.97.224.19:22840
+209.145.53.106:22840
+176.214.77.176:22840
+143.178.133.206:22840
+85.118.207.56:22840
+88.211.82.66:22840
+185.23.83.59:22840
+93.75.3.51:22840
+176.210.55.44:22840
+83.144.175.13:22840
+78.188.200.189:22840
+174.114.197.104:22840
+188.83.79.190:22840
+66.183.0.247:22840
+5.61.52.49:22840
+149.210.229.197:22840
+82.118.17.160:22841
+31.202.122.239:22840
+46.150.9.16:22840
+205.250.188.151:22840
+149.210.229.175:22840
+77.122.91.193:22840
+31.202.122.152:22840
+151.95.102.130:22840
+91.245.37.80:22840
+199.119.86.179:22840
+93.72.67.70:22840
+195.134.65.165:22840
+103.56.39.162:20090
+178.27.238.236:22840
+149.210.192.41:22840
+103.56.39.183:20090
+5.61.54.13:22840
+78.188.51.20:22840
+93.157.248.142:22840
+31.172.140.126:22840
+95.189.106.118:22840
+86.94.128.12:22840
+5.132.111.41:22840
+109.129.220.59:22840
+84.83.206.46:22840
+136.144.240.106:22840
+89.28.86.208:22840
+89.28.6.19:22840
+5.255.173.43:22840
+77.122.29.37:22840
+136.144.203.178:22840
+136.144.230.186:22840
+136.144.206.186:22840
+61.6.46.179:22840
+31.202.123.194:22840
+135.125.235.32:22840
+103.83.149.90:22840
+66.183.0.246:22840
+185.12.142.45:22840
+46.37.194.90:22840
+78.26.140.125:22840
+89.191.125.159:22840
+31.201.104.137:22840
+77.92.109.45:22840
+108.249.110.153:22840
+196.41.195.118:22840
+101.98.209.195:22840
+77.92.109.43:22840
+188.127.250.195:22840
+76.176.192.12:22840
+91.177.2.56:22840
+82.193.107.60:22840
+86.83.150.15:22840
+134.249.121.177:22840
+46.166.138.219:22840
+75.156.104.27:22840
+109.100.137.83:22840
+174.88.128.201:22840
+178.168.68.129:22840
+66.183.0.245:22840
+62.238.247.127:22840
+65.21.151.29:22841
+207.81.171.109:22840
+155.93.136.90:22840
+190.22.170.63:22840
+136.144.230.185:22840
+102.182.202.19:22840
+70.52.24.55:22841
+195.191.174.168:22840
+88.223.114.249:22840
+46.142.181.156:22840
+174.94.125.212:22840
+184.146.45.46:22840
+136.144.236.167:22840
+174.88.104.199:22840
+88.223.115.74:22840
+178.170.40.34:22840
+91.149.187.22:22840
+178.150.223.30:22840
+195.138.68.0:22840
+77.122.59.150:22840
+91.241.178.180:22840
+95.164.8.35:22840
+188.138.162.9:22840
+77.122.80.204:22840
+46.150.9.21:22840
+46.119.158.146:22840
+5.34.183.246:22842
+65.21.180.158:22840
+188.187.188.47:22840
+62.171.137.40:22840
+178.151.197.49:22840
+213.231.5.100:22840
+194.28.172.72:22840
+76.71.65.212:22840
+76.71.65.96:22840
+185.46.60.30:22840
+185.172.34.211:22840
+87.255.69.231:22840
+91.222.114.19:22840
+162.55.58.184:22840
+91.233.171.9:22840
+82.16.173.238:22840
+77.169.225.166:22840
+87.248.171.27:22840
+81.243.65.75:22840
+207.6.218.81:22840
+207.6.218.110:22840
+188.124.46.130:22840
+159.196.176.42:22840
+143.244.158.201:22840
+185.224.108.251:22840
+80.100.87.204:22840
+185.48.197.184:22840
+95.67.28.111:22840
+171.25.167.187:22840
+176.100.12.243:22840
+185.224.108.82:22840
+217.12.223.90:22852
+185.224.110.37:22840
+195.138.85.182:22840
+176.104.49.11:22840
+176.104.52.215:22840
+88.204.18.134:22840
+217.26.167.45:22840
+185.172.34.212:22840
+87.255.69.232:22840
+5.165.211.128:22840
+136.144.205.104:22840
+178.168.57.176:22840
+87.255.69.238:22840
+194.233.67.188:22840
+88.159.77.30:22840
+195.74.67.235:22840
+174.94.68.31:22840
+91.5.88.185:22841
+179.223.85.90:22840
+139.59.245.228:22840
+199.119.86.185:22840
+105.228.133.62:22840
+139.59.126.219:22840
+91.5.83.238:22842
+95.216.221.129:22840
+158.140.234.119:22840
diff --git a/basice2e/client-registrar.yaml b/basice2e/client-registrar.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..8187c687401d0ae78e1cfe49af219e2f651e12a3
--- /dev/null
+++ b/basice2e/client-registrar.yaml
@@ -0,0 +1,36 @@
+# ==================================
+# Client Registrar Configuration
+# ==================================
+
+# Log message level (0 = info, 1 = debug, >1 = trace)
+logLevel: 0
+# Path to log file
+logPath: "results/client-registrar.log"
+
+# Public address, used in NDF it gives to client
+publicAddress: "0.0.0.0:11421"
+# The listening port of this server
+port: 11421
+
+# === REQUIRED FOR ENABLING TLS ===
+# Path to the registration server private key file
+keyPath: "../keys/cmix.rip.key"
+# Path to the registration server certificate file
+certPath: "../keys/cmix.rip.crt"
+
+# Maximum number of connections per period
+userRegCapacity: 1000
+# How often the number of connections is reset
+userRegLeakPeriod: "24h"
+
+# Database connection information
+dbUsername: "cmix"
+dbPassword: ""
+dbName: "cmix_server"
+dbAddress: ""
+
+# List of client codes to be added to the database (for testing)
+clientRegCodes:
+  - "AAAA"
+  - "BBBB"
+  - "CCCC"
diff --git a/basice2e/clients.goldoutput/client100.txt b/basice2e/clients.goldoutput/client100.txt
deleted file mode 100644
index 04f0f262ed13f46a49ed39c9452fbf702e38bfa2..0000000000000000000000000000000000000000
--- a/basice2e/clients.goldoutput/client100.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-Sent: Hello from Jake100 to myself, without E2E Encryption
-Message received: Hello from Jake100 to myself, without E2E Encryption
-Received 1
-
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100 to myself, without E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Niamh101, with E2E Encryption
-Received 20
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Sent: Hello from Jake100, with E2E Encryption
-Received 0
diff --git a/basice2e/clients.goldoutput/client101.txt b/basice2e/clients.goldoutput/client101.txt
deleted file mode 100644
index 5d4fef8fd0cfdeec02d5650a4e2b5c143c27db70..0000000000000000000000000000000000000000
--- a/basice2e/clients.goldoutput/client101.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-WARNING: unsafe channel creation enabled
-Adding 
-Received 0
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Sent: Hello from Niamh101, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Received 20
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Message received: Hello from Jake100, with E2E Encryption
-Received 20
diff --git a/basice2e/clients.goldoutput/client13-2.txt b/basice2e/clients.goldoutput/client13-2.txt
new file mode 100644
index 0000000000000000000000000000000000000000..47a80316272c9e5925a553849f68809391d827f4
--- /dev/null
+++ b/basice2e/clients.goldoutput/client13-2.txt
@@ -0,0 +1 @@
+Failed to register user josh13: rpc error: code = Unknown desc = Username josh13 is already taken. Please try again
diff --git a/basice2e/clients.goldoutput/client13.txt b/basice2e/clients.goldoutput/client13.txt
index 1599f8861c71b7c654f8ad3947f047edc8a65ade..48d2b3437b4a6d6a89bb7a54d41cb1cd9e73d700 100644
--- a/basice2e/clients.goldoutput/client13.txt
+++ b/basice2e/clients.goldoutput/client13.txt
@@ -1,7 +1,6 @@
 WARNING: unsafe channel creation enabled
 Adding 
 Received 0
-Received 0
 Sent: Hello from Josh13, with E2E Encryption
 Sent: Hello from Josh13, with E2E Encryption
 Sent: Hello from Josh13, with E2E Encryption
@@ -13,3 +12,4 @@ Message received: Hello from Josh31, with E2E Encryption
 Message received: Hello from Josh31, with E2E Encryption
 Message received: Hello from Josh31, with E2E Encryption
 Received 5
+Removed user from discovery: josh13
diff --git a/basice2e/clients.goldoutput/client18.txt b/basice2e/clients.goldoutput/client18.txt
index 36e0ab779c49fe036634098bf4fc1fa3c58efe3a..79d8ae3a565cc321a410db2fa837c7d331c29b1e 100644
--- a/basice2e/clients.goldoutput/client18.txt
+++ b/basice2e/clients.goldoutput/client18.txt
@@ -1,5 +1,3 @@
-WARNING: unsafe channel creation enabled
-Adding 
 Sent: Hi 18->9, with E2E Encryption
 Sent: Hi 18->9, with E2E Encryption
 Sent: Hi 18->9, with E2E Encryption
diff --git a/basice2e/clients.goldoutput/client19.txt b/basice2e/clients.goldoutput/client19.txt
new file mode 100644
index 0000000000000000000000000000000000000000..956d233a75b09c5efa50c24773ac0446b395e3c5
--- /dev/null
+++ b/basice2e/clients.goldoutput/client19.txt
@@ -0,0 +1,5 @@
+Sent: Hi 19->19, with E2E Encryption
+Sent: Hi 19->19, with E2E Encryption
+Message received: Hi 19->19, with E2E Encryption
+Message received: Hi 19->19, with E2E Encryption
+Received 2
diff --git a/basice2e/clients.goldoutput/client20.txt b/basice2e/clients.goldoutput/client20.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9576ea854f487e54b187ce4f5a327a797fc914d1
--- /dev/null
+++ b/basice2e/clients.goldoutput/client20.txt
@@ -0,0 +1,22 @@
+Sent: Hello from 20, without E2E Encryption
+Sent: Hello from 20, without E2E Encryption
+Sent: Hello from 20, without E2E Encryption
+Sent: Hello from 20, without E2E Encryption
+Sent: Hello from 20, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Received 5
+Sent: Hello from 20, without E2E Encryption
+Sent: Hello from 20, without E2E Encryption
+Sent: Hello from 20, without E2E Encryption
+Sent: Hello from 20, without E2E Encryption
+Sent: Hello from 20, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Message received: Hello from 21, without E2E Encryption
+Received 5
diff --git a/basice2e/clients.goldoutput/client21.txt b/basice2e/clients.goldoutput/client21.txt
new file mode 100644
index 0000000000000000000000000000000000000000..0ce63adb0c05c577975d35f62348f44419cb2379
--- /dev/null
+++ b/basice2e/clients.goldoutput/client21.txt
@@ -0,0 +1,22 @@
+Sent: Hello from 21, without E2E Encryption
+Sent: Hello from 21, without E2E Encryption
+Sent: Hello from 21, without E2E Encryption
+Sent: Hello from 21, without E2E Encryption
+Sent: Hello from 21, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Received 5
+Sent: Hello from 21, without E2E Encryption
+Sent: Hello from 21, without E2E Encryption
+Sent: Hello from 21, without E2E Encryption
+Sent: Hello from 21, without E2E Encryption
+Sent: Hello from 21, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Message received: Hello from 20, without E2E Encryption
+Received 5
diff --git a/basice2e/clients.goldoutput/client42.txt b/basice2e/clients.goldoutput/client42.txt
index f3aacc065aa9690908d4ba9c5f8f099884bdeb48..01d9e3bd18339d1112ddc5d1955379b1f500e11f 100644
--- a/basice2e/clients.goldoutput/client42.txt
+++ b/basice2e/clients.goldoutput/client42.txt
@@ -25,3 +25,4 @@ Message received: Hello from Ben43, with E2E Encryption
 Message received: Hello from Ben43, with E2E Encryption
 Message received: Hello from Ben43, with E2E Encryption
 Received 5
+Received 0
diff --git a/basice2e/clients.goldoutput/client43.txt b/basice2e/clients.goldoutput/client43.txt
index 91bddd4997197eb6642e84306830e92635c57ad7..a6fddbbed925cacac9051fc34e893167164b545d 100644
--- a/basice2e/clients.goldoutput/client43.txt
+++ b/basice2e/clients.goldoutput/client43.txt
@@ -1,7 +1,6 @@
 WARNING: unsafe channel creation enabled
 Adding 
 Received 0
-Received 0
 Sent: Hello from Ben43, with E2E Encryption
 Sent: Hello from Ben43, with E2E Encryption
 Sent: Hello from Ben43, with E2E Encryption
diff --git a/basice2e/clients.goldoutput/client80.txt b/basice2e/clients.goldoutput/client80.txt
new file mode 100644
index 0000000000000000000000000000000000000000..859ae7de3ed856fc1d2f01ce3645c4e01687126a
--- /dev/null
+++ b/basice2e/clients.goldoutput/client80.txt
@@ -0,0 +1,10 @@
+Created new group with name "Group Name" and message "80 inviting 81 and 82 to new group"
+Got group with name "Group Name" and message "80 inviting 81 and 82 to new group"
+Printed list of 1 groups.
+Received group message: "Hello 2 from 82"
+Received group message: "Hello from 81"
+Received group message: "Hello from 82"
+Sent message "Hello 2 from 80" to group.
+Sent message "Hello from 80" to group.
+Waiting for 1 group message(s) to be received.
+Waiting for 2 group message(s) to be received.
diff --git a/basice2e/clients.goldoutput/client81.txt b/basice2e/clients.goldoutput/client81.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e6a105d189c4372a9f3ef435dc4db80de96d4163
--- /dev/null
+++ b/basice2e/clients.goldoutput/client81.txt
@@ -0,0 +1,11 @@
+Got group with name "Group Name" and message "80 inviting 81 and 82 to new group"
+Joined group with name "Group Name" and message "80 inviting 81 and 82 to new group"
+Left group.
+Printed list of 1 groups.
+Received group message: "Hello from 80"
+Received group message: "Hello from 82"
+Sent message "Hello from 81" to group.
+Timed out waiting for 1 group message(s).
+Waiting for 1 group message(s) to be received.
+Waiting for 2 group message(s) to be received.
+Waiting for group request to be received.
diff --git a/basice2e/clients.goldoutput/client82.txt b/basice2e/clients.goldoutput/client82.txt
new file mode 100644
index 0000000000000000000000000000000000000000..170f71e6278532248e9de2bcffed4c00862e7509
--- /dev/null
+++ b/basice2e/clients.goldoutput/client82.txt
@@ -0,0 +1,11 @@
+Got group with name "Group Name" and message "80 inviting 81 and 82 to new group"
+Joined group with name "Group Name" and message "80 inviting 81 and 82 to new group"
+Printed list of 1 groups.
+Received group message: "Hello 2 from 80"
+Received group message: "Hello from 80"
+Received group message: "Hello from 81"
+Sent message "Hello 2 from 82" to group.
+Sent message "Hello from 82" to group.
+Waiting for 1 group message(s) to be received.
+Waiting for 2 group message(s) to be received.
+Waiting for group request to be received.
diff --git a/basice2e/clients.goldoutput/client9.txt b/basice2e/clients.goldoutput/client9.txt
index 018fcbb73b8cd9b7ad335206d7a5028b728ebe8a..c576de34dd2a6082ba08712cc429df47cd04fa47 100644
--- a/basice2e/clients.goldoutput/client9.txt
+++ b/basice2e/clients.goldoutput/client9.txt
@@ -1,5 +1,3 @@
-WARNING: unsafe channel creation enabled
-Adding 
 Sent: Hi 9->9, with E2E Encryption
 Sent: Hi 9->9, with E2E Encryption
 Message received: Hi 9->9, with E2E Encryption
@@ -10,8 +8,6 @@ Sent: Hi 9->9, with E2E Encryption
 Message received: Hi 9->9, with E2E Encryption
 Message received: Hi 9->9, with E2E Encryption
 Received 2
-WARNING: unsafe channel creation enabled
-Adding 
 Sent: Hi 9->18, with E2E Encryption
 Sent: Hi 9->18, with E2E Encryption
 Sent: Hi 9->18, with E2E Encryption
diff --git a/basice2e/devnet.txt b/basice2e/devnet.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8f0d1b3ed83b6f133d022e2e8bddb9d1a1db7ea9
--- /dev/null
+++ b/basice2e/devnet.txt
@@ -0,0 +1,6 @@
+34.219.228.165:11420
+54.203.24.52:11420
+34.222.85.101:11420
+34.219.242.38:11420
+35.167.60.76:11420
+52.89.133.230:11420
diff --git a/basice2e/e2eReport.py b/basice2e/e2eReport.py
new file mode 100755
index 0000000000000000000000000000000000000000..2ff019e44abc78c7cde807a0b8fd3ccde8dbecc7
--- /dev/null
+++ b/basice2e/e2eReport.py
@@ -0,0 +1,133 @@
+#!/usr/bin/env python3
+
+# This script is used for building reports on message sending for E2E integration tests
+import re
+import glob
+import os
+import logging as log
+import datetime
+import statistics
+
+resultsDir = "./results/clients"
+
+
+def err(s):
+    """
+    Helper for printing errors and exiting
+
+    :param s: Error string to print
+    """
+    log.error(s)
+    exit(1)
+
+
+def find_files():
+    """Obtains list of files to search."""
+    if not os.path.isdir(resultsDir):
+        err("Directory {} does not exist!".format(resultsDir))
+    return glob.glob('{}/client*.log'.format(resultsDir))
+
+
+def main():
+    log.basicConfig(format='[%(levelname)s] %(asctime)s: %(message)s',
+                    level=log.INFO, datefmt='%d-%b-%y %H:%M:%S')
+    log_files = find_files()
+
+    messages_sent = dict()
+    messages_received = dict()
+    rounds_sent = dict()
+
+    # Scan each log file
+    for path in log_files:
+        log.info("Scanning {}".format(path))
+        with open(path, 'r') as file:
+            while True:
+                line = file.readline()
+                if not line:
+                    break
+                else:
+                    if "Successfully sent to EphID" in line:
+                        # Capture message sending
+                        sent_message = re.findall('msgDigest: (.{20})\)', line)[0]
+                        log.debug("Located sent message: {}".format(sent_message))
+                        messages_sent[sent_message] = {"sender": os.path.basename(path)}
+
+                        # Capture message timestamp
+                        sent_timestamp_str = re.findall('INFO (.{19}\.{0,1}\d{0,6})', line)[0]
+                        try:
+                            sent_timestamp = datetime.datetime.strptime(sent_timestamp_str, '%Y/%m/%d %H:%M:%S.%f')
+                        except ValueError:
+                            sent_timestamp = datetime.datetime.strptime(sent_timestamp_str, '%Y/%m/%d %H:%M:%S')
+                        log.debug("Located sent timestamp: {}".format(sent_timestamp))
+                        messages_sent[sent_message]["sent"] = sent_timestamp
+
+                        # Capture rounds messages were sent in
+                        sent_round = re.findall('\) in round ([0-9]+)', line)[0]
+                        log.debug("Located sent round: {}".format(sent_round))
+                        messages_sent[sent_message]["round"] = sent_round
+                        if sent_round not in rounds_sent:
+                            rounds_sent[sent_round] = False
+
+                    elif "Received message of type" in line or "Received AuthRequest from" in line or "Received AuthConfirm from" in line:
+                        # Capture message receiving
+                        received_message = re.findall(' msgDigest: (.{20})', line)[0]
+                        log.debug("Located received message: {}".format(received_message))
+                        messages_received[received_message] = {"receiver": os.path.basename(path)}
+
+                        # Capture message timestamp
+                        received_timestamp_str = re.findall('INFO (.{19}\.{0,1}\d{0,6})', line)[0]
+                        try:
+                            received_timestamp = datetime.datetime.strptime(received_timestamp_str,
+                                                                            '%Y/%m/%d %H:%M:%S.%f')
+                        except ValueError:
+                            received_timestamp = datetime.datetime.strptime(received_timestamp_str, '%Y/%m/%d %H:%M:%S')
+                        log.debug("Located received timestamp: {}".format(received_timestamp))
+                        messages_received[received_message]["received"] = received_timestamp
+
+                    elif "Round(s)" in line:
+                        # Capture round success
+                        successful_rounds = re.findall('Round\(s\) ([0-9]+) successful', line)
+                        for successful_round in successful_rounds:
+                            log.debug("Located successful round: {}".format(successful_round))
+                            rounds_sent[successful_round] = True
+
+    # Print results
+    num_successful = 0  # Keep track of how many messages were received successfully
+    total_latency = datetime.timedelta()  # Keep track of the total message latencies to calculate a mean
+    latencies = []  # Keep track of each message's latency in order to calculate a median
+    for msgDigest, senderDict in messages_sent.items():
+        if msgDigest in messages_received:
+            num_successful += 1
+            time_sent = messages_sent[msgDigest]["sent"]
+            time_received = messages_received[msgDigest]["received"]
+            message_latency = time_received - time_sent
+            latencies.append(message_latency)
+            total_latency += message_latency
+            log.info("Message {} sent by {} on round {} was received after {}".format(msgDigest,
+                                                                                      senderDict["sender"],
+                                                                                      senderDict["round"],
+                                                                                      message_latency))
+            log.info("\tSent: {}, Received: {}".format(time_sent, time_received))
+        else:
+            log.error("Message {} sent by {} on round {} was NOT received".format(msgDigest,
+                                                                                  senderDict["sender"],
+                                                                                  senderDict["round"]))
+    for round_id, was_successful in rounds_sent.items():
+        if was_successful:
+            log.debug("Round {} was successful".format(round_id))
+        else:
+            log.warning("Round {} was NOT confirmed successful, messages may have been dropped".format(round_id))
+
+    log.info("{}/{} messages received successfully!".format(num_successful, len(messages_sent)))
+    log.info("\tMean: {}, Median: {}".format(total_latency / num_successful, statistics.median(latencies)))
+
+
+if __name__ == "__main__":
+    main()
+
+# INFO 2021/05/07 15:25:14 Received message of type None from ouQD89J4YdmlzcAkdjjgVa49SANsi1JL5JLVjrWjZtED, msgDigest: inDu2/zmGD+vtCMVHXdg
+# INFO 2021/05/19 15:29:09 Received 2 messages in Round 65253 for -7 (AAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD)
+# INFO 2021/05/07 15:25:03 Sending to EphID -15 (ouQD89J4YdmlzcAkdjjgVa49SANsi1JL5JLVjrWjZtED) on round 797, (msgDigest: YTuZd9p8759GBMNz8Dw7, ecrMsgDigest: JshXEJ4WTBsbRFWQDBYq) via gateway sAtfNaRd1jePhfRrcDgZgHHAAmhZ/F0jDbD4JgAfkMsB
+# INFO 2021/05/07 15:25:04 Successfully sent to EphID -15 (source: ouQD89J4YdmlzcAkdjjgVa49SANsi1JL5JLVjrWjZtED) in round 797 (msgDigest: YTuZd9p8759GBMNz8Dw7)
+# INFO 2021/05/07 15:25:04 Result of sending message "Hello from Rick42, with E2E Encryption" to "ouQD89J4YdmlzcAkdjjgVa49SANsi1JL5JLVjrWjZtED":
+# INFO 2021/05/07 15:25:04 	Round(s) 795 successful
diff --git a/basice2e/gateway-1.yaml b/basice2e/gateway-1.yaml
index 68f4d55fd700508da80cf16a613b879631fdaedd..7b66bb1c1b5efea590ca1751d689265c0c2e3ca2 100644
--- a/basice2e/gateway-1.yaml
+++ b/basice2e/gateway-1.yaml
@@ -12,7 +12,7 @@ log: "results/gateways/gateway-1.log"
 logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
-nodeAddress: "127.0.0.1:50000"
+cmixAddress: "127.0.0.1:50000"
 
 # Port for Gateway to listen on. Gateway must be the only listener on this port.
 # Required field.
@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
 # Path to the certificate file
 certPath: "../keys/cmix.rip.crt"
 # Path to the permissioning certificate
-permissioningCertPath: "../keys/cmix.rip.crt"
+schedulingCertPath: "../keys/cmix.rip.crt"
 # Path to the certificate file
-serverCertPath: "../keys/cmix.rip.crt"
+cmixCertPath: "../keys/cmix.rip.crt"
 
 devMode: true
 
diff --git a/basice2e/gateway-2.yaml b/basice2e/gateway-2.yaml
index d01a93fc8a21640425c4b816e0ef5ecf44d7b9cd..7ea7802ef7a38dcd72672eae4b4252b4d639a3db 100644
--- a/basice2e/gateway-2.yaml
+++ b/basice2e/gateway-2.yaml
@@ -12,7 +12,7 @@ log: "results/gateways/gateway-2.log"
 logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
-nodeAddress: "127.0.0.1:50001"
+cmixAddress: "127.0.0.1:50001"
 
 # Port for Gateway to listen on. Gateway must be the only listener on this port.
 # Required field.
@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
 # Path to the certificate file
 certPath: "../keys/cmix.rip.crt"
 # Path to the permissioning certificate
-permissioningCertPath: "../keys/cmix.rip.crt"
+schedulingCertPath: "../keys/cmix.rip.crt"
 # Path to the certificate file
-serverCertPath: "../keys/cmix.rip.crt"
+cmixCertPath: "../keys/cmix.rip.crt"
 
 devMode: true
 
diff --git a/basice2e/gateway-3.yaml b/basice2e/gateway-3.yaml
index 954dbefd85d78b36b89c9e7f5b6a71777f14128f..406c15caf7f0313613f5726f64d8ebece49d48a4 100644
--- a/basice2e/gateway-3.yaml
+++ b/basice2e/gateway-3.yaml
@@ -12,7 +12,7 @@ log: "results/gateways/gateway-3.log"
 logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
-nodeAddress: "127.0.0.1:50002"
+cmixAddress: "127.0.0.1:50002"
 
 # Port for Gateway to listen on. Gateway must be the only listener on this port.
 # Required field.
@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
 # Path to the certificate file
 certPath: "../keys/cmix.rip.crt"
 # Path to the permissioning certificate
-permissioningCertPath: "../keys/cmix.rip.crt"
+schedulingCertPath: "../keys/cmix.rip.crt"
 # Path to the certificate file
-serverCertPath: "../keys/cmix.rip.crt"
+cmixCertPath: "../keys/cmix.rip.crt"
 
 devMode: true
 
diff --git a/basice2e/gateway-4.yaml b/basice2e/gateway-4.yaml
index 8a2e2d1091c6243cad3270598a748d179e530216..a72048f84fc711deb60d3c6da0c9531265820f91 100644
--- a/basice2e/gateway-4.yaml
+++ b/basice2e/gateway-4.yaml
@@ -12,7 +12,7 @@ log: "results/gateways/gateway-4.log"
 logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
-nodeAddress: "127.0.0.1:50003"
+cmixAddress: "127.0.0.1:50003"
 
 # Port for Gateway to listen on. Gateway must be the only listener on this port.
 # Required field.
@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
 # Path to the certificate file
 certPath: "../keys/cmix.rip.crt"
 # Path to the permissioning certificate
-permissioningCertPath: "../keys/cmix.rip.crt"
+schedulingCertPath: "../keys/cmix.rip.crt"
 # Path to the certificate file
-serverCertPath: "../keys/cmix.rip.crt"
+cmixCertPath: "../keys/cmix.rip.crt"
 
 devMode: true
 
diff --git a/basice2e/gateway-5.yaml b/basice2e/gateway-5.yaml
index 079566e3d4f94756d156b40fa0f3a285c42bb581..353dc07cac669bbfaf990546b5617a2fd0530b18 100644
--- a/basice2e/gateway-5.yaml
+++ b/basice2e/gateway-5.yaml
@@ -12,7 +12,7 @@ log: "results/gateways/gateway-5.log"
 logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
-nodeAddress: "127.0.0.1:50004"
+cmixAddress: "127.0.0.1:50004"
 
 # Port for Gateway to listen on. Gateway must be the only listener on this port.
 # Required field.
@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
 # Path to the certificate file
 certPath: "../keys/cmix.rip.crt"
 # Path to the permissioning certificate
-permissioningCertPath: "../keys/cmix.rip.crt"
+schedulingCertPath: "../keys/cmix.rip.crt"
 # Path to the certificate file
-serverCertPath: "../keys/cmix.rip.crt"
+cmixCertPath: "../keys/cmix.rip.crt"
 
 devMode: true
 
diff --git a/basice2e/network.config b/basice2e/network.config
new file mode 100644
index 0000000000000000000000000000000000000000..e7242113823cac0bea1eec70d766f3c66acbdf0a
--- /dev/null
+++ b/basice2e/network.config
@@ -0,0 +1,26 @@
+localhost:8440
+# This is the network configuration file. The top line of this file,
+# when not set via command line, is used to determine to which network
+# the integration test will be run against.
+
+# Note you can also specify "release", "betanet", or "protonet" on run.sh
+
+# Betanet gateways
+109.169.15.30:22840
+5.12.137.118:22840
+92.246.20.92:22840
+178.16.39.203:22840
+86.135.17.18:22840
+
+# Release (messenger test) network gateways
+34.221.74.216:11420
+52.25.9.28:11420
+54.149.122.115:11420
+
+
+# protonet
+185.152.3.247:11420
+93.151.207.39:11420
+93.107.154.131:11420
+173.208.225.75:11421
+92.246.20.92:11420
diff --git a/basice2e/permissioning.yaml b/basice2e/permissioning.yaml
index c6b3a849e51098c80bd8661584a45467536f86c9..3c9b93556338643fe408db1698b5de5f827f15da 100644
--- a/basice2e/permissioning.yaml
+++ b/basice2e/permissioning.yaml
@@ -19,16 +19,21 @@ dbAddress: "0.0.0.0:6969"
 
 minimumNodes: 5
 
-minGatewayVersion: "2.0.0"
-minServerVersion:  "2.0.0"
+minGatewayVersion: "3.0.0"
+minServerVersion:  "3.0.0"
 minClientVersion: "2.0.0"
 nodeMetricInterval: 3
 
-disableGatewayPing: true
+# For testing, use the sequence as the country code. Do not use the geobinning database
+disableGeoBinning: true
 
+# For testing, do not exclude node or gateway IPs which are local to the machine
+allowLocalIPs: true
 # Disable pruning of NDF for offline nodes
 # if set to false, network will sleep for five minutes on start
 disableNDFPruning: true
+permissiveIPChecking: true
+
 
 # "Location of the user discovery contact file.
 udContactPath: "results/udContact.bin"
@@ -88,3 +93,6 @@ RegCodesFilePath: "regCodes.json"
 
 # Set address space size for ephemeral IDs
 addressSpace: 32
+
+# Public address used in NDF to give to client
+registrationAddress: "0.0.0.0:11421"
diff --git a/basice2e/protonet.txt b/basice2e/protonet.txt
new file mode 100644
index 0000000000000000000000000000000000000000..de8fcdd1199d00b54f2ed8cb473d78f6c33fca56
--- /dev/null
+++ b/basice2e/protonet.txt
@@ -0,0 +1,166 @@
+109.169.86.5:22840
+15.161.170.171:22840
+78.47.148.163:22840
+173.208.225.77:22841
+173.249.44.133:22840
+65.21.177.64:22840
+135.181.112.215:22840
+174.94.134.49:22840
+65.21.235.104:22840
+162.55.100.14:22840
+95.111.227.144:22840
+176.9.5.114:22840
+136.243.89.98:22840
+144.126.149.30:22840
+194.163.163.77:22840
+109.98.108.250:22840
+37.97.169.197:22840
+5.178.229.56:22840
+65.21.154.37:22840
+221.121.158.133:22840
+37.97.206.117:22840
+37.97.220.129:22840
+xerxesgw.caius.ovh:22840
+nodencr4.access.ly:22840
+3.95.250.79:22840
+94.130.52.243:22840
+114.34.49.32:22840
+65.21.50.177:22840
+167.86.124.52:22840
+37.97.224.110:22840
+37.97.220.120:22840
+144.126.149.131:22840
+49.12.45.179:22840
+173.212.217.93:22840
+183.99.96.68:22840
+144.76.65.107:22840
+66.94.98.17:22840
+65.21.51.187:22840
+135.181.213.94:22840
+69.197.128.74:22840
+167.86.113.159:22840
+46.4.50.57:22840
+95.216.5.58:22840
+144.126.147.3:22840
+173.208.225.78:22842
+5.105.0.170:22840
+gateway.xx.w3m.one:22840
+31.202.142.96:22840
+31.202.122.131:22840
+37.55.17.106:22840
+103.107.182.192:22840
+195.201.171.211:22840
+194.19.235.88:22840
+88.198.151.126:22840
+66.94.98.251:22840
+194.163.170.125:22840
+65.21.143.248:22840
+162.55.131.110:22840
+37.97.220.130:22840
+65.21.170.29:22840
+135.181.212.170:22840
+109.237.108.117:22840
+151.115.50.172:22840
+66.94.98.249:22840
+178.33.239.236:22840
+46.4.54.229:22840
+194.163.161.160:22840
+201.189.77.170:22840
+161.97.162.104:22840
+66.94.98.223:22840
+167.86.92.151:22840
+135.181.138.161:22840
+51.154.9.241:22840
+66.94.98.243:22840
+66.94.98.245:22840
+136.144.189.230:26700
+66.94.98.224:22840
+88.119.195.16:22840
+66.94.98.221:22840
+181.43.194.251:22840
+85.118.207.49:22840
+144.126.151.224:22840
+213.136.70.8:22840
+75.119.130.123:22840
+23.88.46.150:22840
+65.21.221.236:22840
+157.90.182.119:22840
+194.163.171.145:22840
+144.126.150.120:22840
+161.97.85.205:22840
+135.181.104.19:22840
+66.94.98.237:22840
+65.21.204.13:22840
+66.94.99.187:22840
+45.8.230.37:22840
+207.180.211.56:22840
+66.94.98.248:22840
+85.206.25.76:22840
+138.201.37.166:22840
+149.210.229.223:22840
+18.170.167.72:22840
+142.112.52.184:22840
+78.46.158.56:22840
+54.255.36.102:22840
+109.69.85.85:22840
+45.129.183.97:22840
+94.130.136.136:22840
+161.97.78.106:22840
+194.163.179.156:22840
+194.163.177.13:22840
+181.43.3.156:22840
+77.245.183.23:22841
+149.210.192.111:22840
+2.134.17.119:22840
+3.121.32.21:22840
+5.189.160.96:22840
+194.163.158.140:22840
+15.161.187.195:22840
+163.58.121.146:22840
+186.10.109.96:22840
+45.115.107.245:22840
+103.83.149.243:22840
+65.108.52.154:11098
+194.163.182.110:22840
+176.113.81.73:22840
+161.97.155.242:22840
+185.150.190.94:22840
+157.90.125.17:22840
+116.202.156.148:22840
+82.207.77.6:22840
+95.217.206.164:22840
+62.171.160.228:22840
+193.105.73.87:22840
+103.83.149.238:22840
+178.168.74.126:22840
+13.245.206.69:22840
+65.21.224.32:22840
+65.21.88.210:22840
+178.170.48.103:22840
+65.108.54.89:22840
+122.160.143.104:22840
+5.189.176.210:22840
+194.19.235.81:22840
+95.217.42.107:22840
+173.249.33.128:22840
+188.240.52.205:22840
+65.21.234.163:22840
+161.97.173.206:22840
+194.163.184.228:22840
+66.94.101.105:22840
+161.97.162.123:22840
+144.126.151.54:22840
+5.45.84.200:22840
+95.111.248.51:22840
+144.126.148.56:22840
+51.210.208.77:22840
+66.94.101.132:22840
+65.21.58.159:22840
+186.10.149.5:22840
+209.145.53.207:22840
+66.94.100.194:22840
+66.94.96.186:22840
+5.9.43.132:22840
+79.143.180.97:22840
+66.94.96.203:22840
+66.94.100.185:22840
diff --git a/basice2e/regCodes.json b/basice2e/regCodes.json
index f0f63410b57c9ae070c9377175a98d40d89180fb..fea6a9d6e7f50348e01fb324a74de2e200506b35 100644
--- a/basice2e/regCodes.json
+++ b/basice2e/regCodes.json
@@ -1 +1 @@
-[{"RegCode": "qpol", "Order": "0"},{"RegCode": "yiiq", "Order": "1"},{"RegCode": "vydz", "Order": "2"},{"RegCode": "gwxs", "Order": "3"},{"RegCode": "nahv", "Order": "4"}, {"RegCode": "doko", "Order": "5"}]
+[{"RegCode": "qpol", "Order": "CR"},{"RegCode": "yiiq", "Order": "GB"},{"RegCode": "vydz", "Order": "SK"},{"RegCode": "gwxs", "Order": "HR"},{"RegCode": "nahv", "Order": "IQ"}, {"RegCode": "doko", "Order": "RU"}]
diff --git a/basice2e/registration.json b/basice2e/registration.json
index 676f2d1a2ea2f72c6922e020f1b0d0d42203d3b2..3662e6d4c492b4b68671b21d85a323f5fdcaca37 100644
--- a/basice2e/registration.json
+++ b/basice2e/registration.json
@@ -1,12 +1,12 @@
 {
   "TeamSize": 5,
   "BatchSize": 32,
-  "RandomOrdering": true,
-  "MinimumDelay": 1000,
+  "MinimumDelay": 3000,
   "RealtimeDelay": 5000,
+  "SemiOptimalOrdering": true,
   "Threshold":     3,
   "NodeCleanUpInterval": 3,
-  "ResourceQueueTimeout": 300000,
-  "Secure": 		     false
+  "ResourceQueueTimeout": 300000
 
- }
+
+}
diff --git a/basice2e/release.txt b/basice2e/release.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f0b068d95abde5d34814dc1ba3d5a9d29f7b1012
--- /dev/null
+++ b/basice2e/release.txt
@@ -0,0 +1,3 @@
+34.221.74.216:11420
+52.25.9.28:11420
+54.149.122.115:11420
diff --git a/basice2e/run.sh b/basice2e/run.sh
index d4c99bf51b9849609d665ba8ba1b814584740a68..643f95b42e1d8affbfc77b2842ad072b1566e16f 100755
--- a/basice2e/run.sh
+++ b/basice2e/run.sh
@@ -15,50 +15,76 @@ mkdir -p .elixxir
 
 if [ $# -gt 1 ]
 then
-    echo "usage: $0 [permsip:port]"
+    echo "usage: $0 [gatewayip:port]"
     exit
 fi
 
 
-PERMISSIONING=$1
+NETWORKENTRYPOINT=$1
 
+DEBUGLEVEL=${DEBUGLEVEL-0}
 
 
-#export GRPC_GO_LOG_VERBOSITY_LEVEL=99
-#export GRPC_GO_LOG_SEVERITY_LEVEL=info
-
 SERVERLOGS=results/servers
 GATEWAYLOGS=results/gateways
 CLIENTOUT=results/clients
 UDBOUT=results/udb-console.txt
 CLIENTCLEAN=results/clients-cleaned
 
-CLIENTOPTS="--password hello --ndf results/ndf.json --waitTimeout 90 --unsafe-channel-creation -v 2"
-CLIENTUDOPTS="--password hello --ndf results/ndf.json -v 2"
-CLIENTSINGLEOPTS="--password hello --ndf results/ndf.json -v 2"
+CLIENTOPTS="--password hello --ndf results/ndf.json --waitTimeout 90 --unsafe-channel-creation -v $DEBUGLEVEL"
+CLIENTUDOPTS="--password hello --ndf results/ndf.json -v $DEBUGLEVEL"
+CLIENTSINGLEOPTS="--password hello --ndf results/ndf.json -v $DEBUGLEVEL"
+CLIENTGROUPOPTS="--password hello --ndf results/ndf.json -v $DEBUGLEVEL"
 
 mkdir -p $SERVERLOGS
 mkdir -p $GATEWAYLOGS
 mkdir -p $CLIENTOUT
 mkdir -p $CLIENTCLEAN
 
-if [ "$PERMISSIONING" == "" ]
+if [ "$NETWORKENTRYPOINT" == "betanet" ]
+then
+    NETWORKENTRYPOINT=$(sort -R betanet.txt | head -1)
+elif [ "$NETWORKENTRYPOINT" == "protonet" ]
+then
+    NETWORKENTRYPOINT=$(sort -R protonet.txt | head -1)
+elif [ "$NETWORKENTRYPOINT" == "release" ]
+then
+    NETWORKENTRYPOINT=$(sort -R release.txt | head -1)
+elif [ "$NETWORKENTRYPOINT" == "devnet" ]
+then
+    NETWORKENTRYPOINT=$(sort -R devnet.txt | head -1)
+elif [ "$NETWORKENTRYPOINT" == "" ]
+then
+    NETWORKENTRYPOINT=$(head -1 network.config)
+fi
+
+echo "NETWORK: $NETWORKENTRYPOINT"
+
+if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
 then
     echo "STARTING SERVERS..."
 
-    UDBID=$(../bin/client init -s results/udbsession -l results/udbidgen.log --password hello --ndf ndf.json --writeContact results/udContact.bin)
+    UDBID=$(../bin/client init -s results/udbsession -l results/udbidgen.log --password hello --ndf ndf.json --writeContact results/udContact.bin -v $DEBUGLEVEL)
     echo "GENERATED UDB ID: $UDBID"
 
 
-    PERMCMD="../bin/permissioning --logLevel 2 -c permissioning.yaml "
+    PERMCMD="../bin/permissioning --logLevel $DEBUGLEVEL -c permissioning.yaml "
     $PERMCMD > results/permissioning-console.txt 2>&1 &
     PIDVAL=$!
     echo "$PERMCMD -- $PIDVAL"
 
+
+    # Run Client Registrar
+    CLIENT_REG_CMD="../bin/client-registrar \
+    -l 2 -c client-registrar.yaml"
+    $CLIENT_REG_CMD > results/client-registrat-console.txt 2>&1 &
+    PIDVAL=$!
+    echo "$CLIENT_REG_CMD -- $PIDVAL"
+
     for SERVERID in $(seq 5 -1 1)
     do
         IDX=$(($SERVERID - 1))
-        SERVERCMD="../bin/server --config server-$SERVERID.yaml"
+        SERVERCMD="../bin/server --logLevel $DEBUGLEVEL --config server-$SERVERID.yaml"
         if [ $SERVERID -eq 5 ] && [ -n "$NSYSENABLED" ]
         then
             SERVERCMD="nsys profile --session-new=gputest --trace=cuda -o server-$SERVERID $SERVERCMD"
@@ -72,7 +98,7 @@ then
     for GWID in $(seq 5 -1 1)
     do
         IDX=$(($GWID - 1))
-        GATEWAYCMD="../bin/gateway --logLevel 2 --config gateway-$GWID.yaml"
+        GATEWAYCMD="../bin/gateway --logLevel $DEBUGLEVEL --config gateway-$GWID.yaml"
         $GATEWAYCMD > $GATEWAYLOGS/gateway-$GWID-console.txt 2>&1 &
         PIDVAL=$!
         echo "$GATEWAYCMD -- $PIDVAL"
@@ -116,14 +142,14 @@ then
     echo -n "Waiting for a round to run"
     while [ ! -s rid.txt ] && [ $cnt -lt 120 ]; do
         sleep 1
-        grep -a "RID 1 ReceiveFinishRealtime END" results/servers/server-5.log > rid.txt || true
+        grep -a "RID 1 ReceiveFinishRealtime END" results/servers/server-* > rid.txt || true
         cnt=$(($cnt + 1))
         echo -n "."
     done
 
     # Start a user discovery bot server
     echo "STARTING UDB..."
-    UDBCMD="../bin/udb --logLevel 3 --config udb.yaml -l 1"
+    UDBCMD="../bin/udb --logLevel $DEBUGLEVEL --config udb.yaml -l 1"
     $UDBCMD >> $UDBOUT 2>&1 &
     PIDVAL=$!
     echo $PIDVAL >> results/serverpids
@@ -136,19 +162,26 @@ then
         echo -n "."
     done
 
-    echo "localhost:18000" > results/permserver.txt
+    echo "localhost:8440" > results/startgwserver.txt
 
     echo "DONE LETS DO STUFF"
 
 else
-    echo "Connecting to network defined at $PERMISSIONING"
-    echo $PERMISSIONING > results/permserver.txt
+    echo "Connecting to network defined at $NETWORKENTRYPOINT"
+    echo $NETWORKENTRYPOINT > results/startgwserver.txt
 fi
 
 echo "DOWNLOADING TLS Cert..."
-openssl s_client -showcerts -connect $(cat results/permserver.txt) < /dev/null 2>&1 | openssl x509 -outform PEM > results/permcert.pem
+CMD="openssl s_client -showcerts -connect $(cat results/startgwserver.txt)"
+echo $CMD
+eval $CMD < /dev/null 2>&1 > "results/startgwcert.bin"
+CMD="cat results/startgwcert.bin | openssl x509 -outform PEM"
+echo $CMD
+eval $CMD > "results/startgwcert.pem"
+head "results/startgwcert.pem"
+
 echo "DOWNLOADING NDF..."
-CLIENTCMD="../bin/client getndf --permhost $(cat results/permserver.txt) --cert results/permcert.pem"
+CLIENTCMD="../bin/client getndf --gwhost $(cat results/startgwserver.txt) --cert results/startgwcert.pem"
 eval $CLIENTCMD >> results/ndf.json 2>&1 &
 PIDVAL=$!
 echo "$CLIENTCMD -- $PIDVAL"
@@ -165,6 +198,10 @@ then
 fi
 
 
+#export GRPC_GO_LOG_VERBOSITY_LEVEL=99
+#export GRPC_GO_LOG_SEVERITY_LEVEL=info
+
+
 echo "RUNNING CLIENTS..."
 
 runclients() {
@@ -202,7 +239,7 @@ runclients() {
 }
 
 
-if [ "$PERMISSIONING" == "" ]
+if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
 then
 
     echo "RUNNING BASIC CLIENTS..."
@@ -213,6 +250,7 @@ then
     # Send E2E messages between a single user
     mkdir -p blob9
     mkdir -p blob18
+    mkdir -p blob91
     echo "TEST E2E WITH PRECANNED USERS..."
     CLIENTCMD="timeout 240s ../bin/client  $CLIENTOPTS -l $CLIENTOUT/client9.log --sendDelay 1000 --sendCount 2 --receiveCount 2 -s blob9/blob9 --sendid 9 --destid 9 -m \"Hi 9->9, with E2E Encryption\""
     eval $CLIENTCMD >> $CLIENTOUT/client9.txt 2>&1 &
@@ -224,6 +262,12 @@ then
     PIDVAL=$!
     echo "$CLIENTCMD -- $PIDVAL"
     wait $PIDVAL
+    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client19.log --sendDelay 1000 --sendCount 2 --receiveCount 2 -s blob19/blob19 --slowPolling --sendid 19 --destid 19 -m \"Hi 19->19, with E2E Encryption\""
+    eval $CLIENTCMD >> $CLIENTOUT/client19.txt 2>&1 &
+    PIDVAL=$!
+    echo "$CLIENTCMD -- $PIDVAL"
+    wait $PIDVAL
+
 
     # Send E2E messages between two users
     CLIENTCMD="timeout 240s ../bin/client  $CLIENTOPTS -l $CLIENTOUT/client9.log --sendDelay 1000 --sendCount 3 --receiveCount 3 -s blob9/blob9 --sendid 9 --destid 18 -m \"Hi 9->18, with E2E Encryption\""
@@ -262,6 +306,20 @@ then
     wait $PIDVAL
     wait $PIDVAL2
 
+    echo "FORCING MESSAGE PICKUP RETRY... (NON-E2E, PRECAN)"
+    # Higher timeouts for this test to allow message pickup retry to function
+    CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS --forceMessagePickupRetry --unsafe -l $CLIENTOUT/client20.log -s blob20 --sendid 20 --destid 21 --sendCount 5 --receiveCount 5 -m \"Hello from 20, without E2E Encryption\""
+    eval $CLIENTCMD >> $CLIENTOUT/client20.txt || true &
+    PIDVAL=$!
+    echo "$CLIENTCMD -- $PIDVAL"
+    CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS --forceMessagePickupRetry --unsafe -l $CLIENTOUT/client21.log -s blob21 --sendid 21 --destid 20 --sendCount 5 --receiveCount 5 -m \"Hello from 21, without E2E Encryption\""
+    eval $CLIENTCMD >> $CLIENTOUT/client21.txt || true &
+    PIDVAL2=$!
+    echo "$CLIENTCMD -- $PIDVAL"
+    wait $PIDVAL
+    wait $PIDVAL2
+
+
 fi
 
 # Non-precanned E2E user messaging
@@ -271,101 +329,116 @@ eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
 PIDVAL=$!
 echo "$CLIENTCMD -- $PIDVAL"
 wait $PIDVAL
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43 --writeContact $CLIENTOUT/ben43-contact.bin --destfile $CLIENTOUT/rick42-contact.bin --sendCount 0 --receiveCount 0 -m \"Hello from Ben43, with E2E Encryption\""
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43 --writeContact $CLIENTOUT/ben43-contact.bin --destfile $CLIENTOUT/rick42-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
 eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
 PIDVAL2=$!
 echo "$CLIENTCMD -- $PIDVAL"
-wait $PIDVAL2
-TMPID=$(cat $CLIENTOUT/client42.log | grep "User\:" | awk -F' ' '{print $5}')
+
+while [ ! -s $CLIENTOUT/ben43-contact.bin ]; do
+    sleep 1
+    echo -n "."
+done
+
+
+TMPID=$(cat $CLIENTOUT/client42.log | grep -a "User\:" | awk -F' ' '{print $5}')
 RICKID=${TMPID}
 echo "RICK ID: $RICKID"
-TMPID=$(cat $CLIENTOUT/client43.log | grep "User\:" | awk -F' ' '{print $5}')
+TMPID=$(cat $CLIENTOUT/client43.log | grep -a "User\:" | awk -F' ' '{print $5}')
 BENID=${TMPID}
 echo "BEN ID: $BENID"
 
-# Client 42 will now wait for client 43's E2E Auth channel request and not do
-# anything else.
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --destid b64:$RICKID --sendCount 0 --receiveCount 0 --unsafe"
+# Client 42 will now wait for client 43's E2E Auth channel request and confirm
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --destfile $CLIENTOUT/ben43-contact.bin --sendCount 0 --receiveCount 0"
 eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
 PIDVAL=$!
 echo "$CLIENTCMD -- $PIDVAL"
 wait $PIDVAL
-
-# Client 43 will now wait for the confirmation.
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43 --destid b64:$BENID --sendCount 0 --receiveCount 0 --unsafe"
-eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
-PIDVAL=$!
-echo "$CLIENTCMD -- $PIDVAL"
-wait $PIDVAL
-
+wait $PIDVAL2
 
 # Test destid syntax too, note wait for 11 messages to catch the message from above ^^^
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --assume-auth-channel --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick42, with E2E Encryption\""
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42  --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick42, with E2E Encryption\""
 eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
 PIDVAL=$!
 echo "$CLIENTCMD -- $PIDVAL"
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43  --assume-auth-channel --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben43, with E2E Encryption\""
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43  --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben43, with E2E Encryption\""
 eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
 PIDVAL2=$!
 echo "$CLIENTCMD -- $PIDVAL"
 wait $PIDVAL
 wait $PIDVAL2
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42  --assume-auth-channel --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick42, with E2E Encryption\""
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42  --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick42, with E2E Encryption\""
 eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
 PIDVAL=$!
 echo "$CLIENTCMD -- $PIDVAL"
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43  --assume-auth-channel --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben43, with E2E Encryption\""
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client43.log -s blob43  --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben43, with E2E Encryption\""
 eval $CLIENTCMD >> $CLIENTOUT/client43.txt || true &
 PIDVAL2=$!
 echo "$CLIENTCMD -- $PIDVAL"
 wait $PIDVAL
 wait $PIDVAL2
 
-echo "CREATING USERS for REKEY TEST..."
-REKEYOPTS="--e2eMaxKeys 15 --e2eMinKeys 10 --e2eNumReKeys 5"
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client100.log -s blob100 --writeContact $CLIENTOUT/Jake100-contact.bin --unsafe -m \"Hello from Jake100 to myself, without E2E Encryption\""
-eval $CLIENTCMD >> $CLIENTOUT/client100.txt || true &
-PIDVAL=$!
-echo "$CLIENTCMD -- $PIDVAL"
-wait $PIDVAL
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client101.log -s blob101 --writeContact $CLIENTOUT/Niamh101-contact.bin --destfile $CLIENTOUT/Jake100-contact.bin --sendCount 0 --receiveCount 0 -m \"Hello from Niamh101, with E2E Encryption\""
-eval $CLIENTCMD >> $CLIENTOUT/client101.txt || true &
-PIDVAL2=$!
-echo "$CLIENTCMD -- $PIDVAL"
-wait $PIDVAL2
-TMPID=$(cat $CLIENTOUT/client100.log | grep "User\:" | awk -F' ' '{print $5}')
-JAKEID=${TMPID}
-echo "JAKE ID: $JAKEID"
-TMPID=$(cat $CLIENTOUT/client101.log | grep "User\:" | awk -F' ' '{print $5}')
-NIAMHID=${TMPID}
-echo "NIAMH ID: $NIAMHID"
-
-echo "RUNNING REKEY TEST..."
-# Test destid syntax too, note wait for 11 messages to catch the message from above ^^^
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client100.log -s blob100 --destid b64:$NIAMHID --sendCount 20 --receiveCount 20 -m \"Hello from Jake100, with E2E Encryption\""
-eval $CLIENTCMD >> $CLIENTOUT/client100.txt || true &
-PIDVAL=$!
+echo "DELETING CONTACT FROM CLIENT..."
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42 --delete-channel --destfile $CLIENTOUT/ben43-contact.bin --sendCount 0 --receiveCount 0"
+eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
 echo "$CLIENTCMD -- $PIDVAL"
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client101.log -s blob101 --destid b64:$JAKEID --sendCount 20 --receiveCount 20 -m \"Hello from Niamh101, with E2E Encryption\""
-eval $CLIENTCMD >> $CLIENTOUT/client101.txt || true &
+PIDVAL1=$!
+wait $PIDVAL1
+# NOTE the command below causes the following EXPECTED error:
+# panic: Could not confirm authentication channel for HTAmEeBhbLi6aFqcWsi3OZNDE/642GAchpATjhYFTHwD, waited 120 seconds.
+# Note that the above is example, client IDs will vary
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client42.log -s blob42  --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick42, with E2E Encryption\""
+eval $CLIENTCMD >> $CLIENTOUT/client42.txt || true &
 PIDVAL2=$!
 echo "$CLIENTCMD -- $PIDVAL"
-wait $PIDVAL
 wait $PIDVAL2
 
-# Now we are just going to exhaust all the keys we have and see if we
-# use the unconfirmed channels
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client100.log -s blob100 --destid b64:$NIAMHID --sendCount 20 --receiveCount 0 -m \"Hello from Jake100, with E2E Encryption\""
-eval $CLIENTCMD >> $CLIENTOUT/client100.txt || true &
-PIDVAL=$!
-echo "$CLIENTCMD -- $PIDVAL"
-wait $PIDVAL
-# And receive those messages sent to us
-CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client101.log -s blob101 --destid b64:$JAKEID --sendCount 0 --receiveCount 20"
-eval $CLIENTCMD >> $CLIENTOUT/client101.txt || true &
-PIDVAL2=$!
-echo "$CLIENTCMD -- $PIDVAL"
-wait $PIDVAL2
+# echo "CREATING USERS for REKEY TEST..."
+# JAKEID=$(../bin/client init -s blob100 -l $CLIENTOUT/client100.log --password hello --ndf results/ndf.json --writeContact $CLIENTOUT/Jake100-contact.bin -v $DEBUGLEVEL)
+# NIAMHID=$(../bin/client init -s blob101 -l $CLIENTOUT/client101.log --password hello --ndf results/ndf.json --writeContact $CLIENTOUT/Niamh101-contact.bin -v $DEBUGLEVEL)
+# echo "JAKE ID: $JAKEID"
+# echo "NIAMH ID: $NIAMHID"
+
+
+# REKEYOPTS="--e2eMaxKeys 15 --e2eMinKeys 10 --e2eNumReKeys 5"
+# # Client 101 will now send auth request
+# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client101.log -s blob101 --writeContact $CLIENTOUT/Niamh101-contact.bin --destfile $CLIENTOUT/Jake100-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
+# eval $CLIENTCMD >> $CLIENTOUT/client101.txt || true &
+# PIDVAL2=$!
+# echo "$CLIENTCMD -- $PIDVAL"
+# # Client 100 will now wait for client 101's E2E Auth channel request and confirm
+# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client100.log -s blob100 --destid b64:$NIAMHID --sendCount 0 --receiveCount 0"
+# eval $CLIENTCMD >> $CLIENTOUT/client100.txt || true &
+# PIDVAL=$!
+# echo "$CLIENTCMD -- $PIDVAL"
+# wait $PIDVAL
+# wait $PIDVAL2
+
+# echo "RUNNING REKEY TEST..."
+# # Test destid syntax too, note wait for 11 messages to catch the message from above ^^^
+# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client100.log -s blob100 --destid b64:$NIAMHID --sendCount 20 --receiveCount 20 -m \"Hello from Jake100, with E2E Encryption\""
+# eval $CLIENTCMD >> $CLIENTOUT/client100.txt || true &
+# PIDVAL=$!
+# echo "$CLIENTCMD -- $PIDVAL"
+# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client101.log -s blob101 --destid b64:$JAKEID --sendCount 20 --receiveCount 20 -m \"Hello from Niamh101, with E2E Encryption\""
+# eval $CLIENTCMD >> $CLIENTOUT/client101.txt || true &
+# PIDVAL2=$!
+# echo "$CLIENTCMD -- $PIDVAL"
+# wait $PIDVAL
+# wait $PIDVAL2
+
+# # Now we are just going to exhaust all the keys we have and see if we
+# # use the unconfirmed channels
+# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client100.log -s blob100 --destid b64:$NIAMHID --sendCount 20 --receiveCount 0 -m \"Hello from Jake100, with E2E Encryption\""
+# eval $CLIENTCMD >> $CLIENTOUT/client100.txt || true &
+# PIDVAL=$!
+# echo "$CLIENTCMD -- $PIDVAL"
+# wait $PIDVAL
+# # And receive those messages sent to us
+# CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS $REKEYOPTS -l $CLIENTOUT/client101.log -s blob101 --destid b64:$JAKEID --sendCount 0 --receiveCount 20"
+# eval $CLIENTCMD >> $CLIENTOUT/client101.txt || true &
+# PIDVAL2=$!
+# echo "$CLIENTCMD -- $PIDVAL"
+# wait $PIDVAL2
 
 
 echo "FORCING HISTORICAL ROUNDS..."
@@ -380,6 +453,19 @@ echo "$CLIENTCMD -- $PIDVAL"
 wait $PIDVAL
 wait $PIDVAL2
 
+echo "FORCING MESSAGE PICKUP RETRY... "
+# Higher timeouts for this test to allow message pickup retry to function
+CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS --forceMessagePickupRetry -l $CLIENTOUT/client20.log -s blob20 --sendid 20 --destid 21 --sendCount 5 --receiveCount 5 -m \"Hello from 20, without E2E Encryption\""
+eval $CLIENTCMD >> $CLIENTOUT/client20.txt || true &
+PIDVAL=$!
+echo "$CLIENTCMD -- $PIDVAL"
+CLIENTCMD="timeout 360s ../bin/client $CLIENTOPTS --forceMessagePickupRetry -l $CLIENTOUT/client21.log -s blob21 --sendid 21 --destid 20 --sendCount 5 --receiveCount 5 -m \"Hello from 21, without E2E Encryption\""
+eval $CLIENTCMD >> $CLIENTOUT/client21.txt || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL"
+wait $PIDVAL
+wait $PIDVAL2
+
 
 # Single-use test: client53 sends message to client52; client52 responds with
 # the same message in the set number of message parts
@@ -407,7 +493,7 @@ wait $PIDVAL1
 wait $PIDVAL2
 
 
-if [ "$PERMISSIONING" == "" ]
+if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
 then
     # UD Test
     echo "TESTING USER DISCOVERY..."
@@ -434,39 +520,240 @@ then
     wait $PIDVAL2
 
     # Send auth chan request
-    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client13.log -s blob13 --destfile $CLIENTOUT/josh31.bin --sendCount 0 --receiveCount 0"
+    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client13.log -s blob13 --destfile $CLIENTOUT/josh31.bin --send-auth-request --sendCount 0 --receiveCount 0"
     eval $CLIENTCMD >> $CLIENTOUT/client13.txt || true &
     PIDVAL2=$!
     echo "$CLIENTCMD -- $PIDVAL2"
-    wait $PIDVAL2
 
-    # Approve request
-    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client31.log -s blob31 --destfile $CLIENTOUT/josh31.bin --sendCount 0 --receiveCount 0 --unsafe"
+    # Approve request and confirm
+    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client31.log -s blob31 --destfile $CLIENTOUT/josh13.bin --sendCount 0 --receiveCount 0"
     eval $CLIENTCMD >> $CLIENTOUT/client31.txt || true &
-    PIDVAL2=$!
-    echo "$CLIENTCMD -- $PIDVAL2"
-    wait $PIDVAL2
-
-    # Register confirmation
-    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client13.log -s blob13 --destfile $CLIENTOUT/josh13.bin --sendCount 0 --receiveCount 0 --unsafe"
-    eval $CLIENTCMD >> $CLIENTOUT/client13.txt || true &
-    PIDVAL2=$!
+    PIDVAL1=$!
     echo "$CLIENTCMD -- $PIDVAL2"
+    wait $PIDVAL1
     wait $PIDVAL2
 
     # now test
-    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client31.log -s blob31 --assume-auth-channel --destfile $CLIENTOUT/josh13.bin --sendCount 5 --receiveCount 5 -m \"Hello from Josh31, with E2E Encryption\""
+    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client31.log -s blob31 --destfile $CLIENTOUT/josh13.bin --sendCount 5 --receiveCount 5 -m \"Hello from Josh31, with E2E Encryption\""
     eval $CLIENTCMD >> $CLIENTOUT/client31.txt || true &
     PIDVAL=$!
     echo "$CLIENTCMD -- $PIDVAL"
-    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client13.log -s blob13 --assume-auth-channel --destfile $CLIENTOUT/josh31.bin --sendCount 5 --receiveCount 5 -m \"Hello from Josh13, with E2E Encryption\""
+    CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client13.log -s blob13 --destfile $CLIENTOUT/josh31.bin --sendCount 5 --receiveCount 5 -m \"Hello from Josh13, with E2E Encryption\""
     eval $CLIENTCMD >> $CLIENTOUT/client13.txt || true &
     PIDVAL2=$!
     echo "$CLIENTCMD -- $PIDVAL"
     wait $PIDVAL
     wait $PIDVAL2
+
+    # Test Remove User
+    CLIENTCMD="timeout 240s ../bin/client ud $CLIENTUDOPTS -l $CLIENTOUT/client13.log -s blob13 --remove josh13"
+    eval $CLIENTCMD >> $CLIENTOUT/client13.txt || true &
+    PIDVAL=$!
+    echo "$CLIENTCMD -- $PIDVAL"
+    wait $PIDVAL
+    CLIENTCMD="timeout 240s ../bin/client ud $CLIENTUDOPTS -l $CLIENTOUT/client13-2.log -s blob13-2 --register josh13"
+    eval $CLIENTCMD >> $CLIENTOUT/client13-2.txt || true &
+    PIDVAL=$!
+    echo "$CLIENTCMD -- $PIDVAL"
+    wait $PIDVAL
 fi
 
+
+
+echo "TESTING GROUP CHAT..."
+# Create authenticated channel between client 80 and 81
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client80.log -s blob80 --writeContact $CLIENTOUT/client80-contact.bin --unsafe -m \"Hello from contact 80 to myself, without E2E Encryption\""
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+wait $PIDVAL1
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client81.log -s blob81 --writeContact $CLIENTOUT/client81-contact.bin --destfile $CLIENTOUT/client80-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
+eval $CLIENTCMD >> $CLIENTOUT/client81.txt || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+
+while [ ! -s $CLIENTOUT/client81-contact.bin ]; do
+    sleep 1
+    echo -n "."
+done
+echo
+
+TMPID=$(cat $CLIENTOUT/client80.log | grep -a "User\:" | awk -F' ' '{print $5}')
+CLIENT80ID=${TMPID}
+echo "CLIENT 80 ID: $CLIENT80ID"
+TMPID=$(cat $CLIENTOUT/client81.log | grep -a "User\:" | awk -F' ' '{print $5}')
+CLIENT81ID=${TMPID}
+echo "CLIENT 81 ID: $CLIENT81ID"
+
+# Client 81 will now wait for client 81's E2E Auth channel request and confirm
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client80.log -s blob80 --destfile $CLIENTOUT/client81-contact.bin --sendCount 0 --receiveCount 0"
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+wait $PIDVAL1
+wait $PIDVAL2
+
+
+# Create authenticated channel between client 80 and 82
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client82.log -s blob82 --writeContact $CLIENTOUT/client82-contact.bin --destfile $CLIENTOUT/client80-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
+eval $CLIENTCMD >> $CLIENTOUT/client82.txt || true &
+PIDVAL3=$!
+echo "$CLIENTCMD -- $PIDVAL3"
+
+while [ ! -s $CLIENTOUT/client82-contact.bin ]; do
+    sleep 1
+    echo -n "."
+done
+echo
+
+TMPID=$(cat $CLIENTOUT/client82.log | grep -a "User\:" | awk -F' ' '{print $5}')
+CLIENT82ID=${TMPID}
+echo "CLIENT 82 ID: $CLIENT82ID"
+
+# Client 82 will now wait for client 82's E2E Auth channel request and confirm
+CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client80.log -s blob80 --destfile $CLIENTOUT/client82-contact.bin --sendCount 0 --receiveCount 0"
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+wait $PIDVAL1
+wait $PIDVAL3
+
+# User 1 Creates Group
+echo "Group User IDs: $CLIENT80ID $CLIENT81ID $CLIENT82ID"
+echo "b64:$CLIENT81ID" > $CLIENTOUT/groupParticipants
+echo "b64:$CLIENT82ID" >> $CLIENTOUT/groupParticipants
+CLIENTCMD="timeout 60s ../bin/client group -s blob80 -l $CLIENTOUT/client80.log $CLIENTGROUPOPTS --create $CLIENTOUT/groupParticipants --message \"80 inviting 81 and 82 to new group\""
+eval $CLIENTCMD > $CLIENTOUT/client80.txt 2>&1 || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+CLIENTCMD="../bin/client group -s blob81 -l $CLIENTOUT/client81.log $CLIENTGROUPOPTS --join"
+eval $CLIENTCMD > $CLIENTOUT/client81.txt 2>&1 || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+CLIENTCMD="../bin/client group -s blob82 -l $CLIENTOUT/client82.log $CLIENTGROUPOPTS --join"
+eval $CLIENTCMD > $CLIENTOUT/client82.txt 2>&1 || true &
+PIDVAL3=$!
+echo "$CLIENTCMD -- $PIDVAL3"
+wait $PIDVAL1
+wait $PIDVAL2
+wait $PIDVAL3
+
+# Extract group ID -- Note to Jono this probably needs to be fixed!
+GROUPID=$(cat $CLIENTOUT/client80.log | grep -a "NewGroupID\:" | awk -F' ' '{print $5}')
+echo "Group ID: $GROUPID"
+
+# Print the group list from all users
+CLIENTCMD="../bin/client group -s blob80 -l $CLIENTOUT/client80.log $CLIENTGROUPOPTS --list"
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt 2>&1 || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+CLIENTCMD="../bin/client group -s blob81 -l $CLIENTOUT/client81.log $CLIENTGROUPOPTS --list"
+eval $CLIENTCMD >> $CLIENTOUT/client81.txt 2>&1 || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+CLIENTCMD="../bin/client group -s blob82 -l $CLIENTOUT/client82.log $CLIENTGROUPOPTS --list"
+eval $CLIENTCMD >> $CLIENTOUT/client82.txt 2>&1 || true &
+PIDVAL3=$!
+echo "$CLIENTCMD -- $PIDVAL3"
+wait $PIDVAL1
+wait $PIDVAL2
+wait $PIDVAL3
+
+# Print group from all users
+CLIENTCMD="../bin/client group -s blob80 -l $CLIENTOUT/client80.log $CLIENTGROUPOPTS --show $GROUPID"
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt 2>&1 || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+CLIENTCMD="../bin/client group -s blob81 -l $CLIENTOUT/client81.log $CLIENTGROUPOPTS --show $GROUPID"
+eval $CLIENTCMD >> $CLIENTOUT/client81.txt 2>&1 || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+CLIENTCMD="../bin/client group -s blob82 -l $CLIENTOUT/client82.log $CLIENTGROUPOPTS --show $GROUPID"
+eval $CLIENTCMD >> $CLIENTOUT/client82.txt 2>&1 || true &
+PIDVAL3=$!
+echo "$CLIENTCMD -- $PIDVAL3"
+wait $PIDVAL1
+wait $PIDVAL2
+wait $PIDVAL3
+
+# Now everyone sends their message
+CLIENTCMD="../bin/client group -s blob80 -l $CLIENTOUT/client80.log $CLIENTGROUPOPTS --sendMessage $GROUPID --message \"Hello from 80\""
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt 2>&1 || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+CLIENTCMD="../bin/client group -s blob81 -l $CLIENTOUT/client81.log $CLIENTGROUPOPTS --sendMessage $GROUPID --message \"Hello from 81\""
+eval $CLIENTCMD >> $CLIENTOUT/client81.txt 2>&1 || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+CLIENTCMD="../bin/client group -s blob82 -l $CLIENTOUT/client82.log $CLIENTGROUPOPTS --sendMessage $GROUPID --message \"Hello from 82\""
+eval $CLIENTCMD >> $CLIENTOUT/client82.txt 2>&1 || true &
+PIDVAL3=$!
+echo "$CLIENTCMD -- $PIDVAL3"
+wait $PIDVAL1
+wait $PIDVAL2
+wait $PIDVAL3
+
+# Everyone waits for their message
+CLIENTCMD="../bin/client group -s blob80 -l $CLIENTOUT/client80.log $CLIENTGROUPOPTS --wait 2"
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt 2>&1 || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+CLIENTCMD="../bin/client group -s blob81 -l $CLIENTOUT/client81.log $CLIENTGROUPOPTS --wait 2"
+eval $CLIENTCMD >> $CLIENTOUT/client81.txt 2>&1 || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+CLIENTCMD="../bin/client group -s blob82 -l $CLIENTOUT/client82.log $CLIENTGROUPOPTS --wait 2"
+eval $CLIENTCMD >> $CLIENTOUT/client82.txt 2>&1 || true &
+PIDVAL3=$!
+echo "$CLIENTCMD -- $PIDVAL3"
+wait $PIDVAL1
+wait $PIDVAL2
+wait $PIDVAL3
+
+# Member 2 leaves the group
+CLIENTCMD="../bin/client group -s blob81 -l $CLIENTOUT/client81.log $CLIENTGROUPOPTS --leave $GROUPID"
+eval $CLIENTCMD >> $CLIENTOUT/client81.txt 2>&1 || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+wait $PIDVAL2
+
+# 1 and 3 send a message successfully now, 2 does not
+CLIENTCMD="../bin/client group -s blob80 -l $CLIENTOUT/client80.log $CLIENTGROUPOPTS --sendMessage $GROUPID --message \"Hello 2 from 80\""
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt 2>&1 || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+CLIENTCMD="../bin/client group -s blob82 -l $CLIENTOUT/client82.log $CLIENTGROUPOPTS --sendMessage $GROUPID --message \"Hello 2 from 82\""
+eval $CLIENTCMD >> $CLIENTOUT/client82.txt 2>&1 || true &
+PIDVAL3=$!
+echo "$CLIENTCMD -- $PIDVAL3"
+wait $PIDVAL1
+wait $PIDVAL2
+wait $PIDVAL3
+
+# All 3 wait again
+CLIENTCMD="../bin/client group -s blob80 -l $CLIENTOUT/client80.log $CLIENTGROUPOPTS --wait 1"
+eval $CLIENTCMD >> $CLIENTOUT/client80.txt 2>&1 || true &
+PIDVAL1=$!
+echo "$CLIENTCMD -- $PIDVAL1"
+CLIENTCMD="../bin/client group -s blob81 -l $CLIENTOUT/client81.log $CLIENTGROUPOPTS --wait 1"
+eval $CLIENTCMD >> $CLIENTOUT/client81.txt 2>&1 || true &
+PIDVAL2=$!
+echo "$CLIENTCMD -- $PIDVAL2"
+CLIENTCMD="../bin/client group -s blob82 -l $CLIENTOUT/client82.log $CLIENTGROUPOPTS --wait 1"
+eval $CLIENTCMD >> $CLIENTOUT/client82.txt 2>&1 || true &
+PIDVAL3=$!
+echo "$CLIENTCMD -- $PIDVAL3"
+wait $PIDVAL1
+wait $PIDVAL2
+wait $PIDVAL3
+
+sort -b -o "$CLIENTOUT/client80.txt" "$CLIENTOUT/client80.txt"
+sort -b -o "$CLIENTOUT/client81.txt" "$CLIENTOUT/client81.txt"
+sort -b -o "$CLIENTOUT/client82.txt" "$CLIENTOUT/client82.txt"
+
+echo "GROUP CHAT FINISHED!"
+
+
 cp $CLIENTOUT/*.txt $CLIENTCLEAN/
 
 sed -i.bak 's/Sending\ to\ .*\:/Sent:/g' $CLIENTCLEAN/client*.txt
@@ -486,11 +773,20 @@ set -e
 echo "TESTS EXITED SUCCESSFULLY, CHECKING OUTPUT..."
 set +x
 diff -aruN clients.goldoutput $CLIENTCLEAN
+cat $CLIENTOUT/client42.log | grep -a "Could not confirm authentication channel" > results/deleteContact.txt || true
+echo "CHECKING FOR SUCCESSFUL CONTACT DELETION"
+if [ -s results/deleteContact.txt ]
+then
+    echo "CONTACT DELETION SUCCESSFUL"
+else
+    echo "CONTACT DELETION FAILED"
+    [ -s results/deleteContact.txt ]
+fi
 
-if [ "$PERMISSIONING" == "" ]
+if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
 then
 
-    #cat $CLIENTOUT/* | strings | grep -e "ERROR" -e "FATAL" > results/client-errors || true
+    #cat $CLIENTOUT/* | strings | grep -ae "ERROR" -e "FATAL" > results/client-errors || true
     #diff -ruN results/client-errors.txt noerrors.txt
     cat $SERVERLOGS/server-*.log | grep -a "ERROR" | grep -a -v "context" | grep -av "metrics" | grep -av "database" > results/server-errors.txt || true
     cat $SERVERLOGS/server-*.log | grep -a "FATAL" | grep -a -v "context" | grep -av "transport is closing" | grep -av "database" >> results/server-errors.txt || true
diff --git a/basice2e/server-1.yaml b/basice2e/server-1.yaml
index d920328d47c7f77819dc1010d0cf233e06b925cc..fc8b704b210b9dfa19e88ac61bacaa61e1148e3d 100644
--- a/basice2e/server-1.yaml
+++ b/basice2e/server-1.yaml
@@ -8,8 +8,9 @@
 registrationCode: "qpol"
 useGPU: false
 devMode: true
+rawPermAddr: true
 logLevel: 1
-node:
+cmix:
     paths:
         idf:  "results/servers/nodeID-1.json"
         cert: "../keys/cmix.rip.crt"
@@ -27,7 +28,7 @@ database:
 gateway:
     paths:
         cert: "../keys/cmix.rip.crt"
-permissioning:
+scheduling:
   paths:
     cert: "../keys/cmix.rip.crt"
   address: "127.0.0.1:18000"
diff --git a/basice2e/server-2.yaml b/basice2e/server-2.yaml
index 9a7c110ec59861290e1b76dee05dfb8324b3f2ba..37765bc314816bd9928ff96803653145aeea2671 100644
--- a/basice2e/server-2.yaml
+++ b/basice2e/server-2.yaml
@@ -8,8 +8,9 @@
 registrationCode: "yiiq"
 useGPU: false
 devMode: true
+rawPermAddr: true
 logLevel: 1
-node:
+cmix:
     paths:
         idf:  "results/servers/nodeID-2.json"
         cert: "../keys/cmix.rip.crt"
@@ -27,7 +28,7 @@ database:
 gateway:
     paths:
         cert: "../keys/cmix.rip.crt"
-permissioning:
+scheduling:
   paths:
     cert: "../keys/cmix.rip.crt"
   address: "127.0.0.1:18000"
diff --git a/basice2e/server-3.yaml b/basice2e/server-3.yaml
index 0935874fb496a4fd277685d1264cd476ac9641e1..f17b4255f1b9519ee5c3e4e787264a4cb1f3a645 100644
--- a/basice2e/server-3.yaml
+++ b/basice2e/server-3.yaml
@@ -8,8 +8,9 @@
 registrationCode: "vydz"
 useGPU: false
 devMode: true
+rawPermAddr: true
 logLevel: 1
-node:
+cmix:
     paths:
         idf:  "results/servers/nodeID-3.json"
         cert: "../keys/cmix.rip.crt"
@@ -27,7 +28,7 @@ database:
 gateway:
     paths:
         cert: "../keys/cmix.rip.crt"
-permissioning:
+scheduling:
   paths:
     cert: "../keys/cmix.rip.crt"
   address: "127.0.0.1:18000"
diff --git a/basice2e/server-4.yaml b/basice2e/server-4.yaml
index 7f32caee24e7b3f395d3bb7584c9c520bffc98d4..b13f6fd5a329fb44e4748a76f4aed4407482523a 100644
--- a/basice2e/server-4.yaml
+++ b/basice2e/server-4.yaml
@@ -8,8 +8,9 @@
 registrationCode: "gwxs"
 useGPU: false
 devMode: true
+rawPermAddr: true
 logLevel: 1
-node:
+cmix:
     paths:
         idf:  "results/servers/nodeID-4.json"
         cert: "../keys/cmix.rip.crt"
@@ -27,7 +28,7 @@ database:
 gateway:
     paths:
         cert: "../keys/cmix.rip.crt"
-permissioning:
+scheduling:
   paths:
     cert: "../keys/cmix.rip.crt"
   address: "127.0.0.1:18000"
diff --git a/basice2e/server-5.yaml b/basice2e/server-5.yaml
index 494f901af46689de0a807f560eb459ea8516c737..d820326869ac148f9823eb929ed686719970c4c8 100644
--- a/basice2e/server-5.yaml
+++ b/basice2e/server-5.yaml
@@ -8,8 +8,9 @@
 registrationCode: "nahv"
 useGPU: false
 devMode: true
+rawPermAddr: true
 logLevel: 1
-node:
+cmix:
     paths:
         idf:  "results/servers/nodeID-5.json"
         cert: "../keys/cmix.rip.crt"
@@ -27,7 +28,7 @@ database:
 gateway:
     paths:
         cert: "../keys/cmix.rip.crt"
-permissioning:
+scheduling:
   paths:
     cert: "../keys/cmix.rip.crt"
   address: "127.0.0.1:18000"
diff --git a/download_cmix_binaries.sh b/download_cmix_binaries.sh
index 40bf2e10829678fb171f924c4980c6a103796828..d38cf4e509a72844c8babcc22947abc91b891ae2 100755
--- a/download_cmix_binaries.sh
+++ b/download_cmix_binaries.sh
@@ -49,7 +49,7 @@ fi
 # Set up the URL for downloading the binaries
 DEFAULTBRANCH=${DEFAULTBRANCH:="release"}
 if [[ $USEREPO == "d" ]]; then
-    REPOS_API=${REPOS_API:="https://gitlab.com/api/v4/projects/elixxir%2F"}
+    REPOS_API=${REPOS_API:="https://git.xx.network/api/v4/projects/elixxir%2F"}
 else
     REPOS_API=${REPOS_API:="https://elixxir-bins.s3-us-west-1.amazonaws.com"}
 fi
@@ -84,12 +84,15 @@ for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do
         CLIENT_URL=${CLIENT_URL:="${REPOS_API}client/$BRANCH_URL/client$BIN"}
         SERVER_GPU_URL=${SERVER_GPU_URL:="${REPOS_API}server/$BRANCH_URL/server-cuda.linux64?job=build"}
         GPULIB_URL=${GPULIB_URL:="${REPOS_API}server/$BRANCH_URL/libpowmosm75.so?job=build"}
+        GPULIB2_URL=${GPULIB2_URL:="${REPOS_API}server/$BRANCH_URL/libpow.fatbin?job=build"}
+        CLIENT_REG_URL=${CLIENT_REG_URL:="${REPOS_API}client-registrar/$BRANCH_URL/registration$BIN"}
     else
         UDB_URL=${UDB_URL:="${REPOS_API}/$BRANCH/udb$BIN"}
         SERVER_URL=${SERVER_URL:="${REPOS_API}/$BRANCH/server$BIN"}
         GW_URL=${GW_URL:="${REPOS_API}/$BRANCH/gateway$BIN"}
         PERMISSIONING_URL=${PERMISSIONING_URL:="${REPOS_API}/$BRANCH/registration.stateless$BIN"}
         CLIENT_URL=${CLIENT_URL:="${REPOS_API}/$BRANCH/client$BIN"}
+        CLIENT_REG_URL=${CLIENT_REG_URL:="${REPOS_API}client-registrar/$BRANCH_URL/registration$BIN"}
     fi
 
     set -x
@@ -119,6 +122,11 @@ for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do
         curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/client" ${CLIENT_URL}
     fi
 
+        # Silently download the client registrar binary to the provisioning directory
+    if [ ! -f $download_path/client-registrar ] && [[ "$CLIENT_REG_URL" != *"forcedbranch"* ]]; then
+        curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/client-registrar" ${CLIENT_REG_URL}
+    fi
+
 if [[ $2 == "d" ]]; then
     # Silently download the Server binary to the provisioning directory
     if [ ! -f $download_path/server-cuda ] && [[ "$SERVER_GPU_URL" != *"forcedbranch"* ]]; then
@@ -129,6 +137,15 @@ if [[ $2 == "d" ]]; then
     if [ ! -f $download_path/libpowmosm75.so ] && [[ "$GPULIB_URL" != *"forcedbranch"* ]]; then
         curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/libpowmosm75.so" ${GPULIB_URL}
     fi
+    # Silently download the GPU Library to the provisioning directory
+    if [ ! -f $download_path/libpow.fatbin ] && [[ "$GPULIB2_URL" != *"forcedbranch"* ]]; then
+        curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/libpow.fatbin" ${GPULIB2_URL}
+    fi
+
+        # Silently download the client registrar binary to the provisioning directory
+    if [ ! -f $download_path/client-registrar ] && [[ "$CLIENT_REG_URL" != *"forcedbranch"* ]]; then
+        curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/client-registrar" ${CLIENT_REG_URL}
+    fi
 fi
 
     set +x
@@ -142,6 +159,8 @@ fi
     unset CLIENT_URL
     unset SERVER_GPU_URL
     unset GPULIB_URL
+    unset GPULIB2_URL
+    unset CLIENT_REG_URL
 done
 
 # Make binaries executable
diff --git a/smokeinfra/gateway-1.yaml b/smokeinfra/gateway-1.yaml
index 259c700cb03eed032a73887743ffb33f3355c56e..a305d5a2c3531830889df454ee51952897cef30d 100644
--- a/smokeinfra/gateway-1.yaml
+++ b/smokeinfra/gateway-1.yaml
@@ -12,7 +12,7 @@ log: "results/gatway-1.log"
 logLevel: 2
 
 # The public IP address and port of the node associated with this gateway
-nodeAddress: "127.0.0.1:60000"
+cmixAddress: "127.0.0.1:60000"
 
 # The public IPv4 address of the Gateway, as reported to the network, to use
 # instead of dynamically looking up Gateway's own IP address. If a port is not
@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
 # Path to the certificate file
 certPath: "../keys/cmix.rip.crt"
 # Path to the permissioning certificate
-permissioningCertPath: "../keys/cmix.rip.crt"
+schedulingCertPath: "../keys/cmix.rip.crt"
 # Path to the certificate file
-serverCertPath: "../keys/cmix.rip.crt"
+cmixCertPath: "../keys/cmix.rip.crt"
 
 knownRoundsPath: "results/gateways/knownrounds-1.json"
 lastUpdateIdPath: "results/gateways/lastupdateid-1.txt"
diff --git a/smokeinfra/gateway-2.yaml b/smokeinfra/gateway-2.yaml
index 872f473865fe28c6127076a94ed6abba9b65e5b7..55d7de5a5b8494d2530cdebac790fec0a4a2da58 100644
--- a/smokeinfra/gateway-2.yaml
+++ b/smokeinfra/gateway-2.yaml
@@ -12,7 +12,7 @@ log: "results/gatway-2.log"
 logLevel: 2
 
 # The public IP address and port of the node associated with this gateway
-nodeAddress: "127.0.0.1:60001"
+cmixAddress: "127.0.0.1:60001"
 
 # The public IPv4 address of the Gateway, as reported to the network, to use
 # instead of dynamically looking up Gateway's own IP address. If a port is not
@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
 # Path to the certificate file
 certPath: "../keys/cmix.rip.crt"
 # Path to the permissioning certificate
-permissioningCertPath: "../keys/cmix.rip.crt"
+schedulingCertPath: "../keys/cmix.rip.crt"
 # Path to the certificate file
-serverCertPath: "../keys/cmix.rip.crt"
+cmixCertPath: "../keys/cmix.rip.crt"
 
 knownRoundsPath: "results/gateways/knownrounds-2.json"
 lastUpdateIdPath: "results/gateways/lastupdateid-2.txt"
diff --git a/smokeinfra/gateway-3.yaml b/smokeinfra/gateway-3.yaml
index 0b014d75d8596466384e1f35bf8fcb92b726243e..2fb8822016acf788f7441594224c69a348eaf75b 100644
--- a/smokeinfra/gateway-3.yaml
+++ b/smokeinfra/gateway-3.yaml
@@ -12,7 +12,7 @@ log: "results/gatway-3.log"
 logLevel: 2
 
 # The public IP address and port of the node associated with this gateway
-nodeAddress: "127.0.0.1:60002"
+cmixAddress: "127.0.0.1:60002"
 
 # The public IPv4 address of the Gateway, as reported to the network, to use
 # instead of dynamically looking up Gateway's own IP address. If a port is not
@@ -36,9 +36,9 @@ keyPath: "../keys/cmix.rip.key"
 # Path to the certificate file
 certPath: "../keys/cmix.rip.crt"
 # Path to the permissioning certificate
-permissioningCertPath: "../keys/cmix.rip.crt"
+schedulingCertPath: "../keys/cmix.rip.crt"
 # Path to the certificate file
-serverCertPath: "../keys/cmix.rip.crt"
+cmixCertPath: "../keys/cmix.rip.crt"
 
 knownRoundsPath: "results/gateways/knownrounds-3.json"
 lastUpdateIdPath: "results/gateways/lastupdateid-3.txt"
diff --git a/smokeinfra/permissioning.yaml b/smokeinfra/permissioning.yaml
index d12fac199a9b9264203b0b8d3f96f6ebaea68249..5b8b9c035df603ff9a11b56e695c101e88c410a8 100644
--- a/smokeinfra/permissioning.yaml
+++ b/smokeinfra/permissioning.yaml
@@ -21,16 +21,22 @@ dbAddress: "0.0.0.0:6969"
 
 minimumNodes: 3
 
-minGatewayVersion: "2.0.0"
-minServerVersion:  "2.0.0"
+minGatewayVersion: "3.0.0"
+minServerVersion:  "3.0.0"
 minClientVersion: "2.0.0"
 nodeMetricInterval: 3
 
-disableGatewayPing: true
+
+# For testing, use the sequence as the country code. Do not use the geobinning database
+disableGeoBinning: true
+
+# For testing, do not exclude node or gateway IPs which are local to the machine
+allowLocalIPs: true
 
 # Disable pruning of NDF for offline nodes
 # if set to false, network will sleep for five minutes on start
 disableNDFPruning: true
+permissiveIPChecking: true
 
 clientRegCodes:
   - "FFFF"
@@ -90,3 +96,4 @@ schedulingConfigPath: "registration.json"
 # Path to JSON file with list of Node registration codes (in order of network
 # placement)
 RegCodesFilePath: "regCodes.json"
+
diff --git a/smokeinfra/regCodes.json b/smokeinfra/regCodes.json
index f0f63410b57c9ae070c9377175a98d40d89180fb..fea6a9d6e7f50348e01fb324a74de2e200506b35 100644
--- a/smokeinfra/regCodes.json
+++ b/smokeinfra/regCodes.json
@@ -1 +1 @@
-[{"RegCode": "qpol", "Order": "0"},{"RegCode": "yiiq", "Order": "1"},{"RegCode": "vydz", "Order": "2"},{"RegCode": "gwxs", "Order": "3"},{"RegCode": "nahv", "Order": "4"}, {"RegCode": "doko", "Order": "5"}]
+[{"RegCode": "qpol", "Order": "CR"},{"RegCode": "yiiq", "Order": "GB"},{"RegCode": "vydz", "Order": "SK"},{"RegCode": "gwxs", "Order": "HR"},{"RegCode": "nahv", "Order": "IQ"}, {"RegCode": "doko", "Order": "RU"}]
diff --git a/smokeinfra/registration.json b/smokeinfra/registration.json
index d4d1bf5a408b27ba5353f99390b7521d360cf711..4d492b8600aa9f565f1ff46b3dfa433c0337cc64 100644
--- a/smokeinfra/registration.json
+++ b/smokeinfra/registration.json
@@ -1,12 +1,12 @@
 {
   "TeamSize": 3,
   "BatchSize": 32,
-  "RandomOrdering": false,
   "MinimumDelay": 60,
   "RealtimeDelay": 120,
+  "SemiOptimalOrdering": true,
   "Threshold":     3,
   "NodeCleanUpInterval": 3,
-  "ResourceQueueTimeout": 300000,
-  "Secure": 		     false
+  "ResourceQueueTimeout": 300000
+
 
  }
diff --git a/smokeinfra/run.sh b/smokeinfra/run.sh
index 4b51e5af0447c6fff2732464cca196179870b000..552ae366f17933fb2b701e3d5d0385320d434466 100755
--- a/smokeinfra/run.sh
+++ b/smokeinfra/run.sh
@@ -18,7 +18,7 @@ PIDVAL=$!
 echo "$PERMCMD -- $PIDVAL"
 
 echo "STARTING SERVERS..."
-
+PID_SERVER_KILLED=$!
 for SERVERID in $(seq 3 -1 1)
 do
     IDX=$(($SERVERID - 1))
@@ -26,6 +26,9 @@ do
     $SERVERCMD > $SERVERLOGS/server-$SERVERID.console 2>&1 &
     PIDVAL=$!
     echo "$SERVERCMD -- $PIDVAL"
+    if [ $SERVERID -eq 1 ]; then
+      PID_SERVER_KILLED=$PIDVAL
+    fi
     if [ $SERVERID -eq 2 ]; then
         sleep 10 # This will force a CDE timeout
     fi
@@ -82,6 +85,9 @@ diff -ruN results/gateway-errors.txt noerrors.txt
 
 echo "NO OUTPUT ERRORS"
 
+
+
+
 echo "CHECKING THAT AT LEAST 2 ROUNDS RAN"
 cat results/server-3.log | grep "RID 1 ReceiveFinishRealtime END" > rid.txt || true
 if [ ! -s rid.txt ]; then
@@ -89,5 +95,21 @@ if [ ! -s rid.txt ]; then
     exit 42
 fi
 
+# Kill the last server
+echo "KILLING SERVER 0 EARLY"
+kill -15 $PID_SERVER_KILLED
+# Wait for node to handle kill signal
+sleep 30
+
+
+echo "CHECKING THAT SERVER 0 WAS KILLED PROPERLY"
+cat results/server-1.log | grep "Round completed, closing!" > serverClose.txt || true
+if [ -s serverClose.txt  ]; then
+    echo "SERVER 0 CLOSED SUCCESSFULLY"
+else
+    echo "SERVER 0 WAS NOT CLOSED PROPERLY"
+    exit 42
+fi
+
 tail $SERVERLOGS/*.console
 echo "SUCCESS!"
diff --git a/smokeinfra/server-1.yaml b/smokeinfra/server-1.yaml
index d028aed259944f53c4bca941eab1ece30b6e4cf8..b0a58ee280b2b4507cbd94b6fb7ee9be4e7ea0e7 100644
--- a/smokeinfra/server-1.yaml
+++ b/smokeinfra/server-1.yaml
@@ -8,7 +8,8 @@
 registrationCode: "qpol"
 useGPU: false
 devMode: true
-node:
+rawPermAddr: true
+cmix:
     paths:
         idf:  "nodeID-1.json"
         cert: "../keys/cmix.rip.crt"
@@ -26,7 +27,7 @@ database:
 gateway:
     paths:
         cert: "../keys/cmix.rip.crt"
-permissioning:
+scheduling:
   paths:
     cert: "../keys/cmix.rip.crt"
   address: "127.0.0.1:18000"
diff --git a/smokeinfra/server-2.yaml b/smokeinfra/server-2.yaml
index 474cdac09a0338c73d002424b807032e971736f8..1c3da64b463010fc9d5cf07ca1cab2ff581f26ce 100644
--- a/smokeinfra/server-2.yaml
+++ b/smokeinfra/server-2.yaml
@@ -8,7 +8,8 @@
 registrationCode: "yiiq"
 useGPU: false
 devMode: true
-node:
+rawPermAddr: true
+cmix:
     paths:
         idf:  "nodeID-2.json"
         cert: "../keys/cmix.rip.crt"
@@ -26,7 +27,7 @@ database:
 gateway:
     paths:
         cert: "../keys/cmix.rip.crt"
-permissioning:
+scheduling:
   paths:
     cert: "../keys/cmix.rip.crt"
   address: "127.0.0.1:18000"
diff --git a/smokeinfra/server-3.yaml b/smokeinfra/server-3.yaml
index d987ea5abec097eb9c9dc6ab36ebc31aadb8dc21..2bc059c4e2bb20e7dc9dd751d090f100cf3aae76 100644
--- a/smokeinfra/server-3.yaml
+++ b/smokeinfra/server-3.yaml
@@ -8,7 +8,8 @@
 registrationCode: "vydz"
 useGPU: false
 devMode: true
-node:
+rawPermAddr: true
+cmix:
     paths:
         idf:  "nodeID-3.json"
         cert: "../keys/cmix.rip.crt"
@@ -26,7 +27,7 @@ database:
 gateway:
     paths:
         cert: "../keys/cmix.rip.crt"
-permissioning:
+scheduling:
   paths:
     cert: "../keys/cmix.rip.crt"
   address: "127.0.0.1:18000"
diff --git a/smokeinfra/serverClose.txt b/smokeinfra/serverClose.txt
new file mode 100644
index 0000000000000000000000000000000000000000..65c8aae80735bb5632a9272ce2793841763f4d0f
--- /dev/null
+++ b/smokeinfra/serverClose.txt
@@ -0,0 +1 @@
+INFO 2021/08/11 14:52:34 Round completed, closing!
diff --git a/smokeinfra/udContact.bin b/smokeinfra/udContact.bin
index b8af93120d350f339918e0be522aef84cd03b245..6264ce26f2840816a6ff741295c8ec987bcfa6d7 100644
Binary files a/smokeinfra/udContact.bin and b/smokeinfra/udContact.bin differ