diff --git a/nexus/ChannelSelectDialog.py b/nexus/ChannelSelectDialog.py
index 90621310a187b8a9cd30d8bb99b4ac84a9f7cb3c..572c46adb6702ba22438ef8179885599443fa5a0 100644
--- a/nexus/ChannelSelectDialog.py
+++ b/nexus/ChannelSelectDialog.py
@@ -90,20 +90,3 @@ class ChannelSelectDialog(*load_ui('ChannelSelectDialog.ui')):
         assert True
         self.tableWidget.resizeColumnsToContents()
         self.tableWidget.horizontalHeader().setSectionResizeMode(QHeaderView.Fixed)
-
-
-if __name__ == '__main__':
-    # Test
-    from obspy import read_inventory
-
-    inv = read_inventory('test/data/xml/XW.2017.dmc.xml')
-    sta = inv[0][0]
-
-    app = QApplication(sys.argv)
-    main = ChannelSelectDialog(station=sta)
-    if main.exec_():
-        print('Selected:')
-        for c in main.selected_channels:
-            print(c)
-    else:
-        print('Canceled')
diff --git a/nexus/NRLWizard.py b/nexus/NRLWizard.py
index 61c84c62301142d34877f63b414ce0a288b33449..d361a01e3d6564029603c58347651723ebd5ec64 100644
--- a/nexus/NRLWizard.py
+++ b/nexus/NRLWizard.py
@@ -114,26 +114,3 @@ class NRLPage(QtWidgets.QWizardPage):
             self.parent.q_and_as.pop()
         except IndexError:
             pass
-
-
-if __name__ == '__main__':
-    import sys
-    app = QtWidgets.QApplication(sys.argv)
-
-    # Sensor
-    w = NRLWizard()
-    ret = w.exec_()
-    print(ret)
-    if ret:
-        print(w.q_and_as)
-        print(w.final)
-        print(w.nickname)
-        
-    # Datalogger
-    w = NRLWizard(DATALOGGER)
-    ret = w.exec_()
-    if ret:
-        print(w.q_and_as)
-        print(w.final)
-        print(w.nickname)
-    print(ret)
diff --git a/nexus/hardware.py b/nexus/hardware.py
index c255785df0f9064c819b40e241b1f31661a7c2ac..0717ea10fa4a204d5e73ce9ad741dde417f4f4cd 100644
--- a/nexus/hardware.py
+++ b/nexus/hardware.py
@@ -262,9 +262,3 @@ def create_defaults():
                 with open(os.path.join(resp_dir, filename), 'r') as f:
                     d.soh_resps[chan] = read_inventory(
                         f, format='RESP')[0][0][0].response
-
-
-if __name__ == '__main__':
-    create_defaults()
-    print(sensors)
-    print(dataloggers)
diff --git a/nexus/inv_model.py b/nexus/inv_model.py
index d8549f19fde35dae3ced78f77338bd3ba6ebd192..340ede7d64f1f57b96f8e7ee68fde5159f85d189 100644
--- a/nexus/inv_model.py
+++ b/nexus/inv_model.py
@@ -36,24 +36,3 @@ class InventoryModel(QtCore.QAbstractListModel):
             station.end_date.year,
             station.end_date.julday,
             )
-
-if __name__ == '__main__':
-    app = QtWidgets.QApplication(sys.argv)
-
-    listview = QtWidgets.QListView()
-    listview.show()
-    listview.setFont(QtGui.QFont('Consolas',16))
-
-    treeview = QtWidgets.QTreeView()
-    treeview.show()
-    treeview.setFont(QtGui.QFont('Consolas',16))
-
-    inv = read_inventory('/Users/lloyd/code/nexus/nexuseis/test/data/'
-                               'ANDIVOLC.xml',
-                               format="STATIONXML")
-    inv_model = InventoryModel(inventory=inv)
-
-    listview.setModel(inv_model)
-    treeview.setModel(inv_model)
-
-    sys.exit(app.exec_())
diff --git a/nexus/inventorymodel.py b/nexus/inventorymodel.py
index 3b1dbcfe33ebba52aa0c21e208fdeccacf87041a..acc5cf8cdf7b02957cd4dcbe8293281316bd9923 100644
--- a/nexus/inventorymodel.py
+++ b/nexus/inventorymodel.py
@@ -127,30 +127,3 @@ class InventoryModel(QtCore.QAbstractItemModel):
         if parent == self._root_node:
             return QtCore.QModelIndex()
         return self.createIndex(parent.row(), 0, parent)
-
-
-if __name__ == '__main__':
-    app =  QtWidgets.QApplication(sys.argv)
-
-    root_node = Node('', None, None)
-
-    xx_node = Network('XX', None, root_node)
-    sta1_node = Station('STA1', None, xx_node)
-    chan1z_node = Channel('LHZ', None, sta1_node)
-    chan11_node = Channel('LH1', None, sta1_node)
-    chan12_node = Channel('LH2', None, sta1_node)
-    chan1log_node = Channel('LOG', None, sta1_node)
-    sta2_node = Station('STA2', None, xx_node)
-    chan2z_node = Channel('LHZ', None, sta2_node)
-    chan21 = Channel('LH1', None, sta2_node)
-    chan22_node = Channel('LH2', None, sta2_node)
-    chan2log_node = Channel('LOG', None, sta2_node)
-
-    print(root_node)
-
-    model = InventoryModel(root_node)
-    treeview = QtWidgets.QTreeView()
-    treeview.show()
-    treeview.setModel(model)
-
-    sys.exit(app.exec_())
diff --git a/nexus/ms_sum.py b/nexus/ms_sum.py
index d5ce8ef11af88d64a0151642d6469984a131bd32..25cf0eee12a03df6e130b1786779d86852ca524b 100755
--- a/nexus/ms_sum.py
+++ b/nexus/ms_sum.py
@@ -25,5 +25,3 @@ def main():
             inv.scan_quick(path,log_message=lambda x:None)
     inv.print_sum()
 
-if __name__ == '__main__':
-    main()