 const int CHIP_SELECT = 4;
 const char updateServer[] = "www.debcal.co.za";
 const char frimwareRequest[] = "GET /apollo/FIRMWARE.BIN HTTP/1.1";
+
 // How often to check for updates in minutes.
 int updateInterval = 1;
 bool updateNow = false;
 int updateCounter = 0;
 
-int temp = 0;
+// The carriage return, newline sequence that separates http headers from content
+char crnl[] = {'\r', '\n', '\r', '\n'};
 
 EthernetClient client;
 IPAddress ip(10, 0, 0, 24);
 byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
 
 /**
-   ElCheapo reset function.
+   ElCheapo reset function, should probably use the WDT instead, right..
 */
 void(* resetFunc)(void) = 0;
-
-
-char byteStream() {
-  char a = client.read();
-  Serial.print(a);
-  return a;
-
-}
-
-char crnl[] = {'\r', '\n', '\r', '\n'};
-// Counts the amount of mathching bytes found in the stream.
-// It can not be local to checkBytes
-int matchingBytes = 0;
-
-bool checkBytes(char* bytes, char (*stream)()) {
-  int byteCount = 0;
-  while (matchingBytes < 4) {
-    matchingBytes = bytes[matchingBytes] == stream() ? matchingBytes + 1 : 0;
-    byteCount++;
-    if (byteCount >= 2048) {
-      return false;
-    }
-    delay(1);
-  }
-  return (matchingBytes == 4); // a bit pedantic
-}
-
-
-int twoBytes() {
-  int tempVal = 0;
-  byte one = client.read();
-  byte two = client.read();
-  tempVal = one << 8;
-  tempVal |= two;
-  return tempVal;
-}
-
-
 
 void setup() {
   resetEthernet(A5);

  // Enable the WD interrupt.
  WDTCSR |= _BV(WDIE);
}

/**
    The WDT_vect routine is called by the WDT interrupt.
