                     Serial.println();
                 }
             }
+            clearInputString();
+            return;
         }
-        else if(String("IDEN").startsWith(inputString)) {
+
+        inputString.toUpperCase();
+        inputString = strtok((char *)inputString.c_str(), " ");
+
+        if(String("IDEN").startsWith(inputString)) {
             printIden();
         }
         else if(String("RFW").startsWith(inputString)) {

            Serial.println(inputString);
        }

        // clear the string:
        inputString = "";
        stringComplete = false;
    }
}


void loop() {
    if (stringComplete) {
        if(writingToFlash) {
            if(String("!ABORTWRITEFLASHMEMORY!").equals(inputString)) {
                writingToFlash = false;
