diff --git a/js/encoding/BinaryXMLDecoder.js b/js/encoding/BinaryXMLDecoder.js
index 1175f28..c41d549 100644
--- a/js/encoding/BinaryXMLDecoder.js
+++ b/js/encoding/BinaryXMLDecoder.js
@@ -451,16 +451,24 @@
 	
 	
 BinaryXMLDecoder.prototype.readEndElement = function(){
-		try {
+		//try {
+			if(LOG>4)console.log('this.offset is '+this.offset);
+			
 			var next = this.istream[this.offset]; 
+			
 			this.offset++;
 			//read();
+			
+			if(LOG>4)console.log('XML_CLOSE IS '+XML_CLOSE);
+			if(LOG>4)console.log('next is '+next);
+			
 			if (next != XML_CLOSE) {
+				console.log("Expected end element, got: " + next);
 				throw new ContentDecodingException("Expected end element, got: " + next);
 			}
-		} catch ( e) {
-			throw new ContentDecodingException(e);
-		}
+		//} catch ( e) {
+			//throw new ContentDecodingException(e);
+		//}
 	};
 
 
@@ -491,9 +499,25 @@
 	startTag)  {
 	//byte [] 
 	
-	byteTimestamp = this.readBinaryElement(startTag);
+	var byteTimestamp = this.readBinaryElement(startTag);
+
+	//var lontimestamp = DataUtils.byteArrayToUnsignedLong(byteTimestamp);
+
+	var byteTimestamp = DataUtils.toHex(byteTimestamp);
+	
+	
+	var byteTimestamp = parseInt(byteTimestamp, 16);
+
+	lontimestamp = (byteTimestamp/ 4096) * 1000;
+
+	//if(lontimestamp<0) lontimestamp =  - lontimestamp;
+
+	if(LOG>3) console.log('DECODED DATE WITH VALUE');
+	if(LOG>3) console.log(lontimestamp);
+	
+
 	//CCNTime 
-	timestamp = new CCNTime(byteTimestamp);
+	timestamp = new CCNTime(lontimestamp);
 	//timestamp.setDateBinary(byteTimestamp);
 	
 	if (null == timestamp) {
@@ -544,6 +568,8 @@
 		
 	} while (more);
 	
+	if(LOG>3)console.log('TYPE is '+ type + ' VAL is '+ val);
+
 	return new TypeAndVal(type, val);
 };
 
@@ -608,7 +634,7 @@
 
 };
 
-
+var count =0;
 
 //String
 BinaryXMLDecoder.prototype.decodeUString = function(
@@ -617,7 +643,12 @@
 		//int 
 		byteLength) {
 	
-	if(null == byteLength){
+	/*
+	console.log('COUNT IS '+count);
+	console.log('INPUT BYTELENGTH IS '+byteLength);
+	count++;
+	if(null == byteLength||  undefined == byteLength){
+		console.log("!!!!");
 		tv = this.decodeTypeAndVal(this.istream);
 		var valval ;
 		if(typeof tv.val() == 'string'){
@@ -626,18 +657,82 @@
 		else
 			valval = (tv.val());
 		
+		if(LOG>4) console.log('valval  is ' + valval);
 		byteLength= this.decodeUString(this.istream, valval);
+		
+		//if(LOG>4) console.log('byte Length found in type val is '+ byteLength.charCodeAt(0));
+		byteLength = parseInt(byteLength);
+		
+		
+		//byteLength = byteLength.charCodeAt(0);
+		//if(LOG>4) console.log('byte Length found in type val is '+ byteLength);
 	}
-
+	if(LOG>4)console.log('byteLength is '+byteLength);
+	if(LOG>4)console.log('type of byteLength is '+typeof byteLength);
+	
 	stringBytes = this.decodeBlob(this.istream, byteLength);
 	
+	//console.log('String bytes are '+ stringBytes);
+	//console.log('stringBytes);
+	
+	if(LOG>4)console.log('byteLength is '+byteLength);
+	if(LOG>4)console.log('this.offset is '+this.offset);
+
 	tempBuffer = this.istream.slice(this.offset, this.offset+byteLength);
+	if(LOG>4)console.log('TEMPBUFFER IS' + tempBuffer);
+	if(LOG>4)console.log( tempBuffer);
+
+	if(LOG>4)console.log('ADDING to offset value' + byteLength);
 	this.offset+= byteLength;
-	console.log('read the String' + tempBuffer.toString('ascii'));
-	return tempBuffer.toString('ascii');//DataUtils.getUTF8StringFromBytes(stringBytes);
+	//if(LOG>3)console.log('read the String' + tempBuffer.toString('ascii'));
+	//return tempBuffer.toString('ascii');//
+	
+	
+	//if(LOG>3)console.log( 'STRING READ IS '+ DataUtils.getUTF8StringFromBytes(stringBytes) ) ;
+	//if(LOG>3)console.log( 'STRING READ IS '+ DataUtils.getUTF8StringFromBytes(tempBuffer) ) ;
+	//if(LOG>3)console.log(DataUtils.getUTF8StringFromBytes(tempBuffer) ) ;
+	//return DataUtils.getUTF8StringFromBytes(tempBuffer);
+	
+	if(LOG>3)console.log( 'STRING READ IS '+ DataUtils.toString(stringBytes) ) ;
+	if(LOG>3)console.log( 'TYPE OF STRING READ IS '+ typeof DataUtils.toString(stringBytes) ) ;
+
+	return  DataUtils.toString(stringBytes);*/
+
+	if(null == byteLength ){
+		var tempStreamPosition = this.offset;
+			
+		//TypeAndVal 
+		tv = this.decodeTypeAndVal(istream);
+		
+		if(LOG>3)console.log('TV is '+tv);
+		if(LOG>3)console.log(tv);
+		
+		if(LOG>3)console.log('Type of TV is '+typeof tv);
+	
+		if ((null == tv) || (XML_UDATA != tv.type())) { // if we just have closers left, will get back null
+			//if (Log.isLoggable(Log.FAC_ENCODING, Level.FINEST))
+				//Log.finest(Log.FAC_ENCODING, "Expected UDATA, got " + ((null == tv) ? " not a tag " : tv.type()) + ", assuming elided 0-length blob.");
+			
+			this.offset = tempStreamPosition;
+			
+			return "";
+		}
+			
+		return this.decodeUString(istream, tv.val());
+	}
+	else{
+		//byte [] 
+		stringBytes = this.decodeBlob(istream, byteLength);
+		
+		//return DataUtils.getUTF8StringFromBytes(stringBytes);
+		return  DataUtils.toString(stringBytes);
+		
+	}
 };
 
 
+
+
 //OBject containg a pair of type and value
 var TypeAndVal = function TypeAndVal(_type,_val) {
 	this.t = _type;
@@ -651,4 +746,43 @@
 TypeAndVal.prototype.val = function(){
 	return this.v;
 };
-//TODO
\ No newline at end of file
+//TODO
+
+
+
+
+
+
+BinaryXMLDecoder.prototype.readIntegerElement =function(
+	//String 
+	startTag) {
+
+	//String 
+	if(LOG>4) console.log('READING INTEGER '+ startTag);
+	if(LOG>4) console.log('TYPE OF '+ typeof startTag);
+	
+	//try {
+		
+	strVal = this.readUTF8Element(startTag);
+
+	//}
+	//catch (e) {
+		//throw new Exception("Cannot parse " + startTag + ": " + strVal);
+	//}
+	
+	return parseInt(strVal);
+};
+
+
+BinaryXMLDecoder.prototype.readUTF8Element =function(
+			//String 
+			startTag,
+			//TreeMap<String, String> 
+			attributes) {
+			//throws ContentDecodingException 
+
+		this.readStartElement(startTag, attributes); // can't use getElementText, can't get attributes
+		//String 
+		strElementText = this.readUString();
+		return strElementText;
+};
diff --git a/js/encoding/BinaryXMLEncoder.js b/js/encoding/BinaryXMLEncoder.js
index a633aa8..16759b1 100644
--- a/js/encoding/BinaryXMLEncoder.js
+++ b/js/encoding/BinaryXMLEncoder.js
@@ -51,7 +51,7 @@
 };
 
 BinaryXMLEncoder.prototype.writeUString = function(/*String*/ utf8Content){
-	this.encodeUString(this.ostream, utf8Content);
+	this.encodeUString(this.ostream, utf8Content, XML_UDATA);
 };
 
 BinaryXMLEncoder.prototype.writeBlob = function(/*byte []*/ binaryContent
@@ -149,22 +149,35 @@
 		Content,
 		//TreeMap<String, String> 
 		attributes) {
+	
 	this.writeStartElement(tag, attributes);
 	// Will omit if 0-length
 	
 	if(typeof Content === 'number') {
-		if(LOG>4) console.log('GOING TO WRITE THE NUMBER ' +Content );
-		this.writeBlob(Content.toString());
+		if(LOG>4) console.log('GOING TO WRITE THE NUMBER .charCodeAt(0) ' +Content.toString().charCodeAt(0) );
+		if(LOG>4) console.log('GOING TO WRITE THE NUMBER ' +Content.toString() );
+		if(LOG>4) console.log('type of number is ' +typeof Content.toString() );
+		
+
+		
+		this.writeUString(Content.toString());
 		//whatever
 		
 	}
 	
+	else if(typeof Content === 'string'){
+		if(LOG>4) console.log('GOING TO WRITE THE STRING  ' +Content );
+		if(LOG>4) console.log('type of STRING is ' +typeof Content );
+		
+		this.writeUString(Content);
+	}
+	
 	else{
 	//else if(typeof Content === 'string'){
 		 //console.log('went here');
 		//this.writeBlob(Content);
 	//}
-	
+	if(LOG>4) console.log('GOING TO WRITE A BLOB  ' +Content );
 	//else if(typeof Content === 'object'){
 		this.writeBlob(Content);
 	//}
@@ -189,7 +202,9 @@
 		//byte [] 
 		buf) {
 	
-	console.log('Encoding type '+ type+ ' and value '+ val);
+	if(LOG>4)console.log('Encoding type '+ type+ ' and value '+ val);
+	
+	if(LOG>4) console.log('OFFSET IS ' + this.offset );
 	
 	if ((type > XML_UDATA) || (type < 0) || (val < 0)) {
 		throw new Exception("Tag and value must be positive, and tag valid.");
@@ -248,12 +263,22 @@
 	//byte [] data utils
 	/*custom*/
 	//byte[]
-	strBytes = new Array(ustring.Length);
-	var i = 0;
-	for( ;i<ustring.lengh;i++) //in InStr.ToCharArray())
+	
+	if(LOG>3) console.log("The string to write is ");
+	
+	if(LOG>3) console.log(ustring);
+
+	//COPY THE STRING TO AVOID PROBLEMS
+	strBytes = new Array(ustring.length);
+	
+	var i = 0;	
+
+	for( ; i<ustring.length; i++) //in InStr.ToCharArray())
 	{
-		strBytes[i] = ustring[i];
+		if(LOG>3)console.log("ustring[" + i + '] = ' + ustring[i]);
+		strBytes[i] = ustring.charCodeAt(i);
 	}
+	
 	//strBytes = DataUtils.getBytesFromUTF8String(ustring);
 	
 	this.encodeTypeAndVal(type, 
@@ -261,7 +286,10 @@
 								(strBytes.length-1) :
 								strBytes.length), ostream);
 	
-
+	if(LOG>3) console.log("THE string to write is ");
+	
+	if(LOG>3) console.log(strBytes);
+	
 	this.writeString(strBytes,this.offset);
 	
 	this.offset+= strBytes.length;
@@ -286,12 +314,21 @@
 		return;
 	}
 	
+	if(LOG>4) console.log('LENGTH OF XML_BLOB IS '+length);
 	
+	
+	blobCopy = new Array(blob.Length);
+	var i = 0;
+	for( ;i<blob.length;i++) //in InStr.ToCharArray())
+	{
+		blobCopy[i] = blob[i];
+	}
+
 	this.encodeTypeAndVal(XML_BLOB, length, ostream,offset);
 	
 	if (null != blob) {
 
-		this.writeString(blob,this.offset);
+		this.writeBlobArray(blobCopy,this.offset);
 		this.offset += length;
 	}
 };
@@ -324,7 +361,29 @@
 		tag, 
 		//CCNTime 
 		dateTime) {
-	this.writeElement(tag, dateTime.toBinaryTime());
+	
+	if(LOG>4)console.log('ENCODING DATE with LONG VALUE');
+	if(LOG>4)console.log(dateTime.msec);
+	
+	//var binarydate = DataUtils.unsignedLongToByteArray( Math.round((dateTime.msec/1000) * 4096)  );
+	
+
+	//parse to hex
+	var binarydate =  Math.round((dateTime.msec/1000) * 4096).toString(16)  ;
+
+	//HACK
+	var binarydate =  DataUtils.toNumbers( '0'.concat(binarydate,'0')) ;
+
+	
+	if(LOG>4)console.log('ENCODING DATE with BINARY VALUE');
+	if(LOG>4)console.log(binarydate);
+	
+	if(LOG>4)console.log('ENCODING DATE with BINARY VALUE(HEX)');
+	if(LOG>4)console.log(DataUtils.toHex(binarydate));
+	
+
+	this.writeElement(tag, binarydate);
+
 };
 
 BinaryXMLEncoder.prototype.writeString = function(
@@ -336,16 +395,27 @@
     if(typeof input === 'string'){
 		//console.log('went here');
     	if(LOG>4) console.log('GOING TO WRITE A STRING');
-    
+    	if(LOG>4) console.log(input);
+        
 		for (var i = 0; i < input.length; i++) {
+			if(LOG>4) console.log('input.charCodeAt(i)=' + input.charCodeAt(i));
 		    this.ostream[this.offset+i] = (input.charCodeAt(i));
 		}
 	}
     
+    else{
+    	
+    	if(LOG>4) console.log('GOING TO WRITE A STRING IN BINARY FORM');
+    	if(LOG>4) console.log(input);
+    	
+    	this.writeBlobArray(input);
+    	
+    }
+    /*
 	else if(typeof input === 'object'){
-		this.writeBlobArray(input);
+		
 	}	
-
+	*/
 };
 
 BinaryXMLEncoder.prototype.writeBlobArray = function(
diff --git a/js/encoding/DataUtils.js b/js/encoding/DataUtils.js
index 5386698..1f998af 100644
--- a/js/encoding/DataUtils.js
+++ b/js/encoding/DataUtils.js
@@ -15,12 +15,16 @@
  * 
  */
 
-  var keyStr = "ABCDEFGHIJKLMNOP" +
+DataUtils.keyStr = "ABCDEFGHIJKLMNOP" +
                "QRSTUVWXYZabcdef" +
                "ghijklmnopqrstuv" +
                "wxyz0123456789+/" +
                "=";
 
+               
+/**
+ * Raw String to Base 64
+ */
 DataUtils.stringtoBase64=function stringtoBase64(input) {
      input = escape(input);
      var output = "";
@@ -45,10 +49,10 @@
         }
 
         output = output +
-           keyStr.charAt(enc1) +
-           keyStr.charAt(enc2) +
-           keyStr.charAt(enc3) +
-           keyStr.charAt(enc4);
+           DataUtils.keyStr.charAt(enc1) +
+           DataUtils.keyStr.charAt(enc2) +
+           DataUtils.keyStr.charAt(enc3) +
+           DataUtils.keyStr.charAt(enc4);
         chr1 = chr2 = chr3 = "";
         enc1 = enc2 = enc3 = enc4 = "";
      } while (i < input.length);
@@ -56,6 +60,9 @@
      return output;
   }
 
+/**
+ * Base 64 to Raw String 
+ */
 DataUtils.base64toString = function base64toString(input) {
      var output = "";
      var chr1, chr2, chr3 = "";
@@ -69,13 +76,14 @@
               "Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\n" +
               "Expect errors in decoding.");
      }
+     
      input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
 
      do {
-        enc1 = keyStr.indexOf(input.charAt(i++));
-        enc2 = keyStr.indexOf(input.charAt(i++));
-        enc3 = keyStr.indexOf(input.charAt(i++));
-        enc4 = keyStr.indexOf(input.charAt(i++));
+        enc1 = DataUtils.keyStr.indexOf(input.charAt(i++));
+        enc2 = DataUtils.keyStr.indexOf(input.charAt(i++));
+        enc3 = DataUtils.keyStr.indexOf(input.charAt(i++));
+        enc4 = DataUtils.keyStr.indexOf(input.charAt(i++));
 
         chr1 = (enc1 << 2) | (enc2 >> 4);
         chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
@@ -99,39 +107,94 @@
   };
 
 //byte [] 
-DataUtils.prototype.unsignedLongToByteArray= function( value) {
+
+/**
+ * NOT WORKING!!!!!
+ * 
+ * Unsiged Long Number to Byte Array
+ */
+	
+ /*
+DataUtils.unsignedLongToByteArray= function( value) {
+	
+	if(LOG>4)console.log('INPUT IS '+value);
+	
 	if( 0 == value )
 		return [0];
 
 	if( 0 <= value && value <= 0x00FF ) {
 		//byte [] 
-		bb = new Array[1];
+		var bb = new Array(1);
 		bb[0] = (value & 0x00FF);
 		return bb;
 	}
 
-	
+	if(LOG>4) console.log('type of value is '+typeof value);
+	if(LOG>4) console.log('value is '+value);
 	//byte [] 
-	out = null;
+	var out = null;
 	//int
 	var offset = -1;
 	for(var i = 7; i >=0; --i) {
 		//byte
-		b = ((value >> (i * 8)) & 0xFF);
+		console.log(i);
+		console.log('value is '+value);
+		console.log('(value >> (i * 8)) '+ (value >> (i * 8))  );
+		console.log(' ((value >> (i * 8)) & 0xFF) '+ ((value >> (i * 8)) & 0xFF)  );
+
+		var b = ((value >> (i * 8)) & 0xFF)  ;
+		
+		if(LOG>4) console.log('b is '+b);
+		
 		if( out == null && b != 0 ) {
-			out = new byte[i+1];
+			//out = new byte[i+1];
+			out = new Array(i+1);
 			offset = i;
 		}
+		
 		if( out != null )
 			out[ offset - i ] = b;
 	}
+	if(LOG>4)console.log('OUTPUT IS ');
+	if(LOG>4)console.log(out);
 	return out;
 }
+*/
+	
+/**
+ * NOT WORKING!!!!!
+ * 
+ * Unsiged Long Number to Byte Array
+ *//*
+DataUtils.byteArrayToUnsignedLong = function(//final byte [] 
+	src) {
+		if(LOG>4) console.log('INPUT IS ');
+		if(LOG>4) console.log(src);
+		
+		var value = 0;
+		for(var i = 0; i < src.length; i++) {
+			value = value << 8;
+			// Java will assume the byte is signed, so extend it and trim it.
+			
+			
+			var b = ((src[i]) & 0xFF );
+			value |= b;
+		}
+		
+		if(LOG>4) console.log('OUTPUT IS ');
+		
+		if(LOG>4) console.log(value);
+
+		return value;
+	}*/
 
 
-var utf8 = {}
-
-utf8.toByteArray = function(str) {
+/**
+ * Hex String to Byte Array
+ */
+	//THIS IS NOT WORKING
+/*
+DataUtils.HexStringtoByteArray = function(str) {
     var byteArray = [];
     for (var i = 0; i < str.length; i++)
         if (str.charCodeAt(i) <= 0x7F)
@@ -143,8 +206,12 @@
         }
     return byteArray;
 };
-
-utf8.parse = function(byteArray) {
+*/
+	
+/**
+ * Byte Array to Hex String
+ */
+DataUtils.byteArrayToHexString = function(byteArray) {
     var str = '';
     for (var i = 0; i < byteArray.length; i++)
         str +=  byteArray[i] <= 0x7F?
@@ -155,17 +222,24 @@
 };
 
 
+/**
+ * Byte array to Hex String
+ */
 //http://ejohn.org/blog/numbers-hex-and-colors/
-function toHex(arguments){
+DataUtils.toHex = function(arguments){
+	if(LOG>4) console.log('ABOUT TO CONVERT '+ arguments);
   //console.log(arguments);
   var ret = "";
   for ( var i = 0; i < arguments.length; i++ )
     ret += (arguments[i] < 16 ? "0" : "") + arguments[i].toString(16);
-  return ret.toUpperCase();
+  return ret; //.toUpperCase();
 }
 
+/**
+ * Byte array to raw string
+ */
 //DOES NOT SEEM TO WORK
-function toString(arguments){
+DataUtils.toString = function(arguments){
   //console.log(arguments);
   var ret = "";
   for ( var i = 0; i < arguments.length; i++ )
@@ -173,7 +247,10 @@
   return ret;
 }
 
-function toNumbers( str ){
+/**
+ * Hex String to byte array
+ */
+DataUtils.toNumbers=function( str ){
 	if(typeof str =='string'){
 		  var ret = [];
 		   str.replace(/(..)/g, function(str){
@@ -183,9 +260,115 @@
     }
 }
 
-function toNumbersFromString( str ){
+/**
+ * Raw String to Byte Array
+ */
+DataUtils.toNumbersFromString = function( str ){
 	var bytes = new Array(str.length);
 	for(var i=0;i<str.length;i++)
 		bytes[i] = str.charCodeAt(i);
 	return bytes;
-}
\ No newline at end of file
+}
+
+DataUtils.encodeUtf8 = function (string) {
+		string = string.replace(/\r\n/g,"\n");
+		var utftext = "";
+ 
+		for (var n = 0; n < string.length; n++) {
+ 
+			var c = string.charCodeAt(n);
+ 
+			if (c < 128) {
+				utftext += String.fromCharCode(c);
+			}
+			else if((c > 127) && (c < 2048)) {
+				utftext += String.fromCharCode((c >> 6) | 192);
+				utftext += String.fromCharCode((c & 63) | 128);
+			}
+			else {
+				utftext += String.fromCharCode((c >> 12) | 224);
+				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
+				utftext += String.fromCharCode((c & 63) | 128);
+			}
+ 
+		}
+ 
+		return utftext;
+	};
+ 
+	// public method for url decoding
+DataUtils.decodeUtf8 = function (utftext) {
+		var string = "";
+		var i = 0;
+		var c = c1 = c2 = 0;
+ 
+		while ( i < utftext.length ) {
+ 
+			c = utftext.charCodeAt(i);
+ 
+			if (c < 128) {
+				string += String.fromCharCode(c);
+				i++;
+			}
+			else if((c > 191) && (c < 224)) {
+				c2 = utftext.charCodeAt(i+1);
+				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
+				i += 2;
+			}
+			else {
+				c2 = utftext.charCodeAt(i+1);
+				c3 = utftext.charCodeAt(i+2);
+				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
+				i += 3;
+			}
+ 
+		}
+ 
+		return string;
+	};
+
+	test = function(){
+		console.log(DataUtils.decodeUtf8("HELLO.~"));
+		return DataUtils.decodeUtf8("HELLO.~");
+	}
+
+//NOT WORKING
+/*
+DataUtils.getUTF8StringFromBytes = function(bytes) {
+	
+	bytes = toString(bytes);
+
+    var ix = 0;
+ 
+    if( bytes.slice(0,3) == "\xEF\xBB\xBF") {
+        ix = 3;
+    }
+ 
+    var string = "";
+    for( ; ix < bytes.length; ix++ ) {
+        var byte1 = bytes[ix].charCodeAt(0);
+        if( byte1 < 0x80 ) {
+            string += String.fromCharCode(byte1);
+        } else if( byte1 >= 0xC2 && byte1 < 0xE0 ) {
+            var byte2 = bytes[++ix].charCodeAt(0);
+            string += String.fromCharCode(((byte1&0x1F)<<6) + (byte2&0x3F));
+        } else if( byte1 >= 0xE0 && byte1 < 0xF0 ) {
+            var byte2 = bytes[++ix].charCodeAt(0);
+            var byte3 = bytes[++ix].charCodeAt(0);
+            string += String.fromCharCode(((byte1&0xFF)<<12) + ((byte2&0x3F)<<6) + (byte3&0x3F));
+        } else if( byte1 >= 0xF0 && byte1 < 0xF5) {
+            var byte2 = bytes[++ix].charCodeAt(0);
+            var byte3 = bytes[++ix].charCodeAt(0);
+            var byte4 = bytes[++ix].charCodeAt(0);
+            var codepoint = ((byte1&0x07)<<18) + ((byte2&0x3F)<<12)+ ((byte3&0x3F)<<6) + (byte4&0x3F);
+            codepoint -= 0x10000;
+            string += String.fromCharCode(
+                (codepoint>>10) + 0xD800,
+                (codepoint&0x3FF) + 0xDC00
+            );
+        }
+    }
+ 
+    return string;
+}*/
+
diff --git a/js/encoding/EncodingUtils.js b/js/encoding/EncodingUtils.js
new file mode 100644
index 0000000..503cd66
--- /dev/null
+++ b/js/encoding/EncodingUtils.js
@@ -0,0 +1,120 @@
+
+
+
+
+function encodeToHexInterest(int){
+	
+	var enc = new BinaryXMLEncoder();
+ 
+	int.encode(enc);
+	
+	var hex = DataUtils.toHex(enc.getReducedOstream());
+
+	return hex;
+
+	
+}
+
+
+function encodeToHexContentObject(co){
+	var enc = new BinaryXMLEncoder();
+ 
+	co.encode(enc);
+	
+	var hex = DataUtils.toHex(enc.getReducedOstream());
+
+	return hex;
+
+	
+}
+
+function encodeToBinaryContentObject(co){
+	var enc = new BinaryXMLEncoder();
+ 
+	co.encode(enc);
+	
+	var hex = enc.getReducedOstream();
+
+	return hex;
+
+	
+}
+
+function encodeForwardingEntry(co){
+	var enc = new BinaryXMLEncoder();
+ 
+	co.encode(enc);
+	
+	var bytes = enc.getReducedOstream();
+
+	return bytes;
+
+	
+}
+
+
+
+function decodeHexFaceInstance(result){
+	
+	var numbers = DataUtils.toNumbers(result);
+			
+	
+	decoder = new BinaryXMLDecoder(numbers);
+	
+	if(LOG>3)console.log('DECODING HEX FACE INSTANCE  \n'+numbers);
+
+	i = new FaceInstance();
+
+	i.decode(decoder);
+
+	return i;
+	
+}
+
+function decodeHexInterest(result){
+	var numbers = DataUtils.toNumbers(result);
+			
+	
+	decoder = new BinaryXMLDecoder(numbers);
+	if(LOG>3)console.log('DECODING HEX INTERST  \n'+numbers);
+
+	i = new Interest();
+
+	i.decode(decoder);
+
+	return i;
+	
+}
+
+
+
+function decodeHexContentObject(result){
+	var numbers = DataUtils.toNumbers(result);
+
+	decoder = new BinaryXMLDecoder(numbers);
+	if(LOG>3)console.log('DECODED HEX CONTENT OBJECT \n'+numbers);
+	
+	co = new ContentObject();
+
+	co.decode(decoder);
+
+	return co;
+	
+}
+
+
+
+function decodeHexForwardingEntry(result){
+	var numbers = DataUtils.toNumbers(result);
+
+	decoder = new BinaryXMLDecoder(numbers);
+	
+	if(LOG>3)console.log('DECODED HEX FORWARDING ENTRY \n'+numbers);
+	
+	co = new ForwardingEntry();
+
+	co.decode(decoder);
+
+	return co;
+	
+}
\ No newline at end of file
diff --git a/js/encoding/TextXMLCodec.js b/js/encoding/TextXMLCodec.js
index 716aa6d..37cbe04 100644
--- a/js/encoding/TextXMLCodec.js
+++ b/js/encoding/TextXMLCodec.js
@@ -22,38 +22,3 @@
 
 };
 
-//returns a string
-
-TextXMLCodec.protpotype.codecName = function() { return this.CODEC_NAME; }	;
-
-//returns a string
-TextXMLCodec.protottype.encodeBinaryElement = function(/*byte []*/ element) {
-		if ((null == element) || (0 == element.length)) 
-			return new String("");
-		return new String(DataUtils.base64Encode(element));
-	};
-	
-/* returns a string */
-TextXMLCodec.prototype.encodeBinaryElement = function(/*byte []*/ element, /*int*/ offset, /*int*/ length) {
-		if ((null == element) || (0 == element.length)) 
-			return new String("");
-		ByteBuffer bbuf = ByteBuffer.wrap(element, offset, length);
-		return new String(DataUtils.base64Encode(bbuf.array()));
-	};
-
-/*returns a byte array*/
-TextXMLCodec.prototype.decodeBinaryElement = function(/*String*/ element) {
-		if ((null == element) || (0 == element.length()))
-			return new byte[0];
-		return DataUtils.base64Decode(element.getBytes());
-	}; 
-
-	
-/*
-	Decode Data
-*/
-	
-
-/*
-	Encode Date
-*/ 
\ No newline at end of file
diff --git a/js/encoding/TextXMLDecoder.js b/js/encoding/TextXMLDecoder.js
index 6af8be3..006ce83 100644
--- a/js/encoding/TextXMLDecoder.js
+++ b/js/encoding/TextXMLDecoder.js
@@ -12,221 +12,3 @@
 	
 };
 
-
-exports.TextXMLDecoder = TextXMLDecoder;
-
-
-exports.prototype.initializeDecoding = function(){
-	try {
-		XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
-        factory.setNamespaceAware(true);
-		_reader = factory.newPullParser();
-		_reader.setInput(_istream, null);
-	} catch (XmlPullParserException e) {
-		throw new ContentDecodingException(e.getMessage(), e);
-	}		
-};
-
-exports.prototype.readStartDocument = function(){
-	try {
-		int event = _reader.getEventType();
-		_reader.next();
-		if (event != XmlPullParser.START_DOCUMENT) {
-			throw new ContentDecodingException("Expected start document, got: " + XmlPullParser.TYPES[event]);
-		}
-	} catch (XmlPullParserException e) {
-		throw new ContentDecodingException(e.getMessage(), e);
-	} catch (IOException e) {
-		throw new ContentDecodingException(e.getMessage(), e);
-	}
-};
-
-public void readEndDocument() throws ContentDecodingException {
-	int event;
-	try {
-		event = _reader.getEventType();
-	} catch (XmlPullParserException e) {
-		throw new ContentDecodingException(e.getMessage(), e);
-	}
-	if (event != XmlPullParser.END_DOCUMENT) {
-		throw new ContentDecodingException("Expected end document, got: " + XmlPullParser.TYPES[event]);
-	}
-};
-
-exports.prototype.readStartElement = function(/*String*/ startTag,
-							TreeMap<String, String> attributes) throws ContentDecodingException {
-
-	int event = readToNextTag(XmlPullParser.START_TAG);
-	if (event != XmlPullParser.START_TAG) {
-		throw new ContentDecodingException("Expected start element, got: " + XmlPullParser.TYPES[event]);
-	}
-	// Use getLocalPart to strip namespaces.
-	// Assumes we are working with a global default namespace of CCN.
-	if (!startTag.equals(_reader.getName())) {
-		// Coming back with namespace decoration doesn't match
-		throw new ContentDecodingException("Expected start element: " + startTag + " got: " + _reader.getName());
-	}	
-	if (null != attributes) {
-		// we might be expecting attributes
-		for (int i=0; i < _reader.getAttributeCount(); ++i) {
-			// may need fancier namespace handling.
-			attributes.put(_reader.getAttributeName(i), _reader.getAttributeValue(i));
-		}
-	}
-	try {
-		_reader.next();
-	} catch (XmlPullParserException e) {
-		throw new ContentDecodingException(e.getMessage());
-	} catch (IOException e) {
-		throw new ContentDecodingException(e.getMessage());
-	}
-}
-
-	public void readStartElement(long startTagLong,
-			TreeMap<String, String> attributes) throws ContentDecodingException {
-		
-		String startTag = tagToString(startTagLong);
-
-		int event = readToNextTag(XmlPullParser.START_TAG);
-		if (event != XmlPullParser.START_TAG) {
-			throw new ContentDecodingException("Expected start element, got: " + XmlPullParser.TYPES[event]);
-		}
-		// Use getLocalPart to strip namespaces.
-		// Assumes we are working with a global default namespace of CCN.
-		if (!startTag.equals(_reader.getName())) {
-			// Coming back with namespace decoration doesn't match
-			throw new ContentDecodingException("Expected start element: " + startTag + " got: " + _reader.getName());
-		}	
-		if (null != attributes) {
-			// we might be expecting attributes
-			for (int i=0; i < _reader.getAttributeCount(); ++i) {
-				// may need fancier namespace handling.
-				attributes.put(_reader.getAttributeName(i), _reader.getAttributeValue(i));
-			}
-		}
-		try {
-			_reader.next();
-		} catch (XmlPullParserException e) {
-			throw new ContentDecodingException(e.getMessage());
-		} catch (IOException e) {
-			throw new ContentDecodingException(e.getMessage());
-		}
-	}
-	public String peekStartElementAsString() throws ContentDecodingException {
-		int event = readToNextTag(XmlPullParser.START_TAG);
-		if (event != XmlPullParser.START_TAG) {
-			return null;
-		}
-		return _reader.getName();
-	}
-	
-	public Long peekStartElementAsLong() throws ContentDecodingException {
-		String strTag = peekStartElementAsString();
-		if (null == strTag) {
-			return null; // e.g. hit an end tag...
-		}
-		return stringToTag(strTag);
-	}
-	
-	/**
-	 * Helper method to decode text (UTF-8) and binary elements. Consumes the end element,
-	 * behavior which other decoders are forced to match.
-	 * @return the read data, as a String
-	 * @throws ContentDecodingException if there is a problem decoding the data
-	 */
-	public String readUString() throws ContentDecodingException {
-		StringBuffer buf = new StringBuffer();
-		try {
-			int event = _reader.getEventType();;
-			// Handles empty text element.
-			while (event == XmlPullParser.TEXT) {
-				buf.append(_reader.getText());
-				event = _reader.next();
-			}
-			if (event == XmlPullParser.START_TAG) {
-				throw new ContentDecodingException("readElementText expects start element to have been previously consumed, got: " + XmlPullParser.TYPES[event]);
-			} else if (event != XmlPullParser.END_TAG) {
-				throw new ContentDecodingException("Expected end of text element, got: " + XmlPullParser.TYPES[event]);
-			}
-			readEndElement();
-			return buf.toString();
-		} catch (XmlPullParserException e) {
-			throw new ContentDecodingException(e.getMessage(), e);
-		} catch (IOException e) {
-			throw new ContentDecodingException(e.getMessage(), e);
-		}
-	}
-
-	public void readEndElement() throws ContentDecodingException {
-		int event = readToNextTag(XmlPullParser.END_TAG);
-		if (event != XmlPullParser.END_TAG) {
-			throw new ContentDecodingException("Expected end element, got: " + XmlPullParser.TYPES[event]);
-		}
-		try {
-			_reader.next();
-		} catch (XmlPullParserException e) {
-			throw new ContentDecodingException(e.getMessage());
-		} catch (IOException e) {
-			throw new ContentDecodingException(e.getMessage());
-		}
-	}
-
-	/**
-	 * Read a BLOB. Consumes the end element, so force other versions
-	 * to match.
-	 */
-	public byte [] readBlob() throws ContentDecodingException {
-		try {
-			String strElementText = readUString();
-			// readEndElement(); // readElementText consumes end element
-			return TextXMLCodec.decodeBinaryElement(strElementText);
-		} catch (IOException e) {
-			throw new ContentDecodingException(e.getMessage(),e);
-		}
-	}
-	
-	public CCNTime readDateTime(String startTag) throws ContentDecodingException {
-		String strTimestamp = readUTF8Element(startTag);
-		CCNTime timestamp;
-		try {
-			timestamp = TextXMLCodec.parseDateTime(strTimestamp);
-		} catch (ParseException e) {
-			timestamp = null;
-		}
-		if (null == timestamp) {
-			throw new ContentDecodingException("Cannot parse timestamp: " + strTimestamp);
-		}		
-		return timestamp;
-	}
-
-	public CCNTime readDateTime(long startTag) throws ContentDecodingException {
-		String strTimestamp = readUTF8Element(startTag);
-		CCNTime timestamp;
-		try {
-			timestamp = TextXMLCodec.parseDateTime(strTimestamp);
-		} catch (ParseException e) {
-			timestamp = null;
-		}
-		if (null == timestamp) {
-			throw new ContentDecodingException("Cannot parse timestamp: " + strTimestamp);
-		}		
-		return timestamp;
-	}
-
-	private int readToNextTag(int type) throws ContentDecodingException {
-		int event;
-		try {
-			event = _reader.getEventType();
-			if (event == type)
-				return event;
-			if (event == XmlPullParser.TEXT || event == XmlPullParser.COMMENT)
-				event = _reader.next();
-		} catch (IOException e) {
-			throw new ContentDecodingException(e.getMessage(), e);
-		} catch (XmlPullParserException e) {
-			throw new ContentDecodingException(e.getMessage(), e);
-		}
-		return event;
-	}
-
-};
diff --git a/js/encoding/TextXMLEncoder.js b/js/encoding/TextXMLEncoder.js
index 495984b..2c8a828 100644
--- a/js/encoding/TextXMLEncoder.js
+++ b/js/encoding/TextXMLEncoder.js
@@ -17,93 +17,4 @@
 	this.ostream = new String();
 };
 
-exports.TextXMLEncoder = TextXMLEncoder;
 
-TextXMLEncoder.prototype.beginEncoding = function(/*OutputStream*/ ostream){
-		if (null == ostream)
-			throw new IllegalArgumentException("TextXMLEncoder: output stream cannot be null!");
-		
-		
-		/*Start by encoing the begining*/
-		//this.IStream = ostream;
-		this.ostream.write('<?xml version="1.0" encoding="UTF-8"?>');
-};
-
-TextXMLEncoder.prototype.endEncoding =function() {
-	this.IStream.end();
-}
-
-
-TextXMLEncoder.prorotype.writeStartElement(/*String*/ tag, /*TreeMap<String, String>*/ attributes) {
-		
-	
-		this.ostream.write('<'+tab);
-
-		if (null != attributes) {
-			
-			for(var i=0; i<attributes.length;i++){
-				this.ostream.write(' '+attributes[i].key +'='+attributes[i].value);
-			}
-		
-			// keySet of a TreeMap is ordered
-		}
-		this.ostream.write('>');
-};
-
-TextXMLEncoder.prototype.writeUString = function(/*String*/ utf8Content) {
-
-		this.ostream.write(utf8Content);
-
-};
-
-
-TextXMLEncoder.prototype.writeBlob =  function(/*byte []*/ binaryContent, /*int*/ offset, /*int*/ length) {
-
-		this.ostream.write(TextXMLCodec.encodeBinaryElement(binaryContent, offset, length));
-
-};
-
-TextXMLEncoder.prototype.writeElement = function(/*String*/ tag, /*byte[]*/ binaryContent,
-			/*TreeMap<String, String>*/ attributes)  {
-		
-		/*if (null == attributes) {
-		
-			attributes = new TreeMap<String,String>();
-		}*/
-		if (!attributes.containsKey(TextXMLCodec.BINARY_ATTRIBUTE)) {
-			attributes.put(TextXMLCodec.BINARY_ATTRIBUTE, TextXMLCodec.BINARY_ATTRIBUTE_VALUE);
-		}
-		super.writeElement(tag, binaryContent, attributes);
-}
-
-
-TextXMLEncoder.prototype.writeEndElement(tag) {
-
-		this.ostream.write('<'+tab+'>');
-
-	};
-
-	
-//returns number long
-stringToTag = function(/*String*/ tagName) {
-
-	if (null == tagName) {
-		return null;
-	}
-	Long tagVal = null;
-	if (null != _dictionaryStack) {
-		for (/*XMLDictionary*/ dictionary in _dictionaryStack) {
-			tagVal = dictionary.stringToTag(tagName);
-			if (null != tagVal) {
-				return tagVal;
-			}
-		}
-	}
-
-
-	if (XMLDictionaryStack.isUnknownTag(tagName)) {
-		return XMLDictionaryStack.decodeUnknownTag(tagName);
-	}
-	return null;
-};
-	
