diff -purN osc.old/osc-mexsrc/osc_new_server.c osc.new/osc-mexsrc/osc_new_server.c
--- osc.old/osc-mexsrc/osc_new_server.c	2009-03-10 14:31:34.000000000 +0100
+++ osc.new/osc-mexsrc/osc_new_server.c	2009-03-10 14:31:19.000000000 +0100
@@ -29,7 +29,7 @@ void mexFunction(int nlhs, mxArray *plhs
   }
 
   sprintf(port, "%d", (int)(mxGetScalar(prhs[0])));
-  s = lo_server_new(port, NULL);  // No error handler...
+  s = lo_server_new(port, NULL); 
 
   if(! s) {
     mexErrMsgTxt("Error creating server.");
diff -purN osc.old/osc-mexsrc/osc_recv.c osc.new/osc-mexsrc/osc_recv.c
--- osc.old/osc-mexsrc/osc_recv.c	2009-03-10 14:31:34.000000000 +0100
+++ osc.new/osc-mexsrc/osc_recv.c	2009-03-10 14:31:19.000000000 +0100
@@ -13,9 +13,9 @@ char tph[1024];
 
 const char* fieldnames[3] = {"path", "tt", "data"};
 
-mxArray* rm[MAXMSGS];  // for parts of bundled messages recv'd
-int rmi;           // current number of messages on the stack 
-int rmi_start;     // index of the first message (might not be zero)
+mxArray* rm[MAXMSGS];  
+int rmi;           
+int rmi_start;     
 
 int parse_osc_message(
 		      const char *path,
@@ -35,10 +35,10 @@ int parse_osc_message(
 
   p = mxCreateStructMatrix(1,1, 3, fieldnames);
   if(rmi > MAXMSGS) {
-    // data at current position can be destroyed
+    
     mxDestroyArray(rm[rmi % MAXMSGS]);
 
-    // starting position moves (its a ring buffer containing the N most recent packets)
+    
     rmi_start = (rmi_start + 1) % MAXMSGS;
   }
   rm[rmi % MAXMSGS] = p;
@@ -142,10 +142,9 @@ void mexFunction(int nlhs, mxArray *plhs
   
   lo_server_add_method(s, NULL, NULL, parse_osc_message, p);
   
-  // take packets from the server without blocking until the buffer is empty...
-  // limit to 1000 packets in case the stream is coming in faster than we can process...
+  
   i = 0;
-  while(rmi < MAXMSGS * 100) { // try to put some sane limit on how much we will pull...
+  while(rmi < MAXMSGS * 100) { 
     i = rmi;
     lo_server_recv_noblock(s, 0);
     if(i == rmi) {
@@ -153,22 +152,20 @@ void mexFunction(int nlhs, mxArray *plhs
     }
   }
   
-  // if we didn't read anything in that attempt then wait for n milliseconds for a packet to come in...
+  
   if(i == 0 && timeout >= 0) {
     lo_server_recv_noblock(s, timeout);
-  } else if(i == 0) { // timeout is -1, i.e. no timeout
-    // note there is no way to abort this from matlab...
+  } else if(i == 0) {
     lo_server_recv(s);
   }
   
   lo_server_del_method(s, NULL, NULL);
 
   if(rmi == 0) {
-    plhs[0] = mxCreateCellMatrix(0,0); // empty cell array
+    plhs[0] = mxCreateCellMatrix(0,0);
   } else {
     q = mxCreateCellMatrix(1, rmi > MAXMSGS ? MAXMSGS : rmi);
 
-    // read the pointers out of the ring buffer...
     for(i = 0; i < MAXMSGS && i < rmi; i++) {
       mxSetCell(q, i, rm[(rmi_start + i) % MAXMSGS]);
     }
diff -purN osc.old/osc-mexsrc/osc_send.c osc.new/osc-mexsrc/osc_send.c
--- osc.old/osc-mexsrc/osc_send.c	2009-03-10 14:31:34.000000000 +0100
+++ osc.new/osc-mexsrc/osc_send.c	2009-03-10 14:31:19.000000000 +0100
@@ -14,10 +14,10 @@
 #include "mex.h"
 #include "lo/lo.h"
 #include "math.h"
+#include "string.h"
 
 #define EPOCH_DATENUM 693962.0
 
-// Global buffers are faster but not thread-safe
 
 char strbuf[4096];
 char tphbuf[4096];
@@ -32,7 +32,7 @@ void make_typehint(char* tph, int m, con
   int n, i;
   mxClassID t;
 
-  if(data == NULL) { // allow for no data case
+  if(data == NULL) { 
     tph[0] = '\0';
     return;   
   }
@@ -89,7 +89,6 @@ void make_typehint(char* tph, int m, con
     
   }
 
-  // terminate the type string...
   tph[i] = '\0';
 
 }
@@ -185,7 +184,7 @@ void build_osc_message(lo_message msg, c
       }
       break;
       
-    case 'L': // "Logical" type (non-standard)
+    case 'L': 
       if(mxIsLogicalScalar(mxGetCell(data, i)) && mxIsLogicalScalarTrue(mxGetCell(data, i)) || mxGetScalar(mxGetCell(data, i)) != 0) {
 	lo_message_add_true(msg);
       } else {
@@ -194,7 +193,7 @@ void build_osc_message(lo_message msg, c
       i++; ti++;
       break;
       
-    case 'T': // this group are the 'implicit' types, i.e. have zero data length
+    case 'T': 
       lo_message_add_true(msg);
       ti++;
       break;
@@ -248,21 +247,15 @@ void mexFunction(int nlhs, mxArray *plhs
   const mxArray* q;
   const mxArray* r;
   
-  lo_message msg;  // message pointer
-  lo_bundle  bdl;  // bundle pointer if needed
+  lo_message msg;  
+  lo_bundle  bdl;  
 
-  // no timestamp stuff for now...
-  //lo_timetag ts;   // timestamp structure
-  //double tsd;      // timestamp-as-double (in 'datenum' MATLAB format)
 
   if (nrhs != 2) {
     mexErrMsgTxt("Expecting two input arguments");
     return;
   }
-  //if (nlhs != 1) {
-  //  mexErrMsgTxt("Expecting one output arguments.");
-  //  return;
-  //}
+
 
   if(! mxIsChar(prhs[0])) {
     mexErrMsgTxt("Expecting a character array in the first argument.");
@@ -304,7 +297,7 @@ void mexFunction(int nlhs, mxArray *plhs
   err = mxGetString(mxGetCell(p, 0), msg_adr, 255);
   */
   
-  if(mxIsCell(p)) { // its a bundle, i.e. list of structures
+  if(mxIsCell(p)) {
 
     /*  sorry no timestamp support for now...
     if(n == 3) {
@@ -361,7 +354,7 @@ void mexFunction(int nlhs, mxArray *plhs
       
       lo_bundle_add_message(bdl, msg_adri[i], bdl_msgi[i]);
     }
-    // send bundle
+
     err = lo_send_bundle(d, bdl);
     if(err < 1) {
       mexWarnMsgTxt(lo_address_errstr(d));
@@ -372,14 +365,13 @@ void mexFunction(int nlhs, mxArray *plhs
 
     for(i = 0; i < n; i++) {
       lo_message_free(bdl_msgi[i]);
-      msg_adri[i][0] = '\0'; // make sure these don't get reused
+      msg_adri[i][0] = '\0'; 
     }
     lo_bundle_free(bdl);
 
     return;
   } else {
-    // its a normal message... (a struct)
-    // parse cell and create message...
+   
 
     msg = lo_message_new();
 

