In NdnProtocolInfo.jsm, put all functions in the NdnProtocolInfo class instead of being global.
diff --git a/js/ndnProtocol/modules/NdnProtocolInfo.jsm b/js/ndnProtocol/modules/NdnProtocolInfo.jsm
index bf8bf55..3a5fc79 100644
--- a/js/ndnProtocol/modules/NdnProtocolInfo.jsm
+++ b/js/ndnProtocol/modules/NdnProtocolInfo.jsm
@@ -3,7 +3,7 @@
  * See COPYING for copyright and distribution information.
  */
 
-var EXPORTED_SYMBOLS = ["addNdnHubChangedListener", "setConnectedNdnHub", "splitUri"];
+var EXPORTED_SYMBOLS = ["NdnProtocolInfo"];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
@@ -11,20 +11,23 @@
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-var ndnHubHost = null;
-var ndnHubPort = null;
-var ndnHubChangedListenerList = [];
+var NdnProtocolInfo = function NdnProtocolInfo(){
+};
+
+NdnProtocolInfo.ndnHubHost = null;
+NdnProtocolInfo.ndnHubPort = null;
+NdnProtocolInfo.ndnHubChangedListenerList = [];
 
 /*
  * When the NDN hub host or port is changed, the system calls listener(host, port).
  * If the current host and port are not null, call listener with the values to initialize.
  */
-function addNdnHubChangedListener(listener) {
-    ndnHubChangedListenerList.push(listener);
+NdnProtocolInfo.addNdnHubChangedListener = function(listener) {
+    NdnProtocolInfo.ndnHubChangedListenerList.push(listener);
     
-    if (ndnHubHost != null && ndnHubPort != null) {
+    if (NdnProtocolInfo.ndnHubHost != null && NdnProtocolInfo.ndnHubPort != null) {
         try {
-            listener(ndnHubHost, ndnHubPort);
+            listener(NdnProtocolInfo.ndnHubHost, NdnProtocolInfo.ndnHubPort);
         }
         catch (ex) {
             // Ignore error from the listener.
@@ -36,16 +39,16 @@
  * If host and port are different than ndnHubHost or ndnHubPort, set them and call each
  * listener in ndnHubChangedListenerList.
  */
-function setConnectedNdnHub(host, port) {
-    if (host == ndnHubHost && port == ndnHubPort)
+NdnProtocolInfo.setConnectedNdnHub = function(host, port) {
+    if (host == NdnProtocolInfo.ndnHubHost && port == NdnProtocolInfo.ndnHubPort)
         // No change.
         return;
     
-    ndnHubHost = host;
-    ndnHubPort = port;
-    for (var i = 0; i < ndnHubChangedListenerList.length; ++i) {
+    NdnProtocolInfo.ndnHubHost = host;
+    NdnProtocolInfo.ndnHubPort = port;
+    for (var i = 0; i < NdnProtocolInfo.ndnHubChangedListenerList.length; ++i) {
         try {
-            ndnHubChangedListenerList[i](host, port);
+            NdnProtocolInfo.ndnHubChangedListenerList[i](host, port);
         }
         catch (ex) {
             // Ignore error from the listener.
@@ -59,7 +62,7 @@
  * All result strings are trimmed.  This does not unescape the name.
  * The name may include a host and port.  
  */
-function splitUri(spec) {
+NdnProtocolInfo.splitUri = function(spec) {
     spec = spec.trim();
     var result = {};
     var preHash = spec.split('#', 1)[0];
@@ -79,4 +82,4 @@
     }
     
     return result;
-}
\ No newline at end of file
+}