   Serial.print(repeats);
   Serial.println(")");
 
-  if(status==VALID) {
+  if (status == VALID) {
     String topic = globalTopic + String("/recv/") + protocol;
     if (deviceID != NULL) {
       topic += String('/') + deviceID;
     }
     mqtt.publish(topic.c_str(), message.c_str(), true);
   }
-  if(logMode) {
+  if (logMode) {
     String topic = mainTopic + String("/log/") + String(status) + String('/') + protocol;
     mqtt.publish(topic.c_str(), message.c_str());
   }
 }
 
 void rfRawCallback(const int* pulses, int length) {
-  if(rawMode) {
+  if (rawMode) {
     String data = rf.pulseTrainToString(pulses, length);
-    if(data.length()>0) {
+    if (data.length() > 0) {
       Serial.print("RAW RF signal (");
       Serial.print(length);
       Serial.print("): ");

          Serial.println("HTTP_UPDATE_OK"); // may not called ESPhttpUpdate reboot the ESP?
          ESP.restart();
          break;
        }
        rf.enableReceiver();
    } else {
      Serial.println("OTA authentication failed!");
    }

  Serial.print(" with protocol ");
  Serial.println(protocol);

  if (protocol == "RAW") {
    int rawpulses[MAXPULSESTREAMLENGTH];
    int rawlen = rf.stringToPulseTrain(message, rawpulses, MAXPULSESTREAMLENGTH);
    if (rawlen > 0) {
      rf.sendPulseTrain(rawpulses, rawlen);
    }
  } else {
