diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
index 04b38fd..3bb3ad6 100644
--- a/extensions/deviceicon/network.py
+++ b/extensions/deviceicon/network.py
@@ -222,16 +222,6 @@ class GsmPalette(Palette):
                                  gobject.TYPE_NONE, ([])),
     }
 
-    def _add_widget_with_padding(self, child, xalign=0, yalign=0.5):
-            alignment = gtk.Alignment(xalign=xalign, yalign=yalign,
-                                   xscale=1, yscale=0.33)
-            alignment.set_padding(style.DEFAULT_SPACING,
-                               style.DEFAULT_SPACING,
-                               style.DEFAULT_SPACING,
-                               style.DEFAULT_SPACING)
-            alignment.add(child)
-            return alignment
-
     def __init__(self):
 
         Palette.__init__(self, label=_('Wireless modem'))
@@ -247,23 +237,34 @@ class GsmPalette(Palette):
 
         self.info_box = gtk.VBox()
 
-        self._data_label = gtk.Label()
-        self._data_label.props.xalign = 0.0
-	label_alignment = self._add_widget_with_padding(self._data_label) 
+        self.data_label = gtk.Label()
+        self.data_label.props.xalign = 0.0
+        label_alignment = self._add_widget_with_padding(self.data_label)
         self.info_box.pack_start(label_alignment)
-        self._data_label.show()
+        self.data_label.show()
         label_alignment.show()
 
-        self._conn_time_label = gtk.Label()
-        self._conn_time_label.props.xalign = 0.0
-	label_alignment = self._add_widget_with_padding(self._conn_time_label) 
+        self.connection_time_label = gtk.Label()
+        self.connection_time_label.props.xalign = 0.0
+        label_alignment = self._add_widget_with_padding( \
+                self.connection_time_label)
         self.info_box.pack_start(label_alignment)
-	self._conn_time_label.show()
+        self.connection_time_label.show()
         label_alignment.show()
 
         self.info_box.show()
         self.set_content(self.info_box)
 
+    def _add_widget_with_padding(self, child, xalign=0, yalign=0.5):
+        alignment = gtk.Alignment(xalign=xalign, yalign=yalign,
+                                  xscale=1, yscale=0.33)
+        alignment.set_padding(style.DEFAULT_SPACING,
+                              style.DEFAULT_SPACING,
+                              style.DEFAULT_SPACING,
+                              style.DEFAULT_SPACING)
+        alignment.add(child)
+        return alignment
+
     def set_state(self, state):
         self._current_state = state
         self._update_label_and_text()
@@ -532,7 +533,8 @@ class WirelessDeviceView(ToolButton):
         # truncate the nick and use a regex to drop any partial characters
         # at the end
         nick = nick.encode('utf-8')[:name_limit]
-        nick = re.sub("([\xf6-\xf7][\x80-\xbf]{0,2}|[\xe0-\xef][\x80-\xbf]{0,1}|[\xc0-\xdf])$", '', nick)
+        pattern = "([\xf6-\xf7][\x80-\xbf]{0,2}|[\xe0-\xef][\x80-\xbf]{0,1}|[\xc0-\xdf])$"
+        nick = re.sub(pattern, '', nick)
 
         connection_name = format % nick
         connection_name += color_suffix
@@ -811,10 +813,12 @@ class GsmDeviceView(TrayIcon):
             connection = network.find_gsm_connection()
             if connection is not None:
                 connection.set_connected()
-                self._connection_timestamp =  time.time() - connection.get_settings().connection.timestamp
-                self._connection_time_handler = gobject.timeout_add(1000, self.__connection_timecount_cb) 
+                self._connection_timestamp =  time.time() - \
+                        connection.get_settings().connection.timestamp
+                self._connection_time_handler = gobject.timeout_add( \
+                        1000, self.__connection_timecount_cb)
                 self._update_stats(0, 0)
-                self._update_connectiontime()                
+                self._update_connection_time()                
                 self._palette.info_box.show() 
 
         if state is network.DEVICE_STATE_DISCONNECTED:
@@ -842,24 +846,27 @@ class GsmDeviceView(TrayIcon):
                                          signal_name='StateChanged',
                                          path=self._device.object_path,
                                          dbus_interface=_NM_DEVICE_IFACE)
-        
+
     def __ppp_stats_changed_cb(self, in_bytes, out_bytes):
         self._update_stats(in_bytes, out_bytes)
 
     def _update_stats(self, in_bytes, out_bytes):
         in_kbytes = in_bytes / 1024
         out_kbytes = out_bytes / 1024
-        self._palette._data_label.set_text(_("Data sent %d kb / received %d kb") % (out_kbytes ,in_kbytes))
+        text = _("Data sent %d kb / received %d kb") % (out_kbytes, in_kbytes)
+        self._palette.data_label.set_text(text)
 
     def __connection_timecount_cb(self):
         self._connection_timestamp = self._connection_timestamp + 1
         self._update_connectiontime()
-	return True
+        return True
+
+    def _update_connection_time(self):
+        connection_time = datetime.datetime.fromtimestamp( \
+                self._connection_timestamp)
+        text = _("Connection time ") + connection_time.strftime('%H : %M : %S')
+        self._palette.connection_time_label.set_text(text)
 
-    def _update_connectiontime(self):
-        connection_time = datetime.datetime.fromtimestamp(self._connection_timestamp)
-        self._palette._conn_time_label.set_text(_("Connection time ") + connection_time.strftime('%H : %M : %S'))
-    
 class WirelessDeviceObserver(object):
     def __init__(self, device, tray, device_type):
         self._device = device
diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index 00db4e7..4c1d536 100644
--- a/src/jarabe/model/network.py
+++ b/src/jarabe/model/network.py
@@ -197,8 +197,8 @@ class Ppp(object):
         pass
 
     def get_dict(self):
-      ppp = {}
-      return ppp
+        ppp = {}
+        return ppp
 
 class Gsm(object):
     def __init__(self):
@@ -351,7 +351,7 @@ class NMSettingsConnection(dbus.service.Object):
 
     def set_connected(self):
         if self._settings.connection.type == NM_CONNECTION_TYPE_GSM:
-             self._settings.connection.timestamp = int(time.time())
+            self._settings.connection.timestamp = int(time.time())
         else:
             if not self._settings.connection.autoconnect:
                 self._settings.connection.autoconnect = True
