diff --git a/base_node.py b/base_node.py
index 387fce5..ec4b469 100644
--- a/base_node.py
+++ b/base_node.py
@@ -36,11 +36,11 @@
 except ImportError:
     import trollius as asyncio
 
-Command = namedtuple('Command', ['suffix', 'function', 'keywords', 'isSigned'])
+#Command = namedtuple('Command', ['suffix', 'function', 'keywords', 'isSigned'])
 
 class BaseNode(object):
     """
-    This class contains methods/attributes common to both node and controller.
+    This class contains methods/attributes common to both end device and controller.
     
     """
     def __init__(self,configFileName):
@@ -77,8 +77,8 @@
             prefix = ''
             for i in range(prefixLen):
                 prefix += (chr(random.randint(0,0xff)))
-            suffix = self.getDeviceSerial().lstrip('0')
-            self._instanceSerial = '-'.join([prefix.encode('hex'), suffix])
+        
+            self._instanceSerial = prefix.encode('hex')
         return self._instanceSerial
 
 ##
@@ -87,7 +87,7 @@
     def _prepareLogging(self):
         self.log = logging.getLogger(str(self.__class__))
         self.log.setLevel(logging.DEBUG)
-        logFormat = "%(asctime)-15s %(name)-20s %(funcName)-20s (%(levelname)-8s):\n\t%(message)s"
+        logFormat = "%(asctime)-15s %(name)-20s %(funcName)-2s (%(levelname)-2s):\t%(message)s"
         self._console = logging.StreamHandler()
         self._console.setFormatter(logging.Formatter(logFormat))
         self._console.setLevel(logging.INFO)
@@ -121,14 +121,25 @@
     def getKeyChain(self):
         return self._keyChain
 
-    #def getDefaultCertificateName(self):
-    #    try:
-    #        certName = self._identityStorage.getDefaultCertificateNameForIdentity( 
-    #            self._identityManager.getDefaultIdentity())
-    #    except SecurityException:
-    #        certName = self._keyChain.getDefaultCertificateName()
-#
- #       return certName
+    def getDefaultIdentity(self):
+        try:
+            defaultIdentity = self._identityManager.getDefaultIdentity()
+        except SecurityException:
+            defaultIdentity = ""
+
+        return defaultIdentity
+
+
+    def getDefaultCertificateName(self):
+        #exception - no certficate, return ''
+
+        try:
+            certName = self._identityStorage.getDefaultCertificateNameForIdentity( 
+            self._identityManager.getDefaultIdentity())
+        except SecurityException:
+            certName = ""
+
+        return certName
 
     def start(self):
         """
@@ -138,13 +149,16 @@
         self.log.info("Starting up")
         self.loop = asyncio.get_event_loop()
         self.face = ThreadsafeFace(self.loop, '')
-        self.face.setCommandSigningInfo(self._keyChain, self.getDefaultCertificateName())
+       
         self._keyChain.setFace(self.face)
 
         self._isStopped = False
         self.face.stopWhen(lambda:self._isStopped)
-        self.beforeLoopStart()
         
+        self.beforeLoopStart()
+
+        self.face.setCommandSigningInfo(self._keyChain, self.getDefaultCertificateName())
+
         try:
             self.loop.run_forever()
         except KeyboardInterrupt:
diff --git a/commands/__init__.py b/commands/__init__.py
deleted file mode 100644
index 3bfc022..0000000
--- a/commands/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-__all__ = ['cert_request_pb2', 'configure_device_pb2', 'send_pairing_info_pb2', 'update_capabilities_pb2']
-
-from cert_request_pb2 import CertificateRequestMessage
-from update_capabilities_pb2 import UpdateCapabilitiesCommandMessage
-from configure_device_pb2 import DeviceConfigurationMessage
-from send_pairing_info_pb2 import DevicePairingInfoMessage
diff --git a/commands/cert-request.proto b/commands/cert-request.proto
deleted file mode 100644
index 6c81dd6..0000000
--- a/commands/cert-request.proto
+++ /dev/null
@@ -1,11 +0,0 @@
-message CertificateRequestMessage {
-	message Name {
-		repeated bytes components = 8;
-	}
-	message CertificateRequest {
-		required Name keyName = 220;
-        required uint32 keyType = 221;
-        required bytes keyBits = 222;
-	}
-	required CertificateRequest command = 223;
-}
diff --git a/commands/cert_request_pb2.py b/commands/cert_request_pb2.py
deleted file mode 100644
index 0bb096d..0000000
--- a/commands/cert_request_pb2.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-
-from google.protobuf import descriptor
-from google.protobuf import message
-from google.protobuf import reflection
-from google.protobuf import descriptor_pb2
-# @@protoc_insertion_point(imports)
-
-
-
-DESCRIPTOR = descriptor.FileDescriptor(
-  name='cert-request.proto',
-  package='',
-  serialized_pb='\n\x12\x63\x65rt-request.proto\"\xe5\x01\n\x19\x43\x65rtificateRequestMessage\x12?\n\x07\x63ommand\x18\xdf\x01 \x02(\x0b\x32-.CertificateRequestMessage.CertificateRequest\x1a\x1a\n\x04Name\x12\x12\n\ncomponents\x18\x08 \x03(\x0c\x1ak\n\x12\x43\x65rtificateRequest\x12\x31\n\x07keyName\x18\xdc\x01 \x02(\x0b\x32\x1f.CertificateRequestMessage.Name\x12\x10\n\x07keyType\x18\xdd\x01 \x02(\r\x12\x10\n\x07keyBits\x18\xde\x01 \x02(\x0c')
-
-
-
-
-_CERTIFICATEREQUESTMESSAGE_NAME = descriptor.Descriptor(
-  name='Name',
-  full_name='CertificateRequestMessage.Name',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='components', full_name='CertificateRequestMessage.Name.components', index=0,
-      number=8, type=12, cpp_type=9, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=117,
-  serialized_end=143,
-)
-
-_CERTIFICATEREQUESTMESSAGE_CERTIFICATEREQUEST = descriptor.Descriptor(
-  name='CertificateRequest',
-  full_name='CertificateRequestMessage.CertificateRequest',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='keyName', full_name='CertificateRequestMessage.CertificateRequest.keyName', index=0,
-      number=220, type=11, cpp_type=10, label=2,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='keyType', full_name='CertificateRequestMessage.CertificateRequest.keyType', index=1,
-      number=221, type=13, cpp_type=3, label=2,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='keyBits', full_name='CertificateRequestMessage.CertificateRequest.keyBits', index=2,
-      number=222, type=12, cpp_type=9, label=2,
-      has_default_value=False, default_value="",
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=145,
-  serialized_end=252,
-)
-
-_CERTIFICATEREQUESTMESSAGE = descriptor.Descriptor(
-  name='CertificateRequestMessage',
-  full_name='CertificateRequestMessage',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='command', full_name='CertificateRequestMessage.command', index=0,
-      number=223, type=11, cpp_type=10, label=2,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[_CERTIFICATEREQUESTMESSAGE_NAME, _CERTIFICATEREQUESTMESSAGE_CERTIFICATEREQUEST, ],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=23,
-  serialized_end=252,
-)
-
-_CERTIFICATEREQUESTMESSAGE_NAME.containing_type = _CERTIFICATEREQUESTMESSAGE;
-_CERTIFICATEREQUESTMESSAGE_CERTIFICATEREQUEST.fields_by_name['keyName'].message_type = _CERTIFICATEREQUESTMESSAGE_NAME
-_CERTIFICATEREQUESTMESSAGE_CERTIFICATEREQUEST.containing_type = _CERTIFICATEREQUESTMESSAGE;
-_CERTIFICATEREQUESTMESSAGE.fields_by_name['command'].message_type = _CERTIFICATEREQUESTMESSAGE_CERTIFICATEREQUEST
-DESCRIPTOR.message_types_by_name['CertificateRequestMessage'] = _CERTIFICATEREQUESTMESSAGE
-
-class CertificateRequestMessage(message.Message):
-  __metaclass__ = reflection.GeneratedProtocolMessageType
-  
-  class Name(message.Message):
-    __metaclass__ = reflection.GeneratedProtocolMessageType
-    DESCRIPTOR = _CERTIFICATEREQUESTMESSAGE_NAME
-    
-    # @@protoc_insertion_point(class_scope:CertificateRequestMessage.Name)
-  
-  class CertificateRequest(message.Message):
-    __metaclass__ = reflection.GeneratedProtocolMessageType
-    DESCRIPTOR = _CERTIFICATEREQUESTMESSAGE_CERTIFICATEREQUEST
-    
-    # @@protoc_insertion_point(class_scope:CertificateRequestMessage.CertificateRequest)
-  DESCRIPTOR = _CERTIFICATEREQUESTMESSAGE
-  
-  # @@protoc_insertion_point(class_scope:CertificateRequestMessage)
-
-# @@protoc_insertion_point(module_scope)
diff --git a/commands/configure-device.proto b/commands/configure-device.proto
deleted file mode 100644
index 1bd38e1..0000000
--- a/commands/configure-device.proto
+++ /dev/null
@@ -1,11 +0,0 @@
-message DeviceConfigurationMessage {
-	message Name {
-		repeated bytes components = 8;
-	}
-    message DeviceConfiguration {
-        required Name networkPrefix = 224;
-        required Name controllerName = 225;
-        required Name deviceSuffix = 226;
-    }
-	required DeviceConfiguration configuration = 227;
-}
diff --git a/commands/configure_device_pb2.py b/commands/configure_device_pb2.py
deleted file mode 100644
index 6a48eec..0000000
--- a/commands/configure_device_pb2.py
+++ /dev/null
@@ -1,140 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-
-from google.protobuf import descriptor
-from google.protobuf import message
-from google.protobuf import reflection
-from google.protobuf import descriptor_pb2
-# @@protoc_insertion_point(imports)
-
-
-
-DESCRIPTOR = descriptor.FileDescriptor(
-  name='configure-device.proto',
-  package='',
-  serialized_pb='\n\x16\x63onfigure-device.proto\"\xc7\x02\n\x1a\x44\x65viceConfigurationMessage\x12G\n\rconfiguration\x18\xe3\x01 \x02(\x0b\x32/.DeviceConfigurationMessage.DeviceConfiguration\x1a\x1a\n\x04Name\x12\x12\n\ncomponents\x18\x08 \x03(\x0c\x1a\xc3\x01\n\x13\x44\x65viceConfiguration\x12\x38\n\rnetworkPrefix\x18\xe0\x01 \x02(\x0b\x32 .DeviceConfigurationMessage.Name\x12\x39\n\x0e\x63ontrollerName\x18\xe1\x01 \x02(\x0b\x32 .DeviceConfigurationMessage.Name\x12\x37\n\x0c\x64\x65viceSuffix\x18\xe2\x01 \x02(\x0b\x32 .DeviceConfigurationMessage.Name')
-
-
-
-
-_DEVICECONFIGURATIONMESSAGE_NAME = descriptor.Descriptor(
-  name='Name',
-  full_name='DeviceConfigurationMessage.Name',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='components', full_name='DeviceConfigurationMessage.Name.components', index=0,
-      number=8, type=12, cpp_type=9, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=130,
-  serialized_end=156,
-)
-
-_DEVICECONFIGURATIONMESSAGE_DEVICECONFIGURATION = descriptor.Descriptor(
-  name='DeviceConfiguration',
-  full_name='DeviceConfigurationMessage.DeviceConfiguration',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='networkPrefix', full_name='DeviceConfigurationMessage.DeviceConfiguration.networkPrefix', index=0,
-      number=224, type=11, cpp_type=10, label=2,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='controllerName', full_name='DeviceConfigurationMessage.DeviceConfiguration.controllerName', index=1,
-      number=225, type=11, cpp_type=10, label=2,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='deviceSuffix', full_name='DeviceConfigurationMessage.DeviceConfiguration.deviceSuffix', index=2,
-      number=226, type=11, cpp_type=10, label=2,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=159,
-  serialized_end=354,
-)
-
-_DEVICECONFIGURATIONMESSAGE = descriptor.Descriptor(
-  name='DeviceConfigurationMessage',
-  full_name='DeviceConfigurationMessage',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='configuration', full_name='DeviceConfigurationMessage.configuration', index=0,
-      number=227, type=11, cpp_type=10, label=2,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[_DEVICECONFIGURATIONMESSAGE_NAME, _DEVICECONFIGURATIONMESSAGE_DEVICECONFIGURATION, ],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=27,
-  serialized_end=354,
-)
-
-_DEVICECONFIGURATIONMESSAGE_NAME.containing_type = _DEVICECONFIGURATIONMESSAGE;
-_DEVICECONFIGURATIONMESSAGE_DEVICECONFIGURATION.fields_by_name['networkPrefix'].message_type = _DEVICECONFIGURATIONMESSAGE_NAME
-_DEVICECONFIGURATIONMESSAGE_DEVICECONFIGURATION.fields_by_name['controllerName'].message_type = _DEVICECONFIGURATIONMESSAGE_NAME
-_DEVICECONFIGURATIONMESSAGE_DEVICECONFIGURATION.fields_by_name['deviceSuffix'].message_type = _DEVICECONFIGURATIONMESSAGE_NAME
-_DEVICECONFIGURATIONMESSAGE_DEVICECONFIGURATION.containing_type = _DEVICECONFIGURATIONMESSAGE;
-_DEVICECONFIGURATIONMESSAGE.fields_by_name['configuration'].message_type = _DEVICECONFIGURATIONMESSAGE_DEVICECONFIGURATION
-DESCRIPTOR.message_types_by_name['DeviceConfigurationMessage'] = _DEVICECONFIGURATIONMESSAGE
-
-class DeviceConfigurationMessage(message.Message):
-  __metaclass__ = reflection.GeneratedProtocolMessageType
-  
-  class Name(message.Message):
-    __metaclass__ = reflection.GeneratedProtocolMessageType
-    DESCRIPTOR = _DEVICECONFIGURATIONMESSAGE_NAME
-    
-    # @@protoc_insertion_point(class_scope:DeviceConfigurationMessage.Name)
-  
-  class DeviceConfiguration(message.Message):
-    __metaclass__ = reflection.GeneratedProtocolMessageType
-    DESCRIPTOR = _DEVICECONFIGURATIONMESSAGE_DEVICECONFIGURATION
-    
-    # @@protoc_insertion_point(class_scope:DeviceConfigurationMessage.DeviceConfiguration)
-  DESCRIPTOR = _DEVICECONFIGURATIONMESSAGE
-  
-  # @@protoc_insertion_point(class_scope:DeviceConfigurationMessage)
-
-# @@protoc_insertion_point(module_scope)
diff --git a/commands/send-pairing-info.proto b/commands/send-pairing-info.proto
deleted file mode 100644
index 02649bb..0000000
--- a/commands/send-pairing-info.proto
+++ /dev/null
@@ -1,8 +0,0 @@
-message DevicePairingInfoMessage {
- message DevicePairingInfo {
-    required string deviceSerial = 236;
-    required bytes devicePin = 237;
-    required string deviceSuffix = 238;
-}
- required DevicePairingInfo info = 239;
-}
diff --git a/commands/send_pairing_info_pb2.py b/commands/send_pairing_info_pb2.py
deleted file mode 100644
index aeb0027..0000000
--- a/commands/send_pairing_info_pb2.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-
-from google.protobuf import descriptor
-from google.protobuf import message
-from google.protobuf import reflection
-from google.protobuf import descriptor_pb2
-# @@protoc_insertion_point(imports)
-
-
-
-DESCRIPTOR = descriptor.FileDescriptor(
-  name='send-pairing-info.proto',
-  package='',
-  serialized_pb='\n\x17send-pairing-info.proto\"\xad\x01\n\x18\x44\x65vicePairingInfoMessage\x12:\n\x04info\x18\xee\x01 \x02(\x0b\x32+.DevicePairingInfoMessage.DevicePairingInfo\x1aU\n\x11\x44\x65vicePairingInfo\x12\x15\n\x0c\x64\x65viceSerial\x18\xeb\x01 \x02(\t\x12\x12\n\tdevicePin\x18\xec\x01 \x02(\x0c\x12\x15\n\x0c\x64\x65viceSuffix\x18\xed\x01 \x02(\t')
-
-
-
-
-_DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO = descriptor.Descriptor(
-  name='DevicePairingInfo',
-  full_name='DevicePairingInfoMessage.DevicePairingInfo',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='deviceSerial', full_name='DevicePairingInfoMessage.DevicePairingInfo.deviceSerial', index=0,
-      number=235, type=9, cpp_type=9, label=2,
-      has_default_value=False, default_value=unicode("", "utf-8"),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='devicePin', full_name='DevicePairingInfoMessage.DevicePairingInfo.devicePin', index=1,
-      number=236, type=12, cpp_type=9, label=2,
-      has_default_value=False, default_value="",
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='deviceSuffix', full_name='DevicePairingInfoMessage.DevicePairingInfo.deviceSuffix', index=2,
-      number=237, type=9, cpp_type=9, label=2,
-      has_default_value=False, default_value=unicode("", "utf-8"),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=116,
-  serialized_end=201,
-)
-
-_DEVICEPAIRINGINFOMESSAGE = descriptor.Descriptor(
-  name='DevicePairingInfoMessage',
-  full_name='DevicePairingInfoMessage',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='info', full_name='DevicePairingInfoMessage.info', index=0,
-      number=238, type=11, cpp_type=10, label=2,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[_DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO, ],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=28,
-  serialized_end=201,
-)
-
-_DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO.containing_type = _DEVICEPAIRINGINFOMESSAGE;
-_DEVICEPAIRINGINFOMESSAGE.fields_by_name['info'].message_type = _DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO
-DESCRIPTOR.message_types_by_name['DevicePairingInfoMessage'] = _DEVICEPAIRINGINFOMESSAGE
-
-class DevicePairingInfoMessage(message.Message):
-  __metaclass__ = reflection.GeneratedProtocolMessageType
-  
-  class DevicePairingInfo(message.Message):
-    __metaclass__ = reflection.GeneratedProtocolMessageType
-    DESCRIPTOR = _DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO
-    
-    # @@protoc_insertion_point(class_scope:DevicePairingInfoMessage.DevicePairingInfo)
-  DESCRIPTOR = _DEVICEPAIRINGINFOMESSAGE
-  
-  # @@protoc_insertion_point(class_scope:DevicePairingInfoMessage)
-
-# @@protoc_insertion_point(module_scope)
diff --git a/commands/update-capabilities.proto b/commands/update-capabilities.proto
deleted file mode 100644
index f636564..0000000
--- a/commands/update-capabilities.proto
+++ /dev/null
@@ -1,21 +0,0 @@
-message UpdateCapabilitiesCommandMessage {
-	message Name {
-		repeated bytes components = 8;
-	}
-
-	message CapabilitiesParameter {
-		required string parameterType = 228; // should be a protobuf type
-		optional string parameterDesc = 229; // what is this parameter for? (recommended)
-	}
-
-	message Capability {
-		required Name commandPrefix = 230; // the name (after device prefix) of command 
-		repeated string keywords = 231; // other devices can search for one or more keywords
-						// e.g. 'cec', 'motion', 'thermostat'
-		repeated CapabilitiesParameter parameterDesc = 232; // list of parameter descriptions
-        optional bool needsSignature=233;
-        required String deviceSerial=234;
-	}
-
-    repeated Capability capabilities = 235;
-}
diff --git a/commands/update_capabilities_pb2.py b/commands/update_capabilities_pb2.py
deleted file mode 100644
index 94dc63d..0000000
--- a/commands/update_capabilities_pb2.py
+++ /dev/null
@@ -1,187 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-
-from google.protobuf import descriptor
-from google.protobuf import message
-from google.protobuf import reflection
-from google.protobuf import descriptor_pb2
-# @@protoc_insertion_point(imports)
-
-
-
-DESCRIPTOR = descriptor.FileDescriptor(
-  name='update-capabilities.proto',
-  package='',
-  serialized_pb='\n\x19update-capabilities.proto\"\x98\x03\n UpdateCapabilitiesCommandMessage\x12\x43\n\x0c\x63\x61pabilities\x18\xea\x01 \x03(\x0b\x32,.UpdateCapabilitiesCommandMessage.Capability\x1a\x1a\n\x04Name\x12\x12\n\ncomponents\x18\x08 \x03(\x0c\x1aG\n\x15\x43\x61pabilitiesParameter\x12\x16\n\rparameterType\x18\xe4\x01 \x02(\t\x12\x16\n\rparameterDesc\x18\xe5\x01 \x01(\t\x1a\xc9\x01\n\nCapability\x12>\n\rcommandPrefix\x18\xe6\x01 \x02(\x0b\x32&.UpdateCapabilitiesCommandMessage.Name\x12\x11\n\x08keywords\x18\xe7\x01 \x03(\t\x12O\n\rparameterDesc\x18\xe8\x01 \x03(\x0b\x32\x37.UpdateCapabilitiesCommandMessage.CapabilitiesParameter\x12\x17\n\x0eneedsSignature\x18\xe9\x01 \x01(\x08')
-
-
-
-
-_UPDATECAPABILITIESCOMMANDMESSAGE_NAME = descriptor.Descriptor(
-  name='Name',
-  full_name='UpdateCapabilitiesCommandMessage.Name',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='components', full_name='UpdateCapabilitiesCommandMessage.Name.components', index=0,
-      number=8, type=12, cpp_type=9, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=135,
-  serialized_end=161,
-)
-
-_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER = descriptor.Descriptor(
-  name='CapabilitiesParameter',
-  full_name='UpdateCapabilitiesCommandMessage.CapabilitiesParameter',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='parameterType', full_name='UpdateCapabilitiesCommandMessage.CapabilitiesParameter.parameterType', index=0,
-      number=228, type=9, cpp_type=9, label=2,
-      has_default_value=False, default_value=unicode("", "utf-8"),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='parameterDesc', full_name='UpdateCapabilitiesCommandMessage.CapabilitiesParameter.parameterDesc', index=1,
-      number=229, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=unicode("", "utf-8"),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=163,
-  serialized_end=234,
-)
-
-_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY = descriptor.Descriptor(
-  name='Capability',
-  full_name='UpdateCapabilitiesCommandMessage.Capability',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='commandPrefix', full_name='UpdateCapabilitiesCommandMessage.Capability.commandPrefix', index=0,
-      number=230, type=11, cpp_type=10, label=2,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='keywords', full_name='UpdateCapabilitiesCommandMessage.Capability.keywords', index=1,
-      number=231, type=9, cpp_type=9, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='parameterDesc', full_name='UpdateCapabilitiesCommandMessage.Capability.parameterDesc', index=2,
-      number=232, type=11, cpp_type=10, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-    descriptor.FieldDescriptor(
-      name='needsSignature', full_name='UpdateCapabilitiesCommandMessage.Capability.needsSignature', index=3,
-      number=233, type=8, cpp_type=7, label=1,
-      has_default_value=False, default_value=False,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=237,
-  serialized_end=438,
-)
-
-_UPDATECAPABILITIESCOMMANDMESSAGE = descriptor.Descriptor(
-  name='UpdateCapabilitiesCommandMessage',
-  full_name='UpdateCapabilitiesCommandMessage',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    descriptor.FieldDescriptor(
-      name='capabilities', full_name='UpdateCapabilitiesCommandMessage.capabilities', index=0,
-      number=234, type=11, cpp_type=10, label=3,
-      has_default_value=False, default_value=[],
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      options=None),
-  ],
-  extensions=[
-  ],
-  nested_types=[_UPDATECAPABILITIESCOMMANDMESSAGE_NAME, _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER, _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY, ],
-  enum_types=[
-  ],
-  options=None,
-  is_extendable=False,
-  extension_ranges=[],
-  serialized_start=30,
-  serialized_end=438,
-)
-
-_UPDATECAPABILITIESCOMMANDMESSAGE_NAME.containing_type = _UPDATECAPABILITIESCOMMANDMESSAGE;
-_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER.containing_type = _UPDATECAPABILITIESCOMMANDMESSAGE;
-_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY.fields_by_name['commandPrefix'].message_type = _UPDATECAPABILITIESCOMMANDMESSAGE_NAME
-_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY.fields_by_name['parameterDesc'].message_type = _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER
-_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY.containing_type = _UPDATECAPABILITIESCOMMANDMESSAGE;
-_UPDATECAPABILITIESCOMMANDMESSAGE.fields_by_name['capabilities'].message_type = _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY
-DESCRIPTOR.message_types_by_name['UpdateCapabilitiesCommandMessage'] = _UPDATECAPABILITIESCOMMANDMESSAGE
-
-class UpdateCapabilitiesCommandMessage(message.Message):
-  __metaclass__ = reflection.GeneratedProtocolMessageType
-  
-  class Name(message.Message):
-    __metaclass__ = reflection.GeneratedProtocolMessageType
-    DESCRIPTOR = _UPDATECAPABILITIESCOMMANDMESSAGE_NAME
-    
-    # @@protoc_insertion_point(class_scope:UpdateCapabilitiesCommandMessage.Name)
-  
-  class CapabilitiesParameter(message.Message):
-    __metaclass__ = reflection.GeneratedProtocolMessageType
-    DESCRIPTOR = _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER
-    
-    # @@protoc_insertion_point(class_scope:UpdateCapabilitiesCommandMessage.CapabilitiesParameter)
-  
-  class Capability(message.Message):
-    __metaclass__ = reflection.GeneratedProtocolMessageType
-    DESCRIPTOR = _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY
-    
-    # @@protoc_insertion_point(class_scope:UpdateCapabilitiesCommandMessage.Capability)
-  DESCRIPTOR = _UPDATECAPABILITIESCOMMANDMESSAGE
-  
-  # @@protoc_insertion_point(class_scope:UpdateCapabilitiesCommandMessage)
-
-# @@protoc_insertion_point(module_scope)
diff --git a/controller.py b/controller.py
index 8db4242..64d4119 100644
--- a/controller.py
+++ b/controller.py
@@ -40,37 +40,38 @@
     def __init__(self,configFileName):
         super(Controller, self).__init__(configFileName=configFileName)
         self._responseCount = 0
-	self._symmetricKey = "symmetricKeyForBootstrapping"
-	self._prefix = "/home/controller/id999"
+        self._symmetricKey = "symmetricKeyForBootstrapping"
+        self._prefix = "/home"
+        self._identity = "/home/controller/id999"
 
     def onInterest(self, prefix, interest, transport, registeredPrefixId):
         self._responseCount += 1
 
-	interestName = interest.getName()
+        interestName = interest.getName()
 
-	#for bootstrap interest
-	if(interestName.toUri().startswith(self._bootstrapPrefix) and interest.getKeyLocator().getKeyData().toRawStr() == self._symmetricKey):
-  	    dump("Reveived bootstrap interest")
+        #for bootstrap interest
+        if(interestName.toUri().startswith(self._bootstrapPrefix) and interest.getKeyLocator().getKeyData().toRawStr() == self._symmetricKey):
+            dump("Reveived bootstrap interest")
 	    self.onBootstrapInterest(prefix, interest, transport, registeredPrefixId)   
         
-    	elif ("KEY" in interestName.toUri() and "ID-CERT" in interestName.toUri()):
-	    dump("Reveived certificate request interest")
-	    self.onCertificateRequest(prefix, interest, transport, registeredPrefixId)
+        elif ("KEY" in interestName.toUri() and "ID-CERT" in interestName.toUri()):
+            dump("Reveived certificate request interest")
+            self.onCertificateRequest(prefix, interest, transport, registeredPrefixId)
 
     def onBootstrapInterest(self, prefix, interest, transport, registeredPrefixId):
-	
-	interestName = interest.getName()
-	deviceParameters = json.loads(interestName.get(3).getValue().toRawStr())
-	deviceNewIdentity = Name("/home")
+        
+        interestName = interest.getName()
+        deviceParameters = json.loads(interestName.get(3).getValue().toRawStr())
+        deviceNewIdentity = Name("/home")
             
-	#create new identity for device
+        #create new identity for device
         deviceNewIdentity.append(deviceParameters["category"])
         deviceNewIdentity.append(deviceParameters["id"])
-	    
+            
         #generate content
         content = {}
         content["deviceNewIdentity"] = deviceNewIdentity.toUri()
-        content["controllerIdentity"] = self._prefix
+        content["controllerIdentity"] = self._identity
 
         #get public key of controller
         pKeyName = self._identityManager.getDefaultKeyNameForIdentity(self._identityManager.getDefaultIdentity())
@@ -81,106 +82,100 @@
         pKeyInfo["keyType"] = pKey.getKeyType()
         pKeyInfo["publicKeyDer"] = pKey.getKeyDer().toRawStr()
         dump("Sent content : ",content)
-	      
-	#TODO generate signature for data
-	    
-	#generate data package
-	data = Data(interestName)
-	data.setContent(json.dumps(content,encoding="latin-1"))
-	#data.setSignature(signature)
+              
+        #TODO generate signature for data
+            
+        #generate data package
+        data = Data(interestName)
+        data.setContent(json.dumps(content,encoding="latin-1"))
+        #data.setSignature(signature)
         encodedData = data.wireEncode()
         transport.send(encodedData.toBuffer())
 
 
     def onCertificateRequest(self, prefix, interest, transport, registeredPrefixId):
-	interestName = interest.getName()
-	dump("interest name : ",interestName)
-	
-	keyName = interestName[:3]
-	keyId = interestName.get(4)
-	keyName.append(keyId)
-	keyInfo = json.loads(interestName.get(5).getValue().toRawStr(),encoding="latin-1")
-	keyType = keyInfo['keyType']
-	keyDer = Blob().fromRawStr(keyInfo['keyDer'])
+        interestName = interest.getName()
+        dump("interest name : ",interestName)
+        
+        keyName = interestName[:3]
+        keyId = interestName.get(4)
+        keyName.append(keyId)
+        keyInfo = json.loads(interestName.get(5).getValue().toRawStr(),encoding="latin-1")
+        keyType = keyInfo['keyType']
+        keyDer = Blob().fromRawStr(keyInfo['keyDer'])
 
-	dump("keyname: ",keyName)
-	dump("keyType ",keyInfo['keyType'])
-	dump("keyDer string",keyInfo['keyDer'])
-	dump("keyDer",keyDer)
+        dump("keyname: ",keyName)
+        dump("keyType ",keyInfo['keyType'])
+        dump("keyDer string",keyInfo['keyDer'])
+        dump("keyDer",keyDer)
 
-	#device and controller are on one mechine, so it needs to be done.
-	self._identityManager.setDefaultIdentity(Name(self._prefix))
-	try:
-	    self._identityStorage.addKey(keyName, keyType, keyDer)
-	except SecurityException:
-	    dump("The public key for device already exists ")
+        #device and controller are on one mechine, so it needs to be done.
+        self._identityManager.setDefaultIdentity(Name(self._identity))
+        try:
+            self._identityStorage.addKey(keyName, keyType, keyDer)
+        except SecurityException:
+            dump("The public key for device already exists ")
 
-	signedCertificate = self._identityManager._generateCertificateForKey(keyName)
-	self._keyChain.sign(signedCertificate, self._identityManager.getDefaultCertificateName())
-	self._identityManager.addCertificate(signedCertificate)
-   	
-
-	
-	encodedData = signedCertificate.wireEncode()
+        signedCertificate = self._identityManager._generateCertificateForKey(keyName)
+        self._keyChain.sign(signedCertificate, self._identityManager.getDefaultCertificateName())
+        self._identityManager.addCertificate(signedCertificate)
+        
+        encodedData = signedCertificate.wireEncode()
         transport.send(encodedData.toBuffer())
 
 
-
     def onRegisterFailed(self, prefix):
         self._responseCount += 1
         dump("Register failed for prefix", prefix.toUri())
 
     def beforeLoopStart(self):
-	identityName = Name(self._prefix)
-	
-	defaultIdentityExists = True
-	try:
-	    defaultIdentityName = self._identityManager.getDefaultIdentity()
-	except:
-	    defaultIdentityExists = False
-	    
+        identityName = Name(self._identity)
+        
+        defaultIdentityExists = True
+        try:
+            defaultIdentityName = self._identityManager.getDefaultIdentity()
+        except:
+            defaultIdentityExists = False
+            
 
-	#dump(self._identityManager.getDefaultKeyNameForIdentity(self._prefix))
-	if not defaultIdentityExists or self._identityManager.getDefaultIdentity() != identityName:
-	    #make one
-	    dump("Set default identity: ",identityName)
-	    #self._identityManager.createIdentityAndCertificate(identityName)
-	    self._identityStorage.addIdentity(identityName)
-	    self._identityManager.setDefaultIdentity(identityName)
+        #dump(self._identityManager.getDefaultKeyNameForIdentity(self._identity))
+        if not defaultIdentityExists or self._identityManager.getDefaultIdentity() != identityName:
+            #make one
+            dump("Set default identity: ",identityName)
+            #self._identityManager.createIdentityAndCertificate(identityName)
+            self._identityStorage.addIdentity(identityName)
+            self._identityManager.setDefaultIdentity(identityName)
 
-	    try:
-	        self._identityManager.getDefaultKeyNameForIdentity(identityName)
-	    except SecurityException:
-	        newKey = self._identityManager.generateRSAKeyPairAsDefault(Name(self._prefix), isKsk=True)
-	        newCert = self._identityManager.selfSign(newKey)
-	        dump("generated new KSK certificate ", newCert)
-	        self._identityManager.addCertificateAsIdentityDefault(newCert)
+            try:
+                self._identityManager.getDefaultKeyNameForIdentity(identityName)
+            except SecurityException:
+                newKey = self._identityManager.generateRSAKeyPairAsDefault(Name(self._identity), isKsk=True)
+                newCert = self._identityManager.selfSign(newKey)
+                dump("generated new KSK certificate ", newCert)
+                self._identityManager.addCertificateAsIdentityDefault(newCert)
+
+        
+        #self.face.registerPrefix(self._prefix, self.onInterest, self.onRegisterFailed)
 
 
 if __name__ == '__main__':
 
-    # The default Face will connect using a Unix socket, or to "localhost".
-    face = Face()
-
-    # Use the system default key chain and certificate name to sign commands.
-    
     controller = Controller("default.conf")
     controller.beforeLoopStart()
-    
-    face.setCommandSigningInfo(controller.getKeyChain(), controller._keyChain.getDefaultCertificateName())
 
-    # Also use the default certificate name to sign data packets.
+    face = Face()
+    face.setCommandSigningInfo(controller._keyChain, controller._keyChain.getDefaultCertificateName())
+    dump("Register prefix : ", controller._prefix)
+    face.registerPrefix(controller._prefix, controller.onInterest, controller.onRegisterFailed)
 
-    prefix = Name("/home/")
-    dump("Register prefix", prefix)
-
-    face.registerPrefix(prefix, controller.onInterest, controller.onRegisterFailed)
-
-    
-    while controller._responseCount < 100:
+    while True:
         face.processEvents()
         # We need to sleep for a few milliseconds so we don't use 100% of the CPU.
         time.sleep(0.01)
 
     face.shutdown()
 
+
+    
+
+
diff --git a/end-device.py b/end-device.py
index 0f085e7..fb97a23 100644
--- a/end-device.py
+++ b/end-device.py
@@ -19,14 +19,15 @@
 
 import time
 import json
-from pyndn import Name
-from pyndn import Face
-from pyndn import Interest
+from pyndn import Name, Face, Interest, Data, ThreadsafeFace
 from pyndn import KeyLocator, KeyLocatorType
 from base_node import BaseNode
 from pyndn.security.security_exception import SecurityException
 from pyndn.util import Blob
-
+try:
+    import asyncio
+except ImportError:
+    import trollius as asyncio
 
 def dump(*list):
     result = ""
@@ -35,88 +36,78 @@
     print(result)
 
 class Device(BaseNode):
-    def __init__(self,configFileName,face):
+    def __init__(self,configFileName):
         super(Device, self).__init__(configFileName=configFileName)
         
-        #self.deviceSerial = self.getSerial()
+        self._deviceSerial = self.getSerial()
         self._callbackCount = 0
-	self._face = face
+        self._symKey = "symmetricKeyForBootstrapping"
+        self._category = "sensors"
+        self._id = "T9273659"
 
-    def onData(self, interest, data):
-        self._callbackCount += 1
-	dump("Got data packet with name : ", data.getName().toUri())
-        # Use join to convert each byte to chr.
-        dump(data.getContent().toRawStr())
-
-	#haven't checked symmetric key digest yet
-	if (data.getName().toUri().startswith(self._bootstrapPrefix)):
-	    self.onBootstrapData(interest, data) 
 
     def expressBootstrapInterest(self):
-        symKey = "symmetricKeyForBootstrapping"
         
-	#generate bootstrap name /home/controller/bootstrap/<device-parameters>
-	bootstrapName = Name(device._bootstrapPrefix)
+        #generate bootstrap name /home/controller/bootstrap/<device-parameters>
+        bootstrapName = Name(self._bootstrapPrefix)
 
         deviceParameters = {}
-        deviceParameters["category"] = "sensors"
-        deviceParameters["id"] = "T123456789"
+        deviceParameters["category"] = self._category
+        deviceParameters["id"] = self._deviceSerial
         bootstrapName.append(json.dumps(deviceParameters))
 
         bootstrapInterest = Interest(bootstrapName)
-
         bootstrapInterest.setInterestLifetimeMilliseconds(5000)
-
         bootstrapKeyLocator = KeyLocator()
         bootstrapKeyLocator.setType(KeyLocatorType.KEY_LOCATOR_DIGEST)
-        bootstrapKeyLocator.setKeyData(symKey)
+        bootstrapKeyLocator.setKeyData(self._symKey)
         bootstrapInterest.setKeyLocator(bootstrapKeyLocator)
 
-	dump("Express interest :",bootstrapInterest.toUri())
-        self._face.expressInterest(bootstrapInterest, self.onBootstrapData, self.onTimeout)
+        dump("Express bootstrap interest : ",bootstrapInterest.toUri())
+        self.face.expressInterest(bootstrapInterest, self.onBootstrapData, self.onTimeout)
     
     def onBootstrapData(self, interest, data):
-	dump("Data received.")
-	content = json.loads(data.getContent().toRawStr(), encoding="latin-1")
-	deviceNewIdentity = Name(content["deviceNewIdentity"])
-	controllerIdentity = Name(content["controllerIdentity"])
-	controllerPublicKeyInfo = content["controllerPublicKey"]
+        dump("Bootstrap data received.")
+        content = json.loads(data.getContent().toRawStr(), encoding="latin-1")
+        deviceNewIdentity = Name(content["deviceNewIdentity"])
+        controllerIdentity = Name(content["controllerIdentity"])
+        controllerPublicKeyInfo = content["controllerPublicKey"]
 
-	#set new identity as default and generate default key-pair with KSK Certificate
-	self._identityStorage.addIdentity(deviceNewIdentity)
-	self._identityManager.setDefaultIdentity(deviceNewIdentity)
-	try:
-	    self._identityManager.getDefaultKeyNameForIdentity(deviceNewIdentity)
-	except SecurityException:
-	    #generate new key-pair and certificate for new identity
-	    dump("Installed new identity as default\nGenerating new key-pair and self signed certificate...")
-	    newKey = self._identityManager.generateRSAKeyPairAsDefault(Name(deviceNewIdentity), isKsk=True)
-	    newCert = self._identityManager.selfSign(newKey)
-	    self._identityManager.addCertificateAsIdentityDefault(newCert)
-	
-	#add controller's identity and public key
-	keyType = controllerPublicKeyInfo["keyType"]
-	keyName = Name(controllerPublicKeyInfo["keyName"])
-	keyDer = Blob().fromRawStr(controllerPublicKeyInfo["publicKeyDer"])
-	dump("KeyType: ",keyType)
-	dump("keyName: ",keyName)
-	dump("Controller public key der : ",keyDer)
+        #set new identity as default and generate default key-pair with KSK Certificate
+        self._identityStorage.addIdentity(deviceNewIdentity)
+        self._identityManager.setDefaultIdentity(deviceNewIdentity)
+        try:
+            self._identityManager.getDefaultKeyNameForIdentity(deviceNewIdentity)
+        except SecurityException:
+            #generate new key-pair and certificate for new identity
+            dump("Install new identity as default\nGenerate new key-pair and self signed certificate")
+            newKey = self._identityManager.generateRSAKeyPairAsDefault(Name(deviceNewIdentity), isKsk=True)
+            newCert = self._identityManager.selfSign(newKey)
+            self._identityManager.addCertificateAsIdentityDefault(newCert)
+        
+        #add controller's identity and public key
+        keyType = controllerPublicKeyInfo["keyType"]
+        keyName = Name(controllerPublicKeyInfo["keyName"])
+        keyDer = Blob().fromRawStr(controllerPublicKeyInfo["publicKeyDer"])
+        dump("Controller's KeyType: ",keyType)
+        dump("Controller's keyName: ",keyName)
+        dump("Controller public key der : ",keyDer)
 
-	self._identityStorage.addIdentity(controllerIdentity)
-	try:
-	    self._identityStorage.addKey(keyName, keyType, keyDer)
-	    dump("Controller's identity, key and certificate installled.")
-	except SecurityException:
-	    dump("Controller's identity, key, certificate already exists.")
+        self._identityStorage.addIdentity(controllerIdentity)
+        try:
+            self._identityStorage.addKey(keyName, keyType, keyDer)
+            dump("Controller's identity, key and certificate installled.")
+        except SecurityException:
+            dump("Controller's identity, key, certificate already exists.")
 
-	#express an certificate request interest
-	defaultKeyName = self._identityManager.getDefaultKeyNameForIdentity(self._keyChain.getDefaultIdentity() )
-	self.requestCertificate(defaultKeyName)
+        #express an certificate request interest
+        defaultKeyName = self._identityManager.getDefaultKeyNameForIdentity(self._keyChain.getDefaultIdentity() )
+        self.requestCertificate(defaultKeyName)
 
 
     def beforeLoopStart(self):
-	pass	
-	
+        self.expressBootstrapInterest()
+        
     def onTimeout(self, interest):
         self._callbackCount += 1
         dump("Time out for interest", interest.getName().toUri())
@@ -125,47 +116,39 @@
         """
         We compose a command interest with our public key info so the controller
         can sign us a certificate that can be used with other nodes in the network.
-	Name format : /home/<device-category>/KEY/<device-id>/<key-id>/<publickey>/ID-CERT/<version-number>
-	"""
-	certificateRequestName = self._keyChain.getDefaultIdentity()
-	deviceIdComponent = certificateRequestName.get(-1)
-	keyIdComponent = keyIdentity.get(-1)
+        Name format : /home/<device-category>/KEY/<device-id>/<key-id>/<publickey>/ID-CERT/<version-number>
+        """
+        certificateRequestName = self._keyChain.getDefaultIdentity()
+        deviceIdComponent = certificateRequestName.get(-1)
+        keyIdComponent = keyIdentity.get(-1)
 
-	certificateRequestName = certificateRequestName
-	certificateRequestName.append("KEY")
-	#certificateRequestName.append(deviceIdComponent)
-	certificateRequestName.append(keyIdComponent)
+        certificateRequestName = certificateRequestName
+        certificateRequestName.append("KEY")
+        #certificateRequestName.append(deviceIdComponent)
+        certificateRequestName.append(keyIdComponent)
 
-	key = self._identityManager.getPublicKey(keyIdentity)
-	keyInfo = {}
-	keyInfo["keyType"] = key.getKeyType()
-	keyInfo["keyDer"] = key.getKeyDer().toRawStr()
+        key = self._identityManager.getPublicKey(keyIdentity)
+        keyInfo = {}
+        keyInfo["keyType"] = key.getKeyType()
+        keyInfo["keyDer"] = key.getKeyDer().toRawStr()
 
-	certificateRequestName.append(json.dumps(keyInfo, encoding="latin-1"))
+        certificateRequestName.append(json.dumps(keyInfo, encoding="latin-1"))
 
-	certificateRequestName.append("ID-CERT")
-	
-	dump("Sending certificate request : ",certificateRequestName)
+        certificateRequestName.append("ID-CERT")
+        
+        dump("Sending certificate request : ",certificateRequestName)
 
-	self._face.expressInterest(Interest(certificateRequestName), self.onCertificateData, self.onTimeout)
-	#TODO use symmetric key to sign
-	
+        self.face.expressInterest(Interest(certificateRequestName), self.onCertificateData, self.onTimeout)
+        #TODO use symmetric key to sign
+        
     def onCertificateData(self, interest, data):
-	dump("OnCertificateData : ",data)
-	
+        dump("OnCertificateData : ",data)
+        
 
 if __name__ == '__main__':
-    face = Face("")
 
-    device = Device("default.conf",face)
+    device = Device("default.conf")
+    device.start()
     
-    device.expressBootstrapInterest()
-    #device.requestCertificate(device._identityManager.getDefaultKeyNameForIdentity(device._keyChain.getDefaultIdentity() )) 
-
-    while device._callbackCount < 1000:
-        face.processEvents()
-        # We need to sleep for a few milliseconds so we don't use 100% of the CPU.
-        time.sleep(0.01)
-
-    face.shutdown()
+    
 
