   else if (sent) {
     delay(10); //this is needed
 
-    //Assemble the returned value
-    char num = Serial.read();
-    int checkReturned = atoi((const char *) &num) * 10;
-    num = Serial.read();
-    checkReturned += atoi((const char *) &num);
-
-    if (Serial.read() != '|') {
-      Serial.println ("!Checksum malformed.");
-      if (lostComms) {
-        return 43;
-      }
-      else {
-        return 3;
-      }
-    }
-
     if (opMode == alarm) {
+      //Assemble the returned value
+      char num = Serial.read();
+      int checkReturned = atoi((const char *) &num) * 10;
+      num = Serial.read();
+      checkReturned += atoi((const char *) &num);
+
+      if (Serial.read() != '|') {
+        Serial.println ("!Checksum malformed.");
+        if (lostComms) {
+          return 43;
+        }
+        else {
+          return 3;
+        }
+      }
 
       //validate the returned value, return result
       if (checkValue + 1 == checkReturned) {


    }
    else if (opMode == sensor) {
      //increment the return value by one, and send back
      bluetooth.print("|" + String(200 + checkReturned + 1) + "|");
      return 2;

          reconfiguration(); //Start reconfiguration code
        }
        else if (input == '2') { //a heartbeat came in, respond
          heartbeat(true);
        }

      }
      else {
        //OPMODE BROKE! WARN!
        blinkRate = 0;
      }
    }
  }

  if (bluetooth.available()) {
    delay(10); //this is needed

    char cleanout = ' ';
    char input = ' ';
    
    cleanout = bluetooth.read();
    input = bluetooth.read();
    
    //if the beginning of a command is found (takes care of "|\0" and "||" possible cases)
    if (cleanout == '|' && input != '|') {
      if (opMode == sensor) {
        if (input == '2') { //a heartbeat came in, respond
          heartbeat(true);
        }

