   if (retVal == false) {
     Serial.println("!Reconfiguration failure.");
   }
-  
+
   //Strip out any remaining stuff in the message
   char clean = ' ';
   while (clean != '|' && Serial.available()) {
     clean = Serial.read();
   }
-  
+
   return retVal;
 }
 
 void speaker(const byte melody[], unsigned int arraySize) {
-  alarmSounding = true;
   analogWrite(speakerOut, 0); //Ensure speaker starts off
   for (int count = 0; count < (arraySize - 1) / 2; count++) { //Iterates through the notes requested
     statePin = !statePin;

      }
    }
  }
  alarmSounding = false;
}

//Base speaker code from http://www.arduino.cc/en/Tutorial/PlayMelody

  //Sensor has been triggered or serial has been triggered
  //Communications dictionary: '1' = alarm, '2' = heartbeat, '5' = reconfiguration
  //Reconfiguration protocol: "5 *mode*" ('5' signals that the next command is a reconfiguration, then a space, then the mode (0=sensor, 1=alarm, 2=query))
  //Message packet structure: first character is ! (user text) or | (data). Packets are terminated by a \n (user text) or | (data)
  //DONE Todo: in laptop relay, program it to only forward the communications dictionary commands
  //DONE Todo: include fluctuation tolerance (e.g. 10 activations required before alarm)
  //DONE Todo: heartbeat communications
  //DONE Todo: communications on the serial interfaces may have varying length. Account for it
  //DONE Todo: slow down bluetooth send rate. It's too fast and will leave an alarm on forever.
  //DONE Todo: set up message packet stucture

  if (opMode == sensor) {
    waterReadings();
