   }
   return intersect;
 }
-
-SimpleList<uint32_t> getLostConnections(SimpleList<uint32_t> nodes, SimpleList<uint32_t> old_nodes){
-  
-  SimpleList<uint32_t> diff = getDifference(old_nodes, nodes);
-  SimpleList<uint32_t> lostCons = getIntersection(diff, old_nodes);
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+
+/**************************************************************************/
+/* Given two lists, before and after a new scan, computes and returns all */
+/* nodes that have disconnected since the last scan.                      */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+CustomList<uint32_t> getLostConnections(CustomList<uint32_t> nodes, CustomList<uint32_t> old_nodes){
+  
+  CustomList<uint32_t> diff = getDifference(old_nodes, nodes);
+  CustomList<uint32_t> lostCons = getIntersection(diff, old_nodes);
   return lostCons;
   
 }
-
-SimpleList<uint32_t> getNewConnections(SimpleList<uint32_t> nodes, SimpleList<uint32_t> old_nodes){
-  
-  SimpleList<uint32_t> diff = getDifference(old_nodes, nodes);
-  SimpleList<uint32_t> newCons = getIntersection(diff, nodes);
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+
+/**************************************************************************/
+/* Given two lists, before and after a new scan, computes and returns all */
+/* newly connected nodes.                                                 */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+CustomList<uint32_t> getNewConnections(CustomList<uint32_t> nodes, CustomList<uint32_t> old_nodes){
+  
+  CustomList<uint32_t> diff = getDifference(old_nodes, nodes);
+  CustomList<uint32_t> newCons = getIntersection(diff, nodes);
   return newCons;
   
 }
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
 void changedConnectionCallback() {
  
     Serial.printf("Changed connections %s\n", mesh.subConnectionJson().c_str());
-    SimpleList<uint32_t> old_nodes = nodes;
+    CustomList<uint32_t> old_nodes = nodes;
     nodes = mesh.getNodeList();
     nodes.sort();
     Serial.printf("Num nodes: %d\n", nodes.size());
 
     // Print all available connections to nodes
     Serial.printf("Connection list:");
-    SimpleList<uint32_t>::iterator node = nodes.begin();
+    CustomList<uint32_t>::iterator node = nodes.begin();
     while (node != nodes.end()) {
         Serial.printf(" %u", *node);
         node++;



/************************************************************************/
/* Reads from DS18B20 sensor interfase given one-wire                   */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
String getMac()                                    
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

}
/************************************************************************/


/************************************************************************/
/* Checks if SEND_INTERVAL has passed and if true, reads from DS18B20   */ 
/* sensor and publishes temperature                                     */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
int readTemp(int port)                                    
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
{
  if((millis()-lastMsg>=SEND_INTERVAL)){
    lastMsg = millis();
    // Setup a oneWire instance to communicate with any OneWire devices 
    // (not just Maxim/Dallas temperature ICs)
    OneWire oneWire(port);
