diff --git a/person_detection/person_detection.py b/person_detection/person_detection.py
index 8eff1bc..9c5f0d9 100644
--- a/person_detection/person_detection.py
+++ b/person_detection/person_detection.py
@@ -29,7 +29,7 @@
     def __init__(self, device, args):
         log.basicConfig(format="[ %(levelname)s ] %(message)s", level=log.INFO, stream=sys.stdout)
 
-        self.model = args.model
+        self.model_xml = args.model
         self.input = args.input
         self.prob_threshold = args.prob_threshold
 
@@ -61,12 +61,11 @@
 
 
     def init_inference(self):
-        model_xml = self.model
-        model_bin = os.path.splitext(model_xml)[0] + ".bin"
+        self.model_bin = os.path.splitext(self.model_xml)[0] + ".bin"
 
         # Read IR
         log.info("Reading IR...")
-        net = IECore().read_network(model=model_xml, weights=model_bin)
+        net = IECore().read_network(model=self.model_xml, weights=self.model_bin)
 
         assert len(net.inputs.keys()) == 1, "Demo supports only single input topologies"
         assert len(net.outputs) == 1, "Demo supports only single output topologies"
@@ -77,6 +76,7 @@
         exec_net = IECore().load_network(network=net, device_name="CPU", num_requests=2)
         # Read and pre-process input image
         shape = Shape(*net.inputs[input_blob].shape)
+
         del net
 
         return exec_net, shape, input_blob, out_blob
@@ -90,10 +90,6 @@
         cur_request_id = 0
         next_request_id = 1
 
-        log.info("Starting inference in async mode...")
-        log.info("To switch between sync and async modes press Tab button")
-        log.info("To stop the demo execution press Esc button")
-
         # Async doesn't work if True
         # Request issues = Runtime Error: [REQUEST BUSY]
         # self.is_async_mode = False
@@ -146,8 +142,6 @@
                         det_label = str(class_id)
                         cv2.putText(frame, det_label + ' ' + str(round(obj[2] * 100, 1)) + ' %', (xmin, ymin - 7),
                                     cv2.FONT_HERSHEY_COMPLEX, 0.6, color, 1)
-                        # print('Object detected, class_id:', class_id, 'probability:', obj[2], 'xmin:', xmin, 'ymin:', ymin,
-                        #      'xmax:', xmax, 'ymax:', ymax)
 
                 cv2.putText(frame, self.device, (10, int(initial_h - 20)),
                         cv2.FONT_HERSHEY_COMPLEX, 0.5, (10, 10, 200), 1)
