Major update: refactored the API of all classes to make attributes start with a lower case letter and rename encode=>to_ccnb() and decode()=>from_ccnb.
(according to the API notes: http://sea.remap.ucla.edu:8080/attachments/download/23/lwndn_api-notes_21020830.txt )
diff --git a/js/testing/test-decode-FaceInstance.html b/js/testing/test-decode-FaceInstance.html
index 7818e55..196afbe 100644
--- a/js/testing/test-decode-FaceInstance.html
+++ b/js/testing/test-decode-FaceInstance.html
@@ -87,37 +87,37 @@
 			

 			var output ="";

 			

-			if(faceInstance.PublisherPublicKeyDigest!=null ){

+			if(faceInstance.publisherPublicKeyDigest!=null ){

 				output+= "PublisherPublicKeyDigest: ";

 				

-					output+=  DataUtils.toHex(faceInstance.PublisherPublicKeyDigest.PublisherPublicKeyDigest);

+					output+=  DataUtils.toHex(faceInstance.publisherPublicKeyDigest.publisherPublicKeyDigest);

 					

 					//output+= "PUBLISHER ID TYPE: ";

-					//output+=  faceInstance.PublisherPublicKeyDigest.PublisherPublicKeyDigest;

+					//output+=  faceInstance.publisherPublicKeyDigest.PublisherPublicKeyDigest;

 					

 				output+= "<br />";

 				output+= "<br />";

 

 			}

 			

-			if(faceInstance.FaceID!=null){

+			if(faceInstance.faceID!=null){

 				output+= "FaceID: ";

 				

-				output+= faceInstance.FaceID;

+				output+= faceInstance.faceID;

 				output+= "<br />";

 			}

 			

-			if(faceInstance.IPProto!=null){

+			if(faceInstance.ipProto!=null){

 				output+= "IPProto: ";

 				

-				output+= faceInstance.IPProto;

+				output+= faceInstance.ipProto;

 				output+= "<br />";

 			}

 			

-			if(faceInstance.Host!=null){

+			if(faceInstance.host!=null){

 				output+= "Host: ";

 				

-				output+= faceInstance.Host;

+				output+= faceInstance.host;

 				output+= "<br />";

 			}

 			

@@ -127,14 +127,14 @@
 				output+= faceInstance.Port;

 				output+= "<br />";

 			}

-			if(faceInstance.FreshnessSeconds!=null){

+			if(faceInstance.freshnessSeconds!=null){

 				output+= "FreshnessSeconds: ";

 				

-				output+= faceInstance.FreshnessSeconds;

+				output+= faceInstance.freshnessSeconds;

 				output+= "<br />";

 			}

 			

-			/*if(interest.name!=null && interest.name.Components!=null){

+			/*if(interest.name!=null && interest.name.components!=null){

 				output+= "NAME: ";

 				

 				for(var i=0;i<interest.Name.Components.length;i++){

diff --git a/js/testing/test-decode-Interest+Forwarding+Entry.html b/js/testing/test-decode-Interest+Forwarding+Entry.html
index 0ece80f..5e5e1c0 100644
--- a/js/testing/test-decode-Interest+Forwarding+Entry.html
+++ b/js/testing/test-decode-Interest+Forwarding+Entry.html
@@ -91,11 +91,11 @@
 			var output ="";

 			

 			

-			if(interest.name!=null && interest.name.Components!=null){

+			if(interest.name!=null && interest.name.components!=null){

 				output+= "NAME: ";

 				

-				for(var i=0;i<interest.name.Components.length;i++){

-					output+= "/"+ DataUtils.toString(interest.name.Components[i]);

+				for(var i=0;i<interest.name.components.length;i++){

+					output+= "/"+ DataUtils.toString(interest.name.components[i]);

 				}

 				output+= "<br />";

 				output+= "<br />";

@@ -168,7 +168,7 @@
 			if(interest.publisherPublicKeyDigest!=null ){

 				output+= "PUBLISHER PUBLIC KEY DIGEST: ";

 				

-				output+=  interest.publisherPublicKeyDigest.PublisherPublicKeyDigest;

+				output+=  interest.publisherPublicKeyDigest.publisherPublicKeyDigest;

                                         

 				output+= "<br />";

 				output+= "<br />";

@@ -192,10 +192,10 @@
 				output+= "<br />";

 			}

 			

-			if(interest.name.Components[3] !=null){

+			if(interest.name.components[3] !=null){

 				

 				

-				var input = DataUtils.toHex(interest.name.Components[3]) ;

+				var input = DataUtils.toHex(interest.name.components[3]) ;

 

 				var contentObject = decodeHexContentObject(input);

 				

@@ -217,11 +217,11 @@
 				////////////////////////////////////////

 				

 

-				if(co.name!=null && co.name.Components!=null){

+				if(co.name!=null && co.name.components!=null){

 					output+= "NAME: ";

 					

-					for(var i=0;i<co.name.Components.length;i++){

-						output+= "/"+ DataUtils.toString(co.name.Components[i]);

+					for(var i=0;i<co.name.components.length;i++){

+						output+= "/"+ DataUtils.toString(co.name.components[i]);

 					}

 					output+= "<br />";

 					output+= "<br />";

@@ -239,65 +239,65 @@
 					output+= "<br />";

 					output+= "<br />";

 				}

-				if(co.Signature !=null && co.Signature.Signature!=null){

+				if(co.signature !=null && co.signature.signature!=null){

 					

-					output += "SIGNATURE(hex): "+ DataUtils.toHex(co.Signature.Signature);

+					output += "SIGNATURE(hex): "+ DataUtils.toHex(co.signature.signature);

 					

 					output+= "<br />";

 					output+= "<br />";

 				}

-				if(co.SignedInfo !=null && co.SignedInfo.Publisher!=null && co.SignedInfo.Publisher.PublisherPublicKeyDigest!=null){

+				if(co.signedInfo !=null && co.signedInfo.publisher!=null && co.signedInfo.publisher.publisherPublicKeyDigest!=null){

 					

-					output += "Publisher Public Key Digest(hex): "+ DataUtils.toHex(co.SignedInfo.Publisher.PublisherPublicKeyDigest);

+					output += "Publisher Public Key Digest(hex): "+ DataUtils.toHex(co.signedInfo.publisher.publisherPublicKeyDigest);

 					

 					output+= "<br />";

 					output+= "<br />";

 				}

-				if(co.SignedInfo !=null && co.SignedInfo.Timestamp!=null){

+				if(co.signedInfo !=null && co.signedInfo.timestamp!=null){

 					var d = new Date();

-					d.setTime( co.SignedInfo.Timestamp.msec );

+					d.setTime( co.signedInfo.timestamp.msec );

 					

 					var bytes = [217, 185, 12, 225, 217, 185, 12, 225];

 					

 					output += "TimeStamp: "+d;

 					output+= "<br />";

-					output += "TimeStamp(number): "+ co.SignedInfo.Timestamp.msec;

+					output += "TimeStamp(number): "+ co.signedInfo.timestamp.msec;

 					

 					

 					output+= "<br />";

 				}

-			    if(co.SignedInfo !=null && co.SignedInfo.Type!=null){

+			    if(co.signedInfo !=null && co.signedInfo.type!=null){

 

-					output += "Type: "+co.SignedInfo.Type;

+					output += "Type: "+co.signedInfo.type;

 					output+= "<br />";

 					output+= "<br />";

 				}

-			    if(co.SignedInfo !=null && co.SignedInfo.Locator!=null){

+			    if(co.signedInfo !=null && co.signedInfo.locator!=null){

 

-					output += "Locator: "+co.SignedInfo.Locator.Type;

+					output += "Locator: "+co.signedInfo.locator.type;

 					output+= "<br />";

 					output+= "<br />";

 				}

-			    if(co.SignedInfo !=null && co.SignedInfo.FreshnessSeconds!=null){

+			    if(co.signedInfo !=null && co.signedInfo.freshnessSeconds!=null){

 

-					output += "FreshnessSeconds: "+co.SignedInfo.FreshnessSeconds;

+					output += "FreshnessSeconds: "+co.signedInfo.freshnessSeconds;

 					output+= "<br />";

 					output+= "<br />";

 				}

-			    if(co.SignedInfo !=null && co.SignedInfo.FinalBlockID!=null){

+			    if(co.signedInfo !=null && co.signedInfo.finalBlockID!=null){

 

-					output += "FinalBlockID: "+co.SignedInfo.FinalBlockID;

+					output += "FinalBlockID: "+co.signedInfo.finalBlockID;

 					output+= "<br />";

 					output+= "<br />";

 				}

 				

-				if(co.SignedInfo!=null && co.SignedInfo.Locator!=null && co.SignedInfo.Locator.PublicKey!=null){

+				if(co.signedInfo!=null && co.signedInfo.locator!=null && co.signedInfo.locator.publicKey!=null){

 					

-					var publickey = rstr2b64(DataUtils.toString(co.SignedInfo.Locator.PublicKey));

-					var publickeyHex = DataUtils.toHex(co.SignedInfo.Locator.PublicKey).toLowerCase();

-					var publickeyString = DataUtils.toString(co.SignedInfo.Locator.PublicKey);

+					var publickey = rstr2b64(DataUtils.toString(co.signedInfo.locator.publicKey));

+					var publickeyHex = DataUtils.toHex(co.signedInfo.locator.publicKey).toLowerCase();

+					var publickeyString = DataUtils.toString(co.signedInfo.locator.publicKey);

 					

-					var signature = DataUtils.toHex(co.Signature.Signature).toLowerCase();

+					var signature = DataUtils.toHex(co.signature.signature).toLowerCase();

 					

 					

 					var input = DataUtils.toString(co.rawSignatureData);

@@ -319,7 +319,7 @@
 					

 					if(LOG>2) console.log(" Signature NOW IS" );

 					

-					if(LOG>2) console.log(co.Signature.Signature);

+					if(LOG>2) console.log(co.signature.signature);

 					

 					

 					/*var x509 = new X509();

@@ -387,7 +387,7 @@
 					else

 						output += 'SIGNATURE INVALID';

 

-					//output += "VALID: "+ toHex(co.SignedInfo.Locator.PublicKey);

+					//output += "VALID: "+ toHex(co.signedInfo.locator.publicKey);

 					

 					output+= "<br />";

 					output+= "<br />";

@@ -408,40 +408,40 @@
 				

 				//var output ="";

 				

-				if(forwardingEntry.Action!=null ){

+				if(forwardingEntry.action!=null ){

 					output+= "Action: ";

 					

-					output+=  DataUtils.toHex(forwardingEntry.Action);

+					output+=  DataUtils.toHex(forwardingEntry.action);

 						

 					output+= "<br />";

 					output+= "<br />";

 				}

 				

-				if(forwardingEntry.PrefixName!=null){

+				if(forwardingEntry.prefixName!=null){

 					output+= "PrefixName: ";

 					

-					output+= forwardingEntry.PrefixName.getName();

+					output+= forwardingEntry.prefixName.getName();

 					output+= "<br />";

 				}

 				

-				if(forwardingEntry.CCNID!=null){

-					output+= "CCNID: ";

+				if(forwardingEntry.ccndID!=null){

+					output+= "ccndID: ";

 					

-					output+= forwardingEntry.CCNID;

+					output+= forwardingEntry.ccndID;

 					output+= "<br />";

 				}

 				

-				if(forwardingEntry.Flags!=null){

+				if(forwardingEntry.flags!=null){

 					output+= "Flags: ";

 					

-					output+= forwardingEntry.Flags;

+					output+= forwardingEntry.flags;

 					output+= "<br />";

 				}

 				

-				if(forwardingEntry.Lifetime!=null){

+				if(forwardingEntry.lifetime!=null){

 					output+= "Lifetime: ";

 					

-					output+= forwardingEntry.Lifetime;

+					output+= forwardingEntry.lifetime;

 					output+= "<br />";

 				}

 

diff --git a/js/testing/test-encode-decode-ContentObject-bis.html b/js/testing/test-encode-decode-ContentObject-bis.html
index f66cae5..6e8dad9 100644
--- a/js/testing/test-encode-decode-ContentObject-bis.html
+++ b/js/testing/test-encode-decode-ContentObject-bis.html
@@ -116,11 +116,11 @@
 			else if (co==-2)

 				output+= "CONTENT NAME IS EMPTY"

 			else{

-				if(co.name!=null && co.name.Components!=null){

+				if(co.name!=null && co.name.components!=null){

 					output+= "NAME: ";

 					

-					for(var i=0;i<co.name.Components.length;i++){

-						output+= "/"+ toString(co.name.Components[i]);

+					for(var i=0;i<co.name.components.length;i++){

+						output+= "/"+ toString(co.name.components[i]);

 					}

 					output+= "<br />";

 					output+= "<br />";

@@ -138,34 +138,34 @@
 					output+= "<br />";

 					output+= "<br />";

 				}

-				if(co.Signature !=null && co.Signature.Signature!=null){

+				if(co.signature !=null && co.signature.signature!=null){

 					

-					output += "SIGNATURE(hex): "+ toHex(co.Signature.Signature);

+					output += "SIGNATURE(hex): "+ toHex(co.signature.signature);

 					

 					output+= "<br />";

 					output+= "<br />";

 				}

-				if(co.SignedInfo !=null && co.SignedInfo.Publisher!=null && co.SignedInfo.Publisher.PublisherPublicKeyDigest!=null){

+				if(co.signedInfo !=null && co.signedInfo.publisher!=null && co.signedInfo.publisher.publisherPublicKeyDigest!=null){

 					

-					output += "Publisher Public Key Digest(hex): "+ toHex(co.SignedInfo.Publisher.PublisherPublicKeyDigest);

+					output += "Publisher Public Key Digest(hex): "+ toHex(co.signedInfo.publisher.publisherPublicKeyDigest);

 					

 					output+= "<br />";

 					output+= "<br />";

 				}

-				if(co.SignedInfo !=null && co.SignedInfo.Timestamp!=null){

+				if(co.signedInfo !=null && co.signedInfo.timestamp!=null){

 					

-					output += "TimeStamp(hex): "+ co.SignedInfo.Timestamp.date;

+					output += "TimeStamp(hex): "+ co.signedInfo.timestamp.date;

 					

 					output+= "<br />";

 					output+= "<br />";

 				}

-				if(co.SignedInfo!=null && co.SignedInfo.Locator!=null && co.SignedInfo.Locator.PublicKey!=null){

+				if(co.signedInfo!=null && co.signedInfo.locator!=null && co.signedInfo.locator.publicKey!=null){

 					

-					var publickey = rstr2b64(toString(co.SignedInfo.Locator.PublicKey));

-					var publickeyHex = toHex(co.SignedInfo.Locator.PublicKey).toLowerCase();

-					var publickeyString = toString(co.SignedInfo.Locator.PublicKey);

+					var publickey = rstr2b64(toString(co.signedInfo.locator.publicKey));

+					var publickeyHex = toHex(co.signedInfo.locator.publicKey).toLowerCase();

+					var publickeyString = toString(co.signedInfo.locator.publicKey);

 					

-					var signature = toHex(co.Signature.Signature).toLowerCase();

+					var signature = toHex(co.signature.signature).toLowerCase();

 					

 					

 					var input = toString(co.rawSignatureData);

@@ -185,7 +185,7 @@
 					

 					if(LOG>2) console.log(" Signature "+signature );

 					if(LOG>2) console.log(" Signature NOW IS" );

-					if(LOG>2) console.log(co.Signature.Signature);

+					if(LOG>2) console.log(co.signature.signature);

 					

 					

 					var x509 = new X509();

@@ -231,7 +231,7 @@
 						

 					

 					

-					//output += "VALID: "+ toHex(co.SignedInfo.Locator.PublicKey);

+					//output += "VALID: "+ toHex(co.signedInfo.locator.publicKey);

 					

 					output+= "<br />";

 					output+= "<br />";

diff --git a/js/testing/test-encode-decode-Interest.html b/js/testing/test-encode-decode-Interest.html
index dd3e3b4..d957176 100644
--- a/js/testing/test-encode-decode-Interest.html
+++ b/js/testing/test-encode-decode-Interest.html
@@ -100,13 +100,13 @@
 			

 			var output ="";

 			

-			if(interest.name!=null && interest.name.Components!=null){

+			if(interest.name!=null && interest.name.components!=null){

 				output+= "NAME: ";

 				

 				

 				output+= interest.name.getName();

 				

-				/*for(var i=0;i<interest.name.Components.length;i++){

+				/*for(var i=0;i<interest.name.components.length;i++){

 					output+= "/"+ DataUtils.toString(interest.name.Components[i]);

 				}*/

 				

@@ -127,10 +127,10 @@
 			if(interest.publisherID!=null ){

 				output+= "PUBLISHER ID: ";

 				

-					output+=  interest.publisherID.PublisherID;

+					output+=  interest.publisherID.publisherID;

 					

 					output+= "PUBLISHER ID TYPE: ";

-					output+=  interest.publisherID.PublisherType;

+					output+=  interest.publisherID.publisherType;

 				output+= "<br />";

 				output+= "<br />";

 			}