diff --git a/mininet/log.py b/mininet/log.py
index 09a664a06300966b2b156b0b019d3a5ddbafd90e..5f96569e8312516795de614579a90c20f4400d14 100644
--- a/mininet/log.py
+++ b/mininet/log.py
@@ -69,7 +69,7 @@ def __init__( cls, name, bases, dict_ ):
     def __call__( cls, *args, **kw ):
         if cls.instance is None:
             cls.instance = super( Singleton, cls ).__call__( *args, **kw )
-            return cls.instance
+        return cls.instance
 
 
 class MininetLogger( Logger, object ):
diff --git a/mininet/node.py b/mininet/node.py
index b4c0013481b6e7efbcf5b60bf608aa9dce562ce5..cd5e70e1d7fe16a34caebdb82d64ef31496e89d6 100644
--- a/mininet/node.py
+++ b/mininet/node.py
@@ -261,6 +261,7 @@ def monitor( self, timeoutms=None, findPid=True ):
         # Look for PID
         marker = chr( 1 ) + r'\d+\r\n'
         if findPid and chr( 1 ) in data:
+            # Marker can be read in chunks; continue until all of it is read
             while not re.findall( marker, data ):
                 data += self.read( 1024 )
             markers = re.findall( marker, data )
diff --git a/mininet/topo.py b/mininet/topo.py
index de5ba8a7a37d63cfd5795aec907f32cfb33420bf..cc458fd87602e53dc0afab9616d098ef514f4167 100644
--- a/mininet/topo.py
+++ b/mininet/topo.py
@@ -201,76 +201,56 @@ def sorted( items ):
         "Items sorted in natural (i.e. alphabetical) order"
         return sorted(items, key=natural)
 
-class SingleSwitchTopo(Topo):
-    '''Single switch connected to k hosts.'''
 
-    def __init__(self, k=2, **opts):
-        '''Init.
-
-        @param k number of hosts
-        @param enable_all enables all nodes and switches?
-        '''
-        super(SingleSwitchTopo, self).__init__(**opts)
+class SingleSwitchTopo( Topo ):
+    "Single switch connected to k hosts."
 
+    def build( self, k=2, **opts ):
+        "k: number of hosts"
         self.k = k
+        switch = self.addSwitch( 's1' )
+        for h in irange( 1, k ):
+            host = self.addHost( 'h%s' % h )
+            self.addLink( host, switch )
 
-        switch = self.addSwitch('s1')
-        for h in irange(1, k):
-            host = self.addHost('h%s' % h)
-            self.addLink(host, switch)
-
-
-class SingleSwitchReversedTopo(Topo):
-    '''Single switch connected to k hosts, with reversed ports.
-
-    The lowest-numbered host is connected to the highest-numbered port.
 
-    Useful to verify that Mininet properly handles custom port numberings.
-    '''
-    def __init__(self, k=2, **opts):
-        '''Init.
+class SingleSwitchReversedTopo( Topo ):
+    """Single switch connected to k hosts, with reversed ports.
+       The lowest-numbered host is connected to the highest-numbered port.
+       Useful to verify that Mininet properly handles custom port numberings."""
 
-        @param k number of hosts
-        @param enable_all enables all nodes and switches?
-        '''
-        super(SingleSwitchReversedTopo, self).__init__(**opts)
+    def build( self, k=2 ):
+        "k: number of hosts"
         self.k = k
-        switch = self.addSwitch('s1')
-        for h in irange(1, k):
-            host = self.addHost('h%s' % h)
-            self.addLink(host, switch,
-                         port1=0, port2=(k - h + 1))
+        switch = self.addSwitch( 's1' )
+        for h in irange( 1, k ):
+            host = self.addHost( 'h%s' % h )
+            self.addLink( host, switch,
+                          port1=0, port2=( k - h + 1 ) )
 
-class LinearTopo(Topo):
+class LinearTopo( Topo ):
     "Linear topology of k switches, with n hosts per switch."
 
-    def __init__(self, k=2, n=1, **opts):
-        """Init.
-           k: number of switches
-           n: number of hosts per switch
-           hconf: host configuration options
-           lconf: link configuration options"""
-
-        super(LinearTopo, self).__init__(**opts)
-
+    def build( self, k=2, n=1, **opts):
+        """k: number of switches
+           n: number of hosts per switch"""
         self.k = k
         self.n = n
 
         if n == 1:
             genHostName = lambda i, j: 'h%s' % i
         else:
-            genHostName = lambda i, j: 'h%ss%d' % (j, i)
-
+            genHostName = lambda i, j: 'h%ss%d' % ( j, i )
 
         lastSwitch = None
-        for i in irange(1, k):
+        for i in irange( 1, k ):
             # Add switch
-            switch = self.addSwitch('s%s' % i)
+            switch = self.addSwitch( 's%s' % i )
             # Add hosts to switch
-            for j in irange(1, n):
-                host = self.addHost(genHostName(i, j))
-                self.addLink(host, switch)
+            for j in irange( 1, n ):
+                host = self.addHost( genHostName( i, j ) )
+                self.addLink( host, switch )
             # Connect switch to previous
             if lastSwitch:
-                self.addLink(switch, lastSwitch)
+                self.addLink( switch, lastSwitch )
             lastSwitch = switch
diff --git a/mininet/topolib.py b/mininet/topolib.py
index 8e3b3a4b6a33caabebaba7ddcfde5e581ea9197e..6ee6f0cdb58215b1d23c9046db7e58742c5b5809 100644
--- a/mininet/topolib.py
+++ b/mininet/topolib.py
@@ -6,8 +6,7 @@
 class TreeTopo( Topo ):
     "Topology for a tree network with a given depth and fanout."
 
-    def __init__( self, depth=1, fanout=2 ):
-        super( TreeTopo, self ).__init__()
+    def build( self, depth=1, fanout=2 ):
         # Numbering:  h1..N, s1..M
         self.hostNum = 1
         self.switchNum = 1
@@ -42,8 +41,8 @@ class TorusTopo( Topo ):
        with the default controller or any Ethernet bridge
        without STP turned on! It can be used with STP, e.g.:
        # mn --topo torus,3,3 --switch lxbr,stp=1 --test pingall"""
-    def __init__( self, x, y, *args, **kwargs ):
-        Topo.__init__( self, *args, **kwargs )
+    
+    def build( self, x, y ):
         if x < 3 or y < 3:
             raise Exception( 'Please use 3x3 or greater for compatibility '
                             'with 2.1' )