         return true;
    }
    else {
-     return true;
+     return false;
    }
 }
 
 // Storage for the recorded code
 int codeType = -1; // The type of code
 unsigned long codeValue; // The code value if not raw
-unsigned int rawCodes[RAWBUF]; // The durations if raw
 int codeLen; // The length of the code
 int toggle = 0; // The RC5/6 toggle state
 

    Serial.println("Started webserver ...");
}

void printStates()
{
        for (stateCounter = 0 ; stateCounter < 1; stateCounter++)
        {
            boolToString(states[stateCounter], stateBuff);
           
            Serial.print("State of ");
            Serial.print(stateCounter);
            Serial.print(": ");
            Serial.println(stateBuff);
        } 
}

void writeStates()
{
        //set led states
        digitalWrite(ledPin1, states[0]);
}

void boolToString (boolean test, char returnBuffer[4])
{
  returnBuffer[0] = '\0';
  if (test)
  {
    strcat(returnBuffer, "On");
  }
  else
  {
    strcat(returnBuffer, "Off");
  }
}

}

void sendCode() {
  if (codeType == NEC) {
    Serial.print("Sent NEC ");
    Serial.println(codeValue, HEX);
