 
   if(space == -1) runCommand(0,bufSize);
   else{
-    if(equals(0,space,"DEFAULTDELAY",12) || equals(0,space,"DEFAULT_DELAY",13)) defaultDelay = getInt(space);
-    else if(equals(0,space,"DEFAULTCHARDELAY",16) || equals(0,space,"DEFAULT_CHAR_DELAY",18)) defaultCharDelay = getInt(space);
-    else if(equals(0,space,"DELAY",5)) delay(getInt(space));
-    else if(equals(0,space,"STRING",6)){
+    if(equalsBuffer(0,space,"DEFAULTDELAY") || equalsBuffer(0,space,"DEFAULT_DELAY")) defaultDelay = getInt(buf,space);
+    else if(equalsBuffer(0,space,"DEFAULTCHARDELAY") || equalsBuffer(0,space,"DEFAULT_CHAR_DELAY")) defaultCharDelay = getInt(buf,space);
+    else if(equalsBuffer(0,space,"DELAY")) delay(getInt(buf,space));
+    else if(equalsBuffer(0,space,"STRING")){
       for(int i=space+1;i<bufSize;i++) KeyboardWrite(buf[i]);
-    }else if(equals(0,space,"REPEAT",6)){
-      int runs = getInt(space);
-      strncpy(buf, last, lastSize);
-      bufSize = lastSize;
-      for(int i=0;i<runs;i++){
-        runLine();
-      }
-    }
-    else if(equals(0,space,"REM",3)){}
+    }
+    else if(equalsBuffer(0,space,"REM") || equalsBuffer(0,space,"REPEAT")){}
     else{
       runCommand(0,space);
       while(space >= 0 && space < bufSize){

#define PRINTSCREEN 206 

File payload;
char* last = malloc(sizeof(char)*buffersize);
int lastSize = 0;
char* buf = malloc(sizeof(char)*buffersize);
int bufSize = 0;
int defaultDelay = 5;
int defaultCharDelay = 5;
bool ledOn = true;

int getSpace(int start, int end){
  for(int i=start;i<end;i++){
    if(buf[i] == ' ') return i;

#define dip3 9
#define dip4 10

#define buffersize 128

#define KEYPAD_0 234
#define KEYPAD_1 225
