diff --git a/js/WebSocketTransport.js b/js/WebSocketTransport.js
index dbda8b7..5f02803 100644
--- a/js/WebSocketTransport.js
+++ b/js/WebSocketTransport.js
@@ -5,10 +5,7 @@
 
 var WebSocketTransport = function WebSocketTransport() {    
 	this.ws = null;
-	this.maxBufferSize = 10000;  // Currently support 10000 bytes data input, consistent with BinaryXMLEncoder
-	this.buffer = new Uint8Array(this.maxBufferSize);
-	this.bufferOffset = 0;
-	this.structureDecoder = new BinaryXMLStructureDecoder();
+    this.elementReader = null;
     this.defaultGetHostAndPort = NDN.makeShuffledGetHostAndPort
         (["A.ws.ndn.ucla.edu", "B.ws.ndn.ucla.edu", "C.ws.ndn.ucla.edu", "D.ws.ndn.ucla.edu", 
           "E.ws.ndn.ucla.edu"],
@@ -24,6 +21,7 @@
 	
 	this.ws.binaryType = "arraybuffer";
 	
+    this.elementReader = new BinaryXmlElementReader(ndn);
 	var self = this;
 	this.ws.onmessage = function(ev) {
 		var result = ev.data;
@@ -37,46 +35,12 @@
 			if (LOG>3) console.log('BINARY RESPONSE IS ' + DataUtils.toHex(bytearray));
 			
 			try {
-				if (bytearray.length + self.bufferOffset >= self.buffer.byteLength) {
-					if (LOG>3) {
-						console.log("NDN.ws.onmessage: buffer overflow. Accumulate received length: " + self.bufferOffset 
-							+ ". Current packet length: " + bytearray.length + ".");
-					}
-					
-					// Purge and quit.
-					delete self.structureDecoder;
-					delete self.buffer;
-					self.structureDecoder = new BinaryXMLStructureDecoder();
-					self.buffer = new Uint8Array(self.maxBufferSize);
-					self.bufferOffset = 0;
-					return;
-				}
-				
-				/*for (var i = 0; i < bytearray.length; i++) {
-					self.buffer.push(bytearray[i]);
-				}*/
-				self.buffer.set(bytearray, self.bufferOffset);
-				self.bufferOffset += bytearray.length;
-				
-				if (!self.structureDecoder.findElementEnd(self.buffer.subarray(0, self.bufferOffset))) {
-					// Need more data to decode
-					if (LOG>3) console.log('Incomplete packet received. Length ' + bytearray.length + '. Wait for more input.');
-					return;
-				}
-				if (LOG>3) console.log('Complete packet received. Length ' + bytearray.length + '. Start decoding.');
+                // Find the end of the binary XML element and call ndn.onReceivedElement.
+                self.elementReader.onReceivedData(bytearray);
 			} catch (ex) {
 				console.log("NDN.ws.onmessage exception: " + ex);
 				return;
 			}
-			
-            ndn.onReceivedElement(self.buffer);
-
-			// Renew StrcutureDecoder and buffer after we process a full packet
-			delete self.structureDecoder;
-			delete self.buffer;
-			self.structureDecoder = new BinaryXMLStructureDecoder();
-			self.buffer = new Uint8Array(self.maxBufferSize);
-			self.bufferOffset = 0;
 		}
 	}
 	
