             case 'r':
                 int len;
                 len = strlen(command);
-                if (len != 3) {
+                if (len != COMMAND_LENGTH) {
                     Serial.print("Invalid length of command \"");Serial.print(command);Serial.print("\": ");Serial.println(len, DEC);
                     break;
                 }
                 newOwner = (cmd & CASE_MASK) == 'E' ? enlightened : resistance;
-                percent = getPercent(&command[1]);
+                char strength;
+                strength = command[PORTAL_STRENGTH_INDEX];
+                percent = decodePercent(strength);
+                //Serial.print("Owner ");Serial.print(newOwner, DEC);Serial.print(" pct ");Serial.println(percent, DEC);
                 break;
 
             case 'N':
             case 'n':
                 newOwner = neutral;
+                //Serial.println("Neutral");
                 break;
 
             default:

void start_serial(void)
{
  in_index = 0;
  Serial.begin(115200);
}

SerialStatus collect_serial(void)
{
    SerialStatus status = IDLE;
    int avail = Serial.available();
/*
    if (avail > 0) {
        Serial.print("Avail: "); Serial.println(avail, DEC);
    }
*/
    while (Serial.available() > 0)
    {
        int8_t ch = Serial.read();

                    Serial.print("Invalid owner "); Serial.println(owner);
                    break;
            }
            Serial.print((char *)command); Serial.print(" - ");
            Serial.print("owner "); Serial.print(owner,DEC); Serial.print(", percent "); Serial.println(percent,DEC); 
        }
    }

    // If we're in the process of getting a serial command, don't service the LEDs: this process disables interrupts,
