diff --git a/README.md b/README.md
index f6196e5d9..2160abdfc 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ static void Main(string[] args)
 ```
 outputs:
 ```
-1.0  
+1.0
 -0.958924274663
 -0.6752620892
 float64
diff --git a/demo/helloform.py b/demo/helloform.py
index bdc5c54ed..834772de6 100644
--- a/demo/helloform.py
+++ b/demo/helloform.py
@@ -1,13 +1,5 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import clr
+
 SWF = clr.AddReference("System.Windows.Forms")
 print (SWF.Location)
 import System.Windows.Forms as WinForms
@@ -31,7 +23,7 @@ def __init__(self):
         self.button.Size = Size(820, 20)
         self.button.TabIndex = 2
         self.button.Text = "Click Me!"
-        
+
         # Register the event handler
         self.button.Click += self.button_Click
 
@@ -41,7 +33,7 @@ def __init__(self):
         self.textbox.TabIndex = 1
         self.textbox.Size = Size(1260, 40)
         self.textbox.Location = Point(160, 24)
-        
+
         # Add the controls to the form
         self.AcceptButton = self.button
         self.Controls.Add(self.button);
@@ -66,4 +58,3 @@ def main():
 
 if __name__ == '__main__':
     main()
-
diff --git a/demo/splitter.py b/demo/splitter.py
index 5c5da67a8..319de451f 100644
--- a/demo/splitter.py
+++ b/demo/splitter.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import clr
 import System.Windows.Forms as WinForms
 from System.Drawing import Color, Size, Point
@@ -28,7 +19,6 @@ def __init__(self):
         self.splitter2 = WinForms.Splitter()
         self.panel1 = WinForms.Panel()
 
-
         # Set properties of TreeView control.
         self.treeView1.Dock = WinForms.DockStyle.Left
         self.treeView1.Width = self.ClientSize.Width / 3
@@ -48,14 +38,14 @@ def __init__(self):
 
         # Set properties of Panel's Splitter control.
         self.splitter2.Dock = WinForms.DockStyle.Top
-        
+
         # Width is irrelevant if splitter is docked to Top.
         self.splitter2.Height = 3
-        
+
         # Use a different color to distinguish the two splitters.
         self.splitter2.BackColor = Color.Blue
         self.splitter2.TabIndex = 1
-        
+
         # Set TabStop to false for ease of use when negotiating UI.
         self.splitter2.TabStop = 0
 
@@ -67,7 +57,7 @@ def __init__(self):
 
         # Set TabStop to false for ease of use when negotiating UI.
         self.splitter1.TabStop = 0
-        
+
         # Add the appropriate controls to the Panel.
         for item in (self.richTextBox1, self.splitter2, self.listView1):
             self.panel1.Controls.Add(item)
@@ -87,12 +77,11 @@ def Dispose(self):
         WinForms.Form.Dispose(self)
 
 
-
 def main():
     app = Splitter()
     WinForms.Application.Run(app)
     app.Dispose()
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/demo/wordpad.py b/demo/wordpad.py
index 300c4a1dd..2f60759ff 100644
--- a/demo/wordpad.py
+++ b/demo/wordpad.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import clr
 import System.Windows.Forms as WinForms
 from System.Threading import Thread, ThreadStart, ApartmentState
@@ -60,18 +51,16 @@ def InitializeComponent(self):
         self.aboutMenu = WinForms.MenuItem()
         self.menuHelpAbout = WinForms.MenuItem()
 
-
         self.richTextBox = WinForms.RichTextBox()
         self.statusBarPanel1 = WinForms.StatusBarPanel()
         self.statusBar = WinForms.StatusBar()
         self.fontDialog = WinForms.FontDialog()
         self.statusBarPanel1.BeginInit()
 
-
         # ===================================================================
         # File Menu
         # ===================================================================
-        
+
         self.menuFileNew.Text = "&New"
         self.menuFileNew.Shortcut = WinForms.Shortcut.CtrlN
         self.menuFileNew.ShowShortcut = False
@@ -83,7 +72,7 @@ def InitializeComponent(self):
         self.menuFileOpen.ShowShortcut = False
         self.menuFileOpen.Index = 1
         self.menuFileOpen.Click += self.OnClickFileOpen
-                    
+
         self.menuFileSave.Text = "&Save"
         self.menuFileSave.Shortcut = WinForms.Shortcut.CtrlS
         self.menuFileSave.ShowShortcut = False
@@ -112,7 +101,6 @@ def InitializeComponent(self):
 
         self.fileMenu.MenuItems.AddRange(items)
 
-
         # ===================================================================
         # Edit menu
         # ===================================================================
@@ -134,7 +122,7 @@ def InitializeComponent(self):
         self.menuEditCut.Shortcut = WinForms.Shortcut.CtrlX
         self.menuEditCut.Index = 3
         self.menuEditCut.Click += self.OnClickEditCut
-        
+
         self.menuEditCopy.Text = "Copy"
         self.menuEditCopy.Shortcut = WinForms.Shortcut.CtrlC
         self.menuEditCopy.Index = 4
@@ -163,7 +151,6 @@ def InitializeComponent(self):
 
         self.editMenu.MenuItems.AddRange(items)
 
-
         # ===================================================================
         # Format Menu
         # ===================================================================
@@ -184,11 +171,10 @@ def InitializeComponent(self):
 
         self.formatMenu.MenuItems.AddRange(items)
 
-
         # ===================================================================
         # About menu
         # ===================================================================
-        
+
         self.menuHelpAbout.Text = "&About"
         self.menuHelpAbout.Index = 0
         self.menuHelpAbout.Click += self.OnClickHelpAbout
@@ -210,7 +196,6 @@ def InitializeComponent(self):
         self.richTextBox.AcceptsTab = 1
         self.richTextBox.Location = System.Drawing.Point(0, 0)
 
-
         self.statusBar.BackColor = System.Drawing.SystemColors.Control
         self.statusBar.Location = System.Drawing.Point(0, 518)
         self.statusBar.Size = System.Drawing.Size(775, 19)
@@ -218,11 +203,9 @@ def InitializeComponent(self):
         self.statusBar.ShowPanels = True
         self.statusBar.Panels.Add(self.statusBarPanel1)
 
-
         items = (self.fileMenu, self.editMenu, self.formatMenu, self.aboutMenu)
         self.mainMenu.MenuItems.AddRange(items)
 
-            
         self.openFileDialog.Filter = "Text documents|*.txt|RTF document|*.rtf"
         self.openFileDialog.Title = "Open document"
 
@@ -231,7 +214,6 @@ def InitializeComponent(self):
         self.saveFileDialog.Title = "Save document"
         self.saveFileDialog.FileName = "Untitled"
 
-
         self.AutoScaleBaseSize = System.Drawing.Size(5, 13)
         self.ClientSize = System.Drawing.Size(775, 537)
         self.Menu = self.mainMenu
@@ -244,7 +226,6 @@ def InitializeComponent(self):
     def Dispose(self):
         self.components.Dispose()
         WinForms.Form.Dispose(self)
-        
 
     def OnClickFileNew(self, sender, args):
         self.SaveChangesDialog()
@@ -265,7 +246,6 @@ def OnClickFileExit(self, sender, args):
         self.SaveChangesDialog()
         self.Close()
 
-
     def OnClickEditUndo(self, sender, args):
         self.richTextBox.Undo()
 
@@ -284,7 +264,6 @@ def OnClickEditPaste(self, sender, args):
     def OnClickEditSelectAll(self, sender, args):
         self.richTextBox.SelectAll()
 
-
     def OnClickFormatWordWrap(self, sender, args):
         value = not self.word_wrap
         self.richTextBox.WordWrap = value
@@ -298,7 +277,6 @@ def OnClickFormatFont(self, sender, args):
     def OnClickHelpAbout(self, sender, args):
         AboutForm().ShowDialog(self)
 
-
     def NewDocument(self):
         self.doctype = 1
         self.richTextBox.Rtf = ''
@@ -327,7 +305,7 @@ def OpenDocument(self):
         stream.Close()
 
         filename = self.filename = filename.lower()
-        
+
         if filename.endswith('.rtf'):
             self.richTextBox.Rtf = data
             self.doctype = 2
@@ -345,10 +323,10 @@ def SaveDocument(self):
             if self.saveFileDialog.ShowDialog() != WinForms.DialogResult.OK:
                 return
             filename = self.saveFileDialog.FileName
-        
+
         filename = self.filename = filename.lower()
         self.Text = 'Python Wordpad - %s' % filename
-        
+
         self.richTextBox.Select(0, 0)
 
         stream = File.OpenWrite(filename)
@@ -366,17 +344,16 @@ def SaveDocument(self):
     def SaveChangesDialog(self):
         if self.richTextBox.Modified:
             if WinForms.MessageBox.Show(
-                "Save changes?", "Word Pad",
-                WinForms.MessageBoxButtons.OK |
-                WinForms.MessageBoxButtons.YesNo
-                ) == WinForms.DialogResult.Yes: 
+                    "Save changes?", "Word Pad",
+                            WinForms.MessageBoxButtons.OK |
+                            WinForms.MessageBoxButtons.YesNo
+            ) == WinForms.DialogResult.Yes:
                 self.SaveDocument()
                 return 1
         return 0
 
 
 class AboutForm(WinForms.Form):
-
     def __init__(self):
         self.InitializeComponent()
 
@@ -406,7 +383,7 @@ def InitializeComponent(self):
         self.ClientSize = System.Drawing.Size(300, 150)
 
         self.Controls.AddRange((self.label1, self.btnClose))
-        
+
         self.FormBorderStyle = WinForms.FormBorderStyle.FixedDialog
         self.MaximizeBox = 0
         self.MinimizeBox = 0
@@ -435,4 +412,3 @@ def main():
 
 if __name__ == '__main__':
     main()
-
diff --git a/setup.py b/setup.py
index f0c50838f..75d72fe00 100644
--- a/setup.py
+++ b/setup.py
@@ -110,7 +110,6 @@ def _find_msbuild_tool(tool="msbuild.exe", use_windows_sdk=False):
 
 
 class PythonNET_BuildExt(build_ext):
-
     def build_extension(self, ext):
         """
         Builds the .pyd file using msbuild or xbuild.
@@ -191,7 +190,7 @@ def build_extension(self, ext):
             self._build_monoclr(ext)
 
     def _get_manifest(self, build_dir):
-        if DEVTOOLS == "MsDev" and sys.version_info[:2] > (2,5):
+        if DEVTOOLS == "MsDev" and sys.version_info[:2] > (2, 5):
             mt = _find_msbuild_tool("mt.exe", use_windows_sdk=True)
             manifest = os.path.abspath(os.path.join(build_dir, "app.manifest"))
             cmd = [mt, '-inputresource:"%s"' % sys.executable, '-out:"%s"' % manifest]
@@ -209,12 +208,12 @@ def _build_monoclr(self, ext):
 
         # build the clr python module
         clr_ext = Extension("clr",
-                    sources=[
-                        "src/monoclr/pynetinit.c",
-                        "src/monoclr/clrmod.c"
-                    ],
-                    extra_compile_args=cflags.split(" "),
-                    extra_link_args=libs.split(" "))
+                            sources=[
+                                "src/monoclr/pynetinit.c",
+                                "src/monoclr/clrmod.c"
+                            ],
+                            extra_compile_args=cflags.split(" "),
+                            extra_link_args=libs.split(" "))
 
         build_ext.build_extension(self, clr_ext)
 
@@ -232,11 +231,10 @@ def _install_packages(self):
 
 
 class PythonNET_InstallLib(install_lib):
-
     def install(self):
         if not os.path.isdir(self.build_dir):
             self.warn("'%s' does not exist -- no Python modules to install" %
-                        self.build_dir)
+                      self.build_dir)
             return
 
         if not os.path.exists(self.install_dir):
@@ -249,7 +247,6 @@ def install(self):
 
 
 class PythonNET_InstallData(install_data):
-
     def run(self):
         build_cmd = self.get_finalized_command("build_ext")
         install_cmd = self.get_finalized_command("install")
@@ -350,10 +347,9 @@ def _get_interop_filename():
         ],
         zip_safe=False,
         cmdclass={
-            "build_ext" : PythonNET_BuildExt,
-            "install_lib" : PythonNET_InstallLib,
+            "build_ext": PythonNET_BuildExt,
+            "install_lib": PythonNET_InstallLib,
             "install_data": PythonNET_InstallData,
         },
         setup_requires=setup_requires
     )
-
diff --git a/src/clrmodule/ClrModule.cs b/src/clrmodule/ClrModule.cs
index 801acf7db..62fdf497f 100644
--- a/src/clrmodule/ClrModule.cs
+++ b/src/clrmodule/ClrModule.cs
@@ -1,13 +1,4 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
-//============================================================================
+//============================================================================
 // This file replaces the  hand-maintained stub that used to implement clr.dll.
 // This is a line-by-line port from IL back to C#.
 // We now use RGiesecke.DllExport on the required static init method so it can be
@@ -21,7 +12,7 @@
 // If defined, the "pythonRuntimeVersionString" variable must be set to
 // Python.Runtime's current version.
 
-#define USE_PYTHON_RUNTIME_VERSION 
+#define USE_PYTHON_RUNTIME_VERSION
 
 // If defined, the "PythonRuntimePublicKeyTokenData" data array must be
 // set to Python.Runtime's public key token. (sn -T Python.Runtin.dll)
@@ -32,13 +23,9 @@
 //============================================================================
 using System;
 
-// ReSharper disable CheckNamespace
-// ReSharper disable InconsistentNaming
+
 public class clrModule
-// ReSharper restore InconsistentNaming
-// ReSharper restore CheckNamespace
 {
-// ReSharper disable InconsistentNaming
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     [RGiesecke.DllExport.DllExport("PyInit_clr", System.Runtime.InteropServices.CallingConvention.StdCall)]
     public static IntPtr PyInit_clr()
@@ -46,7 +33,6 @@ public static IntPtr PyInit_clr()
     [RGiesecke.DllExport.DllExport("initclr", System.Runtime.InteropServices.CallingConvention.StdCall)]
     public static void initclr()
 #endif
-// ReSharper restore InconsistentNaming    
     {
 #if DEBUG_PRINT
         System.Console.WriteLine("Attempting to load Python.Runtime using standard binding rules... ");
@@ -62,12 +48,12 @@ public static void initclr()
         // - A PrivateBinPath under ApplicationBase
         // With an unsigned assembly, the GAC is skipped.
         var pythonRuntimeName = new System.Reflection.AssemblyName("Python.Runtime")
-            {
+        {
 #if USE_PYTHON_RUNTIME_VERSION
-                Version = new System.Version("4.0.0.1"), 
+            Version = new System.Version("4.0.0.1"),
 #endif
-                CultureInfo = System.Globalization.CultureInfo.InvariantCulture,
-            };
+            CultureInfo = System.Globalization.CultureInfo.InvariantCulture,
+        };
 #if USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN
         pythonRuntimeName.SetPublicKeyToken(pythonRuntimePublicKeyTokenData);
 #endif
@@ -85,13 +71,13 @@ public static void initclr()
             try
             {
                 // If the above fails for any reason, we fallback to attempting to load "Python.Runtime.dll"
-			    // from the directory this assembly is running in. "This assembly" is probably "clr.pyd",
-			    // sitting somewhere in PYTHONPATH.  This is using Assembly.LoadFrom, and inherits all the
-			    // caveats of that call.  See MSDN docs for details.
-			    // Suzanne Cook's blog is also an excellent source of info on this:
-			    // http://blogs.msdn.com/suzcook/
-			    // http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx
-			    // http://blogs.msdn.com/suzcook/archive/2003/06/13/57180.aspx
+                // from the directory this assembly is running in. "This assembly" is probably "clr.pyd",
+                // sitting somewhere in PYTHONPATH.  This is using Assembly.LoadFrom, and inherits all the
+                // caveats of that call.  See MSDN docs for details.
+                // Suzanne Cook's blog is also an excellent source of info on this:
+                // http://blogs.msdn.com/suzcook/
+                // http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx
+                // http://blogs.msdn.com/suzcook/archive/2003/06/13/57180.aspx
 
                 var executingAssembly = System.Reflection.Assembly.GetExecutingAssembly();
                 var assemblyDirectory = System.IO.Path.GetDirectoryName(executingAssembly.Location);
@@ -103,7 +89,8 @@ public static void initclr()
 #endif
                 pythonRuntime = System.Reflection.Assembly.LoadFrom(pythonRuntimeDllPath);
             }
-            catch (System.InvalidOperationException) {
+            catch (System.InvalidOperationException)
+            {
 #if DEBUG_PRINT
                 System.Console.WriteLine("Could not load Python.Runtime, so sad.");
 #endif
@@ -116,7 +103,7 @@ public static void initclr()
         }
 
         // Once here, we've successfully loaded SOME version of Python.Runtime
-		// So now we get the PythonEngine and execute the InitExt method on it.
+        // So now we get the PythonEngine and execute the InitExt method on it.
         var pythonEngineType = pythonRuntime.GetType("Python.Runtime.PythonEngine");
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
@@ -125,4 +112,4 @@ public static void initclr()
         pythonEngineType.InvokeMember("InitExt", System.Reflection.BindingFlags.InvokeMethod, null, null, null);
 #endif
     }
-}
+}
\ No newline at end of file
diff --git a/src/clrmodule/Properties/AssemblyInfo.cs b/src/clrmodule/Properties/AssemblyInfo.cs
index dbf311d9a..c9658c0b5 100644
--- a/src/clrmodule/Properties/AssemblyInfo.cs
+++ b/src/clrmodule/Properties/AssemblyInfo.cs
@@ -2,9 +2,10 @@
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
-// General Information about an assembly is controlled through the following 
+// General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
+
 [assembly: AssemblyTitle("clrmodule")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
@@ -14,23 +15,26 @@
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
 // COM, set the ComVisible attribute to true on that type.
+
 [assembly: ComVisible(false)]
 
 // The following GUID is for the ID of the typelib if this project is exposed to COM
+
 [assembly: Guid("ae10d6a4-55c2-482f-9716-9988e6c169e3")]
 
 // Version information for an assembly consists of the following four values:
 //
 //      Major Version
-//      Minor Version 
+//      Minor Version
 //      Build Number
 //      Revision
 //
-// You can specify all the values or you can default the Build and Revision Numbers 
+// You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
+
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/clrmodule/clrmodule.csproj b/src/clrmodule/clrmodule.csproj
index f6d1a41b5..97f74a52b 100644
--- a/src/clrmodule/clrmodule.csproj
+++ b/src/clrmodule/clrmodule.csproj
@@ -40,7 +40,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseMono|x86'">
     <OutputPath>bin\x86\ReleaseMono\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x86</PlatformTarget>
@@ -51,7 +52,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseMono|x64'">
     <OutputPath>bin\x64\ReleaseMono\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x64</PlatformTarget>
@@ -84,7 +86,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x86'">
     <OutputPath>bin\x86\ReleaseWin\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x86</PlatformTarget>
@@ -95,7 +98,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
     <OutputPath>bin\x64\ReleaseWin\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x64</PlatformTarget>
@@ -124,8 +128,8 @@
     <TargetAssemblyPdb>$(TargetDir)$(TargetName).pdb</TargetAssemblyPdb>
   </PropertyGroup>
   <Target Name="AfterBuild" DependsOnTargets="RGieseckeDllExport">
-	<Copy SourceFiles="$(TargetAssembly)" DestinationFiles="$(PythonBuildDir)\clr.pyd" />
-	<Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFiles="$(PythonBuildDir)\clr.pdb" />
+    <Copy SourceFiles="$(TargetAssembly)" DestinationFiles="$(PythonBuildDir)\clr.pyd" />
+    <Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFiles="$(PythonBuildDir)\clr.pdb" />
   </Target>
   <Import Project="../../packages/UnmanagedExports.1.2.6/tools/RGiesecke.DllExport.targets" Condition="Exists('../../packages/UnmanagedExports.1.2.6/tools/RGiesecke.DllExport.targets')" />
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/clrmodule/packages.config b/src/clrmodule/packages.config
index 05f605e37..840a448c3 100644
--- a/src/clrmodule/packages.config
+++ b/src/clrmodule/packages.config
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+
 <packages>
   <package id="UnmanagedExports" version="1.2.6" targetFramework="net40" />
 </packages>
\ No newline at end of file
diff --git a/src/console/Console.csproj b/src/console/Console.csproj
index 95c1214d1..77406e6c5 100644
--- a/src/console/Console.csproj
+++ b/src/console/Console.csproj
@@ -18,7 +18,7 @@
     <ProductVersion>10.0.0</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
-  	<PythonBuildDir Condition=" '$(PythonBuildDir)' == '' ">$(SolutionDir)</PythonBuildDir>
+    <PythonBuildDir Condition=" '$(PythonBuildDir)' == '' ">$(SolutionDir)</PythonBuildDir>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>True</DebugSymbols>
@@ -213,6 +213,6 @@
     <VisualStudio AllowExistingFolder="true" />
   </ProjectExtensions>
   <Target Name="AfterBuild">
-	<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(PythonBuildDir)" />
+    <Copy SourceFiles="$(TargetPath)" DestinationFolder="$(PythonBuildDir)" />
   </Target>
 </Project>
\ No newline at end of file
diff --git a/src/console/app.config b/src/console/app.config
index e36560333..e7368c65b 100644
--- a/src/console/app.config
+++ b/src/console/app.config
@@ -1,3 +1,7 @@
 <?xml version="1.0"?>
+
 <configuration>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
+  </startup>
+</configuration>
\ No newline at end of file
diff --git a/src/console/assemblyinfo.cs b/src/console/assemblyinfo.cs
index 90ddd10b7..51a280e7a 100644
--- a/src/console/assemblyinfo.cs
+++ b/src/console/assemblyinfo.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Security.Permissions;
@@ -19,11 +10,9 @@
 [assembly: AssemblyDefaultAliasAttribute("python.exe")]
 [assembly: CLSCompliant(true)]
 [assembly: ComVisible(false)]
-
-
-[assembly:PermissionSetAttribute(SecurityAction.RequestMinimum, 
-                                 Name = "FullTrust")]
+[assembly: PermissionSetAttribute(SecurityAction.RequestMinimum,
+    Name = "FullTrust")]
 [assembly: AssemblyDescriptionAttribute("")]
 [assembly: AssemblyCopyrightAttribute("Zope Public License, Version 2.0 (ZPL)")]
 [assembly: AssemblyFileVersionAttribute("2.0.0.4")]
-[assembly: NeutralResourcesLanguageAttribute("en")]
+[assembly: NeutralResourcesLanguageAttribute("en")]
\ No newline at end of file
diff --git a/src/console/pythonconsole.cs b/src/console/pythonconsole.cs
index 26fc756d5..c97c0943b 100644
--- a/src/console/pythonconsole.cs
+++ b/src/console/pythonconsole.cs
@@ -1,72 +1,69 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Collections.Generic;
 using Python.Runtime;
 
-namespace Python.Runtime {
-
-public sealed class PythonConsole {
-
-    private PythonConsole() {}
-
-    [STAThread]
-    public static int Main(string[] args) {
-	// reference the static assemblyLoader to stop it being optimized away
-        AssemblyLoader a = assemblyLoader;
+namespace Python.Runtime
+{
+    public sealed class PythonConsole
+    {
+        private PythonConsole()
+        {
+        }
 
-        string [] cmd = Environment.GetCommandLineArgs();
-        PythonEngine.Initialize();
+        [STAThread]
+        public static int Main(string[] args)
+        {
+            // reference the static assemblyLoader to stop it being optimized away
+            AssemblyLoader a = assemblyLoader;
 
-        int i = Runtime.Py_Main(cmd.Length, cmd);
-        PythonEngine.Shutdown();
+            string[] cmd = Environment.GetCommandLineArgs();
+            PythonEngine.Initialize();
 
-        return i;
-    }
+            int i = Runtime.Py_Main(cmd.Length, cmd);
+            PythonEngine.Shutdown();
 
-    // Register a callback function to load embedded assmeblies.
-    // (Python.Runtime.dll is included as a resource)
-    private sealed class AssemblyLoader {
-        Dictionary<string, Assembly> loadedAssemblies;
+            return i;
+        }
 
-        public AssemblyLoader() {
-            loadedAssemblies = new Dictionary<string, Assembly>();
+        // Register a callback function to load embedded assmeblies.
+        // (Python.Runtime.dll is included as a resource)
+        private sealed class AssemblyLoader
+        {
+            Dictionary<string, Assembly> loadedAssemblies;
 
-            AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => {
-                string shortName = args.Name.Split(',')[0];
-                String resourceName = shortName + ".dll";
+            public AssemblyLoader()
+            {
+                loadedAssemblies = new Dictionary<string, Assembly>();
 
-                if (loadedAssemblies.ContainsKey(resourceName)) {
-                    return loadedAssemblies[resourceName];
-                }
+                AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
+                {
+                    string shortName = args.Name.Split(',')[0];
+                    String resourceName = shortName + ".dll";
 
-                // looks for the assembly from the resources and load it
-                using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) {
-                    if (stream != null) {
-                        Byte[] assemblyData = new Byte[stream.Length];
-                        stream.Read(assemblyData, 0, assemblyData.Length);
-                        Assembly assembly = Assembly.Load(assemblyData);
-                        loadedAssemblies[resourceName] = assembly;
-                        return assembly;
+                    if (loadedAssemblies.ContainsKey(resourceName))
+                    {
+                        return loadedAssemblies[resourceName];
                     }
-                }
 
-                return null;
-            };
-        }
-    };
-
-    private static AssemblyLoader assemblyLoader = new AssemblyLoader();
-
-};
+                    // looks for the assembly from the resources and load it
+                    using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
+                    {
+                        if (stream != null)
+                        {
+                            Byte[] assemblyData = new Byte[stream.Length];
+                            stream.Read(assemblyData, 0, assemblyData.Length);
+                            Assembly assembly = Assembly.Load(assemblyData);
+                            loadedAssemblies[resourceName] = assembly;
+                            return assembly;
+                        }
+                    }
 
+                    return null;
+                };
+            }
+        };
 
-}
+        private static AssemblyLoader assemblyLoader = new AssemblyLoader();
+    };
+}
\ No newline at end of file
diff --git a/src/embed_tests/Python.EmbeddingTest.csproj b/src/embed_tests/Python.EmbeddingTest.csproj
index e4a9750b8..80a4a9820 100644
--- a/src/embed_tests/Python.EmbeddingTest.csproj
+++ b/src/embed_tests/Python.EmbeddingTest.csproj
@@ -59,7 +59,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseMono|x86'">
     <OutputPath>bin\x86\ReleaseMono\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x86</PlatformTarget>
@@ -70,7 +71,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseMono|x64'">
     <OutputPath>bin\x64\ReleaseMono\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x64</PlatformTarget>
@@ -89,7 +91,7 @@
     <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
-  </PropertyGroup>  
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|x64'">
     <DebugSymbols>true</DebugSymbols>
     <OutputPath>bin\x64\DebugWin\</OutputPath>
@@ -103,7 +105,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x86'">
     <OutputPath>bin\x86\ReleaseWin\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x86</PlatformTarget>
@@ -114,7 +117,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
     <OutputPath>bin\x64\ReleaseWin\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x64</PlatformTarget>
@@ -177,7 +181,7 @@
     <TargetAssemblyPdb>$(TargetDir)$(TargetName).pdb</TargetAssemblyPdb>
   </PropertyGroup>
   <Target Name="AfterBuild">
-	<Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" />
-	<Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" />
+    <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" />
+    <Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" />
   </Target>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/embed_tests/packages.config b/src/embed_tests/packages.config
index 5c3ca54dd..163c6c929 100644
--- a/src/embed_tests/packages.config
+++ b/src/embed_tests/packages.config
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+
 <packages>
   <package id="NUnit" version="2.6.2" targetFramework="net40" />
 </packages>
\ No newline at end of file
diff --git a/src/embed_tests/pyimport.cs b/src/embed_tests/pyimport.cs
index 35b81f80b..58da0ac13 100644
--- a/src/embed_tests/pyimport.cs
+++ b/src/embed_tests/pyimport.cs
@@ -20,7 +20,7 @@ public void SetUp()
             //string here = Environment.CurrentDirectory;
             //trunk\pythonnet\src\embed_tests\bin\x86\DebugWin
 
-            /* 
+            /*
              * Append the tests directory to sys.path
              * using reflection to circumvent the private modifires placed on most Runtime methods.
              */
@@ -29,19 +29,21 @@ public void SetUp()
             Type RTClass = typeof(Runtime.Runtime);
 
             /* pyStrPtr = PyString_FromString(s); */
-            MethodInfo PyString_FromString = RTClass.GetMethod("PyString_FromString", BindingFlags.NonPublic | BindingFlags.Static);
+            MethodInfo PyString_FromString = RTClass.GetMethod("PyString_FromString",
+                BindingFlags.NonPublic | BindingFlags.Static);
             object[] funcArgs = new object[1];
             funcArgs[0] = s;
             IntPtr pyStrPtr = (IntPtr)PyString_FromString.Invoke(null, funcArgs);
 
             /* SysDotPath = sys.path */
-            MethodInfo PySys_GetObject = RTClass.GetMethod("PySys_GetObject", BindingFlags.NonPublic | BindingFlags.Static);
+            MethodInfo PySys_GetObject = RTClass.GetMethod("PySys_GetObject",
+                BindingFlags.NonPublic | BindingFlags.Static);
             funcArgs[0] = "path";
             IntPtr SysDotPath = (IntPtr)PySys_GetObject.Invoke(null, funcArgs);
 
             /* SysDotPath.append(*pyStrPtr) */
             MethodInfo PyList_Append = RTClass.GetMethod("PyList_Append", BindingFlags.NonPublic | BindingFlags.Static);
-            funcArgs = new object[] {SysDotPath, pyStrPtr};
+            funcArgs = new object[] { SysDotPath, pyStrPtr };
             int r = (int)PyList_Append.Invoke(null, funcArgs);
         }
 
@@ -57,7 +59,7 @@ public void TearDown()
         /// </summary>
         /// <remarks>
         /// The required directory structure was added to the \trunk\pythonnet\src\tests directory:
-        /// 
+        ///
         ///     PyImportTest/
         ///         __init__.py
         ///         test/
diff --git a/src/embed_tests/pyiter.cs b/src/embed_tests/pyiter.cs
index fe1298d51..4939e22fe 100644
--- a/src/embed_tests/pyiter.cs
+++ b/src/embed_tests/pyiter.cs
@@ -35,9 +35,9 @@ public void TestOnPyList()
             foreach (PyObject item in list)
                 result.Add(item.ToString());
             Assert.AreEqual(3, result.Count);
-            Assert.AreEqual("foo",result[0]);
-            Assert.AreEqual("bar",result[1]);
-            Assert.AreEqual("baz",result[2]);
+            Assert.AreEqual("foo", result[0]);
+            Assert.AreEqual("bar", result[1]);
+            Assert.AreEqual("baz", result[2]);
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/embed_tests/pyobject.cs b/src/embed_tests/pyobject.cs
index 62d24da0c..ba267c3a5 100644
--- a/src/embed_tests/pyobject.cs
+++ b/src/embed_tests/pyobject.cs
@@ -27,7 +27,7 @@ public void TearDown()
         public void TestUnicode()
         {
             PyObject s = new PyString("foo\u00e9");
-            Assert.AreEqual("foo\u00e9",s.ToString());
+            Assert.AreEqual("foo\u00e9", s.ToString());
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/embed_tests/pythonexception.cs b/src/embed_tests/pythonexception.cs
index f0bc39def..359040601 100644
--- a/src/embed_tests/pythonexception.cs
+++ b/src/embed_tests/pythonexception.cs
@@ -44,4 +44,4 @@ public void TestNoError()
             Assert.AreEqual("", e.Message);
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/monoclr/clrmod.c b/src/monoclr/clrmod.c
index c6de71eeb..30a093ce6 100644
--- a/src/monoclr/clrmod.c
+++ b/src/monoclr/clrmod.c
@@ -1,15 +1,6 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-//
 // Author: Christian Heimes <christian(at)cheimes(dot)de>
 
-#include "pynetclr.h" 
+#include "pynetclr.h"
 
 /* List of functions defined in the module */
 static PyMethodDef clr_methods[] = {
@@ -75,4 +66,3 @@ initclr(void) {
     _initclr();
 }
 #endif
-
diff --git a/src/monoclr/pynetclr.h b/src/monoclr/pynetclr.h
index 3a6a60c9c..fe0d81190 100644
--- a/src/monoclr/pynetclr.h
+++ b/src/monoclr/pynetclr.h
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-//
 // Author: Christian Heimes <christian(at)cheimes(dot)de>
 
 #ifndef PYNET_CLR_H
@@ -41,4 +32,3 @@ void main_thread_handler(gpointer user_data);
 char* PyNet_ExceptionToString(MonoObject *);
 
 #endif // PYNET_CLR_H
-
diff --git a/src/monoclr/pynetinit.c b/src/monoclr/pynetinit.c
index df9d67c9a..547c6dcd5 100644
--- a/src/monoclr/pynetinit.c
+++ b/src/monoclr/pynetinit.c
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-//
 // Author: Christian Heimes <christian(at)cheimes(dot)de>
 
 #include "pynetclr.h"
@@ -53,14 +44,14 @@ PyNet_Args* PyNet_Init(int ext) {
      * mono_runtime_exec_managed_code(pn_args->domain, main_thread_handler,
      *                                pn_args);
      */
-                                   
+
     main_thread_handler(pn_args);
 
     if (pn_args->error != NULL) {
         PyErr_SetString(PyExc_ImportError, pn_args->error);
     }
     return pn_args;
-} 
+}
 
 // Shuts down PythonNet and cleans up Mono
 void PyNet_Finalize(PyNet_Args *pn_args) {
@@ -73,7 +64,7 @@ void PyNet_Finalize(PyNet_Args *pn_args) {
         }
         pn_args->shutdown = NULL;
     }
-    
+
     if (pn_args->domain) {
         mono_jit_cleanup(pn_args->domain);
         pn_args->domain = NULL;
@@ -225,7 +216,7 @@ void main_thread_handler (gpointer user_data) {
 
 }
 
-// Get string from a Mono exception 
+// Get string from a Mono exception
 char* PyNet_ExceptionToString(MonoObject *e) {
     MonoMethodDesc* mdesc = mono_method_desc_new(":ToString()", FALSE);
     MonoMethod* mmethod = mono_method_desc_search_in_class(mdesc, mono_get_object_class());
@@ -236,4 +227,3 @@ char* PyNet_ExceptionToString(MonoObject *e) {
     mono_runtime_invoke(mmethod, e, NULL, NULL);
     return mono_string_to_utf8(monoString);
 }
-
diff --git a/src/runtime/Python.Runtime.csproj b/src/runtime/Python.Runtime.csproj
index 7bfaff313..1e54d2742 100644
--- a/src/runtime/Python.Runtime.csproj
+++ b/src/runtime/Python.Runtime.csproj
@@ -9,7 +9,7 @@
     <AssemblyName>Python.Runtime</AssemblyName>
     <RootNamespace>Python.Runtime</RootNamespace>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
-  	<PythonBuildDir Condition=" '$(PythonBuildDir)' == '' ">$(SolutionDir)</PythonBuildDir>
+    <PythonBuildDir Condition=" '$(PythonBuildDir)' == '' ">$(SolutionDir)</PythonBuildDir>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseMono|x86'">
     <OutputPath>bin\x86\ReleaseMono\</OutputPath>
@@ -94,27 +94,27 @@
     <DebugType>full</DebugType>
     <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
-	<Choose>
-        <When Condition=" '$(Configuration)'=='DebugMono' ">
-            <ItemGroup>
-				<Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
-				  <SpecificVersion>False</SpecificVersion>
-				  <HintPath>..\..\packages\MonoGAC\Mono.Posix\4.0.0.0__0738eb9f132ed756\Mono.Posix.dll</HintPath>
-				</Reference>
-            </ItemGroup>
-        </When>
-        <When Condition=" '$(Configuration)'=='ReleaseMono' ">
-            <ItemGroup>
-				<Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
-				  <SpecificVersion>False</SpecificVersion>
-				  <HintPath>..\..\packages\MonoGAC\Mono.Posix\4.0.0.0__0738eb9f132ed756\Mono.Posix.dll</HintPath>
-				</Reference>
-            </ItemGroup>
-        </When>
-    </Choose>
-	<ItemGroup>
-		<Reference Include="System" />
-	</ItemGroup>
+  <Choose>
+    <When Condition=" '$(Configuration)'=='DebugMono' ">
+      <ItemGroup>
+        <Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
+          <SpecificVersion>False</SpecificVersion>
+          <HintPath>..\..\packages\MonoGAC\Mono.Posix\4.0.0.0__0738eb9f132ed756\Mono.Posix.dll</HintPath>
+        </Reference>
+      </ItemGroup>
+    </When>
+    <When Condition=" '$(Configuration)'=='ReleaseMono' ">
+      <ItemGroup>
+        <Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
+          <SpecificVersion>False</SpecificVersion>
+          <HintPath>..\..\packages\MonoGAC\Mono.Posix\4.0.0.0__0738eb9f132ed756\Mono.Posix.dll</HintPath>
+        </Reference>
+      </ItemGroup>
+    </When>
+  </Choose>
+  <ItemGroup>
+    <Reference Include="System" />
+  </ItemGroup>
   <ItemGroup>
     <Compile Include="arrayobject.cs" />
     <Compile Include="assemblyinfo.cs" />
@@ -194,7 +194,7 @@
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="resources\clr.py">
-        <LogicalName>clr.py</LogicalName>
+      <LogicalName>clr.py</LogicalName>
     </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
@@ -206,7 +206,7 @@
     <TargetAssemblyPdb>$(TargetDir)$(TargetName).pdb</TargetAssemblyPdb>
   </PropertyGroup>
   <Target Name="AfterBuild">
-	<Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" />
-	<Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" />
+    <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" />
+    <Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" />
   </Target>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/runtime/arrayobject.cs b/src/runtime/arrayobject.cs
index c96fbd23c..2fe433e57 100644
--- a/src/runtime/arrayobject.cs
+++ b/src/runtime/arrayobject.cs
@@ -1,41 +1,37 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Implements a Python type for managed arrays. This type is essentially
-    /// the same as a ClassObject, except that it provides sequence semantics 
+    /// the same as a ClassObject, except that it provides sequence semantics
     /// to support natural array usage (indexing) from Python.
     /// </summary>
+    internal class ArrayObject : ClassBase
+    {
+        internal ArrayObject(Type tp) : base(tp)
+        {
+        }
 
-    internal class ArrayObject : ClassBase {
-
-        internal ArrayObject(Type tp) : base(tp) {}
-
-        internal override bool CanSubclass() {
+        internal override bool CanSubclass()
+        {
             return false;
         }
 
-        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
+        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw)
+        {
             ArrayObject self = GetManagedObject(tp) as ArrayObject;
-            if (Runtime.PyTuple_Size(args) != 1) {
+            if (Runtime.PyTuple_Size(args) != 1)
+            {
                 return Exceptions.RaiseTypeError("array expects 1 argument");
             }
             IntPtr op = Runtime.PyTuple_GetItem(args, 0);
             Object result;
 
-            if (!Converter.ToManaged(op, self.type, out result, true)) {
+            if (!Converter.ToManaged(op, self.type, out result, true))
+            {
                 return IntPtr.Zero;
             }
             return CLRObject.GetInstHandle(result, tp);
@@ -46,7 +42,8 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
         // Implements __getitem__ for array types.
         //====================================================================
 
-        public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
+        public static IntPtr mp_subscript(IntPtr ob, IntPtr idx)
+        {
             CLRObject obj = (CLRObject)ManagedType.GetManagedObject(ob);
             Array items = obj.inst as Array;
             Type itemType = obj.inst.GetType().GetElementType();
@@ -57,31 +54,36 @@ public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
             // Note that CLR 1.0 only supports int indexes - methods to
             // support long indices were introduced in 1.1. We could
             // support long indices automatically, but given that long
-            // indices are not backward compatible and a relative edge 
+            // indices are not backward compatible and a relative edge
             // case, we won't bother for now.
 
             // Single-dimensional arrays are the most common case and are
             // cheaper to deal with than multi-dimensional, so check first.
 
-            if (rank == 1) {
+            if (rank == 1)
+            {
                 index = (int)Runtime.PyInt_AsLong(idx);
 
-                if (Exceptions.ErrorOccurred()) {
+                if (Exceptions.ErrorOccurred())
+                {
                     return Exceptions.RaiseTypeError("invalid index value");
                 }
 
-                if (index < 0) {
+                if (index < 0)
+                {
                     index = items.Length + index;
                 }
 
-                try {
+                try
+                {
                     value = items.GetValue(index);
                 }
-                catch (IndexOutOfRangeException) {
+                catch (IndexOutOfRangeException)
+                {
                     Exceptions.SetError(Exceptions.IndexError,
-                                        "array index out of range"
-                                        );
-                    return IntPtr.Zero; 
+                        "array index out of range"
+                        );
+                    return IntPtr.Zero;
                 }
 
                 return Converter.ToPython(items.GetValue(index), itemType);
@@ -89,10 +91,11 @@ public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
 
             // Multi-dimensional arrays can be indexed a la: list[1, 2, 3].
 
-            if (!Runtime.PyTuple_Check(idx)) {
+            if (!Runtime.PyTuple_Check(idx))
+            {
                 Exceptions.SetError(Exceptions.TypeError,
-                                    "invalid index value"
-                                    );
+                    "invalid index value"
+                    );
                 return IntPtr.Zero;
             }
 
@@ -100,29 +103,34 @@ public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
 
             Array args = Array.CreateInstance(typeof(Int32), count);
 
-            for (int i = 0; i < count; i++) {
+            for (int i = 0; i < count; i++)
+            {
                 IntPtr op = Runtime.PyTuple_GetItem(idx, i);
                 index = (int)Runtime.PyInt_AsLong(op);
 
-                if (Exceptions.ErrorOccurred()) {
+                if (Exceptions.ErrorOccurred())
+                {
                     return Exceptions.RaiseTypeError("invalid index value");
                 }
 
-                if (index < 0) {
+                if (index < 0)
+                {
                     index = items.GetLength(i) + index;
                 }
 
                 args.SetValue(index, i);
             }
 
-            try {
-                value = items.GetValue((int[]) args);
+            try
+            {
+                value = items.GetValue((int[])args);
             }
-            catch (IndexOutOfRangeException) {
+            catch (IndexOutOfRangeException)
+            {
                 Exceptions.SetError(Exceptions.IndexError,
-                                    "array index out of range"
-                                    );
-                return IntPtr.Zero; 
+                    "array index out of range"
+                    );
+                return IntPtr.Zero;
             }
 
             return Converter.ToPython(value, itemType);
@@ -133,7 +141,8 @@ public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
         // Implements __setitem__ for array types.
         //====================================================================
 
-        public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
+        public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v)
+        {
             CLRObject obj = (CLRObject)ManagedType.GetManagedObject(ob);
             Array items = obj.inst as Array;
             Type itemType = obj.inst.GetType().GetElementType();
@@ -141,41 +150,49 @@ public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
             int index = 0;
             object value;
 
-            if (items.IsReadOnly) {
+            if (items.IsReadOnly)
+            {
                 Exceptions.RaiseTypeError("array is read-only");
                 return -1;
             }
 
-            if (!Converter.ToManaged(v, itemType, out value, true)) {
+            if (!Converter.ToManaged(v, itemType, out value, true))
+            {
                 return -1;
             }
 
-            if (rank == 1) {
+            if (rank == 1)
+            {
                 index = (int)Runtime.PyInt_AsLong(idx);
 
-                if (Exceptions.ErrorOccurred()) {
+                if (Exceptions.ErrorOccurred())
+                {
                     Exceptions.RaiseTypeError("invalid index value");
                     return -1;
                 }
 
-                if (index < 0) {
+                if (index < 0)
+                {
                     index = items.Length + index;
                 }
 
-                try {
+                try
+                {
                     items.SetValue(value, index);
                 }
-                catch (IndexOutOfRangeException) {
+                catch (IndexOutOfRangeException)
+                {
                     Exceptions.SetError(Exceptions.IndexError,
-                                        "array index out of range"
-                                        );
-                    return -1; 
+                        "array index out of range"
+                        );
+                    return -1;
                 }
 
                 return 0;
             }
 
-            if (!Runtime.PyTuple_Check(idx)) {
+            if (!Runtime.PyTuple_Check(idx))
+            {
                 Exceptions.RaiseTypeError("invalid index value");
                 return -1;
             }
@@ -184,29 +201,34 @@ public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
 
             Array args = Array.CreateInstance(typeof(Int32), count);
 
-            for (int i = 0; i < count; i++) {
+            for (int i = 0; i < count; i++)
+            {
                 IntPtr op = Runtime.PyTuple_GetItem(idx, i);
                 index = (int)Runtime.PyInt_AsLong(op);
 
-                if (Exceptions.ErrorOccurred()) {
+                if (Exceptions.ErrorOccurred())
+                {
                     Exceptions.RaiseTypeError("invalid index value");
                     return -1;
                 }
 
-                if (index < 0) {
+                if (index < 0)
+                {
                     index = items.GetLength(i) + index;
                 }
 
                 args.SetValue(index, i);
             }
 
-            try {
+            try
+            {
                 items.SetValue(value, (int[])args);
             }
-            catch (IndexOutOfRangeException) {
+            catch (IndexOutOfRangeException)
+            {
                 Exceptions.SetError(Exceptions.IndexError,
-                                    "array index out of range"
-                                    );
+                    "array index out of range"
+                    );
                 return -1;
             }
 
@@ -218,17 +240,20 @@ public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
         // Implements __contains__ for array types.
         //====================================================================
 
-        public static int sq_contains(IntPtr ob, IntPtr v) {
+        public static int sq_contains(IntPtr ob, IntPtr v)
+        {
             CLRObject obj = (CLRObject)ManagedType.GetManagedObject(ob);
             Type itemType = obj.inst.GetType().GetElementType();
             IList items = obj.inst as IList;
             object value;
 
-            if (!Converter.ToManaged(v, itemType, out value, false)) {
+            if (!Converter.ToManaged(v, itemType, out value, false))
+            {
                 return 0;
             }
 
-            if (items.Contains(value)) {
+            if (items.Contains(value))
+            {
                 return 1;
             }
 
@@ -240,13 +265,11 @@ public static int sq_contains(IntPtr ob, IntPtr v) {
         // Implements __len__ for array types.
         //====================================================================
 
-        public static int mp_length(IntPtr ob) {
+        public static int mp_length(IntPtr ob)
+        {
             CLRObject self = (CLRObject)ManagedType.GetManagedObject(ob);
             Array items = self.inst as Array;
             return items.Length;
         }
-
-
-    }        
-
-}
+    }
+}
\ No newline at end of file
diff --git a/src/runtime/assemblyinfo.cs b/src/runtime/assemblyinfo.cs
index d1645d402..609ba342a 100644
--- a/src/runtime/assemblyinfo.cs
+++ b/src/runtime/assemblyinfo.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Runtime.InteropServices;
@@ -17,7 +8,6 @@
 [assembly: AssemblyDefaultAliasAttribute("Python.Runtime.dll")]
 [assembly: CLSCompliant(true)]
 [assembly: ComVisible(false)]
-
 [assembly: AssemblyCopyrightAttribute("Zope Public License, Version 2.0 (ZPL)")]
 [assembly: AssemblyFileVersionAttribute("2.0.0.2")]
 [assembly: NeutralResourcesLanguageAttribute("en")]
@@ -39,6 +29,7 @@
 [assembly: AssemblyDescriptionAttribute("Python Runtime for Python 2.6")]
 #endif
 #if (PYTHON27)
+
 [assembly: AssemblyTitle("Python.Runtime for Python 2.7")]
 [assembly: AssemblyDescription("Python Runtime for Python 2.7")]
-#endif
+#endif
\ No newline at end of file
diff --git a/src/runtime/assemblymanager.cs b/src/runtime/assemblymanager.cs
index a217e84e2..afc80d020 100644
--- a/src/runtime/assemblymanager.cs
+++ b/src/runtime/assemblymanager.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.IO;
 using System.Collections;
@@ -16,15 +7,14 @@
 using System.Reflection;
 using System.Reflection.Emit;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
-    /// The AssemblyManager maintains information about loaded assemblies  
+    /// The AssemblyManager maintains information about loaded assemblies
     /// namespaces and provides an interface for name-based type lookup.
     /// </summary>
-
-    internal class AssemblyManager {
-
+    internal class AssemblyManager
+    {
         static Dictionary<string, Dictionary<Assembly, string>> namespaces;
         //static Dictionary<string, Dictionary<string, string>> generics;
         static AssemblyLoadEventHandler lhandler;
@@ -33,7 +23,9 @@ internal class AssemblyManager {
         static List<Assembly> assemblies;
         internal static List<string> pypath;
 
-        private AssemblyManager() {}
+        private AssemblyManager()
+        {
+        }
 
         //===================================================================
         // Initialization performed on startup of the Python runtime. Here we
@@ -41,9 +33,10 @@ private AssemblyManager() {}
         // names, and register to be notified of new assembly loads.
         //===================================================================
 
-        internal static void Initialize() {
-            namespaces = new 
-                         Dictionary<string, Dictionary<Assembly, string>>(32);
+        internal static void Initialize()
+        {
+            namespaces = new
+                Dictionary<string, Dictionary<Assembly, string>>(32);
             probed = new Dictionary<string, int>(32);
             //generics = new Dictionary<string, Dictionary<string, string>>();
             assemblies = new List<Assembly>(16);
@@ -54,7 +47,7 @@ internal static void Initialize() {
             lhandler = new AssemblyLoadEventHandler(AssemblyLoadHandler);
             domain.AssemblyLoad += lhandler;
 
-            rhandler = new ResolveEventHandler(ResolveHandler);        
+            rhandler = new ResolveEventHandler(ResolveHandler);
             domain.AssemblyResolve += rhandler;
 
             Assembly[] items = domain.GetAssemblies();
@@ -77,7 +70,8 @@ internal static void Initialize() {
         // Cleanup resources upon shutdown of the Python runtime.
         //===================================================================
 
-        internal static void Shutdown() {
+        internal static void Shutdown()
+        {
             AppDomain domain = AppDomain.CurrentDomain;
             domain.AssemblyLoad -= lhandler;
             domain.AssemblyResolve -= rhandler;
@@ -85,14 +79,15 @@ internal static void Shutdown() {
 
 
         //===================================================================
-        // Event handler for assembly load events. At the time the Python 
+        // Event handler for assembly load events. At the time the Python
         // runtime loads, we scan the app domain to map the assemblies that
         // are loaded at the time. We also have to register this event handler
-        // so that we can know about assemblies that get loaded after the 
+        // so that we can know about assemblies that get loaded after the
         // Python runtime is initialized.
         //===================================================================
 
-        static void AssemblyLoadHandler(Object ob, AssemblyLoadEventArgs args){
+        static void AssemblyLoadHandler(Object ob, AssemblyLoadEventArgs args)
+        {
             Assembly assembly = args.LoadedAssembly;
             assemblies.Add(assembly);
             ScanAssembly(assembly);
@@ -107,12 +102,15 @@ static void AssemblyLoadHandler(Object ob, AssemblyLoadEventArgs args){
         // we loaded from Python which also needs to be found on PYTHONPATH.
         //===================================================================
 
-        static Assembly ResolveHandler(Object ob, ResolveEventArgs args){
+        static Assembly ResolveHandler(Object ob, ResolveEventArgs args)
+        {
             string name = args.Name.ToLower();
-            for (int i = 0; i < assemblies.Count; i++) {
+            for (int i = 0; i < assemblies.Count; i++)
+            {
                 Assembly a = (Assembly)assemblies[i];
                 string full = a.FullName.ToLower();
-                if (full.StartsWith(name)) {
+                if (full.StartsWith(name))
+                {
                     return a;
                 }
             }
@@ -122,27 +120,31 @@ static Assembly ResolveHandler(Object ob, ResolveEventArgs args){
 
         //===================================================================
         // We __really__ want to avoid using Python objects or APIs when
-        // probing for assemblies to load, since our ResolveHandler may be 
+        // probing for assemblies to load, since our ResolveHandler may be
         // called in contexts where we don't have the Python GIL and can't
         // even safely try to get it without risking a deadlock ;(
         //
-        // To work around that, we update a managed copy of sys.path (which 
+        // To work around that, we update a managed copy of sys.path (which
         // is the main thing we care about) when UpdatePath is called. The
         // import hook calls this whenever it knows its about to use the
         // assembly manager, which lets us keep up with changes to sys.path
         // in a relatively lightweight and low-overhead way.
         //===================================================================
 
-        internal static void UpdatePath() {
+        internal static void UpdatePath()
+        {
             IntPtr list = Runtime.PySys_GetObject("path");
             int count = Runtime.PyList_Size(list);
-            if (count != pypath.Count) {
+            if (count != pypath.Count)
+            {
                 pypath.Clear();
                 probed.Clear();
-                for (int i = 0; i < count; i++) {
+                for (int i = 0; i < count; i++)
+                {
                     IntPtr item = Runtime.PyList_GetItem(list, i);
                     string path = Runtime.GetManagedString(item);
-                    if (path != null) {
+                    if (path != null)
+                    {
                         pypath.Add(path);
                     }
                 }
@@ -156,26 +158,32 @@ internal static void UpdatePath() {
         // using standard load semantics (app base directory then GAC, etc.)
         //===================================================================
 
-        public static string FindAssembly(string name) {
+        public static string FindAssembly(string name)
+        {
             char sep = Path.DirectorySeparatorChar;
             string path;
             string temp;
 
-            for (int i = 0; i < pypath.Count; i++) {
+            for (int i = 0; i < pypath.Count; i++)
+            {
                 string head = pypath[i];
-                if (head == null || head.Length == 0) {
+                if (head == null || head.Length == 0)
+                {
                     path = name;
                 }
-                else {
+                else
+                {
                     path = head + sep + name;
                 }
 
                 temp = path + ".dll";
-                if (File.Exists(temp)) {
+                if (File.Exists(temp))
+                {
                     return temp;
                 }
                 temp = path + ".exe";
-                if (File.Exists(temp)) {
+                if (File.Exists(temp))
+                {
                     return temp;
                 }
             }
@@ -188,12 +196,15 @@ public static string FindAssembly(string name) {
         // given a simple assembly name. Returns the assembly if loaded.
         //===================================================================
 
-        public static Assembly LoadAssembly(string name) {
+        public static Assembly LoadAssembly(string name)
+        {
             Assembly assembly = null;
-            try {
+            try
+            {
                 assembly = Assembly.Load(name);
             }
-            catch (System.Exception e) {
+            catch (System.Exception e)
+            {
                 //if (!(e is System.IO.FileNotFoundException)) {
                 //    throw;
                 //}
@@ -206,29 +217,44 @@ public static Assembly LoadAssembly(string name) {
         // Loads an assembly using an augmented search path (the python path).
         //===================================================================
 
-        public static Assembly LoadAssemblyPath(string name) {
+        public static Assembly LoadAssemblyPath(string name)
+        {
             string path = FindAssembly(name);
             Assembly assembly = null;
-            if (path != null) {
-                try   { assembly = Assembly.LoadFrom(path); }
-                catch {}
+            if (path != null)
+            {
+                try
+                {
+                    assembly = Assembly.LoadFrom(path);
+                }
+                catch
+                {
+                }
             }
             return assembly;
         }
 
-        /// <summary>  
-        /// Loads an assembly using full path.  
-        /// </summary>  
-        /// <param name="name"></param>  
-        /// <returns></returns>  
-        public static Assembly LoadAssemblyFullPath(string name) {
+        /// <summary>
+        /// Loads an assembly using full path.
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static Assembly LoadAssemblyFullPath(string name)
+        {
             Assembly assembly = null;
-            if (Path.IsPathRooted(name)) {
+            if (Path.IsPathRooted(name))
+            {
                 if (!Path.HasExtension(name))
                     name = name + ".dll";
-                if (File.Exists(name)) {
-                    try { assembly = Assembly.LoadFrom(name); }
-                    catch { }
+                if (File.Exists(name))
+                {
+                    try
+                    {
+                        assembly = Assembly.LoadFrom(name);
+                    }
+                    catch
+                    {
+                    }
                 }
             }
             return assembly;
@@ -238,10 +264,13 @@ public static Assembly LoadAssemblyFullPath(string name) {
         // Returns an assembly that's already been loaded
         //===================================================================
 
-        public static Assembly FindLoadedAssembly(string name) {
-            for (int i = 0; i < assemblies.Count; i++) {
+        public static Assembly FindLoadedAssembly(string name)
+        {
+            for (int i = 0; i < assemblies.Count; i++)
+            {
                 Assembly a = (Assembly)assemblies[i];
-                if (a.GetName().Name == name) {
+                if (a.GetName().Name == name)
+                {
                     return a;
                 }
             }
@@ -249,7 +278,7 @@ public static Assembly FindLoadedAssembly(string name) {
         }
 
         //===================================================================
-        // Given a qualified name of the form A.B.C.D, attempt to load 
+        // Given a qualified name of the form A.B.C.D, attempt to load
         // an assembly named after each of A.B.C.D, A.B.C, A.B, A. This
         // will only actually probe for the assembly once for each unique
         // namespace. Returns true if any assemblies were loaded.
@@ -260,26 +289,33 @@ public static Assembly FindLoadedAssembly(string name) {
         // Call ONLY for namespaces that HAVE NOT been cached yet.
         //===================================================================
 
-        public static bool LoadImplicit(string name, bool warn=true) {
+        public static bool LoadImplicit(string name, bool warn = true)
+        {
             string[] names = name.Split('.');
             bool loaded = false;
             string s = "";
             Assembly lastAssembly = null;
             HashSet<Assembly> assemblies = null;
-            for (int i = 0; i < names.Length; i++) {
+            for (int i = 0; i < names.Length; i++)
+            {
                 s = (i == 0) ? names[0] : s + "." + names[i];
-                if (!probed.ContainsKey(s)) {
-                    if (assemblies == null) {
+                if (!probed.ContainsKey(s))
+                {
+                    if (assemblies == null)
+                    {
                         assemblies = new HashSet<Assembly>(AppDomain.CurrentDomain.GetAssemblies());
                     }
                     Assembly a = FindLoadedAssembly(s);
-                    if (a == null) {
+                    if (a == null)
+                    {
                         a = LoadAssemblyPath(s);
                     }
-                    if (a == null) {
+                    if (a == null)
+                    {
                         a = LoadAssembly(s);
                     }
-                    if (a != null && !assemblies.Contains(a)) {
+                    if (a != null && !assemblies.Contains(a))
+                    {
                         loaded = true;
                         lastAssembly = a;
                     }
@@ -291,9 +327,9 @@ public static bool LoadImplicit(string name, bool warn=true) {
             if (warn && loaded)
             {
                 string deprWarning = String.Format(
-                                "\nThe module was found, but not in a referenced namespace.\n" +
-                                "Implicit loading is deprecated. Please use clr.AddReference(\"{0}\").",
-                                    Path.GetFileNameWithoutExtension(lastAssembly.Location));
+                    "\nThe module was found, but not in a referenced namespace.\n" +
+                    "Implicit loading is deprecated. Please use clr.AddReference(\"{0}\").",
+                    Path.GetFileNameWithoutExtension(lastAssembly.Location));
                 Exceptions.deprecation(deprWarning);
             }
 
@@ -304,36 +340,42 @@ public static bool LoadImplicit(string name, bool warn=true) {
         //===================================================================
         // Scans an assembly for exported namespaces, adding them to the
         // mapping of valid namespaces. Note that for a given namespace
-        // a.b.c.d, each of a, a.b, a.b.c and a.b.c.d are considered to 
+        // a.b.c.d, each of a, a.b, a.b.c and a.b.c.d are considered to
         // be valid namespaces (to better match Python import semantics).
         //===================================================================
 
-        internal static void ScanAssembly(Assembly assembly) {
-
+        internal static void ScanAssembly(Assembly assembly)
+        {
             // A couple of things we want to do here: first, we want to
             // gather a list of all of the namespaces contributed to by
             // the assembly.
 
             Type[] types = assembly.GetTypes();
-            for (int i = 0; i < types.Length; i++) {
+            for (int i = 0; i < types.Length; i++)
+            {
                 Type t = types[i];
                 string ns = t.Namespace ?? "";
-                if (!namespaces.ContainsKey(ns)) {
+                if (!namespaces.ContainsKey(ns))
+                {
                     string[] names = ns.Split('.');
                     string s = "";
-                    for (int n = 0; n < names.Length; n++) {
+                    for (int n = 0; n < names.Length; n++)
+                    {
                         s = (n == 0) ? names[0] : s + "." + names[n];
-                        if (!namespaces.ContainsKey(s)) {
+                        if (!namespaces.ContainsKey(s))
+                        {
                             namespaces.Add(s, new Dictionary<Assembly, string>());
                         }
                     }
                 }
 
-                if (ns != null && !namespaces[ns].ContainsKey(assembly)) {
+                if (ns != null && !namespaces[ns].ContainsKey(assembly))
+                {
                     namespaces[ns].Add(assembly, String.Empty);
                 }
 
-                if (ns != null && t.IsGenericTypeDefinition) {
+                if (ns != null && t.IsGenericTypeDefinition)
+                {
                     GenericUtil.Register(t);
                 }
             }
@@ -343,7 +385,7 @@ public static AssemblyName[] ListAssemblies()
         {
             AssemblyName[] names = new AssemblyName[assemblies.Count];
             Assembly assembly;
-            for (int i=0; i < assemblies.Count; i++)
+            for (int i = 0; i < assemblies.Count; i++)
             {
                 assembly = assemblies[i];
                 names.SetValue(assembly.GetName(), i);
@@ -356,7 +398,8 @@ public static AssemblyName[] ListAssemblies()
         // exported by an assembly loaded in the current app domain.
         //===================================================================
 
-        public static bool IsValidNamespace(string name) {
+        public static bool IsValidNamespace(string name)
+        {
             return namespaces.ContainsKey(name);
         }
 
@@ -364,7 +407,8 @@ public static bool IsValidNamespace(string name) {
         // Returns list of assemblies that declare types in a given namespace
         //===================================================================
 
-        public static IEnumerable<Assembly> GetAssemblies(string nsname) {
+        public static IEnumerable<Assembly> GetAssemblies(string nsname)
+        {
             if (!namespaces.ContainsKey(nsname))
                 return new List<Assembly>();
 
@@ -375,34 +419,44 @@ public static IEnumerable<Assembly> GetAssemblies(string nsname) {
         // Returns the current list of valid names for the input namespace.
         //===================================================================
 
-        public static List<string> GetNames(string nsname) {
+        public static List<string> GetNames(string nsname)
+        {
             //Dictionary<string, int> seen = new Dictionary<string, int>();
             List<string> names = new List<string>(8);
 
             List<string> g = GenericUtil.GetGenericBaseNames(nsname);
-            if (g != null) {
-                foreach (string n in g) {
+            if (g != null)
+            {
+                foreach (string n in g)
+                {
                     names.Add(n);
                 }
             }
 
-            if (namespaces.ContainsKey(nsname)) {
-                foreach (Assembly a in namespaces[nsname].Keys) {
+            if (namespaces.ContainsKey(nsname))
+            {
+                foreach (Assembly a in namespaces[nsname].Keys)
+                {
                     Type[] types = a.GetTypes();
-                    for (int i = 0; i < types.Length; i++) {
+                    for (int i = 0; i < types.Length; i++)
+                    {
                         Type t = types[i];
-                        if ((t.Namespace ?? "") == nsname) {
+                        if ((t.Namespace ?? "") == nsname)
+                        {
                             names.Add(t.Name);
                         }
                     }
                 }
                 int nslen = nsname.Length;
-                foreach (string key in namespaces.Keys) {
-                    if (key.Length > nslen && key.StartsWith(nsname)) {
+                foreach (string key in namespaces.Keys)
+                {
+                    if (key.Length > nslen && key.StartsWith(nsname))
+                    {
                         //string tail = key.Substring(nslen);
-                        if (key.IndexOf('.') == -1) {
+                        if (key.IndexOf('.') == -1)
+                        {
                             names.Add(key);
-                        } 
+                        }
                     }
                 }
             }
@@ -415,18 +469,18 @@ public static List<string> GetNames(string nsname) {
         // type. Returns null if the named type cannot be found.
         //===================================================================
 
-        public static Type LookupType(string qname) {
-            for (int i = 0; i < assemblies.Count; i++) {
+        public static Type LookupType(string qname)
+        {
+            for (int i = 0; i < assemblies.Count; i++)
+            {
                 Assembly assembly = (Assembly)assemblies[i];
                 Type type = assembly.GetType(qname);
-                if (type != null) {
+                if (type != null)
+                {
                     return type;
                 }
             }
             return null;
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/classbase.cs b/src/runtime/classbase.cs
index 4aba01df0..68cc91961 100644
--- a/src/runtime/classbase.cs
+++ b/src/runtime/classbase.cs
@@ -1,20 +1,11 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 using System.Security;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Base class for Python types that reflect managed types / classes.
     /// Concrete subclasses include ClassObject and DelegateObject. This
@@ -23,18 +14,19 @@ namespace Python.Runtime {
     /// concrete subclasses provide slot implementations appropriate for
     /// each variety of reflected type.
     /// </summary>
-
-    internal class ClassBase : ManagedType {
-
+    internal class ClassBase : ManagedType
+    {
         internal Indexer indexer;
         internal Type type;
 
-        internal ClassBase(Type tp) : base() {
+        internal ClassBase(Type tp) : base()
+        {
             indexer = null;
             type = tp;
         }
 
-        internal virtual bool CanSubclass() {
+        internal virtual bool CanSubclass()
+        {
             return (!this.type.IsEnum);
         }
 
@@ -42,23 +34,27 @@ internal virtual bool CanSubclass() {
         // Implements __init__ for reflected classes and value types.
         //====================================================================
 
-        public static int tp_init(IntPtr ob, IntPtr args, IntPtr kw) {
+        public static int tp_init(IntPtr ob, IntPtr args, IntPtr kw)
+        {
             return 0;
         }
 
-         //====================================================================
-         // Default implementation of [] semantics for reflected types.
-         //====================================================================
- 
-        public virtual IntPtr type_subscript(IntPtr idx) {
+        //====================================================================
+        // Default implementation of [] semantics for reflected types.
+        //====================================================================
+
+        public virtual IntPtr type_subscript(IntPtr idx)
+        {
             Type[] types = Runtime.PythonArgsToTypeArray(idx);
-            if (types == null) {
+            if (types == null)
+            {
                 return Exceptions.RaiseTypeError("type(s) expected");
-            }
-
-            Type target = GenericUtil.GenericForType(this.type, types.Length);
-
-            if (target != null) {
+            }
+
+            Type target = GenericUtil.GenericForType(this.type, types.Length);
+
+            if (target != null)
+            {
                 Type t = target.MakeGenericType(types);
                 ManagedType c = (ManagedType)ClassManager.GetClass(t);
                 Runtime.Incref(c.pyHandle);
@@ -66,7 +62,7 @@ public virtual IntPtr type_subscript(IntPtr idx) {
             }
 
             return Exceptions.RaiseTypeError("no type matches params");
-        } 
+        }
 
         //====================================================================
         // Standard comparison implementation for instances of reflected types.
@@ -113,8 +109,10 @@ public static IntPtr tp_richcompare(IntPtr ob, IntPtr other, int op) {
             return pyfalse;
         }
 #else
-        public static int tp_compare(IntPtr ob, IntPtr other) {
-            if (ob == other) {
+        public static int tp_compare(IntPtr ob, IntPtr other)
+        {
+            if (ob == other)
+            {
                 return 0;
             }
 
@@ -123,7 +121,8 @@ public static int tp_compare(IntPtr ob, IntPtr other) {
             Object o1 = co1.inst;
             Object o2 = co2.inst;
 
-            if (Object.Equals(o1, o2)) {
+            if (Object.Equals(o1, o2))
+            {
                 return 0;
             }
             return -1;
@@ -137,22 +136,27 @@ public static int tp_compare(IntPtr ob, IntPtr other) {
         // or themselves support IEnumerator directly.
         //====================================================================
 
-        public static IntPtr tp_iter(IntPtr ob) {
+        public static IntPtr tp_iter(IntPtr ob)
+        {
             CLRObject co = GetManagedObject(ob) as CLRObject;
-            if (co == null) {
+            if (co == null)
+            {
                 return Exceptions.RaiseTypeError("invalid object");
             }
 
             IEnumerable e = co.inst as IEnumerable;
             IEnumerator o;
 
-            if (e != null) {
+            if (e != null)
+            {
                 o = e.GetEnumerator();
             }
-            else {
+            else
+            {
                 o = co.inst as IEnumerator;
-                         
-                if (o == null) {
+
+                if (o == null)
+                {
                     string message = "iteration over non-sequence";
                     return Exceptions.RaiseTypeError(message);
                 }
@@ -166,9 +170,11 @@ public static IntPtr tp_iter(IntPtr ob) {
         // Standard __hash__ implementation for instances of reflected types.
         //====================================================================
 
-        public static IntPtr tp_hash(IntPtr ob) {
+        public static IntPtr tp_hash(IntPtr ob)
+        {
             CLRObject co = GetManagedObject(ob) as CLRObject;
-            if (co == null) {
+            if (co == null)
+            {
                 return Exceptions.RaiseTypeError("unhashable type");
             }
             return new IntPtr(co.inst.GetHashCode());
@@ -179,17 +185,21 @@ public static IntPtr tp_hash(IntPtr ob) {
         // Standard __str__ implementation for instances of reflected types.
         //====================================================================
 
-        public static IntPtr tp_str(IntPtr ob) {
+        public static IntPtr tp_str(IntPtr ob)
+        {
             CLRObject co = GetManagedObject(ob) as CLRObject;
-            if (co == null) {
+            if (co == null)
+            {
                 return Exceptions.RaiseTypeError("invalid object");
             }
-            try {
+            try
+            {
                 return Runtime.PyString_FromString(co.inst.ToString());
             }
             catch (Exception e)
             {
-                if (e.InnerException != null) {
+                if (e.InnerException != null)
+                {
                     e = e.InnerException;
                 }
                 Exceptions.SetError(e);
@@ -202,15 +212,18 @@ public static IntPtr tp_str(IntPtr ob) {
         // Default implementations for required Python GC support.
         //====================================================================
 
-        public static int tp_traverse(IntPtr ob, IntPtr func, IntPtr args) {
+        public static int tp_traverse(IntPtr ob, IntPtr func, IntPtr args)
+        {
             return 0;
         }
 
-        public static int tp_clear(IntPtr ob) {
+        public static int tp_clear(IntPtr ob)
+        {
             return 0;
         }
 
-        public static int tp_is_gc(IntPtr type) {
+        public static int tp_is_gc(IntPtr type)
+        {
             return 1;
         }
 
@@ -218,10 +231,12 @@ public static int tp_is_gc(IntPtr type) {
         // Standard dealloc implementation for instances of reflected types.
         //====================================================================
 
-        public static void tp_dealloc(IntPtr ob) {
+        public static void tp_dealloc(IntPtr ob)
+        {
             ManagedType self = GetManagedObject(ob);
             IntPtr dict = Marshal.ReadIntPtr(ob, ObjectOffset.DictOffset(ob));
-            if (dict != IntPtr.Zero) { 
+            if (dict != IntPtr.Zero)
+            {
                 Runtime.Decref(dict);
             }
             Runtime.PyObject_GC_UnTrack(self.pyHandle);
@@ -229,8 +244,5 @@ public static void tp_dealloc(IntPtr ob) {
             Runtime.Decref(self.tpHandle);
             self.gcHandle.Free();
         }
-
-
-    }        
-
-}
+    }
+}
\ No newline at end of file
diff --git a/src/runtime/classderived.cs b/src/runtime/classderived.cs
index baffbd4e3..ea1181731 100644
--- a/src/runtime/classderived.cs
+++ b/src/runtime/classderived.cs
@@ -1,13 +1,4 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
-using System;
+using System;
 using System.IO;
 using System.Reflection;
 using System.Reflection.Emit;
@@ -19,11 +10,10 @@
 
 namespace Python.Runtime
 {
-
     /// <summary>
     /// Managed class that provides the implementation for reflected types.
-    /// Managed classes and value types are represented in Python by actual 
-    /// Python type objects. Each of those type objects is associated with 
+    /// Managed classes and value types are represented in Python by actual
+    /// Python type objects. Each of those type objects is associated with
     /// an instance of ClassObject, which provides its implementation.
     /// </summary>
 
@@ -118,11 +108,11 @@ internal static IntPtr ToPython(IPythonDerivedType obj)
         /// object has overriden the method.
         /// </summary>
         internal static Type CreateDerivedType(string name,
-                                               Type baseType,
-                                               IntPtr py_dict,
-                                               string namespaceStr,
-                                               string assemblyName,
-                                               string moduleName="Python.Runtime.Dynamic.dll")
+            Type baseType,
+            IntPtr py_dict,
+            string namespaceStr,
+            string assemblyName,
+            string moduleName = "Python.Runtime.Dynamic.dll")
         {
             if (null != namespaceStr)
                 name = namespaceStr + "." + name;
@@ -145,9 +135,9 @@ internal static Type CreateDerivedType(string name,
             }
 
             typeBuilder = moduleBuilder.DefineType(name,
-                                                    TypeAttributes.Public | TypeAttributes.Class,
-                                                    baseClass,
-                                                    interfaces.ToArray());
+                TypeAttributes.Public | TypeAttributes.Class,
+                baseClass,
+                interfaces.ToArray());
 
             // add a field for storing the python object pointer
             FieldBuilder fb = typeBuilder.DefineField("__pyobj__", typeof(CLRObject), FieldAttributes.Public);
@@ -170,14 +160,14 @@ internal static Type CreateDerivedType(string name,
                     foreach (PyObject pyKey in keys)
                     {
                         using (PyObject value = dict[pyKey])
-                        if (value.HasAttr("_clr_property_type_"))
-                        {
-                            string propertyName = pyKey.ToString();
-                            pyProperties.Add(propertyName);
+                            if (value.HasAttr("_clr_property_type_"))
+                            {
+                                string propertyName = pyKey.ToString();
+                                pyProperties.Add(propertyName);
 
-                            // Add the property to the type
-                            AddPythonProperty(propertyName, value, typeBuilder);
-                        }
+                                // Add the property to the type
+                                AddPythonProperty(propertyName, value, typeBuilder);
+                            }
                     }
                 }
             }
@@ -187,12 +177,13 @@ internal static Type CreateDerivedType(string name,
             HashSet<string> virtualMethods = new HashSet<string>();
             foreach (MethodInfo method in methods)
             {
-                if (!method.Attributes.HasFlag(MethodAttributes.Virtual) | method.Attributes.HasFlag(MethodAttributes.Final))
+                if (!method.Attributes.HasFlag(MethodAttributes.Virtual) |
+                    method.Attributes.HasFlag(MethodAttributes.Final))
                     continue;
 
                 // skip if this property has already been overriden
                 if ((method.Name.StartsWith("get_") || method.Name.StartsWith("set_"))
-                        && pyProperties.Contains(method.Name.Substring(4)))
+                    && pyProperties.Contains(method.Name.Substring(4)))
                     continue;
 
                 // keep track of the virtual methods redirected to the python instance
@@ -212,29 +203,29 @@ internal static Type CreateDerivedType(string name,
                     foreach (PyObject pyKey in keys)
                     {
                         using (PyObject value = dict[pyKey])
-                        if (value.HasAttr("_clr_return_type_") && value.HasAttr("_clr_arg_types_"))
-                        {
-                            string methodName = pyKey.ToString();
+                            if (value.HasAttr("_clr_return_type_") && value.HasAttr("_clr_arg_types_"))
+                            {
+                                string methodName = pyKey.ToString();
 
-                            // if this method has already been redirected to the python method skip it
-                            if (virtualMethods.Contains(methodName))
-                                continue;
+                                // if this method has already been redirected to the python method skip it
+                                if (virtualMethods.Contains(methodName))
+                                    continue;
 
-                            // Add the method to the type
-                            AddPythonMethod(methodName, value, typeBuilder);
-                        }
+                                // Add the method to the type
+                                AddPythonMethod(methodName, value, typeBuilder);
+                            }
                     }
                 }
             }
 
             // add the destructor so the python object created in the constructor gets destroyed
             MethodBuilder methodBuilder = typeBuilder.DefineMethod("Finalize",
-                                                                    MethodAttributes.Family |
-                                                                        MethodAttributes.Virtual |
-                                                                        MethodAttributes.HideBySig,
-                                                                        CallingConventions.Standard,
-                                                                    typeof(void),
-                                                                    Type.EmptyTypes);
+                MethodAttributes.Family |
+                MethodAttributes.Virtual |
+                MethodAttributes.HideBySig,
+                CallingConventions.Standard,
+                typeof(void),
+                Type.EmptyTypes);
             ILGenerator il = methodBuilder.GetILGenerator();
             il.Emit(OpCodes.Ldarg_0);
             il.Emit(OpCodes.Call, typeof(PythonDerivedType).GetMethod("Finalize"));
@@ -267,11 +258,11 @@ private static void AddConstructor(ConstructorInfo ctor, Type baseType, TypeBuil
             // create a method for calling the original constructor
             string baseCtorName = "_" + baseType.Name + "__cinit__";
             MethodBuilder methodBuilder = typeBuilder.DefineMethod(baseCtorName,
-                                                                    MethodAttributes.Public |
-                                                                        MethodAttributes.Final |
-                                                                        MethodAttributes.HideBySig,
-                                                                    typeof(void),
-                                                                    parameterTypes);
+                MethodAttributes.Public |
+                MethodAttributes.Final |
+                MethodAttributes.HideBySig,
+                typeof(void),
+                parameterTypes);
 
             // emit the assembly for calling the original method using call instead of callvirt
             ILGenerator il = methodBuilder.GetILGenerator();
@@ -283,10 +274,10 @@ private static void AddConstructor(ConstructorInfo ctor, Type baseType, TypeBuil
 
             // override the original method with a new one that dispatches to python
             ConstructorBuilder cb = typeBuilder.DefineConstructor(MethodAttributes.Public |
-                                                                    MethodAttributes.ReuseSlot |
-                                                                    MethodAttributes.HideBySig,
-                                                                  ctor.CallingConvention,
-                                                                  parameterTypes);
+                                                                  MethodAttributes.ReuseSlot |
+                                                                  MethodAttributes.HideBySig,
+                ctor.CallingConvention,
+                parameterTypes);
             il = cb.GetILGenerator();
             il.DeclareLocal(typeof(Object[]));
             il.Emit(OpCodes.Ldarg_0);
@@ -317,7 +308,6 @@ private static void AddConstructor(ConstructorInfo ctor, Type baseType, TypeBuil
         /// <param name="typeBuilder">TypeBuilder for the new type the method is to be added to</param>
         private static void AddVirtualMethod(MethodInfo method, Type baseType, TypeBuilder typeBuilder)
         {
-
             ParameterInfo[] parameters = method.GetParameters();
             Type[] parameterTypes = (from param in parameters select param.ParameterType).ToArray();
 
@@ -327,11 +317,11 @@ private static void AddVirtualMethod(MethodInfo method, Type baseType, TypeBuild
             {
                 baseMethodName = "_" + baseType.Name + "__" + method.Name;
                 MethodBuilder baseMethodBuilder = typeBuilder.DefineMethod(baseMethodName,
-                                                                           MethodAttributes.Public |
-                                                                               MethodAttributes.Final |
-                                                                               MethodAttributes.HideBySig,
-                                                                           method.ReturnType,
-                                                                           parameterTypes);
+                    MethodAttributes.Public |
+                    MethodAttributes.Final |
+                    MethodAttributes.HideBySig,
+                    method.ReturnType,
+                    parameterTypes);
 
                 // emit the assembly for calling the original method using call instead of callvirt
                 ILGenerator baseIl = baseMethodBuilder.GetILGenerator();
@@ -344,13 +334,13 @@ private static void AddVirtualMethod(MethodInfo method, Type baseType, TypeBuild
 
             // override the original method with a new one that dispatches to python
             MethodBuilder methodBuilder = typeBuilder.DefineMethod(method.Name,
-                                                                   MethodAttributes.Public |
-                                                                       MethodAttributes.ReuseSlot |
-                                                                       MethodAttributes.Virtual |
-                                                                       MethodAttributes.HideBySig,
-                                                                   method.CallingConvention,
-                                                                   method.ReturnType,
-                                                                   parameterTypes);
+                MethodAttributes.Public |
+                MethodAttributes.ReuseSlot |
+                MethodAttributes.Virtual |
+                MethodAttributes.HideBySig,
+                method.CallingConvention,
+                method.ReturnType,
+                parameterTypes);
             ILGenerator il = methodBuilder.GetILGenerator();
             il.DeclareLocal(typeof(Object[]));
             il.Emit(OpCodes.Ldarg_0);
@@ -381,7 +371,8 @@ private static void AddVirtualMethod(MethodInfo method, Type baseType, TypeBuild
             }
             else
             {
-                il.Emit(OpCodes.Call, typeof(PythonDerivedType).GetMethod("InvokeMethod").MakeGenericMethod(method.ReturnType));
+                il.Emit(OpCodes.Call,
+                    typeof(PythonDerivedType).GetMethod("InvokeMethod").MakeGenericMethod(method.ReturnType));
             }
             il.Emit(OpCodes.Ret);
         }
@@ -424,14 +415,14 @@ private static void AddPythonMethod(string methodName, PyObject func, TypeBuilde
 
                 // add the method to call back into python
                 MethodAttributes methodAttribs = MethodAttributes.Public |
-                                                    MethodAttributes.Virtual |
-                                                    MethodAttributes.ReuseSlot |
-                                                    MethodAttributes.HideBySig;
+                                                 MethodAttributes.Virtual |
+                                                 MethodAttributes.ReuseSlot |
+                                                 MethodAttributes.HideBySig;
 
                 MethodBuilder methodBuilder = typeBuilder.DefineMethod(methodName,
-                                                                        methodAttribs,
-                                                                        returnType,
-                                                                        argTypes.ToArray());
+                    methodAttribs,
+                    returnType,
+                    argTypes.ToArray());
 
                 ILGenerator il = methodBuilder.GetILGenerator();
                 il.DeclareLocal(typeof(Object[]));
@@ -457,7 +448,8 @@ private static void AddPythonMethod(string methodName, PyObject func, TypeBuilde
                 }
                 else
                 {
-                    il.Emit(OpCodes.Call, typeof(PythonDerivedType).GetMethod("InvokeMethod").MakeGenericMethod(returnType));
+                    il.Emit(OpCodes.Call,
+                        typeof(PythonDerivedType).GetMethod("InvokeMethod").MakeGenericMethod(returnType));
                 }
                 il.Emit(OpCodes.Ret);
             }
@@ -474,10 +466,10 @@ private static void AddPythonProperty(string propertyName, PyObject func, TypeBu
         {
             // add the method to call back into python
             MethodAttributes methodAttribs = MethodAttributes.Public |
-                                                MethodAttributes.Virtual |
-                                                MethodAttributes.ReuseSlot |
-                                                MethodAttributes.HideBySig |
-                                                MethodAttributes.SpecialName;
+                                             MethodAttributes.Virtual |
+                                             MethodAttributes.ReuseSlot |
+                                             MethodAttributes.HideBySig |
+                                             MethodAttributes.SpecialName;
 
             using (PyObject pyPropertyType = func.GetAttr("_clr_property_type_"))
             {
@@ -486,49 +478,51 @@ private static void AddPythonProperty(string propertyName, PyObject func, TypeBu
                     throw new ArgumentException("_clr_property_type must be a CLR type");
 
                 PropertyBuilder propertyBuilder = typeBuilder.DefineProperty(propertyName,
-                                                                             PropertyAttributes.None,
-                                                                             propertyType,
-                                                                             null);
+                    PropertyAttributes.None,
+                    propertyType,
+                    null);
 
                 if (func.HasAttr("fget"))
                 {
                     using (PyObject pyfget = func.GetAttr("fget"))
-                    if (pyfget.IsTrue())
-                    {
-                        MethodBuilder methodBuilder = typeBuilder.DefineMethod("get_" + propertyName,
-                                                                                methodAttribs,
-                                                                                propertyType,
-                                                                                null);
-
-                        ILGenerator il = methodBuilder.GetILGenerator();
-                        il.Emit(OpCodes.Ldarg_0);
-                        il.Emit(OpCodes.Ldstr, propertyName);
-                        il.Emit(OpCodes.Call, typeof(PythonDerivedType).GetMethod("InvokeGetProperty").MakeGenericMethod(propertyType));
-                        il.Emit(OpCodes.Ret);
-
-                        propertyBuilder.SetGetMethod(methodBuilder);
-                    }
+                        if (pyfget.IsTrue())
+                        {
+                            MethodBuilder methodBuilder = typeBuilder.DefineMethod("get_" + propertyName,
+                                methodAttribs,
+                                propertyType,
+                                null);
+
+                            ILGenerator il = methodBuilder.GetILGenerator();
+                            il.Emit(OpCodes.Ldarg_0);
+                            il.Emit(OpCodes.Ldstr, propertyName);
+                            il.Emit(OpCodes.Call,
+                                typeof(PythonDerivedType).GetMethod("InvokeGetProperty").MakeGenericMethod(propertyType));
+                            il.Emit(OpCodes.Ret);
+
+                            propertyBuilder.SetGetMethod(methodBuilder);
+                        }
                 }
 
                 if (func.HasAttr("fset"))
                 {
                     using (PyObject pyset = func.GetAttr("fset"))
-                    if (pyset.IsTrue())
-                    {
-                        MethodBuilder methodBuilder = typeBuilder.DefineMethod("set_" + propertyName,
-                                                                                methodAttribs,
-                                                                                null,
-                                                                                new Type[]{propertyType});
-
-                        ILGenerator il = methodBuilder.GetILGenerator();
-                        il.Emit(OpCodes.Ldarg_0);
-                        il.Emit(OpCodes.Ldstr, propertyName);
-                        il.Emit(OpCodes.Ldarg_1);
-                        il.Emit(OpCodes.Call, typeof(PythonDerivedType).GetMethod("InvokeSetProperty").MakeGenericMethod(propertyType));
-                        il.Emit(OpCodes.Ret);
-
-                        propertyBuilder.SetSetMethod(methodBuilder);
-                    }
+                        if (pyset.IsTrue())
+                        {
+                            MethodBuilder methodBuilder = typeBuilder.DefineMethod("set_" + propertyName,
+                                methodAttribs,
+                                null,
+                                new Type[] { propertyType });
+
+                            ILGenerator il = methodBuilder.GetILGenerator();
+                            il.Emit(OpCodes.Ldarg_0);
+                            il.Emit(OpCodes.Ldstr, propertyName);
+                            il.Emit(OpCodes.Ldarg_1);
+                            il.Emit(OpCodes.Call,
+                                typeof(PythonDerivedType).GetMethod("InvokeSetProperty").MakeGenericMethod(propertyType));
+                            il.Emit(OpCodes.Ret);
+
+                            propertyBuilder.SetSetMethod(methodBuilder);
+                        }
                 }
             }
         }
@@ -553,7 +547,7 @@ private static ModuleBuilder GetModuleBuilder(string assemblyName, string module
                 else
                 {
                     assemblyBuilder = domain.DefineDynamicAssembly(new AssemblyName(assemblyName),
-                                                                   AssemblyBuilderAccess.Run);
+                        AssemblyBuilderAccess.Run);
                     assemblyBuilders[assemblyName] = assemblyBuilder;
                 }
 
@@ -625,7 +619,8 @@ public static T InvokeMethod<T>(IPythonDerivedType obj, string methodName, strin
                 }
                 finally
                 {
-                    foreach (PyObject x in disposeList) {
+                    foreach (PyObject x in disposeList)
+                    {
                         if (x != null)
                             x.Dispose();
                     }
@@ -637,13 +632,14 @@ public static T InvokeMethod<T>(IPythonDerivedType obj, string methodName, strin
                 throw new NotImplementedException("Python object does not have a '" + methodName + "' method");
 
             return (T)obj.GetType().InvokeMember(origMethodName,
-                                                 BindingFlags.InvokeMethod,
-                                                 null,
-                                                 obj,
-                                                 args);
+                BindingFlags.InvokeMethod,
+                null,
+                obj,
+                args);
         }
 
-        public static void InvokeMethodVoid(IPythonDerivedType obj, string methodName, string origMethodName, Object[] args)
+        public static void InvokeMethodVoid(IPythonDerivedType obj, string methodName, string origMethodName,
+            Object[] args)
         {
             FieldInfo fi = obj.GetType().GetField("__pyobj__");
             CLRObject self = (CLRObject)fi.GetValue(obj);
@@ -684,7 +680,8 @@ public static void InvokeMethodVoid(IPythonDerivedType obj, string methodName, s
                 }
                 finally
                 {
-                    foreach (PyObject x in disposeList) {
+                    foreach (PyObject x in disposeList)
+                    {
                         if (x != null)
                             x.Dispose();
                     }
@@ -696,10 +693,10 @@ public static void InvokeMethodVoid(IPythonDerivedType obj, string methodName, s
                 throw new NotImplementedException("Python object does not have a '" + methodName + "' method");
 
             obj.GetType().InvokeMember(origMethodName,
-                                       BindingFlags.InvokeMethod,
-                                       null,
-                                       obj,
-                                       args);
+                BindingFlags.InvokeMethod,
+                null,
+                obj,
+                args);
         }
 
         public static T InvokeGetProperty<T>(IPythonDerivedType obj, string propertyName)
@@ -750,10 +747,10 @@ public static void InvokeCtor(IPythonDerivedType obj, string origCtorName, Objec
         {
             // call the base constructor
             obj.GetType().InvokeMember(origCtorName,
-                                       BindingFlags.InvokeMethod,
-                                       null,
-                                       obj,
-                                       args);
+                BindingFlags.InvokeMethod,
+                null,
+                obj,
+                args);
 
             List<PyObject> disposeList = new List<PyObject>();
             CLRObject self = null;
@@ -799,7 +796,8 @@ public static void InvokeCtor(IPythonDerivedType obj, string origCtorName, Objec
             }
             finally
             {
-                foreach (PyObject x in disposeList) {
+                foreach (PyObject x in disposeList)
+                {
                     if (x != null)
                         x.Dispose();
                 }
@@ -862,4 +860,4 @@ public static void Finalize(IPythonDerivedType obj)
             });
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/classmanager.cs b/src/runtime/classmanager.cs
index 8744de417..6c6aa3b09 100644
--- a/src/runtime/classmanager.cs
+++ b/src/runtime/classmanager.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 using System.Collections.Generic;
@@ -14,26 +5,28 @@
 using System.Reflection;
 using System.Security;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// The ClassManager is responsible for creating and managing instances
     /// that implement the Python type objects that reflect managed classes.
     ///
     /// Each managed type reflected to Python is represented by an instance
     /// of a concrete subclass of ClassBase. Each instance is associated with
-    /// a generated Python type object, whose slots point to static methods 
-    /// of the managed instance's class. 
+    /// a generated Python type object, whose slots point to static methods
+    /// of the managed instance's class.
     /// </summary>
-
-    internal class ClassManager {
-
+    internal class ClassManager
+    {
         static Dictionary<Type, ClassBase> cache;
         static Type dtype;
 
-        private ClassManager() {}
+        private ClassManager()
+        {
+        }
 
-        static ClassManager() {
+        static ClassManager()
+        {
             cache = new Dictionary<Type, ClassBase>(128);
             // SEE: http://msdn.microsoft.com/en-us/library/96b1ayy4%28VS.90%29.aspx
             // ""All delegates inherit from MulticastDelegate, which inherits from Delegate.""
@@ -43,14 +36,16 @@ static ClassManager() {
         }
 
         //====================================================================
-        // Return the ClassBase-derived instance that implements a particular 
+        // Return the ClassBase-derived instance that implements a particular
         // reflected managed type, creating it if it doesn't yet exist.
         //====================================================================
 
-        internal static ClassBase GetClass(Type type) {
+        internal static ClassBase GetClass(Type type)
+        {
             ClassBase cb = null;
             cache.TryGetValue(type, out cb);
-            if (cb != null) {
+            if (cb != null)
+            {
                 return cb;
             }
             cb = CreateClass(type);
@@ -65,10 +60,10 @@ internal static ClassBase GetClass(Type type) {
         // Python type object.
         //====================================================================
 
-        private static ClassBase CreateClass(Type type) {
-
+        private static ClassBase CreateClass(Type type)
+        {
             // First, we introspect the managed type and build some class
-            // information, including generating the member descriptors 
+            // information, including generating the member descriptors
             // that we'll be putting in the Python class __dict__.
 
             ClassInfo info = GetClassInfo(type);
@@ -81,31 +76,37 @@ private static ClassBase CreateClass(Type type) {
             ClassBase impl;
 
             // Check to see if the given type extends System.Exception. This
-            // lets us check once (vs. on every lookup) in case we need to 
+            // lets us check once (vs. on every lookup) in case we need to
             // wrap Exception-derived types in old-style classes
 
-            if (type.ContainsGenericParameters) {
+            if (type.ContainsGenericParameters)
+            {
                 impl = new GenericType(type);
             }
 
-            else if (type.IsSubclassOf(dtype)) {
+            else if (type.IsSubclassOf(dtype))
+            {
                 impl = new DelegateObject(type);
             }
 
-            else if (type.IsArray) {
+            else if (type.IsArray)
+            {
                 impl = new ArrayObject(type);
             }
 
-            else if (type.IsInterface) {
+            else if (type.IsInterface)
+            {
                 impl = new InterfaceObject(type);
             }
 
-            else if (type == typeof(Exception) || 
-                    type.IsSubclassOf(typeof(Exception))) {
+            else if (type == typeof(Exception) ||
+                     type.IsSubclassOf(typeof(Exception)))
+            {
                 impl = new ExceptionClassObject(type);
             }
 
-            else if (null != type.GetField("__pyobj__")) {
+            else if (null != type.GetField("__pyobj__"))
+            {
                 impl = new ClassDerivedObject(type);
             }
 
@@ -129,33 +130,38 @@ private static ClassBase CreateClass(Type type) {
 
 
             IDictionaryEnumerator iter = info.members.GetEnumerator();
-            while(iter.MoveNext()) {
+            while (iter.MoveNext())
+            {
                 ManagedType item = (ManagedType)iter.Value;
                 string name = (string)iter.Key;
                 Runtime.PyDict_SetItemString(dict, name, item.pyHandle);
             }
 
             // If class has constructors, generate an __doc__ attribute.
-					
+
             IntPtr doc = IntPtr.Zero;
-			Type marker = typeof(DocStringAttribute);
-			Attribute[] attrs = (Attribute[])type.GetCustomAttributes(marker, false);
-            if (attrs.Length == 0) {
-            	doc = IntPtr.Zero;
-			}
-			else {
-				DocStringAttribute attr = (DocStringAttribute)attrs[0];
-				string docStr = attr.DocString;
-            	doc = Runtime.PyString_FromString(docStr);
+            Type marker = typeof(DocStringAttribute);
+            Attribute[] attrs = (Attribute[])type.GetCustomAttributes(marker, false);
+            if (attrs.Length == 0)
+            {
+                doc = IntPtr.Zero;
+            }
+            else
+            {
+                DocStringAttribute attr = (DocStringAttribute)attrs[0];
+                string docStr = attr.DocString;
+                doc = Runtime.PyString_FromString(docStr);
                 Runtime.PyDict_SetItemString(dict, "__doc__", doc);
                 Runtime.Decref(doc);
-			}
+            }
 
             ClassObject co = impl as ClassObject;
             // If this is a ClassObject AND it has constructors, generate a __doc__ attribute.
             // required that the ClassObject.ctors be changed to internal
-            if (co != null) {
-                if (co.ctors.Length > 0) {
+            if (co != null)
+            {
+                if (co.ctors.Length > 0)
+                {
                     // Implement Overloads on the class object
                     if (!CLRModule._SuppressOverloads)
                     {
@@ -180,9 +186,8 @@ private static ClassBase CreateClass(Type type) {
         }
 
 
-
-
-        private static ClassInfo GetClassInfo(Type type) {
+        private static ClassInfo GetClassInfo(Type type)
+        {
             ClassInfo ci = new ClassInfo(type);
             Hashtable methods = new Hashtable();
             ArrayList list;
@@ -193,16 +198,16 @@ private static ClassInfo GetClassInfo(Type type) {
             Type tp;
             int i, n;
 
-            // This is complicated because inheritance in Python is name 
+            // This is complicated because inheritance in Python is name
             // based. We can't just find DeclaredOnly members, because we
             // could have a base class A that defines two overloads of a
             // method and a class B that defines two more. The name-based
             // descriptor Python will find needs to know about inherited
             // overloads as well as those declared on the sub class.
 
-            BindingFlags flags = BindingFlags.Static | 
-                                 BindingFlags.Instance | 
-                                 BindingFlags.Public | 
+            BindingFlags flags = BindingFlags.Static |
+                                 BindingFlags.Instance |
+                                 BindingFlags.Public |
                                  BindingFlags.NonPublic;
 
             MemberInfo[] info = type.GetMembers(flags);
@@ -211,160 +216,173 @@ private static ClassInfo GetClassInfo(Type type) {
             MemberInfo m;
 
             // Loop through once to find out which names are declared
-            for (i = 0; i < info.Length; i++) {
+            for (i = 0; i < info.Length; i++)
+            {
                 m = info[i];
-                if (m.DeclaringType == type) {
+                if (m.DeclaringType == type)
+                {
                     local[m.Name] = 1;
                 }
             }
 
             // Now again to filter w/o losing overloaded member info
-            for (i = 0; i < info.Length; i++) {
+            for (i = 0; i < info.Length; i++)
+            {
                 m = info[i];
-                if (local[m.Name] != null) {
+                if (local[m.Name] != null)
+                {
                     items.Add(m);
                 }
             }
 
-            if (type.IsInterface) {
-                // Interface inheritance seems to be a different animal: 
+            if (type.IsInterface)
+            {
+                // Interface inheritance seems to be a different animal:
                 // more contractual, less structural.  Thus, a Type that
-                // represents an interface that inherits from another 
-                // interface does not return the inherited interface's 
-                // methods in GetMembers. For example ICollection inherits 
-                // from IEnumerable, but ICollection's GetMemebers does not 
+                // represents an interface that inherits from another
+                // interface does not return the inherited interface's
+                // methods in GetMembers. For example ICollection inherits
+                // from IEnumerable, but ICollection's GetMemebers does not
                 // return GetEnumerator.
                 //
-                // Not sure if this is the correct way to fix this, but it 
+                // Not sure if this is the correct way to fix this, but it
                 // seems to work. Thanks to Bruce Dodson for the fix.
 
                 Type[] inheritedInterfaces = type.GetInterfaces();
 
-                for (i = 0; i < inheritedInterfaces.Length; ++i) {
+                for (i = 0; i < inheritedInterfaces.Length; ++i)
+                {
                     Type inheritedType = inheritedInterfaces[i];
                     MemberInfo[] imembers = inheritedType.GetMembers(flags);
-                    for (n = 0; n < imembers.Length; n++) {
+                    for (n = 0; n < imembers.Length; n++)
+                    {
                         m = imembers[n];
-                        if (local[m.Name] == null) {
+                        if (local[m.Name] == null)
+                        {
                             items.Add(m);
                         }
                     }
                 }
             }
 
-            for (i = 0; i < items.Count; i++) {
-
+            for (i = 0; i < items.Count; i++)
+            {
                 MemberInfo mi = (MemberInfo)items[i];
 
-                switch(mi.MemberType) {
-
-                case MemberTypes.Method:
-                    meth = (MethodInfo) mi;
-                    if (!(meth.IsPublic || meth.IsFamily || 
-                          meth.IsFamilyOrAssembly))
-                        continue;
-                    name = meth.Name;
-                    item = methods[name];
-                    if (item == null) {
-                        item = methods[name] = new ArrayList();
-                    }
-                    list = (ArrayList) item;
-                    list.Add(meth);
-                    continue;
-
-                case MemberTypes.Property:
-                    PropertyInfo pi = (PropertyInfo) mi;
-
-                    MethodInfo mm = null;
-                    try {
-                        mm = pi.GetGetMethod(true);
-                        if (mm == null) {
-                            mm = pi.GetSetMethod(true);
+                switch (mi.MemberType)
+                {
+                    case MemberTypes.Method:
+                        meth = (MethodInfo)mi;
+                        if (!(meth.IsPublic || meth.IsFamily ||
+                              meth.IsFamilyOrAssembly))
+                            continue;
+                        name = meth.Name;
+                        item = methods[name];
+                        if (item == null)
+                        {
+                            item = methods[name] = new ArrayList();
                         }
-                    }
-                    catch (SecurityException) {
-                        // GetGetMethod may try to get a method protected by
-                        // StrongNameIdentityPermission - effectively private.
-                        continue;
-                    }
-
-                    if (mm == null) {
+                        list = (ArrayList)item;
+                        list.Add(meth);
                         continue;
-                    }
 
-                    if (!(mm.IsPublic || mm.IsFamily || mm.IsFamilyOrAssembly))
-                        continue;
+                    case MemberTypes.Property:
+                        PropertyInfo pi = (PropertyInfo)mi;
+
+                        MethodInfo mm = null;
+                        try
+                        {
+                            mm = pi.GetGetMethod(true);
+                            if (mm == null)
+                            {
+                                mm = pi.GetSetMethod(true);
+                            }
+                        }
+                        catch (SecurityException)
+                        {
+                            // GetGetMethod may try to get a method protected by
+                            // StrongNameIdentityPermission - effectively private.
+                            continue;
+                        }
 
-                    // Check for indexer
-                    ParameterInfo[] args = pi.GetIndexParameters();
-                    if (args.GetLength(0) > 0) {
-                        Indexer idx = ci.indexer;
-                        if (idx == null) {
-                            ci.indexer = new Indexer();
-                            idx = ci.indexer;
+                        if (mm == null)
+                        {
+                            continue;
                         }
-                        idx.AddProperty(pi);
-                        continue;
-                    }
 
-                    ob = new PropertyObject(pi);
-                    ci.members[pi.Name] = ob;
-                    continue;
+                        if (!(mm.IsPublic || mm.IsFamily || mm.IsFamilyOrAssembly))
+                            continue;
+
+                        // Check for indexer
+                        ParameterInfo[] args = pi.GetIndexParameters();
+                        if (args.GetLength(0) > 0)
+                        {
+                            Indexer idx = ci.indexer;
+                            if (idx == null)
+                            {
+                                ci.indexer = new Indexer();
+                                idx = ci.indexer;
+                            }
+                            idx.AddProperty(pi);
+                            continue;
+                        }
 
-                case MemberTypes.Field:
-                    FieldInfo fi = (FieldInfo) mi;
-                    if (!(fi.IsPublic || fi.IsFamily || fi.IsFamilyOrAssembly))
+                        ob = new PropertyObject(pi);
+                        ci.members[pi.Name] = ob;
                         continue;
-                    ob = new FieldObject(fi);
-                    ci.members[mi.Name] = ob;
-                    continue;
-
-                case MemberTypes.Event:
-                    EventInfo ei = (EventInfo)mi;
-                    MethodInfo me = ei.GetAddMethod(true);
-                    if (!(me.IsPublic || me.IsFamily || me.IsFamilyOrAssembly))
+
+                    case MemberTypes.Field:
+                        FieldInfo fi = (FieldInfo)mi;
+                        if (!(fi.IsPublic || fi.IsFamily || fi.IsFamilyOrAssembly))
+                            continue;
+                        ob = new FieldObject(fi);
+                        ci.members[mi.Name] = ob;
                         continue;
-                    ob = new EventObject(ei);
-                    ci.members[ei.Name] = ob;
-                    continue;
-
-                case MemberTypes.NestedType:
-                    tp = (Type) mi;
-                    if (!(tp.IsNestedPublic || tp.IsNestedFamily || 
-                          tp.IsNestedFamORAssem))
+
+                    case MemberTypes.Event:
+                        EventInfo ei = (EventInfo)mi;
+                        MethodInfo me = ei.GetAddMethod(true);
+                        if (!(me.IsPublic || me.IsFamily || me.IsFamilyOrAssembly))
+                            continue;
+                        ob = new EventObject(ei);
+                        ci.members[ei.Name] = ob;
                         continue;
-                    ob = ClassManager.GetClass(tp);
-                    ci.members[mi.Name] = ob;
-                    continue;
 
+                    case MemberTypes.NestedType:
+                        tp = (Type)mi;
+                        if (!(tp.IsNestedPublic || tp.IsNestedFamily ||
+                              tp.IsNestedFamORAssem))
+                            continue;
+                        ob = ClassManager.GetClass(tp);
+                        ci.members[mi.Name] = ob;
+                        continue;
                 }
             }
 
             IDictionaryEnumerator iter = methods.GetEnumerator();
 
-            while(iter.MoveNext()) {
-                name = (string) iter.Key;
-                list = (ArrayList) iter.Value;
+            while (iter.MoveNext())
+            {
+                name = (string)iter.Key;
+                list = (ArrayList)iter.Value;
 
                 MethodInfo[] mlist = (MethodInfo[])list.ToArray(
-                                                   typeof(MethodInfo)
-                                                   );
+                    typeof(MethodInfo)
+                    );
 
                 ob = new MethodObject(type, name, mlist);
                 ci.members[name] = ob;
             }
 
             return ci;
-
         }
+    }
 
 
-    }        
-
-
-    internal class ClassInfo {
-
-        internal ClassInfo(Type t) {
+    internal class ClassInfo
+    {
+        internal ClassInfo(Type t)
+        {
             members = new Hashtable();
             indexer = null;
         }
@@ -372,7 +390,4 @@ internal ClassInfo(Type t) {
         public Hashtable members;
         public Indexer indexer;
     }
-
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/classobject.cs b/src/runtime/classobject.cs
index 03f784ed7..7e8232463 100644
--- a/src/runtime/classobject.cs
+++ b/src/runtime/classobject.cs
@@ -1,34 +1,26 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Managed class that provides the implementation for reflected types.
-    /// Managed classes and value types are represented in Python by actual 
-    /// Python type objects. Each of those type objects is associated with 
+    /// Managed classes and value types are represented in Python by actual
+    /// Python type objects. Each of those type objects is associated with
     /// an instance of ClassObject, which provides its implementation.
     /// </summary>
-
-    internal class ClassObject : ClassBase {
-
+    internal class ClassObject : ClassBase
+    {
         internal ConstructorBinder binder;
         internal ConstructorInfo[] ctors;
 
-        internal ClassObject(Type tp) : base(tp) {
+        internal ClassObject(Type tp) : base(tp)
+        {
             ctors = type.GetConstructors();
             binder = new ConstructorBinder(type);
 
-            for (int i = 0; i < ctors.Length; i++) {
+            for (int i = 0; i < ctors.Length; i++)
+            {
                 binder.AddMethod(ctors[i]);
             }
         }
@@ -38,10 +30,12 @@ internal ClassObject(Type tp) : base(tp) {
         // Helper to get docstring from reflected constructor info.
         //====================================================================
 
-        internal IntPtr GetDocString() {
+        internal IntPtr GetDocString()
+        {
             MethodBase[] methods = binder.GetMethods();
             string str = "";
-            for (int i = 0; i < methods.Length; i++) {
+            for (int i = 0; i < methods.Length; i++)
+            {
                 if (str.Length > 0)
                     str += Environment.NewLine;
                 str += methods[i].ToString();
@@ -54,58 +48,65 @@ internal IntPtr GetDocString() {
         // Implements __new__ for reflected classes and value types.
         //====================================================================
 
-        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
-
+        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw)
+        {
             ClassObject self = GetManagedObject(tp) as ClassObject;
 
             // Sanity check: this ensures a graceful error if someone does
             // something intentially wrong like use the managed metatype for
             // a class that is not really derived from a managed class.
 
-            if (self == null) {
+            if (self == null)
+            {
                 return Exceptions.RaiseTypeError("invalid object");
             }
-            
+
             Type type = self.type;
 
             // Primitive types do not have constructors, but they look like
-            // they do from Python. If the ClassObject represents one of the 
+            // they do from Python. If the ClassObject represents one of the
             // convertible primitive types, just convert the arg directly.
 
-            if (type.IsPrimitive || type == typeof(String)) {
-                if (Runtime.PyTuple_Size(args) != 1) {
-                    Exceptions.SetError(Exceptions.TypeError, 
-                               "no constructors match given arguments"
-                               );
+            if (type.IsPrimitive || type == typeof(String))
+            {
+                if (Runtime.PyTuple_Size(args) != 1)
+                {
+                    Exceptions.SetError(Exceptions.TypeError,
+                        "no constructors match given arguments"
+                        );
                     return IntPtr.Zero;
                 }
 
                 IntPtr op = Runtime.PyTuple_GetItem(args, 0);
                 Object result;
 
-                if (!Converter.ToManaged(op, type, out result, true)) {
+                if (!Converter.ToManaged(op, type, out result, true))
+                {
                     return IntPtr.Zero;
                 }
 
                 return CLRObject.GetInstHandle(result, tp);
             }
 
-            if (type.IsAbstract) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                           "cannot instantiate abstract class"
-                           );
+            if (type.IsAbstract)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "cannot instantiate abstract class"
+                    );
                 return IntPtr.Zero;
             }
 
-            if (type.IsEnum) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                           "cannot instantiate enumeration"
-                           );
+            if (type.IsEnum)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "cannot instantiate enumeration"
+                    );
                 return IntPtr.Zero;
             }
 
             Object obj = self.binder.InvokeRaw(IntPtr.Zero, args, kw);
-            if (obj == null) {
+            if (obj == null)
+            {
                 return IntPtr.Zero;
             }
 
@@ -113,66 +114,73 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
         }
 
 
-         //====================================================================
-         // Implementation of [] semantics for reflected types. This exists 
-         // both to implement the Array[int] syntax for creating arrays and 
+        //====================================================================
+        // Implementation of [] semantics for reflected types. This exists
+        // both to implement the Array[int] syntax for creating arrays and
         // to support generic name overload resolution using [].
-         //====================================================================
- 
-         public override IntPtr type_subscript(IntPtr idx) {
+        //====================================================================
 
+        public override IntPtr type_subscript(IntPtr idx)
+        {
             // If this type is the Array type, the [<type>] means we need to
             // construct and return an array type of the given element type.
 
-             if ((this.type) == typeof(Array)) {
-                if (Runtime.PyTuple_Check(idx)) {
+            if ((this.type) == typeof(Array))
+            {
+                if (Runtime.PyTuple_Check(idx))
+                {
                     return Exceptions.RaiseTypeError("type expected");
                 }
                 ClassBase c = GetManagedObject(idx) as ClassBase;
                 Type t = (c != null) ? c.type : Converter.GetTypeByAlias(idx);
-                if (t == null) {
+                if (t == null)
+                {
                     return Exceptions.RaiseTypeError("type expected");
                 }
                 Type a = t.MakeArrayType();
                 ClassBase o = ClassManager.GetClass(a);
                 Runtime.Incref(o.pyHandle);
-                return o.pyHandle;         
-            }   
+                return o.pyHandle;
+            }
 
             // If there are generics in our namespace with the same base name
             // as the current type, then [<type>] means the caller wants to
             // bind the generic type matching the given type parameters.
 
             Type[] types = Runtime.PythonArgsToTypeArray(idx);
-            if (types == null) {
+            if (types == null)
+            {
                 return Exceptions.RaiseTypeError("type(s) expected");
             }
 
             string gname = this.type.FullName + "`" + types.Length.ToString();
             Type gtype = AssemblyManager.LookupType(gname);
-            if (gtype != null) {
+            if (gtype != null)
+            {
                 GenericType g = ClassManager.GetClass(gtype) as GenericType;
                 return g.type_subscript(idx);
                 /*Runtime.Incref(g.pyHandle);
                 return g.pyHandle;*/
             }
             return Exceptions.RaiseTypeError("unsubscriptable object");
-         }
- 
+        }
+
 
         //====================================================================
         // Implements __getitem__ for reflected classes and value types.
         //====================================================================
 
-        public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
+        public static IntPtr mp_subscript(IntPtr ob, IntPtr idx)
+        {
             //ManagedType self = GetManagedObject(ob);
             IntPtr tp = Runtime.PyObject_TYPE(ob);
             ClassBase cls = (ClassBase)GetManagedObject(tp);
 
-            if (cls.indexer == null || !cls.indexer.CanGet) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                                    "unindexable object"
-                                    );
+            if (cls.indexer == null || !cls.indexer.CanGet)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "unindexable object"
+                    );
                 return IntPtr.Zero;
             }
 
@@ -183,7 +191,8 @@ public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
             IntPtr args = idx;
             bool free = false;
 
-            if (!Runtime.PyTuple_Check(idx)) {
+            if (!Runtime.PyTuple_Check(idx))
+            {
                 args = Runtime.PyTuple_New(1);
                 Runtime.Incref(idx);
                 Runtime.PyTuple_SetItem(args, 0, idx);
@@ -192,11 +201,14 @@ public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
 
             IntPtr value = IntPtr.Zero;
 
-            try {
+            try
+            {
                 value = cls.indexer.GetItem(ob, args);
             }
-            finally {
-                if (free) {
+            finally
+            {
+                if (free)
+                {
                     Runtime.Decref(args);
                 }
             }
@@ -208,15 +220,17 @@ public static IntPtr mp_subscript(IntPtr ob, IntPtr idx) {
         // Implements __setitem__ for reflected classes and value types.
         //====================================================================
 
-        public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
+        public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v)
+        {
             //ManagedType self = GetManagedObject(ob);
             IntPtr tp = Runtime.PyObject_TYPE(ob);
             ClassBase cls = (ClassBase)GetManagedObject(tp);
 
-            if (cls.indexer == null || !cls.indexer.CanSet) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                                    "object doesn't support item assignment"
-                                    );
+            if (cls.indexer == null || !cls.indexer.CanSet)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "object doesn't support item assignment"
+                    );
                 return -1;
             }
 
@@ -226,7 +240,8 @@ public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
             IntPtr args = idx;
             bool free = false;
 
-            if (!Runtime.PyTuple_Check(idx)) {
+            if (!Runtime.PyTuple_Check(idx))
+            {
                 args = Runtime.PyTuple_New(1);
                 Runtime.Incref(idx);
                 Runtime.PyTuple_SetItem(args, 0, idx);
@@ -239,19 +254,21 @@ public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
             int numOfDefaultArgs = Runtime.PyTuple_Size(defaultArgs);
             int temp = i + numOfDefaultArgs;
             IntPtr real = Runtime.PyTuple_New(temp + 1);
-            for (int n = 0; n < i; n++) {
+            for (int n = 0; n < i; n++)
+            {
                 IntPtr item = Runtime.PyTuple_GetItem(args, n);
                 Runtime.Incref(item);
                 Runtime.PyTuple_SetItem(real, n, item);
             }
 
             // Add Default Args if needed
-            for (int n = 0; n < numOfDefaultArgs; n++) {
+            for (int n = 0; n < numOfDefaultArgs; n++)
+            {
                 IntPtr item = Runtime.PyTuple_GetItem(defaultArgs, n);
                 Runtime.Incref(item);
                 Runtime.PyTuple_SetItem(real, n + i, item);
             }
-            // no longer need defaultArgs 
+            // no longer need defaultArgs
             Runtime.Decref(defaultArgs);
             i = temp;
 
@@ -259,18 +276,22 @@ public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
             Runtime.Incref(v);
             Runtime.PyTuple_SetItem(real, i, v);
 
-            try {
+            try
+            {
                 cls.indexer.SetItem(ob, real);
             }
-            finally {
+            finally
+            {
                 Runtime.Decref(real);
 
-                if (free) {
+                if (free)
+                {
                     Runtime.Decref(args);
                 }
             }
 
-            if (Exceptions.ErrorOccurred()) {
+            if (Exceptions.ErrorOccurred())
+            {
                 return -1;
             }
 
@@ -285,30 +306,29 @@ public static int mp_ass_subscript(IntPtr ob, IntPtr idx, IntPtr v) {
         // when working with multicast delegates.
         //====================================================================
 
-        public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw) {
+        public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw)
+        {
             //ManagedType self = GetManagedObject(ob);
             IntPtr tp = Runtime.PyObject_TYPE(ob);
             ClassBase cb = (ClassBase)GetManagedObject(tp);
 
-            if (cb.type != typeof(System.Delegate)) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                                    "object is not callable");
+            if (cb.type != typeof(System.Delegate))
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "object is not callable");
                 return IntPtr.Zero;
             }
 
             CLRObject co = (CLRObject)ManagedType.GetManagedObject(ob);
             Delegate d = co.inst as Delegate;
-            BindingFlags flags = BindingFlags.Public | 
+            BindingFlags flags = BindingFlags.Public |
                                  BindingFlags.NonPublic |
                                  BindingFlags.Instance |
                                  BindingFlags.Static;
 
             MethodInfo method = d.GetType().GetMethod("Invoke", flags);
-              MethodBinder binder = new MethodBinder(method);
-             return binder.Invoke(ob, args, kw);
+            MethodBinder binder = new MethodBinder(method);
+            return binder.Invoke(ob, args, kw);
         }
-
-
-    }        
-
-}
+    }
+}
\ No newline at end of file
diff --git a/src/runtime/clrmodule.il b/src/runtime/clrmodule.il
index e1289eb4a..fb312b1b5 100644
--- a/src/runtime/clrmodule.il
+++ b/src/runtime/clrmodule.il
@@ -1,11 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
 
 //============================================================================
 // This file is a hand-maintained stub - it implements clr.dll, which can be
@@ -235,7 +227,7 @@
 #ifdef DEBUG_PRINT
 			ldstr		"Success!"
 			call		void [mscorlib]System.Console::WriteLine(string)
-			
+
 			ldloc		pythonRuntime
 			callvirt	instance string	[mscorlib]System.Reflection.Assembly::get_CodeBase()
 			call		void [mscorlib]System.Console::WriteLine(string)
diff --git a/src/runtime/clrmodule.pp.il b/src/runtime/clrmodule.pp.il
index 59b289379..27eb78432 100644
--- a/src/runtime/clrmodule.pp.il
+++ b/src/runtime/clrmodule.pp.il
@@ -1,11 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
 
 //============================================================================
 // This file is a hand-maintained stub - it implements clr.dll, which can be
diff --git a/src/runtime/clrobject.cs b/src/runtime/clrobject.cs
index 1de49aede..351c7c51b 100644
--- a/src/runtime/clrobject.cs
+++ b/src/runtime/clrobject.cs
@@ -1,32 +1,24 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
-
-    internal class CLRObject : ManagedType {
-
+namespace Python.Runtime
+{
+    internal class CLRObject : ManagedType
+    {
         internal Object inst;
 
-        internal CLRObject(Object ob, IntPtr tp) : base() {
-
+        internal CLRObject(Object ob, IntPtr tp) : base()
+        {
             IntPtr py = Runtime.PyType_GenericAlloc(tp, 0);
 
-              int flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
-              if ((flags & TypeFlags.Subclass) != 0) {
+            int flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
+            if ((flags & TypeFlags.Subclass) != 0)
+            {
                 IntPtr dict = Marshal.ReadIntPtr(py, ObjectOffset.DictOffset(tp));
-                if (dict == IntPtr.Zero) {
+                if (dict == IntPtr.Zero)
+                {
                     dict = Runtime.PyDict_New();
                     Marshal.WriteIntPtr(py, ObjectOffset.DictOffset(tp), dict);
                 }
@@ -41,38 +33,38 @@ internal CLRObject(Object ob, IntPtr tp) : base() {
         }
 
 
-        internal static CLRObject GetInstance(Object ob, IntPtr pyType) {
+        internal static CLRObject GetInstance(Object ob, IntPtr pyType)
+        {
             return new CLRObject(ob, pyType);
         }
 
 
-        internal static CLRObject GetInstance(Object ob) {
+        internal static CLRObject GetInstance(Object ob)
+        {
             ClassBase cc = ClassManager.GetClass(ob.GetType());
             return GetInstance(ob, cc.tpHandle);
         }
 
 
-        internal static IntPtr GetInstHandle(Object ob, IntPtr pyType) {
+        internal static IntPtr GetInstHandle(Object ob, IntPtr pyType)
+        {
             CLRObject co = GetInstance(ob, pyType);
             return co.pyHandle;
         }
 
 
-        internal static IntPtr GetInstHandle(Object ob, Type type) {
+        internal static IntPtr GetInstHandle(Object ob, Type type)
+        {
             ClassBase cc = ClassManager.GetClass(type);
             CLRObject co = GetInstance(ob, cc.tpHandle);
             return co.pyHandle;
         }
 
 
-        internal static IntPtr GetInstHandle(Object ob) {
+        internal static IntPtr GetInstHandle(Object ob)
+        {
             CLRObject co = GetInstance(ob);
             return co.pyHandle;
         }
-
-
     }
-
-
-}
-
+}
\ No newline at end of file
diff --git a/src/runtime/codegenerator.cs b/src/runtime/codegenerator.cs
index 4305471e0..01edd79ba 100644
--- a/src/runtime/codegenerator.cs
+++ b/src/runtime/codegenerator.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Threading;
 using System.Runtime.InteropServices;
@@ -15,21 +6,21 @@
 using System.Reflection;
 using System.Reflection.Emit;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Several places in the runtime generate code on the fly to support
     /// dynamic functionality. The CodeGenerator class manages the dynamic
     /// assembly used for code generation and provides utility methods for
     /// certain repetitive tasks.
     /// </summary>
-
-    internal class CodeGenerator {
-
+    internal class CodeGenerator
+    {
         AssemblyBuilder aBuilder;
         ModuleBuilder mBuilder;
 
-        internal CodeGenerator() {
+        internal CodeGenerator()
+        {
             AssemblyName aname = new AssemblyName();
             aname.Name = "__CodeGenerator_Assembly";
             AssemblyBuilderAccess aa = AssemblyBuilderAccess.Run;
@@ -42,7 +33,8 @@ internal CodeGenerator() {
         // DefineType is a shortcut utility to get a new TypeBuilder.
         //====================================================================
 
-        internal TypeBuilder DefineType(string name) {
+        internal TypeBuilder DefineType(string name)
+        {
             TypeAttributes attrs = TypeAttributes.Public;
             return mBuilder.DefineType(name, attrs);
         }
@@ -51,12 +43,10 @@ internal TypeBuilder DefineType(string name) {
         // DefineType is a shortcut utility to get a new TypeBuilder.
         //====================================================================
 
-        internal TypeBuilder DefineType(string name, Type basetype) {
+        internal TypeBuilder DefineType(string name, Type basetype)
+        {
             TypeAttributes attrs = TypeAttributes.Public;
             return mBuilder.DefineType(name, attrs, basetype);
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/constructorbinder.cs b/src/runtime/constructorbinder.cs
index 82be07e1f..1a008cc75 100644
--- a/src/runtime/constructorbinder.cs
+++ b/src/runtime/constructorbinder.cs
@@ -1,17 +1,8 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // A ConstructorBinder encapsulates information about one or more managed
     // constructors, and is responsible for selecting the right constructor
@@ -20,10 +11,12 @@ namespace Python.Runtime {
     // using reflection (which is seems to be a CLR bug).
     //========================================================================
 
-    internal class ConstructorBinder : MethodBinder {
+    internal class ConstructorBinder : MethodBinder
+    {
         private Type _containingType = null;
 
-        internal ConstructorBinder(Type containingType) : base() {
+        internal ConstructorBinder(Type containingType) : base()
+        {
             _containingType = containingType;
         }
 
@@ -31,14 +24,16 @@ internal ConstructorBinder(Type containingType) : base() {
         // Constructors get invoked when an instance of a wrapped managed
         // class or a subclass of a managed class is created. This differs
         // from the MethodBinder implementation in that we return the raw
-        // result of the constructor rather than wrapping it as a Python 
+        // result of the constructor rather than wrapping it as a Python
         // object - the reason is that only the caller knows the correct
         // Python type to use when wrapping the result (may be a subclass).
         //====================================================================
 
-        internal object InvokeRaw(IntPtr inst, IntPtr args, IntPtr kw) {
+        internal object InvokeRaw(IntPtr inst, IntPtr args, IntPtr kw)
+        {
             return this.InvokeRaw(inst, args, kw, null);
         }
+
         /// <summary>
         /// Allows ctor selection to be limited to a single attempt at a
         /// match by providing the MethodBase to use instead of searching
@@ -55,22 +50,27 @@ internal object InvokeRaw(IntPtr inst, IntPtr args, IntPtr kw) {
         /// to take advantage of Bind()'s ability to use a single MethodBase (CI or MI).
         /// </remarks>
         internal object InvokeRaw(IntPtr inst, IntPtr args, IntPtr kw,
-                                  MethodBase info) {
+            MethodBase info)
+        {
             Object result;
 
-            if (_containingType.IsValueType && !_containingType.IsPrimitive && 
-                !_containingType.IsEnum && _containingType != typeof (decimal) && 
-                Runtime.PyTuple_Size(args) == 0) {
+            if (_containingType.IsValueType && !_containingType.IsPrimitive &&
+                !_containingType.IsEnum && _containingType != typeof(decimal) &&
+                Runtime.PyTuple_Size(args) == 0)
+            {
                 // If you are trying to construct an instance of a struct by
                 // calling its default constructor, that ConstructorInfo
-                // instance will not appear in reflection and the object must 
-                // instead be constructed via a call to 
+                // instance will not appear in reflection and the object must
+                // instead be constructed via a call to
                 // Activator.CreateInstance().
-                try {
+                try
+                {
                     result = Activator.CreateInstance(_containingType);
                 }
-                catch (Exception e) {
-                    if (e.InnerException != null) {
+                catch (Exception e)
+                {
+                    if (e.InnerException != null)
+                    {
                         e = e.InnerException;
                     }
                     Exceptions.SetError(e);
@@ -81,7 +81,8 @@ internal object InvokeRaw(IntPtr inst, IntPtr args, IntPtr kw,
 
             Binding binding = this.Bind(inst, args, kw, info);
 
-            if (binding == null) {
+            if (binding == null)
+            {
                 // It is possible for __new__ to be invoked on construction
                 // of a Python subclass of a managed class, so args may
                 // reflect more args than are required to instantiate the
@@ -93,10 +94,11 @@ internal object InvokeRaw(IntPtr inst, IntPtr args, IntPtr kw,
                 binding = this.Bind(inst, eargs, kw);
                 Runtime.Decref(eargs);
 
-                if (binding == null) {
+                if (binding == null)
+                {
                     Exceptions.SetError(Exceptions.TypeError,
-                                        "no constructor matches given arguments"
-                                        );
+                        "no constructor matches given arguments"
+                        );
                     return null;
                 }
             }
@@ -105,11 +107,14 @@ internal object InvokeRaw(IntPtr inst, IntPtr args, IntPtr kw,
             ConstructorInfo ci = (ConstructorInfo)binding.info;
             // Object construction is presumed to be non-blocking and fast
             // enough that we shouldn't really need to release the GIL.
-            try {
+            try
+            {
                 result = ci.Invoke(binding.args);
             }
-            catch (Exception e) {
-                if (e.InnerException != null) {
+            catch (Exception e)
+            {
+                if (e.InnerException != null)
+                {
                     e = e.InnerException;
                 }
                 Exceptions.SetError(e);
@@ -118,4 +123,4 @@ internal object InvokeRaw(IntPtr inst, IntPtr args, IntPtr kw,
             return result;
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/constructorbinding.cs b/src/runtime/constructorbinding.cs
index c5f014469..2921874e1 100644
--- a/src/runtime/constructorbinding.cs
+++ b/src/runtime/constructorbinding.cs
@@ -1,24 +1,15 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
-using System;
+using System;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Implements a Python type that wraps a CLR ctor call. Constructor objects
     /// support a .Overloads[] syntax to allow explicit ctor overload selection.
     /// </summary>
     /// <remarks>
     /// ClassManager stores a ConstructorBinding instance in the class's __dict__['Overloads']
-    /// 
+    ///
     /// SomeType.Overloads[Type, ...] works like this:
     /// 1) Python retreives the Overloads attribute from this ClassObject's dictionary normally
     /// and finds a non-null tp_descr_get slot which is called by the interpreter
@@ -31,12 +22,13 @@ namespace Python.Runtime {
     /// </remarks>
     internal class ConstructorBinding : ExtensionType
     {
-        Type type;  // The managed Type being wrapped in a ClassObject
-        IntPtr pyTypeHndl;  // The python type tells GetInstHandle which Type to create.
+        Type type; // The managed Type being wrapped in a ClassObject
+        IntPtr pyTypeHndl; // The python type tells GetInstHandle which Type to create.
         ConstructorBinder ctorBinder;
         IntPtr repr;
 
-        public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder) : base() {
+        public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder) : base()
+        {
             this.type = type;
             Runtime.Incref(pyTypeHndl);
             this.pyTypeHndl = pyTypeHndl;
@@ -56,12 +48,12 @@ public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBi
         /// <param name="owner"> always the owner class </param>
         /// <returns> a CtorMapper (that borrows a reference to this python type and the
         /// ClassObject's ConstructorBinder) wrapper. </returns>
-        /// 
+        ///
         /// <remarks>
         /// Python 2.6.5 docs:
         /// object.__get__(self, instance, owner)
         /// Called to get the attribute of the owner class (class attribute access)
-        /// or of an instance of that class (instance attribute access). 
+        /// or of an instance of that class (instance attribute access).
         /// owner is always the owner class, while instance is the instance that
         /// the attribute was accessed through, or None when the attribute is accessed through the owner.
         /// This method should return the (computed) attribute value or raise an AttributeError exception.
@@ -69,9 +61,10 @@ public ConstructorBinding(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBi
         public static IntPtr tp_descr_get(IntPtr op, IntPtr instance, IntPtr owner)
         {
             ConstructorBinding self = (ConstructorBinding)GetManagedObject(op);
-            if (self == null) {
+            if (self == null)
+            {
                 return IntPtr.Zero;
-                }
+            }
 
             // It doesn't seem to matter if it's accessed through an instance (rather than via the type).
             /*if (instance != IntPtr.Zero) {
@@ -80,7 +73,7 @@ public static IntPtr tp_descr_get(IntPtr op, IntPtr instance, IntPtr owner)
                     return Exceptions.RaiseTypeError("How in the world could that happen!");
                 }
             }*/
-            Runtime.Incref(self.pyHandle);  // Decref'd by the interpreter.
+            Runtime.Incref(self.pyHandle); // Decref'd by the interpreter.
             return self.pyHandle;
         }
 
@@ -95,17 +88,20 @@ public static IntPtr tp_descr_get(IntPtr op, IntPtr instance, IntPtr owner)
         /// <param name="tp"></param>
         /// <param name="idx"></param>
         /// <returns></returns>
-        public static IntPtr mp_subscript(IntPtr op, IntPtr key) {
+        public static IntPtr mp_subscript(IntPtr op, IntPtr key)
+        {
             ConstructorBinding self = (ConstructorBinding)GetManagedObject(op);
 
             Type[] types = Runtime.PythonArgsToTypeArray(key);
-            if (types == null) {
+            if (types == null)
+            {
                 return Exceptions.RaiseTypeError("type(s) expected");
             }
             //MethodBase[] methBaseArray = self.ctorBinder.GetMethods();
             //MethodBase ci = MatchSignature(methBaseArray, types);
             ConstructorInfo ci = self.type.GetConstructor(types);
-            if (ci == null) {
+            if (ci == null)
+            {
                 string msg = "No match found for constructor signature";
                 return Exceptions.RaiseTypeError(msg);
             }
@@ -120,16 +116,19 @@ public static IntPtr mp_subscript(IntPtr op, IntPtr key) {
         // ConstructorBinding  __repr__ implementation [borrowed from MethodObject].
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             ConstructorBinding self = (ConstructorBinding)GetManagedObject(ob);
-            if (self.repr != IntPtr.Zero) {
+            if (self.repr != IntPtr.Zero)
+            {
                 Runtime.Incref(self.repr);
                 return self.repr;
             }
             MethodBase[] methods = self.ctorBinder.GetMethods();
             string name = self.type.FullName;
             string doc = "";
-            for (int i = 0; i < methods.Length; i++) {
+            for (int i = 0; i < methods.Length; i++)
+            {
                 if (doc.Length > 0)
                     doc += "\n";
                 string str = methods[i].ToString();
@@ -145,7 +144,8 @@ public static IntPtr tp_repr(IntPtr ob) {
         // ConstructorBinding dealloc implementation.
         //====================================================================
 
-        public static new void tp_dealloc(IntPtr ob) {
+        public static new void tp_dealloc(IntPtr ob)
+        {
             ConstructorBinding self = (ConstructorBinding)GetManagedObject(ob);
             Runtime.Decref(self.repr);
             Runtime.Decref(self.pyTypeHndl);
@@ -161,15 +161,17 @@ public static IntPtr tp_repr(IntPtr ob) {
     /// An earlier implementation hung the __call__ on the ContructorBinding class and
     /// returned an Incref()ed self.pyHandle from the __get__ function.
     /// </remarks>
-    internal class BoundContructor : ExtensionType {
-        Type type;  // The managed Type being wrapped in a ClassObject
-        IntPtr pyTypeHndl;  // The python type tells GetInstHandle which Type to create.
+    internal class BoundContructor : ExtensionType
+    {
+        Type type; // The managed Type being wrapped in a ClassObject
+        IntPtr pyTypeHndl; // The python type tells GetInstHandle which Type to create.
         ConstructorBinder ctorBinder;
         ConstructorInfo ctorInfo;
         IntPtr repr;
 
         public BoundContructor(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinder, ConstructorInfo ci)
-            : base() {
+            : base()
+        {
             this.type = type;
             Runtime.Incref(pyTypeHndl);
             this.pyTypeHndl = pyTypeHndl;
@@ -185,7 +187,8 @@ public BoundContructor(Type type, IntPtr pyTypeHndl, ConstructorBinder ctorBinde
         /// <param name="args"> PyObject *args </param>
         /// <param name="kw"> PyObject *kw </param>
         /// <returns> A reference to a new instance of the class by invoking the selected ctor(). </returns>
-        public static IntPtr tp_call(IntPtr op, IntPtr args, IntPtr kw) {
+        public static IntPtr tp_call(IntPtr op, IntPtr args, IntPtr kw)
+        {
             BoundContructor self = (BoundContructor)GetManagedObject(op);
             // Even though a call with null ctorInfo just produces the old behavior
             /*if (self.ctorInfo == null) {
@@ -195,7 +198,8 @@ public static IntPtr tp_call(IntPtr op, IntPtr args, IntPtr kw) {
             // Bind using ConstructorBinder.Bind and invoke the ctor providing a null instancePtr
             // which will fire self.ctorInfo using ConstructorInfo.Invoke().
             Object obj = self.ctorBinder.InvokeRaw(IntPtr.Zero, args, kw, self.ctorInfo);
-            if (obj == null) {
+            if (obj == null)
+            {
                 // XXX set an error
                 return IntPtr.Zero;
             }
@@ -208,9 +212,11 @@ public static IntPtr tp_call(IntPtr op, IntPtr args, IntPtr kw) {
         // BoundContructor  __repr__ implementation [borrowed from MethodObject].
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             BoundContructor self = (BoundContructor)GetManagedObject(ob);
-            if (self.repr != IntPtr.Zero) {
+            if (self.repr != IntPtr.Zero)
+            {
                 Runtime.Incref(self.repr);
                 return self.repr;
             }
@@ -227,11 +233,12 @@ public static IntPtr tp_repr(IntPtr ob) {
         // ConstructorBinding dealloc implementation.
         //====================================================================
 
-        public static new void tp_dealloc(IntPtr ob) {
+        public static new void tp_dealloc(IntPtr ob)
+        {
             BoundContructor self = (BoundContructor)GetManagedObject(ob);
             Runtime.Decref(self.repr);
             Runtime.Decref(self.pyTypeHndl);
             ExtensionType.FinalizeObject(self);
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/converter.cs b/src/runtime/converter.cs
index 6bb2b0293..cdc610c2c 100644
--- a/src/runtime/converter.cs
+++ b/src/runtime/converter.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Runtime.InteropServices;
@@ -14,17 +5,18 @@
 using System.Security;
 using System.Collections;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Performs data conversions between managed types and Python types.
     //========================================================================
 
     [SuppressUnmanagedCodeSecurityAttribute()]
-
-    internal class Converter {
-
-        private Converter() {}
+    internal class Converter
+    {
+        private Converter()
+        {
+        }
 
         static NumberFormatInfo nfi;
         static Type objectType;
@@ -39,7 +31,8 @@ private Converter() {}
         static Type boolType;
         static Type typeType;
 
-        static Converter () {
+        static Converter()
+        {
             nfi = NumberFormatInfo.InvariantInfo;
             objectType = typeof(Object);
             stringType = typeof(String);
@@ -59,21 +52,27 @@ static Converter () {
         // Given a builtin Python type, return the corresponding CLR type.
         //====================================================================
 
-        internal static Type GetTypeByAlias(IntPtr op) {
+        internal static Type GetTypeByAlias(IntPtr op)
+        {
             if ((op == Runtime.PyStringType) ||
-                (op == Runtime.PyUnicodeType)) {
+                (op == Runtime.PyUnicodeType))
+            {
                 return stringType;
             }
-            else if (op == Runtime.PyIntType) {
+            else if (op == Runtime.PyIntType)
+            {
                 return int32Type;
             }
-            else if (op == Runtime.PyLongType) {
+            else if (op == Runtime.PyLongType)
+            {
                 return int64Type;
             }
-            else if (op == Runtime.PyFloatType) {
+            else if (op == Runtime.PyFloatType)
+            {
                 return doubleType;
             }
-            else if (op == Runtime.PyBoolType) {
+            else if (op == Runtime.PyBoolType)
+            {
                 return boolType;
             }
             return null;
@@ -81,7 +80,8 @@ internal static Type GetTypeByAlias(IntPtr op) {
 
         internal static IntPtr GetPythonTypeByAlias(Type op)
         {
-            if (op == stringType) {
+            if (op == stringType)
+            {
                 return Runtime.PyUnicodeType;
             }
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
@@ -92,17 +92,21 @@ internal static IntPtr GetPythonTypeByAlias(Type op)
             }
 #endif
             else if ((op == int16Type) ||
-                    (op == int32Type)) {
+                     (op == int32Type))
+            {
                 return Runtime.PyIntType;
             }
-            else if (op == int64Type) {
+            else if (op == int64Type)
+            {
                 return Runtime.PyLongType;
             }
             else if ((op == doubleType) ||
-                 (op == singleType)) {
+                     (op == singleType))
+            {
                 return Runtime.PyFloatType;
             }
-            else if (op == boolType) {
+            else if (op == boolType)
+            {
                 return Runtime.PyBoolType;
             }
             return IntPtr.Zero;
@@ -115,17 +119,19 @@ internal static IntPtr GetPythonTypeByAlias(Type op)
         // This always returns a new reference. Note that the System.Decimal
         // type has no Python equivalent and converts to a managed instance.
         //====================================================================
-        internal static IntPtr ToPython<T>(T value)
-        {
-            return ToPython(value, typeof(T));
+        internal static IntPtr ToPython<T>(T value)
+        {
+            return ToPython(value, typeof(T));
         }
 
-        internal static IntPtr ToPython(Object value, Type type) {
+        internal static IntPtr ToPython(Object value, Type type)
+        {
             IntPtr result = IntPtr.Zero;
 
             // Null always converts to None in Python.
 
-            if (value == null) {
+            if (value == null)
+            {
                 result = Runtime.PyNone;
                 Runtime.Incref(result);
                 return result;
@@ -147,86 +153,91 @@ internal static IntPtr ToPython(Object value, Type type) {
 
             TypeCode tc = Type.GetTypeCode(type);
 
-            switch(tc) {
-
-            case TypeCode.Object:
-                result = CLRObject.GetInstHandle(value, type);
+            switch (tc)
+            {
+                case TypeCode.Object:
+                    result = CLRObject.GetInstHandle(value, type);
 
-                // XXX - hack to make sure we convert new-style class based
-                // managed exception instances to wrappers ;(
-                if (Runtime.wrap_exceptions) {
-                    Exception e = value as Exception;
-                    if (e != null) {
-                        return Exceptions.GetExceptionInstanceWrapper(result);
+                    // XXX - hack to make sure we convert new-style class based
+                    // managed exception instances to wrappers ;(
+                    if (Runtime.wrap_exceptions)
+                    {
+                        Exception e = value as Exception;
+                        if (e != null)
+                        {
+                            return Exceptions.GetExceptionInstanceWrapper(result);
+                        }
                     }
-                }
 
-                return result;
+                    return result;
 
-            case TypeCode.String:
-                return Runtime.PyUnicode_FromString((string)value);
+                case TypeCode.String:
+                    return Runtime.PyUnicode_FromString((string)value);
 
-            case TypeCode.Int32:
-                return Runtime.PyInt_FromInt32((int)value);
+                case TypeCode.Int32:
+                    return Runtime.PyInt_FromInt32((int)value);
 
-            case TypeCode.Boolean:
-                if ((bool)value) {
-                    Runtime.Incref(Runtime.PyTrue);
-                    return Runtime.PyTrue;
-                }
-                Runtime.Incref(Runtime.PyFalse);
-                return Runtime.PyFalse;
+                case TypeCode.Boolean:
+                    if ((bool)value)
+                    {
+                        Runtime.Incref(Runtime.PyTrue);
+                        return Runtime.PyTrue;
+                    }
+                    Runtime.Incref(Runtime.PyFalse);
+                    return Runtime.PyFalse;
 
-            case TypeCode.Byte:
-                return Runtime.PyInt_FromInt32((int)((byte)value));
+                case TypeCode.Byte:
+                    return Runtime.PyInt_FromInt32((int)((byte)value));
 
-            case TypeCode.Char:
-                return Runtime.PyUnicode_FromOrdinal((int)((char)value));
+                case TypeCode.Char:
+                    return Runtime.PyUnicode_FromOrdinal((int)((char)value));
 
-            case TypeCode.Int16:
-                return Runtime.PyInt_FromInt32((int)((short)value));
+                case TypeCode.Int16:
+                    return Runtime.PyInt_FromInt32((int)((short)value));
 
-            case TypeCode.Int64:
-                return Runtime.PyLong_FromLongLong((long)value);
+                case TypeCode.Int64:
+                    return Runtime.PyLong_FromLongLong((long)value);
 
-            case TypeCode.Single:
-                // return Runtime.PyFloat_FromDouble((double)((float)value));
-                string ss = ((float)value).ToString(nfi);
-                IntPtr ps = Runtime.PyString_FromString(ss);
-                IntPtr op = Runtime.PyFloat_FromString(ps, IntPtr.Zero);
-                Runtime.Decref(ps);
-                return op;
+                case TypeCode.Single:
+                    // return Runtime.PyFloat_FromDouble((double)((float)value));
+                    string ss = ((float)value).ToString(nfi);
+                    IntPtr ps = Runtime.PyString_FromString(ss);
+                    IntPtr op = Runtime.PyFloat_FromString(ps, IntPtr.Zero);
+                    Runtime.Decref(ps);
+                    return op;
 
-            case TypeCode.Double:
-                return Runtime.PyFloat_FromDouble((double)value);
+                case TypeCode.Double:
+                    return Runtime.PyFloat_FromDouble((double)value);
 
-            case TypeCode.SByte:
-                return Runtime.PyInt_FromInt32((int)((sbyte)value));
+                case TypeCode.SByte:
+                    return Runtime.PyInt_FromInt32((int)((sbyte)value));
 
-            case TypeCode.UInt16:
-                return Runtime.PyInt_FromInt32((int)((ushort)value));
+                case TypeCode.UInt16:
+                    return Runtime.PyInt_FromInt32((int)((ushort)value));
 
-            case TypeCode.UInt32:
-                return Runtime.PyLong_FromUnsignedLong((uint)value);
+                case TypeCode.UInt32:
+                    return Runtime.PyLong_FromUnsignedLong((uint)value);
 
-            case TypeCode.UInt64:
-                return Runtime.PyLong_FromUnsignedLongLong((ulong)value);
+                case TypeCode.UInt64:
+                    return Runtime.PyLong_FromUnsignedLongLong((ulong)value);
 
-            default:
-	            if (value is IEnumerable) {
-                    using (var resultlist = new PyList()) {
-                        foreach (object o in (IEnumerable)value) {
-                            using (var p = new PyObject(ToPython(o, o.GetType())))
-                                resultlist.Append(p);
+                default:
+                    if (value is IEnumerable)
+                    {
+                        using (var resultlist = new PyList())
+                        {
+                            foreach (object o in (IEnumerable)value)
+                            {
+                                using (var p = new PyObject(ToPython(o, o.GetType())))
+                                    resultlist.Append(p);
+                            }
+                            Runtime.Incref(resultlist.Handle);
+                            return resultlist.Handle;
                         }
-                        Runtime.Incref(resultlist.Handle);
-                        return resultlist.Handle;
                     }
-                }
-                result = CLRObject.GetInstHandle(value, type);
-                return result;
+                    result = CLRObject.GetInstHandle(value, type);
+                    return result;
             }
-
         }
 
 
@@ -235,8 +246,10 @@ internal static IntPtr ToPython(Object value, Type type) {
         // when we want to convert an object to Python.
         //====================================================================
 
-        internal static IntPtr ToPythonImplicit(Object value) {
-            if (value == null) {
+        internal static IntPtr ToPythonImplicit(Object value)
+        {
+            if (value == null)
+            {
                 IntPtr result = Runtime.PyNone;
                 Runtime.Incref(result);
                 return result;
@@ -252,8 +265,10 @@ internal static IntPtr ToPythonImplicit(Object value) {
         //====================================================================
 
         internal static bool ToManaged(IntPtr value, Type type,
-                                       out object result, bool setError) {
-            if (type.IsByRef) {
+            out object result, bool setError)
+        {
+            if (type.IsByRef)
+            {
                 type = type.GetElementType();
             }
             return Converter.ToManagedValue(value, type, out result, setError);
@@ -261,7 +276,8 @@ internal static bool ToManaged(IntPtr value, Type type,
 
 
         internal static bool ToManagedValue(IntPtr value, Type obType,
-                                      out Object result, bool setError) {
+            out Object result, bool setError)
+        {
             // Common case: if the Python value is a wrapped managed object
             // instance, just return the wrapped object.
             ManagedType mt = ManagedType.GetManagedObject(value);
@@ -269,33 +285,41 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
 
             // XXX - hack to support objects wrapped in old-style classes
             // (such as exception objects).
-            if (Runtime.wrap_exceptions) {
-            if (mt == null) {
-                if (Runtime.PyObject_IsInstance(
-                            value, Exceptions.Exception
-                            ) > 0) {
-                    IntPtr p = Runtime.PyObject_GetAttrString(value, "_inner");
-                    if (p != IntPtr.Zero) {
-                        // This is safe because we know that the __dict__ of
-                        // value holds a reference to _inner.
-                        value = p;
-                        Runtime.Decref(p);
+            if (Runtime.wrap_exceptions)
+            {
+                if (mt == null)
+                {
+                    if (Runtime.PyObject_IsInstance(
+                        value, Exceptions.Exception
+                        ) > 0)
+                    {
+                        IntPtr p = Runtime.PyObject_GetAttrString(value, "_inner");
+                        if (p != IntPtr.Zero)
+                        {
+                            // This is safe because we know that the __dict__ of
+                            // value holds a reference to _inner.
+                            value = p;
+                            Runtime.Decref(p);
+                            mt = ManagedType.GetManagedObject(value);
+                        }
+                    }
+                    IntPtr c = Exceptions.UnwrapExceptionClass(value);
+                    if ((c != IntPtr.Zero) && (c != value))
+                    {
+                        value = c;
+                        Runtime.Decref(c);
                         mt = ManagedType.GetManagedObject(value);
                     }
                 }
-                IntPtr c = Exceptions.UnwrapExceptionClass(value);
-                if ((c != IntPtr.Zero) && (c != value)) {
-                    value = c;
-                    Runtime.Decref(c);
-                    mt = ManagedType.GetManagedObject(value);
-                }
-            }
             }
 
-            if (mt != null) {
-                if (mt is CLRObject) {
+            if (mt != null)
+            {
+                if (mt is CLRObject)
+                {
                     object tmp = ((CLRObject)mt).inst;
-                    if (obType.IsInstanceOfType(tmp)) {
+                    if (obType.IsInstanceOfType(tmp))
+                    {
                         result = tmp;
                         return true;
                     }
@@ -304,7 +328,8 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
                     Exceptions.SetError(Exceptions.TypeError, err);
                     return false;
                 }
-                if (mt is ClassBase) {
+                if (mt is ClassBase)
+                {
                     result = ((ClassBase)mt).type;
                     return true;
                 }
@@ -312,16 +337,19 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
                 return false;
             }
 
-            if (value == Runtime.PyNone && !obType.IsValueType) {
+            if (value == Runtime.PyNone && !obType.IsValueType)
+            {
                 result = null;
                 return true;
             }
 
-            if (obType.IsArray) {
+            if (obType.IsArray)
+            {
                 return ToArray(value, obType, out result, setError);
             }
 
-            if (obType.IsEnum) {
+            if (obType.IsEnum)
+            {
                 return ToEnum(value, obType, out result, setError);
             }
 
@@ -329,37 +357,45 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
             // default conversions (Python string -> managed string,
             // Python int -> Int32 etc.).
 
-            if (obType == objectType) {
-                if (Runtime.IsStringType(value)) {
+            if (obType == objectType)
+            {
+                if (Runtime.IsStringType(value))
+                {
                     return ToPrimitive(value, stringType, out result,
-                                       setError);
+                        setError);
                 }
 
-                else if (Runtime.PyBool_Check(value)) {
+                else if (Runtime.PyBool_Check(value))
+                {
                     return ToPrimitive(value, boolType, out result, setError);
                 }
 
-                else if (Runtime.PyInt_Check(value)) {
+                else if (Runtime.PyInt_Check(value))
+                {
                     return ToPrimitive(value, int32Type, out result, setError);
                 }
 
-                else if (Runtime.PyLong_Check(value)) {
+                else if (Runtime.PyLong_Check(value))
+                {
                     return ToPrimitive(value, int64Type, out result, setError);
                 }
 
-                else if (Runtime.PyFloat_Check(value)) {
+                else if (Runtime.PyFloat_Check(value))
+                {
                     return ToPrimitive(value, doubleType, out result, setError);
                 }
 
-                else if (Runtime.PySequence_Check(value)) {
+                else if (Runtime.PySequence_Check(value))
+                {
                     return ToArray(value, typeof(object[]), out result,
-                                   setError);
+                        setError);
                 }
 
-                if (setError) {
+                if (setError)
+                {
                     Exceptions.SetError(Exceptions.TypeError,
-                                        "value cannot be converted to Object"
-                                        );
+                        "value cannot be converted to Object"
+                        );
                 }
 
                 return false;
@@ -409,15 +445,14 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
                 if (setError)
                 {
                     Exceptions.SetError(Exceptions.TypeError,
-                                        "value cannot be converted to Type"
-                                        );
+                        "value cannot be converted to Type"
+                        );
                 }
 
                 return false;
             }
 
             return ToPrimitive(value, obType, out result, setError);
-
         }
 
         //====================================================================
@@ -425,77 +460,87 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
         //====================================================================
 
         static bool ToPrimitive(IntPtr value, Type obType, out Object result,
-                                bool setError) {
-
+            bool setError)
+        {
             IntPtr overflow = Exceptions.OverflowError;
             TypeCode tc = Type.GetTypeCode(obType);
             result = null;
             IntPtr op;
             int ival;
 
-            switch(tc) {
-
-            case TypeCode.String:
-                string st = Runtime.GetManagedString(value);
-                if (st == null) {
-                    goto type_error;
-                }
-                result = st;
-                return true;
+            switch (tc)
+            {
+                case TypeCode.String:
+                    string st = Runtime.GetManagedString(value);
+                    if (st == null)
+                    {
+                        goto type_error;
+                    }
+                    result = st;
+                    return true;
 
-            case TypeCode.Int32:
+                case TypeCode.Int32:
 #if !(PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
-                // Trickery to support 64-bit platforms.
-                if (IntPtr.Size == 4) {
-                    op = Runtime.PyNumber_Int(value);
-
-                    // As of Python 2.3, large ints magically convert :(
-                    if (Runtime.PyLong_Check(op) ) {
-                        Runtime.Decref(op);
-                        goto overflow;
-                    }
+                    // Trickery to support 64-bit platforms.
+                    if (IntPtr.Size == 4)
+                    {
+                        op = Runtime.PyNumber_Int(value);
 
-                    if (op == IntPtr.Zero) {
-                        if (Exceptions.ExceptionMatches(overflow)) {
+                        // As of Python 2.3, large ints magically convert :(
+                        if (Runtime.PyLong_Check(op))
+                        {
+                            Runtime.Decref(op);
                             goto overflow;
                         }
-                      goto type_error;
+
+                        if (op == IntPtr.Zero)
+                        {
+                            if (Exceptions.ExceptionMatches(overflow))
+                            {
+                                goto overflow;
+                            }
+                            goto type_error;
+                        }
+                        ival = (int)Runtime.PyInt_AsLong(op);
+                        Runtime.Decref(op);
+                        result = ival;
+                        return true;
                     }
-                    ival = (int)Runtime.PyInt_AsLong(op);
-                    Runtime.Decref(op);
-                    result = ival;
-                    return true;
-                }
-                else {
+                    else
+                    {
 #else
-                // When using Python3 always use the PyLong API
+    // When using Python3 always use the PyLong API
                 {
 #endif
-                    op = Runtime.PyNumber_Long(value);
-                    if (op == IntPtr.Zero) {
-                        Exceptions.Clear();
-                        if (Exceptions.ExceptionMatches(overflow)) {
+                        op = Runtime.PyNumber_Long(value);
+                        if (op == IntPtr.Zero)
+                        {
+                            Exceptions.Clear();
+                            if (Exceptions.ExceptionMatches(overflow))
+                            {
+                                goto overflow;
+                            }
+                            goto type_error;
+                        }
+                        long ll = (long)Runtime.PyLong_AsLongLong(op);
+                        Runtime.Decref(op);
+                        if ((ll == -1) && Exceptions.ErrorOccurred())
+                        {
                             goto overflow;
                         }
-                        goto type_error;
-                    }
-                    long ll = (long)Runtime.PyLong_AsLongLong(op);
-                    Runtime.Decref(op);
-                    if ((ll == -1) && Exceptions.ErrorOccurred()) {
-                        goto overflow;
-                    }
-                    if (ll > Int32.MaxValue || ll < Int32.MinValue) {
-                        goto overflow;
+                        if (ll > Int32.MaxValue || ll < Int32.MinValue)
+                        {
+                            goto overflow;
+                        }
+                        result = (int)ll;
+                        return true;
                     }
-                    result = (int)ll;
-                    return true;
-                }
 
-            case TypeCode.Boolean:
-                result = (Runtime.PyObject_IsTrue(value) != 0);
-                return true;
+                case TypeCode.Boolean:
+                    result = (Runtime.PyObject_IsTrue(value) != 0);
+                    return true;
 
-            case TypeCode.Byte:
+                case TypeCode.Byte:
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
                 if (Runtime.PyObject_TypeCheck(value, Runtime.PyBytesType))
                 {
@@ -508,34 +553,39 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result,
                     goto type_error;
                 }
 #else
-                if (Runtime.PyObject_TypeCheck(value, Runtime.PyStringType)) {
-                    if (Runtime.PyString_Size(value) == 1) {
-                        op = Runtime.PyString_AS_STRING(value);
-                        result = (byte)Marshal.ReadByte(op);
-                        return true;
+                    if (Runtime.PyObject_TypeCheck(value, Runtime.PyStringType))
+                    {
+                        if (Runtime.PyString_Size(value) == 1)
+                        {
+                            op = Runtime.PyString_AS_STRING(value);
+                            result = (byte)Marshal.ReadByte(op);
+                            return true;
+                        }
+                        goto type_error;
                     }
-                    goto type_error;
-                }
 #endif
 
-                op = Runtime.PyNumber_Int(value);
-                if (op == IntPtr.Zero) {
-                    if (Exceptions.ExceptionMatches(overflow)) {
-                        goto overflow;
+                    op = Runtime.PyNumber_Int(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        if (Exceptions.ExceptionMatches(overflow))
+                        {
+                            goto overflow;
+                        }
+                        goto type_error;
                     }
-                    goto type_error;
-                }
-                ival = (int) Runtime.PyInt_AsLong(op);
-                Runtime.Decref(op);
+                    ival = (int)Runtime.PyInt_AsLong(op);
+                    Runtime.Decref(op);
 
-                if (ival > Byte.MaxValue || ival < Byte.MinValue) {
-                    goto overflow;
-                }
-                byte b = (byte) ival;
-                result = b;
-                return true;
+                    if (ival > Byte.MaxValue || ival < Byte.MinValue)
+                    {
+                        goto overflow;
+                    }
+                    byte b = (byte)ival;
+                    result = b;
+                    return true;
 
-            case TypeCode.SByte:
+                case TypeCode.SByte:
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
                 if (Runtime.PyObject_TypeCheck(value, Runtime.PyBytesType)) {
                     if (Runtime.PyBytes_Size(value) == 1) {
@@ -546,34 +596,39 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result,
                     goto type_error;
                 }
 #else
-                if (Runtime.PyObject_TypeCheck(value, Runtime.PyStringType)) {
-                    if (Runtime.PyString_Size(value) == 1) {
-                        op = Runtime.PyString_AS_STRING(value);
-                        result = (sbyte)Marshal.ReadByte(op);
-                        return true;
+                    if (Runtime.PyObject_TypeCheck(value, Runtime.PyStringType))
+                    {
+                        if (Runtime.PyString_Size(value) == 1)
+                        {
+                            op = Runtime.PyString_AS_STRING(value);
+                            result = (sbyte)Marshal.ReadByte(op);
+                            return true;
+                        }
+                        goto type_error;
                     }
-                    goto type_error;
-                }
 #endif
 
-                op = Runtime.PyNumber_Int(value);
-                if (op == IntPtr.Zero) {
-                    if (Exceptions.ExceptionMatches(overflow)) {
-                        goto overflow;
+                    op = Runtime.PyNumber_Int(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        if (Exceptions.ExceptionMatches(overflow))
+                        {
+                            goto overflow;
+                        }
+                        goto type_error;
                     }
-                    goto type_error;
-                }
-                ival = (int) Runtime.PyInt_AsLong(op);
-                Runtime.Decref(op);
+                    ival = (int)Runtime.PyInt_AsLong(op);
+                    Runtime.Decref(op);
 
-                if (ival > SByte.MaxValue || ival < SByte.MinValue) {
-                    goto overflow;
-                }
-                sbyte sb = (sbyte) ival;
-                result = sb;
-                return true;
+                    if (ival > SByte.MaxValue || ival < SByte.MinValue)
+                    {
+                        goto overflow;
+                    }
+                    sbyte sb = (sbyte)ival;
+                    result = sb;
+                    return true;
 
-            case TypeCode.Char:
+                case TypeCode.Char:
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
                 if (Runtime.PyObject_TypeCheck(value, Runtime.PyBytesType)) {
                     if (Runtime.PyBytes_Size(value) == 1) {
@@ -584,175 +639,202 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result,
                     goto type_error;
                 }
 #else
-                if (Runtime.PyObject_TypeCheck(value, Runtime.PyStringType)) {
-                    if (Runtime.PyString_Size(value) == 1) {
-                        op = Runtime.PyString_AS_STRING(value);
-                        result = (char)Marshal.ReadByte(op);
-                        return true;
+                    if (Runtime.PyObject_TypeCheck(value, Runtime.PyStringType))
+                    {
+                        if (Runtime.PyString_Size(value) == 1)
+                        {
+                            op = Runtime.PyString_AS_STRING(value);
+                            result = (char)Marshal.ReadByte(op);
+                            return true;
+                        }
+                        goto type_error;
                     }
-                    goto type_error;
-                }
 #endif
-                else if (Runtime.PyObject_TypeCheck(value,
-                                 Runtime.PyUnicodeType)) {
-                    if (Runtime.PyUnicode_GetSize(value) == 1) {
-                        op = Runtime.PyUnicode_AS_UNICODE(value);
+                    else if (Runtime.PyObject_TypeCheck(value,
+                        Runtime.PyUnicodeType))
+                    {
+                        if (Runtime.PyUnicode_GetSize(value) == 1)
+                        {
+                            op = Runtime.PyUnicode_AS_UNICODE(value);
 #if (!UCS4)
-                        // 2011-01-02: Marshal as character array because the cast
-                        // result = (char)Marshal.ReadInt16(op); throws an OverflowException
-                        // on negative numbers with Check Overflow option set on the project
+    // 2011-01-02: Marshal as character array because the cast
+    // result = (char)Marshal.ReadInt16(op); throws an OverflowException
+    // on negative numbers with Check Overflow option set on the project
                         Char[] buff = new Char[1];
                         Marshal.Copy(op, buff, 0, 1);
                         result = buff[0];
 #else
-                        // XXX this is probably NOT correct?
-                        result = (char)Marshal.ReadInt32(op);
+                            // XXX this is probably NOT correct?
+                            result = (char)Marshal.ReadInt32(op);
 #endif
-                        return true;
+                            return true;
+                        }
+                        goto type_error;
                     }
-                    goto type_error;
-                }
 
-                op = Runtime.PyNumber_Int(value);
-                if (op == IntPtr.Zero) {
-                    goto type_error;
-                }
-                ival = Runtime.PyInt_AsLong(op);
-                Runtime.Decref(op);
-                if (ival > Char.MaxValue || ival < Char.MinValue) {
-                    goto overflow;
-                }
-                result = (char)ival;
-                return true;
-
-            case TypeCode.Int16:
-                op = Runtime.PyNumber_Int(value);
-                if (op == IntPtr.Zero) {
-                    if (Exceptions.ExceptionMatches(overflow)) {
+                    op = Runtime.PyNumber_Int(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        goto type_error;
+                    }
+                    ival = Runtime.PyInt_AsLong(op);
+                    Runtime.Decref(op);
+                    if (ival > Char.MaxValue || ival < Char.MinValue)
+                    {
                         goto overflow;
                     }
-                    goto type_error;
-                }
-                ival = (int) Runtime.PyInt_AsLong(op);
-                Runtime.Decref(op);
-                if (ival > Int16.MaxValue || ival < Int16.MinValue) {
-                    goto overflow;
-                }
-                short s = (short) ival;
-                result = s;
-                return true;
+                    result = (char)ival;
+                    return true;
 
-            case TypeCode.Int64:
-                op = Runtime.PyNumber_Long(value);
-                if (op == IntPtr.Zero) {
-                    if (Exceptions.ExceptionMatches(overflow)) {
+                case TypeCode.Int16:
+                    op = Runtime.PyNumber_Int(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        if (Exceptions.ExceptionMatches(overflow))
+                        {
+                            goto overflow;
+                        }
+                        goto type_error;
+                    }
+                    ival = (int)Runtime.PyInt_AsLong(op);
+                    Runtime.Decref(op);
+                    if (ival > Int16.MaxValue || ival < Int16.MinValue)
+                    {
                         goto overflow;
                     }
-                    goto type_error;
-                }
-                long l = (long)Runtime.PyLong_AsLongLong(op);
-                Runtime.Decref(op);
-                if ((l == -1) && Exceptions.ErrorOccurred()) {
-                    goto overflow;
-                }
-                result = l;
-                return true;
+                    short s = (short)ival;
+                    result = s;
+                    return true;
 
-            case TypeCode.UInt16:
-                op = Runtime.PyNumber_Int(value);
-                if (op == IntPtr.Zero) {
-                    if (Exceptions.ExceptionMatches(overflow)) {
+                case TypeCode.Int64:
+                    op = Runtime.PyNumber_Long(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        if (Exceptions.ExceptionMatches(overflow))
+                        {
+                            goto overflow;
+                        }
+                        goto type_error;
+                    }
+                    long l = (long)Runtime.PyLong_AsLongLong(op);
+                    Runtime.Decref(op);
+                    if ((l == -1) && Exceptions.ErrorOccurred())
+                    {
                         goto overflow;
                     }
-                    goto type_error;
-                }
-                ival = (int) Runtime.PyInt_AsLong(op);
-                Runtime.Decref(op);
-                if (ival > UInt16.MaxValue || ival < UInt16.MinValue) {
-                    goto overflow;
-                }
-                ushort us = (ushort) ival;
-                result = us;
-                return true;
+                    result = l;
+                    return true;
 
-            case TypeCode.UInt32:
-                op = Runtime.PyNumber_Long(value);
-                if (op == IntPtr.Zero) {
-                    if (Exceptions.ExceptionMatches(overflow)) {
-                        goto overflow;
+                case TypeCode.UInt16:
+                    op = Runtime.PyNumber_Int(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        if (Exceptions.ExceptionMatches(overflow))
+                        {
+                            goto overflow;
+                        }
+                        goto type_error;
                     }
-                    goto type_error;
-                }
-                uint ui = (uint)Runtime.PyLong_AsUnsignedLong(op);
-                
-                if (Exceptions.ErrorOccurred()) {
+                    ival = (int)Runtime.PyInt_AsLong(op);
                     Runtime.Decref(op);
-                    goto overflow;
-                }
+                    if (ival > UInt16.MaxValue || ival < UInt16.MinValue)
+                    {
+                        goto overflow;
+                    }
+                    ushort us = (ushort)ival;
+                    result = us;
+                    return true;
 
-                IntPtr check = Runtime.PyLong_FromUnsignedLong(ui);
-                int err = Runtime.PyObject_Compare(check, op);
-                Runtime.Decref(check);
-                Runtime.Decref(op);
-                if (0 != err || Exceptions.ErrorOccurred()) {
-                    goto overflow;
-                }
+                case TypeCode.UInt32:
+                    op = Runtime.PyNumber_Long(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        if (Exceptions.ExceptionMatches(overflow))
+                        {
+                            goto overflow;
+                        }
+                        goto type_error;
+                    }
+                    uint ui = (uint)Runtime.PyLong_AsUnsignedLong(op);
 
-                result = ui;
-                return true;
+                    if (Exceptions.ErrorOccurred())
+                    {
+                        Runtime.Decref(op);
+                        goto overflow;
+                    }
 
-            case TypeCode.UInt64:
-                op = Runtime.PyNumber_Long(value);
-                if (op == IntPtr.Zero) {
-                    if (Exceptions.ExceptionMatches(overflow)) {
+                    IntPtr check = Runtime.PyLong_FromUnsignedLong(ui);
+                    int err = Runtime.PyObject_Compare(check, op);
+                    Runtime.Decref(check);
+                    Runtime.Decref(op);
+                    if (0 != err || Exceptions.ErrorOccurred())
+                    {
                         goto overflow;
                     }
-                    goto type_error;
-                }
-                ulong ul = (ulong)Runtime.PyLong_AsUnsignedLongLong(op);
-                Runtime.Decref(op);
-                if (Exceptions.ErrorOccurred()) {
-                    goto overflow;
-                }
-                result = ul;
-                return true;
 
+                    result = ui;
+                    return true;
 
-            case TypeCode.Single:
-                op = Runtime.PyNumber_Float(value);
-                if (op == IntPtr.Zero) {
-                    if (Exceptions.ExceptionMatches(overflow)) {
+                case TypeCode.UInt64:
+                    op = Runtime.PyNumber_Long(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        if (Exceptions.ExceptionMatches(overflow))
+                        {
+                            goto overflow;
+                        }
+                        goto type_error;
+                    }
+                    ulong ul = (ulong)Runtime.PyLong_AsUnsignedLongLong(op);
+                    Runtime.Decref(op);
+                    if (Exceptions.ErrorOccurred())
+                    {
                         goto overflow;
                     }
-                    goto type_error;
-                }
-                double dd = Runtime.PyFloat_AsDouble(op);
-                Runtime.Decref(op);
-                if (dd > Single.MaxValue || dd < Single.MinValue) {
-                    goto overflow;
-                }
-                result = (float)dd;
-                return true;
+                    result = ul;
+                    return true;
 
-            case TypeCode.Double:
-                op = Runtime.PyNumber_Float(value);
-                if (op == IntPtr.Zero) {
-                    goto type_error;
-                }
-                double d = Runtime.PyFloat_AsDouble(op);
-                Runtime.Decref(op);
-                if (d > Double.MaxValue || d < Double.MinValue) {
-                    goto overflow;
-                }
-                result = d;
-                return true;
 
+                case TypeCode.Single:
+                    op = Runtime.PyNumber_Float(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        if (Exceptions.ExceptionMatches(overflow))
+                        {
+                            goto overflow;
+                        }
+                        goto type_error;
+                    }
+                    double dd = Runtime.PyFloat_AsDouble(op);
+                    Runtime.Decref(op);
+                    if (dd > Single.MaxValue || dd < Single.MinValue)
+                    {
+                        goto overflow;
+                    }
+                    result = (float)dd;
+                    return true;
+
+                case TypeCode.Double:
+                    op = Runtime.PyNumber_Float(value);
+                    if (op == IntPtr.Zero)
+                    {
+                        goto type_error;
+                    }
+                    double d = Runtime.PyFloat_AsDouble(op);
+                    Runtime.Decref(op);
+                    if (d > Double.MaxValue || d < Double.MinValue)
+                    {
+                        goto overflow;
+                    }
+                    result = d;
+                    return true;
             }
 
 
-        type_error:
+            type_error:
 
-            if (setError) {
+            if (setError)
+            {
                 string format = "'{0}' value cannot be converted to {1}";
                 string tpName = Runtime.PyObject_GetTypeName(value);
                 string error = String.Format(format, tpName, obType);
@@ -761,25 +843,26 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result,
 
             return false;
 
-        overflow:
+            overflow:
 
-            if (setError) {
+            if (setError)
+            {
                 string error = "value too large to convert";
                 Exceptions.SetError(Exceptions.OverflowError, error);
             }
 
             return false;
-
         }
 
 
-        static void SetConversionError(IntPtr value, Type target) {
+        static void SetConversionError(IntPtr value, Type target)
+        {
             IntPtr ob = Runtime.PyObject_Repr(value);
             string src = Runtime.GetManagedString(ob);
             Runtime.Decref(ob);
             string error = String.Format(
-                           "Cannot convert {0} to {1}", src, target
-                           );
+                "Cannot convert {0} to {1}", src, target
+                );
             Exceptions.SetError(Exceptions.TypeError, error);
         }
 
@@ -791,14 +874,16 @@ static void SetConversionError(IntPtr value, Type target) {
         //====================================================================
 
         static bool ToArray(IntPtr value, Type obType, out Object result,
-                           bool setError) {
-
+            bool setError)
+        {
             Type elementType = obType.GetElementType();
             int size = Runtime.PySequence_Size(value);
             result = null;
 
-            if (size < 0) {
-                if (setError) {
+            if (size < 0)
+            {
+                if (setError)
+                {
                     SetConversionError(value, obType);
                 }
                 return false;
@@ -808,17 +893,21 @@ static bool ToArray(IntPtr value, Type obType, out Object result,
 
             // XXX - is there a better way to unwrap this if it is a real
             // array?
-            for (int i = 0; i < size; i++) {
+            for (int i = 0; i < size; i++)
+            {
                 Object obj = null;
                 IntPtr item = Runtime.PySequence_GetItem(value, i);
-                if (item == IntPtr.Zero) {
-                    if (setError) {
+                if (item == IntPtr.Zero)
+                {
+                    if (setError)
+                    {
                         SetConversionError(value, obType);
                         return false;
                     }
                 }
 
-                if (!Converter.ToManaged(item, elementType, out obj, true)) {
+                if (!Converter.ToManaged(item, elementType, out obj, true))
+                {
                     Runtime.Decref(item);
                     return false;
                 }
@@ -837,32 +926,35 @@ static bool ToArray(IntPtr value, Type obType, out Object result,
         //====================================================================
 
         static bool ToEnum(IntPtr value, Type obType, out Object result,
-                           bool setError) {
-
+            bool setError)
+        {
             Type etype = Enum.GetUnderlyingType(obType);
             result = null;
 
-            if (!ToPrimitive(value, etype, out result, setError)) {
+            if (!ToPrimitive(value, etype, out result, setError))
+            {
                 return false;
             }
 
-            if (Enum.IsDefined(obType, result)) {
+            if (Enum.IsDefined(obType, result))
+            {
                 result = Enum.ToObject(obType, result);
                 return true;
             }
 
-            if (obType.GetCustomAttributes(flagsType, true).Length > 0) {
+            if (obType.GetCustomAttributes(flagsType, true).Length > 0)
+            {
                 result = Enum.ToObject(obType, result);
                 return true;
             }
 
-            if (setError) {
+            if (setError)
+            {
                 string error = "invalid enumeration value";
                 Exceptions.SetError(Exceptions.ValueError, error);
             }
 
             return false;
-
         }
     }
 
@@ -873,4 +965,4 @@ public static PyObject ToPython(this object o)
             return new PyObject(Converter.ToPython(o, o.GetType()));
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/debughelper.cs b/src/runtime/debughelper.cs
index 2c7c6a054..c61dfe5fa 100644
--- a/src/runtime/debughelper.cs
+++ b/src/runtime/debughelper.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
@@ -14,23 +5,25 @@
 using System.Diagnostics;
 using System.Threading;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Debugging helper utilities.
     /// The methods are only executed when the DEBUG flag is set. Otherwise
     /// they are automagically hidden by the compiler and silently surpressed.
     /// </summary>
-
-    internal class DebugUtil {
-
+    internal class DebugUtil
+    {
         [Conditional("DEBUG")]
-        public static void Print(string msg, params IntPtr[] args) {
+        public static void Print(string msg, params IntPtr[] args)
+        {
             string result = msg;
             result += " ";
 
-            for (int i = 0; i < args.Length; i++) {
-                if (args[i] == IntPtr.Zero) {
+            for (int i = 0; i < args.Length; i++)
+            {
+                if (args[i] == IntPtr.Zero)
+                {
                     Console.WriteLine("null arg to print");
                 }
                 IntPtr ob = Runtime.PyObject_Repr(args[i]);
@@ -43,12 +36,14 @@ public static void Print(string msg, params IntPtr[] args) {
         }
 
         [Conditional("DEBUG")]
-        public static void Print(string msg) {
+        public static void Print(string msg)
+        {
             Console.WriteLine(msg);
         }
 
         [Conditional("DEBUG")]
-        internal static void DumpType(IntPtr type) {
+        internal static void DumpType(IntPtr type)
+        {
             IntPtr op = Marshal.ReadIntPtr(type, TypeOffset.tp_name);
             string name = Marshal.PtrToStringAnsi(op);
 
@@ -70,8 +65,9 @@ internal static void DumpType(IntPtr type) {
             FieldInfo[] slots = typeof(TypeOffset).GetFields();
             int size = IntPtr.Size;
 
-            for (int i = 0; i < slots.Length; i++) {
-                int offset = i * size;
+            for (int i = 0; i < slots.Length; i++)
+            {
+                int offset = i*size;
                 name = slots[i].Name;
                 op = Marshal.ReadIntPtr(type, offset);
                 Console.WriteLine("  {0}: {1}", name, op);
@@ -81,21 +77,24 @@ internal static void DumpType(IntPtr type) {
             Console.WriteLine("");
 
             op = Marshal.ReadIntPtr(type, TypeOffset.tp_dict);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 Console.WriteLine("  dict: null");
             }
-            else {
+            else
+            {
                 DebugUtil.Print("  dict: ", op);
             }
-
         }
 
         [Conditional("DEBUG")]
-        internal static void DumpInst(IntPtr ob) {
+        internal static void DumpInst(IntPtr ob)
+        {
             IntPtr tp = Runtime.PyObject_TYPE(ob);
             int sz = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_basicsize);
 
-            for (int i = 0; i < sz; i += IntPtr.Size) {
+            for (int i = 0; i < sz; i += IntPtr.Size)
+            {
                 IntPtr pp = new IntPtr(ob.ToInt64() + i);
                 IntPtr v = Marshal.ReadIntPtr(pp);
                 Console.WriteLine("offset {0}: {1}", i, v);
@@ -106,7 +105,8 @@ internal static void DumpInst(IntPtr ob) {
         }
 
         [Conditional("DEBUG")]
-        internal static void debug(string msg) {
+        internal static void debug(string msg)
+        {
             StackTrace st = new StackTrace(1, true);
             StackFrame sf = st.GetFrame(0);
             MethodBase mb = sf.GetMethod();
@@ -114,15 +114,9 @@ internal static void debug(string msg) {
             string caller = mt.Name + "." + sf.GetMethod().Name;
             Thread t = Thread.CurrentThread;
             string tid = t.GetHashCode().ToString();
-            Console.WriteLine("thread {0} : {1}", tid, caller); 
+            Console.WriteLine("thread {0} : {1}", tid, caller);
             Console.WriteLine("  {0}", msg);
             return;
         }
-
-
     }
-
-
-}
-
-
+}
\ No newline at end of file
diff --git a/src/runtime/delegatemanager.cs b/src/runtime/delegatemanager.cs
index ddbabf872..9fe2c2882 100644
--- a/src/runtime/delegatemanager.cs
+++ b/src/runtime/delegatemanager.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Threading;
 using System.Runtime.InteropServices;
@@ -15,15 +6,14 @@
 using System.Reflection;
 using System.Reflection.Emit;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
-    /// The DelegateManager class manages the creation of true managed 
+    /// The DelegateManager class manages the creation of true managed
     /// delegate instances that dispatch calls to Python methods.
     /// </summary>
-
-    internal class DelegateManager {
-
+    internal class DelegateManager
+    {
         Hashtable cache;
         Type basetype;
         Type listtype;
@@ -32,7 +22,8 @@ internal class DelegateManager {
         Type ptrtype;
         CodeGenerator codeGenerator;
 
-        public DelegateManager() {
+        public DelegateManager()
+        {
             basetype = typeof(Dispatcher);
             listtype = typeof(ArrayList);
             voidtype = typeof(void);
@@ -48,8 +39,10 @@ public DelegateManager() {
         // delegate is not implemented in Python code.
         //====================================================================
 
-        public IntPtr GetPythonHandle(Delegate d) {
-            if ((d != null) && (d.Target is Dispatcher)) {
+        public IntPtr GetPythonHandle(Delegate d)
+        {
+            if ((d != null) && (d.Target is Dispatcher))
+            {
                 Dispatcher disp = d.Target as Dispatcher;
                 return disp.target;
             }
@@ -60,10 +53,10 @@ public IntPtr GetPythonHandle(Delegate d) {
         // GetDispatcher is responsible for creating a class that provides
         // an appropriate managed callback method for a given delegate type.
         //====================================================================
-        
-        private Type GetDispatcher(Type dtype) {
 
-            // If a dispatcher type for the given delegate type has already 
+        private Type GetDispatcher(Type dtype)
+        {
+            // If a dispatcher type for the given delegate type has already
             // been generated, get it from the cache. The cache maps delegate
             // types to generated dispatcher types. A possible optimization
             // for the future would be to generate dispatcher types based on
@@ -71,7 +64,8 @@ private Type GetDispatcher(Type dtype) {
             // delegate types with the same sig could use the same dispatcher.
 
             Object item = cache[dtype];
-            if (item != null) {
+            if (item != null)
+            {
                 return (Type)item;
             }
 
@@ -85,10 +79,10 @@ private Type GetDispatcher(Type dtype) {
 
             MethodAttributes ma = MethodAttributes.Public |
                                   MethodAttributes.HideBySig |
-                                  MethodAttributes.SpecialName | 
+                                  MethodAttributes.SpecialName |
                                   MethodAttributes.RTSpecialName;
             CallingConventions cc = CallingConventions.Standard;
-            Type[] args = {ptrtype, typetype};
+            Type[] args = { ptrtype, typetype };
             ConstructorBuilder cb = tb.DefineConstructor(ma, cc, args);
             ConstructorInfo ci = basetype.GetConstructor(args);
             ILGenerator il = cb.GetILGenerator();
@@ -109,16 +103,17 @@ private Type GetDispatcher(Type dtype) {
             ParameterInfo[] pi = method.GetParameters();
 
             Type[] signature = new Type[pi.Length];
-            for (int i = 0; i < pi.Length; i++) {
+            for (int i = 0; i < pi.Length; i++)
+            {
                 signature[i] = pi[i].ParameterType;
             }
 
             MethodBuilder mb = tb.DefineMethod(
-                                  "Invoke",
-                                  MethodAttributes.Public, 
-                                  method.ReturnType,
-                                  signature
-                                  );
+                "Invoke",
+                MethodAttributes.Public,
+                method.ReturnType,
+                signature
+                );
 
             ConstructorInfo ctor = listtype.GetConstructor(Type.EmptyTypes);
             MethodInfo dispatch = basetype.GetMethod("Dispatch");
@@ -129,12 +124,14 @@ private Type GetDispatcher(Type dtype) {
             il.Emit(OpCodes.Newobj, ctor);
             il.Emit(OpCodes.Stloc_0);
 
-            for (int c = 0; c < signature.Length; c++) {
+            for (int c = 0; c < signature.Length; c++)
+            {
                 Type t = signature[c];
                 il.Emit(OpCodes.Ldloc_0);
                 il.Emit(OpCodes.Ldarg_S, (byte)(c + 1));
 
-                if (t.IsValueType) {
+                if (t.IsValueType)
+                {
                     il.Emit(OpCodes.Box, t);
                 }
 
@@ -146,10 +143,12 @@ private Type GetDispatcher(Type dtype) {
             il.Emit(OpCodes.Ldloc_0);
             il.Emit(OpCodes.Call, dispatch);
 
-            if (method.ReturnType == voidtype) {
+            if (method.ReturnType == voidtype)
+            {
                 il.Emit(OpCodes.Pop);
             }
-            else if (method.ReturnType.IsValueType) {
+            else if (method.ReturnType.IsValueType)
+            {
                 il.Emit(OpCodes.Unbox_Any, method.ReturnType);
             }
 
@@ -166,15 +165,13 @@ private Type GetDispatcher(Type dtype) {
         // returned will dispatch calls to the given Python object.
         //====================================================================
 
-        internal Delegate GetDelegate(Type dtype, IntPtr callable) {
+        internal Delegate GetDelegate(Type dtype, IntPtr callable)
+        {
             Type dispatcher = GetDispatcher(dtype);
-            object[] args = {callable, dtype};
+            object[] args = { callable, dtype };
             object o = Activator.CreateInstance(dispatcher, args);
             return Delegate.CreateDelegate(dtype, o, "Invoke");
         }
-
-
-
     }
 
 
@@ -182,13 +179,13 @@ internal Delegate GetDelegate(Type dtype, IntPtr callable) {
        the delegate manager generates a custom subclass of Dispatcher and
        instantiates it, passing the IntPtr of the Python callable.
 
-       The "real" delegate is created using CreateDelegate, passing the 
+       The "real" delegate is created using CreateDelegate, passing the
        instance of the generated type and the name of the (generated)
        implementing method (Invoke).
 
        The true delegate instance holds the only reference to the dispatcher
        instance, which ensures that when the delegate dies, the finalizer
-       of the referenced instance will be able to decref the Python 
+       of the referenced instance will be able to decref the Python
        callable.
 
        A possible alternate strategy would be to create custom subclasses
@@ -199,35 +196,41 @@ A possible alternate strategy would be to create custom subclasses
 
     */
 
-    public class Dispatcher {
-
+    public class Dispatcher
+    {
         public IntPtr target;
         public Type dtype;
 
-        public Dispatcher(IntPtr target, Type dtype) {
+        public Dispatcher(IntPtr target, Type dtype)
+        {
             Runtime.Incref(target);
             this.target = target;
             this.dtype = dtype;
         }
 
-        ~Dispatcher() {
+        ~Dispatcher()
+        {
             // Note: the managed GC thread can run and try to free one of
-            // these *after* the Python runtime has been finalized! 
-            if (Runtime.Py_IsInitialized() > 0) {
+            // these *after* the Python runtime has been finalized!
+            if (Runtime.Py_IsInitialized() > 0)
+            {
                 IntPtr gs = PythonEngine.AcquireLock();
                 Runtime.Decref(target);
                 PythonEngine.ReleaseLock(gs);
             }
         }
 
-        public object Dispatch(ArrayList args) {
+        public object Dispatch(ArrayList args)
+        {
             IntPtr gs = PythonEngine.AcquireLock();
             object ob = null;
 
-            try {
+            try
+            {
                 ob = TrueDispatch(args);
             }
-            catch (Exception e) {
+            catch (Exception e)
+            {
                 PythonEngine.ReleaseLock(gs);
                 throw e;
             }
@@ -236,13 +239,15 @@ public object Dispatch(ArrayList args) {
             return ob;
         }
 
-        public object TrueDispatch(ArrayList args) {
+        public object TrueDispatch(ArrayList args)
+        {
             MethodInfo method = dtype.GetMethod("Invoke");
             ParameterInfo[] pi = method.GetParameters();
             IntPtr pyargs = Runtime.PyTuple_New(pi.Length);
             Type rtype = method.ReturnType;
 
-            for (int i = 0; i < pi.Length; i++) {
+            for (int i = 0; i < pi.Length; i++)
+            {
                 // Here we own the reference to the Python value, and we
                 // give the ownership to the arg tuple.
                 IntPtr arg = Converter.ToPython(args[i], pi[i].ParameterType);
@@ -252,17 +257,20 @@ public object TrueDispatch(ArrayList args) {
             IntPtr op = Runtime.PyObject_Call(target, pyargs, IntPtr.Zero);
             Runtime.Decref(pyargs);
 
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 PythonException e = new PythonException();
                 throw e;
             }
 
-            if (rtype == typeof(void)) {
+            if (rtype == typeof(void))
+            {
                 return null;
             }
 
             Object result = null;
-            if (!Converter.ToManaged(op, rtype, out result, false)) {
+            if (!Converter.ToManaged(op, rtype, out result, false))
+            {
                 string s = "could not convert Python result to " +
                            rtype.ToString();
                 Runtime.Decref(op);
@@ -272,18 +280,17 @@ public object TrueDispatch(ArrayList args) {
             Runtime.Decref(op);
             return result;
         }
-
-        
     }
 
 
-    public class ConversionException : System.Exception {
-
-        public ConversionException() : base() {}
-
-        public ConversionException(string msg) : base(msg) {}
+    public class ConversionException : System.Exception
+    {
+        public ConversionException() : base()
+        {
+        }
 
+        public ConversionException(string msg) : base(msg)
+        {
+        }
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/delegateobject.cs b/src/runtime/delegateobject.cs
index 5a1ab9021..cde0af9ab 100644
--- a/src/runtime/delegateobject.cs
+++ b/src/runtime/delegateobject.cs
@@ -1,30 +1,21 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Managed class that provides the implementation for reflected delegate
-    /// types. Delegates are represented in Python by generated type objects. 
-    /// Each of those type objects is associated an instance of this class, 
+    /// types. Delegates are represented in Python by generated type objects.
+    /// Each of those type objects is associated an instance of this class,
     /// which provides its implementation.
     /// </summary>
-
-    internal class DelegateObject : ClassBase {
-
+    internal class DelegateObject : ClassBase
+    {
         MethodBinder binder;
 
-        internal DelegateObject(Type tp) : base(tp) {
+        internal DelegateObject(Type tp) : base(tp)
+        {
             binder = new MethodBinder(tp.GetMethod("Invoke"));
         }
 
@@ -34,9 +25,11 @@ internal DelegateObject(Type tp) : base(tp) {
         // the true managed delegate the Python object represents (or null).
         //====================================================================
 
-        private static Delegate GetTrueDelegate(IntPtr op) {
+        private static Delegate GetTrueDelegate(IntPtr op)
+        {
             CLRObject o = GetManagedObject(op) as CLRObject;
-            if (o != null) {
+            if (o != null)
+            {
                 Delegate d = o.inst as Delegate;
                 return d;
             }
@@ -44,7 +37,8 @@ private static Delegate GetTrueDelegate(IntPtr op) {
         }
 
 
-        internal override bool CanSubclass() {
+        internal override bool CanSubclass()
+        {
             return false;
         }
 
@@ -57,17 +51,20 @@ internal override bool CanSubclass() {
         // to the Python callable passed in.
         //====================================================================
 
-        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
+        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw)
+        {
             DelegateObject self = (DelegateObject)GetManagedObject(tp);
 
-            if (Runtime.PyTuple_Size(args) != 1) {
+            if (Runtime.PyTuple_Size(args) != 1)
+            {
                 string message = "class takes exactly one argument";
                 return Exceptions.RaiseTypeError(message);
             }
 
             IntPtr method = Runtime.PyTuple_GetItem(args, 0);
 
-            if (Runtime.PyCallable_Check(method) != 1) {
+            if (Runtime.PyCallable_Check(method) != 1)
+            {
                 return Exceptions.RaiseTypeError("argument must be callable");
             }
 
@@ -76,24 +73,26 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
         }
 
 
-
         //====================================================================
         // Implements __call__ for reflected delegate types.
         //====================================================================
 
-        public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw) {
+        public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw)
+        {
             // todo: add fast type check!
             IntPtr pytype = Runtime.PyObject_TYPE(ob);
             DelegateObject self = (DelegateObject)GetManagedObject(pytype);
             CLRObject o = GetManagedObject(ob) as CLRObject;
 
-            if (o == null) {
+            if (o == null)
+            {
                 return Exceptions.RaiseTypeError("invalid argument");
             }
-            
+
             Delegate d = o.inst as Delegate;
 
-            if (d == null) {
+            if (d == null)
+            {
                 return Exceptions.RaiseTypeError("invalid argument");
             }
             return self.binder.Invoke(ob, args, kw);
@@ -133,17 +132,16 @@ public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw) {
             return pyfalse;
         }
 #else
-        public static new int tp_compare(IntPtr ob, IntPtr other) {
+        public static new int tp_compare(IntPtr ob, IntPtr other)
+        {
             Delegate d1 = GetTrueDelegate(ob);
             Delegate d2 = GetTrueDelegate(other);
-            if (d1 == d2) {
+            if (d1 == d2)
+            {
                 return 0;
             }
             return -1;
         }
 #endif
-
-    }        
-
-
-}
+    }
+}
\ No newline at end of file
diff --git a/src/runtime/eventbinding.cs b/src/runtime/eventbinding.cs
index 6135c1d68..d3b22d5bc 100644
--- a/src/runtime/eventbinding.cs
+++ b/src/runtime/eventbinding.cs
@@ -1,26 +1,18 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements a Python event binding type, similar to a method binding.
     //========================================================================
 
-    internal class EventBinding : ExtensionType {
-
+    internal class EventBinding : ExtensionType
+    {
         EventObject e;
         IntPtr target;
 
-        public EventBinding(EventObject e, IntPtr target) : base() {
+        public EventBinding(EventObject e, IntPtr target) : base()
+        {
             Runtime.Incref(target);
             this.target = target;
             this.e = e;
@@ -31,17 +23,20 @@ public EventBinding(EventObject e, IntPtr target) : base() {
         // EventBinding += operator implementation.
         //====================================================================
 
-        public static IntPtr nb_inplace_add(IntPtr ob, IntPtr arg) {
+        public static IntPtr nb_inplace_add(IntPtr ob, IntPtr arg)
+        {
             EventBinding self = (EventBinding)GetManagedObject(ob);
 
-            if (Runtime.PyCallable_Check(arg) < 1) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                                    "event handlers must be callable"
-                                    );
+            if (Runtime.PyCallable_Check(arg) < 1)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "event handlers must be callable"
+                    );
                 return IntPtr.Zero;
             }
 
-            if(!self.e.AddEventHandler(self.target, arg)) {
+            if (!self.e.AddEventHandler(self.target, arg))
+            {
                 return IntPtr.Zero;
             }
 
@@ -54,17 +49,20 @@ public static IntPtr nb_inplace_add(IntPtr ob, IntPtr arg) {
         // EventBinding -= operator implementation.
         //====================================================================
 
-        public static IntPtr nb_inplace_subtract(IntPtr ob, IntPtr arg) {
+        public static IntPtr nb_inplace_subtract(IntPtr ob, IntPtr arg)
+        {
             EventBinding self = (EventBinding)GetManagedObject(ob);
 
-            if (Runtime.PyCallable_Check(arg) < 1) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                                    "invalid event handler"
-                                    );
+            if (Runtime.PyCallable_Check(arg) < 1)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "invalid event handler"
+                    );
                 return IntPtr.Zero;
             }
 
-            if (!self.e.RemoveEventHandler(self.target, arg)) {
+            if (!self.e.RemoveEventHandler(self.target, arg))
+            {
                 return IntPtr.Zero;
             }
 
@@ -77,26 +75,31 @@ public static IntPtr nb_inplace_subtract(IntPtr ob, IntPtr arg) {
         // EventBinding  __hash__ implementation.
         //====================================================================
 
-        public static IntPtr tp_hash(IntPtr ob) {
+        public static IntPtr tp_hash(IntPtr ob)
+        {
             EventBinding self = (EventBinding)GetManagedObject(ob);
             long x = 0;
             long y = 0;
 
-            if (self.target != IntPtr.Zero) {
+            if (self.target != IntPtr.Zero)
+            {
                 x = Runtime.PyObject_Hash(self.target).ToInt64();
-                if (x == -1) {
+                if (x == -1)
+                {
                     return new IntPtr(-1);
                 }
             }
- 
+
             y = Runtime.PyObject_Hash(self.e.pyHandle).ToInt64();
-            if (y == -1) {
+            if (y == -1)
+            {
                 return new IntPtr(-1);
             }
 
             x ^= y;
 
-            if (x == -1) {
+            if (x == -1)
+            {
                 x = -1;
             }
 
@@ -108,7 +111,8 @@ public static IntPtr tp_hash(IntPtr ob) {
         // EventBinding __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             EventBinding self = (EventBinding)GetManagedObject(ob);
             string type = (self.target == IntPtr.Zero) ? "unbound" : "bound";
             string s = String.Format("<{0} event '{1}'>", type, self.e.name);
@@ -120,13 +124,11 @@ public static IntPtr tp_repr(IntPtr ob) {
         // EventBinding dealloc implementation.
         //====================================================================
 
-        public static new void tp_dealloc(IntPtr ob) {
+        public static new void tp_dealloc(IntPtr ob)
+        {
             EventBinding self = (EventBinding)GetManagedObject(ob);
             Runtime.Decref(self.target);
             ExtensionType.FinalizeObject(self);
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/eventobject.cs b/src/runtime/eventobject.cs
index 0e9122f49..618734bcb 100644
--- a/src/runtime/eventobject.cs
+++ b/src/runtime/eventobject.cs
@@ -1,30 +1,22 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements a Python descriptor type that provides access to CLR events.
     //========================================================================
 
-    internal class EventObject : ExtensionType {
-
+    internal class EventObject : ExtensionType
+    {
         internal string name;
         internal EventBinding unbound;
         internal EventInfo info;
         internal Hashtable reg;
 
-        public EventObject(EventInfo info) : base() {
+        public EventObject(EventInfo info) : base()
+        {
             this.name = info.Name;
             this.info = info;
         }
@@ -34,9 +26,11 @@ public EventObject(EventInfo info) : base() {
         // Register a new Python object event handler with the event.
         //====================================================================
 
-        internal bool AddEventHandler(IntPtr target, IntPtr handler) {
+        internal bool AddEventHandler(IntPtr target, IntPtr handler)
+        {
             Object obj = null;
-            if (target != IntPtr.Zero) {
+            if (target != IntPtr.Zero)
+            {
                 CLRObject co = (CLRObject)ManagedType.GetManagedObject(target);
                 obj = co.inst;
             }
@@ -50,21 +44,23 @@ internal bool AddEventHandler(IntPtr target, IntPtr handler) {
 
             // Now register the handler in a mapping from instance to pairs
             // of (handler hash, delegate) so we can lookup to remove later.
-            // All this is done lazily to avoid overhead until an event is 
+            // All this is done lazily to avoid overhead until an event is
             // actually subscribed to by a Python event handler.
 
-            if (reg == null) {
+            if (reg == null)
+            {
                 reg = new Hashtable();
             }
             object key = (obj != null) ? obj : this.info.ReflectedType;
             ArrayList list = reg[key] as ArrayList;
-            if (list == null) {
+            if (list == null)
+            {
                 list = new ArrayList();
                 reg[key] = list;
             }
             list.Add(new Handler(Runtime.PyObject_Hash(handler), d));
 
-            // Note that AddEventHandler helper only works for public events, 
+            // Note that AddEventHandler helper only works for public events,
             // so we have to get the underlying add method explicitly.
 
             object[] args = { d };
@@ -79,53 +75,61 @@ internal bool AddEventHandler(IntPtr target, IntPtr handler) {
         // Remove the given Python object event handler.
         //====================================================================
 
-        internal bool RemoveEventHandler(IntPtr target, IntPtr handler) {
+        internal bool RemoveEventHandler(IntPtr target, IntPtr handler)
+        {
             Object obj = null;
-            if (target != IntPtr.Zero) {
+            if (target != IntPtr.Zero)
+            {
                 CLRObject co = (CLRObject)ManagedType.GetManagedObject(target);
                 obj = co.inst;
             }
 
             IntPtr hash = Runtime.PyObject_Hash(handler);
-            if (Exceptions.ErrorOccurred() || (reg == null)) {
-                Exceptions.SetError(Exceptions.ValueError, 
-                                    "unknown event handler"
-                                    ); 
+            if (Exceptions.ErrorOccurred() || (reg == null))
+            {
+                Exceptions.SetError(Exceptions.ValueError,
+                    "unknown event handler"
+                    );
                 return false;
             }
 
             object key = (obj != null) ? obj : this.info.ReflectedType;
             ArrayList list = reg[key] as ArrayList;
 
-            if (list == null) {
-                Exceptions.SetError(Exceptions.ValueError, 
-                                    "unknown event handler"
-                                    ); 
+            if (list == null)
+            {
+                Exceptions.SetError(Exceptions.ValueError,
+                    "unknown event handler"
+                    );
                 return false;
             }
 
             object[] args = { null };
             MethodInfo mi = this.info.GetRemoveMethod(true);
 
-            for (int i = 0; i < list.Count; i++) {
+            for (int i = 0; i < list.Count; i++)
+            {
                 Handler item = (Handler)list[i];
-                if (item.hash != hash) {
+                if (item.hash != hash)
+                {
                     continue;
                 }
                 args[0] = item.del;
-                try {
+                try
+                {
                     mi.Invoke(obj, BindingFlags.Default, null, args, null);
                 }
-                catch {
+                catch
+                {
                     continue;
                 }
                 list.RemoveAt(i);
                 return true;
             }
 
-            Exceptions.SetError(Exceptions.ValueError, 
-                                "unknown event handler"
-                                ); 
+            Exceptions.SetError(Exceptions.ValueError,
+                "unknown event handler"
+                );
             return false;
         }
 
@@ -135,11 +139,13 @@ internal bool RemoveEventHandler(IntPtr target, IntPtr handler) {
         // a "bound" event that keeps a reference to the object instance.
         //====================================================================
 
-        public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
+        public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp)
+        {
             EventObject self = GetManagedObject(ds) as EventObject;
             EventBinding binding;
 
-            if (self == null) {
+            if (self == null)
+            {
                 return Exceptions.RaiseTypeError("invalid argument");
             }
 
@@ -147,8 +153,10 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
             // an instance) we return an 'unbound' EventBinding that will
             // be cached for future accesses through the type.
 
-            if (ob == IntPtr.Zero) {
-                if (self.unbound == null) {
+            if (ob == IntPtr.Zero)
+            {
+                if (self.unbound == null)
+                {
                     self.unbound = new EventBinding(self, IntPtr.Zero);
                 }
                 binding = self.unbound;
@@ -156,7 +164,8 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
                 return binding.pyHandle;
             }
 
-            if (Runtime.PyObject_IsInstance(ob, tp) < 1) {
+            if (Runtime.PyObject_IsInstance(ob, tp) < 1)
+            {
                 return Exceptions.RaiseTypeError("invalid argument");
             }
 
@@ -173,10 +182,12 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
         // SomeEvent on ob to the result of the '+=' operation.
         //====================================================================
 
-        public static new int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val) {
+        public static new int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val)
+        {
             EventBinding e = GetManagedObject(val) as EventBinding;
 
-            if (e != null) {
+            if (e != null)
+            {
                 return 0;
             }
 
@@ -190,7 +201,8 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
         // Descriptor __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             EventObject self = (EventObject)GetManagedObject(ob);
             string s = String.Format("<event '{0}'>", self.name);
             return Runtime.PyString_FromString(s);
@@ -201,30 +213,27 @@ public static IntPtr tp_repr(IntPtr ob) {
         // Descriptor dealloc implementation.
         //====================================================================
 
-        public static new void tp_dealloc(IntPtr ob) {
+        public static new void tp_dealloc(IntPtr ob)
+        {
             EventObject self = (EventObject)GetManagedObject(ob);
-            if (self.unbound != null) {
+            if (self.unbound != null)
+            {
                 Runtime.Decref(self.unbound.pyHandle);
             }
             ExtensionType.FinalizeObject(self);
         }
-
-
     }
 
 
-
-    internal class Handler {
-
+    internal class Handler
+    {
         public IntPtr hash;
         public Delegate del;
 
-        public Handler(IntPtr hash, Delegate d) {
+        public Handler(IntPtr hash, Delegate d)
+        {
             this.hash = hash;
             this.del = d;
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/exceptions.cs b/src/runtime/exceptions.cs
index fe6fdd3ff..92608ee84 100644
--- a/src/runtime/exceptions.cs
+++ b/src/runtime/exceptions.cs
@@ -1,44 +1,39 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Collections;
 using System.Runtime.InteropServices;
 
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Base class for Python types that reflect managed exceptions based on
     /// System.Exception
     /// </summary>
     /// <remarks>
     /// The Python wrapper for managed exceptions LIES about its inheritance
-    /// tree. Although the real System.Exception is a subclass of 
+    /// tree. Although the real System.Exception is a subclass of
     /// System.Object the Python type for System.Exception does NOT claim that
-    /// it subclasses System.Object. Instead TypeManager.CreateType() uses 
+    /// it subclasses System.Object. Instead TypeManager.CreateType() uses
     /// Python's exception.Exception class as base class for System.Exception.
     /// </remarks>
-    internal class ExceptionClassObject : ClassObject {
-
-        internal ExceptionClassObject(Type tp) : base(tp) {
+    internal class ExceptionClassObject : ClassObject
+    {
+        internal ExceptionClassObject(Type tp) : base(tp)
+        {
         }
 
 #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
-        internal static Exception ToException(IntPtr ob) {
+        internal static Exception ToException(IntPtr ob)
+        {
             CLRObject co = GetManagedObject(ob) as CLRObject;
-            if (co == null) {
+            if (co == null)
+            {
                 return null;
             }
             Exception e = co.inst as Exception;
-            if (e == null) {
+            if (e == null)
+            {
                 return null;
             }
             return e;
@@ -47,18 +42,22 @@ internal static Exception ToException(IntPtr ob) {
         //====================================================================
         // Exception __str__ implementation
         //====================================================================
-        
-        public new static IntPtr tp_str(IntPtr ob) {
+
+        public new static IntPtr tp_str(IntPtr ob)
+        {
             Exception e = ToException(ob);
-            if (e == null) {
+            if (e == null)
+            {
                 return Exceptions.RaiseTypeError("invalid object");
             }
 
             string message = String.Empty;
-            if (e.Message != String.Empty) {
+            if (e.Message != String.Empty)
+            {
                 message = e.Message;
             }
-            if ((e.StackTrace != null) && (e.StackTrace != String.Empty)) {
+            if ((e.StackTrace != null) && (e.StackTrace != String.Empty))
+            {
                 message = message + "\n" + e.StackTrace;
             }
             return Runtime.PyUnicode_FromString(message);
@@ -68,53 +67,65 @@ internal static Exception ToException(IntPtr ob) {
         // Exception __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             Exception e = ToException(ob);
-            if (e == null) {
+            if (e == null)
+            {
                 return Exceptions.RaiseTypeError("invalid object");
             }
             string name = e.GetType().Name;
             string message;
-            if (e.Message != String.Empty) {
+            if (e.Message != String.Empty)
+            {
                 message = String.Format("{0}('{1}',)", name, e.Message);
-            } else {
+            }
+            else
+            {
                 message = String.Format("{0}()", name);
             }
             return Runtime.PyUnicode_FromString(message);
         }
+
         //====================================================================
-        // Exceptions __getattribute__ implementation. 
+        // Exceptions __getattribute__ implementation.
         // handles Python's args and message attributes
         //====================================================================
 
         public static IntPtr tp_getattro(IntPtr ob, IntPtr key)
         {
-            if (!Runtime.PyString_Check(key)) {
+            if (!Runtime.PyString_Check(key))
+            {
                 Exceptions.SetError(Exceptions.TypeError, "string expected");
                 return IntPtr.Zero;
             }
 
             string name = Runtime.GetManagedString(key);
-            if (name == "args") {
+            if (name == "args")
+            {
                 Exception e = ToException(ob);
                 IntPtr args;
-                if (e.Message != String.Empty) {
+                if (e.Message != String.Empty)
+                {
                     args = Runtime.PyTuple_New(1);
                     IntPtr msg = Runtime.PyUnicode_FromString(e.Message);
                     Runtime.PyTuple_SetItem(args, 0, msg);
-                } else {
+                }
+                else
+                {
                     args = Runtime.PyTuple_New(0);
                 }
                 return args;
             }
 
-            if (name == "message") {
+            if (name == "message")
+            {
                 return ExceptionClassObject.tp_str(ob);
             }
 
             return Runtime.PyObject_GenericGetAttr(ob, key);
         }
-#endif      // (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
+#endif // (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     }
 
     /// <summary>
@@ -123,19 +134,21 @@ public static IntPtr tp_getattro(IntPtr ob, IntPtr key)
     /// <remarks>
     /// Readability of the Exceptions class improvements as we look toward version 2.7 ...
     /// </remarks>
-
-    public class Exceptions {
-
+    public class Exceptions
+    {
         internal static IntPtr warnings_module;
         internal static IntPtr exceptions_module;
 
-        private Exceptions() {}
+        private Exceptions()
+        {
+        }
 
         //===================================================================
         // Initialization performed on startup of the Python runtime.
         //===================================================================
 
-        internal static void Initialize() {
+        internal static void Initialize()
+        {
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
             exceptions_module = Runtime.PyImport_ImportModule("builtins");
 #else
@@ -145,19 +158,23 @@ internal static void Initialize() {
             warnings_module = Runtime.PyImport_ImportModule("warnings");
             Exceptions.ErrorCheck(warnings_module);
             Type type = typeof(Exceptions);
-            foreach (FieldInfo fi in type.GetFields(BindingFlags.Public | 
-                                                    BindingFlags.Static)) {
+            foreach (FieldInfo fi in type.GetFields(BindingFlags.Public |
+                                                    BindingFlags.Static))
+            {
                 IntPtr op = Runtime.PyObject_GetAttrString(exceptions_module, fi.Name);
-                if (op != IntPtr.Zero) {
+                if (op != IntPtr.Zero)
+                {
                     fi.SetValue(type, op);
                 }
-                else {
+                else
+                {
                     fi.SetValue(type, IntPtr.Zero);
                     DebugUtil.Print("Unknown exception: " + fi.Name);
                 }
             }
             Runtime.PyErr_Clear();
-            if (Runtime.wrap_exceptions) {
+            if (Runtime.wrap_exceptions)
+            {
                 SetupExceptionHack();
             }
         }
@@ -167,13 +184,17 @@ internal static void Initialize() {
         // Cleanup resources upon shutdown of the Python runtime.
         //===================================================================
 
-        internal static void Shutdown() {
-            if (0 != Runtime.Py_IsInitialized()) {
+        internal static void Shutdown()
+        {
+            if (0 != Runtime.Py_IsInitialized())
+            {
                 Type type = typeof(Exceptions);
                 foreach (FieldInfo fi in type.GetFields(BindingFlags.Public |
-                                                        BindingFlags.Static)) {
+                                                        BindingFlags.Static))
+                {
                     IntPtr op = (IntPtr)fi.GetValue(type);
-                    if (op != IntPtr.Zero) {
+                    if (op != IntPtr.Zero)
+                    {
                         Runtime.Decref(op);
                     }
                 }
@@ -187,8 +208,10 @@ internal static void Shutdown() {
         ///  Shortcut for (pointer == NULL) -> throw PythonException
         /// </summary>
         /// <param name="pointer">Pointer to a Python object</param>
-        internal unsafe static void ErrorCheck(IntPtr pointer) {
-            if (pointer == IntPtr.Zero) {
+        internal unsafe static void ErrorCheck(IntPtr pointer)
+        {
+            if (pointer == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -197,8 +220,10 @@ internal unsafe static void ErrorCheck(IntPtr pointer) {
         ///  Shortcut for (pointer == NULL or ErrorOccurred()) -> throw PythonException
         /// </summary>
         ///  Shortcut for (pointer == NULL) -> throw PythonException
-        internal unsafe static void ErrorOccurredCheck(IntPtr pointer) {
-            if ((pointer == IntPtr.Zero) || Exceptions.ErrorOccurred()) {
+        internal unsafe static void ErrorOccurredCheck(IntPtr pointer)
+        {
+            if ((pointer == IntPtr.Zero) || Exceptions.ErrorOccurred())
+            {
                 throw new PythonException();
             }
         }
@@ -214,6 +239,7 @@ internal unsafe static void ErrorOccurredCheck(IntPtr pointer) {
         /// Conditionally initialized variables!
         /// </remarks>
         static IntPtr ns_exc; // new-style class for System.Exception
+
         static IntPtr os_exc; // old-style class for System.Exception
         static Hashtable cache;
 
@@ -222,55 +248,56 @@ internal unsafe static void ErrorOccurredCheck(IntPtr pointer) {
         /// // XXX - hack to raise a compatible old-style exception ;(
         /// if (Runtime.wrap_exceptions) {
         ///     CallOneOfTheseMethods();
-        ///  
+        ///
         /// </remarks>
-        internal static void SetupExceptionHack() {
+        internal static void SetupExceptionHack()
+        {
             ns_exc = ClassManager.GetClass(typeof(Exception)).pyHandle;
             cache = new Hashtable();
 
-            string code = 
-            "import exceptions\n" +
-            "class Exception(exceptions.Exception):\n" +
-            "    _class = None\n" +
-            "    _inner = None\n" +
-            "    \n" +
-            "    #@property\n" +
-            "    def message(self):\n" +
-            "        return self.Message\n" +
-            "    message = property(message)\n" +
-            "    \n" +
-            "    def __init__(self, *args, **kw):\n" +
-            "        inst = self.__class__._class(*args, **kw)\n" +
-            "        self.__dict__['_inner'] = inst\n" +
-            "        exceptions.Exception.__init__(self, *args, **kw)\n" +
-            "\n" +
-            "    def __getattr__(self, name, _marker=[]):\n" +
-            "        inner = self.__dict__['_inner']\n" +
-            "        v = getattr(inner, name, _marker)\n" +
-            "        if v is not _marker:\n" +
-            "            return v\n" +
-            "        v = self.__dict__.get(name, _marker)\n" +
-            "        if v is not _marker:\n" +
-            "            return v\n" +
-            "        raise AttributeError(name)\n" +
-            "\n" +
-            "    def __setattr__(self, name, value):\n" +
-            "        inner = self.__dict__['_inner']\n" +
-            "        setattr(inner, name, value)\n" +
-            "\n" +
-            "    def __str__(self):\n" +
-            "        inner = self.__dict__.get('_inner')\n" +
-            "        msg = getattr(inner, 'Message', '')\n" +
-            "        st = getattr(inner, 'StackTrace', '')\n" +
-            "        st = st and '\\n' + st or ''\n" +
-            "        return msg + st\n" +
-            "    \n" + 
-            "    def __repr__(self):\n" +
-            "        inner = self.__dict__.get('_inner')\n" +
-            "        msg = getattr(inner, 'Message', '')\n" +
-            "        name = self.__class__.__name__\n" +
-            "        return '%s(\\'%s\\',)' % (name, msg) \n" +
-            "\n";
+            string code =
+                "import exceptions\n" +
+                "class Exception(exceptions.Exception):\n" +
+                "    _class = None\n" +
+                "    _inner = None\n" +
+                "    \n" +
+                "    #@property\n" +
+                "    def message(self):\n" +
+                "        return self.Message\n" +
+                "    message = property(message)\n" +
+                "    \n" +
+                "    def __init__(self, *args, **kw):\n" +
+                "        inst = self.__class__._class(*args, **kw)\n" +
+                "        self.__dict__['_inner'] = inst\n" +
+                "        exceptions.Exception.__init__(self, *args, **kw)\n" +
+                "\n" +
+                "    def __getattr__(self, name, _marker=[]):\n" +
+                "        inner = self.__dict__['_inner']\n" +
+                "        v = getattr(inner, name, _marker)\n" +
+                "        if v is not _marker:\n" +
+                "            return v\n" +
+                "        v = self.__dict__.get(name, _marker)\n" +
+                "        if v is not _marker:\n" +
+                "            return v\n" +
+                "        raise AttributeError(name)\n" +
+                "\n" +
+                "    def __setattr__(self, name, value):\n" +
+                "        inner = self.__dict__['_inner']\n" +
+                "        setattr(inner, name, value)\n" +
+                "\n" +
+                "    def __str__(self):\n" +
+                "        inner = self.__dict__.get('_inner')\n" +
+                "        msg = getattr(inner, 'Message', '')\n" +
+                "        st = getattr(inner, 'StackTrace', '')\n" +
+                "        st = st and '\\n' + st or ''\n" +
+                "        return msg + st\n" +
+                "    \n" +
+                "    def __repr__(self):\n" +
+                "        inner = self.__dict__.get('_inner')\n" +
+                "        msg = getattr(inner, 'Message', '')\n" +
+                "        name = self.__class__.__name__\n" +
+                "        return '%s(\\'%s\\',)' % (name, msg) \n" +
+                "\n";
 
             IntPtr dict = Runtime.PyDict_New();
 
@@ -295,13 +322,16 @@ internal static void SetupExceptionHack() {
         }
 
 
-        internal static IntPtr GenerateExceptionClass(IntPtr real) {
-            if (real == ns_exc) {
+        internal static IntPtr GenerateExceptionClass(IntPtr real)
+        {
+            if (real == ns_exc)
+            {
                 return os_exc;
             }
 
             IntPtr nbases = Runtime.PyObject_GetAttrString(real, "__bases__");
-            if (Runtime.PyTuple_Size(nbases) != 1) {
+            if (Runtime.PyTuple_Size(nbases) != 1)
+            {
                 throw new SystemException("Invalid __bases__");
             }
             IntPtr nsbase = Runtime.PyTuple_GetItem(nbases, 0);
@@ -327,13 +357,15 @@ internal static IntPtr GenerateExceptionClass(IntPtr real) {
             return subc;
         }
 
-        internal static IntPtr GetExceptionClassWrapper(IntPtr real) {
+        internal static IntPtr GetExceptionClassWrapper(IntPtr real)
+        {
             // Given the pointer to a new-style class representing a managed
             // exception, return an appropriate old-style class wrapper that
             // maintains all of the expectations and delegates to the wrapped
             // class.
             object ob = cache[real];
-            if (ob == null) {
+            if (ob == null)
+            {
                 IntPtr op = GenerateExceptionClass(real);
                 cache[real] = op;
                 return op;
@@ -341,12 +373,14 @@ internal static IntPtr GetExceptionClassWrapper(IntPtr real) {
             return (IntPtr)ob;
         }
 
-        internal static IntPtr GetExceptionInstanceWrapper(IntPtr real) {
-            // Given the pointer to a new-style class instance representing a 
-            // managed exception, return an appropriate old-style class 
+        internal static IntPtr GetExceptionInstanceWrapper(IntPtr real)
+        {
+            // Given the pointer to a new-style class instance representing a
+            // managed exception, return an appropriate old-style class
             // wrapper instance that delegates to the wrapped instance.
             IntPtr tp = Runtime.PyObject_TYPE(real);
-            if (Runtime.PyObject_TYPE(tp) == Runtime.PyInstanceType) {
+            if (Runtime.PyObject_TYPE(tp) == Runtime.PyInstanceType)
+            {
                 return real;
             }
             // Get / generate a class wrapper, instantiate it and set its
@@ -362,19 +396,22 @@ internal static IntPtr GetExceptionInstanceWrapper(IntPtr real) {
             return op;
         }
 
-        internal static IntPtr UnwrapExceptionClass(IntPtr op) {
+        internal static IntPtr UnwrapExceptionClass(IntPtr op)
+        {
             // In some cases its necessary to recognize an exception *class*,
             // and obtain the inner (wrapped) exception class. This method
             // returns the inner class if found, or a null pointer.
 
             IntPtr d = Runtime.PyObject_GetAttrString(op, "__dict__");
-            if (d == IntPtr.Zero) {
+            if (d == IntPtr.Zero)
+            {
                 Exceptions.Clear();
                 return IntPtr.Zero;
             }
             IntPtr c = Runtime.PyDict_GetItemString(d, "_class");
             Runtime.Decref(d);
-            if (c == IntPtr.Zero) {
+            if (c == IntPtr.Zero)
+            {
                 Exceptions.Clear();
             }
             return c;
@@ -389,8 +426,8 @@ internal static IntPtr UnwrapExceptionClass(IntPtr op) {
         /// instance. The properties of the PythonException may be used
         /// to access the exception type, value and traceback info.
         /// </remarks>
-
-        public static PythonException GetException() {
+        public static PythonException GetException()
+        {
             // TODO: implement this.
             return null;
         }
@@ -403,8 +440,8 @@ public static PythonException GetException() {
         /// Returns true if the current Python exception matches the given
         /// Python object. This is a wrapper for PyErr_ExceptionMatches.
         /// </remarks>
-
-        public static bool ExceptionMatches(IntPtr ob) {
+        public static bool ExceptionMatches(IntPtr ob)
+        {
             return Runtime.PyErr_ExceptionMatches(ob) != 0;
         }
 
@@ -416,8 +453,8 @@ public static bool ExceptionMatches(IntPtr ob) {
         /// Returns true if the given Python exception matches the given
         /// Python object. This is a wrapper for PyErr_GivenExceptionMatches.
         /// </remarks>
-
-        public static bool ExceptionMatches(IntPtr exc, IntPtr ob) {
+        public static bool ExceptionMatches(IntPtr exc, IntPtr ob)
+        {
             int i = Runtime.PyErr_GivenExceptionMatches(exc, ob);
             return (i != 0);
         }
@@ -430,8 +467,8 @@ public static bool ExceptionMatches(IntPtr exc, IntPtr ob) {
         /// Sets the current Python exception given a native string.
         /// This is a wrapper for the Python PyErr_SetString call.
         /// </remarks>
-
-        public static void SetError(IntPtr ob, string value) {
+        public static void SetError(IntPtr ob, string value)
+        {
             Runtime.PyErr_SetString(ob, value);
         }
 
@@ -443,8 +480,8 @@ public static void SetError(IntPtr ob, string value) {
         /// Sets the current Python exception given a Python object.
         /// This is a wrapper for the Python PyErr_SetObject call.
         /// </remarks>
-
-        public static void SetError(IntPtr ob, IntPtr value) {
+        public static void SetError(IntPtr ob, IntPtr value)
+        {
             Runtime.PyErr_SetObject(ob, value);
         }
 
@@ -457,16 +494,16 @@ public static void SetError(IntPtr ob, IntPtr value) {
         /// object. The CLR exception instance is wrapped as a Python
         /// object, allowing it to be handled naturally from Python.
         /// </remarks>
-
-        public static void SetError(Exception e) {
-
+        public static void SetError(Exception e)
+        {
             // Because delegates allow arbitrary nestings of Python calling
             // managed calling Python calling... etc. it is possible that we
             // might get a managed exception raised that is a wrapper for a
             // Python exception. In that case we'd rather have the real thing.
 
             PythonException pe = e as PythonException;
-            if (pe != null) {
+            if (pe != null)
+            {
                 Runtime.PyErr_SetObject(pe.PyType, pe.PyValue);
                 return;
             }
@@ -474,7 +511,8 @@ public static void SetError(Exception e) {
             IntPtr op = CLRObject.GetInstHandle(e);
 
             // XXX - hack to raise a compatible old-style exception ;(
-            if (Runtime.wrap_exceptions) {
+            if (Runtime.wrap_exceptions)
+            {
                 op = GetExceptionInstanceWrapper(op);
             }
             IntPtr etype = Runtime.PyObject_GetAttrString(op, "__class__");
@@ -491,8 +529,8 @@ public static void SetError(Exception e) {
         /// Returns true if an exception occurred in the Python runtime.
         /// This is a wrapper for the Python PyErr_Occurred call.
         /// </remarks>
-
-        public static bool ErrorOccurred() {
+        public static bool ErrorOccurred()
+        {
             return Runtime.PyErr_Occurred() != 0;
         }
 
@@ -503,8 +541,8 @@ public static bool ErrorOccurred() {
         /// <remarks>
         /// Clear any exception that has been set in the Python runtime.
         /// </remarks>
-
-        public static void Clear() {
+        public static void Clear()
+        {
             Runtime.PyErr_Clear();
         }
 
@@ -518,8 +556,9 @@ public static void Clear() {
         public static void warn(string message, IntPtr exception, int stacklevel)
         {
             if ((exception == IntPtr.Zero) ||
-                (Runtime.PyObject_IsSubclass(exception, Exceptions.Warning) != 1)) {
-                    Exceptions.RaiseTypeError("Invalid exception");
+                (Runtime.PyObject_IsSubclass(exception, Exceptions.Warning) != 1))
+            {
+                Exceptions.RaiseTypeError("Invalid exception");
             }
 
             Runtime.Incref(warnings_module);
@@ -562,7 +601,8 @@ public static void deprecation(string message)
         // Internal helper methods for common error handling scenarios.
         //====================================================================
 
-        internal static IntPtr RaiseTypeError(string message) {
+        internal static IntPtr RaiseTypeError(string message)
+        {
             Exceptions.SetError(Exceptions.TypeError, message);
             return IntPtr.Zero;
         }
@@ -585,7 +625,7 @@ puplic static variables on the Exceptions class filled in from
 #endif
         public static IntPtr ArithmeticError;
         public static IntPtr LookupError;
-        
+
         public static IntPtr AssertionError;
         public static IntPtr AttributeError;
         public static IntPtr EOFError;
@@ -643,6 +683,4 @@ puplic static variables on the Exceptions class filled in from
         //PyAPI_DATA(PyObject *) PyExc_BytesWarning;
 #endif
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/extensiontype.cs b/src/runtime/extensiontype.cs
index 75ac67e59..cd9db2338 100644
--- a/src/runtime/extensiontype.cs
+++ b/src/runtime/extensiontype.cs
@@ -1,32 +1,22 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Base class for extensions whose instances *share* a single Python
-    /// type object, such as the types that represent CLR methods, fields, 
+    /// type object, such as the types that represent CLR methods, fields,
     /// etc. Instances implemented by this class do not support subtyping.
     /// </summary>
-
-    internal abstract class ExtensionType : ManagedType {
-
-        public ExtensionType() : base() {
-
+    internal abstract class ExtensionType : ManagedType
+    {
+        public ExtensionType() : base()
+        {
             // Create a new PyObject whose type is a generated type that is
             // implemented by the particuar concrete ExtensionType subclass.
-            // The Python instance object is related to an instance of a 
+            // The Python instance object is related to an instance of a
             // particular concrete subclass with a hidden CLR gchandle.
 
             IntPtr tp = TypeManager.GetTypeHandle(this.GetType());
@@ -59,7 +49,8 @@ public ExtensionType() : base() {
         // Common finalization code to support custom tp_deallocs.
         //====================================================================
 
-        public static void FinalizeObject(ManagedType self) {
+        public static void FinalizeObject(ManagedType self)
+        {
             Runtime.PyObject_GC_Del(self.pyHandle);
             Runtime.Decref(self.tpHandle);
             self.gcHandle.Free();
@@ -70,9 +61,11 @@ public static void FinalizeObject(ManagedType self) {
         // Type __setattr__ implementation.
         //====================================================================
 
-        public static int tp_setattro(IntPtr ob, IntPtr key, IntPtr val) {
+        public static int tp_setattro(IntPtr ob, IntPtr key, IntPtr val)
+        {
             string message = "type does not support setting attributes";
-            if (val == IntPtr.Zero) {
+            if (val == IntPtr.Zero)
+            {
                 message = "readonly attribute";
             }
             Exceptions.SetError(Exceptions.TypeError, message);
@@ -85,7 +78,8 @@ public static int tp_setattro(IntPtr ob, IntPtr key, IntPtr val) {
         // being silently replaced in a type __dict__ by default __setattr__.
         //====================================================================
 
-        public static int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val) {
+        public static int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val)
+        {
             string message = "attribute is read-only";
             Exceptions.SetError(Exceptions.AttributeError, message);
             return -1;
@@ -96,17 +90,20 @@ public static int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val) {
         // Required Python GC support.
         //====================================================================
 
-        public static int tp_traverse(IntPtr ob, IntPtr func, IntPtr args) {
+        public static int tp_traverse(IntPtr ob, IntPtr func, IntPtr args)
+        {
             return 0;
         }
 
 
-        public static int tp_clear(IntPtr ob) {
+        public static int tp_clear(IntPtr ob)
+        {
             return 0;
         }
 
 
-        public static int tp_is_gc(IntPtr type) {
+        public static int tp_is_gc(IntPtr type)
+        {
             return 1;
         }
 
@@ -115,15 +112,12 @@ public static int tp_is_gc(IntPtr type) {
         // Default dealloc implementation.
         //====================================================================
 
-        public static void tp_dealloc(IntPtr ob) {
-            // Clean up a Python instance of this extension type. This 
+        public static void tp_dealloc(IntPtr ob)
+        {
+            // Clean up a Python instance of this extension type. This
             // frees the allocated Python object and decrefs the type.
             ManagedType self = GetManagedObject(ob);
             FinalizeObject(self);
         }
-
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/fieldobject.cs b/src/runtime/fieldobject.cs
index ee9d3392a..d9740d9b1 100644
--- a/src/runtime/fieldobject.cs
+++ b/src/runtime/fieldobject.cs
@@ -1,71 +1,71 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements a Python descriptor type that provides access to CLR fields.
     //========================================================================
 
-    internal class FieldObject : ExtensionType {
-
+    internal class FieldObject : ExtensionType
+    {
         FieldInfo info;
 
-        public FieldObject(FieldInfo info) : base() {
+        public FieldObject(FieldInfo info) : base()
+        {
             this.info = info;
         }
 
         //====================================================================
-        // Descriptor __get__ implementation. This method returns the 
+        // Descriptor __get__ implementation. This method returns the
         // value of the field on the given object. The returned value
         // is converted to an appropriately typed Python object.
         //====================================================================
 
-        public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
+        public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp)
+        {
             FieldObject self = (FieldObject)GetManagedObject(ds);
             Object result;
 
-            if (self == null) {
+            if (self == null)
+            {
                 return IntPtr.Zero;
             }
 
             FieldInfo info = self.info;
 
-            if ((ob == IntPtr.Zero) || (ob == Runtime.PyNone)) {
-                if (!info.IsStatic) {
-                    Exceptions.SetError(Exceptions.TypeError, 
-                               "instance attribute must be accessed " + 
-                               "through a class instance"
-                               );
+            if ((ob == IntPtr.Zero) || (ob == Runtime.PyNone))
+            {
+                if (!info.IsStatic)
+                {
+                    Exceptions.SetError(Exceptions.TypeError,
+                        "instance attribute must be accessed " +
+                        "through a class instance"
+                        );
                     return IntPtr.Zero;
                 }
-                try {
+                try
+                {
                     result = info.GetValue(null);
                     return Converter.ToPython(result, info.FieldType);
                 }
-                catch(Exception e) {
+                catch (Exception e)
+                {
                     Exceptions.SetError(Exceptions.TypeError, e.Message);
                     return IntPtr.Zero;
                 }
             }
 
-            try {
+            try
+            {
                 CLRObject co = (CLRObject)GetManagedObject(ob);
                 result = info.GetValue(co.inst);
                 return Converter.ToPython(result, info.FieldType);
             }
-            catch(Exception e) {
+            catch (Exception e)
+            {
                 Exceptions.SetError(Exceptions.TypeError, e.Message);
                 return IntPtr.Zero;
             }
@@ -77,58 +77,69 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
         // convertible to the type of the field.
         //====================================================================
 
-        public static new int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val) {
+        public static new int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val)
+        {
             FieldObject self = (FieldObject)GetManagedObject(ds);
             Object newval;
 
-            if (self == null) {
+            if (self == null)
+            {
                 return -1;
             }
 
-            if (val == IntPtr.Zero) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                                    "cannot delete field"
-                                    );
+            if (val == IntPtr.Zero)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "cannot delete field"
+                    );
                 return -1;
             }
 
             FieldInfo info = self.info;
 
-            if (info.IsLiteral || info.IsInitOnly) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                                    "field is read-only"
-                                    );
+            if (info.IsLiteral || info.IsInitOnly)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "field is read-only"
+                    );
                 return -1;
             }
 
             bool is_static = info.IsStatic;
 
-            if ((ob == IntPtr.Zero) || (ob == Runtime.PyNone)) {
-                if (!is_static) {
-                    Exceptions.SetError(Exceptions.TypeError, 
-                               "instance attribute must be set " + 
-                               "through a class instance"
-                               );
+            if ((ob == IntPtr.Zero) || (ob == Runtime.PyNone))
+            {
+                if (!is_static)
+                {
+                    Exceptions.SetError(Exceptions.TypeError,
+                        "instance attribute must be set " +
+                        "through a class instance"
+                        );
                     return -1;
                 }
             }
 
-            if (!Converter.ToManaged(val, info.FieldType, out newval, 
-                                      true)) {
+            if (!Converter.ToManaged(val, info.FieldType, out newval,
+                true))
+            {
                 return -1;
             }
 
-            try {
-                if (!is_static) {
+            try
+            {
+                if (!is_static)
+                {
                     CLRObject co = (CLRObject)GetManagedObject(ob);
                     info.SetValue(co.inst, newval);
                 }
-                else {
+                else
+                {
                     info.SetValue(null, newval);
                 }
                 return 0;
             }
-            catch(Exception e) {
+            catch (Exception e)
+            {
                 Exceptions.SetError(Exceptions.TypeError, e.Message);
                 return -1;
             }
@@ -138,13 +149,11 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
         // Descriptor __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             FieldObject self = (FieldObject)GetManagedObject(ob);
             string s = String.Format("<field '{0}'>", self.info.Name);
             return Runtime.PyString_FromStringAndSize(s, s.Length);
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/generictype.cs b/src/runtime/generictype.cs
index e1ebc055c..d5caec38e 100644
--- a/src/runtime/generictype.cs
+++ b/src/runtime/generictype.cs
@@ -1,36 +1,29 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Implements reflected generic types. Note that the Python behavior
     /// is the same for both generic type definitions and constructed open
     /// generic types. Both are essentially factories for creating closed
     /// types based on the required generic type parameters.
     /// </summary>
-
-    internal class GenericType : ClassBase {
-
-        internal GenericType(Type tp) : base(tp) {}
+    internal class GenericType : ClassBase
+    {
+        internal GenericType(Type tp) : base(tp)
+        {
+        }
 
         //====================================================================
         // Implements __new__ for reflected generic types.
         //====================================================================
 
-        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
-            Exceptions.SetError(Exceptions.TypeError, 
-                               "cannot instantiate an open generic type"
-                               );
+        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw)
+        {
+            Exceptions.SetError(Exceptions.TypeError,
+                "cannot instantiate an open generic type"
+                );
             return IntPtr.Zero;
         }
 
@@ -39,11 +32,11 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
         // Implements __call__ for reflected generic types.
         //====================================================================
 
-        public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw) {
-            Exceptions.SetError(Exceptions.TypeError, 
-                                "object is not callable");
+        public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw)
+        {
+            Exceptions.SetError(Exceptions.TypeError,
+                "object is not callable");
             return IntPtr.Zero;
         }
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/genericutil.cs b/src/runtime/genericutil.cs
index bb570e9ab..18d59602a 100644
--- a/src/runtime/genericutil.cs
+++ b/src/runtime/genericutil.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 using System.Collections.Generic;
@@ -14,21 +5,23 @@
 using System.Reflection;
 using System.Security;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
-    /// This class is responsible for efficiently maintaining the bits 
+    /// This class is responsible for efficiently maintaining the bits
     /// of information we need to support aliases with 'nice names'.
     /// </summary>
-
-    internal class GenericUtil {
-
+    internal class GenericUtil
+    {
         static Dictionary<string, Dictionary<string, List<string>>> mapping;
 
-        private GenericUtil() {}
+        private GenericUtil()
+        {
+        }
 
-        static GenericUtil() {
-            mapping = new 
+        static GenericUtil()
+        {
+            mapping = new
                 Dictionary<string, Dictionary<string, List<string>>>();
         }
 
@@ -36,24 +29,28 @@ static GenericUtil() {
         // Register a generic type that appears in a given namespace.
         //====================================================================
 
-        internal static void Register(Type t) {
+        internal static void Register(Type t)
+        {
             if (null == t.Namespace || null == t.Name)
                 return;
 
             Dictionary<string, List<string>> nsmap = null;
             mapping.TryGetValue(t.Namespace, out nsmap);
-            if (nsmap == null) {
+            if (nsmap == null)
+            {
                 nsmap = new Dictionary<string, List<string>>();
                 mapping[t.Namespace] = nsmap;
             }
             string basename = t.Name;
             int tick = basename.IndexOf("`");
-            if (tick > -1) {
+            if (tick > -1)
+            {
                 basename = basename.Substring(0, tick);
             }
             List<string> gnames = null;
             nsmap.TryGetValue(basename, out gnames);
-            if (gnames == null) {
+            if (gnames == null)
+            {
                 gnames = new List<string>();
                 nsmap[basename] = gnames;
             }
@@ -64,14 +61,17 @@ internal static void Register(Type t) {
         // xxx
         //====================================================================
 
-        public static List<string> GetGenericBaseNames(string ns) {
+        public static List<string> GetGenericBaseNames(string ns)
+        {
             Dictionary<string, List<string>> nsmap = null;
             mapping.TryGetValue(ns, out nsmap);
-            if (nsmap == null) {
+            if (nsmap == null)
+            {
                 return null;
             }
             List<string> names = new List<string>();
-            foreach (string key in nsmap.Keys) {
+            foreach (string key in nsmap.Keys)
+            {
                 names.Add(key);
             }
             return names;
@@ -81,49 +81,55 @@ public static List<string> GetGenericBaseNames(string ns) {
         // xxx
         //====================================================================
 
-        public static Type GenericForType(Type t, int paramCount)
-        {
-            return GenericByName(t.Namespace, t.Name, paramCount);
+        public static Type GenericForType(Type t, int paramCount)
+        {
+            return GenericByName(t.Namespace, t.Name, paramCount);
         }
 
-        public static Type GenericByName(string ns, string name, int paramCount)
-        {
-            foreach (Type t in GenericsByName(ns, name))
-            {
-                if (t.GetGenericArguments().Length == paramCount)
-                    return t;
-            }
-            return null;
+        public static Type GenericByName(string ns, string name, int paramCount)
+        {
+            foreach (Type t in GenericsByName(ns, name))
+            {
+                if (t.GetGenericArguments().Length == paramCount)
+                    return t;
+            }
+            return null;
         }
 
-        public static List<Type> GenericsForType(Type t)
-        {
-            return GenericsByName(t.Namespace, t.Name);
+        public static List<Type> GenericsForType(Type t)
+        {
+            return GenericsByName(t.Namespace, t.Name);
         }
 
-        public static List<Type> GenericsByName(string ns, string basename) {
+        public static List<Type> GenericsByName(string ns, string basename)
+        {
             Dictionary<string, List<string>> nsmap = null;
             mapping.TryGetValue(ns, out nsmap);
-            if (nsmap == null) {
+            if (nsmap == null)
+            {
                 return null;
             }
 
             int tick = basename.IndexOf("`");
-            if (tick > -1) {
+            if (tick > -1)
+            {
                 basename = basename.Substring(0, tick);
             }
 
             List<string> names = null;
             nsmap.TryGetValue(basename, out names);
-            if (names == null) {
+            if (names == null)
+            {
                 return null;
             }
 
             List<Type> result = new List<Type>();
-            foreach (string name in names) {
+            foreach (string name in names)
+            {
                 string qname = ns + "." + name;
                 Type o = AssemblyManager.LookupType(qname);
-                if (o != null) {
+                if (o != null)
+                {
                     result.Add(o);
                 }
             }
@@ -135,26 +141,25 @@ public static List<Type> GenericsByName(string ns, string basename) {
         // xxx
         //====================================================================
 
-        public static string GenericNameForBaseName(string ns, string name) {
+        public static string GenericNameForBaseName(string ns, string name)
+        {
             Dictionary<string, List<string>> nsmap = null;
             mapping.TryGetValue(ns, out nsmap);
-            if (nsmap == null) {
+            if (nsmap == null)
+            {
                 return null;
             }
             List<string> gnames = null;
             nsmap.TryGetValue(name, out gnames);
-            if (gnames == null) {
+            if (gnames == null)
+            {
                 return null;
             }
-            if (gnames.Count > 0) {
+            if (gnames.Count > 0)
+            {
                 return gnames[0];
             }
             return null;
         }
-
-
     }
-
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/importhook.cs b/src/runtime/importhook.cs
index d8e62025a..d1d27be8c 100644
--- a/src/runtime/importhook.cs
+++ b/src/runtime/importhook.cs
@@ -1,24 +1,15 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements the "import hook" used to integrate Python with the CLR.
     //========================================================================
 
-    internal class ImportHook {
-
+    internal class ImportHook
+    {
         static IntPtr py_import;
         static CLRModule root;
         static MethodWrapper hook;
@@ -32,9 +23,10 @@ internal class ImportHook {
         // Initialization performed on startup of the Python runtime.
         //===================================================================
 
-        internal static void Initialize() {
+        internal static void Initialize()
+        {
             // Initialize the Python <--> CLR module hook. We replace the
-            // built-in Python __import__ with our own. This isn't ideal, 
+            // built-in Python __import__ with our own. This isn't ideal,
             // but it provides the most "Pythonic" way of dealing with CLR
             // modules (Python doesn't provide a way to emulate packages).
             IntPtr dict = Runtime.PyImport_GetModuleDict();
@@ -52,7 +44,7 @@ internal static void Initialize() {
             root = new CLRModule();
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
-            // create a python module with the same methods as the clr module-like object
+    // create a python module with the same methods as the clr module-like object
             module_def = ModuleDefOffset.AllocModuleDef("clr");
             py_clr_module = Runtime.PyModule_Create2(module_def, 3);
 
@@ -69,7 +61,6 @@ internal static void Initialize() {
             Runtime.PyDict_SetItemString(dict, "CLR", root.pyHandle);
             Runtime.PyDict_SetItemString(dict, "clr", root.pyHandle);
 #endif
-
         }
 
 
@@ -77,7 +68,8 @@ internal static void Initialize() {
         // Cleanup resources upon shutdown of the Python runtime.
         //===================================================================
 
-        internal static void Shutdown() {
+        internal static void Shutdown()
+        {
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
             if (0 != Runtime.Py_IsInitialized()) {
                 Runtime.Decref(py_clr_module);
@@ -85,12 +77,14 @@ internal static void Shutdown() {
             }
             ModuleDefOffset.FreeModuleDef(module_def);
 #else
-            if (0 != Runtime.Py_IsInitialized()) {
+            if (0 != Runtime.Py_IsInitialized())
+            {
                 Runtime.Decref(root.pyHandle);
                 Runtime.Decref(root.pyHandle);
             }
 #endif
-            if (0 != Runtime.Py_IsInitialized()) {
+            if (0 != Runtime.Py_IsInitialized())
+            {
                 Runtime.Decref(py_import);
             }
         }
@@ -98,10 +92,11 @@ internal static void Shutdown() {
         //===================================================================
         // Return the clr python module (new reference)
         //===================================================================
-        public static IntPtr GetCLRModule(IntPtr? fromList=null) {
+        public static IntPtr GetCLRModule(IntPtr? fromList = null)
+        {
             root.InitializePreload();
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
-            // update the module dictionary with the contents of the root dictionary
+    // update the module dictionary with the contents of the root dictionary
             root.LoadNames();
             IntPtr py_mod_dict = Runtime.PyModule_GetDict(py_clr_module);
             IntPtr clr_dict = Runtime._PyObject_GetDictPtr(root.pyHandle); // PyObject**
@@ -151,23 +146,25 @@ public static IntPtr GetCLRModule(IntPtr? fromList=null) {
         // The actual import hook that ties Python to the managed world.
         //===================================================================
 
-        public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
-
+        public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw)
+        {
             // Replacement for the builtin __import__. The original import
-            // hook is saved as this.py_import. This version handles CLR 
+            // hook is saved as this.py_import. This version handles CLR
             // import and defers to the normal builtin for everything else.
 
             int num_args = Runtime.PyTuple_Size(args);
-            if (num_args < 1) {
+            if (num_args < 1)
+            {
                 return Exceptions.RaiseTypeError(
-                       "__import__() takes at least 1 argument (0 given)"
-                       );
+                    "__import__() takes at least 1 argument (0 given)"
+                    );
             }
 
             // borrowed reference
             IntPtr py_mod_name = Runtime.PyTuple_GetItem(args, 0);
             if ((py_mod_name == IntPtr.Zero) ||
-               (!Runtime.IsStringType(py_mod_name))) {
+                (!Runtime.IsStringType(py_mod_name)))
+            {
                 return Exceptions.RaiseTypeError("string expected");
             }
 
@@ -176,10 +173,12 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
 
             IntPtr fromList = IntPtr.Zero;
             bool fromlist = false;
-            if (num_args >= 4) {
+            if (num_args >= 4)
+            {
                 fromList = Runtime.PyTuple_GetItem(args, 3);
-                if ((fromList != IntPtr.Zero) && 
-                    (Runtime.PyObject_IsTrue(fromList) == 1)) {
+                if ((fromList != IntPtr.Zero) &&
+                    (Runtime.PyObject_IsTrue(fromList) == 1))
+                {
                     fromlist = true;
                 }
             }
@@ -188,23 +187,29 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
             // Check these BEFORE the built-in import runs; may as well
             // do the Incref()ed return here, since we've already found
             // the module.
-            if (mod_name == "clr") {
+            if (mod_name == "clr")
+            {
                 IntPtr clr_module = GetCLRModule(fromList);
-                if (clr_module != IntPtr.Zero) {
+                if (clr_module != IntPtr.Zero)
+                {
                     IntPtr sys_modules = Runtime.PyImport_GetModuleDict();
-                    if (sys_modules != IntPtr.Zero) {
+                    if (sys_modules != IntPtr.Zero)
+                    {
                         Runtime.PyDict_SetItemString(sys_modules, "clr", clr_module);
                     }
                 }
                 return clr_module;
             }
-            if (mod_name == "CLR") {
+            if (mod_name == "CLR")
+            {
                 Exceptions.deprecation("The CLR module is deprecated. " +
-                    "Please use 'clr'.");
+                                       "Please use 'clr'.");
                 IntPtr clr_module = GetCLRModule(fromList);
-                if (clr_module != IntPtr.Zero) {
+                if (clr_module != IntPtr.Zero)
+                {
                     IntPtr sys_modules = Runtime.PyImport_GetModuleDict();
-                    if (sys_modules != IntPtr.Zero) {
+                    if (sys_modules != IntPtr.Zero)
+                    {
                         Runtime.PyDict_SetItemString(sys_modules, "clr", clr_module);
                     }
                 }
@@ -212,28 +217,32 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
             }
             string realname = mod_name;
             string clr_prefix = null;
-            if (mod_name.StartsWith("CLR.")) {
-                clr_prefix = "CLR.";  // prepend when adding the module to sys.modules
+            if (mod_name.StartsWith("CLR."))
+            {
+                clr_prefix = "CLR."; // prepend when adding the module to sys.modules
                 realname = mod_name.Substring(4);
-                string msg = String.Format("Importing from the CLR.* namespace "+
-                    "is deprecated. Please import '{0}' directly.", realname);
+                string msg = String.Format("Importing from the CLR.* namespace " +
+                                           "is deprecated. Please import '{0}' directly.", realname);
                 Exceptions.deprecation(msg);
             }
-            else {
+            else
+            {
                 // 2010-08-15: Always seemed smart to let python try first...
                 // This shaves off a few tenths of a second on test_module.py
-                // and works around a quirk where 'sys' is found by the 
+                // and works around a quirk where 'sys' is found by the
                 // LoadImplicit() deprecation logic.
                 // Turns out that the AssemblyManager.ResolveHandler() checks to see if any
                 // Assembly's FullName.ToLower().StartsWith(name.ToLower()), which makes very
                 // little sense to me.
                 IntPtr res = Runtime.PyObject_Call(py_import, args, kw);
-                if (res != IntPtr.Zero) {
+                if (res != IntPtr.Zero)
+                {
                     // There was no error.
                     return res;
                 }
                 // There was an error
-                if (!Exceptions.ExceptionMatches(Exceptions.ImportError)) {
+                if (!Exceptions.ExceptionMatches(Exceptions.ImportError))
+                {
                     // and it was NOT an ImportError; bail out here.
                     return IntPtr.Zero;
                 }
@@ -246,15 +255,16 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
             // Now we need to decide if the name refers to a CLR module,
             // and may have to do an implicit load (for b/w compatibility)
             // using the AssemblyManager. The assembly manager tries
-            // really hard not to use Python objects or APIs, because 
+            // really hard not to use Python objects or APIs, because
             // parts of it can run recursively and on strange threads.
-            // 
-            // It does need an opportunity from time to time to check to 
+            //
+            // It does need an opportunity from time to time to check to
             // see if sys.path has changed, in a context that is safe. Here
             // we know we have the GIL, so we'll let it update if needed.
 
             AssemblyManager.UpdatePath();
-            if (!AssemblyManager.IsValidNamespace(realname)) {
+            if (!AssemblyManager.IsValidNamespace(realname))
+            {
                 if (!AssemblyManager.LoadImplicit(realname))
                 {
                     // May be called when a module being imported imports a module.
@@ -268,12 +278,15 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
             IntPtr modules = Runtime.PyImport_GetModuleDict();
             IntPtr module = Runtime.PyDict_GetItem(modules, py_mod_name);
 
-            if (module != IntPtr.Zero) {
-                if (fromlist) {
+            if (module != IntPtr.Zero)
+            {
+                if (fromlist)
+                {
                     Runtime.Incref(module);
                     return module;
                 }
-                if (clr_prefix != null) {
+                if (clr_prefix != null)
+                {
                     return GetCLRModule(fromList);
                 }
                 module = Runtime.PyDict_GetItemString(modules, names[0]);
@@ -284,7 +297,7 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
 
             // Traverse the qualified module name to get the named module
             // and place references in sys.modules as we go. Note that if
-            // we are running in interactive mode we pre-load the names in 
+            // we are running in interactive mode we pre-load the names in
             // each module, which is often useful for introspection. If we
             // are not interactive, we stick to just-in-time creation of
             // objects at lookup time, which is much more efficient.
@@ -296,40 +309,47 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
             ModuleObject tail = root;
             root.InitializePreload();
 
-            for (int i = 0; i < names.Length; i++) {
+            for (int i = 0; i < names.Length; i++)
+            {
                 string name = names[i];
                 ManagedType mt = tail.GetAttribute(name, true);
-                if (!(mt is ModuleObject)) {
+                if (!(mt is ModuleObject))
+                {
                     string error = String.Format("No module named {0}", name);
-                    Exceptions.SetError(Exceptions.ImportError, error); 
+                    Exceptions.SetError(Exceptions.ImportError, error);
                     return IntPtr.Zero;
                 }
-                if (head == null) {
+                if (head == null)
+                {
                     head = (ModuleObject)mt;
                 }
-                tail = (ModuleObject) mt;
-                if (CLRModule.preload) {
+                tail = (ModuleObject)mt;
+                if (CLRModule.preload)
+                {
                     tail.LoadNames();
                 }
 
                 // Add the module to sys.modules
                 Runtime.PyDict_SetItemString(modules,
-                                             tail.moduleName,
-                                             tail.pyHandle);
+                    tail.moduleName,
+                    tail.pyHandle);
 
                 // If imported from CLR add CLR.<modulename> to sys.modules as well
-                if (clr_prefix != null) {
+                if (clr_prefix != null)
+                {
                     Runtime.PyDict_SetItemString(modules,
-                                                 clr_prefix + tail.moduleName,
-                                                 tail.pyHandle);
+                        clr_prefix + tail.moduleName,
+                        tail.pyHandle);
                 }
             }
 
             ModuleObject mod = fromlist ? tail : head;
 
-            if (fromlist && Runtime.PySequence_Size(fromList) == 1) {
+            if (fromlist && Runtime.PySequence_Size(fromList) == 1)
+            {
                 IntPtr fp = Runtime.PySequence_GetItem(fromList, 0);
-                if ((!CLRModule.preload) && Runtime.GetManagedString(fp) == "*") {
+                if ((!CLRModule.preload) && Runtime.GetManagedString(fp) == "*")
+                {
                     mod.LoadNames();
                 }
                 Runtime.Decref(fp);
@@ -338,8 +358,5 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) {
             Runtime.Incref(mod.pyHandle);
             return mod.pyHandle;
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/indexer.cs b/src/runtime/indexer.cs
index 0781a3a0a..86e290d5b 100644
--- a/src/runtime/indexer.cs
+++ b/src/runtime/indexer.cs
@@ -1,71 +1,67 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 using System.Security.Permissions;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Bundles the information required to support an indexer property.
     //========================================================================
 
-    internal class Indexer {
-
+    internal class Indexer
+    {
         public MethodBinder GetterBinder;
         public MethodBinder SetterBinder;
 
-        public Indexer() {
+        public Indexer()
+        {
             GetterBinder = new MethodBinder();
             SetterBinder = new MethodBinder();
         }
 
 
-        public bool CanGet {
-            get { 
-                return GetterBinder.Count > 0; 
-            }
+        public bool CanGet
+        {
+            get { return GetterBinder.Count > 0; }
         }
 
-        public bool CanSet {
-            get { 
-                return SetterBinder.Count > 0; 
-            }
+        public bool CanSet
+        {
+            get { return SetterBinder.Count > 0; }
         }
 
 
-        public void AddProperty(PropertyInfo pi) {
+        public void AddProperty(PropertyInfo pi)
+        {
             MethodInfo getter = pi.GetGetMethod(true);
             MethodInfo setter = pi.GetSetMethod(true);
-            if (getter != null) {
+            if (getter != null)
+            {
                 GetterBinder.AddMethod(getter);
             }
-            if (setter != null) {
+            if (setter != null)
+            {
                 SetterBinder.AddMethod(setter);
             }
         }
 
-        internal IntPtr GetItem(IntPtr inst, IntPtr args) {
+        internal IntPtr GetItem(IntPtr inst, IntPtr args)
+        {
             return GetterBinder.Invoke(inst, args, IntPtr.Zero);
         }
 
 
-        internal void SetItem(IntPtr inst, IntPtr args) {
+        internal void SetItem(IntPtr inst, IntPtr args)
+        {
             SetterBinder.Invoke(inst, args, IntPtr.Zero);
         }
 
-        internal bool NeedsDefaultArgs(IntPtr args){
+        internal bool NeedsDefaultArgs(IntPtr args)
+        {
             int pynargs = Runtime.PyTuple_Size(args);
             var methods = SetterBinder.GetMethods();
-            if(methods.Length == 0)
+            if (methods.Length == 0)
                 return false;
 
             MethodBase mi = methods[0];
@@ -75,7 +71,8 @@ internal bool NeedsDefaultArgs(IntPtr args){
             if (pynargs == clrnargs || pynargs > clrnargs)
                 return false;
 
-            for (int v = pynargs; v < clrnargs; v++){
+            for (int v = pynargs; v < clrnargs; v++)
+            {
                 if (pi[v].DefaultValue == DBNull.Value)
                     return false;
             }
@@ -83,36 +80,35 @@ internal bool NeedsDefaultArgs(IntPtr args){
         }
 
         /// <summary>
-        /// This will return default arguments a new instance of a tuple. The size 
-        ///  of the tuple will indicate the number of default arguments. 
+        /// This will return default arguments a new instance of a tuple. The size
+        ///  of the tuple will indicate the number of default arguments.
         /// </summary>
         /// <param name="args">This is pointing to the tuple args passed in</param>
         /// <returns>a new instance of the tuple containing the default args</returns>
-        internal IntPtr GetDefaultArgs(IntPtr args){
-
+        internal IntPtr GetDefaultArgs(IntPtr args)
+        {
             // if we don't need default args return empty tuple
-            if(!NeedsDefaultArgs(args))
+            if (!NeedsDefaultArgs(args))
                 return Runtime.PyTuple_New(0);
             int pynargs = Runtime.PyTuple_Size(args);
-           
+
             // Get the default arg tuple
             var methods = SetterBinder.GetMethods();
             MethodBase mi = methods[0];
             ParameterInfo[] pi = mi.GetParameters();
             int clrnargs = pi.Length - 1;
             IntPtr defaultArgs = Runtime.PyTuple_New(clrnargs - pynargs);
-            for (int i = 0; i < (clrnargs - pynargs); i++) {
+            for (int i = 0; i < (clrnargs - pynargs); i++)
+            {
                 if (pi[i + pynargs].DefaultValue == DBNull.Value)
                     continue;
-                else{
+                else
+                {
                     IntPtr arg = Converter.ToPython(pi[i + pynargs].DefaultValue, pi[i + pynargs].ParameterType);
                     Runtime.PyTuple_SetItem(defaultArgs, i, arg);
                 }
             }
             return defaultArgs;
         }
-
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/interfaceobject.cs b/src/runtime/interfaceobject.cs
index 7c2aead1f..f550a95a8 100644
--- a/src/runtime/interfaceobject.cs
+++ b/src/runtime/interfaceobject.cs
@@ -1,40 +1,33 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Provides the implementation for reflected interface types. Managed
     /// interfaces are represented in Python by actual Python type objects.
     /// Each of those type objects is associated with an instance of this
     /// class, which provides the implementation for the Python type.
     /// </summary>
-
-    internal class InterfaceObject : ClassBase {
-
+    internal class InterfaceObject : ClassBase
+    {
         internal ConstructorInfo ctor;
 
-        internal InterfaceObject(Type tp) : base(tp) {
-            CoClassAttribute coclass = (CoClassAttribute) 
-              Attribute.GetCustomAttribute(tp, cc_attr);
-            if (coclass != null) {
+        internal InterfaceObject(Type tp) : base(tp)
+        {
+            CoClassAttribute coclass = (CoClassAttribute)
+                Attribute.GetCustomAttribute(tp, cc_attr);
+            if (coclass != null)
+            {
                 ctor = coclass.CoClass.GetConstructor(Type.EmptyTypes);
             }
         }
 
         static Type cc_attr;
 
-        static InterfaceObject() {
+        static InterfaceObject()
+        {
             cc_attr = typeof(CoClassAttribute);
         }
 
@@ -42,17 +35,20 @@ static InterfaceObject() {
         // Implements __new__ for reflected interface types.
         //====================================================================
 
-        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
+        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw)
+        {
             InterfaceObject self = (InterfaceObject)GetManagedObject(tp);
             int nargs = Runtime.PyTuple_Size(args);
             Type type = self.type;
             Object obj;
 
-            if (nargs == 1) {
+            if (nargs == 1)
+            {
                 IntPtr inst = Runtime.PyTuple_GetItem(args, 0);
                 CLRObject co = GetManagedObject(inst) as CLRObject;
 
-                if ((co == null) || (!type.IsInstanceOfType(co.inst))) {
+                if ((co == null) || (!type.IsInstanceOfType(co.inst)))
+                {
                     string msg = "object does not implement " + type.Name;
                     Exceptions.SetError(Exceptions.TypeError, msg);
                     return IntPtr.Zero;
@@ -61,29 +57,28 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
                 obj = co.inst;
             }
 
-            else if ((nargs == 0) && (self.ctor != null)) {
+            else if ((nargs == 0) && (self.ctor != null))
+            {
                 obj = self.ctor.Invoke(null);
 
-                if (obj == null || !type.IsInstanceOfType(obj)) {
+                if (obj == null || !type.IsInstanceOfType(obj))
+                {
                     Exceptions.SetError(Exceptions.TypeError,
-                               "CoClass default constructor failed" 
-                               );
+                        "CoClass default constructor failed"
+                        );
                     return IntPtr.Zero;
                 }
             }
 
-            else {
+            else
+            {
                 Exceptions.SetError(Exceptions.TypeError,
-                                    "interface takes exactly one argument"
-                                    );
+                    "interface takes exactly one argument"
+                    );
                 return IntPtr.Zero;
             }
 
             return CLRObject.GetInstHandle(obj, self.pyHandle);
         }
-
-
-    }        
-
-
-}
+    }
+}
\ No newline at end of file
diff --git a/src/runtime/interfaces.cs b/src/runtime/interfaces.cs
index 484a9ad5d..28f343529 100644
--- a/src/runtime/interfaces.cs
+++ b/src/runtime/interfaces.cs
@@ -1,40 +1,32 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// xxx
     /// </summary>
-
-    internal interface IReflectedType {
+    internal interface IReflectedType
+    {
         string PythonTypeName();
         Type GetReflectedType();
     }
 
-    internal interface IReflectedClass : IReflectedType {
+    internal interface IReflectedClass : IReflectedType
+    {
         bool IsException();
     }
 
-    internal interface IReflectedInterface : IReflectedType {
-
+    internal interface IReflectedInterface : IReflectedType
+    {
     }
 
-    internal interface IReflectedArray : IReflectedType {
+    internal interface IReflectedArray : IReflectedType
+    {
     }
 
-    internal interface IReflectedGenericClass : IReflectedClass {
+    internal interface IReflectedGenericClass : IReflectedClass
+    {
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/interop.cs b/src/runtime/interop.cs
index a1c541de4..f5fbe74b4 100644
--- a/src/runtime/interop.cs
+++ b/src/runtime/interop.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Collections.Specialized;
@@ -14,8 +5,8 @@
 using System.Reflection;
 using System.Text;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //=======================================================================
     // This file defines objects to support binary interop with the Python
     // runtime. Generally, the definitions here need to be kept up to date
@@ -24,61 +15,80 @@ namespace Python.Runtime {
 
     [Serializable()]
     [AttributeUsage(AttributeTargets.All)]
-    public class DocStringAttribute : Attribute {
-        public DocStringAttribute(string docStr) {
-			DocString = docStr;
-		}
-		public string DocString {
-			get { return docStr; }
-			set { docStr = value; }
-		}
-		private string docStr;
+    public class DocStringAttribute : Attribute
+    {
+        public DocStringAttribute(string docStr)
+        {
+            DocString = docStr;
+        }
+
+        public string DocString
+        {
+            get { return docStr; }
+            set { docStr = value; }
+        }
+
+        private string docStr;
     }
-	
+
     [Serializable()]
     [AttributeUsage(AttributeTargets.Method | AttributeTargets.Delegate)]
-    internal class PythonMethodAttribute : Attribute {
-        public PythonMethodAttribute() {}
+    internal class PythonMethodAttribute : Attribute
+    {
+        public PythonMethodAttribute()
+        {
+        }
     }
 
     [Serializable()]
     [AttributeUsage(AttributeTargets.Method | AttributeTargets.Delegate)]
-    internal class ModuleFunctionAttribute : Attribute {
-        public ModuleFunctionAttribute() {}
+    internal class ModuleFunctionAttribute : Attribute
+    {
+        public ModuleFunctionAttribute()
+        {
+        }
     }
 
     [Serializable()]
     [AttributeUsage(AttributeTargets.Method | AttributeTargets.Delegate)]
-    internal class ForbidPythonThreadsAttribute : Attribute {
-        public ForbidPythonThreadsAttribute() { }
+    internal class ForbidPythonThreadsAttribute : Attribute
+    {
+        public ForbidPythonThreadsAttribute()
+        {
+        }
     }
 
 
     [Serializable()]
     [AttributeUsage(AttributeTargets.Property)]
-    internal class ModulePropertyAttribute : Attribute {
-        public ModulePropertyAttribute() {}
+    internal class ModulePropertyAttribute : Attribute
+    {
+        public ModulePropertyAttribute()
+        {
+        }
     }
 
 
-    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
-    internal class ObjectOffset {
-
-        static ObjectOffset() {
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+    internal class ObjectOffset
+    {
+        static ObjectOffset()
+        {
             int size = IntPtr.Size;
-            int n = 0; // Py_TRACE_REFS add two pointers to PyObject_HEAD 
+            int n = 0; // Py_TRACE_REFS add two pointers to PyObject_HEAD
 #if (Py_DEBUG)
             _ob_next = 0;
             _ob_prev = 1 * size;
             n = 2;
-#endif 
-            ob_refcnt = (n+0) * size;
-            ob_type = (n+1) * size;
-            ob_dict = (n+2) * size;
-            ob_data = (n+3) * size;
+#endif
+            ob_refcnt = (n + 0)*size;
+            ob_type = (n + 1)*size;
+            ob_dict = (n + 2)*size;
+            ob_data = (n + 3)*size;
         }
 
-        public static int magic(IntPtr ob) {
+        public static int magic(IntPtr ob)
+        {
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
             if ((Runtime.PyObject_TypeCheck(ob, Exceptions.BaseException) ||
                 (Runtime.PyType_Check(ob) && Runtime.PyType_IsSubtype(ob, Exceptions.BaseException))))
@@ -101,7 +111,8 @@ public static int DictOffset(IntPtr ob)
             return ob_dict;
         }
 
-        public static int Size(IntPtr ob) {
+        public static int Size(IntPtr ob)
+        {
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
             if ((Runtime.PyObject_TypeCheck(ob, Exceptions.BaseException) ||
                 (Runtime.PyType_Check(ob) && Runtime.PyType_IsSubtype(ob, Exceptions.BaseException))))
@@ -112,7 +123,7 @@ public static int Size(IntPtr ob) {
 #if (Py_DEBUG)
             return 6 * IntPtr.Size;
 #else
-            return 4 * IntPtr.Size;
+            return 4*IntPtr.Size;
 #endif
         }
 
@@ -249,7 +260,7 @@ public static void FreeModuleDef(IntPtr ptr) {
         // } PyModuleDef
 
         public static int name = 0;
-    }
+    }
 #endif // PYTHON3
 
     /// <summary>
@@ -258,7 +269,8 @@ public static void FreeModuleDef(IntPtr ptr) {
     /// Note that the two values reserved for stackless have been put
     /// to good use as PythonNet specific flags (Managed and Subclass)
     /// </summary>
-    internal class TypeFlags {
+    internal class TypeFlags
+    {
 #if (PYTHON23 || PYTHON24 || PYTHON25 || PYTHON26 || PYTHON27)
         // these flags were removed in Python 3
         public static int HaveGetCharBuffer = (1 << 0);
@@ -305,18 +317,18 @@ internal class TypeFlags {
 // Default flags for Python 2
 #if (PYTHON23 || PYTHON24 || PYTHON25 || PYTHON26 || PYTHON27)
         public static int Default = (
-                             HaveGetCharBuffer |
-                             HaveSequenceIn |
-                             HaveInPlaceOps |
-                             HaveRichCompare |
-                             HaveWeakRefs |
-                             HaveIter |
-                             HaveClass |
-                             HaveStacklessExtension |
-    #if (PYTHON25 || PYTHON26 || PYTHON27)
-                             HaveIndex | 
-    #endif
-                             0);
+            HaveGetCharBuffer |
+            HaveSequenceIn |
+            HaveInPlaceOps |
+            HaveRichCompare |
+            HaveWeakRefs |
+            HaveIter |
+            HaveClass |
+            HaveStacklessExtension |
+#if (PYTHON25 || PYTHON26 || PYTHON27)
+                HaveIndex |
+#endif
+                0);
 #endif
 
 // Default flags for Python 3
@@ -325,29 +337,29 @@ internal class TypeFlags {
                             HaveStacklessExtension |
                             HaveVersionTag);
 #endif
-
     }
 
 
     // This class defines the function prototypes (delegates) used for low
-    // level integration with the CPython runtime. It also provides name 
-    // based lookup of the correct prototype for a particular Python type 
+    // level integration with the CPython runtime. It also provides name
+    // based lookup of the correct prototype for a particular Python type
     // slot and utilities for generating method thunks for managed methods.
 
-    internal class Interop {
-
+    internal class Interop
+    {
         static ArrayList keepAlive;
         static Hashtable pmap;
 
-        static Interop() {
-
+        static Interop()
+        {
             // Here we build a mapping of PyTypeObject slot names to the
             // appropriate prototype (delegate) type to use for the slot.
 
             Type[] items = typeof(Interop).GetNestedTypes();
             Hashtable p = new Hashtable();
 
-            for (int i = 0; i < items.Length; i++) {
+            for (int i = 0; i < items.Length; i++)
+            {
                 Type item = items[i];
                 p[item.Name] = item;
             }
@@ -440,25 +452,28 @@ static Interop() {
             pmap["mp_length"] = p["InquiryFunc"];
             pmap["mp_subscript"] = p["BinaryFunc"];
             pmap["mp_ass_subscript"] = p["ObjObjArgFunc"];
-            
+
             pmap["bf_getreadbuffer"] = p["IntObjArgFunc"];
             pmap["bf_getwritebuffer"] = p["IntObjArgFunc"];
             pmap["bf_getsegcount"] = p["ObjObjFunc"];
             pmap["bf_getcharbuffer"] = p["IntObjArgFunc"];
         }
 
-        internal static Type GetPrototype(string name) {
+        internal static Type GetPrototype(string name)
+        {
             return pmap[name] as Type;
         }
 
-        internal static IntPtr GetThunk(MethodInfo method, string funcType = null) {
+        internal static IntPtr GetThunk(MethodInfo method, string funcType = null)
+        {
             Type dt;
-            if (funcType != null)
-                dt = typeof(Interop).GetNestedType(funcType) as Type;
-            else
-                dt = GetPrototype(method.Name);
+            if (funcType != null)
+                dt = typeof(Interop).GetNestedType(funcType) as Type;
+            else
+                dt = GetPrototype(method.Name);
 
-            if (dt != null) {
+            if (dt != null)
+            {
                 IntPtr tmp = Marshal.AllocHGlobal(IntPtr.Size);
                 Delegate d = Delegate.CreateDelegate(dt, method);
                 Thunk cb = new Thunk(d);
@@ -509,16 +524,17 @@ internal static IntPtr GetThunk(MethodInfo method, string funcType = null) {
 
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         public delegate IntPtr RichCmpFunc(IntPtr ob, IntPtr a, int b);
-
     }
 
 
-    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
-    internal struct Thunk {
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+    internal struct Thunk
+    {
         public Delegate fn;
 
-        public Thunk(Delegate d) {
+        public Thunk(Delegate d)
+        {
             fn = d;
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/interop26.cs b/src/runtime/interop26.cs
index 810e0e62f..a358b9ad6 100644
--- a/src/runtime/interop26.cs
+++ b/src/runtime/interop26.cs
@@ -1,14 +1,8 @@
-
 // Auto-generated by geninterop.py.
-// DOT NOT MODIFIY BY HAND.
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
+// DO NOT MODIFIY BY HAND.
+
+
+
 #if (PYTHON26)
 using System;
 using System.Collections;
@@ -150,4 +144,4 @@ public static int magic() {
         public static int members = 0;
     }
 }
-#endif
+#endif
\ No newline at end of file
diff --git a/src/runtime/interop27.cs b/src/runtime/interop27.cs
index de4511806..19006ab72 100644
--- a/src/runtime/interop27.cs
+++ b/src/runtime/interop27.cs
@@ -1,14 +1,6 @@
-
 // Auto-generated by geninterop.py.
-// DOT NOT MODIFIY BY HAND.
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
+// DO NOT MODIFIY BY HAND.
+
 #if (PYTHON27)
 using System;
 using System.Collections;
@@ -17,21 +9,24 @@
 using System.Reflection;
 using System.Text;
 
-namespace Python.Runtime {
-
-    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
-    internal class TypeOffset {
-
-        static TypeOffset() {
+namespace Python.Runtime
+{
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+    internal class TypeOffset
+    {
+        static TypeOffset()
+        {
             Type type = typeof(TypeOffset);
             FieldInfo[] fi = type.GetFields();
             int size = IntPtr.Size;
-            for (int i = 0; i < fi.Length; i++) {
-                fi[i].SetValue(null, i * size);
+            for (int i = 0; i < fi.Length; i++)
+            {
+                fi[i].SetValue(null, i*size);
             }
         }
 
-        public static int magic() {
+        public static int magic()
+        {
             return ob_size;
         }
 
@@ -150,4 +145,5 @@ public static int magic() {
         public static int members = 0;
     }
 }
-#endif
+
+#endif
\ No newline at end of file
diff --git a/src/runtime/interop32.cs b/src/runtime/interop32.cs
index 711ef6323..0c802c725 100644
--- a/src/runtime/interop32.cs
+++ b/src/runtime/interop32.cs
@@ -1,14 +1,8 @@
-
 // Auto-generated by geninterop.py.
-// DOT NOT MODIFIY BY HAND.
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
+// DO NOT MODIFIY BY HAND.
+
+
+
 #if (PYTHON32)
 using System;
 using System.Collections;
@@ -141,4 +135,4 @@ public static int magic() {
         public static int members = 0;
     }
 }
-#endif
+#endif
\ No newline at end of file
diff --git a/src/runtime/interop33.cs b/src/runtime/interop33.cs
index 47aaae96c..88e9022e4 100644
--- a/src/runtime/interop33.cs
+++ b/src/runtime/interop33.cs
@@ -1,14 +1,6 @@
 
 // Auto-generated by geninterop.py.
-// DOT NOT MODIFIY BY HAND.
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
+// DO NOT MODIFIY BY HAND.
 
 using System;
 using System.Collections;
diff --git a/src/runtime/interop34.cs b/src/runtime/interop34.cs
index 8b74930c7..8e3d90bff 100644
--- a/src/runtime/interop34.cs
+++ b/src/runtime/interop34.cs
@@ -1,14 +1,8 @@
-
 // Auto-generated by geninterop.py.
-// DOT NOT MODIFIY BY HAND.
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
+// DO NOT MODIFIY BY HAND.
+
+
+
 #if (PYTHON34)
 using System;
 using System.Collections;
@@ -144,4 +138,4 @@ public static int magic() {
         public static int members = 0;
     }
 }
-#endif
+#endif
\ No newline at end of file
diff --git a/src/runtime/interop35.cs b/src/runtime/interop35.cs
index e573b9225..a0f0f3153 100644
--- a/src/runtime/interop35.cs
+++ b/src/runtime/interop35.cs
@@ -1,14 +1,8 @@
-
 // Auto-generated by geninterop.py.
-// DOT NOT MODIFIY BY HAND.
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
+// DO NOT MODIFIY BY HAND.
+
+
+
 #if (PYTHON35)
 using System;
 using System.Collections;
@@ -149,4 +143,4 @@ public static int magic() {
         public static int members = 0;
     }
 }
-#endif
+#endif
\ No newline at end of file
diff --git a/src/runtime/iterator.cs b/src/runtime/iterator.cs
index 3d34760c3..8fc9b0312 100644
--- a/src/runtime/iterator.cs
+++ b/src/runtime/iterator.cs
@@ -1,28 +1,20 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
-    // Implements a generic Python iterator for IEnumerable objects and 
+    // Implements a generic Python iterator for IEnumerable objects and
     // managed array objects. This supports 'for i in object:' in Python.
     //========================================================================
 
-    internal class Iterator : ExtensionType {
-
+    internal class Iterator : ExtensionType
+    {
         IEnumerator iter;
 
-        public Iterator(IEnumerator e) : base() {
+        public Iterator(IEnumerator e) : base()
+        {
             this.iter = e;
         }
 
@@ -31,9 +23,11 @@ public Iterator(IEnumerator e) : base() {
         // Implements support for the Python iteration protocol.
         //====================================================================
 
-        public static IntPtr tp_iternext(IntPtr ob) {
+        public static IntPtr tp_iternext(IntPtr ob)
+        {
             Iterator self = GetManagedObject(ob) as Iterator;
-            if (!self.iter.MoveNext()) {
+            if (!self.iter.MoveNext())
+            {
                 Exceptions.SetError(Exceptions.StopIteration, Runtime.PyNone);
                 return IntPtr.Zero;
             }
@@ -41,12 +35,10 @@ public static IntPtr tp_iternext(IntPtr ob) {
             return Converter.ToPythonImplicit(item);
         }
 
-        public static IntPtr tp_iter(IntPtr ob) {
+        public static IntPtr tp_iter(IntPtr ob)
+        {
             Runtime.Incref(ob);
             return ob;
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/managedtype.cs b/src/runtime/managedtype.cs
index 78e29c2b6..83131281d 100644
--- a/src/runtime/managedtype.cs
+++ b/src/runtime/managedtype.cs
@@ -1,48 +1,43 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
-    // Common base class for all objects that are implemented in managed 
+    // Common base class for all objects that are implemented in managed
     // code. It defines the common fields that associate CLR and Python
     // objects and common utilities to convert between those identities.
     //========================================================================
 
-    internal abstract class ManagedType {
-
+    internal abstract class ManagedType
+    {
         internal GCHandle gcHandle; // Native handle
-        internal IntPtr pyHandle;   // PyObject *
-        internal IntPtr tpHandle;   // PyType *
+        internal IntPtr pyHandle; // PyObject *
+        internal IntPtr tpHandle; // PyType *
 
 
         //====================================================================
         // Given a Python object, return the associated managed object or null.
         //====================================================================
 
-        internal static ManagedType GetManagedObject(IntPtr ob) {
-            if (ob != IntPtr.Zero) {
+        internal static ManagedType GetManagedObject(IntPtr ob)
+        {
+            if (ob != IntPtr.Zero)
+            {
                 IntPtr tp = Runtime.PyObject_TYPE(ob);
-                if (tp == Runtime.PyTypeType || tp == Runtime.PyCLRMetaType) {
+                if (tp == Runtime.PyTypeType || tp == Runtime.PyCLRMetaType)
+                {
                     tp = ob;
                 }
-                
+
                 int flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
-                if ((flags & TypeFlags.Managed) != 0) {
-                    IntPtr op = (tp == ob) ?
-                        Marshal.ReadIntPtr(tp, TypeOffset.magic()) :
-                        Marshal.ReadIntPtr(ob, ObjectOffset.magic(ob));
+                if ((flags & TypeFlags.Managed) != 0)
+                {
+                    IntPtr op = (tp == ob)
+                        ? Marshal.ReadIntPtr(tp, TypeOffset.magic())
+                        : Marshal.ReadIntPtr(ob, ObjectOffset.magic(ob));
                     GCHandle gc = (GCHandle)op;
                     return (ManagedType)gc.Target;
                 }
@@ -50,9 +45,11 @@ internal static ManagedType GetManagedObject(IntPtr ob) {
                 // In certain situations, we need to recognize a wrapped
                 // exception class and be willing to unwrap the class :(
 
-                if (Runtime.wrap_exceptions) {
+                if (Runtime.wrap_exceptions)
+                {
                     IntPtr e = Exceptions.UnwrapExceptionClass(ob);
-                    if ((e != IntPtr.Zero) && (e != ob)) {
+                    if ((e != IntPtr.Zero) && (e != ob))
+                    {
                         ManagedType m = GetManagedObject(e);
                         Runtime.Decref(e);
                         return m;
@@ -63,35 +60,36 @@ internal static ManagedType GetManagedObject(IntPtr ob) {
         }
 
 
-        internal static ManagedType GetManagedObjectErr(IntPtr ob) {
+        internal static ManagedType GetManagedObjectErr(IntPtr ob)
+        {
             ManagedType result = GetManagedObject(ob);
-            if (result == null) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                           "invalid argument, expected CLR type"
-                           );
+            if (result == null)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "invalid argument, expected CLR type"
+                    );
             }
             return result;
         }
 
 
-        internal static bool IsManagedType(IntPtr ob) {
-            if (ob != IntPtr.Zero) {
+        internal static bool IsManagedType(IntPtr ob)
+        {
+            if (ob != IntPtr.Zero)
+            {
                 IntPtr tp = Runtime.PyObject_TYPE(ob);
-                if (tp == Runtime.PyTypeType || tp == Runtime.PyCLRMetaType) {
+                if (tp == Runtime.PyTypeType || tp == Runtime.PyCLRMetaType)
+                {
                     tp = ob;
                 }
-                
+
                 int flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
-                if ((flags & TypeFlags.Managed) != 0) {
+                if ((flags & TypeFlags.Managed) != 0)
+                {
                     return true;
                 }
             }
             return false;
         }
-
-
     }
-
-
-}
-
+}
\ No newline at end of file
diff --git a/src/runtime/metatype.cs b/src/runtime/metatype.cs
index 25456a50d..8b062ee59 100644
--- a/src/runtime/metatype.cs
+++ b/src/runtime/metatype.cs
@@ -1,27 +1,18 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // The managed metatype. This object implements the type of all reflected
     // types. It also provides support for single-inheritance from reflected
     // managed types.
     //========================================================================
-    
-    internal class MetaType : ManagedType {
 
+    internal class MetaType : ManagedType
+    {
         static IntPtr PyCLRMetaType;
 
 
@@ -29,20 +20,23 @@ internal class MetaType : ManagedType {
         // Metatype initialization. This bootstraps the CLR metatype to life.
         //====================================================================
 
-        public static IntPtr Initialize() {
+        public static IntPtr Initialize()
+        {
             PyCLRMetaType = TypeManager.CreateMetaType(typeof(MetaType));
             return PyCLRMetaType;
         }
 
 
         //====================================================================
-        // Metatype __new__ implementation. This is called to create a new 
-        // class / type when a reflected class is subclassed. 
+        // Metatype __new__ implementation. This is called to create a new
+        // class / type when a reflected class is subclassed.
         //====================================================================
 
-        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
+        public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw)
+        {
             int len = Runtime.PyTuple_Size(args);
-            if (len < 3) {
+            if (len < 3)
+            {
                 return Exceptions.RaiseTypeError("invalid argument list");
             }
 
@@ -55,17 +49,18 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
             // That type must itself have a managed implementation. We check
             // that by making sure its metatype is the CLR metatype.
 
-            if (Runtime.PyTuple_Size(bases) != 1) {
+            if (Runtime.PyTuple_Size(bases) != 1)
+            {
                 return Exceptions.RaiseTypeError(
-                       "cannot use multiple inheritance with managed classes"
-                       );
-
+                    "cannot use multiple inheritance with managed classes"
+                    );
             }
 
             IntPtr base_type = Runtime.PyTuple_GetItem(bases, 0);
             IntPtr mt = Runtime.PyObject_TYPE(base_type);
 
-            if (!((mt == PyCLRMetaType) || (mt == Runtime.PyTypeType))) {
+            if (!((mt == PyCLRMetaType) || (mt == Runtime.PyTypeType)))
+            {
                 return Exceptions.RaiseTypeError("invalid metatype");
             }
 
@@ -73,28 +68,33 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
             // disallowing subclassing of delegates, enums and array types.
 
             ClassBase cb = GetManagedObject(base_type) as ClassBase;
-            if (cb != null) {
-                if (! cb.CanSubclass() ) {
+            if (cb != null)
+            {
+                if (!cb.CanSubclass())
+                {
                     return Exceptions.RaiseTypeError(
-                      "delegates, enums and array types cannot be subclassed"
-                      );
+                        "delegates, enums and array types cannot be subclassed"
+                        );
                 }
             }
 
             IntPtr slots = Runtime.PyDict_GetItemString(dict, "__slots__");
-            if (slots != IntPtr.Zero) {
+            if (slots != IntPtr.Zero)
+            {
                 return Exceptions.RaiseTypeError(
-                "subclasses of managed classes do not support __slots__"
-                );
+                    "subclasses of managed classes do not support __slots__"
+                    );
             }
 
             // If __assembly__ or __namespace__ are in the class dictionary then create
             // a managed sub type.
             // This creates a new managed type that can be used from .net to call back
             // into python.
-            if (IntPtr.Zero != dict) {
+            if (IntPtr.Zero != dict)
+            {
                 Runtime.Incref(dict);
-                using (PyDict clsDict = new PyDict(dict)) {
+                using (PyDict clsDict = new PyDict(dict))
+                {
                     if (clsDict.HasKey("__assembly__") || clsDict.HasKey("__namespace__"))
                         return TypeManager.CreateSubType(name, base_type, dict);
                 }
@@ -102,9 +102,10 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
 
             // otherwise just create a basic type without reflecting back into the managed side.
             IntPtr func = Marshal.ReadIntPtr(Runtime.PyTypeType,
-                                             TypeOffset.tp_new);
+                TypeOffset.tp_new);
             IntPtr type = NativeCall.Call_3(func, tp, args, kw);
-            if (type == IntPtr.Zero) {
+            if (type == IntPtr.Zero)
+            {
                 return IntPtr.Zero;
             }
 
@@ -120,7 +121,7 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
 
             // Hmm - the standard subtype_traverse, clear look at ob_size to
             // do things, so to allow gc to work correctly we need to move
-            // our hidden handle out of ob_size. Then, in theory we can 
+            // our hidden handle out of ob_size. Then, in theory we can
             // comment this out and still not crash.
             TypeManager.CopySlot(base_type, type, TypeOffset.tp_traverse);
             TypeManager.CopySlot(base_type, type, TypeOffset.tp_clear);
@@ -134,13 +135,15 @@ public static IntPtr tp_new(IntPtr tp, IntPtr args, IntPtr kw) {
         }
 
 
-        public static IntPtr tp_alloc(IntPtr mt, int n) {
+        public static IntPtr tp_alloc(IntPtr mt, int n)
+        {
             IntPtr type = Runtime.PyType_GenericAlloc(mt, n);
             return type;
         }
 
 
-        public static void tp_free(IntPtr tp) {
+        public static void tp_free(IntPtr tp)
+        {
             Runtime.PyObject_GC_Del(tp);
         }
 
@@ -151,14 +154,17 @@ public static void tp_free(IntPtr tp) {
         // from PyType_Type won't call __init__ for metatypes it doesnt know.
         //====================================================================
 
-        public static IntPtr tp_call(IntPtr tp, IntPtr args, IntPtr kw) {
+        public static IntPtr tp_call(IntPtr tp, IntPtr args, IntPtr kw)
+        {
             IntPtr func = Marshal.ReadIntPtr(tp, TypeOffset.tp_new);
-            if (func == IntPtr.Zero) {
+            if (func == IntPtr.Zero)
+            {
                 return Exceptions.RaiseTypeError("invalid object");
             }
-            
+
             IntPtr obj = NativeCall.Call_3(func, tp, args, kw);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 return IntPtr.Zero;
             }
 
@@ -168,9 +174,11 @@ public static IntPtr tp_call(IntPtr tp, IntPtr args, IntPtr kw) {
             Runtime.Decref(py__init__);
             Runtime.PyErr_Clear();
 
-            if (init != IntPtr.Zero) {
+            if (init != IntPtr.Zero)
+            {
                 IntPtr bound = Runtime.GetBoundArgTuple(obj, args);
-                if (bound == IntPtr.Zero) {
+                if (bound == IntPtr.Zero)
+                {
                     Runtime.Decref(obj);
                     return IntPtr.Zero;
                 }
@@ -178,7 +186,8 @@ public static IntPtr tp_call(IntPtr tp, IntPtr args, IntPtr kw) {
                 IntPtr result = Runtime.PyObject_Call(init, bound, kw);
                 Runtime.Decref(bound);
 
-                if (result == IntPtr.Zero) {
+                if (result == IntPtr.Zero)
+                {
                     Runtime.Decref(obj);
                     return IntPtr.Zero;
                 }
@@ -194,25 +203,29 @@ public static IntPtr tp_call(IntPtr tp, IntPtr args, IntPtr kw) {
         // Type __setattr__ implementation for reflected types. Note that this
         // is slightly different than the standard setattr implementation for
         // the normal Python metatype (PyTypeType). We need to look first in
-        // the type object of a reflected type for a descriptor in order to 
+        // the type object of a reflected type for a descriptor in order to
         // support the right setattr behavior for static fields and properties.
         //====================================================================
 
-        public static int tp_setattro(IntPtr tp, IntPtr name, IntPtr value) {
+        public static int tp_setattro(IntPtr tp, IntPtr name, IntPtr value)
+        {
             IntPtr descr = Runtime._PyType_Lookup(tp, name);
 
-            if (descr != IntPtr.Zero) {
+            if (descr != IntPtr.Zero)
+            {
                 IntPtr dt = Runtime.PyObject_TYPE(descr);
                 IntPtr fp = Marshal.ReadIntPtr(dt, TypeOffset.tp_descr_set);
-                if (fp != IntPtr.Zero) {
+                if (fp != IntPtr.Zero)
+                {
                     return NativeCall.Impl.Int_Call_3(fp, descr, name, value);
                 }
                 Exceptions.SetError(Exceptions.AttributeError,
-                                    "attribute is read-only");
+                    "attribute is read-only");
                 return -1;
             }
-            
-            if (Runtime.PyObject_GenericSetAttr(tp, name, value) < 0) {
+
+            if (Runtime.PyObject_GenericSetAttr(tp, name, value) < 0)
+            {
                 return -1;
             }
 
@@ -224,12 +237,14 @@ public static int tp_setattro(IntPtr tp, IntPtr name, IntPtr value) {
         // here we just delegate to the generic type def implementation. Its
         // own mp_subscript
         //====================================================================
-        public static IntPtr mp_subscript(IntPtr tp, IntPtr idx) {
-             ClassBase cb = GetManagedObject(tp) as ClassBase;
-             if (cb != null) {
-                 return cb.type_subscript(idx);
-             }
-             return Exceptions.RaiseTypeError("unsubscriptable object");
+        public static IntPtr mp_subscript(IntPtr tp, IntPtr idx)
+        {
+            ClassBase cb = GetManagedObject(tp) as ClassBase;
+            if (cb != null)
+            {
+                return cb.type_subscript(idx);
+            }
+            return Exceptions.RaiseTypeError("unsubscriptable object");
         }
 
         //====================================================================
@@ -237,11 +252,13 @@ public static IntPtr mp_subscript(IntPtr tp, IntPtr idx) {
         // by this metatype is no longer referenced from the Python runtime.
         //====================================================================
 
-        public static void tp_dealloc(IntPtr tp) {
+        public static void tp_dealloc(IntPtr tp)
+        {
             // Fix this when we dont cheat on the handle for subclasses!
 
             int flags = (int)Marshal.ReadIntPtr(tp, TypeOffset.tp_flags);
-            if ((flags & TypeFlags.Subclass) == 0) {
+            if ((flags & TypeFlags.Subclass) == 0)
+            {
                 IntPtr gc = Marshal.ReadIntPtr(tp, TypeOffset.magic());
                 ((GCHandle)gc).Free();
             }
@@ -260,44 +277,44 @@ public static void tp_dealloc(IntPtr tp) {
             return;
         }
 
-        static IntPtr DoInstanceCheck(IntPtr tp, IntPtr args, bool checkType)
-        {
-            ClassBase cb = GetManagedObject(tp) as ClassBase;
-
-            if (cb == null)
-                return Runtime.PyFalse;
-
-            using (PyList argsObj = new PyList(args))
-            {
-                if (argsObj.Length() != 1)
-                    return Exceptions.RaiseTypeError("Invalid parameter count");
-
-                PyObject arg = argsObj[0];
-                PyObject otherType;
-                if (checkType)
-                    otherType = arg;
-                else
-                    otherType = arg.GetPythonType();
-
-                if (Runtime.PyObject_TYPE(otherType.Handle) != PyCLRMetaType)
-                    return Runtime.PyFalse;
-
-                ClassBase otherCb = GetManagedObject(otherType.Handle) as ClassBase;
-                if (otherCb == null)
-                    return Runtime.PyFalse;
-
-                return Converter.ToPython(cb.type.IsAssignableFrom(otherCb.type));
-            }
+        static IntPtr DoInstanceCheck(IntPtr tp, IntPtr args, bool checkType)
+        {
+            ClassBase cb = GetManagedObject(tp) as ClassBase;
+
+            if (cb == null)
+                return Runtime.PyFalse;
+
+            using (PyList argsObj = new PyList(args))
+            {
+                if (argsObj.Length() != 1)
+                    return Exceptions.RaiseTypeError("Invalid parameter count");
+
+                PyObject arg = argsObj[0];
+                PyObject otherType;
+                if (checkType)
+                    otherType = arg;
+                else
+                    otherType = arg.GetPythonType();
+
+                if (Runtime.PyObject_TYPE(otherType.Handle) != PyCLRMetaType)
+                    return Runtime.PyFalse;
+
+                ClassBase otherCb = GetManagedObject(otherType.Handle) as ClassBase;
+                if (otherCb == null)
+                    return Runtime.PyFalse;
+
+                return Converter.ToPython(cb.type.IsAssignableFrom(otherCb.type));
+            }
+        }
+
+        public static IntPtr __instancecheck__(IntPtr tp, IntPtr args)
+        {
+            return DoInstanceCheck(tp, args, false);
         }
 
-        public static IntPtr __instancecheck__(IntPtr tp, IntPtr args)
-        {
-            return DoInstanceCheck(tp, args, false);
-        }
-
         public static IntPtr __subclasscheck__(IntPtr tp, IntPtr args)
         {
             return DoInstanceCheck(tp, args, true);
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/methodbinder.cs b/src/runtime/methodbinder.cs
index 943f9da04..22aaf33e4 100644
--- a/src/runtime/methodbinder.cs
+++ b/src/runtime/methodbinder.cs
@@ -1,148 +1,156 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
-    // A MethodBinder encapsulates information about a (possibly overloaded) 
+    // A MethodBinder encapsulates information about a (possibly overloaded)
     // managed method, and is responsible for selecting the right method given
     // a set of Python arguments. This is also used as a base class for the
     // ConstructorBinder, a minor variation used to invoke constructors.
     //========================================================================
 
-    internal class MethodBinder {
-
+    internal class MethodBinder
+    {
         public ArrayList list;
         public MethodBase[] methods;
         public bool init = false;
         public bool allow_threads = true;
 
-        internal MethodBinder () {
+        internal MethodBinder()
+        {
             this.list = new ArrayList();
         }
-        
-        internal MethodBinder(MethodInfo mi) : base () {
+
+        internal MethodBinder(MethodInfo mi) : base()
+        {
             this.list = new ArrayList();
             this.list.Add(mi);
         }
 
-        public int Count {
+        public int Count
+        {
             get { return this.list.Count; }
         }
 
-        internal void AddMethod(MethodBase m) {
+        internal void AddMethod(MethodBase m)
+        {
             this.list.Add(m);
         }
 
         //====================================================================
-        // Given a sequence of MethodInfo and a sequence of types, return the 
+        // Given a sequence of MethodInfo and a sequence of types, return the
         // MethodInfo that matches the signature represented by those types.
         //====================================================================
 
-         internal static MethodInfo MatchSignature(MethodInfo[] mi, Type[] tp) {
-            if (tp == null) {
+        internal static MethodInfo MatchSignature(MethodInfo[] mi, Type[] tp)
+        {
+            if (tp == null)
+            {
                 return null;
             }
             int count = tp.Length;
-             for (int i = 0; i < mi.Length; i++) {
-                 ParameterInfo[] pi = mi[i].GetParameters();
-                 if (pi.Length != count) {
-                     continue;
-                 }
-                 for (int n = 0; n < pi.Length; n++) {
-                     if (tp[n]!= pi[n].ParameterType) {
-                         break;
-                     }
-                    if (n == (pi.Length - 1)) {
+            for (int i = 0; i < mi.Length; i++)
+            {
+                ParameterInfo[] pi = mi[i].GetParameters();
+                if (pi.Length != count)
+                {
+                    continue;
+                }
+                for (int n = 0; n < pi.Length; n++)
+                {
+                    if (tp[n] != pi[n].ParameterType)
+                    {
+                        break;
+                    }
+                    if (n == (pi.Length - 1))
+                    {
                         return mi[i];
                     }
-                 }
-             }
-             return null;
-         }
- 
+                }
+            }
+            return null;
+        }
+
         //====================================================================
-        // Given a sequence of MethodInfo and a sequence of type parameters, 
+        // Given a sequence of MethodInfo and a sequence of type parameters,
         // return the MethodInfo that represents the matching closed generic.
         //====================================================================
 
-         internal static MethodInfo MatchParameters(MethodInfo[] mi, Type[] tp) {
-            if (tp == null) {
+        internal static MethodInfo MatchParameters(MethodInfo[] mi, Type[] tp)
+        {
+            if (tp == null)
+            {
                 return null;
             }
             int count = tp.Length;
-             for (int i = 0; i < mi.Length; i++) {
-                if (!mi[i].IsGenericMethodDefinition) {
+            for (int i = 0; i < mi.Length; i++)
+            {
+                if (!mi[i].IsGenericMethodDefinition)
+                {
                     continue;
                 }
                 Type[] args = mi[i].GetGenericArguments();
-                if (args.Length != count) {
+                if (args.Length != count)
+                {
                     continue;
                 }
                 return mi[i].MakeGenericMethod(tp);
             }
             return null;
-         }
-
-
-         //====================================================================
-         // Given a sequence of MethodInfo and two sequences of type parameters, 
-         // return the MethodInfo that matches the signature and the closed generic.
-         //====================================================================
-
-         internal static MethodInfo MatchSignatureAndParameters(MethodInfo[] mi, Type[] genericTp, Type[] sigTp)
-         {
-             if ((genericTp == null) || (sigTp == null)) { 
-                 return null;
-             }
-             int genericCount = genericTp.Length;
-             int signatureCount = sigTp.Length;
-             for (int i = 0; i < mi.Length; i++)
-             {
-                 if (!mi[i].IsGenericMethodDefinition)
-                 {
-                     continue;
-                 }
-                 Type[] genericArgs = mi[i].GetGenericArguments();
-                 if (genericArgs.Length != genericCount)
-                 {
-                     continue;
-                 }
-                 ParameterInfo[] pi = mi[i].GetParameters();
-                 if (pi.Length != signatureCount)
-                 {
-                     continue;
-                 }
-                 for (int n = 0; n < pi.Length; n++)
-                 {
-                     if (sigTp[n] != pi[n].ParameterType)
-                     {
-                         break;
-                     }
-                     if (n == (pi.Length - 1))
-                     {
-                         MethodInfo match = mi[i];
-                         if (match.IsGenericMethodDefinition)
-                         {
-                             Type[] typeArgs = match.GetGenericArguments();
-                             return match.MakeGenericMethod(genericTp);
-                         }
-                         return match;
-                     }
-                 }
-             }
-             return null;
-         }
+        }
+
+
+        //====================================================================
+        // Given a sequence of MethodInfo and two sequences of type parameters,
+        // return the MethodInfo that matches the signature and the closed generic.
+        //====================================================================
+
+        internal static MethodInfo MatchSignatureAndParameters(MethodInfo[] mi, Type[] genericTp, Type[] sigTp)
+        {
+            if ((genericTp == null) || (sigTp == null))
+            {
+                return null;
+            }
+            int genericCount = genericTp.Length;
+            int signatureCount = sigTp.Length;
+            for (int i = 0; i < mi.Length; i++)
+            {
+                if (!mi[i].IsGenericMethodDefinition)
+                {
+                    continue;
+                }
+                Type[] genericArgs = mi[i].GetGenericArguments();
+                if (genericArgs.Length != genericCount)
+                {
+                    continue;
+                }
+                ParameterInfo[] pi = mi[i].GetParameters();
+                if (pi.Length != signatureCount)
+                {
+                    continue;
+                }
+                for (int n = 0; n < pi.Length; n++)
+                {
+                    if (sigTp[n] != pi[n].ParameterType)
+                    {
+                        break;
+                    }
+                    if (n == (pi.Length - 1))
+                    {
+                        MethodInfo match = mi[i];
+                        if (match.IsGenericMethodDefinition)
+                        {
+                            Type[] typeArgs = match.GetGenericArguments();
+                            return match.MakeGenericMethod(genericTp);
+                        }
+                        return match;
+                    }
+                }
+            }
+            return null;
+        }
 
 
         //====================================================================
@@ -151,8 +159,10 @@ internal static MethodInfo MatchSignatureAndParameters(MethodInfo[] mi, Type[] g
         // at all for methods that are never called).
         //====================================================================
 
-        internal MethodBase[] GetMethods() {
-            if (!init) {
+        internal MethodBase[] GetMethods()
+        {
+            if (!init)
+            {
                 // I'm sure this could be made more efficient.
                 list.Sort(new MethodSorter());
                 methods = (MethodBase[])list.ToArray(typeof(MethodBase));
@@ -166,13 +176,15 @@ internal MethodBase[] GetMethods() {
         // generally the same so we'll start w/this and tweak as necessary.
         //====================================================================
 
-        internal static int GetPrecedence(MethodBase mi) {
+        internal static int GetPrecedence(MethodBase mi)
+        {
             ParameterInfo[] pi = mi.GetParameters();
             int val = mi.IsStatic ? 3000 : 0;
             int num = pi.Length;
 
             val += (mi.IsGenericMethod ? 1 : 0);
-            for (int i = 0; i < num; i++) {
+            for (int i = 0; i < num; i++)
+            {
                 val += ArgPrecedence(pi[i].ParameterType);
             }
 
@@ -183,7 +195,8 @@ internal static int GetPrecedence(MethodBase mi) {
         // Return a precedence value for a particular Type object.
         //====================================================================
 
-        internal static int ArgPrecedence(Type t) {
+        internal static int ArgPrecedence(Type t)
+        {
             Type objectType = typeof(Object);
             if (t == objectType) return 3000;
 
@@ -203,7 +216,8 @@ internal static int ArgPrecedence(Type t) {
             if (tc == TypeCode.String) return 30;
             if (tc == TypeCode.Boolean) return 40;
 
-            if (t.IsArray) {
+            if (t.IsArray)
+            {
                 Type e = t.GetElementType();
                 if (e == objectType)
                     return 2500;
@@ -219,46 +233,58 @@ internal static int ArgPrecedence(Type t) {
         // instance, converted arguments and the correct method to call.
         //====================================================================
 
-        internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw) {
+        internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw)
+        {
             return this.Bind(inst, args, kw, null, null);
         }
 
         internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw,
-                              MethodBase info) {
+            MethodBase info)
+        {
             return this.Bind(inst, args, kw, info, null);
         }
 
         internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw,
-                              MethodBase info, MethodInfo[] methodinfo) {
+            MethodBase info, MethodInfo[] methodinfo)
+        {
             // loop to find match, return invoker w/ or /wo error
             MethodBase[] _methods = null;
             int pynargs = Runtime.PyTuple_Size(args);
             object arg;
             bool isGeneric = false;
             ArrayList defaultArgList = null;
-             if (info != null) {
+            if (info != null)
+            {
                 _methods = (MethodBase[])Array.CreateInstance(
-                                                typeof(MethodBase), 1
-                                                );
-                 _methods.SetValue(info, 0);
-             }
-            else {
+                    typeof(MethodBase), 1
+                    );
+                _methods.SetValue(info, 0);
+            }
+            else
+            {
                 _methods = GetMethods();
             }
             Type clrtype;
-            for (int i = 0; i < _methods.Length; i++) {
+            for (int i = 0; i < _methods.Length; i++)
+            {
                 MethodBase mi = _methods[i];
 
-                if (mi.IsGenericMethod) { isGeneric = true; }
+                if (mi.IsGenericMethod)
+                {
+                    isGeneric = true;
+                }
                 ParameterInfo[] pi = mi.GetParameters();
                 int clrnargs = pi.Length;
                 bool match = false;
                 int arrayStart = -1;
                 int outs = 0;
 
-                if (pynargs == clrnargs) { 
+                if (pynargs == clrnargs)
+                {
                     match = true;
-                } else if(pynargs < clrnargs){
+                }
+                else if (pynargs < clrnargs)
+                {
                     match = true;
                     defaultArgList = new ArrayList();
                     for (int v = pynargs; v < clrnargs; v++)
@@ -266,27 +292,34 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw,
                         if (pi[v].DefaultValue == DBNull.Value)
                             match = false;
                         else
-                            defaultArgList.Add((object)pi[v].DefaultValue);    
+                            defaultArgList.Add((object)pi[v].DefaultValue);
                     }
-                } else if ((pynargs > clrnargs) && (clrnargs > 0) &&
-                           Attribute.IsDefined(pi[clrnargs-1], typeof(ParamArrayAttribute))) {
+                }
+                else if ((pynargs > clrnargs) && (clrnargs > 0) &&
+                         Attribute.IsDefined(pi[clrnargs - 1], typeof(ParamArrayAttribute)))
+                {
                     // This is a spam(params object[] egg) style method
                     match = true;
                     arrayStart = clrnargs - 1;
                 }
 
-                if (match) {
+                if (match)
+                {
                     Object[] margs = new Object[clrnargs];
 
-                    for (int n = 0; n < clrnargs; n++) {
+                    for (int n = 0; n < clrnargs; n++)
+                    {
                         IntPtr op;
-                        if (n < pynargs) {
-                            if (arrayStart == n) {
+                        if (n < pynargs)
+                        {
+                            if (arrayStart == n)
+                            {
                                 // map remaining Python arguments to a tuple since
                                 // the managed function accepts it - hopefully :]
                                 op = Runtime.PyTuple_GetSlice(args, arrayStart, pynargs);
                             }
-                            else {
+                            else
+                            {
                                 op = Runtime.PyTuple_GetItem(args, n);
                             }
 
@@ -295,56 +328,68 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw,
                             // is necessary
                             clrtype = null;
                             IntPtr pyoptype;
-                            if (_methods.Length > 1) {
+                            if (_methods.Length > 1)
+                            {
                                 pyoptype = IntPtr.Zero;
                                 pyoptype = Runtime.PyObject_Type(op);
                                 Exceptions.Clear();
-                                if (pyoptype != IntPtr.Zero) {
+                                if (pyoptype != IntPtr.Zero)
+                                {
                                     clrtype = Converter.GetTypeByAlias(pyoptype);
                                 }
                                 Runtime.Decref(pyoptype);
                             }
 
 
-                            if (clrtype != null) {
+                            if (clrtype != null)
+                            {
                                 bool typematch = false;
-                                if (pi[n].ParameterType != clrtype) {
+                                if (pi[n].ParameterType != clrtype)
+                                {
                                     IntPtr pytype = Converter.GetPythonTypeByAlias(pi[n].ParameterType);
                                     pyoptype = Runtime.PyObject_Type(op);
                                     Exceptions.Clear();
-                                    if (pyoptype != IntPtr.Zero) {
-                                        if (pytype != pyoptype) {
+                                    if (pyoptype != IntPtr.Zero)
+                                    {
+                                        if (pytype != pyoptype)
+                                        {
                                             typematch = false;
                                         }
-                                        else {
+                                        else
+                                        {
                                             typematch = true;
                                             clrtype = pi[n].ParameterType;
                                         }
                                     }
-                                    if (!typematch) {
+                                    if (!typematch)
+                                    {
                                         // this takes care of enum values
                                         TypeCode argtypecode = Type.GetTypeCode(pi[n].ParameterType);
                                         TypeCode paramtypecode = Type.GetTypeCode(clrtype);
-                                        if (argtypecode == paramtypecode) {
+                                        if (argtypecode == paramtypecode)
+                                        {
                                             typematch = true;
                                             clrtype = pi[n].ParameterType;
                                         }
                                     }
                                     Runtime.Decref(pyoptype);
-                                    if (!typematch) {
+                                    if (!typematch)
+                                    {
                                         margs = null;
                                         break;
                                     }
                                 }
-                                else {
+                                else
+                                {
                                     typematch = true;
                                     clrtype = pi[n].ParameterType;
                                 }
                             }
-                            else {
+                            else
+                            {
                                 clrtype = pi[n].ParameterType;
                             }
-                            
+
                             if (pi[n].IsOut || clrtype.IsByRef)
                             {
                                 outs++;
@@ -370,13 +415,15 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw,
                                 margs[n] = defaultArgList[n - pynargs];
                         }
                     }
-                    
-                    if (margs == null) {
+
+                    if (margs == null)
+                    {
                         continue;
                     }
 
                     Object target = null;
-                    if ((!mi.IsStatic) && (inst != IntPtr.Zero)) {
+                    if ((!mi.IsStatic) && (inst != IntPtr.Zero))
+                    {
                         //CLRObject co = (CLRObject)ManagedType.GetManagedObject(inst);
                         // InvalidCastException: Unable to cast object of type
                         // 'Python.Runtime.ClassObject' to type 'Python.Runtime.CLRObject'
@@ -386,7 +433,8 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw,
                         // something intentionally wrong like call a non-static method
                         // on the class rather than on an instance of the class.
                         // XXX maybe better to do this before all the other rigmarole.
-                        if (co == null) {
+                        if (co == null)
+                        {
                             return null;
                         }
                         target = co.inst;
@@ -408,52 +456,61 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw,
             return null;
         }
 
-        internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw) {
+        internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw)
+        {
             return this.Invoke(inst, args, kw, null, null);
-            
         }
 
         internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw,
-                                       MethodBase info) {
+            MethodBase info)
+        {
             return this.Invoke(inst, args, kw, info, null);
         }
 
         internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw,
-                                       MethodBase info, MethodInfo[] methodinfo) {
+            MethodBase info, MethodInfo[] methodinfo)
+        {
             Binding binding = this.Bind(inst, args, kw, info, methodinfo);
             Object result;
             IntPtr ts = IntPtr.Zero;
 
-            if (binding == null) {
-                Exceptions.SetError(Exceptions.TypeError, 
-                                    "No method matches given arguments"
-                                    );
+            if (binding == null)
+            {
+                Exceptions.SetError(Exceptions.TypeError,
+                    "No method matches given arguments"
+                    );
                 return IntPtr.Zero;
             }
 
-            if (allow_threads) {
-                ts = PythonEngine.BeginAllowThreads(); 
+            if (allow_threads)
+            {
+                ts = PythonEngine.BeginAllowThreads();
             }
 
-            try {
-                result = binding.info.Invoke(binding.inst, 
-                                             BindingFlags.Default, 
-                                             null, 
-                                             binding.args, 
-                                             null);
+            try
+            {
+                result = binding.info.Invoke(binding.inst,
+                    BindingFlags.Default,
+                    null,
+                    binding.args,
+                    null);
             }
-            catch (Exception e) {
-                if (e.InnerException != null) {
+            catch (Exception e)
+            {
+                if (e.InnerException != null)
+                {
                     e = e.InnerException;
                 }
-                if (allow_threads) {
+                if (allow_threads)
+                {
                     PythonEngine.EndAllowThreads(ts);
                 }
                 Exceptions.SetError(e);
                 return IntPtr.Zero;
             }
 
-            if (allow_threads) {
+            if (allow_threads)
+            {
                 PythonEngine.EndAllowThreads(ts);
             }
 
@@ -465,11 +522,12 @@ internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw,
 
             MethodInfo mi = (MethodInfo)binding.info;
 
-            if ((binding.outs == 1) && (mi.ReturnType == typeof(void))) {
-
+            if ((binding.outs == 1) && (mi.ReturnType == typeof(void)))
+            {
             }
 
-            if (binding.outs > 0) {
+            if (binding.outs > 0)
+            {
                 ParameterInfo[] pi = mi.GetParameters();
                 int c = pi.Length;
                 int n = 0;
@@ -479,16 +537,19 @@ internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw,
                 Runtime.PyTuple_SetItem(t, n, v);
                 n++;
 
-                for (int i=0; i < c; i++) {
+                for (int i = 0; i < c; i++)
+                {
                     Type pt = pi[i].ParameterType;
-                    if (pi[i].IsOut || pt.IsByRef) {
+                    if (pi[i].IsOut || pt.IsByRef)
+                    {
                         v = Converter.ToPython(binding.args[i], pt);
                         Runtime.PyTuple_SetItem(t, n, v);
                         n++;
                     }
                 }
 
-                if ((binding.outs == 1) && (mi.ReturnType == typeof(void))) {
+                if ((binding.outs == 1) && (mi.ReturnType == typeof(void)))
+                {
                     v = Runtime.PyTuple_GetItem(t, 1);
                     Runtime.Incref(v);
                     Runtime.Decref(t);
@@ -500,25 +561,23 @@ internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw,
 
             return Converter.ToPython(result, mi.ReturnType);
         }
-
     }
 
 
-
     //========================================================================
     // Utility class to sort method info by parameter type precedence.
     //========================================================================
 
-    internal class MethodSorter : IComparer {
-
-        int IComparer.Compare(Object m1, Object m2) {
+    internal class MethodSorter : IComparer
+    {
+        int IComparer.Compare(Object m1, Object m2)
+        {
             int p1 = MethodBinder.GetPrecedence((MethodBase)m1);
             int p2 = MethodBinder.GetPrecedence((MethodBase)m2);
             if (p1 < p2) return -1;
             if (p1 > p2) return 1;
             return 0;
         }
-
     }
 
 
@@ -528,21 +587,20 @@ int IComparer.Compare(Object m1, Object m2) {
     // the call, and the arguments for the call (all as managed values).
     //========================================================================
 
-    internal class Binding {
-
+    internal class Binding
+    {
         public MethodBase info;
         public Object[] args;
         public Object inst;
         public int outs;
 
-        internal Binding(MethodBase info, Object inst, Object[] args, 
-                         int outs) {
+        internal Binding(MethodBase info, Object inst, Object[] args,
+            int outs)
+        {
             this.info = info;
             this.inst = inst;
             this.args = args;
             this.outs = outs;
         }
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/methodbinding.cs b/src/runtime/methodbinding.cs
index 64ab3edbe..a5f1a5964 100644
--- a/src/runtime/methodbinding.cs
+++ b/src/runtime/methodbinding.cs
@@ -1,32 +1,24 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 using System.Collections.Generic;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements a Python binding type for CLR methods. These work much like
     // standard Python method bindings, but the same type is used to bind
     // both static and instance methods.
     //========================================================================
 
-    internal class MethodBinding : ExtensionType {
-
+    internal class MethodBinding : ExtensionType
+    {
         internal MethodInfo info;
         internal MethodObject m;
         internal IntPtr target;
         internal IntPtr targetType;
 
-        public MethodBinding(MethodObject m, IntPtr target, IntPtr targetType) : base() {
+        public MethodBinding(MethodObject m, IntPtr target, IntPtr targetType) : base()
+        {
             Runtime.Incref(target);
             this.target = target;
 
@@ -43,55 +35,62 @@ public MethodBinding(MethodObject m, IntPtr target) : this(m, target, IntPtr.Zer
         {
         }
 
-         //====================================================================
-         // Implement binding of generic methods using the subscript syntax [].
-         //====================================================================
- 
-         public static IntPtr mp_subscript(IntPtr tp, IntPtr idx) {
-             MethodBinding self = (MethodBinding)GetManagedObject(tp);
+        //====================================================================
+        // Implement binding of generic methods using the subscript syntax [].
+        //====================================================================
+
+        public static IntPtr mp_subscript(IntPtr tp, IntPtr idx)
+        {
+            MethodBinding self = (MethodBinding)GetManagedObject(tp);
 
             Type[] types = Runtime.PythonArgsToTypeArray(idx);
-            if (types == null) {
-                 return Exceptions.RaiseTypeError("type(s) expected");
+            if (types == null)
+            {
+                return Exceptions.RaiseTypeError("type(s) expected");
             }
 
-             MethodInfo mi = MethodBinder.MatchParameters(self.m.info, types);
-            if (mi == null) {
+            MethodInfo mi = MethodBinder.MatchParameters(self.m.info, types);
+            if (mi == null)
+            {
                 string e = "No match found for given type params";
                 return Exceptions.RaiseTypeError(e);
             }
 
-             MethodBinding mb = new MethodBinding(self.m, self.target);
-             mb.info = mi;
-             Runtime.Incref(mb.pyHandle);
-             return mb.pyHandle;            
-         }
+            MethodBinding mb = new MethodBinding(self.m, self.target);
+            mb.info = mi;
+            Runtime.Incref(mb.pyHandle);
+            return mb.pyHandle;
+        }
 
 
         //====================================================================
-        // MethodBinding __getattribute__ implementation. 
+        // MethodBinding __getattribute__ implementation.
         //====================================================================
 
-        public static IntPtr tp_getattro(IntPtr ob, IntPtr key) {
+        public static IntPtr tp_getattro(IntPtr ob, IntPtr key)
+        {
             MethodBinding self = (MethodBinding)GetManagedObject(ob);
 
-            if (!Runtime.PyString_Check(key)) {
+            if (!Runtime.PyString_Check(key))
+            {
                 Exceptions.SetError(Exceptions.TypeError, "string expected");
                 return IntPtr.Zero;
             }
 
             string name = Runtime.GetManagedString(key);
-            if (name == "__doc__") {
+            if (name == "__doc__")
+            {
                 IntPtr doc = self.m.GetDocString();
                 Runtime.Incref(doc);
                 return doc;
             }
 
             // XXX deprecate __overloads__ soon...
-            if (name == "__overloads__" || name == "Overloads") {
+            if (name == "__overloads__" || name == "Overloads")
+            {
                 OverloadMapper om = new OverloadMapper(self.m, self.target);
                 Runtime.Incref(om.pyHandle);
-                return om.pyHandle;            
+                return om.pyHandle;
             }
 
             return Runtime.PyObject_GenericGetAttr(ob, key);
@@ -102,30 +101,31 @@ public static IntPtr tp_getattro(IntPtr ob, IntPtr key) {
         // MethodBinding  __call__ implementation.
         //====================================================================
 
-        public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw) {
-			MethodBinding self = (MethodBinding)GetManagedObject(ob);
-
-			// This works around a situation where the wrong generic method is picked,
-			// for example this method in the tests: string Overloaded<T>(int arg1, int arg2, string arg3)
-			if (self.info != null)
-			{
-				if (self.info.IsGenericMethod)
-				{
-					int len = Runtime.PyTuple_Size(args);
-					Type[] sigTp = Runtime.PythonArgsToTypeArray(args, true);
-					if (sigTp != null)
-					{
-						Type[] genericTp = self.info.GetGenericArguments();
-						MethodInfo betterMatch = MethodBinder.MatchSignatureAndParameters(self.m.info, genericTp, sigTp);
-						if (betterMatch != null) self.info = betterMatch;
-					}
-				}
-			}
-
-			// This supports calling a method 'unbound', passing the instance
-			// as the first argument. Note that this is not supported if any
-			// of the overloads are static since we can't know if the intent
-			// was to call the static method or the unbound instance method.
+        public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw)
+        {
+            MethodBinding self = (MethodBinding)GetManagedObject(ob);
+
+            // This works around a situation where the wrong generic method is picked,
+            // for example this method in the tests: string Overloaded<T>(int arg1, int arg2, string arg3)
+            if (self.info != null)
+            {
+                if (self.info.IsGenericMethod)
+                {
+                    int len = Runtime.PyTuple_Size(args);
+                    Type[] sigTp = Runtime.PythonArgsToTypeArray(args, true);
+                    if (sigTp != null)
+                    {
+                        Type[] genericTp = self.info.GetGenericArguments();
+                        MethodInfo betterMatch = MethodBinder.MatchSignatureAndParameters(self.m.info, genericTp, sigTp);
+                        if (betterMatch != null) self.info = betterMatch;
+                    }
+                }
+            }
+
+            // This supports calling a method 'unbound', passing the instance
+            // as the first argument. Note that this is not supported if any
+            // of the overloads are static since we can't know if the intent
+            // was to call the static method or the unbound instance method.
             List<IntPtr> disposeList = new List<IntPtr>();
             try
             {
@@ -190,26 +190,31 @@ public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw) {
         // MethodBinding  __hash__ implementation.
         //====================================================================
 
-        public static IntPtr tp_hash(IntPtr ob) {
+        public static IntPtr tp_hash(IntPtr ob)
+        {
             MethodBinding self = (MethodBinding)GetManagedObject(ob);
             long x = 0;
             long y = 0;
 
-            if (self.target != IntPtr.Zero) {
+            if (self.target != IntPtr.Zero)
+            {
                 x = Runtime.PyObject_Hash(self.target).ToInt64();
-                if (x == -1) {
+                if (x == -1)
+                {
                     return new IntPtr(-1);
                 }
             }
- 
+
             y = Runtime.PyObject_Hash(self.m.pyHandle).ToInt64();
-            if (y == -1) {
+            if (y == -1)
+            {
                 return new IntPtr(-1);
             }
 
             x ^= y;
 
-            if (x == -1) {
+            if (x == -1)
+            {
                 x = -1;
             }
 
@@ -220,7 +225,8 @@ public static IntPtr tp_hash(IntPtr ob) {
         // MethodBinding  __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             MethodBinding self = (MethodBinding)GetManagedObject(ob);
             string type = (self.target == IntPtr.Zero) ? "unbound" : "bound";
             string s = String.Format("<{0} method '{1}'>", type, self.m.name);
@@ -231,14 +237,12 @@ public static IntPtr tp_repr(IntPtr ob) {
         // MethodBinding dealloc implementation.
         //====================================================================
 
-        public static new void tp_dealloc(IntPtr ob) {
+        public static new void tp_dealloc(IntPtr ob)
+        {
             MethodBinding self = (MethodBinding)GetManagedObject(ob);
             Runtime.Decref(self.target);
             Runtime.Decref(self.targetType);
             ExtensionType.FinalizeObject(self);
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/methodobject.cs b/src/runtime/methodobject.cs
index 45e7de709..269f8112f 100644
--- a/src/runtime/methodobject.cs
+++ b/src/runtime/methodobject.cs
@@ -1,26 +1,17 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements a Python type that represents a CLR method. Method objects
     // support a subscript syntax [] to allow explicit overload selection.
     //========================================================================
     // TODO: ForbidPythonThreadsAttribute per method info
 
-    internal class MethodObject : ExtensionType {
-
+    internal class MethodObject : ExtensionType
+    {
         internal MethodInfo[] info;
         internal string name;
         internal MethodBinding unbound;
@@ -29,7 +20,8 @@ internal class MethodObject : ExtensionType {
         internal IntPtr doc;
         internal Type type;
 
-        public MethodObject(Type type, string name, MethodInfo[] info) : base() {
+        public MethodObject(Type type, string name, MethodInfo[] info) : base()
+        {
             _MethodObject(type, name, info);
         }
 
@@ -56,12 +48,14 @@ private void _MethodObject(Type type, string name, MethodInfo[] info)
             }
         }
 
-        public virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw) {
+        public virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw)
+        {
             return this.Invoke(inst, args, kw, null);
         }
- 
+
         public virtual IntPtr Invoke(IntPtr target, IntPtr args, IntPtr kw,
-                                     MethodBase info) {
+            MethodBase info)
+        {
             return binder.Invoke(target, args, kw, info, this.info);
         }
 
@@ -69,25 +63,30 @@ public virtual IntPtr Invoke(IntPtr target, IntPtr args, IntPtr kw,
         // Helper to get docstrings from reflected method / param info.
         //====================================================================
 
-        internal IntPtr GetDocString() {
-            if (doc != IntPtr.Zero) {
+        internal IntPtr GetDocString()
+        {
+            if (doc != IntPtr.Zero)
+            {
                 return doc;
             }
             string str = "";
-			Type marker = typeof(DocStringAttribute);
+            Type marker = typeof(DocStringAttribute);
             MethodBase[] methods = binder.GetMethods();
-            foreach (MethodBase method in methods) {
+            foreach (MethodBase method in methods)
+            {
                 if (str.Length > 0)
                     str += Environment.NewLine;
-				Attribute[] attrs = (Attribute[]) method.GetCustomAttributes(marker, false);
-	            if (attrs.Length == 0) {
-		                str += method.ToString();
-		            }
-				else {
-					DocStringAttribute attr = (DocStringAttribute)attrs[0];
-					str += attr.DocString;
-				}
-			}
+                Attribute[] attrs = (Attribute[])method.GetCustomAttributes(marker, false);
+                if (attrs.Length == 0)
+                {
+                    str += method.ToString();
+                }
+                else
+                {
+                    DocStringAttribute attr = (DocStringAttribute)attrs[0];
+                    str += attr.DocString;
+                }
+            }
             doc = Runtime.PyString_FromString(str);
             return doc;
         }
@@ -98,31 +97,35 @@ internal IntPtr GetDocString() {
         // and instance methods all with the same name. That makes it tough
         // to support calling a method 'unbound' (passing the instance as the
         // first argument), because in this case we can't know whether to call
-        // the instance method unbound or call the static method. 
+        // the instance method unbound or call the static method.
         //
         // The rule we is that if there are both instance and static methods
         // with the same name, then we always call the static method. So this
-        // method returns true if any of the methods that are represented by 
+        // method returns true if any of the methods that are represented by
         // the descriptor are static methods (called by MethodBinding).
         //====================================================================
 
-        internal bool IsStatic() {
+        internal bool IsStatic()
+        {
             return this.is_static;
         }
 
         //====================================================================
-        // Descriptor __getattribute__ implementation. 
+        // Descriptor __getattribute__ implementation.
         //====================================================================
 
-        public static IntPtr tp_getattro(IntPtr ob, IntPtr key) {
+        public static IntPtr tp_getattro(IntPtr ob, IntPtr key)
+        {
             MethodObject self = (MethodObject)GetManagedObject(ob);
 
-            if (!Runtime.PyString_Check(key)) {
+            if (!Runtime.PyString_Check(key))
+            {
                 return Exceptions.RaiseTypeError("string expected");
             }
 
             string name = Runtime.GetManagedString(key);
-            if (name == "__doc__") {
+            if (name == "__doc__")
+            {
                 IntPtr doc = self.GetDocString();
                 Runtime.Incref(doc);
                 return doc;
@@ -133,10 +136,11 @@ public static IntPtr tp_getattro(IntPtr ob, IntPtr key) {
 
         //====================================================================
         // Descriptor __get__ implementation. Accessing a CLR method returns
-        // a "bound" method similar to a Python bound method. 
+        // a "bound" method similar to a Python bound method.
         //====================================================================
 
-        public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
+        public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp)
+        {
             MethodObject self = (MethodObject)GetManagedObject(ds);
             MethodBinding binding;
 
@@ -144,16 +148,20 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
             // an instance) we return an 'unbound' MethodBinding that will
             // cached for future accesses through the type.
 
-            if (ob == IntPtr.Zero) {
-                if (self.unbound == null) {
+            if (ob == IntPtr.Zero)
+            {
+                if (self.unbound == null)
+                {
                     self.unbound = new MethodBinding(self, IntPtr.Zero, tp);
                 }
                 binding = self.unbound;
-                Runtime.Incref(binding.pyHandle);;
+                Runtime.Incref(binding.pyHandle);
+                ;
                 return binding.pyHandle;
             }
 
-            if (Runtime.PyObject_IsInstance(ob, tp) < 1) {
+            if (Runtime.PyObject_IsInstance(ob, tp) < 1)
+            {
                 return Exceptions.RaiseTypeError("invalid argument");
             }
 
@@ -180,7 +188,8 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
         // Descriptor __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             MethodObject self = (MethodObject)GetManagedObject(ob);
             string s = String.Format("<method '{0}'>", self.name);
             return Runtime.PyString_FromStringAndSize(s, s.Length);
@@ -190,17 +199,15 @@ public static IntPtr tp_repr(IntPtr ob) {
         // Descriptor dealloc implementation.
         //====================================================================
 
-        public static new void tp_dealloc(IntPtr ob) {
+        public static new void tp_dealloc(IntPtr ob)
+        {
             MethodObject self = (MethodObject)GetManagedObject(ob);
             Runtime.Decref(self.doc);
-            if (self.unbound != null) {
+            if (self.unbound != null)
+            {
                 Runtime.Decref(self.unbound.pyHandle);
             }
             ExtensionType.FinalizeObject(self);
         }
-
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/methodwrapper.cs b/src/runtime/methodwrapper.cs
index 764c77446..53c0a3cc9 100644
--- a/src/runtime/methodwrapper.cs
+++ b/src/runtime/methodwrapper.cs
@@ -1,45 +1,36 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// A MethodWrapper wraps a static method of a managed type,
     /// making it callable by Python as a PyCFunction object. This is
     /// currently used mainly to implement special cases like the CLR
     /// import hook.
     /// </summary>
-
-    internal class MethodWrapper {
-
+    internal class MethodWrapper
+    {
         public IntPtr mdef;
         public IntPtr ptr;
 
-        public MethodWrapper(Type type, string name, string funcType = null) {
-
+        public MethodWrapper(Type type, string name, string funcType = null)
+        {
             // Turn the managed method into a function pointer
 
             IntPtr fp = Interop.GetThunk(type.GetMethod(name), funcType);
 
-            // Allocate and initialize a PyMethodDef structure to represent 
-            // the managed method, then create a PyCFunction. 
+            // Allocate and initialize a PyMethodDef structure to represent
+            // the managed method, then create a PyCFunction.
 
-            mdef = Runtime.PyMem_Malloc(4 * IntPtr.Size);
+            mdef = Runtime.PyMem_Malloc(4*IntPtr.Size);
             TypeManager.WriteMethodDef(mdef, name, fp, 0x0003);
             ptr = Runtime.PyCFunction_NewEx(mdef, IntPtr.Zero, IntPtr.Zero);
         }
 
-        public IntPtr Call(IntPtr args, IntPtr kw) {
+        public IntPtr Call(IntPtr args, IntPtr kw)
+        {
             return Runtime.PyCFunction_Call(ptr, args, kw);
         }
     }
diff --git a/src/runtime/modulefunctionobject.cs b/src/runtime/modulefunctionobject.cs
index 2aa8c2306..efd0384c4 100644
--- a/src/runtime/modulefunctionobject.cs
+++ b/src/runtime/modulefunctionobject.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
@@ -18,7 +9,6 @@ namespace Python.Runtime
     /// </summary>
     internal class ModuleFunctionObject : MethodObject
     {
-
         public ModuleFunctionObject(Type type, string name, MethodInfo[] info, bool allow_threads)
             : base(type, name, info, allow_threads)
         {
@@ -52,7 +42,5 @@ public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw)
             string s = String.Format("<CLRModuleFunction '{0}'>", self.name);
             return Runtime.PyString_FromStringAndSize(s, s.Length);
         }
-
     }
-}
-
+}
\ No newline at end of file
diff --git a/src/runtime/moduleobject.cs b/src/runtime/moduleobject.cs
index d5dc2a562..738985598 100644
--- a/src/runtime/moduleobject.cs
+++ b/src/runtime/moduleobject.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections.Specialized;
 using System.Runtime.InteropServices;
@@ -14,21 +5,22 @@
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
-    // Implements a Python type that provides access to CLR namespaces. The 
+    // Implements a Python type that provides access to CLR namespaces. The
     // type behaves like a Python module, and can contain other sub-modules.
     //========================================================================
 
-    internal class ModuleObject : ExtensionType {
-
+    internal class ModuleObject : ExtensionType
+    {
         Dictionary<string, ManagedType> cache;
         internal string moduleName;
         internal IntPtr dict;
         protected string _namespace;
 
-        public ModuleObject(string name) : base() {
+        public ModuleObject(string name) : base()
+        {
             if (name == String.Empty)
             {
                 throw new ArgumentException("Name must not be empty!");
@@ -41,7 +33,8 @@ public ModuleObject(string name) : base() {
             // anything that expects __file__ to be set.
             string filename = "unknown";
             string docstring = "Namespace containing types from the following assemblies:\n\n";
-            foreach (Assembly a in AssemblyManager.GetAssemblies(name)) {
+            foreach (Assembly a in AssemblyManager.GetAssemblies(name))
+            {
                 filename = a.Location;
                 docstring += "- " + a.FullName + "\n";
             }
@@ -67,15 +60,17 @@ public ModuleObject(string name) : base() {
 
         //===================================================================
         // Returns a ClassBase object representing a type that appears in
-        // this module's namespace or a ModuleObject representing a child 
+        // this module's namespace or a ModuleObject representing a child
         // namespace (or null if the name is not found). This method does
         // not increment the Python refcount of the returned object.
         //===================================================================
 
-        public ManagedType GetAttribute(string name, bool guess) {
+        public ManagedType GetAttribute(string name, bool guess)
+        {
             ManagedType cached = null;
             this.cache.TryGetValue(name, out cached);
-            if (cached != null) {
+            if (cached != null)
+            {
                 return cached;
             }
 
@@ -93,57 +88,65 @@ public ManagedType GetAttribute(string name, bool guess) {
             //    return null;
             //}
 
-            string qname = (_namespace == String.Empty) ? name : 
-                            _namespace + "." + name;
+            string qname = (_namespace == String.Empty)
+                ? name
+                : _namespace + "." + name;
 
-            // If the fully-qualified name of the requested attribute is 
-            // a namespace exported by a currently loaded assembly, return 
+            // If the fully-qualified name of the requested attribute is
+            // a namespace exported by a currently loaded assembly, return
             // a new ModuleObject representing that namespace.
 
-            if (AssemblyManager.IsValidNamespace(qname)) {
+            if (AssemblyManager.IsValidNamespace(qname))
+            {
                 m = new ModuleObject(qname);
                 StoreAttribute(name, m);
-                return (ManagedType) m;
+                return (ManagedType)m;
             }
 
-            // Look for a type in the current namespace. Note that this 
+            // Look for a type in the current namespace. Note that this
             // includes types, delegates, enums, interfaces and structs.
             // Only public namespace members are exposed to Python.
 
             type = AssemblyManager.LookupType(qname);
-            if (type != null) {
-                if (!type.IsPublic) {
+            if (type != null)
+            {
+                if (!type.IsPublic)
+                {
                     return null;
                 }
                 c = ClassManager.GetClass(type);
                 StoreAttribute(name, c);
-                return (ManagedType) c;
+                return (ManagedType)c;
             }
 
             // This is a little repetitive, but it ensures that the right
             // thing happens with implicit assembly loading at a reasonable
-            // cost. Ask the AssemblyManager to do implicit loading for each 
+            // cost. Ask the AssemblyManager to do implicit loading for each
             // of the steps in the qualified name, then try it again.
             bool ignore = name.StartsWith("__");
-            if (AssemblyManager.LoadImplicit(qname, !ignore)) {
-                if (AssemblyManager.IsValidNamespace(qname)) {
+            if (AssemblyManager.LoadImplicit(qname, !ignore))
+            {
+                if (AssemblyManager.IsValidNamespace(qname))
+                {
                     m = new ModuleObject(qname);
                     StoreAttribute(name, m);
-                    return (ManagedType) m;
+                    return (ManagedType)m;
                 }
 
                 type = AssemblyManager.LookupType(qname);
-                if (type != null) {
-                    if (!type.IsPublic) {
+                if (type != null)
+                {
+                    if (!type.IsPublic)
+                    {
                         return null;
                     }
                     c = ClassManager.GetClass(type);
                     StoreAttribute(name, c);
-                    return (ManagedType) c;
+                    return (ManagedType)c;
                 }
             }
 
-            // We didn't find the name, so we may need to see if there is a 
+            // We didn't find the name, so we may need to see if there is a
             // generic type with this base name. If so, we'll go ahead and
             // return it. Note that we store the mapping of the unmangled
             // name to generic type -  it is technically possible that some
@@ -151,12 +154,15 @@ public ManagedType GetAttribute(string name, bool guess) {
             // the current namespace with the given basename, but unlikely
             // enough to complicate the implementation for now.
 
-            if (guess) {
+            if (guess)
+            {
                 string gname = GenericUtil.GenericNameForBaseName(
-                                              _namespace, name);
-                if (gname != null) {
+                    _namespace, name);
+                if (gname != null)
+                {
                     ManagedType o = GetAttribute(gname, false);
-                    if (o != null) {
+                    if (o != null)
+                    {
                         StoreAttribute(name, o);
                         return o;
                     }
@@ -169,9 +175,10 @@ public ManagedType GetAttribute(string name, bool guess) {
 
         //===================================================================
         // Stores an attribute in the instance dict for future lookups.
-         //===================================================================
+        //===================================================================
 
-        private void StoreAttribute(string name, ManagedType ob) {
+        private void StoreAttribute(string name, ManagedType ob)
+        {
             Runtime.PyDict_SetItemString(dict, name, ob.pyHandle);
             cache[name] = ob;
         }
@@ -181,23 +188,28 @@ private void StoreAttribute(string name, ManagedType ob) {
         // Preloads all currently-known names for the module namespace. This
         // can be called multiple times, to add names from assemblies that
         // may have been loaded since the last call to the method.
-         //===================================================================
+        //===================================================================
 
-        public void LoadNames() {
+        public void LoadNames()
+        {
             ManagedType m = null;
-            foreach (string name in AssemblyManager.GetNames(_namespace)) {
+            foreach (string name in AssemblyManager.GetNames(_namespace))
+            {
                 this.cache.TryGetValue(name, out m);
-                if (m == null) {
+                if (m == null)
+                {
                     ManagedType attr = this.GetAttribute(name, true);
-                    if (Runtime.wrap_exceptions) {
-                        if (attr is ExceptionClassObject) {
+                    if (Runtime.wrap_exceptions)
+                    {
+                        if (attr is ExceptionClassObject)
+                        {
                             ExceptionClassObject c = attr as ExceptionClassObject;
-                            if (c != null) {
-                              IntPtr p = attr.pyHandle;
-                              IntPtr r =Exceptions.GetExceptionClassWrapper(p);
-                              Runtime.PyDict_SetItemString(dict, name, r);
-                              Runtime.Incref(r);
-
+                            if (c != null)
+                            {
+                                IntPtr p = attr.pyHandle;
+                                IntPtr r = Exceptions.GetExceptionClassWrapper(p);
+                                Runtime.PyDict_SetItemString(dict, name, r);
+                                Runtime.Incref(r);
                             }
                         }
                     }
@@ -255,46 +267,54 @@ internal void InitializeModuleMembers()
 
         //====================================================================
         // ModuleObject __getattribute__ implementation. Module attributes
-        // are always either classes or sub-modules representing subordinate 
+        // are always either classes or sub-modules representing subordinate
         // namespaces. CLR modules implement a lazy pattern - the sub-modules
         // and classes are created when accessed and cached for future use.
         //====================================================================
 
-        public static IntPtr tp_getattro(IntPtr ob, IntPtr key) {
+        public static IntPtr tp_getattro(IntPtr ob, IntPtr key)
+        {
             ModuleObject self = (ModuleObject)GetManagedObject(ob);
 
-            if (!Runtime.PyString_Check(key)) {
+            if (!Runtime.PyString_Check(key))
+            {
                 Exceptions.SetError(Exceptions.TypeError, "string expected");
                 return IntPtr.Zero;
             }
 
             IntPtr op = Runtime.PyDict_GetItem(self.dict, key);
-            if (op != IntPtr.Zero) {
+            if (op != IntPtr.Zero)
+            {
                 Runtime.Incref(op);
                 return op;
             }
- 
+
             string name = Runtime.GetManagedString(key);
-            if (name == "__dict__") {
+            if (name == "__dict__")
+            {
                 Runtime.Incref(self.dict);
                 return self.dict;
             }
 
             ManagedType attr = self.GetAttribute(name, true);
 
-            if (attr == null) {
+            if (attr == null)
+            {
                 Exceptions.SetError(Exceptions.AttributeError, name);
-                return IntPtr.Zero;                
+                return IntPtr.Zero;
             }
 
             // XXX - hack required to recognize exception types. These types
             // may need to be wrapped in old-style class wrappers in versions
             // of Python where new-style classes cannot be used as exceptions.
 
-            if (Runtime.wrap_exceptions) {
-                if (attr is ExceptionClassObject) {
+            if (Runtime.wrap_exceptions)
+            {
+                if (attr is ExceptionClassObject)
+                {
                     ExceptionClassObject c = attr as ExceptionClassObject;
-                    if (c != null) {
+                    if (c != null)
+                    {
                         IntPtr p = attr.pyHandle;
                         IntPtr r = Exceptions.GetExceptionClassWrapper(p);
                         Runtime.PyDict_SetItemString(self.dict, name, r);
@@ -312,14 +332,12 @@ public static IntPtr tp_getattro(IntPtr ob, IntPtr key) {
         // ModuleObject __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             ModuleObject self = (ModuleObject)GetManagedObject(ob);
             string s = String.Format("<module '{0}'>", self.moduleName);
             return Runtime.PyString_FromString(s);
         }
-
-
-
     }
 
     /// <summary>
@@ -336,11 +354,12 @@ internal class CLRModule : ModuleObject
         internal static bool _SuppressDocs = false;
         internal static bool _SuppressOverloads = false;
 
-        public CLRModule() : base("clr") {
+        public CLRModule() : base("clr")
+        {
             _namespace = String.Empty;
-            
+
             // This hackery is required in order to allow a plain Python to
-            // import the managed runtime via the CLR bootstrapper module. 
+            // import the managed runtime via the CLR bootstrapper module.
             // The standard Python machinery in control at the time of the
             // import requires the module to pass PyModule_Check. :(
             if (!hacked)
@@ -356,15 +375,20 @@ public CLRModule() : base("clr") {
 
         /// <summary>
         /// The initializing of the preload hook has to happen as late as
-        /// possible since sys.ps1 is created after the CLR module is 
+        /// possible since sys.ps1 is created after the CLR module is
         /// created.
         /// </summary>
-        internal void InitializePreload() {
-            if (interactive_preload) {
+        internal void InitializePreload()
+        {
+            if (interactive_preload)
+            {
                 interactive_preload = false;
-                if (Runtime.PySys_GetObject("ps1") != IntPtr.Zero) {
+                if (Runtime.PySys_GetObject("ps1") != IntPtr.Zero)
+                {
                     preload = true;
-                } else {
+                }
+                else
+                {
                     Exceptions.Clear();
                     preload = false;
                 }
@@ -372,7 +396,8 @@ internal void InitializePreload() {
         }
 
         [ModuleFunctionAttribute()]
-        public static bool getPreload() {
+        public static bool getPreload()
+        {
             return preload;
         }
 
@@ -383,13 +408,15 @@ public static void setPreload(bool preloadFlag)
         }
 
         //[ModulePropertyAttribute]
-        public static bool SuppressDocs {
+        public static bool SuppressDocs
+        {
             get { return _SuppressDocs; }
             set { _SuppressDocs = value; }
         }
 
         //[ModulePropertyAttribute]
-        public static bool SuppressOverloads {
+        public static bool SuppressOverloads
+        {
             get { return _SuppressOverloads; }
             set { _SuppressOverloads = value; }
         }
@@ -409,7 +436,8 @@ public static Assembly AddReference(string name)
             {
                 assembly = AssemblyManager.LoadAssembly(name);
             }
-            if (assembly == null) {
+            if (assembly == null)
+            {
                 assembly = AssemblyManager.LoadAssemblyFullPath(name);
             }
             if (assembly == null)
@@ -417,8 +445,8 @@ public static Assembly AddReference(string name)
                 string msg = String.Format("Unable to find assembly '{0}'.", name);
                 throw new System.IO.FileNotFoundException(msg);
             }
-            
-            return assembly ;
+
+            return assembly;
         }
 
         [ModuleFunctionAttribute()]
@@ -449,7 +477,5 @@ public static int _AtExit()
         {
             return Runtime.AtExit();
         }
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/modulepropertyobject.cs b/src/runtime/modulepropertyobject.cs
index f833696bf..1f67f89ec 100644
--- a/src/runtime/modulepropertyobject.cs
+++ b/src/runtime/modulepropertyobject.cs
@@ -1,30 +1,18 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 using System.Security.Permissions;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Module level properties (attributes)
     /// </summary>
-    internal class ModulePropertyObject : ExtensionType {
-
-        public ModulePropertyObject(PropertyInfo md) : base() 
+    internal class ModulePropertyObject : ExtensionType
+    {
+        public ModulePropertyObject(PropertyInfo md) : base()
         {
             throw new NotImplementedException("ModulePropertyObject");
         }
-
     }
-
-}
-
+}
\ No newline at end of file
diff --git a/src/runtime/monosupport.cs b/src/runtime/monosupport.cs
index 6208b498e..8a5044829 100644
--- a/src/runtime/monosupport.cs
+++ b/src/runtime/monosupport.cs
@@ -1,60 +1,53 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 #if (UCS4)
 using System;
 using System.Runtime.InteropServices;
 using System.Text;
 using Mono.Unix;
 
-namespace Python.Runtime {
-        // The Utf32Marshaler was written Jonathan Pryor and has been placed
-        // in the PUBLIC DOMAIN. 
-        public class Utf32Marshaler : ICustomMarshaler {
-                private static Utf32Marshaler instance = new
-                Utf32Marshaler ();
-                
-                public static ICustomMarshaler GetInstance (string s)
-                {
-                        return instance;
-                }
-                
-                public void CleanUpManagedData (object o)
-                {
-                }
-                
-                public void CleanUpNativeData (IntPtr pNativeData)
-                {
-                        UnixMarshal.FreeHeap (pNativeData);
-                }
-                
-                public int GetNativeDataSize ()
-                {
-                        return IntPtr.Size;
-                }
-                
-                public IntPtr MarshalManagedToNative (object obj)
-                {
-                        string s = obj as string;
-                        if (s == null)
-                                return IntPtr.Zero;
-                        return UnixMarshal.StringToHeap (s,
-                        Encoding.UTF32);
-                }
-                
-                public object MarshalNativeToManaged (IntPtr
-                pNativeData)
-                {
-                        return UnixMarshal.PtrToString (pNativeData, 
-                                Encoding.UTF32);
-                }
+namespace Python.Runtime
+{
+    // The Utf32Marshaler was written Jonathan Pryor and has been placed
+    // in the PUBLIC DOMAIN.
+    public class Utf32Marshaler : ICustomMarshaler
+    {
+        private static Utf32Marshaler instance = new
+            Utf32Marshaler();
+
+        public static ICustomMarshaler GetInstance(string s)
+        {
+            return instance;
+        }
+
+        public void CleanUpManagedData(object o)
+        {
+        }
+
+        public void CleanUpNativeData(IntPtr pNativeData)
+        {
+            UnixMarshal.FreeHeap(pNativeData);
+        }
+
+        public int GetNativeDataSize()
+        {
+            return IntPtr.Size;
+        }
+
+        public IntPtr MarshalManagedToNative(object obj)
+        {
+            string s = obj as string;
+            if (s == null)
+                return IntPtr.Zero;
+            return UnixMarshal.StringToHeap(s,
+                Encoding.UTF32);
+        }
+
+        public object MarshalNativeToManaged(IntPtr
+            pNativeData)
+        {
+            return UnixMarshal.PtrToString(pNativeData,
+                Encoding.UTF32);
         }
+    }
 }
-#endif
 
+#endif
\ No newline at end of file
diff --git a/src/runtime/nativecall.cs b/src/runtime/nativecall.cs
index d2c4bf5b3..a37729ab2 100644
--- a/src/runtime/nativecall.cs
+++ b/src/runtime/nativecall.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Threading;
 using System.Runtime.InteropServices;
@@ -14,10 +5,10 @@
 using System.Reflection;
 using System.Reflection.Emit;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
-    /// Provides support for calling native code indirectly through 
+    /// Provides support for calling native code indirectly through
     /// function pointers. Most of the important parts of the Python
     /// C API can just be wrapped with p/invoke, but there are some
     /// situations (specifically, calling functions through Python
@@ -25,29 +16,28 @@ namespace Python.Runtime {
     ///
     /// This class uses Reflection.Emit to generate IJW thunks that
     /// support indirect calls to native code using various common
-    /// call signatures. This is mainly a workaround for the fact 
+    /// call signatures. This is mainly a workaround for the fact
     /// that you can't spell an indirect call in C# (but can in IL).
     ///
-    /// Another approach that would work is for this to be turned 
+    /// Another approach that would work is for this to be turned
     /// into a separate utility program that could be run during the
-    /// build process to generate the thunks as a separate assembly 
+    /// build process to generate the thunks as a separate assembly
     /// that could then be referenced by the main Python runtime.
     /// </summary>
-
-    internal class NativeCall {
-
+    internal class NativeCall
+    {
         static AssemblyBuilder aBuilder;
         static ModuleBuilder mBuilder;
 
         public static INativeCall Impl;
 
-        static NativeCall() {
-
+        static NativeCall()
+        {
             // The static constructor is responsible for generating the
             // assembly and the methods that implement the IJW thunks.
             //
             // To do this, we actually use reflection on the INativeCall
-            // interface (defined below) and generate the required thunk 
+            // interface (defined below) and generate the required thunk
             // code based on the method signatures.
 
             AssemblyName aname = new AssemblyName();
@@ -63,65 +53,68 @@ static NativeCall() {
             Type iType = typeof(INativeCall);
             tBuilder.AddInterfaceImplementation(iType);
 
-            // Use reflection to loop over the INativeCall interface methods, 
+            // Use reflection to loop over the INativeCall interface methods,
             // calling GenerateThunk to create a managed thunk for each one.
 
-            foreach (MethodInfo method in iType.GetMethods()) {
+            foreach (MethodInfo method in iType.GetMethods())
+            {
                 GenerateThunk(tBuilder, method);
             }
-            
+
             Type theType = tBuilder.CreateType();
 
             Impl = (INativeCall)Activator.CreateInstance(theType);
-
         }
 
-        private static void GenerateThunk(TypeBuilder tb, MethodInfo method) {
-
+        private static void GenerateThunk(TypeBuilder tb, MethodInfo method)
+        {
             ParameterInfo[] pi = method.GetParameters();
             int count = pi.Length;
             int argc = count - 1;
 
             Type[] args = new Type[count];
-            for (int i = 0; i < count; i++) {
+            for (int i = 0; i < count; i++)
+            {
                 args[i] = pi[i].ParameterType;
             }
 
             MethodBuilder mb = tb.DefineMethod(
-                                  method.Name,
-                                  MethodAttributes.Public | 
-                                  MethodAttributes.Virtual,
-                                  method.ReturnType,
-                                  args
-                                  );
+                method.Name,
+                MethodAttributes.Public |
+                MethodAttributes.Virtual,
+                method.ReturnType,
+                args
+                );
 
             // Build the method signature for the actual native function.
             // This is essentially the signature of the wrapper method
             // minus the first argument (the passed in function pointer).
 
             Type[] nargs = new Type[argc];
-            for (int i = 1; i < count; i++) {
+            for (int i = 1; i < count; i++)
+            {
                 nargs[(i - 1)] = args[i];
             }
 
-            // IL generation: the (implicit) first argument of the method 
+            // IL generation: the (implicit) first argument of the method
             // is the 'this' pointer and the second is the function pointer.
             // This code pushes the real args onto the stack, followed by
             // the function pointer, then the calli opcode to make the call.
 
             ILGenerator il = mb.GetILGenerator();
 
-            for (int i = 0; i < argc; i++) {
+            for (int i = 0; i < argc; i++)
+            {
                 il.Emit(OpCodes.Ldarg_S, (i + 2));
             }
 
             il.Emit(OpCodes.Ldarg_1);
 
-            il.EmitCalli(OpCodes.Calli, 
-                         CallingConvention.Cdecl, 
-                         method.ReturnType, 
-                         nargs
-                         );
+            il.EmitCalli(OpCodes.Calli,
+                CallingConvention.Cdecl,
+                method.ReturnType,
+                nargs
+                );
 
             il.Emit(OpCodes.Ret);
 
@@ -130,29 +123,30 @@ private static void GenerateThunk(TypeBuilder tb, MethodInfo method) {
         }
 
 
-        public static void Void_Call_1(IntPtr fp, IntPtr a1) {
+        public static void Void_Call_1(IntPtr fp, IntPtr a1)
+        {
             Impl.Void_Call_1(fp, a1);
         }
 
-        public static IntPtr Call_3(IntPtr fp, IntPtr a1, IntPtr a2, 
-                                    IntPtr a3) {
+        public static IntPtr Call_3(IntPtr fp, IntPtr a1, IntPtr a2,
+            IntPtr a3)
+        {
             return Impl.Call_3(fp, a1, a2, a3);
         }
 
-        public static int Int_Call_3(IntPtr fp, IntPtr a1, IntPtr a2, 
-                                     IntPtr a3) {
+        public static int Int_Call_3(IntPtr fp, IntPtr a1, IntPtr a2,
+            IntPtr a3)
+        {
             return Impl.Int_Call_3(fp, a1, a2, a3);
         }
-
     }
 
 
     /// <summary>
     /// Defines native call signatures to be generated by NativeCall.
     /// </summary>
-
-    public interface INativeCall {
-
+    public interface INativeCall
+    {
         void Void_Call_0(IntPtr funcPtr);
 
         void Void_Call_1(IntPtr funcPtr, IntPtr arg1);
@@ -160,7 +154,5 @@ public interface INativeCall {
         int Int_Call_3(IntPtr funcPtr, IntPtr t, IntPtr n, IntPtr v);
 
         IntPtr Call_3(IntPtr funcPtr, IntPtr a1, IntPtr a2, IntPtr a3);
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/oldmodule.il b/src/runtime/oldmodule.il
index 6ecd2c136..b9e3883c9 100644
--- a/src/runtime/oldmodule.il
+++ b/src/runtime/oldmodule.il
@@ -1,11 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
 
 //============================================================================
 // This file is a hand-maintained stub - it implements clr.dll, which can be
diff --git a/src/runtime/overload.cs b/src/runtime/overload.cs
index 0b7ef248c..2399e9c63 100644
--- a/src/runtime/overload.cs
+++ b/src/runtime/overload.cs
@@ -1,83 +1,77 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements the __overloads__ attribute of method objects. This object
     // supports the [] syntax to explicitly select an overload by signature.
     //========================================================================
 
-    internal class OverloadMapper : ExtensionType {
-
+    internal class OverloadMapper : ExtensionType
+    {
         MethodObject m;
         IntPtr target;
 
-        public OverloadMapper(MethodObject m, IntPtr target) : base() {
+        public OverloadMapper(MethodObject m, IntPtr target) : base()
+        {
             Runtime.Incref(target);
             this.target = target;
             this.m = m;
         }
- 
-         //====================================================================
-         // Implement explicit overload selection using subscript syntax ([]).
-         //====================================================================
- 
-         public static IntPtr mp_subscript(IntPtr tp, IntPtr idx) {
-             OverloadMapper self = (OverloadMapper)GetManagedObject(tp);
+
+        //====================================================================
+        // Implement explicit overload selection using subscript syntax ([]).
+        //====================================================================
+
+        public static IntPtr mp_subscript(IntPtr tp, IntPtr idx)
+        {
+            OverloadMapper self = (OverloadMapper)GetManagedObject(tp);
 
             // Note: if the type provides a non-generic method with N args
             // and a generic method that takes N params, then we always
             // prefer the non-generic version in doing overload selection.
 
             Type[] types = Runtime.PythonArgsToTypeArray(idx);
-            if (types == null) {
-                 return Exceptions.RaiseTypeError("type(s) expected");
+            if (types == null)
+            {
+                return Exceptions.RaiseTypeError("type(s) expected");
             }
 
-             MethodInfo mi = MethodBinder.MatchSignature(self.m.info, types);
-             if (mi == null) {
+            MethodInfo mi = MethodBinder.MatchSignature(self.m.info, types);
+            if (mi == null)
+            {
                 string e = "No match found for signature";
                 return Exceptions.RaiseTypeError(e);
-             }
+            }
 
-             MethodBinding mb = new MethodBinding(self.m, self.target);
-             mb.info = mi;
-             Runtime.Incref(mb.pyHandle);
-             return mb.pyHandle;
-         }
+            MethodBinding mb = new MethodBinding(self.m, self.target);
+            mb.info = mi;
+            Runtime.Incref(mb.pyHandle);
+            return mb.pyHandle;
+        }
 
         //====================================================================
         // OverloadMapper  __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr op) {
+        public static IntPtr tp_repr(IntPtr op)
+        {
             OverloadMapper self = (OverloadMapper)GetManagedObject(op);
             IntPtr doc = self.m.GetDocString();
             Runtime.Incref(doc);
             return doc;
-         }
+        }
 
         //====================================================================
         // OverloadMapper dealloc implementation.
         //====================================================================
 
-        public static new void tp_dealloc(IntPtr ob) {
+        public static new void tp_dealloc(IntPtr ob)
+        {
             OverloadMapper self = (OverloadMapper)GetManagedObject(ob);
             Runtime.Decref(self.target);
             ExtensionType.FinalizeObject(self);
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/propertyobject.cs b/src/runtime/propertyobject.cs
index d61dc0134..5bbf94d1a 100644
--- a/src/runtime/propertyobject.cs
+++ b/src/runtime/propertyobject.cs
@@ -1,31 +1,23 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 using System.Security.Permissions;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements a Python descriptor type that manages CLR properties.
     //========================================================================
 
-    internal class PropertyObject : ExtensionType {
-
+    internal class PropertyObject : ExtensionType
+    {
         PropertyInfo info;
         MethodInfo getter;
         MethodInfo setter;
 
         [StrongNameIdentityPermissionAttribute(SecurityAction.Assert)]
-        public PropertyObject(PropertyInfo md) : base() {
+        public PropertyObject(PropertyInfo md) : base()
+        {
             getter = md.GetGetMethod(true);
             setter = md.GetSetMethod(true);
             info = md;
@@ -33,50 +25,60 @@ public PropertyObject(PropertyInfo md) : base() {
 
 
         //====================================================================
-        // Descriptor __get__ implementation. This method returns the 
+        // Descriptor __get__ implementation. This method returns the
         // value of the property on the given object. The returned value
         // is converted to an appropriately typed Python object.
         //====================================================================
 
-        public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
+        public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp)
+        {
             PropertyObject self = (PropertyObject)GetManagedObject(ds);
             MethodInfo getter = self.getter;
             Object result;
 
 
-            if (getter == null) {
+            if (getter == null)
+            {
                 return Exceptions.RaiseTypeError("property cannot be read");
             }
 
-            if ((ob == IntPtr.Zero) || (ob == Runtime.PyNone)) {
-                if (!(getter.IsStatic)) {
-                    Exceptions.SetError(Exceptions.TypeError, 
-                               "instance property must be accessed through " + 
-                               "a class instance"
-                               );
+            if ((ob == IntPtr.Zero) || (ob == Runtime.PyNone))
+            {
+                if (!(getter.IsStatic))
+                {
+                    Exceptions.SetError(Exceptions.TypeError,
+                        "instance property must be accessed through " +
+                        "a class instance"
+                        );
                     return IntPtr.Zero;
                 }
 
-                try {
+                try
+                {
                     result = self.info.GetValue(null, null);
                     return Converter.ToPython(result, self.info.PropertyType);
                 }
-                catch(Exception e) {
+                catch (Exception e)
+                {
                     return Exceptions.RaiseTypeError(e.Message);
                 }
             }
 
             CLRObject co = GetManagedObject(ob) as CLRObject;
-            if (co == null) {
+            if (co == null)
+            {
                 return Exceptions.RaiseTypeError("invalid target");
             }
 
-            try {
+            try
+            {
                 result = self.info.GetValue(co.inst, null);
                 return Converter.ToPython(result, self.info.PropertyType);
             }
-            catch(Exception e) {
-                if (e.InnerException != null) {
+            catch (Exception e)
+            {
+                if (e.InnerException != null)
+                {
                     e = e.InnerException;
                 }
                 Exceptions.SetError(e);
@@ -87,64 +89,75 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
 
         //====================================================================
         // Descriptor __set__ implementation. This method sets the value of
-        // a property based on the given Python value. The Python value must 
+        // a property based on the given Python value. The Python value must
         // be convertible to the type of the property.
         //====================================================================
 
-        public static new int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val) {
+        public static new int tp_descr_set(IntPtr ds, IntPtr ob, IntPtr val)
+        {
             PropertyObject self = (PropertyObject)GetManagedObject(ds);
             MethodInfo setter = self.setter;
             Object newval;
 
-            if (val == IntPtr.Zero) {
+            if (val == IntPtr.Zero)
+            {
                 Exceptions.RaiseTypeError("cannot delete property");
                 return -1;
             }
 
-            if (setter == null) {
+            if (setter == null)
+            {
                 Exceptions.RaiseTypeError("property is read-only");
                 return -1;
             }
 
 
-            if (!Converter.ToManaged(val, self.info.PropertyType, out newval, 
-                                      true)) {
+            if (!Converter.ToManaged(val, self.info.PropertyType, out newval,
+                true))
+            {
                 return -1;
             }
 
             bool is_static = setter.IsStatic;
 
-            if ((ob == IntPtr.Zero) || (ob == Runtime.PyNone)) {
-                if (!(is_static)) {
+            if ((ob == IntPtr.Zero) || (ob == Runtime.PyNone))
+            {
+                if (!(is_static))
+                {
                     Exceptions.RaiseTypeError(
-                    "instance property must be set on an instance"
-                    );
+                        "instance property must be set on an instance"
+                        );
                     return -1;
                 }
             }
 
-            try {
-                if (!is_static) {
+            try
+            {
+                if (!is_static)
+                {
                     CLRObject co = GetManagedObject(ob) as CLRObject;
-                    if (co == null) {
+                    if (co == null)
+                    {
                         Exceptions.RaiseTypeError("invalid target");
                         return -1;
                     }
                     self.info.SetValue(co.inst, newval, null);
                 }
-                else {
-                    self.info.SetValue(null, newval, null);                    
+                else
+                {
+                    self.info.SetValue(null, newval, null);
                 }
                 return 0;
             }
-            catch(Exception e) {
-                if (e.InnerException != null) {
+            catch (Exception e)
+            {
+                if (e.InnerException != null)
+                {
                     e = e.InnerException;
                 }
                 Exceptions.SetError(e);
                 return -1;
             }
-
         }
 
 
@@ -152,13 +165,11 @@ public static IntPtr tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp) {
         // Descriptor __repr__ implementation.
         //====================================================================
 
-        public static IntPtr tp_repr(IntPtr ob) {
+        public static IntPtr tp_repr(IntPtr ob)
+        {
             PropertyObject self = (PropertyObject)GetManagedObject(ob);
             string s = String.Format("<property '{0}'>", self.info.Name);
             return Runtime.PyString_FromStringAndSize(s, s.Length);
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pyansistring.cs b/src/runtime/pyansistring.cs
index db8e249a1..dc83a29a1 100644
--- a/src/runtime/pyansistring.cs
+++ b/src/runtime/pyansistring.cs
@@ -1,15 +1,7 @@
-// ==========================================================================
-// This is a user contribution to the pythondotnet project.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     public class PyAnsiString : PySequence
     {
         /// <summary>
@@ -21,8 +13,9 @@ public class PyAnsiString : PySequence
         /// that the instance assumes ownership of the object reference.
         /// The object reference is not checked for type-correctness.
         /// </remarks>
-
-        public PyAnsiString(IntPtr ptr) : base(ptr) { }
+        public PyAnsiString(IntPtr ptr) : base(ptr)
+        {
+        }
 
 
         /// <summary>
@@ -34,7 +27,6 @@ public PyAnsiString(IntPtr ptr) : base(ptr) { }
         /// An ArgumentException will be thrown if the given object is not
         /// a Python string object.
         /// </remarks>
-
         public PyAnsiString(PyObject o)
             : base()
         {
@@ -54,7 +46,6 @@ public PyAnsiString(PyObject o)
         /// <remarks>
         /// Creates a Python string from a managed string.
         /// </remarks>
-
         public PyAnsiString(string s)
             : base()
         {
@@ -73,7 +64,6 @@ public PyAnsiString(string s)
         /// <remarks>
         /// Returns true if the given object is a Python string.
         /// </remarks>
-
         public static bool IsStringType(PyObject value)
         {
             return Runtime.PyString_Check(value.obj);
diff --git a/src/runtime/pydict.cs b/src/runtime/pydict.cs
index e2ceaa6d6..781d965f1 100644
--- a/src/runtime/pydict.cs
+++ b/src/runtime/pydict.cs
@@ -1,35 +1,26 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Represents a Python dictionary object. See the documentation at
     /// http://www.python.org/doc/current/api/dictObjects.html for details.
     /// </summary>
-
-    public class PyDict : PyObject {
-
+    public class PyDict : PyObject
+    {
         /// <summary>
         /// PyDict Constructor
         /// </summary>
         ///
         /// <remarks>
-        /// Creates a new PyDict from an existing object reference. Note 
-        /// that the instance assumes ownership of the object reference. 
-        /// The object reference is not checked for type-correctness. 
+        /// Creates a new PyDict from an existing object reference. Note
+        /// that the instance assumes ownership of the object reference.
+        /// The object reference is not checked for type-correctness.
         /// </remarks>
-
-        public PyDict(IntPtr ptr) : base(ptr) {}
+        public PyDict(IntPtr ptr) : base(ptr)
+        {
+        }
 
 
         /// <summary>
@@ -39,10 +30,11 @@ public PyDict(IntPtr ptr) : base(ptr) {}
         /// <remarks>
         /// Creates a new Python dictionary object.
         /// </remarks>
-
-        public PyDict() : base() {
+        public PyDict() : base()
+        {
             obj = Runtime.PyDict_New();
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -53,13 +45,14 @@ public PyDict() : base() {
         /// </summary>
         ///
         /// <remarks>
-        /// Copy constructor - obtain a PyDict from a generic PyObject. An 
+        /// Copy constructor - obtain a PyDict from a generic PyObject. An
         /// ArgumentException will be thrown if the given object is not a
         /// Python dictionary object.
         /// </remarks>
-
-        public PyDict(PyObject o) : base() {
-            if (!IsDictType(o)) {
+        public PyDict(PyObject o) : base()
+        {
+            if (!IsDictType(o))
+            {
                 throw new ArgumentException("object is not a dict");
             }
             Runtime.Incref(o.obj);
@@ -74,8 +67,8 @@ public PyDict(PyObject o) : base() {
         /// <remarks>
         /// Returns true if the given object is a Python dictionary.
         /// </remarks>
-
-        public static bool IsDictType(PyObject value) {
+        public static bool IsDictType(PyObject value)
+        {
             return Runtime.PyDict_Check(value.obj);
         }
 
@@ -87,8 +80,8 @@ public static bool IsDictType(PyObject value) {
         /// <remarks>
         /// Returns true if the object key appears in the dictionary.
         /// </remarks>
-
-        public bool HasKey(PyObject key) {
+        public bool HasKey(PyObject key)
+        {
             return (Runtime.PyMapping_HasKey(obj, key.obj) != 0);
         }
 
@@ -100,8 +93,8 @@ public bool HasKey(PyObject key) {
         /// <remarks>
         /// Returns true if the string key appears in the dictionary.
         /// </remarks>
-
-        public bool HasKey(string key) {
+        public bool HasKey(string key)
+        {
             using (PyString str = new PyString(key))
                 return HasKey(str);
         }
@@ -114,10 +107,11 @@ public bool HasKey(string key) {
         /// <remarks>
         /// Returns a sequence containing the keys of the dictionary.
         /// </remarks>
-
-        public PyObject Keys() {
+        public PyObject Keys()
+        {
             IntPtr items = Runtime.PyDict_Keys(obj);
-            if (items == IntPtr.Zero) {
+            if (items == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyObject(items);
@@ -131,10 +125,11 @@ public PyObject Keys() {
         /// <remarks>
         /// Returns a sequence containing the values of the dictionary.
         /// </remarks>
-
-        public PyObject Values() {
+        public PyObject Values()
+        {
             IntPtr items = Runtime.PyDict_Values(obj);
-            if (items == IntPtr.Zero) {
+            if (items == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyObject(items);
@@ -148,10 +143,11 @@ public PyObject Values() {
         /// <remarks>
         /// Returns a sequence containing the items of the dictionary.
         /// </remarks>
-
-        public PyObject Items() {
+        public PyObject Items()
+        {
             IntPtr items = Runtime.PyDict_Items(obj);
-            if (items == IntPtr.Zero) {
+            if (items == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyObject(items);
@@ -165,10 +161,11 @@ public PyObject Items() {
         /// <remarks>
         /// Returns a copy of the dictionary.
         /// </remarks>
-
-        public PyDict Copy() {
+        public PyDict Copy()
+        {
             IntPtr op = Runtime.PyDict_Copy(obj);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyDict(op);
@@ -182,10 +179,11 @@ public PyDict Copy() {
         /// <remarks>
         /// Update the dictionary from another dictionary.
         /// </remarks>
-
-        public void Update(PyObject other) {
+        public void Update(PyObject other)
+        {
             int result = Runtime.PyDict_Update(obj, other.obj);
-            if (result < 0) {
+            if (result < 0)
+            {
                 throw new PythonException();
             }
         }
@@ -198,12 +196,9 @@ public void Update(PyObject other) {
         /// <remarks>
         /// Clears the dictionary.
         /// </remarks>
-
-        public void Clear() {
+        public void Clear()
+        {
             Runtime.PyDict_Clear(obj);
         }
-
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pyfloat.cs b/src/runtime/pyfloat.cs
index c6995887c..c6bccf5ec 100644
--- a/src/runtime/pyfloat.cs
+++ b/src/runtime/pyfloat.cs
@@ -1,35 +1,26 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Represents a Python float object. See the documentation at
     /// http://www.python.org/doc/current/api/floatObjects.html
     /// </summary>
-
-    public class PyFloat : PyNumber {
-
+    public class PyFloat : PyNumber
+    {
         /// <summary>
         /// PyFloat Constructor
         /// </summary>
         ///
         /// <remarks>
-        /// Creates a new PyFloat from an existing object reference. Note 
-        /// that the instance assumes ownership of the object reference. 
-        /// The object reference is not checked for type-correctness. 
+        /// Creates a new PyFloat from an existing object reference. Note
+        /// that the instance assumes ownership of the object reference.
+        /// The object reference is not checked for type-correctness.
         /// </remarks>
-
-        public PyFloat(IntPtr ptr) : base(ptr) {}
+        public PyFloat(IntPtr ptr) : base(ptr)
+        {
+        }
 
 
         /// <summary>
@@ -37,13 +28,14 @@ public PyFloat(IntPtr ptr) : base(ptr) {}
         /// </summary>
         ///
         /// <remarks>
-        /// Copy constructor - obtain a PyFloat from a generic PyObject. An 
+        /// Copy constructor - obtain a PyFloat from a generic PyObject. An
         /// ArgumentException will be thrown if the given object is not a
         /// Python float object.
         /// </remarks>
-
-        public PyFloat(PyObject o) : base() {
-            if (!IsFloatType(o)) {
+        public PyFloat(PyObject o) : base()
+        {
+            if (!IsFloatType(o))
+            {
                 throw new ArgumentException("object is not a float");
             }
             Runtime.Incref(o.obj);
@@ -58,10 +50,11 @@ public PyFloat(PyObject o) : base() {
         /// <remarks>
         /// Creates a new Python float from a double value.
         /// </remarks>
-
-        public PyFloat(double value) : base() {
+        public PyFloat(double value) : base()
+        {
             obj = Runtime.PyFloat_FromDouble(value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -74,11 +67,13 @@ public PyFloat(double value) : base() {
         /// <remarks>
         /// Creates a new Python float from a string value.
         /// </remarks>
-
-        public PyFloat(string value) : base() {
-            using (PyString s = new PyString(value)) {
+        public PyFloat(string value) : base()
+        {
+            using (PyString s = new PyString(value))
+            {
                 obj = Runtime.PyFloat_FromString(s.obj, IntPtr.Zero);
-                if (obj == IntPtr.Zero) {
+                if (obj == IntPtr.Zero)
+                {
                     throw new PythonException();
                 }
             }
@@ -92,8 +87,8 @@ public PyFloat(string value) : base() {
         /// <remarks>
         /// Returns true if the given object is a Python float.
         /// </remarks>
-
-        public static bool IsFloatType(PyObject value) {
+        public static bool IsFloatType(PyObject value)
+        {
             return Runtime.PyFloat_Check(value.obj);
         }
 
@@ -104,20 +99,18 @@ public static bool IsFloatType(PyObject value) {
         ///
         /// <remarks>
         /// <remarks>
-        /// Convert a Python object to a Python float if possible, raising  
+        /// Convert a Python object to a Python float if possible, raising
         /// a PythonException if the conversion is not possible. This is
         /// equivalent to the Python expression "float(object)".
         /// </remarks>
-
-        public static PyFloat AsFloat(PyObject value) {
+        public static PyFloat AsFloat(PyObject value)
+        {
             IntPtr op = Runtime.PyNumber_Float(value.obj);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyFloat(op);
         }
-
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pyint.cs b/src/runtime/pyint.cs
index 7e5f07b6a..d7a6e51e7 100644
--- a/src/runtime/pyint.cs
+++ b/src/runtime/pyint.cs
@@ -1,35 +1,26 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Represents a Python integer object. See the documentation at
     /// http://www.python.org/doc/current/api/intObjects.html for details.
     /// </summary>
-
-    public class PyInt : PyNumber {
-
+    public class PyInt : PyNumber
+    {
         /// <summary>
         /// PyInt Constructor
         /// </summary>
         ///
         /// <remarks>
-        /// Creates a new PyInt from an existing object reference. Note 
+        /// Creates a new PyInt from an existing object reference. Note
         /// that the instance assumes ownership of the object reference.
-        /// The object reference is not checked for type-correctness. 
+        /// The object reference is not checked for type-correctness.
         /// </remarks>
-
-        public PyInt(IntPtr ptr) : base(ptr) {}
+        public PyInt(IntPtr ptr) : base(ptr)
+        {
+        }
 
 
         /// <summary>
@@ -37,13 +28,14 @@ public PyInt(IntPtr ptr) : base(ptr) {}
         /// </summary>
         ///
         /// <remarks>
-        /// Copy constructor - obtain a PyInt from a generic PyObject. An 
+        /// Copy constructor - obtain a PyInt from a generic PyObject. An
         /// ArgumentException will be thrown if the given object is not a
         /// Python int object.
         /// </remarks>
-
-        public PyInt(PyObject o) : base() {
-            if (!IsIntType(o)) {
+        public PyInt(PyObject o) : base()
+        {
+            if (!IsIntType(o))
+            {
                 throw new ArgumentException("object is not an int");
             }
             Runtime.Incref(o.obj);
@@ -58,10 +50,11 @@ public PyInt(PyObject o) : base() {
         /// <remarks>
         /// Creates a new Python int from an int32 value.
         /// </remarks>
-
-        public PyInt(int value) : base() {
+        public PyInt(int value) : base()
+        {
             obj = Runtime.PyInt_FromInt32(value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -74,11 +67,12 @@ public PyInt(int value) : base() {
         /// <remarks>
         /// Creates a new Python int from a uint32 value.
         /// </remarks>
-
         [CLSCompliant(false)]
-        public PyInt(uint value) : base(IntPtr.Zero) {
+        public PyInt(uint value) : base(IntPtr.Zero)
+        {
             obj = Runtime.PyInt_FromInt64((long)value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -91,10 +85,11 @@ public PyInt(uint value) : base(IntPtr.Zero) {
         /// <remarks>
         /// Creates a new Python int from an int64 value.
         /// </remarks>
-
-        public PyInt(long value) : base(IntPtr.Zero) {
+        public PyInt(long value) : base(IntPtr.Zero)
+        {
             obj = Runtime.PyInt_FromInt64(value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -107,11 +102,12 @@ public PyInt(long value) : base(IntPtr.Zero) {
         /// <remarks>
         /// Creates a new Python int from a uint64 value.
         /// </remarks>
-
         [CLSCompliant(false)]
-        public PyInt(ulong value) : base(IntPtr.Zero) {
+        public PyInt(ulong value) : base(IntPtr.Zero)
+        {
             obj = Runtime.PyInt_FromInt64((long)value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -124,8 +120,9 @@ public PyInt(ulong value) : base(IntPtr.Zero) {
         /// <remarks>
         /// Creates a new Python int from an int16 value.
         /// </remarks>
-
-        public PyInt(short value) : this((int)value) {}
+        public PyInt(short value) : this((int)value)
+        {
+        }
 
 
         /// <summary>
@@ -135,9 +132,10 @@ public PyInt(short value) : this((int)value) {}
         /// <remarks>
         /// Creates a new Python int from a uint16 value.
         /// </remarks>
-
         [CLSCompliant(false)]
-        public PyInt(ushort value) : this((int)value) {}
+        public PyInt(ushort value) : this((int)value)
+        {
+        }
 
 
         /// <summary>
@@ -147,8 +145,9 @@ public PyInt(ushort value) : this((int)value) {}
         /// <remarks>
         /// Creates a new Python int from a byte value.
         /// </remarks>
-
-        public PyInt(byte value) : this((int)value) {}
+        public PyInt(byte value) : this((int)value)
+        {
+        }
 
 
         /// <summary>
@@ -158,9 +157,10 @@ public PyInt(byte value) : this((int)value) {}
         /// <remarks>
         /// Creates a new Python int from an sbyte value.
         /// </remarks>
-
         [CLSCompliant(false)]
-        public PyInt(sbyte value) : this((int)value) {}
+        public PyInt(sbyte value) : this((int)value)
+        {
+        }
 
 
         /// <summary>
@@ -170,10 +170,11 @@ public PyInt(sbyte value) : this((int)value) {}
         /// <remarks>
         /// Creates a new Python int from a string value.
         /// </remarks>
-
-        public PyInt(string value) : base() {
+        public PyInt(string value) : base()
+        {
             obj = Runtime.PyInt_FromString(value, IntPtr.Zero, 0);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -186,8 +187,8 @@ public PyInt(string value) : base() {
         /// <remarks>
         /// Returns true if the given object is a Python int.
         /// </remarks>
-
-        public static bool IsIntType(PyObject value) {
+        public static bool IsIntType(PyObject value)
+        {
             return Runtime.PyInt_Check(value.obj);
         }
 
@@ -198,14 +199,15 @@ public static bool IsIntType(PyObject value) {
         ///
         /// <remarks>
         /// <remarks>
-        /// Convert a Python object to a Python int if possible, raising  
+        /// Convert a Python object to a Python int if possible, raising
         /// a PythonException if the conversion is not possible. This is
         /// equivalent to the Python expression "int(object)".
         /// </remarks>
-
-        public static PyInt AsInt(PyObject value) {
+        public static PyInt AsInt(PyObject value)
+        {
             IntPtr op = Runtime.PyNumber_Int(value.obj);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyInt(op);
@@ -219,8 +221,8 @@ public static PyInt AsInt(PyObject value) {
         /// <remarks>
         /// Return the value of the Python int object as an int16.
         /// </remarks>
-
-        public short ToInt16() {
+        public short ToInt16()
+        {
             return System.Convert.ToInt16(this.ToInt32());
         }
 
@@ -232,8 +234,8 @@ public short ToInt16() {
         /// <remarks>
         /// Return the value of the Python int object as an int32.
         /// </remarks>
-
-        public int ToInt32() {
+        public int ToInt32()
+        {
             return Runtime.PyInt_AsLong(obj);
         }
 
@@ -245,13 +247,9 @@ public int ToInt32() {
         /// <remarks>
         /// Return the value of the Python int object as an int64.
         /// </remarks>
-
-        public long ToInt64() {
+        public long ToInt64()
+        {
             return System.Convert.ToInt64(this.ToInt32());
         }
-
-
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pyiter.cs b/src/runtime/pyiter.cs
index c8599c2a3..5d11fb4d4 100644
--- a/src/runtime/pyiter.cs
+++ b/src/runtime/pyiter.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections.Generic;
 
@@ -29,8 +20,9 @@ public class PyIter : PyObject, IEnumerator<object>
         /// that the instance assumes ownership of the object reference.
         /// The object reference is not checked for type-correctness.
         /// </remarks>
-
-        public PyIter(IntPtr ptr) : base(ptr) {}
+        public PyIter(IntPtr ptr) : base(ptr)
+        {
+        }
 
         /// <summary>
         /// PyIter Constructor
@@ -39,12 +31,11 @@ public PyIter(IntPtr ptr) : base(ptr) {}
         /// <remarks>
         /// Creates a Python iterator from an iterable. Like doing "iter(iterable)" in python.
         /// </remarks>
-
         public PyIter(PyObject iterable) : base()
         {
             obj = Runtime.PyObject_GetIter(iterable.obj);
-                if (obj == IntPtr.Zero)
-                        throw new PythonException();
+            if (obj == IntPtr.Zero)
+                throw new PythonException();
         }
 
         protected override void Dispose(bool disposing)
@@ -88,4 +79,4 @@ public object Current
 
         #endregion
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pylist.cs b/src/runtime/pylist.cs
index 395482332..9ab99deb3 100644
--- a/src/runtime/pylist.cs
+++ b/src/runtime/pylist.cs
@@ -1,34 +1,25 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Represents a standard Python list object. See the documentation at
     /// http://www.python.org/doc/current/api/listObjects.html for details.
     /// </summary>
-
-    public class PyList : PySequence {
-
+    public class PyList : PySequence
+    {
         /// <summary>
         /// PyList Constructor
         /// </summary>
         ///
         /// <remarks>
-        /// Creates a new PyList from an existing object reference. Note 
-        /// that the instance assumes ownership of the object reference. 
-        /// The object reference is not checked for type-correctness. 
+        /// Creates a new PyList from an existing object reference. Note
+        /// that the instance assumes ownership of the object reference.
+        /// The object reference is not checked for type-correctness.
         /// </remarks>
-
-        public PyList(IntPtr ptr) : base(ptr) {}
+        public PyList(IntPtr ptr) : base(ptr)
+        {
+        }
 
 
         /// <summary>
@@ -36,13 +27,14 @@ public PyList(IntPtr ptr) : base(ptr) {}
         /// </summary>
         ///
         /// <remarks>
-        /// Copy constructor - obtain a PyList from a generic PyObject. An 
+        /// Copy constructor - obtain a PyList from a generic PyObject. An
         /// ArgumentException will be thrown if the given object is not a
         /// Python list object.
         /// </remarks>
-
-        public PyList(PyObject o) : base() {
-            if (!IsListType(o)) {
+        public PyList(PyObject o) : base()
+        {
+            if (!IsListType(o))
+            {
                 throw new ArgumentException("object is not a list");
             }
             Runtime.Incref(o.obj);
@@ -57,10 +49,11 @@ public PyList(PyObject o) : base() {
         /// <remarks>
         /// Creates a new empty Python list object.
         /// </remarks>
-
-        public PyList() : base() {
+        public PyList() : base()
+        {
             obj = Runtime.PyList_New(0);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -73,15 +66,17 @@ public PyList() : base() {
         /// <remarks>
         /// Creates a new Python list object from an array of PyObjects.
         /// </remarks>
-
-        public PyList(PyObject[] items) : base() {
+        public PyList(PyObject[] items) : base()
+        {
             int count = items.Length;
             obj = Runtime.PyList_New(count);
-            for (int i = 0; i < count; i++) {
+            for (int i = 0; i < count; i++)
+            {
                 IntPtr ptr = items[i].obj;
                 Runtime.Incref(ptr);
                 int r = Runtime.PyList_SetItem(obj, i, ptr);
-                if (r < 0) {
+                if (r < 0)
+                {
                     throw new PythonException();
                 }
             }
@@ -95,8 +90,8 @@ public PyList(PyObject[] items) : base() {
         /// <remarks>
         /// Returns true if the given object is a Python list.
         /// </remarks>
-
-        public static bool IsListType(PyObject value) {
+        public static bool IsListType(PyObject value)
+        {
             return Runtime.PyList_Check(value.obj);
         }
 
@@ -106,14 +101,15 @@ public static bool IsListType(PyObject value) {
         /// </summary>
         ///
         /// <remarks>
-        /// Converts a Python object to a Python list if possible, raising  
+        /// Converts a Python object to a Python list if possible, raising
         /// a PythonException if the conversion is not possible. This is
         /// equivalent to the Python expression "list(object)".
         /// </remarks>
-
-        public static PyList AsList(PyObject value) {
+        public static PyList AsList(PyObject value)
+        {
             IntPtr op = Runtime.PySequence_List(value.obj);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyList(op);
@@ -127,10 +123,11 @@ public static PyList AsList(PyObject value) {
         /// <remarks>
         /// Append an item to the list object.
         /// </remarks>
-
-        public void Append(PyObject item) {
+        public void Append(PyObject item)
+        {
             int r = Runtime.PyList_Append(obj, item.obj);
-            if (r < 0) {
+            if (r < 0)
+            {
                 throw new PythonException();
             }
         }
@@ -142,10 +139,11 @@ public void Append(PyObject item) {
         /// <remarks>
         /// Insert an item in the list object at the given index.
         /// </remarks>
-
-        public void Insert(int index, PyObject item) {
+        public void Insert(int index, PyObject item)
+        {
             int r = Runtime.PyList_Insert(obj, index, item.obj);
-            if (r < 0) {
+            if (r < 0)
+            {
                 throw new PythonException();
             }
         }
@@ -158,10 +156,11 @@ public void Insert(int index, PyObject item) {
         /// <remarks>
         /// Reverse the order of the list object in place.
         /// </remarks>
-
-        public void Reverse() {
+        public void Reverse()
+        {
             int r = Runtime.PyList_Reverse(obj);
-            if (r < 0) {
+            if (r < 0)
+            {
                 throw new PythonException();
             }
         }
@@ -174,16 +173,13 @@ public void Reverse() {
         /// <remarks>
         /// Sort the list in place.
         /// </remarks>
-
-        public void Sort() {
+        public void Sort()
+        {
             int r = Runtime.PyList_Sort(obj);
-            if (r < 0) {
+            if (r < 0)
+            {
                 throw new PythonException();
             }
         }
-
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pylong.cs b/src/runtime/pylong.cs
index 999c75adc..a68a5bc7a 100644
--- a/src/runtime/pylong.cs
+++ b/src/runtime/pylong.cs
@@ -1,34 +1,25 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Represents a Python long int object. See the documentation at
     /// http://www.python.org/doc/current/api/longObjects.html
     /// </summary>
-
-    public class PyLong : PyNumber {
-
+    public class PyLong : PyNumber
+    {
         /// <summary>
         /// PyLong Constructor
         /// </summary>
         ///
         /// <remarks>
-        /// Creates a new PyLong from an existing object reference. Note 
-        /// that the instance assumes ownership of the object reference. 
-        /// The object reference is not checked for type-correctness. 
+        /// Creates a new PyLong from an existing object reference. Note
+        /// that the instance assumes ownership of the object reference.
+        /// The object reference is not checked for type-correctness.
         /// </remarks>
-
-        public PyLong(IntPtr ptr) : base(ptr) {}
+        public PyLong(IntPtr ptr) : base(ptr)
+        {
+        }
 
 
         /// <summary>
@@ -36,13 +27,14 @@ public PyLong(IntPtr ptr) : base(ptr) {}
         /// </summary>
         ///
         /// <remarks>
-        /// Copy constructor - obtain a PyLong from a generic PyObject. An 
+        /// Copy constructor - obtain a PyLong from a generic PyObject. An
         /// ArgumentException will be thrown if the given object is not a
         /// Python long object.
         /// </remarks>
-
-        public PyLong(PyObject o) : base() {
-            if (!IsLongType(o)) {
+        public PyLong(PyObject o) : base()
+        {
+            if (!IsLongType(o))
+            {
                 throw new ArgumentException("object is not a long");
             }
             Runtime.Incref(o.obj);
@@ -57,10 +49,11 @@ public PyLong(PyObject o) : base() {
         /// <remarks>
         /// Creates a new PyLong from an int32 value.
         /// </remarks>
-
-        public PyLong(int value) : base() {
+        public PyLong(int value) : base()
+        {
             obj = Runtime.PyLong_FromLong((long)value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -73,11 +66,12 @@ public PyLong(int value) : base() {
         /// <remarks>
         /// Creates a new PyLong from a uint32 value.
         /// </remarks>
-
         [CLSCompliant(false)]
-        public PyLong(uint value) : base() {
+        public PyLong(uint value) : base()
+        {
             obj = Runtime.PyLong_FromLong((long)value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -90,10 +84,11 @@ public PyLong(uint value) : base() {
         /// <remarks>
         /// Creates a new PyLong from an int64 value.
         /// </remarks>
-
-        public PyLong(long value) : base() {
+        public PyLong(long value) : base()
+        {
             obj = Runtime.PyLong_FromLongLong(value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -106,11 +101,12 @@ public PyLong(long value) : base() {
         /// <remarks>
         /// Creates a new PyLong from a uint64 value.
         /// </remarks>
-
         [CLSCompliant(false)]
-        public PyLong(ulong value) : base() {
+        public PyLong(ulong value) : base()
+        {
             obj = Runtime.PyLong_FromUnsignedLongLong(value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -123,10 +119,11 @@ public PyLong(ulong value) : base() {
         /// <remarks>
         /// Creates a new PyLong from an int16 value.
         /// </remarks>
-
-        public PyLong(short value) : base() {
+        public PyLong(short value) : base()
+        {
             obj = Runtime.PyLong_FromLong((long)value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -139,11 +136,12 @@ public PyLong(short value) : base() {
         /// <remarks>
         /// Creates a new PyLong from an uint16 value.
         /// </remarks>
-
         [CLSCompliant(false)]
-        public PyLong(ushort value) : base() {
+        public PyLong(ushort value) : base()
+        {
             obj = Runtime.PyLong_FromLong((long)value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -156,10 +154,11 @@ public PyLong(ushort value) : base() {
         /// <remarks>
         /// Creates a new PyLong from a byte value.
         /// </remarks>
-
-        public PyLong(byte value) : base() {
+        public PyLong(byte value) : base()
+        {
             obj = Runtime.PyLong_FromLong((long)value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -172,11 +171,12 @@ public PyLong(byte value) : base() {
         /// <remarks>
         /// Creates a new PyLong from an sbyte value.
         /// </remarks>
-
         [CLSCompliant(false)]
-        public PyLong(sbyte value) : base() {
+        public PyLong(sbyte value) : base()
+        {
             obj = Runtime.PyLong_FromLong((long)value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -189,10 +189,11 @@ public PyLong(sbyte value) : base() {
         /// <remarks>
         /// Creates a new PyLong from an double value.
         /// </remarks>
-
-        public PyLong(double value) : base() {
+        public PyLong(double value) : base()
+        {
             obj = Runtime.PyLong_FromDouble(value);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -205,10 +206,11 @@ public PyLong(double value) : base() {
         /// <remarks>
         /// Creates a new PyLong from a string value.
         /// </remarks>
-
-        public PyLong(string value) : base() {
+        public PyLong(string value) : base()
+        {
             obj = Runtime.PyLong_FromString(value, IntPtr.Zero, 0);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
@@ -221,8 +223,8 @@ public PyLong(string value) : base() {
         /// <remarks>
         /// Returns true if the given object is a Python long.
         /// </remarks>
-
-        public static bool IsLongType(PyObject value) {
+        public static bool IsLongType(PyObject value)
+        {
             return Runtime.PyLong_Check(value.obj);
         }
 
@@ -233,14 +235,15 @@ public static bool IsLongType(PyObject value) {
         ///
         /// <remarks>
         /// <remarks>
-        /// Convert a Python object to a Python long if possible, raising  
+        /// Convert a Python object to a Python long if possible, raising
         /// a PythonException if the conversion is not possible. This is
         /// equivalent to the Python expression "long(object)".
         /// </remarks>
-
-        public static PyLong AsLong(PyObject value) {
+        public static PyLong AsLong(PyObject value)
+        {
             IntPtr op = Runtime.PyNumber_Long(value.obj);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyLong(op);
@@ -253,7 +256,6 @@ public static PyLong AsLong(PyObject value) {
         /// <remarks>
         /// Return the value of the Python long object as an int16.
         /// </remarks>
-
         public short ToInt16()
         {
             return System.Convert.ToInt16(this.ToInt64());
@@ -267,7 +269,6 @@ public short ToInt16()
         /// <remarks>
         /// Return the value of the Python long object as an int32.
         /// </remarks>
-
         public int ToInt32()
         {
             return System.Convert.ToInt32(this.ToInt64());
@@ -281,11 +282,9 @@ public int ToInt32()
         /// <remarks>
         /// Return the value of the Python long object as an int64.
         /// </remarks>
-
         public long ToInt64()
         {
             return Runtime.PyLong_AsLongLong(obj);
         }
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pynumber.cs b/src/runtime/pynumber.cs
index 16927dac3..c8da3e7a6 100644
--- a/src/runtime/pynumber.cs
+++ b/src/runtime/pynumber.cs
@@ -1,27 +1,21 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
-    /// Represents a generic Python number. The methods of this class are 
-    /// equivalent to the Python "abstract number API". See  
+    /// Represents a generic Python number. The methods of this class are
+    /// equivalent to the Python "abstract number API". See
     /// http://www.python.org/doc/current/api/number.html for details.
     /// </summary>
+    public class PyNumber : PyObject
+    {
+        protected PyNumber(IntPtr ptr) : base(ptr)
+        {
+        }
 
-    public class PyNumber : PyObject {
-
-        protected PyNumber(IntPtr ptr) : base(ptr) {}
-
-        protected PyNumber() : base() {}
+        protected PyNumber() : base()
+        {
+        }
 
 
         /// <summary>
@@ -31,17 +25,12 @@ protected PyNumber() : base() {}
         /// <remarks>
         /// Returns true if the given object is a Python numeric type.
         /// </remarks>
-
-        public static bool IsNumberType(PyObject value) {
+        public static bool IsNumberType(PyObject value)
+        {
             return Runtime.PyNumber_Check(value.obj);
         }
 
 
         // TODO: add all of the PyNumber_XXX methods.
-
-
-
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pyobject.cs b/src/runtime/pyobject.cs
index d17e89a7a..42b8d71b4 100644
--- a/src/runtime/pyobject.cs
+++ b/src/runtime/pyobject.cs
@@ -1,1152 +1,1177 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Dynamic;
 using System.Linq.Expressions;
 using System.Collections;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
-    /// Represents a generic Python object. The methods of this class are 
-    /// generally equivalent to the Python "abstract object API". See  
+    /// Represents a generic Python object. The methods of this class are
+    /// generally equivalent to the Python "abstract object API". See
     /// http://www.python.org/doc/current/api/object.html for details.
     /// </summary>
+    public class PyObject : DynamicObject, IDisposable
+    {
+        protected internal IntPtr obj = IntPtr.Zero;
+        private bool disposed = false;
+
+        /// <summary>
+        /// PyObject Constructor
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Creates a new PyObject from an IntPtr object reference. Note that
+        /// the PyObject instance assumes ownership of the object reference
+        /// and the reference will be DECREFed when the PyObject is garbage
+        /// collected or explicitly disposed.
+        /// </remarks>
+        public PyObject(IntPtr ptr)
+        {
+            obj = ptr;
+        }
 
-    public class PyObject : DynamicObject, IDisposable {
-
-    protected internal IntPtr obj = IntPtr.Zero;
-    private bool disposed = false;
-
-    /// <summary>
-    /// PyObject Constructor
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Creates a new PyObject from an IntPtr object reference. Note that
-    /// the PyObject instance assumes ownership of the object reference 
-    /// and the reference will be DECREFed when the PyObject is garbage 
-    /// collected or explicitly disposed.
-    /// </remarks>
-
-    public PyObject(IntPtr ptr) {
-        obj = ptr;
-    }
-
-    // Protected default constructor to allow subclasses to manage
-    // initialization in different ways as appropriate.
-
-    protected PyObject() {}
-
-    // Ensure that encapsulated Python object is decref'ed appropriately
-    // when the managed wrapper is garbage-collected.
+        // Protected default constructor to allow subclasses to manage
+        // initialization in different ways as appropriate.
 
-    ~PyObject() {
-        Dispose();
-    }
+        protected PyObject()
+        {
+        }
 
+        // Ensure that encapsulated Python object is decref'ed appropriately
+        // when the managed wrapper is garbage-collected.
 
-    /// <summary>
-    /// Handle Property
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Gets the native handle of the underlying Python object. This
-    /// value is generally for internal use by the PythonNet runtime. 
-    /// </remarks>
-
-    public IntPtr Handle {
-        get { return obj; }
-    }
+        ~PyObject()
+        {
+            Dispose();
+        }
 
 
-    /// <summary>
-    /// FromManagedObject Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Given an arbitrary managed object, return a Python instance that
-    /// reflects the managed object.
-    /// </remarks>
-
-    public static PyObject FromManagedObject(object ob) {
-        // Special case: if ob is null, we return None.
-        if (ob == null) {
-            Runtime.Incref(Runtime.PyNone);
-            return new PyObject(Runtime.PyNone);
+        /// <summary>
+        /// Handle Property
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Gets the native handle of the underlying Python object. This
+        /// value is generally for internal use by the PythonNet runtime.
+        /// </remarks>
+        public IntPtr Handle
+        {
+            get { return obj; }
         }
-        IntPtr op = CLRObject.GetInstHandle(ob);
-        return new PyObject(op);
-    }
 
 
-    /// <summary>
-    /// AsManagedObject Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return a managed object of the given type, based on the 
-    /// value of the Python object.
-    /// </remarks>
-
-    public object AsManagedObject(Type t) {
-        Object result;
-        if (!Converter.ToManaged(this.obj, t, out result, false)) {
-            throw new InvalidCastException("cannot convert object to target type");
+        /// <summary>
+        /// FromManagedObject Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Given an arbitrary managed object, return a Python instance that
+        /// reflects the managed object.
+        /// </remarks>
+        public static PyObject FromManagedObject(object ob)
+        {
+            // Special case: if ob is null, we return None.
+            if (ob == null)
+            {
+                Runtime.Incref(Runtime.PyNone);
+                return new PyObject(Runtime.PyNone);
+            }
+            IntPtr op = CLRObject.GetInstHandle(ob);
+            return new PyObject(op);
         }
-        return result;
-    }
 
 
-    /// <summary>
-    /// Dispose Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// The Dispose method provides a way to explicitly release the 
-    /// Python object represented by a PyObject instance. It is a good
-    /// idea to call Dispose on PyObjects that wrap resources that are 
-    /// limited or need strict lifetime control. Otherwise, references 
-    /// to Python objects will not be released until a managed garbage 
-    /// collection occurs.
-    /// </remarks>
-
-    protected virtual void Dispose(bool disposing) {
-        if (!disposed) {
-            if (Runtime.Py_IsInitialized() > 0) {
-                IntPtr gs = PythonEngine.AcquireLock();
-                Runtime.Decref(obj);
-                obj = IntPtr.Zero;
-                PythonEngine.ReleaseLock(gs);
+        /// <summary>
+        /// AsManagedObject Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return a managed object of the given type, based on the
+        /// value of the Python object.
+        /// </remarks>
+        public object AsManagedObject(Type t)
+        {
+            Object result;
+            if (!Converter.ToManaged(this.obj, t, out result, false))
+            {
+                throw new InvalidCastException("cannot convert object to target type");
             }
-            disposed = true;
+            return result;
         }
-    }
-
-    public void Dispose() {
-        Dispose(true);
-        GC.SuppressFinalize(this);
-    }
 
 
-    /// <summary>
-    /// GetPythonType Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the Python type of the object. This method is equivalent
-    /// to the Python expression: type(object).
-    /// </remarks>
-
-    public PyObject GetPythonType() {
-        IntPtr tp = Runtime.PyObject_Type(obj);
-        return new PyObject(tp);
-    }
+        /// <summary>
+        /// Dispose Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// The Dispose method provides a way to explicitly release the
+        /// Python object represented by a PyObject instance. It is a good
+        /// idea to call Dispose on PyObjects that wrap resources that are
+        /// limited or need strict lifetime control. Otherwise, references
+        /// to Python objects will not be released until a managed garbage
+        /// collection occurs.
+        /// </remarks>
+        protected virtual void Dispose(bool disposing)
+        {
+            if (!disposed)
+            {
+                if (Runtime.Py_IsInitialized() > 0)
+                {
+                    IntPtr gs = PythonEngine.AcquireLock();
+                    Runtime.Decref(obj);
+                    obj = IntPtr.Zero;
+                    PythonEngine.ReleaseLock(gs);
+                }
+                disposed = true;
+            }
+        }
 
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
 
-    /// <summary>
-    /// TypeCheck Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns true if the object o is of type typeOrClass or a subtype 
-    /// of typeOrClass.
-    /// </remarks>
-
-    public bool TypeCheck(PyObject typeOrClass) {
-        return Runtime.PyObject_TypeCheck(obj, typeOrClass.obj);
-    }
 
+        /// <summary>
+        /// GetPythonType Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the Python type of the object. This method is equivalent
+        /// to the Python expression: type(object).
+        /// </remarks>
+        public PyObject GetPythonType()
+        {
+            IntPtr tp = Runtime.PyObject_Type(obj);
+            return new PyObject(tp);
+        }
 
-    /// <summary>
-    /// HasAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns true if the object has an attribute with the given name.
-    /// </remarks>
 
-    public bool HasAttr(string name) {
-        return (Runtime.PyObject_HasAttrString(obj, name) != 0);
-    }
+        /// <summary>
+        /// TypeCheck Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns true if the object o is of type typeOrClass or a subtype
+        /// of typeOrClass.
+        /// </remarks>
+        public bool TypeCheck(PyObject typeOrClass)
+        {
+            return Runtime.PyObject_TypeCheck(obj, typeOrClass.obj);
+        }
 
 
-    /// <summary>
-    /// HasAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns true if the object has an attribute with the given name,
-    /// where name is a PyObject wrapping a string or unicode object.
-    /// </remarks>
-
-    public bool HasAttr(PyObject name) {
-        return (Runtime.PyObject_HasAttr(obj, name.obj) != 0);
-    }
+        /// <summary>
+        /// HasAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns true if the object has an attribute with the given name.
+        /// </remarks>
+        public bool HasAttr(string name)
+        {
+            return (Runtime.PyObject_HasAttrString(obj, name) != 0);
+        }
 
 
-    /// <summary>
-    /// GetAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the named attribute of the Python object, or raises a 
-    /// PythonException if the attribute access fails.
-    /// </remarks>
-
-    public PyObject GetAttr(string name) {
-        IntPtr op = Runtime.PyObject_GetAttrString(obj, name);
-        if (op == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// HasAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns true if the object has an attribute with the given name,
+        /// where name is a PyObject wrapping a string or unicode object.
+        /// </remarks>
+        public bool HasAttr(PyObject name)
+        {
+            return (Runtime.PyObject_HasAttr(obj, name.obj) != 0);
         }
-        return new PyObject(op);
-    }
 
 
-    /// <summary>
-    /// GetAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the named attribute of the Python object, or the given
-    /// default object if the attribute access fails.
-    /// </remarks>
-
-    public PyObject GetAttr(string name, PyObject _default) {
-        IntPtr op = Runtime.PyObject_GetAttrString(obj, name);
-        if (op == IntPtr.Zero) {
-            Runtime.PyErr_Clear();
-            return _default;
+        /// <summary>
+        /// GetAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the named attribute of the Python object, or raises a
+        /// PythonException if the attribute access fails.
+        /// </remarks>
+        public PyObject GetAttr(string name)
+        {
+            IntPtr op = Runtime.PyObject_GetAttrString(obj, name);
+            if (op == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyObject(op);
         }
-        return new PyObject(op);
-    }
 
 
-    /// <summary>
-    /// GetAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the named attribute of the Python object or raises a 
-    /// PythonException if the attribute access fails. The name argument 
-    /// is a PyObject wrapping a Python string or unicode object.
-    /// </remarks>
-
-    public PyObject GetAttr(PyObject name) {
-        IntPtr op = Runtime.PyObject_GetAttr(obj, name.obj);
-        if (op == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// GetAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the named attribute of the Python object, or the given
+        /// default object if the attribute access fails.
+        /// </remarks>
+        public PyObject GetAttr(string name, PyObject _default)
+        {
+            IntPtr op = Runtime.PyObject_GetAttrString(obj, name);
+            if (op == IntPtr.Zero)
+            {
+                Runtime.PyErr_Clear();
+                return _default;
+            }
+            return new PyObject(op);
         }
-        return new PyObject(op);
-    }
 
 
-    /// <summary>
-    /// GetAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the named attribute of the Python object, or the given
-    /// default object if the attribute access fails. The name argument 
-    /// is a PyObject wrapping a Python string or unicode object.
-    /// </remarks>
-
-    public PyObject GetAttr(PyObject name, PyObject _default) {
-        IntPtr op = Runtime.PyObject_GetAttr(obj, name.obj);
-        if (op == IntPtr.Zero) {
-            Runtime.PyErr_Clear();
-            return _default;
+        /// <summary>
+        /// GetAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the named attribute of the Python object or raises a
+        /// PythonException if the attribute access fails. The name argument
+        /// is a PyObject wrapping a Python string or unicode object.
+        /// </remarks>
+        public PyObject GetAttr(PyObject name)
+        {
+            IntPtr op = Runtime.PyObject_GetAttr(obj, name.obj);
+            if (op == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyObject(op);
         }
-        return new PyObject(op);
-    }
 
 
-    /// <summary>
-    /// SetAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Set an attribute of the object with the given name and value. This
-    /// method throws a PythonException if the attribute set fails.
-    /// </remarks>
-
-    public void SetAttr(string name, PyObject value) {
-        int r = Runtime.PyObject_SetAttrString(obj, name, value.obj);
-        if (r < 0) {
-            throw new PythonException();
+        /// <summary>
+        /// GetAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the named attribute of the Python object, or the given
+        /// default object if the attribute access fails. The name argument
+        /// is a PyObject wrapping a Python string or unicode object.
+        /// </remarks>
+        public PyObject GetAttr(PyObject name, PyObject _default)
+        {
+            IntPtr op = Runtime.PyObject_GetAttr(obj, name.obj);
+            if (op == IntPtr.Zero)
+            {
+                Runtime.PyErr_Clear();
+                return _default;
+            }
+            return new PyObject(op);
         }
-    }
 
 
-    /// <summary>
-    /// SetAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Set an attribute of the object with the given name and value, 
-    /// where the name is a Python string or unicode object. This method
-    /// throws a PythonException if the attribute set fails.
-    /// </remarks>
-
-    public void SetAttr(PyObject name, PyObject value) {
-        int r = Runtime.PyObject_SetAttr(obj, name.obj, value.obj);
-        if (r < 0) {
-            throw new PythonException();
+        /// <summary>
+        /// SetAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Set an attribute of the object with the given name and value. This
+        /// method throws a PythonException if the attribute set fails.
+        /// </remarks>
+        public void SetAttr(string name, PyObject value)
+        {
+            int r = Runtime.PyObject_SetAttrString(obj, name, value.obj);
+            if (r < 0)
+            {
+                throw new PythonException();
+            }
         }
-    }
 
 
-    /// <summary>
-    /// DelAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Delete the named attribute of the Python object. This method
-    /// throws a PythonException if the attribute set fails.
-    /// </remarks>
-
-    public void DelAttr(string name) {
-        int r = Runtime.PyObject_SetAttrString(obj, name, IntPtr.Zero);
-        if (r < 0) {
-            throw new PythonException();
+        /// <summary>
+        /// SetAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Set an attribute of the object with the given name and value,
+        /// where the name is a Python string or unicode object. This method
+        /// throws a PythonException if the attribute set fails.
+        /// </remarks>
+        public void SetAttr(PyObject name, PyObject value)
+        {
+            int r = Runtime.PyObject_SetAttr(obj, name.obj, value.obj);
+            if (r < 0)
+            {
+                throw new PythonException();
+            }
         }
-    }
 
 
-    /// <summary>
-    /// DelAttr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Delete the named attribute of the Python object, where name is a 
-    /// PyObject wrapping a Python string or unicode object. This method 
-    /// throws a PythonException if the attribute set fails.
-    /// </remarks>
-
-    public void DelAttr(PyObject name) {
-        int r = Runtime.PyObject_SetAttr(obj, name.obj, IntPtr.Zero);
-        if (r < 0) {
-            throw new PythonException();
+        /// <summary>
+        /// DelAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Delete the named attribute of the Python object. This method
+        /// throws a PythonException if the attribute set fails.
+        /// </remarks>
+        public void DelAttr(string name)
+        {
+            int r = Runtime.PyObject_SetAttrString(obj, name, IntPtr.Zero);
+            if (r < 0)
+            {
+                throw new PythonException();
+            }
         }
-    }
 
 
-    /// <summary>
-    /// GetItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// return the item at the given object index. This method raises a 
-    /// PythonException if the indexing operation fails.
-    /// </remarks>
-
-    public virtual PyObject GetItem(PyObject key) {
-        IntPtr op = Runtime.PyObject_GetItem(obj, key.obj);
-        if (op == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// DelAttr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Delete the named attribute of the Python object, where name is a
+        /// PyObject wrapping a Python string or unicode object. This method
+        /// throws a PythonException if the attribute set fails.
+        /// </remarks>
+        public void DelAttr(PyObject name)
+        {
+            int r = Runtime.PyObject_SetAttr(obj, name.obj, IntPtr.Zero);
+            if (r < 0)
+            {
+                throw new PythonException();
+            }
         }
-        return new PyObject(op);
-    }
 
 
-    /// <summary>
-    /// GetItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// return the item at the given string index. This method raises a 
-    /// PythonException if the indexing operation fails.
-    /// </remarks>
-
-    public virtual PyObject GetItem(string key) {
-        using (PyString pyKey = new PyString(key)) {
-            return GetItem(pyKey);
+        /// <summary>
+        /// GetItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// return the item at the given object index. This method raises a
+        /// PythonException if the indexing operation fails.
+        /// </remarks>
+        public virtual PyObject GetItem(PyObject key)
+        {
+            IntPtr op = Runtime.PyObject_GetItem(obj, key.obj);
+            if (op == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyObject(op);
         }
-    }
 
 
-    /// <summary>
-    /// GetItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// return the item at the given numeric index. This method raises a 
-    /// PythonException if the indexing operation fails.
-    /// </remarks>
-
-    public virtual PyObject GetItem(int index) {
-        using (PyInt key = new PyInt(index)) {
-            return GetItem((PyObject)key);
+        /// <summary>
+        /// GetItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// return the item at the given string index. This method raises a
+        /// PythonException if the indexing operation fails.
+        /// </remarks>
+        public virtual PyObject GetItem(string key)
+        {
+            using (PyString pyKey = new PyString(key))
+            {
+                return GetItem(pyKey);
+            }
         }
-    }
 
 
-    /// <summary>
-    /// SetItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// set the item at the given object index to the given value. This 
-    /// method raises a PythonException if the set operation fails.
-    /// </remarks>
-
-    public virtual void SetItem(PyObject key, PyObject value) {
-        int r = Runtime.PyObject_SetItem(obj, key.obj, value.obj);
-        if (r < 0) {
-            throw new PythonException();
+        /// <summary>
+        /// GetItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// return the item at the given numeric index. This method raises a
+        /// PythonException if the indexing operation fails.
+        /// </remarks>
+        public virtual PyObject GetItem(int index)
+        {
+            using (PyInt key = new PyInt(index))
+            {
+                return GetItem((PyObject)key);
+            }
         }
-    }
 
 
-    /// <summary>
-    /// SetItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// set the item at the given string index to the given value. This 
-    /// method raises a PythonException if the set operation fails.
-    /// </remarks>
-
-    public virtual void SetItem(string key, PyObject value) {
-        using (PyString pyKey = new PyString(key)) {
-            SetItem(pyKey, value);
+        /// <summary>
+        /// SetItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// set the item at the given object index to the given value. This
+        /// method raises a PythonException if the set operation fails.
+        /// </remarks>
+        public virtual void SetItem(PyObject key, PyObject value)
+        {
+            int r = Runtime.PyObject_SetItem(obj, key.obj, value.obj);
+            if (r < 0)
+            {
+                throw new PythonException();
+            }
         }
-    }
 
 
-    /// <summary>
-    /// SetItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// set the item at the given numeric index to the given value. This 
-    /// method raises a PythonException if the set operation fails.
-    /// </remarks>
-
-    public virtual void SetItem(int index, PyObject value) {
-        using (PyInt pyindex = new PyInt(index)) {
-            SetItem(pyindex, value);
+        /// <summary>
+        /// SetItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// set the item at the given string index to the given value. This
+        /// method raises a PythonException if the set operation fails.
+        /// </remarks>
+        public virtual void SetItem(string key, PyObject value)
+        {
+            using (PyString pyKey = new PyString(key))
+            {
+                SetItem(pyKey, value);
+            }
         }
-    }
 
 
-    /// <summary>
-    /// DelItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// delete the item at the given object index. This method raises a 
-    /// PythonException if the delete operation fails.
-    /// </remarks>
-
-    public virtual void DelItem(PyObject key) {
-        int r = Runtime.PyObject_DelItem(obj, key.obj);
-        if (r < 0) {
-            throw new PythonException();
+        /// <summary>
+        /// SetItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// set the item at the given numeric index to the given value. This
+        /// method raises a PythonException if the set operation fails.
+        /// </remarks>
+        public virtual void SetItem(int index, PyObject value)
+        {
+            using (PyInt pyindex = new PyInt(index))
+            {
+                SetItem(pyindex, value);
+            }
         }
-    }
 
 
-    /// <summary>
-    /// DelItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// delete the item at the given string index. This method raises a 
-    /// PythonException if the delete operation fails.
-    /// </remarks>
-
-    public virtual void DelItem(string key) {
-        using (PyString pyKey = new PyString(key)) {
-            DelItem(pyKey);
+        /// <summary>
+        /// DelItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// delete the item at the given object index. This method raises a
+        /// PythonException if the delete operation fails.
+        /// </remarks>
+        public virtual void DelItem(PyObject key)
+        {
+            int r = Runtime.PyObject_DelItem(obj, key.obj);
+            if (r < 0)
+            {
+                throw new PythonException();
+            }
         }
-    }
 
 
-    /// <summary>
-    /// DelItem Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// For objects that support the Python sequence or mapping protocols,
-    /// delete the item at the given numeric index. This method raises a 
-    /// PythonException if the delete operation fails.
-    /// </remarks>
-
-    public virtual void DelItem(int index) {
-        using (PyInt pyindex = new PyInt(index)) {
-            DelItem(pyindex);
+        /// <summary>
+        /// DelItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// delete the item at the given string index. This method raises a
+        /// PythonException if the delete operation fails.
+        /// </remarks>
+        public virtual void DelItem(string key)
+        {
+            using (PyString pyKey = new PyString(key))
+            {
+                DelItem(pyKey);
+            }
         }
-    }
 
 
-    /// <summary>
-    /// Length Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the length for objects that support the Python sequence 
-    /// protocol, or 0 if the object does not support the protocol.
-    /// </remarks>
-
-    public virtual int Length() {
-        int s = Runtime.PyObject_Size(obj);
-        if (s < 0) {
-            Runtime.PyErr_Clear();
-            return 0;
+        /// <summary>
+        /// DelItem Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// For objects that support the Python sequence or mapping protocols,
+        /// delete the item at the given numeric index. This method raises a
+        /// PythonException if the delete operation fails.
+        /// </remarks>
+        public virtual void DelItem(int index)
+        {
+            using (PyInt pyindex = new PyInt(index))
+            {
+                DelItem(pyindex);
+            }
         }
-        return s;
-    }
 
 
-    /// <summary>
-    /// String Indexer
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Provides a shorthand for the string versions of the GetItem and 
-    /// SetItem methods.
-    /// </remarks>
-
-    public virtual PyObject this[string key] {
-        get { return GetItem(key); }
-        set { SetItem(key, value); }
-    }
+        /// <summary>
+        /// Length Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the length for objects that support the Python sequence
+        /// protocol, or 0 if the object does not support the protocol.
+        /// </remarks>
+        public virtual int Length()
+        {
+            int s = Runtime.PyObject_Size(obj);
+            if (s < 0)
+            {
+                Runtime.PyErr_Clear();
+                return 0;
+            }
+            return s;
+        }
 
 
-    /// <summary>
-    /// PyObject Indexer
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Provides a shorthand for the object versions of the GetItem and 
-    /// SetItem methods.
-    /// </remarks>
-
-    public virtual PyObject this[PyObject key] {
-        get { return GetItem(key); }
-        set { SetItem(key, value); }
-    }
+        /// <summary>
+        /// String Indexer
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Provides a shorthand for the string versions of the GetItem and
+        /// SetItem methods.
+        /// </remarks>
+        public virtual PyObject this[string key]
+        {
+            get { return GetItem(key); }
+            set { SetItem(key, value); }
+        }
 
 
-    /// <summary>
-    /// Numeric Indexer
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Provides a shorthand for the numeric versions of the GetItem and 
-    /// SetItem methods.
-    /// </remarks>
-
-    public virtual PyObject this[int index] {
-        get { return GetItem(index); }
-        set { SetItem(index, value); }
-    }
+        /// <summary>
+        /// PyObject Indexer
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Provides a shorthand for the object versions of the GetItem and
+        /// SetItem methods.
+        /// </remarks>
+        public virtual PyObject this[PyObject key]
+        {
+            get { return GetItem(key); }
+            set { SetItem(key, value); }
+        }
 
 
-    /// <summary>
-    /// GetIterator Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return a new (Python) iterator for the object. This is equivalent
-    /// to the Python expression "iter(object)". A PythonException will be 
-    /// raised if the object cannot be iterated.
-    /// </remarks>
-
-    public PyObject GetIterator() {
-        IntPtr r = Runtime.PyObject_GetIter(obj);
-        if (r == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// Numeric Indexer
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Provides a shorthand for the numeric versions of the GetItem and
+        /// SetItem methods.
+        /// </remarks>
+        public virtual PyObject this[int index]
+        {
+            get { return GetItem(index); }
+            set { SetItem(index, value); }
         }
-        return new PyObject(r);
-    }
-
-    /// <summary>
-    /// GetEnumerator Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return a new PyIter object for the object. This allows any iterable
-    /// python object to be iterated over in C#. A PythonException will be
-    /// raised if the object is not iterable.
-    /// </remarks>
-
-    public IEnumerator GetEnumerator()
-    {
-        return new PyIter(this);
-    }
 
 
-    /// <summary>
-    /// Invoke Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Invoke the callable object with the given arguments, passed as a
-    /// PyObject[]. A PythonException is raised if the invokation fails.
-    /// </remarks>
-
-    public PyObject Invoke(params PyObject[] args) {
-        PyTuple t = new PyTuple(args);
-        IntPtr r = Runtime.PyObject_Call(obj, t.obj, IntPtr.Zero);
-        t.Dispose();
-        if (r == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// GetIterator Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return a new (Python) iterator for the object. This is equivalent
+        /// to the Python expression "iter(object)". A PythonException will be
+        /// raised if the object cannot be iterated.
+        /// </remarks>
+        public PyObject GetIterator()
+        {
+            IntPtr r = Runtime.PyObject_GetIter(obj);
+            if (r == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyObject(r);
         }
-        return new PyObject(r);
-    }
-
 
-    /// <summary>
-    /// Invoke Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Invoke the callable object with the given arguments, passed as a
-    /// Python tuple. A PythonException is raised if the invokation fails.
-    /// </remarks>
-
-    public PyObject Invoke(PyTuple args) {
-        IntPtr r = Runtime.PyObject_Call(obj, args.obj, IntPtr.Zero);
-        if (r == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// GetEnumerator Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return a new PyIter object for the object. This allows any iterable
+        /// python object to be iterated over in C#. A PythonException will be
+        /// raised if the object is not iterable.
+        /// </remarks>
+        public IEnumerator GetEnumerator()
+        {
+            return new PyIter(this);
         }
-        return new PyObject(r);
-    }
 
 
-    /// <summary>
-    /// Invoke Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Invoke the callable object with the given positional and keyword
-    /// arguments. A PythonException is raised if the invokation fails.
-    /// </remarks>
-
-    public PyObject Invoke(PyObject[] args, PyDict kw) {
-        PyTuple t = new PyTuple(args);
-        IntPtr r = Runtime.PyObject_Call(obj, t.obj, kw != null ? kw.obj : IntPtr.Zero);
-        t.Dispose();
-        if (r == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// Invoke Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Invoke the callable object with the given arguments, passed as a
+        /// PyObject[]. A PythonException is raised if the invokation fails.
+        /// </remarks>
+        public PyObject Invoke(params PyObject[] args)
+        {
+            PyTuple t = new PyTuple(args);
+            IntPtr r = Runtime.PyObject_Call(obj, t.obj, IntPtr.Zero);
+            t.Dispose();
+            if (r == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyObject(r);
         }
-        return new PyObject(r);
-    }
 
 
-    /// <summary>
-    /// Invoke Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Invoke the callable object with the given positional and keyword
-    /// arguments. A PythonException is raised if the invokation fails.
-    /// </remarks>
-
-    public PyObject Invoke(PyTuple args, PyDict kw) {
-        IntPtr r = Runtime.PyObject_Call(obj, args.obj, kw != null ? kw.obj : IntPtr.Zero);
-        if (r == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// Invoke Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Invoke the callable object with the given arguments, passed as a
+        /// Python tuple. A PythonException is raised if the invokation fails.
+        /// </remarks>
+        public PyObject Invoke(PyTuple args)
+        {
+            IntPtr r = Runtime.PyObject_Call(obj, args.obj, IntPtr.Zero);
+            if (r == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyObject(r);
         }
-        return new PyObject(r);
-    }
 
 
-    /// <summary>
-    /// InvokeMethod Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Invoke the named method of the object with the given arguments.
-    /// A PythonException is raised if the invokation is unsuccessful.
-    /// </remarks>
-
-    public PyObject InvokeMethod(string name, params PyObject[] args) {
-        PyObject method = GetAttr(name);
-        PyObject result = method.Invoke(args);
-        method.Dispose();
-        return result;
-    }
+        /// <summary>
+        /// Invoke Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Invoke the callable object with the given positional and keyword
+        /// arguments. A PythonException is raised if the invokation fails.
+        /// </remarks>
+        public PyObject Invoke(PyObject[] args, PyDict kw)
+        {
+            PyTuple t = new PyTuple(args);
+            IntPtr r = Runtime.PyObject_Call(obj, t.obj, kw != null ? kw.obj : IntPtr.Zero);
+            t.Dispose();
+            if (r == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyObject(r);
+        }
 
 
-    /// <summary>
-    /// InvokeMethod Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Invoke the named method of the object with the given arguments.
-    /// A PythonException is raised if the invokation is unsuccessful.
-    /// </remarks>
-
-    public PyObject InvokeMethod(string name, PyTuple args) {
-        PyObject method = GetAttr(name);
-        PyObject result = method.Invoke(args);
-        method.Dispose();
-        return result;
-    }
+        /// <summary>
+        /// Invoke Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Invoke the callable object with the given positional and keyword
+        /// arguments. A PythonException is raised if the invokation fails.
+        /// </remarks>
+        public PyObject Invoke(PyTuple args, PyDict kw)
+        {
+            IntPtr r = Runtime.PyObject_Call(obj, args.obj, kw != null ? kw.obj : IntPtr.Zero);
+            if (r == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyObject(r);
+        }
 
 
-    /// <summary>
-    /// InvokeMethod Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Invoke the named method of the object with the given arguments 
-    /// and keyword arguments. Keyword args are passed as a PyDict object.
-    /// A PythonException is raised if the invokation is unsuccessful.
-    /// </remarks>
-
-    public PyObject InvokeMethod(string name, PyObject[] args, PyDict kw) {
-        PyObject method = GetAttr(name);
-        PyObject result = method.Invoke(args, kw);
-        method.Dispose();
-        return result;
-    }
+        /// <summary>
+        /// InvokeMethod Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Invoke the named method of the object with the given arguments.
+        /// A PythonException is raised if the invokation is unsuccessful.
+        /// </remarks>
+        public PyObject InvokeMethod(string name, params PyObject[] args)
+        {
+            PyObject method = GetAttr(name);
+            PyObject result = method.Invoke(args);
+            method.Dispose();
+            return result;
+        }
 
 
-    /// <summary>
-    /// InvokeMethod Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Invoke the named method of the object with the given arguments 
-    /// and keyword arguments. Keyword args are passed as a PyDict object.
-    /// A PythonException is raised if the invokation is unsuccessful.
-    /// </remarks>
-
-    public PyObject InvokeMethod(string name, PyTuple args, PyDict kw) {
-        PyObject method = GetAttr(name);
-        PyObject result = method.Invoke(args, kw);
-        method.Dispose();
-        return result;
-    }
+        /// <summary>
+        /// InvokeMethod Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Invoke the named method of the object with the given arguments.
+        /// A PythonException is raised if the invokation is unsuccessful.
+        /// </remarks>
+        public PyObject InvokeMethod(string name, PyTuple args)
+        {
+            PyObject method = GetAttr(name);
+            PyObject result = method.Invoke(args);
+            method.Dispose();
+            return result;
+        }
 
 
-    /// <summary>
-    /// IsInstance Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return true if the object is an instance of the given Python type
-    /// or class. This method always succeeds.
-    /// </remarks>
-
-    public bool IsInstance(PyObject typeOrClass) {
-        int r = Runtime.PyObject_IsInstance(obj, typeOrClass.obj);
-        if (r < 0) {
-            Runtime.PyErr_Clear();
-            return false;
+        /// <summary>
+        /// InvokeMethod Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Invoke the named method of the object with the given arguments
+        /// and keyword arguments. Keyword args are passed as a PyDict object.
+        /// A PythonException is raised if the invokation is unsuccessful.
+        /// </remarks>
+        public PyObject InvokeMethod(string name, PyObject[] args, PyDict kw)
+        {
+            PyObject method = GetAttr(name);
+            PyObject result = method.Invoke(args, kw);
+            method.Dispose();
+            return result;
         }
-        return (r != 0);
-    }
 
 
-    /// <summary>
-    /// IsSubclass Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return true if the object is identical to or derived from the 
-    /// given Python type or class. This method always succeeds.
-    /// </remarks>
-
-    public bool IsSubclass(PyObject typeOrClass) {
-        int r = Runtime.PyObject_IsSubclass(obj, typeOrClass.obj);
-        if (r < 0) {
-            Runtime.PyErr_Clear();
-            return false;
+        /// <summary>
+        /// InvokeMethod Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Invoke the named method of the object with the given arguments
+        /// and keyword arguments. Keyword args are passed as a PyDict object.
+        /// A PythonException is raised if the invokation is unsuccessful.
+        /// </remarks>
+        public PyObject InvokeMethod(string name, PyTuple args, PyDict kw)
+        {
+            PyObject method = GetAttr(name);
+            PyObject result = method.Invoke(args, kw);
+            method.Dispose();
+            return result;
         }
-        return (r != 0);
-    }
 
 
-    /// <summary>
-    /// IsCallable Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns true if the object is a callable object. This method 
-    /// always succeeds.
-    /// </remarks>
-
-    public bool IsCallable() {
-        return (Runtime.PyCallable_Check(obj) != 0);
-    }
+        /// <summary>
+        /// IsInstance Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return true if the object is an instance of the given Python type
+        /// or class. This method always succeeds.
+        /// </remarks>
+        public bool IsInstance(PyObject typeOrClass)
+        {
+            int r = Runtime.PyObject_IsInstance(obj, typeOrClass.obj);
+            if (r < 0)
+            {
+                Runtime.PyErr_Clear();
+                return false;
+            }
+            return (r != 0);
+        }
 
 
-    /// <summary>
-    /// IsIterable Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns true if the object is iterable object. This method 
-    /// always succeeds.
-    /// </remarks>
+        /// <summary>
+        /// IsSubclass Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return true if the object is identical to or derived from the
+        /// given Python type or class. This method always succeeds.
+        /// </remarks>
+        public bool IsSubclass(PyObject typeOrClass)
+        {
+            int r = Runtime.PyObject_IsSubclass(obj, typeOrClass.obj);
+            if (r < 0)
+            {
+                Runtime.PyErr_Clear();
+                return false;
+            }
+            return (r != 0);
+        }
 
-    public bool IsIterable()
-    {
-        return Runtime.PyIter_Check(obj);
-    }
 
+        /// <summary>
+        /// IsCallable Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns true if the object is a callable object. This method
+        /// always succeeds.
+        /// </remarks>
+        public bool IsCallable()
+        {
+            return (Runtime.PyCallable_Check(obj) != 0);
+        }
 
 
-    /// <summary>
-    /// IsTrue Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return true if the object is true according to Python semantics.
-    /// This method always succeeds.
-    /// </remarks>
-
-    public bool IsTrue() {
-        return (Runtime.PyObject_IsTrue(obj) != 0);
-    }
+        /// <summary>
+        /// IsIterable Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns true if the object is iterable object. This method
+        /// always succeeds.
+        /// </remarks>
+        public bool IsIterable()
+        {
+            return Runtime.PyIter_Check(obj);
+        }
 
 
-    /// <summary>
-    /// Dir Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return a list of the names of the attributes of the object. This
-    /// is equivalent to the Python expression "dir(object)".
-    /// </remarks>
-
-    public PyList Dir() {
-        IntPtr r = Runtime.PyObject_Dir(obj);
-        if (r == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// IsTrue Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return true if the object is true according to Python semantics.
+        /// This method always succeeds.
+        /// </remarks>
+        public bool IsTrue()
+        {
+            return (Runtime.PyObject_IsTrue(obj) != 0);
         }
-        return new PyList(r);
-    }
 
 
-    /// <summary>
-    /// Repr Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return a string representation of the object. This method is 
-    /// the managed equivalent of the Python expression "repr(object)".
-    /// </remarks>
-
-    public string Repr() {
-        IntPtr strval = Runtime.PyObject_Repr(obj);
-        string result = Runtime.GetManagedString(strval);
-        Runtime.Decref(strval);
-        return result;
-    }
+        /// <summary>
+        /// Dir Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return a list of the names of the attributes of the object. This
+        /// is equivalent to the Python expression "dir(object)".
+        /// </remarks>
+        public PyList Dir()
+        {
+            IntPtr r = Runtime.PyObject_Dir(obj);
+            if (r == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+            return new PyList(r);
+        }
 
 
-    /// <summary>
-    /// ToString Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return the string representation of the object. This method is 
-    /// the managed equivalent of the Python expression "str(object)".
-    /// </remarks>
-
-    public override string ToString() {
-        IntPtr strval = Runtime.PyObject_Unicode(obj);
-        string result = Runtime.GetManagedString(strval);
-        Runtime.Decref(strval);
-        return result;
-    }
+        /// <summary>
+        /// Repr Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return a string representation of the object. This method is
+        /// the managed equivalent of the Python expression "repr(object)".
+        /// </remarks>
+        public string Repr()
+        {
+            IntPtr strval = Runtime.PyObject_Repr(obj);
+            string result = Runtime.GetManagedString(strval);
+            Runtime.Decref(strval);
+            return result;
+        }
 
 
-    /// <summary>
-    /// Equals Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return true if this object is equal to the given object. This
-    /// method is based on Python equality semantics.
-    /// </remarks>
-
-    public override bool Equals(object o) {
-        if (!(o is PyObject)) {
-            return false;
-        }
-        if (obj == ((PyObject) o).obj) {
-            return true;
-        }
-        int r = Runtime.PyObject_Compare(obj, ((PyObject) o).obj);
-        if (Exceptions.ErrorOccurred()) {
-            throw new PythonException();
+        /// <summary>
+        /// ToString Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return the string representation of the object. This method is
+        /// the managed equivalent of the Python expression "str(object)".
+        /// </remarks>
+        public override string ToString()
+        {
+            IntPtr strval = Runtime.PyObject_Unicode(obj);
+            string result = Runtime.GetManagedString(strval);
+            Runtime.Decref(strval);
+            return result;
         }
-        return (r == 0);
-    }
-
 
-    /// <summary>
-    /// GetHashCode Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Return a hashcode based on the Python object. This returns the
-    /// hash as computed by Python, equivalent to the Python expression
-    /// "hash(obj)".
-    /// </remarks>
-
-    public override int GetHashCode() {
-        return Runtime.PyObject_Hash(obj).ToInt32();
-    }
 
-    public override bool TryGetMember(GetMemberBinder binder, out object result)
-    {
-        if (this.HasAttr(binder.Name))
+        /// <summary>
+        /// Equals Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return true if this object is equal to the given object. This
+        /// method is based on Python equality semantics.
+        /// </remarks>
+        public override bool Equals(object o)
         {
-            result = this.GetAttr(binder.Name);
-            return true;
+            if (!(o is PyObject))
+            {
+                return false;
+            }
+            if (obj == ((PyObject)o).obj)
+            {
+                return true;
+            }
+            int r = Runtime.PyObject_Compare(obj, ((PyObject)o).obj);
+            if (Exceptions.ErrorOccurred())
+            {
+                throw new PythonException();
+            }
+            return (r == 0);
         }
-        else
-            return base.TryGetMember(binder, out result);
-    }
 
-    public override bool TrySetMember(SetMemberBinder binder, object value)
-    {
-        if (this.HasAttr(binder.Name))
+
+        /// <summary>
+        /// GetHashCode Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Return a hashcode based on the Python object. This returns the
+        /// hash as computed by Python, equivalent to the Python expression
+        /// "hash(obj)".
+        /// </remarks>
+        public override int GetHashCode()
         {
-            this.SetAttr(binder.Name, (PyObject)value);
-            return true;
+            return Runtime.PyObject_Hash(obj).ToInt32();
         }
-        else
-            return base.TrySetMember(binder, value);
-    }
 
-    private void GetArgs(object[] inargs, out PyTuple args, out PyDict kwargs)
-    {
-        int arg_count;
-        for (arg_count = 0; arg_count < inargs.Length && !(inargs[arg_count] is Py.KeywordArguments); ++arg_count);
-        IntPtr argtuple = Runtime.PyTuple_New(arg_count);
-        for (int i = 0; i < arg_count; i++)
+        public override bool TryGetMember(GetMemberBinder binder, out object result)
         {
-            IntPtr ptr;
-            if (inargs[i] is PyObject)
+            if (this.HasAttr(binder.Name))
             {
-                ptr = ((PyObject)inargs[i]).Handle;
-                Runtime.Incref(ptr);
+                result = this.GetAttr(binder.Name);
+                return true;
             }
             else
-            {
-                ptr = Converter.ToPython(inargs[i], inargs[i].GetType());
-            }
-            if (Runtime.PyTuple_SetItem(argtuple, i, ptr) < 0)
-                throw new PythonException();
+                return base.TryGetMember(binder, out result);
         }
-        args = new PyTuple(argtuple);
-        kwargs = null;
-        for (int i = arg_count; i < inargs.Length; i++)
+
+        public override bool TrySetMember(SetMemberBinder binder, object value)
         {
-            if (!(inargs[i] is Py.KeywordArguments))
-                throw new ArgumentException("Keyword arguments must come after normal arguments.");
-            if (kwargs == null)
-                kwargs = (Py.KeywordArguments)inargs[i];
+            if (this.HasAttr(binder.Name))
+            {
+                this.SetAttr(binder.Name, (PyObject)value);
+                return true;
+            }
             else
-                kwargs.Update((Py.KeywordArguments)inargs[i]);
+                return base.TrySetMember(binder, value);
         }
-    }
 
-    public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
-    {
-        if (this.HasAttr(binder.Name) && this.GetAttr(binder.Name).IsCallable())
+        private void GetArgs(object[] inargs, out PyTuple args, out PyDict kwargs)
         {
-            PyTuple pyargs = null;
-            PyDict kwargs = null;
-            try
+            int arg_count;
+            for (arg_count = 0; arg_count < inargs.Length && !(inargs[arg_count] is Py.KeywordArguments); ++arg_count) ;
+            IntPtr argtuple = Runtime.PyTuple_New(arg_count);
+            for (int i = 0; i < arg_count; i++)
             {
-                GetArgs(args, out pyargs, out kwargs);
-                result = InvokeMethod(binder.Name, pyargs, kwargs);
+                IntPtr ptr;
+                if (inargs[i] is PyObject)
+                {
+                    ptr = ((PyObject)inargs[i]).Handle;
+                    Runtime.Incref(ptr);
+                }
+                else
+                {
+                    ptr = Converter.ToPython(inargs[i], inargs[i].GetType());
+                }
+                if (Runtime.PyTuple_SetItem(argtuple, i, ptr) < 0)
+                    throw new PythonException();
             }
-            finally
+            args = new PyTuple(argtuple);
+            kwargs = null;
+            for (int i = arg_count; i < inargs.Length; i++)
             {
-                if (null != pyargs)
-                    pyargs.Dispose();
-                if (null != kwargs)
-                    kwargs.Dispose();
+                if (!(inargs[i] is Py.KeywordArguments))
+                    throw new ArgumentException("Keyword arguments must come after normal arguments.");
+                if (kwargs == null)
+                    kwargs = (Py.KeywordArguments)inargs[i];
+                else
+                    kwargs.Update((Py.KeywordArguments)inargs[i]);
             }
-            return true;
         }
-        else
-            return base.TryInvokeMember(binder, args, out result);
-    }
 
-    public override bool TryInvoke(InvokeBinder binder, object[] args, out object result)
-    {
-        if (this.IsCallable())
+        public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
         {
-            PyTuple pyargs = null;
-            PyDict kwargs = null;
-            try
+            if (this.HasAttr(binder.Name) && this.GetAttr(binder.Name).IsCallable())
             {
-                GetArgs(args, out pyargs, out kwargs);
-                result = Invoke(pyargs, kwargs);
+                PyTuple pyargs = null;
+                PyDict kwargs = null;
+                try
+                {
+                    GetArgs(args, out pyargs, out kwargs);
+                    result = InvokeMethod(binder.Name, pyargs, kwargs);
+                }
+                finally
+                {
+                    if (null != pyargs)
+                        pyargs.Dispose();
+                    if (null != kwargs)
+                        kwargs.Dispose();
+                }
+                return true;
             }
-            finally
+            else
+                return base.TryInvokeMember(binder, args, out result);
+        }
+
+        public override bool TryInvoke(InvokeBinder binder, object[] args, out object result)
+        {
+            if (this.IsCallable())
             {
-                if (null != pyargs)
-                    pyargs.Dispose();
-                if (null != kwargs)
-                    kwargs.Dispose();
+                PyTuple pyargs = null;
+                PyDict kwargs = null;
+                try
+                {
+                    GetArgs(args, out pyargs, out kwargs);
+                    result = Invoke(pyargs, kwargs);
+                }
+                finally
+                {
+                    if (null != pyargs)
+                        pyargs.Dispose();
+                    if (null != kwargs)
+                        kwargs.Dispose();
+                }
+                return true;
             }
-            return true;
+            else
+                return base.TryInvoke(binder, args, out result);
         }
-        else
-            return base.TryInvoke(binder, args, out result);
-    }
-
-    public override bool TryConvert(ConvertBinder binder, out object result)
-    {
-        return Converter.ToManaged(this.obj, binder.Type, out result, false);
-    }
 
-    public override bool TryBinaryOperation(BinaryOperationBinder binder, Object arg, out Object result) {
-        IntPtr res;
-        if (!(arg is PyObject))
-            arg = arg.ToPython();
+        public override bool TryConvert(ConvertBinder binder, out object result)
+        {
+            return Converter.ToManaged(this.obj, binder.Type, out result, false);
+        }
 
-        switch (binder.Operation)
+        public override bool TryBinaryOperation(BinaryOperationBinder binder, Object arg, out Object result)
         {
-            case ExpressionType.Add:
-                res = Runtime.PyNumber_Add(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.AddAssign:
-                res = Runtime.PyNumber_InPlaceAdd(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.Subtract:
-                res = Runtime.PyNumber_Subtract(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.SubtractAssign:
-                res = Runtime.PyNumber_InPlaceSubtract(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.Multiply:
-                res = Runtime.PyNumber_Multiply(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.MultiplyAssign:
-                res = Runtime.PyNumber_InPlaceMultiply(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.Divide:
-                res = Runtime.PyNumber_Divide(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.DivideAssign:
-                res = Runtime.PyNumber_InPlaceDivide(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.And:
-                res = Runtime.PyNumber_And(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.AndAssign:
-                res = Runtime.PyNumber_InPlaceAnd(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.ExclusiveOr:
-                res = Runtime.PyNumber_Xor(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.ExclusiveOrAssign:
-                res = Runtime.PyNumber_InPlaceXor(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.GreaterThan:
-                result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) > 0;
-                return true;
-            case ExpressionType.GreaterThanOrEqual:
-                result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) >= 0;
-                return true;
-            case ExpressionType.LeftShift:
-                res = Runtime.PyNumber_Lshift(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.LeftShiftAssign:
-                res = Runtime.PyNumber_InPlaceLshift(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.LessThan:
-                result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) < 0;
-                return true;
-            case ExpressionType.LessThanOrEqual:
-                result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) <= 0;
-                return true;
-            case ExpressionType.Modulo:
-                res = Runtime.PyNumber_Remainder(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.ModuloAssign:
-                res = Runtime.PyNumber_InPlaceRemainder(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.NotEqual:
-                result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) != 0;
-                return true;
-            case ExpressionType.Or:
-                res = Runtime.PyNumber_Or(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.OrAssign:
-                res = Runtime.PyNumber_InPlaceOr(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.Power:
-                res = Runtime.PyNumber_Power(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.RightShift:
-                res = Runtime.PyNumber_Rshift(this.obj, ((PyObject)arg).obj);
-                break;
-            case ExpressionType.RightShiftAssign:
-                res = Runtime.PyNumber_InPlaceRshift(this.obj, ((PyObject)arg).obj);
-                break;
-            default:
-                result = null;
-                return false;
+            IntPtr res;
+            if (!(arg is PyObject))
+                arg = arg.ToPython();
+
+            switch (binder.Operation)
+            {
+                case ExpressionType.Add:
+                    res = Runtime.PyNumber_Add(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.AddAssign:
+                    res = Runtime.PyNumber_InPlaceAdd(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.Subtract:
+                    res = Runtime.PyNumber_Subtract(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.SubtractAssign:
+                    res = Runtime.PyNumber_InPlaceSubtract(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.Multiply:
+                    res = Runtime.PyNumber_Multiply(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.MultiplyAssign:
+                    res = Runtime.PyNumber_InPlaceMultiply(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.Divide:
+                    res = Runtime.PyNumber_Divide(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.DivideAssign:
+                    res = Runtime.PyNumber_InPlaceDivide(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.And:
+                    res = Runtime.PyNumber_And(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.AndAssign:
+                    res = Runtime.PyNumber_InPlaceAnd(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.ExclusiveOr:
+                    res = Runtime.PyNumber_Xor(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.ExclusiveOrAssign:
+                    res = Runtime.PyNumber_InPlaceXor(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.GreaterThan:
+                    result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) > 0;
+                    return true;
+                case ExpressionType.GreaterThanOrEqual:
+                    result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) >= 0;
+                    return true;
+                case ExpressionType.LeftShift:
+                    res = Runtime.PyNumber_Lshift(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.LeftShiftAssign:
+                    res = Runtime.PyNumber_InPlaceLshift(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.LessThan:
+                    result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) < 0;
+                    return true;
+                case ExpressionType.LessThanOrEqual:
+                    result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) <= 0;
+                    return true;
+                case ExpressionType.Modulo:
+                    res = Runtime.PyNumber_Remainder(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.ModuloAssign:
+                    res = Runtime.PyNumber_InPlaceRemainder(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.NotEqual:
+                    result = Runtime.PyObject_Compare(this.obj, ((PyObject)arg).obj) != 0;
+                    return true;
+                case ExpressionType.Or:
+                    res = Runtime.PyNumber_Or(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.OrAssign:
+                    res = Runtime.PyNumber_InPlaceOr(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.Power:
+                    res = Runtime.PyNumber_Power(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.RightShift:
+                    res = Runtime.PyNumber_Rshift(this.obj, ((PyObject)arg).obj);
+                    break;
+                case ExpressionType.RightShiftAssign:
+                    res = Runtime.PyNumber_InPlaceRshift(this.obj, ((PyObject)arg).obj);
+                    break;
+                default:
+                    result = null;
+                    return false;
+            }
+            result = new PyObject(res);
+            return true;
         }
-        result = new PyObject(res);
-        return true;
-    }
 
-    public override bool TryUnaryOperation(UnaryOperationBinder binder, out Object result)
-    {
-        int r;
-        IntPtr res;
-        switch (binder.Operation)
+        public override bool TryUnaryOperation(UnaryOperationBinder binder, out Object result)
         {
-            case ExpressionType.Negate:
-                res = Runtime.PyNumber_Negative(this.obj);
-                break;
-            case ExpressionType.UnaryPlus:
-                res = Runtime.PyNumber_Positive(this.obj);
-                break;
-            case ExpressionType.OnesComplement:
-                res = Runtime.PyNumber_Invert(this.obj);
-                break;
-            case ExpressionType.Not:
-                r = Runtime.PyObject_Not(this.obj);
-                result = r == 1;
-                return r != -1;
-            case ExpressionType.IsFalse:
-                r = Runtime.PyObject_IsTrue(this.obj);
-                result = r == 0;
-                return r != -1;
-            case ExpressionType.IsTrue:
-                r = Runtime.PyObject_IsTrue(this.obj);
-                result = r == 1;
-                return r != -1;
-            case ExpressionType.Decrement:
-            case ExpressionType.Increment:
-            default:
-                result = null;
-                return false;
+            int r;
+            IntPtr res;
+            switch (binder.Operation)
+            {
+                case ExpressionType.Negate:
+                    res = Runtime.PyNumber_Negative(this.obj);
+                    break;
+                case ExpressionType.UnaryPlus:
+                    res = Runtime.PyNumber_Positive(this.obj);
+                    break;
+                case ExpressionType.OnesComplement:
+                    res = Runtime.PyNumber_Invert(this.obj);
+                    break;
+                case ExpressionType.Not:
+                    r = Runtime.PyObject_Not(this.obj);
+                    result = r == 1;
+                    return r != -1;
+                case ExpressionType.IsFalse:
+                    r = Runtime.PyObject_IsTrue(this.obj);
+                    result = r == 0;
+                    return r != -1;
+                case ExpressionType.IsTrue:
+                    r = Runtime.PyObject_IsTrue(this.obj);
+                    result = r == 1;
+                    return r != -1;
+                case ExpressionType.Decrement:
+                case ExpressionType.Increment:
+                default:
+                    result = null;
+                    return false;
+            }
+            result = new PyObject(res);
+            return true;
         }
-        result = new PyObject(res);
-        return true;
-    }
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pysequence.cs b/src/runtime/pysequence.cs
index 855cad72e..d32921901 100644
--- a/src/runtime/pysequence.cs
+++ b/src/runtime/pysequence.cs
@@ -1,28 +1,22 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
-    /// Represents a generic Python sequence. The methods of this class are 
-    /// equivalent to the Python "abstract sequence API". See  
+    /// Represents a generic Python sequence. The methods of this class are
+    /// equivalent to the Python "abstract sequence API". See
     /// http://www.python.org/doc/current/api/sequence.html for details.
     /// </summary>
+    public class PySequence : PyObject, IEnumerable
+    {
+        protected PySequence(IntPtr ptr) : base(ptr)
+        {
+        }
 
-    public class PySequence : PyObject, IEnumerable {
-
-        protected PySequence(IntPtr ptr) : base(ptr) {}
-
-        protected PySequence() : base() {}
+        protected PySequence() : base()
+        {
+        }
 
 
         /// <summary>
@@ -32,8 +26,8 @@ protected PySequence() : base() {}
         /// <remarks>
         /// Returns true if the given object implements the sequence protocol.
         /// </remarks>
-
-        public static bool IsSequenceType(PyObject value) {
+        public static bool IsSequenceType(PyObject value)
+        {
             return Runtime.PySequence_Check(value.obj);
         }
 
@@ -45,10 +39,11 @@ public static bool IsSequenceType(PyObject value) {
         /// <remarks>
         /// Return the slice of the sequence with the given indices.
         /// </remarks>
-
-        public PyObject GetSlice(int i1, int i2) {
+        public PyObject GetSlice(int i1, int i2)
+        {
             IntPtr op = Runtime.PySequence_GetSlice(obj, i1, i2);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyObject(op);
@@ -62,10 +57,11 @@ public PyObject GetSlice(int i1, int i2) {
         /// <remarks>
         /// Sets the slice of the sequence with the given indices.
         /// </remarks>
-
-        public void SetSlice(int i1, int i2, PyObject v) {
+        public void SetSlice(int i1, int i2, PyObject v)
+        {
             int r = Runtime.PySequence_SetSlice(obj, i1, i2, v.obj);
-            if (r < 0) {
+            if (r < 0)
+            {
                 throw new PythonException();
             }
         }
@@ -78,10 +74,11 @@ public void SetSlice(int i1, int i2, PyObject v) {
         /// <remarks>
         /// Deletes the slice of the sequence with the given indices.
         /// </remarks>
-
-        public void DelSlice(int i1, int i2) {
+        public void DelSlice(int i1, int i2)
+        {
             int r = Runtime.PySequence_DelSlice(obj, i1, i2);
-            if (r < 0) {
+            if (r < 0)
+            {
                 throw new PythonException();
             }
         }
@@ -92,13 +89,14 @@ public void DelSlice(int i1, int i2) {
         /// </summary>
         ///
         /// <remarks>
-        /// Return the index of the given item in the sequence, or -1 if 
+        /// Return the index of the given item in the sequence, or -1 if
         /// the item does not appear in the sequence.
         /// </remarks>
-
-        public int Index(PyObject item) {
+        public int Index(PyObject item)
+        {
             int r = Runtime.PySequence_Index(obj, item.obj);
-            if (r < 0) {
+            if (r < 0)
+            {
                 Runtime.PyErr_Clear();
                 return -1;
             }
@@ -114,10 +112,11 @@ public int Index(PyObject item) {
         /// Return true if the sequence contains the given item. This method
         /// throws a PythonException if an error occurs during the check.
         /// </remarks>
-
-        public bool Contains(PyObject item) {
+        public bool Contains(PyObject item)
+        {
             int r = Runtime.PySequence_Contains(obj, item.obj);
-            if (r < 0) {
+            if (r < 0)
+            {
                 throw new PythonException();
             }
             return (r != 0);
@@ -129,13 +128,14 @@ public bool Contains(PyObject item) {
         /// </summary>
         ///
         /// <remarks>
-        /// Return the concatenation of the sequence object with the passed in 
+        /// Return the concatenation of the sequence object with the passed in
         /// sequence object.
         /// </remarks>
-
-        public PyObject Concat(PyObject other) {
+        public PyObject Concat(PyObject other)
+        {
             IntPtr op = Runtime.PySequence_Concat(obj, other.obj);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyObject(op);
@@ -147,17 +147,17 @@ public PyObject Concat(PyObject other) {
         /// </summary>
         ///
         /// <remarks>
-        /// Return the sequence object repeated N times. This is equivalent 
+        /// Return the sequence object repeated N times. This is equivalent
         /// to the Python expression "object * count".
         /// </remarks>
-
-        public PyObject Repeat(int count) {
+        public PyObject Repeat(int count)
+        {
             IntPtr op = Runtime.PySequence_Repeat(obj, count);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyObject(op);
+        }
     }
-}
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pystring.cs b/src/runtime/pystring.cs
index 818e124cd..737fa36be 100644
--- a/src/runtime/pystring.cs
+++ b/src/runtime/pystring.cs
@@ -1,85 +1,75 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Represents a Python (ansi) string object. See the documentation at
     /// http://www.python.org/doc/current/api/stringObjects.html for details.
     /// 2011-01-29: ...Then why does the string constructor call PyUnicode_FromUnicode()???
     /// </summary>
-
-    public class PyString : PySequence {
-
-    /// <summary>
-    /// PyString Constructor
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Creates a new PyString from an existing object reference. Note 
-    /// that the instance assumes ownership of the object reference. 
-    /// The object reference is not checked for type-correctness. 
-    /// </remarks>
-
-    public PyString(IntPtr ptr) : base(ptr) {}
-
-
-    /// <summary>
-    /// PyString Constructor
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Copy constructor - obtain a PyString from a generic PyObject. 
-    /// An ArgumentException will be thrown if the given object is not 
-    /// a Python string object.
-    /// </remarks>
-
-    public PyString(PyObject o) : base() {
-        if (!IsStringType(o)) {
-            throw new ArgumentException("object is not a string");
+    public class PyString : PySequence
+    {
+        /// <summary>
+        /// PyString Constructor
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Creates a new PyString from an existing object reference. Note
+        /// that the instance assumes ownership of the object reference.
+        /// The object reference is not checked for type-correctness.
+        /// </remarks>
+        public PyString(IntPtr ptr) : base(ptr)
+        {
         }
-        Runtime.Incref(o.obj);
-        obj = o.obj;
-    }
-
 
-    /// <summary>
-    /// PyString Constructor
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Creates a Python string from a managed string.
-    /// </remarks>
 
-    public PyString(string s) : base() {
-        obj = Runtime.PyUnicode_FromUnicode(s, s.Length);
-        if (obj == IntPtr.Zero) {
-            throw new PythonException();
+        /// <summary>
+        /// PyString Constructor
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Copy constructor - obtain a PyString from a generic PyObject.
+        /// An ArgumentException will be thrown if the given object is not
+        /// a Python string object.
+        /// </remarks>
+        public PyString(PyObject o) : base()
+        {
+            if (!IsStringType(o))
+            {
+                throw new ArgumentException("object is not a string");
+            }
+            Runtime.Incref(o.obj);
+            obj = o.obj;
         }
-    }
 
 
-    /// <summary>
-    /// IsStringType Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns true if the given object is a Python string.
-    /// </remarks>
+        /// <summary>
+        /// PyString Constructor
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Creates a Python string from a managed string.
+        /// </remarks>
+        public PyString(string s) : base()
+        {
+            obj = Runtime.PyUnicode_FromUnicode(s, s.Length);
+            if (obj == IntPtr.Zero)
+            {
+                throw new PythonException();
+            }
+        }
 
-    public static bool IsStringType(PyObject value) {
-        return Runtime.PyString_Check(value.obj);
-    }
 
+        /// <summary>
+        /// IsStringType Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns true if the given object is a Python string.
+        /// </remarks>
+        public static bool IsStringType(PyObject value)
+        {
+            return Runtime.PyString_Check(value.obj);
+        }
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pythonengine.cs b/src/runtime/pythonengine.cs
index 0cb99bffe..7e37d6211 100644
--- a/src/runtime/pythonengine.cs
+++ b/src/runtime/pythonengine.cs
@@ -1,72 +1,68 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.IO;
 using System.Threading;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// This class provides the public interface of the Python runtime.
     /// </summary>
-
-    public class PythonEngine {
-
+    public class PythonEngine
+    {
         private static DelegateManager delegateManager;
         private static bool initialized;
 
         #region Properties
 
-        public static bool IsInitialized {
-            get {
-                return initialized;
-            }
+        public static bool IsInitialized
+        {
+            get { return initialized; }
         }
 
-        internal static DelegateManager DelegateManager {
-            get {
-                if (delegateManager == null) {
-                    throw new InvalidOperationException("DelegateManager has not yet been initialized using Python.Runtime.PythonEngine.Initialize().");
+        internal static DelegateManager DelegateManager
+        {
+            get
+            {
+                if (delegateManager == null)
+                {
+                    throw new InvalidOperationException(
+                        "DelegateManager has not yet been initialized using Python.Runtime.PythonEngine.Initialize().");
                 }
                 return delegateManager;
             }
         }
 
-        public static string ProgramName {
-            get {
+        public static string ProgramName
+        {
+            get
+            {
                 string result = Runtime.Py_GetProgramName();
-                if (result == null) {
+                if (result == null)
+                {
                     return "";
                 }
                 return result;
             }
-            set {
-                Runtime.Py_SetProgramName(value);
-            }
+            set { Runtime.Py_SetProgramName(value); }
         }
 
-        public static string PythonHome {
-            get {
+        public static string PythonHome
+        {
+            get
+            {
                 string result = Runtime.Py_GetPythonHome();
-                if (result == null) {
+                if (result == null)
+                {
                     return "";
                 }
                 return result;
             }
-            set {
-                Runtime.Py_SetPythonHome(value);
-            }
+            set { Runtime.Py_SetPythonHome(value); }
         }
 
-        public static string PythonPath {
+        public static string PythonPath
+        {
             get
             {
                 string result = Runtime.Py_GetPath();
@@ -76,56 +72,50 @@ public static string PythonPath {
                 }
                 return result;
             }
-            set
-            {
-                Runtime.Py_SetPath(value);
-            }
+            set { Runtime.Py_SetPath(value); }
         }
 
-        public static string Version {
-            get { 
-                return Runtime.Py_GetVersion(); 
-            }
+        public static string Version
+        {
+            get { return Runtime.Py_GetVersion(); }
         }
 
-        public static string BuildInfo {
-            get { 
-                return Runtime.Py_GetBuildInfo(); 
-            }
+        public static string BuildInfo
+        {
+            get { return Runtime.Py_GetBuildInfo(); }
         }
 
-        public static string Platform {
-            get { 
-                return Runtime.Py_GetPlatform(); 
-            }
+        public static string Platform
+        {
+            get { return Runtime.Py_GetPlatform(); }
         }
 
-        public static string Copyright {
-            get { 
-                return Runtime.Py_GetCopyright(); 
-            }
+        public static string Copyright
+        {
+            get { return Runtime.Py_GetCopyright(); }
         }
 
-        public static int RunSimpleString(string code) {
+        public static int RunSimpleString(string code)
+        {
             return Runtime.PyRun_SimpleString(code);
         }
 
         #endregion
 
-
         /// <summary>
         /// Initialize Method
         /// </summary>
         ///
         /// <remarks>
-        /// Initialize the Python runtime. It is safe to call this method 
-        /// more than once, though initialization will only happen on the 
+        /// Initialize the Python runtime. It is safe to call this method
+        /// more than once, though initialization will only happen on the
         /// first call. It is *not* necessary to hold the Python global
         /// interpreter lock (GIL) to call this method.
         /// </remarks>
-
-        public static void Initialize() {
-            if (!initialized) {
+        public static void Initialize()
+        {
+            if (!initialized)
+            {
                 // Creating the delegateManager MUST happen before Runtime.Initialize
                 // is called. If it happens afterwards, DelegateManager's CodeGenerator
                 // throws an exception in its ctor.  This exception is eaten somehow
@@ -140,8 +130,8 @@ public static void Initialize() {
                 // callbacks are called after python is fully finalized but the python ones
                 // are called while the python engine is still running).
                 string code =
-                "import atexit, clr\n" +
-                "atexit.register(clr._AtExit)\n";
+                    "import atexit, clr\n" +
+                    "atexit.register(clr._AtExit)\n";
                 PyObject r = PythonEngine.RunString(code);
                 if (r != null)
                     r.Dispose();
@@ -175,7 +165,8 @@ public static void Initialize() {
                     Runtime.PyDict_SetItemString(clr_dict, "_extras", module);
                     foreach (PyObject key in locals.Keys())
                     {
-                        if (!key.ToString().StartsWith("_")){
+                        if (!key.ToString().StartsWith("_"))
+                        {
                             PyObject value = locals[key];
                             Runtime.PyDict_SetItem(clr_dict, key.Handle, value.Handle);
                             value.Dispose();
@@ -198,16 +189,17 @@ public static void Initialize() {
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
         public static IntPtr InitExt() {
 #else
-        public static void InitExt() {
+        public static void InitExt()
+        {
 #endif
             try
             {
                 Initialize();
 
                 // Trickery - when the import hook is installed into an already
-                // running Python, the standard import machinery is still in 
+                // running Python, the standard import machinery is still in
                 // control for the duration of the import that caused bootstrap.
-                // 
+                //
                 // That is problematic because the std machinery tries to get
                 // sub-names directly from the module __dict__ rather than going
                 // through our module object's getattr hook. This workaround is
@@ -222,20 +214,20 @@ public static void InitExt() {
                 // since there is no line info to get the import line ;(
 
                 string code =
-
-                "import traceback\n" +
-                "for item in traceback.extract_stack():\n" +
-                "    line = item[3]\n" +
-                "    if line is not None:\n" +
-                "        if line.startswith('import CLR') or \\\n" +
-                "           line.startswith('import clr') or \\\n" +
-                "           line.startswith('from clr') or \\\n" +
-                "           line.startswith('from CLR'):\n" +
-                "            exec(line)\n" +
-                "            break\n";
+                    "import traceback\n" +
+                    "for item in traceback.extract_stack():\n" +
+                    "    line = item[3]\n" +
+                    "    if line is not None:\n" +
+                    "        if line.startswith('import CLR') or \\\n" +
+                    "           line.startswith('import clr') or \\\n" +
+                    "           line.startswith('from clr') or \\\n" +
+                    "           line.startswith('from CLR'):\n" +
+                    "            exec(line)\n" +
+                    "            break\n";
 
                 PyObject r = PythonEngine.RunString(code);
-                if (r != null) {
+                if (r != null)
+                {
                     r.Dispose();
                 }
             }
@@ -261,9 +253,10 @@ public static void InitExt() {
         /// Python runtime can no longer be used in the current process
         /// after calling the Shutdown method.
         /// </remarks>
-
-        public static void Shutdown() {
-            if (initialized) {
+        public static void Shutdown()
+        {
+            if (initialized)
+            {
                 Runtime.Shutdown();
                 initialized = false;
             }
@@ -277,18 +270,18 @@ public static void Shutdown() {
         /// <remarks>
         /// Acquire the Python global interpreter lock (GIL). Managed code
         /// *must* call this method before using any objects or calling any
-        /// methods on objects in the Python.Runtime namespace. The only 
+        /// methods on objects in the Python.Runtime namespace. The only
         /// exception is PythonEngine.Initialize, which may be called without
         /// first calling AcquireLock.
         ///
         /// Each call to AcquireLock must be matched by a corresponding call
         /// to ReleaseLock, passing the token obtained from AcquireLock.
-        /// 
+        ///
         /// For more information, see the "Extending and Embedding" section
         /// of the Python documentation on www.python.org.
         /// </remarks>
-
-        public static IntPtr AcquireLock() {
+        public static IntPtr AcquireLock()
+        {
             return Runtime.PyGILState_Ensure();
         }
 
@@ -300,12 +293,12 @@ public static IntPtr AcquireLock() {
         /// <remarks>
         /// Release the Python global interpreter lock using a token obtained
         /// from a previous call to AcquireLock.
-        /// 
+        ///
         /// For more information, see the "Extending and Embedding" section
         /// of the Python documentation on www.python.org.
         /// </remarks>
-        
-        public static void ReleaseLock(IntPtr gs) {
+        public static void ReleaseLock(IntPtr gs)
+        {
             Runtime.PyGILState_Release(gs);
         }
 
@@ -318,12 +311,12 @@ public static void ReleaseLock(IntPtr gs) {
         /// Release the Python global interpreter lock to allow other threads
         /// to run. This is equivalent to the Py_BEGIN_ALLOW_THREADS macro
         /// provided by the C Python API.
-        /// 
+        ///
         /// For more information, see the "Extending and Embedding" section
         /// of the Python documentation on www.python.org.
         /// </remarks>
-        
-        public static IntPtr BeginAllowThreads() {
+        public static IntPtr BeginAllowThreads()
+        {
             return Runtime.PyEval_SaveThread();
         }
 
@@ -336,30 +329,30 @@ public static IntPtr BeginAllowThreads() {
         /// Re-aquire the Python global interpreter lock for the current
         /// thread. This is equivalent to the Py_END_ALLOW_THREADS macro
         /// provided by the C Python API.
-        /// 
+        ///
         /// For more information, see the "Extending and Embedding" section
         /// of the Python documentation on www.python.org.
         /// </remarks>
-        
-        public static void EndAllowThreads(IntPtr ts) {
+        public static void EndAllowThreads(IntPtr ts)
+        {
             Runtime.PyEval_RestoreThread(ts);
         }
 
 
-
         /// <summary>
         /// ImportModule Method
         /// </summary>
         ///
         /// <remarks>
         /// Given a fully-qualified module or package name, import the
-        /// module and return the resulting module object as a PyObject 
+        /// module and return the resulting module object as a PyObject
         /// or null if an exception is raised.
         /// </remarks>
-
-        public static PyObject ImportModule(string name) {
+        public static PyObject ImportModule(string name)
+        {
             IntPtr op = Runtime.PyImport_ImportModule(name);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 return null;
             }
             return new PyObject(op);
@@ -374,10 +367,11 @@ public static PyObject ImportModule(string name) {
         /// Given a PyObject representing a previously loaded module, reload
         /// the module.
         /// </remarks>
-
-        public static PyObject ReloadModule(PyObject module) {
+        public static PyObject ReloadModule(PyObject module)
+        {
             IntPtr op = Runtime.PyImport_ReloadModule(module.Handle);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyObject(op);
@@ -392,14 +386,16 @@ public static PyObject ReloadModule(PyObject module) {
         /// Given a string module name and a string containing Python code,
         /// execute the code in and return a module of the given name.
         /// </remarks>
-
-        public static PyObject ModuleFromString(string name, string code) {
+        public static PyObject ModuleFromString(string name, string code)
+        {
             IntPtr c = Runtime.Py_CompileString(code, "none", (IntPtr)257);
-            if (c == IntPtr.Zero) {
+            if (c == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             IntPtr m = Runtime.PyImport_ExecCodeModule(name, c);
-            if (m == IntPtr.Zero) {
+            if (m == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyObject(m);
@@ -415,8 +411,8 @@ public static PyObject ModuleFromString(string name, string code) {
         /// executing the code string as a PyObject instance, or null if
         /// an exception was raised.
         /// </remarks>
-
-        public static PyObject RunString(string code) {
+        public static PyObject RunString(string code)
+        {
             IntPtr globals = Runtime.PyEval_GetGlobals();
             IntPtr locals = Runtime.PyDict_New();
 
@@ -426,7 +422,8 @@ public static PyObject RunString(string code) {
             IntPtr flag = (IntPtr)257; /* Py_file_input */
             IntPtr result = Runtime.PyRun_String(code, flag, globals, locals);
             Runtime.Decref(locals);
-            if (result == IntPtr.Zero) {
+            if (result == IntPtr.Zero)
+            {
                 return null;
             }
             return new PyObject(result);
@@ -436,7 +433,8 @@ public static PyObject RunString(string code, IntPtr globals, IntPtr locals)
         {
             IntPtr flag = (IntPtr)257; /* Py_file_input */
             IntPtr result = Runtime.PyRun_String(code, flag, globals, locals);
-            if (result == IntPtr.Zero) {
+            if (result == IntPtr.Zero)
+            {
                 return null;
             }
             return new PyObject(result);
@@ -456,27 +454,32 @@ public static GILState GIL()
         public class GILState : IDisposable
         {
             private IntPtr state;
+
             internal GILState()
             {
                 state = PythonEngine.AcquireLock();
             }
+
             public void Dispose()
             {
                 PythonEngine.ReleaseLock(state);
                 GC.SuppressFinalize(this);
             }
+
             ~GILState()
             {
                 Dispose();
             }
         }
 
-        public class KeywordArguments : PyDict { }
+        public class KeywordArguments : PyDict
+        {
+        }
 
         public static KeywordArguments kw(params object[] kv)
         {
             var dict = new KeywordArguments();
-            if (kv.Length % 2 != 0)
+            if (kv.Length%2 != 0)
                 throw new ArgumentException("Must have an equal number of keys and values");
             for (int i = 0; i < kv.Length; i += 2)
             {
@@ -498,4 +501,4 @@ public static PyObject Import(string name)
             return PythonEngine.ImportModule(name);
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pythonexception.cs b/src/runtime/pythonexception.cs
index 552f004eb..b4b50f4f8 100644
--- a/src/runtime/pythonexception.cs
+++ b/src/runtime/pythonexception.cs
@@ -1,189 +1,179 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
-    /// Provides a managed interface to exceptions thrown by the Python 
+    /// Provides a managed interface to exceptions thrown by the Python
     /// runtime.
     /// </summary>
-
-    public class PythonException : System.Exception {
-
-    private IntPtr _pyType = IntPtr.Zero;
-    private IntPtr _pyValue = IntPtr.Zero;
-    private IntPtr _pyTB = IntPtr.Zero;
-    private string _tb = "";
-    private string _message = "";
-    private bool disposed = false;
-
-    public PythonException() : base()
+    public class PythonException : System.Exception
     {
-        IntPtr gs = PythonEngine.AcquireLock();
-        Runtime.PyErr_Fetch(ref _pyType, ref _pyValue, ref _pyTB);
-        Runtime.Incref(_pyType);
-        Runtime.Incref(_pyValue);
-        Runtime.Incref(_pyTB);
-        if ((_pyType != IntPtr.Zero) && (_pyValue != IntPtr.Zero))
+        private IntPtr _pyType = IntPtr.Zero;
+        private IntPtr _pyValue = IntPtr.Zero;
+        private IntPtr _pyTB = IntPtr.Zero;
+        private string _tb = "";
+        private string _message = "";
+        private bool disposed = false;
+
+        public PythonException() : base()
         {
-            string type;
-            string message;
+            IntPtr gs = PythonEngine.AcquireLock();
+            Runtime.PyErr_Fetch(ref _pyType, ref _pyValue, ref _pyTB);
             Runtime.Incref(_pyType);
-            using (PyObject pyType = new PyObject(_pyType))
-            using (PyObject pyTypeName = pyType.GetAttr("__name__"))
+            Runtime.Incref(_pyValue);
+            Runtime.Incref(_pyTB);
+            if ((_pyType != IntPtr.Zero) && (_pyValue != IntPtr.Zero))
             {
+                string type;
+                string message;
+                Runtime.Incref(_pyType);
+                using (PyObject pyType = new PyObject(_pyType))
+                using (PyObject pyTypeName = pyType.GetAttr("__name__"))
+                {
                     type = pyTypeName.ToString();
+                }
+
+                Runtime.Incref(_pyValue);
+                using (PyObject pyValue = new PyObject(_pyValue))
+                {
+                    message = pyValue.ToString();
+                }
+                _message = type + " : " + message;
             }
-
-            Runtime.Incref(_pyValue);
-            using (PyObject pyValue = new PyObject(_pyValue)) 
+            if (_pyTB != IntPtr.Zero)
             {
-                message = pyValue.ToString(); 
-            }
-            _message = type + " : " + message;
-        }
-        if (_pyTB != IntPtr.Zero)
-        {
-            PyObject tb_module = PythonEngine.ImportModule("traceback");
-            Runtime.Incref(_pyTB);
-            using (PyObject pyTB = new PyObject(_pyTB)) {
-                _tb = tb_module.InvokeMethod("format_tb", pyTB).ToString();
+                PyObject tb_module = PythonEngine.ImportModule("traceback");
+                Runtime.Incref(_pyTB);
+                using (PyObject pyTB = new PyObject(_pyTB))
+                {
+                    _tb = tb_module.InvokeMethod("format_tb", pyTB).ToString();
+                }
             }
+            PythonEngine.ReleaseLock(gs);
         }
-        PythonEngine.ReleaseLock(gs);
-    }
-
-    // Ensure that encapsulated Python objects are decref'ed appropriately
-    // when the managed exception wrapper is garbage-collected.
-
-    ~PythonException() {
-        Dispose();
-    }
 
-    /// <summary>
-    /// Restores python error.
-    /// </summary>
-    public void Restore()
-    {
-        IntPtr gs = PythonEngine.AcquireLock();
-        Runtime.PyErr_Restore(_pyType, _pyValue, _pyTB);
-        _pyType = IntPtr.Zero;
-        _pyValue = IntPtr.Zero;
-        _pyTB = IntPtr.Zero;
-        PythonEngine.ReleaseLock(gs);
-    }
-
-    /// <summary>
-    /// PyType Property
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the exception type as a Python object.
-    /// </remarks>
-
-    public IntPtr PyType 
-    {
-        get { return _pyType; }
-    }
+        // Ensure that encapsulated Python objects are decref'ed appropriately
+        // when the managed exception wrapper is garbage-collected.
 
-    /// <summary>
-    /// PyValue Property
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the exception value as a Python object.
-    /// </remarks>
-
-    public IntPtr PyValue
-    {
-        get { return _pyValue; }
-    }
-
-    /// <summary>
-    /// PyTB Property
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns the TraceBack as a Python object.
-    /// </remarks>
+        ~PythonException()
+        {
+            Dispose();
+        }
 
-    public IntPtr PyTB {
-        get { return _pyTB; }
-    }
+        /// <summary>
+        /// Restores python error.
+        /// </summary>
+        public void Restore()
+        {
+            IntPtr gs = PythonEngine.AcquireLock();
+            Runtime.PyErr_Restore(_pyType, _pyValue, _pyTB);
+            _pyType = IntPtr.Zero;
+            _pyValue = IntPtr.Zero;
+            _pyTB = IntPtr.Zero;
+            PythonEngine.ReleaseLock(gs);
+        }
 
-    /// <summary>
-    /// Message Property
-    /// </summary>
-    ///
-    /// <remarks>
-    /// A string representing the python exception message.
-    /// </remarks>
+        /// <summary>
+        /// PyType Property
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the exception type as a Python object.
+        /// </remarks>
+        public IntPtr PyType
+        {
+            get { return _pyType; }
+        }
 
-    public override string Message
-    {
-        get { return _message; }
-    }
+        /// <summary>
+        /// PyValue Property
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the exception value as a Python object.
+        /// </remarks>
+        public IntPtr PyValue
+        {
+            get { return _pyValue; }
+        }
 
-    /// <summary>
-    /// StackTrace Property
-    /// </summary>
-    ///
-    /// <remarks>
-    /// A string representing the python exception stack trace.
-    /// </remarks>
+        /// <summary>
+        /// PyTB Property
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns the TraceBack as a Python object.
+        /// </remarks>
+        public IntPtr PyTB
+        {
+            get { return _pyTB; }
+        }
 
-    public override string StackTrace 
-    {
-        get { return _tb; }
-    }
+        /// <summary>
+        /// Message Property
+        /// </summary>
+        ///
+        /// <remarks>
+        /// A string representing the python exception message.
+        /// </remarks>
+        public override string Message
+        {
+            get { return _message; }
+        }
 
+        /// <summary>
+        /// StackTrace Property
+        /// </summary>
+        ///
+        /// <remarks>
+        /// A string representing the python exception stack trace.
+        /// </remarks>
+        public override string StackTrace
+        {
+            get { return _tb; }
+        }
 
-    /// <summary>
-    /// Dispose Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// The Dispose method provides a way to explicitly release the 
-    /// Python objects represented by a PythonException.
-    /// </remarks>
 
-    public void Dispose() {
-        if (!disposed) {
-        if (Runtime.Py_IsInitialized() > 0) {
-            IntPtr gs = PythonEngine.AcquireLock();
-            Runtime.Decref(_pyType);
-            Runtime.Decref(_pyValue);
-            // XXX Do we ever get TraceBack? //
-            if (_pyTB != IntPtr.Zero) {
-                Runtime.Decref(_pyTB);
+        /// <summary>
+        /// Dispose Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// The Dispose method provides a way to explicitly release the
+        /// Python objects represented by a PythonException.
+        /// </remarks>
+        public void Dispose()
+        {
+            if (!disposed)
+            {
+                if (Runtime.Py_IsInitialized() > 0)
+                {
+                    IntPtr gs = PythonEngine.AcquireLock();
+                    Runtime.Decref(_pyType);
+                    Runtime.Decref(_pyValue);
+                    // XXX Do we ever get TraceBack? //
+                    if (_pyTB != IntPtr.Zero)
+                    {
+                        Runtime.Decref(_pyTB);
+                    }
+                    PythonEngine.ReleaseLock(gs);
+                }
+                GC.SuppressFinalize(this);
+                disposed = true;
             }
-            PythonEngine.ReleaseLock(gs);
-        }
-        GC.SuppressFinalize(this);
-        disposed = true;
         }
-    }
 
-    /// <summary>
-    /// Matches Method
-    /// </summary>
-    ///
-    /// <remarks>
-    /// Returns true if the Python exception type represented by the 
-    /// PythonException instance matches the given exception type.
-    /// </remarks>
-
-    public static bool Matches(IntPtr ob) {
-        return Runtime.PyErr_ExceptionMatches(ob) != 0;
+        /// <summary>
+        /// Matches Method
+        /// </summary>
+        ///
+        /// <remarks>
+        /// Returns true if the Python exception type represented by the
+        /// PythonException instance matches the given exception type.
+        /// </remarks>
+        public static bool Matches(IntPtr ob)
+        {
+            return Runtime.PyErr_ExceptionMatches(ob) != 0;
+        }
     }
-
-    } 
-}
+}
\ No newline at end of file
diff --git a/src/runtime/pytuple.cs b/src/runtime/pytuple.cs
index cac41acf4..3ab8a7e34 100644
--- a/src/runtime/pytuple.cs
+++ b/src/runtime/pytuple.cs
@@ -1,34 +1,25 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     /// <summary>
     /// Represents a Python tuple object. See the documentation at
     /// http://www.python.org/doc/current/api/tupleObjects.html for details.
     /// </summary>
-
-    public class PyTuple : PySequence {
-
+    public class PyTuple : PySequence
+    {
         /// <summary>
         /// PyTuple Constructor
         /// </summary>
         ///
         /// <remarks>
-        /// Creates a new PyTuple from an existing object reference. Note 
-        /// that the instance assumes ownership of the object reference. 
-        /// The object reference is not checked for type-correctness. 
+        /// Creates a new PyTuple from an existing object reference. Note
+        /// that the instance assumes ownership of the object reference.
+        /// The object reference is not checked for type-correctness.
         /// </remarks>
-
-        public PyTuple(IntPtr ptr) : base(ptr) {}
+        public PyTuple(IntPtr ptr) : base(ptr)
+        {
+        }
 
 
         /// <summary>
@@ -36,13 +27,14 @@ public PyTuple(IntPtr ptr) : base(ptr) {}
         /// </summary>
         ///
         /// <remarks>
-        /// Copy constructor - obtain a PyTuple from a generic PyObject. An 
+        /// Copy constructor - obtain a PyTuple from a generic PyObject. An
         /// ArgumentException will be thrown if the given object is not a
         /// Python tuple object.
         /// </remarks>
-
-        public PyTuple(PyObject o) : base() {
-            if (!IsTupleType(o)) {
+        public PyTuple(PyObject o) : base()
+        {
+            if (!IsTupleType(o))
+            {
                 throw new ArgumentException("object is not a tuple");
             }
             Runtime.Incref(o.obj);
@@ -57,14 +49,15 @@ public PyTuple(PyObject o) : base() {
         /// <remarks>
         /// Creates a new empty PyTuple.
         /// </remarks>
-
-        public PyTuple() : base() {
+        public PyTuple() : base()
+        {
             obj = Runtime.PyTuple_New(0);
-            if (obj == IntPtr.Zero) {
+            if (obj == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
         }
-        
+
 
         /// <summary>
         /// PyTuple Constructor
@@ -73,15 +66,17 @@ public PyTuple() : base() {
         /// <remarks>
         /// Creates a new PyTuple from an array of PyObject instances.
         /// </remarks>
-
-        public PyTuple(PyObject[] items) : base() {
+        public PyTuple(PyObject[] items) : base()
+        {
             int count = items.Length;
             obj = Runtime.PyTuple_New(count);
-            for (int i = 0; i < count; i++) {
+            for (int i = 0; i < count; i++)
+            {
                 IntPtr ptr = items[i].obj;
                 Runtime.Incref(ptr);
                 int r = Runtime.PyTuple_SetItem(obj, i, ptr);
-                if (r < 0) {
+                if (r < 0)
+                {
                     throw new PythonException();
                 }
             }
@@ -95,8 +90,8 @@ public PyTuple(PyObject[] items) : base() {
         /// <remarks>
         /// Returns true if the given object is a Python tuple.
         /// </remarks>
-
-        public static bool IsTupleType(PyObject value) {
+        public static bool IsTupleType(PyObject value)
+        {
             return Runtime.PyTuple_Check(value.obj);
         }
 
@@ -106,21 +101,18 @@ public static bool IsTupleType(PyObject value) {
         /// </summary>
         ///
         /// <remarks>
-        /// Convert a Python object to a Python tuple if possible, raising  
+        /// Convert a Python object to a Python tuple if possible, raising
         /// a PythonException if the conversion is not possible. This is
         /// equivalent to the Python expression "tuple(object)".
         /// </remarks>
-
-        public static PyTuple AsTuple(PyObject value) {
+        public static PyTuple AsTuple(PyObject value)
+        {
             IntPtr op = Runtime.PySequence_Tuple(value.obj);
-            if (op == IntPtr.Zero) {
+            if (op == IntPtr.Zero)
+            {
                 throw new PythonException();
             }
             return new PyTuple(op);
         }
-
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/resources/clr.py b/src/runtime/resources/clr.py
index 1fbd272b5..61d6e76f1 100644
--- a/src/runtime/resources/clr.py
+++ b/src/runtime/resources/clr.py
@@ -2,6 +2,7 @@
 Code in this module gets loaded into the main clr module.
 """
 
+
 class clrproperty(object):
     """
     Property decorator for exposing python properties to .NET.
@@ -13,7 +14,7 @@ class X(object):
             @clrproperty(string)
             def test(self):
                 return "x"
-                
+
     Properties decorated this way can be called from .NET, e.g.::
 
         dynamic x = getX(); // get an instance of X declared in Python
@@ -28,8 +29,8 @@ def __init__(self, type_, fget=None, fset=None):
 
     def __call__(self, fget):
         return self.__class__(self._clr_property_type_,
-                                fget=fget,
-                                fset=self.fset)
+                              fget=fget,
+                              fset=self.fset)
 
     def setter(self, fset):
         self.fset = fset
@@ -75,9 +76,9 @@ def __init__(self, return_type, arg_types, clrname=None, func=None):
 
     def __call__(self, func):
         return self.__class__(self._clr_return_type_,
-                                self._clr_arg_types_,
-                                clrname=self._clr_method_name_,
-                                func=func)
+                              self._clr_arg_types_,
+                              clrname=self._clr_method_name_,
+                              func=func)
 
     def __get__(self, instance, owner):
         return self.__func.__get__(instance, owner)
diff --git a/src/runtime/runtime.cs b/src/runtime/runtime.cs
index 260d968d8..d89994df5 100644
--- a/src/runtime/runtime.cs
+++ b/src/runtime/runtime.cs
@@ -1,28 +1,19 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 using System.Security;
 #if (UCS4)
 using System.Text;
 using Mono.Unix;
+
 #endif
 
 #if (UCS2 && (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35))
 using System.Text;
 #endif
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     [SuppressUnmanagedCodeSecurityAttribute()]
-
     static class NativeMethods
     {
 #if (MONO_LINUX || MONO_OSX)
@@ -72,7 +63,7 @@ static public IntPtr GetProcAddress(IntPtr dllHandle, string name) {
 
         [DllImport("libdl.so")]
         private static extern IntPtr dlopen(String fileName, int flags);
-        
+
         [DllImport("libdl.so")]
         private static extern IntPtr dlsym(IntPtr handle, String symbol);
 
@@ -95,13 +86,13 @@ static public IntPtr GetProcAddress(IntPtr dllHandle, string name) {
 #endif
     }
 
-    public class Runtime {
-
-    /// <summary>
-    /// Encapsulates the low-level Python C API. Note that it is
-    /// the responsibility of the caller to have acquired the GIL
-    /// before calling any of these methods.
-    /// </summary>
+    public class Runtime
+    {
+        /// <summary>
+        /// Encapsulates the low-level Python C API. Note that it is
+        /// the responsibility of the caller to have acquired the GIL
+        /// before calling any of these methods.
+        /// </summary>
 #if (UCS4)
         public const int UCS = 4;
 #endif
@@ -227,55 +218,55 @@ public class Runtime {
         /// <summary>
         /// Intitialize the runtime...
         /// </summary>
-        internal static void Initialize() {
- 
-        is32bit = IntPtr.Size == 4;
-
-        if (0 == Runtime.Py_IsInitialized())
+        internal static void Initialize()
         {
-            Runtime.Py_Initialize();
-        }
+            is32bit = IntPtr.Size == 4;
 
-        if (0 == Runtime.PyEval_ThreadsInitialized())
-        {
-            Runtime.PyEval_InitThreads();
-        }
+            if (0 == Runtime.Py_IsInitialized())
+            {
+                Runtime.Py_Initialize();
+            }
+
+            if (0 == Runtime.PyEval_ThreadsInitialized())
+            {
+                Runtime.PyEval_InitThreads();
+            }
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
         IntPtr op = Runtime.PyImport_ImportModule("builtins");
         IntPtr dict = Runtime.PyObject_GetAttrString(op, "__dict__");
         PyNotImplemented = Runtime.PyObject_GetAttrString(op, "NotImplemented");
 #else
-        IntPtr dict = Runtime.PyImport_GetModuleDict();
-        IntPtr op = Runtime.PyDict_GetItemString(dict, "__builtin__");
+            IntPtr dict = Runtime.PyImport_GetModuleDict();
+            IntPtr op = Runtime.PyDict_GetItemString(dict, "__builtin__");
 #endif
-        PyBaseObjectType = Runtime.PyObject_GetAttrString(op, "object");
+            PyBaseObjectType = Runtime.PyObject_GetAttrString(op, "object");
 
-        PyModuleType = Runtime.PyObject_Type(op);
-        PyNone = Runtime.PyObject_GetAttrString(op, "None");
-        PyTrue = Runtime.PyObject_GetAttrString(op, "True");
-        PyFalse = Runtime.PyObject_GetAttrString(op, "False");
+            PyModuleType = Runtime.PyObject_Type(op);
+            PyNone = Runtime.PyObject_GetAttrString(op, "None");
+            PyTrue = Runtime.PyObject_GetAttrString(op, "True");
+            PyFalse = Runtime.PyObject_GetAttrString(op, "False");
 
-        PyBoolType = Runtime.PyObject_Type(PyTrue);
-        PyNoneType = Runtime.PyObject_Type(PyNone);
-        PyTypeType = Runtime.PyObject_Type(PyNoneType);
+            PyBoolType = Runtime.PyObject_Type(PyTrue);
+            PyNoneType = Runtime.PyObject_Type(PyNone);
+            PyTypeType = Runtime.PyObject_Type(PyNoneType);
 
-        op = Runtime.PyObject_GetAttrString(dict, "keys");
-        PyMethodType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyObject_GetAttrString(dict, "keys");
+            PyMethodType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
         Runtime.Decref(dict);
         Runtime.Decref(op);
 #endif
 
-        op = Runtime.PyString_FromString("string");
-        PyStringType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyString_FromString("string");
+            PyStringType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
-        op = Runtime.PyUnicode_FromString("unicode");
-        PyUnicodeType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyUnicode_FromString("unicode");
+            PyUnicodeType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
         op = Runtime.PyBytes_FromString("bytes");
@@ -283,50 +274,50 @@ internal static void Initialize() {
         Runtime.Decref(op);
 #endif
 
-        op = Runtime.PyTuple_New(0);
-        PyTupleType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyTuple_New(0);
+            PyTupleType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
-        op = Runtime.PyList_New(0);
-        PyListType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyList_New(0);
+            PyListType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
-        op = Runtime.PyDict_New();
-        PyDictType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyDict_New();
+            PyDictType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
-        op = Runtime.PyInt_FromInt32(0);
-        PyIntType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyInt_FromInt32(0);
+            PyIntType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
-        op = Runtime.PyLong_FromLong(0);
-        PyLongType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyLong_FromLong(0);
+            PyLongType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
-        op = Runtime.PyFloat_FromDouble(0);
-        PyFloatType = Runtime.PyObject_Type(op);
-        Runtime.Decref(op);
+            op = Runtime.PyFloat_FromDouble(0);
+            PyFloatType = Runtime.PyObject_Type(op);
+            Runtime.Decref(op);
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
         PyClassType = IntPtr.Zero;
         PyInstanceType = IntPtr.Zero;
 #else
-        IntPtr s = Runtime.PyString_FromString("_temp");
-        IntPtr d = Runtime.PyDict_New();
+            IntPtr s = Runtime.PyString_FromString("_temp");
+            IntPtr d = Runtime.PyDict_New();
 
-        IntPtr c = Runtime.PyClass_New(IntPtr.Zero, d, s);
-        PyClassType = Runtime.PyObject_Type(c);
+            IntPtr c = Runtime.PyClass_New(IntPtr.Zero, d, s);
+            PyClassType = Runtime.PyObject_Type(c);
 
-        IntPtr i = Runtime.PyInstance_New(c, IntPtr.Zero, IntPtr.Zero);
-        PyInstanceType = Runtime.PyObject_Type(i);
+            IntPtr i = Runtime.PyInstance_New(c, IntPtr.Zero, IntPtr.Zero);
+            PyInstanceType = Runtime.PyObject_Type(i);
 
-        Runtime.Decref(s);
-        Runtime.Decref(i);
-        Runtime.Decref(c);
-        Runtime.Decref(d);
+            Runtime.Decref(s);
+            Runtime.Decref(i);
+            Runtime.Decref(c);
+            Runtime.Decref(d);
 #endif
 
-        Error = new IntPtr(-1);
+            Error = new IntPtr(-1);
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
         IntPtr dll = IntPtr.Zero;
@@ -342,12 +333,12 @@ internal static void Initialize() {
 #endif
 
 
-        // Determine whether we need to wrap exceptions for versions of
-        // of the Python runtime that do not allow new-style classes to
-        // be used as exceptions (Python versions 2.4 and lower).
+            // Determine whether we need to wrap exceptions for versions of
+            // of the Python runtime that do not allow new-style classes to
+            // be used as exceptions (Python versions 2.4 and lower).
 
 #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
-        wrap_exceptions = false;
+            wrap_exceptions = false;
 #else
         IntPtr m = PyImport_ImportModule("exceptions");
         Exceptions.ErrorCheck(m);
@@ -360,59 +351,62 @@ internal static void Initialize() {
         Runtime.Decref(m);
 #endif
 
-        // Initialize modules that depend on the runtime class.
-        AssemblyManager.Initialize();
-        PyCLRMetaType = MetaType.Initialize();
-        Exceptions.Initialize();
-        ImportHook.Initialize();
-
-        // Need to add the runtime directory to sys.path so that we
-        // can find built-in assemblies like System.Data, et. al.
-        string rtdir = RuntimeEnvironment.GetRuntimeDirectory();
-        IntPtr path = Runtime.PySys_GetObject("path");
-        IntPtr item = Runtime.PyString_FromString(rtdir);
-        Runtime.PyList_Append(path, item);
-        Runtime.Decref(item);
-        AssemblyManager.UpdatePath();
-    }
+            // Initialize modules that depend on the runtime class.
+            AssemblyManager.Initialize();
+            PyCLRMetaType = MetaType.Initialize();
+            Exceptions.Initialize();
+            ImportHook.Initialize();
+
+            // Need to add the runtime directory to sys.path so that we
+            // can find built-in assemblies like System.Data, et. al.
+            string rtdir = RuntimeEnvironment.GetRuntimeDirectory();
+            IntPtr path = Runtime.PySys_GetObject("path");
+            IntPtr item = Runtime.PyString_FromString(rtdir);
+            Runtime.PyList_Append(path, item);
+            Runtime.Decref(item);
+            AssemblyManager.UpdatePath();
+        }
 
-    internal static void Shutdown() {
-        AssemblyManager.Shutdown();
-        Exceptions.Shutdown();
-        ImportHook.Shutdown();
-        Py_Finalize();
-    }
+        internal static void Shutdown()
+        {
+            AssemblyManager.Shutdown();
+            Exceptions.Shutdown();
+            ImportHook.Shutdown();
+            Py_Finalize();
+        }
 
-    // called *without* the GIL aquired by clr._AtExit
-    internal static int AtExit() {
-        lock (IsFinalizingLock) {
-            IsFinalizing = true;
+        // called *without* the GIL aquired by clr._AtExit
+        internal static int AtExit()
+        {
+            lock (IsFinalizingLock)
+            {
+                IsFinalizing = true;
+            }
+            return 0;
         }
-        return 0;
-    }
 
-    internal static IntPtr Py_single_input = (IntPtr)256;
-    internal static IntPtr Py_file_input = (IntPtr)257;
-    internal static IntPtr Py_eval_input = (IntPtr)258;
-
-    internal static IntPtr PyBaseObjectType;
-    internal static IntPtr PyModuleType;
-    internal static IntPtr PyClassType;
-    internal static IntPtr PyInstanceType;
-    internal static IntPtr PyCLRMetaType;
-    internal static IntPtr PyMethodType;
-
-    internal static IntPtr PyUnicodeType;
-    internal static IntPtr PyStringType;
-    internal static IntPtr PyTupleType;
-    internal static IntPtr PyListType;
-    internal static IntPtr PyDictType;
-    internal static IntPtr PyIntType;
-    internal static IntPtr PyLongType;
-    internal static IntPtr PyFloatType;
-    internal static IntPtr PyBoolType;
-    internal static IntPtr PyNoneType;
-    internal static IntPtr PyTypeType;
+        internal static IntPtr Py_single_input = (IntPtr)256;
+        internal static IntPtr Py_file_input = (IntPtr)257;
+        internal static IntPtr Py_eval_input = (IntPtr)258;
+
+        internal static IntPtr PyBaseObjectType;
+        internal static IntPtr PyModuleType;
+        internal static IntPtr PyClassType;
+        internal static IntPtr PyInstanceType;
+        internal static IntPtr PyCLRMetaType;
+        internal static IntPtr PyMethodType;
+
+        internal static IntPtr PyUnicodeType;
+        internal static IntPtr PyStringType;
+        internal static IntPtr PyTupleType;
+        internal static IntPtr PyListType;
+        internal static IntPtr PyDictType;
+        internal static IntPtr PyIntType;
+        internal static IntPtr PyLongType;
+        internal static IntPtr PyFloatType;
+        internal static IntPtr PyBoolType;
+        internal static IntPtr PyNoneType;
+        internal static IntPtr PyTypeType;
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     internal static IntPtr PyBytesType;
@@ -425,175 +419,218 @@ internal static int AtExit() {
     internal static IntPtr _PyObject_NextNotImplemented;
 #endif
 
-    internal static IntPtr PyTrue;
-    internal static IntPtr PyFalse;
-    internal static IntPtr PyNone;
-    internal static IntPtr Error;
+        internal static IntPtr PyTrue;
+        internal static IntPtr PyFalse;
+        internal static IntPtr PyNone;
+        internal static IntPtr Error;
 
 
+        internal static IntPtr GetBoundArgTuple(IntPtr obj, IntPtr args)
+        {
+            if (Runtime.PyObject_TYPE(args) != Runtime.PyTupleType)
+            {
+                Exceptions.SetError(Exceptions.TypeError, "tuple expected");
+                return IntPtr.Zero;
+            }
+            int size = Runtime.PyTuple_Size(args);
+            IntPtr items = Runtime.PyTuple_New(size + 1);
+            Runtime.PyTuple_SetItem(items, 0, obj);
+            Runtime.Incref(obj);
+
+            for (int i = 0; i < size; i++)
+            {
+                IntPtr item = Runtime.PyTuple_GetItem(args, i);
+                Runtime.Incref(item);
+                Runtime.PyTuple_SetItem(items, i + 1, item);
+            }
 
-    internal static IntPtr GetBoundArgTuple(IntPtr obj, IntPtr args) {
-        if (Runtime.PyObject_TYPE(args) != Runtime.PyTupleType) {
-            Exceptions.SetError(Exceptions.TypeError, "tuple expected");
-            return IntPtr.Zero;
-        }
-        int size = Runtime.PyTuple_Size(args);
-        IntPtr items = Runtime.PyTuple_New(size + 1);
-        Runtime.PyTuple_SetItem(items, 0, obj);
-        Runtime.Incref(obj);
-
-        for (int i = 0; i < size; i++) {
-            IntPtr item = Runtime.PyTuple_GetItem(args, i);
-            Runtime.Incref(item);
-            Runtime.PyTuple_SetItem(items, i + 1, item);
+            return items;
         }
 
-        return items;
-    }
 
+        internal static IntPtr ExtendTuple(IntPtr t, params IntPtr[] args)
+        {
+            int size = Runtime.PyTuple_Size(t);
+            int add = args.Length;
+            IntPtr item;
+
+            IntPtr items = Runtime.PyTuple_New(size + add);
+            for (int i = 0; i < size; i++)
+            {
+                item = Runtime.PyTuple_GetItem(t, i);
+                Runtime.Incref(item);
+                Runtime.PyTuple_SetItem(items, i, item);
+            }
 
-    internal static IntPtr ExtendTuple(IntPtr t, params IntPtr[] args) {
-        int size = Runtime.PyTuple_Size(t);
-        int add = args.Length;
-        IntPtr item;
+            for (int n = 0; n < add; n++)
+            {
+                item = args[n];
+                Runtime.Incref(item);
+                Runtime.PyTuple_SetItem(items, size + n, item);
+            }
 
-        IntPtr items = Runtime.PyTuple_New(size + add);
-        for (int i = 0; i < size; i++) {
-            item = Runtime.PyTuple_GetItem(t, i);
-            Runtime.Incref(item);
-            Runtime.PyTuple_SetItem(items, i, item);
+            return items;
         }
 
-        for (int n = 0; n < add; n++) {
-            item = args[n];
-            Runtime.Incref(item);
-            Runtime.PyTuple_SetItem(items, size + n, item);
+        internal static Type[] PythonArgsToTypeArray(IntPtr arg)
+        {
+            return PythonArgsToTypeArray(arg, false);
         }
 
-        return items;
-    }
-
-    internal static Type[] PythonArgsToTypeArray(IntPtr arg) {
-        return PythonArgsToTypeArray(arg, false);
-    }
+        internal static Type[] PythonArgsToTypeArray(IntPtr arg, bool mangleObjects)
+        {
+            // Given a PyObject * that is either a single type object or a
+            // tuple of (managed or unmanaged) type objects, return a Type[]
+            // containing the CLR Type objects that map to those types.
+            IntPtr args = arg;
+            bool free = false;
+
+            if (!Runtime.PyTuple_Check(arg))
+            {
+                args = Runtime.PyTuple_New(1);
+                Runtime.Incref(arg);
+                Runtime.PyTuple_SetItem(args, 0, arg);
+                free = true;
+            }
 
-    internal static Type[] PythonArgsToTypeArray(IntPtr arg, bool mangleObjects) {
-        // Given a PyObject * that is either a single type object or a
-        // tuple of (managed or unmanaged) type objects, return a Type[]
-        // containing the CLR Type objects that map to those types.
-        IntPtr args = arg;
-        bool free = false;
-
-        if (!Runtime.PyTuple_Check(arg)) {
-            args = Runtime.PyTuple_New(1);
-            Runtime.Incref(arg);
-            Runtime.PyTuple_SetItem(args, 0, arg);
-            free = true;
-        }
+            int n = Runtime.PyTuple_Size(args);
+            Type[] types = new Type[n];
+            Type t = null;
 
-        int n = Runtime.PyTuple_Size(args);
-        Type[] types = new Type[n];
-        Type t = null;
+            for (int i = 0; i < n; i++)
+            {
+                IntPtr op = Runtime.PyTuple_GetItem(args, i);
+                if (mangleObjects && (!Runtime.PyType_Check(op)))
+                {
+                    op = Runtime.PyObject_TYPE(op);
+                }
+                ManagedType mt = ManagedType.GetManagedObject(op);
 
-        for (int i = 0; i < n; i++) {
-            IntPtr op = Runtime.PyTuple_GetItem(args, i);
-            if (mangleObjects && (!Runtime.PyType_Check(op))) {
-                op = Runtime.PyObject_TYPE(op);
-            }
-            ManagedType mt = ManagedType.GetManagedObject(op);
+                if (mt is ClassBase)
+                {
+                    t = ((ClassBase)mt).type;
+                }
+                else if (mt is CLRObject)
+                {
+                    object inst = ((CLRObject)mt).inst;
+                    if (inst is Type)
+                    {
+                        t = inst as Type;
+                    }
+                }
+                else
+                {
+                    t = Converter.GetTypeByAlias(op);
+                }
 
-            if (mt is ClassBase) {
-                t = ((ClassBase)mt).type;
-            }
-            else if (mt is CLRObject) {
-                object inst = ((CLRObject)mt).inst;
-                if (inst is Type) {
-                    t = inst as Type;
+                if (t == null)
+                {
+                    types = null;
+                    break;
                 }
+                types[i] = t;
             }
-            else {
-                t = Converter.GetTypeByAlias(op);
-            }
-
-            if (t == null) {
-                types = null;
-                break;
+            if (free)
+            {
+                Runtime.Decref(args);
             }
-            types[i] = t;
-        }
-        if (free) {
-            Runtime.Decref(args);
+            return types;
         }
-        return types;
-    }
 
-    //===================================================================
-    // Managed exports of the Python C API. Where appropriate, we do
-    // some optimization to avoid managed <--> unmanaged transitions
-    // (mostly for heavily used methods).
-    //===================================================================
+        //===================================================================
+        // Managed exports of the Python C API. Where appropriate, we do
+        // some optimization to avoid managed <--> unmanaged transitions
+        // (mostly for heavily used methods).
+        //===================================================================
 
-    internal unsafe static void Incref(IntPtr op) {
+        internal unsafe static void Incref(IntPtr op)
+        {
 #if (Py_DEBUG)
         Py_IncRef(op);
         return;
 #else
-        void *p = (void *)op;
-        if ((void *)0 != p) {
-        if (is32bit) { (*(int *)p)++;  }
-        else         { (*(long *)p)++; }
-        }
+            void* p = (void*)op;
+            if ((void*)0 != p)
+            {
+                if (is32bit)
+                {
+                    (*(int*)p)++;
+                }
+                else
+                {
+                    (*(long*)p)++;
+                }
+            }
 #endif
-    }
-
-    internal unsafe static void Decref(IntPtr op) {
-        if (op == IntPtr.Zero) {
-            DebugUtil.Print("Decref(NULL)");
         }
+
+        internal unsafe static void Decref(IntPtr op)
+        {
+            if (op == IntPtr.Zero)
+            {
+                DebugUtil.Print("Decref(NULL)");
+            }
 #if (Py_DEBUG)
-        // Py_DecRef calls Python's Py_DECREF
+    // Py_DecRef calls Python's Py_DECREF
         Py_DecRef(op);
         return;
 #else
-        void* p = (void*) op;
-        if ((void*) 0 != p) {
-            if (is32bit) { --(*(int*) p); }
-            else        { --(*(long*) p); }
-            if ((*(int*) p) == 0) {
-                // PyObject_HEAD: struct _typeobject *ob_type
-                void* t = is32bit ? (void*) (*((uint*) p + 1)) :
-                                    (void*) (*((ulong*) p + 1));
-                // PyTypeObject: destructor tp_dealloc
-                void* f = is32bit ? (void*) (*((uint*) t + 6)) :
-                    (void*) (*((ulong*) t + 6));
-                if ((void*) 0 == f) {
+            void* p = (void*)op;
+            if ((void*)0 != p)
+            {
+                if (is32bit)
+                {
+                    --(*(int*)p);
+                }
+                else
+                {
+                    --(*(long*)p);
+                }
+                if ((*(int*)p) == 0)
+                {
+                    // PyObject_HEAD: struct _typeobject *ob_type
+                    void* t = is32bit
+                        ? (void*)(*((uint*)p + 1))
+                        : (void*)(*((ulong*)p + 1));
+                    // PyTypeObject: destructor tp_dealloc
+                    void* f = is32bit
+                        ? (void*)(*((uint*)t + 6))
+                        : (void*)(*((ulong*)t + 6));
+                    if ((void*)0 == f)
+                    {
+                        return;
+                    }
+                    NativeCall.Impl.Void_Call_1(new IntPtr(f), op);
                     return;
                 }
-                NativeCall.Impl.Void_Call_1(new IntPtr(f), op);
-                return;
             }
-        }
 #endif
-    }
+        }
 
-    internal unsafe static long Refcount(IntPtr op)
-    {
-        void* p = (void*)op;
-        if ((void*)0 != p)
+        internal unsafe static long Refcount(IntPtr op)
         {
-            if (is32bit) { return (*(int*)p); }
-            else { return (*(long*)p); }
+            void* p = (void*)op;
+            if ((void*)0 != p)
+            {
+                if (is32bit)
+                {
+                    return (*(int*)p);
+                }
+                else
+                {
+                    return (*(long*)p);
+                }
+            }
+            return 0;
         }
-        return 0;
-    }
 
 #if (Py_DEBUG)
     // Py_IncRef and Py_DecRef are taking care of the extra payload
-    // in Py_DEBUG builds of Python like _Py_RefTotal 
+    // in Py_DEBUG builds of Python like _Py_RefTotal
     [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
         ExactSpelling=true, CharSet=CharSet.Ansi)]
     private unsafe static extern void
-    Py_IncRef(IntPtr ob); 
+    Py_IncRef(IntPtr ob);
 
    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
         ExactSpelling=true, CharSet=CharSet.Ansi)]
@@ -601,77 +638,77 @@ private unsafe static extern void
     Py_DecRef(IntPtr ob);
 #endif
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    Py_Initialize();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            Py_Initialize();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    Py_IsInitialized();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            Py_IsInitialized();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    Py_Finalize();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            Py_Finalize();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    Py_NewInterpreter();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            Py_NewInterpreter();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern void
-    Py_EndInterpreter(IntPtr threadState);
+            Py_EndInterpreter(IntPtr threadState);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyThreadState_New(IntPtr istate);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyThreadState_New(IntPtr istate);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyThreadState_Get();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyThreadState_Get();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyThread_get_key_value(IntPtr key);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyThread_get_key_value(IntPtr key);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyThread_get_thread_ident();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyThread_get_thread_ident();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyThread_set_key_value(IntPtr key, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyThread_set_key_value(IntPtr key, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyThreadState_Swap(IntPtr key);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyThreadState_Swap(IntPtr key);
 
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyGILState_Ensure();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyGILState_Ensure();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyGILState_Release(IntPtr gs);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyGILState_Release(IntPtr gs);
 
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyGILState_GetThisThreadState();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyGILState_GetThisThreadState();
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
@@ -679,66 +716,66 @@ internal unsafe static extern IntPtr
     public unsafe static extern int
     Py_Main(int argc, [MarshalAsAttribute(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPWStr)] string[] argv);
 #else
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    public unsafe static extern int
-    Py_Main(int argc, string[] argv);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        public unsafe static extern int
+            Py_Main(int argc, string[] argv);
 #endif
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyEval_InitThreads();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyEval_InitThreads();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyEval_ThreadsInitialized();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyEval_ThreadsInitialized();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyEval_AcquireLock();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyEval_AcquireLock();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyEval_ReleaseLock();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyEval_ReleaseLock();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyEval_AcquireThread(IntPtr tstate);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyEval_AcquireThread(IntPtr tstate);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyEval_ReleaseThread(IntPtr tstate);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyEval_ReleaseThread(IntPtr tstate);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyEval_SaveThread();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyEval_SaveThread();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyEval_RestoreThread(IntPtr tstate);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyEval_RestoreThread(IntPtr tstate);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyEval_GetBuiltins();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyEval_GetBuiltins();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyEval_GetGlobals();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyEval_GetGlobals();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyEval_GetLocals();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyEval_GetLocals();
 
 
 #if PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35
@@ -775,216 +812,222 @@ internal unsafe static extern string
         internal unsafe static extern void
         Py_SetPath([MarshalAsAttribute(UnmanagedType.LPWStr)]string home);
 #else
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-          ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern string
-    Py_GetProgramName();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern string
+            Py_GetProgramName();
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern void
-    Py_SetProgramName(string name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            Py_SetProgramName(string name);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern string
-    Py_GetPythonHome();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern string
+            Py_GetPythonHome();
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern void
-    Py_SetPythonHome(string home);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            Py_SetPythonHome(string home);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern string
-    Py_GetPath();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern string
+            Py_GetPath();
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern void
-    Py_SetPath(string home);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            Py_SetPath(string home);
 #endif
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern string
-        Py_GetVersion();
+            Py_GetVersion();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern string
-        Py_GetPlatform();
+            Py_GetPlatform();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern string
-        Py_GetCopyright();
+            Py_GetCopyright();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern string
-        Py_GetCompiler();
+            Py_GetCompiler();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern string
-        Py_GetBuildInfo();
+            Py_GetBuildInfo();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern int
-        PyRun_SimpleString(string code);
+            PyRun_SimpleString(string code);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-        PyRun_String(string code, IntPtr st, IntPtr globals, IntPtr locals);
+            PyRun_String(string code, IntPtr st, IntPtr globals, IntPtr locals);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-        Py_CompileString(string code, string file, IntPtr tok);
+            Py_CompileString(string code, string file, IntPtr tok);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-        PyImport_ExecCodeModule(string name, IntPtr code);
+            PyImport_ExecCodeModule(string name, IntPtr code);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyCFunction_NewEx(IntPtr ml, IntPtr self, IntPtr mod);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyCFunction_NewEx(IntPtr ml, IntPtr self, IntPtr mod);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyCFunction_Call(IntPtr func, IntPtr args, IntPtr kw);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyCFunction_Call(IntPtr func, IntPtr args, IntPtr kw);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyClass_New(IntPtr bases, IntPtr dict, IntPtr name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyClass_New(IntPtr bases, IntPtr dict, IntPtr name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyInstance_New(IntPtr cls, IntPtr args, IntPtr kw);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyInstance_New(IntPtr cls, IntPtr args, IntPtr kw);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyInstance_NewRaw(IntPtr cls, IntPtr dict);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyInstance_NewRaw(IntPtr cls, IntPtr dict);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyMethod_New(IntPtr func, IntPtr self, IntPtr cls);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyMethod_New(IntPtr func, IntPtr self, IntPtr cls);
 
 
-    //====================================================================
-    // Python abstract object API
-    //====================================================================
+        //====================================================================
+        // Python abstract object API
+        //====================================================================
 
-    // A macro-like method to get the type of a Python object. This is
-    // designed to be lean and mean in IL & avoid managed <-> unmanaged
-    // transitions. Note that this does not incref the type object.
+        // A macro-like method to get the type of a Python object. This is
+        // designed to be lean and mean in IL & avoid managed <-> unmanaged
+        // transitions. Note that this does not incref the type object.
 
-    internal unsafe static IntPtr
-    PyObject_TYPE(IntPtr op) {
-        void* p = (void*)op;
-        if ((void*)0 == p) {
-            return IntPtr.Zero;
-        }
+        internal unsafe static IntPtr
+            PyObject_TYPE(IntPtr op)
+        {
+            void* p = (void*)op;
+            if ((void*)0 == p)
+            {
+                return IntPtr.Zero;
+            }
 #if (Py_DEBUG)
         int n = 3;
 #else
-        int n = 1;
+            int n = 1;
 #endif
-        if (is32bit) {
-            return new IntPtr((void*)(*((uint*)p + n)));
-        }
-        else {
-            return new IntPtr((void*)(*((ulong*)p + n)));
+            if (is32bit)
+            {
+                return new IntPtr((void*)(*((uint*)p + n)));
+            }
+            else
+            {
+                return new IntPtr((void*)(*((ulong*)p + n)));
+            }
         }
-    }
 
-    // Managed version of the standard Python C API PyObject_Type call.
-    // This version avoids a managed <-> unmanaged transition. This one
-    // does incref the returned type object.
+        // Managed version of the standard Python C API PyObject_Type call.
+        // This version avoids a managed <-> unmanaged transition. This one
+        // does incref the returned type object.
 
-    internal unsafe static IntPtr
-    PyObject_Type(IntPtr op) {
-        IntPtr tp = PyObject_TYPE(op);
-        Runtime.Incref(tp);
-        return tp;
-    }
+        internal unsafe static IntPtr
+            PyObject_Type(IntPtr op)
+        {
+            IntPtr tp = PyObject_TYPE(op);
+            Runtime.Incref(tp);
+            return tp;
+        }
 
-    internal static string PyObject_GetTypeName(IntPtr op) {
-        IntPtr pyType = Marshal.ReadIntPtr(op, ObjectOffset.ob_type);
-        IntPtr ppName = Marshal.ReadIntPtr(pyType, TypeOffset.tp_name);
-        return Marshal.PtrToStringAnsi(ppName);
-    }
+        internal static string PyObject_GetTypeName(IntPtr op)
+        {
+            IntPtr pyType = Marshal.ReadIntPtr(op, ObjectOffset.ob_type);
+            IntPtr ppName = Marshal.ReadIntPtr(pyType, TypeOffset.tp_name);
+            return Marshal.PtrToStringAnsi(ppName);
+        }
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern int
-        PyObject_HasAttrString(IntPtr pointer, string name);
+            PyObject_HasAttrString(IntPtr pointer, string name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-        PyObject_GetAttrString(IntPtr pointer, string name);
+            PyObject_GetAttrString(IntPtr pointer, string name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern int
-        PyObject_SetAttrString(IntPtr pointer, string name, IntPtr value);
+            PyObject_SetAttrString(IntPtr pointer, string name, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern int
-        PyObject_HasAttr(IntPtr pointer, IntPtr name);
+            PyObject_HasAttr(IntPtr pointer, IntPtr name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-        PyObject_GetAttr(IntPtr pointer, IntPtr name);
+            PyObject_GetAttr(IntPtr pointer, IntPtr name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern int
-        PyObject_SetAttr(IntPtr pointer, IntPtr name, IntPtr value);
+            PyObject_SetAttr(IntPtr pointer, IntPtr name, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-        PyObject_GetItem(IntPtr pointer, IntPtr key);
+            PyObject_GetItem(IntPtr pointer, IntPtr key);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern int
-        PyObject_SetItem(IntPtr pointer, IntPtr key, IntPtr value);
+            PyObject_SetItem(IntPtr pointer, IntPtr key, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern int
-        PyObject_DelItem(IntPtr pointer, IntPtr key);
+            PyObject_DelItem(IntPtr pointer, IntPtr key);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-        PyObject_GetIter(IntPtr op);
+            PyObject_GetIter(IntPtr op);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-        PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw);
+            PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyObject_CallObject(IntPtr pointer, IntPtr args);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyObject_CallObject(IntPtr pointer, IntPtr args);
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
@@ -1016,57 +1059,57 @@ internal static int PyObject_Compare(IntPtr value1, IntPtr value2) {
         return -1;
     }
 #else
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyObject_Compare(IntPtr value1, IntPtr value2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyObject_Compare(IntPtr value1, IntPtr value2);
 #endif
 
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyObject_IsInstance(IntPtr ob, IntPtr type);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyObject_IsInstance(IntPtr ob, IntPtr type);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyObject_IsSubclass(IntPtr ob, IntPtr type);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyObject_IsSubclass(IntPtr ob, IntPtr type);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyCallable_Check(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyCallable_Check(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern int
-    PyObject_IsTrue(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyObject_IsTrue(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern int
-    PyObject_Not(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyObject_Not(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyObject_Size(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyObject_Size(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyObject_Hash(IntPtr op);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyObject_Hash(IntPtr op);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyObject_Repr(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyObject_Repr(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyObject_Str(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyObject_Str(IntPtr pointer);
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
@@ -1075,21 +1118,21 @@ internal unsafe static extern IntPtr
     internal unsafe static extern IntPtr
     PyObject_Unicode(IntPtr pointer);
 #else
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyObject_Unicode(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyObject_Unicode(IntPtr pointer);
 #endif
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyObject_Dir(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyObject_Dir(IntPtr pointer);
 
 
-    //====================================================================
-    // Python number API
-    //====================================================================
+        //====================================================================
+        // Python number API
+        //====================================================================
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
@@ -1098,47 +1141,51 @@ internal unsafe static extern IntPtr
     internal unsafe static extern IntPtr
     PyNumber_Int(IntPtr ob);
 #else // Python 2
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Int(IntPtr ob);
+
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Int(IntPtr ob);
 #endif
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Long(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Long(IntPtr ob);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Float(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Float(IntPtr ob);
 
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern bool
-    PyNumber_Check(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern bool
+            PyNumber_Check(IntPtr ob);
 
 
-    internal static bool PyInt_Check(IntPtr ob) {
-        return PyObject_TypeCheck(ob, Runtime.PyIntType);
-    }
+        internal static bool PyInt_Check(IntPtr ob)
+        {
+            return PyObject_TypeCheck(ob, Runtime.PyIntType);
+        }
 
-    internal static bool PyBool_Check(IntPtr ob) {
-        return PyObject_TypeCheck(ob, Runtime.PyBoolType);
-    }
+        internal static bool PyBool_Check(IntPtr ob)
+        {
+            return PyObject_TypeCheck(ob, Runtime.PyBoolType);
+        }
 
-    internal static IntPtr PyInt_FromInt32(int value)
-    {
-        IntPtr v = new IntPtr(value);
-        return PyInt_FromLong(v);
-    }
+        internal static IntPtr PyInt_FromInt32(int value)
+        {
+            IntPtr v = new IntPtr(value);
+            return PyInt_FromLong(v);
+        }
 
-    internal static IntPtr PyInt_FromInt64(long value) {
-        IntPtr v = new IntPtr(value);
-        return PyInt_FromLong(v);
-    }
+        internal static IntPtr PyInt_FromInt64(long value)
+        {
+            IntPtr v = new IntPtr(value);
+            return PyInt_FromLong(v);
+        }
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
@@ -1165,322 +1212,328 @@ internal unsafe static extern IntPtr
     internal unsafe static extern int
     PyInt_GetMax();
 #else // Python 2
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    private unsafe static extern IntPtr
-    PyInt_FromLong(IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyInt_AsLong(IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        private unsafe static extern IntPtr
+            PyInt_FromLong(IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyInt_FromString(string value, IntPtr end, int radix);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyInt_AsLong(IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyInt_GetMax();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyInt_FromString(string value, IntPtr end, int radix);
+
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyInt_GetMax();
 #endif
 
-    internal static bool PyLong_Check(IntPtr ob) {
-        return PyObject_TYPE(ob) == Runtime.PyLongType;
-    }
+        internal static bool PyLong_Check(IntPtr ob)
+        {
+            return PyObject_TYPE(ob) == Runtime.PyLongType;
+        }
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyLong_FromLong(long value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyLong_FromLong(long value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyLong_FromUnsignedLong(uint value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyLong_FromUnsignedLong(uint value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyLong_FromDouble(double value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyLong_FromDouble(double value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyLong_FromLongLong(long value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyLong_FromLongLong(long value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyLong_FromUnsignedLongLong(ulong value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyLong_FromUnsignedLongLong(ulong value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyLong_FromString(string value, IntPtr end, int radix);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyLong_FromString(string value, IntPtr end, int radix);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyLong_AsLong(IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyLong_AsLong(IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern uint
-    PyLong_AsUnsignedLong(IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern uint
+            PyLong_AsUnsignedLong(IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern long
-    PyLong_AsLongLong(IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern long
+            PyLong_AsLongLong(IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern ulong
-    PyLong_AsUnsignedLongLong(IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern ulong
+            PyLong_AsUnsignedLongLong(IntPtr value);
 
 
-    internal static bool PyFloat_Check(IntPtr ob) {
-        return PyObject_TYPE(ob) == Runtime.PyFloatType;
-    }
+        internal static bool PyFloat_Check(IntPtr ob)
+        {
+            return PyObject_TYPE(ob) == Runtime.PyFloatType;
+        }
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyFloat_FromDouble(double value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyFloat_FromDouble(double value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyFloat_FromString(IntPtr value, IntPtr junk);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyFloat_FromString(IntPtr value, IntPtr junk);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern double
-    PyFloat_AsDouble(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern double
+            PyFloat_AsDouble(IntPtr ob);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Add(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Add(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Subtract(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Subtract(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Multiply(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Multiply(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Divide(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Divide(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_And(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_And(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Xor(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Xor(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Or(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Or(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Lshift(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Lshift(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Rshift(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Rshift(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Power(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Power(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Remainder(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Remainder(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceAdd(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceAdd(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceSubtract(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceSubtract(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceMultiply(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceMultiply(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceDivide(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceDivide(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceAnd(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceAnd(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceXor(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceXor(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceOr(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceOr(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceLshift(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceLshift(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceRshift(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceRshift(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlacePower(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlacePower(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_InPlaceRemainder(IntPtr o1, IntPtr o2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_InPlaceRemainder(IntPtr o1, IntPtr o2);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Negative(IntPtr o1);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Negative(IntPtr o1);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Positive(IntPtr o1);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Positive(IntPtr o1);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyNumber_Invert(IntPtr o1);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyNumber_Invert(IntPtr o1);
 
-    //====================================================================
-    // Python sequence API
-    //====================================================================
+        //====================================================================
+        // Python sequence API
+        //====================================================================
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern bool
-    PySequence_Check(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern bool
+            PySequence_Check(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PySequence_GetItem(IntPtr pointer, int index);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PySequence_GetItem(IntPtr pointer, int index);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySequence_SetItem(IntPtr pointer, int index, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySequence_SetItem(IntPtr pointer, int index, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySequence_DelItem(IntPtr pointer, int index);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySequence_DelItem(IntPtr pointer, int index);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PySequence_GetSlice(IntPtr pointer, int i1, int i2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PySequence_GetSlice(IntPtr pointer, int i1, int i2);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySequence_SetSlice(IntPtr pointer, int i1, int i2, IntPtr v);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySequence_SetSlice(IntPtr pointer, int i1, int i2, IntPtr v);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySequence_DelSlice(IntPtr pointer, int i1, int i2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySequence_DelSlice(IntPtr pointer, int i1, int i2);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySequence_Size(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySequence_Size(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySequence_Contains(IntPtr pointer, IntPtr item);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySequence_Contains(IntPtr pointer, IntPtr item);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PySequence_Concat(IntPtr pointer, IntPtr other);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PySequence_Concat(IntPtr pointer, IntPtr other);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PySequence_Repeat(IntPtr pointer, int count);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PySequence_Repeat(IntPtr pointer, int count);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySequence_Index(IntPtr pointer, IntPtr item);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySequence_Index(IntPtr pointer, IntPtr item);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySequence_Count(IntPtr pointer, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySequence_Count(IntPtr pointer, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PySequence_Tuple(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PySequence_Tuple(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PySequence_List(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PySequence_List(IntPtr pointer);
 
 
-    //====================================================================
-    // Python string API
-    //====================================================================
+        //====================================================================
+        // Python string API
+        //====================================================================
 
-    internal static bool IsStringType(IntPtr op) {
-        IntPtr t = PyObject_TYPE(op);
-        return (t == PyStringType) || (t == PyUnicodeType);
-    }
+        internal static bool IsStringType(IntPtr op)
+        {
+            IntPtr t = PyObject_TYPE(op);
+            return (t == PyStringType) || (t == PyUnicodeType);
+        }
 
-    internal static bool PyString_Check(IntPtr ob) {
-        return PyObject_TYPE(ob) == Runtime.PyStringType;
-    }
+        internal static bool PyString_Check(IntPtr ob)
+        {
+            return PyObject_TYPE(ob) == Runtime.PyStringType;
+        }
 
-    internal static IntPtr PyString_FromString(string value) {
-        return PyString_FromStringAndSize(value, value.Length);
-    }
+        internal static IntPtr PyString_FromString(string value)
+        {
+            return PyString_FromStringAndSize(value, value.Length);
+        }
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
@@ -1533,26 +1586,28 @@ internal unsafe static extern IntPtr
 #endif
 
 #else // Python2x
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyString_FromStringAndSize(string value, int size);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-           EntryPoint="PyString_AsString",
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyString_AS_STRING(IntPtr op);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyString_FromStringAndSize(string value, int size);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyString_Size(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            EntryPoint = "PyString_AsString",
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyString_AS_STRING(IntPtr op);
+
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyString_Size(IntPtr pointer);
 #endif
 
-    internal static bool PyUnicode_Check(IntPtr ob) {
-        return PyObject_TYPE(ob) == Runtime.PyUnicodeType;
-    }
+        internal static bool PyUnicode_Check(IntPtr ob)
+        {
+            return PyObject_TYPE(ob) == Runtime.PyUnicodeType;
+        }
 
 #if (UCS2)
 #if (PYTHON33 || PYTHON34 || PYTHON35)
@@ -1576,7 +1631,7 @@ internal unsafe static extern IntPtr
     internal static IntPtr PyUnicode_FromUnicode(string s, int size) {
         return PyUnicode_FromKindAndString(2, s, size);
     }
-    
+
     [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
         ExactSpelling = true, CharSet = CharSet.Unicode)]
     internal unsafe static extern int
@@ -1697,7 +1752,7 @@ internal unsafe static extern IntPtr
     internal static IntPtr PyUnicode_FromUnicode(string s, int size) {
         return PyUnicode_FromKindAndString(4, s, size);
     }
-    
+
     [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
         ExactSpelling = true, CharSet = CharSet.Ansi)]
     internal unsafe static extern int
@@ -1720,283 +1775,285 @@ internal unsafe static extern IntPtr
     PyUnicode_FromOrdinal(int c);
 
 #else
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-           EntryPoint = "PyUnicodeUCS4_FromObject",
-        ExactSpelling = true, CharSet = CharSet.Unicode)]
-    internal unsafe static extern IntPtr
-    PyUnicode_FromObject(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            EntryPoint = "PyUnicodeUCS4_FromObject",
+            ExactSpelling = true, CharSet = CharSet.Unicode)]
+        internal unsafe static extern IntPtr
+            PyUnicode_FromObject(IntPtr ob);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-           EntryPoint = "PyUnicodeUCS4_FromEncodedObject",
-        ExactSpelling = true, CharSet = CharSet.Unicode)]
-    internal unsafe static extern IntPtr
-    PyUnicode_FromEncodedObject(IntPtr ob, IntPtr enc, IntPtr err);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            EntryPoint = "PyUnicodeUCS4_FromEncodedObject",
+            ExactSpelling = true, CharSet = CharSet.Unicode)]
+        internal unsafe static extern IntPtr
+            PyUnicode_FromEncodedObject(IntPtr ob, IntPtr enc, IntPtr err);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-           EntryPoint = "PyUnicodeUCS4_FromUnicode",
-        ExactSpelling = true)]
-    internal unsafe static extern IntPtr
-    PyUnicode_FromUnicode(
-    [MarshalAs (UnmanagedType.CustomMarshaler,
-         MarshalTypeRef=typeof(Utf32Marshaler))]
-    string s, int size);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            EntryPoint = "PyUnicodeUCS4_FromUnicode",
+            ExactSpelling = true)]
+        internal unsafe static extern IntPtr
+            PyUnicode_FromUnicode(
+            [MarshalAs(UnmanagedType.CustomMarshaler,
+                MarshalTypeRef = typeof(Utf32Marshaler))] string s, int size);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-           EntryPoint = "PyUnicodeUCS4_GetSize",
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern int
-    PyUnicode_GetSize(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            EntryPoint = "PyUnicodeUCS4_GetSize",
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyUnicode_GetSize(IntPtr ob);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-           EntryPoint = "PyUnicodeUCS4_AsUnicode",
-        ExactSpelling = true)]
-    internal unsafe static extern IntPtr
-    PyUnicode_AsUnicode(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            EntryPoint = "PyUnicodeUCS4_AsUnicode",
+            ExactSpelling = true)]
+        internal unsafe static extern IntPtr
+            PyUnicode_AsUnicode(IntPtr ob);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-           EntryPoint = "PyUnicodeUCS4_AsUnicode",
-        ExactSpelling = true, CharSet = CharSet.Unicode)]
-    internal unsafe static extern IntPtr
-    PyUnicode_AS_UNICODE(IntPtr op);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            EntryPoint = "PyUnicodeUCS4_AsUnicode",
+            ExactSpelling = true, CharSet = CharSet.Unicode)]
+        internal unsafe static extern IntPtr
+            PyUnicode_AS_UNICODE(IntPtr op);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-           EntryPoint = "PyUnicodeUCS4_FromOrdinal",
-        ExactSpelling = true, CharSet = CharSet.Unicode)]
-    internal unsafe static extern IntPtr
-    PyUnicode_FromOrdinal(int c);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            EntryPoint = "PyUnicodeUCS4_FromOrdinal",
+            ExactSpelling = true, CharSet = CharSet.Unicode)]
+        internal unsafe static extern IntPtr
+            PyUnicode_FromOrdinal(int c);
 
 #endif
 
-    internal static IntPtr PyUnicode_FromString(string s)
-    {
-        return PyUnicode_FromUnicode(s, (s.Length));
-    }
+        internal static IntPtr PyUnicode_FromString(string s)
+        {
+            return PyUnicode_FromUnicode(s, (s.Length));
+        }
 
-    internal unsafe static string GetManagedString(IntPtr op)
-    {
-        IntPtr type = PyObject_TYPE(op);
+        internal unsafe static string GetManagedString(IntPtr op)
+        {
+            IntPtr type = PyObject_TYPE(op);
 
 // Python 3 strings are all unicode
 #if !(PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
-        if (type == Runtime.PyStringType)
-        {
-            return Marshal.PtrToStringAnsi(
-                       PyString_AS_STRING(op),
-                       Runtime.PyString_Size(op)
-                       );
-        }
+            if (type == Runtime.PyStringType)
+            {
+                return Marshal.PtrToStringAnsi(
+                    PyString_AS_STRING(op),
+                    Runtime.PyString_Size(op)
+                    );
+            }
 #endif
 
-        if (type == Runtime.PyUnicodeType)
-        {
-            IntPtr p = Runtime.PyUnicode_AsUnicode(op);
-            int length = Runtime.PyUnicode_GetSize(op);
-            int size = length * 4;
-            byte[] buffer = new byte[size];
-            Marshal.Copy(p, buffer, 0, size);
-            return Encoding.UTF32.GetString(buffer, 0, size);
-        }
+            if (type == Runtime.PyUnicodeType)
+            {
+                IntPtr p = Runtime.PyUnicode_AsUnicode(op);
+                int length = Runtime.PyUnicode_GetSize(op);
+                int size = length*4;
+                byte[] buffer = new byte[size];
+                Marshal.Copy(p, buffer, 0, size);
+                return Encoding.UTF32.GetString(buffer, 0, size);
+            }
 
-        return null;
-    }
+            return null;
+        }
 #endif
 
-    //====================================================================
-    // Python dictionary API
-    //====================================================================
+        //====================================================================
+        // Python dictionary API
+        //====================================================================
 
-    internal static bool PyDict_Check(IntPtr ob) {
-        return PyObject_TYPE(ob) == Runtime.PyDictType;
-    }
+        internal static bool PyDict_Check(IntPtr ob)
+        {
+            return PyObject_TYPE(ob) == Runtime.PyDictType;
+        }
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyDict_New();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyDict_New();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyDictProxy_New(IntPtr dict);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyDictProxy_New(IntPtr dict);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyDict_GetItem(IntPtr pointer, IntPtr key);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyDict_GetItem(IntPtr pointer, IntPtr key);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyDict_GetItemString(IntPtr pointer, string key);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyDict_GetItemString(IntPtr pointer, string key);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyDict_SetItem(IntPtr pointer, IntPtr key, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyDict_SetItem(IntPtr pointer, IntPtr key, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyDict_SetItemString(IntPtr pointer, string key, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyDict_SetItemString(IntPtr pointer, string key, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyDict_DelItem(IntPtr pointer, IntPtr key);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyDict_DelItem(IntPtr pointer, IntPtr key);
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern int
-    PyDict_DelItemString(IntPtr pointer, string key);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyDict_DelItemString(IntPtr pointer, string key);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyMapping_HasKey(IntPtr pointer, IntPtr key);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyMapping_HasKey(IntPtr pointer, IntPtr key);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyDict_Keys(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyDict_Keys(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyDict_Values(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyDict_Values(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyDict_Items(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyDict_Items(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyDict_Copy(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyDict_Copy(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyDict_Update(IntPtr pointer, IntPtr other);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyDict_Update(IntPtr pointer, IntPtr other);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyDict_Clear(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyDict_Clear(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyDict_Size(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyDict_Size(IntPtr pointer);
 
 
-    //====================================================================
-    // Python list API
-    //====================================================================
+        //====================================================================
+        // Python list API
+        //====================================================================
 
-    internal static bool PyList_Check(IntPtr ob) {
-        return PyObject_TYPE(ob) == Runtime.PyListType;
-    }
+        internal static bool PyList_Check(IntPtr ob)
+        {
+            return PyObject_TYPE(ob) == Runtime.PyListType;
+        }
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyList_New(int size);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyList_New(int size);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyList_AsTuple(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyList_AsTuple(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyList_GetItem(IntPtr pointer, int index);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyList_GetItem(IntPtr pointer, int index);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyList_SetItem(IntPtr pointer, int index, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyList_SetItem(IntPtr pointer, int index, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyList_Insert(IntPtr pointer, int index, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyList_Insert(IntPtr pointer, int index, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyList_Append(IntPtr pointer, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyList_Append(IntPtr pointer, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyList_Reverse(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyList_Reverse(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyList_Sort(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyList_Sort(IntPtr pointer);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyList_GetSlice(IntPtr pointer, int start, int end);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyList_GetSlice(IntPtr pointer, int start, int end);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyList_SetSlice(IntPtr pointer, int start, int end, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyList_SetSlice(IntPtr pointer, int start, int end, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyList_Size(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyList_Size(IntPtr pointer);
 
 
-    //====================================================================
-    // Python tuple API
-    //====================================================================
+        //====================================================================
+        // Python tuple API
+        //====================================================================
 
-    internal static bool PyTuple_Check(IntPtr ob) {
-        return PyObject_TYPE(ob) == Runtime.PyTupleType;
-    }
+        internal static bool PyTuple_Check(IntPtr ob)
+        {
+            return PyObject_TYPE(ob) == Runtime.PyTupleType;
+        }
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyTuple_New(int size);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyTuple_New(int size);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyTuple_GetItem(IntPtr pointer, int index);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyTuple_GetItem(IntPtr pointer, int index);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyTuple_SetItem(IntPtr pointer, int index, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyTuple_SetItem(IntPtr pointer, int index, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyTuple_GetSlice(IntPtr pointer, int start, int end);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyTuple_GetSlice(IntPtr pointer, int start, int end);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyTuple_Size(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyTuple_Size(IntPtr pointer);
 
 
-    //====================================================================
-    // Python iterator API
-    //====================================================================
+        //====================================================================
+        // Python iterator API
+        //====================================================================
 
 #if !(PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern bool
-    PyIter_Check(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern bool
+            PyIter_Check(IntPtr pointer);
 #else
     internal static bool
     PyIter_Check(IntPtr pointer)
@@ -2007,34 +2064,34 @@ internal static bool
     }
 #endif
 
-    [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
-        ExactSpelling = true, CharSet = CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyIter_Next(IntPtr pointer);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyIter_Next(IntPtr pointer);
 
-    //====================================================================
-    // Python module API
-    //====================================================================
+        //====================================================================
+        // Python module API
+        //====================================================================
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyModule_New(string name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyModule_New(string name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern string
-    PyModule_GetName(IntPtr module);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern string
+            PyModule_GetName(IntPtr module);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyModule_GetDict(IntPtr module);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyModule_GetDict(IntPtr module);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern string
-    PyModule_GetFilename(IntPtr module);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern string
+            PyModule_GetFilename(IntPtr module);
 
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
     [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
@@ -2043,222 +2100,221 @@ internal unsafe static extern IntPtr
     PyModule_Create2(IntPtr module, int apiver);
 #endif
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyImport_Import(IntPtr name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyImport_Import(IntPtr name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyImport_ImportModule(string name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyImport_ImportModule(string name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyImport_ReloadModule(IntPtr module);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyImport_ReloadModule(IntPtr module);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyImport_AddModule(string name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyImport_AddModule(string name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyImport_GetModuleDict();
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyImport_GetModuleDict();
 
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PySys_SetArgv(int argc, IntPtr argv);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PySys_SetArgv(int argc, IntPtr argv);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PySys_GetObject(string name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PySys_GetObject(string name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PySys_SetObject(string name, IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PySys_SetObject(string name, IntPtr ob);
 
 
-    //====================================================================
-    // Python type object API
-    //====================================================================
+        //====================================================================
+        // Python type object API
+        //====================================================================
 
-    internal static bool PyType_Check(IntPtr ob) {
-        return PyObject_TypeCheck(ob, Runtime.PyTypeType);
-    }
+        internal static bool PyType_Check(IntPtr ob)
+        {
+            return PyObject_TypeCheck(ob, Runtime.PyTypeType);
+        }
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern bool
-    PyType_IsSubtype(IntPtr t1, IntPtr t2);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern bool
+            PyType_IsSubtype(IntPtr t1, IntPtr t2);
 
-        internal static bool PyObject_TypeCheck(IntPtr ob, IntPtr tp) {
-      IntPtr t = PyObject_TYPE(ob);
-      return (t == tp) || PyType_IsSubtype(t, tp);
-    }
+        internal static bool PyObject_TypeCheck(IntPtr ob, IntPtr tp)
+        {
+            IntPtr t = PyObject_TYPE(ob);
+            return (t == tp) || PyType_IsSubtype(t, tp);
+        }
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyType_GenericNew(IntPtr type, IntPtr args, IntPtr kw);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyType_GenericNew(IntPtr type, IntPtr args, IntPtr kw);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyType_GenericAlloc(IntPtr type, int n);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyType_GenericAlloc(IntPtr type, int n);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyType_Ready(IntPtr type);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyType_Ready(IntPtr type);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    _PyType_Lookup(IntPtr type, IntPtr name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            _PyType_Lookup(IntPtr type, IntPtr name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyObject_GenericGetAttr(IntPtr obj, IntPtr name);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyObject_GenericGetAttr(IntPtr obj, IntPtr name);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyObject_GenericSetAttr(IntPtr obj, IntPtr name, IntPtr value);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyObject_GenericSetAttr(IntPtr obj, IntPtr name, IntPtr value);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    _PyObject_GetDictPtr(IntPtr obj);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            _PyObject_GetDictPtr(IntPtr obj);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyObject_GC_New(IntPtr tp);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyObject_GC_New(IntPtr tp);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyObject_GC_Del(IntPtr tp);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyObject_GC_Del(IntPtr tp);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyObject_GC_Track(IntPtr tp);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyObject_GC_Track(IntPtr tp);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyObject_GC_UnTrack(IntPtr tp);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyObject_GC_UnTrack(IntPtr tp);
 
 
-    //====================================================================
-    // Python memory API
-    //====================================================================
+        //====================================================================
+        // Python memory API
+        //====================================================================
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyMem_Malloc(int size);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyMem_Malloc(int size);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyMem_Realloc(IntPtr ptr, int size);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyMem_Realloc(IntPtr ptr, int size);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyMem_Free(IntPtr ptr);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyMem_Free(IntPtr ptr);
 
 
-    //====================================================================
-    // Python exception API
-    //====================================================================
+        //====================================================================
+        // Python exception API
+        //====================================================================
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyErr_SetString(IntPtr ob, string message);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyErr_SetString(IntPtr ob, string message);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyErr_SetObject(IntPtr ob, IntPtr message);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyErr_SetObject(IntPtr ob, IntPtr message);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern IntPtr
-    PyErr_SetFromErrno(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern IntPtr
+            PyErr_SetFromErrno(IntPtr ob);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern void
-    PyErr_SetNone(IntPtr ob);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern void
+            PyErr_SetNone(IntPtr ob);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyErr_ExceptionMatches(IntPtr exception);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyErr_ExceptionMatches(IntPtr exception);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
-    internal unsafe static extern int
-    PyErr_GivenExceptionMatches(IntPtr ob, IntPtr val);
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
+        internal unsafe static extern int
+            PyErr_GivenExceptionMatches(IntPtr ob, IntPtr val);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern void
-    PyErr_NormalizeException(IntPtr ob, IntPtr val, IntPtr tb);
+            PyErr_NormalizeException(IntPtr ob, IntPtr val, IntPtr tb);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern int
-    PyErr_Occurred();
+            PyErr_Occurred();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern void
-    PyErr_Fetch(ref IntPtr ob, ref IntPtr val, ref IntPtr tb);
+            PyErr_Fetch(ref IntPtr ob, ref IntPtr val, ref IntPtr tb);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern void
-    PyErr_Restore(IntPtr ob, IntPtr val, IntPtr tb);
+            PyErr_Restore(IntPtr ob, IntPtr val, IntPtr tb);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern void
-    PyErr_Clear();
+            PyErr_Clear();
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern void
-    PyErr_Print();
+            PyErr_Print();
 
 
-    //====================================================================
-    // Miscellaneous
-    //====================================================================
+        //====================================================================
+        // Miscellaneous
+        //====================================================================
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-    PyMethod_Self(IntPtr ob);
+            PyMethod_Self(IntPtr ob);
 
-    [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl,
-        ExactSpelling=true, CharSet=CharSet.Ansi)]
+        [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl,
+            ExactSpelling = true, CharSet = CharSet.Ansi)]
         internal unsafe static extern IntPtr
-    PyMethod_Function(IntPtr ob);
-
+            PyMethod_Function(IntPtr ob);
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/typemanager.cs b/src/runtime/typemanager.cs
index d022625ab..9a76bff2d 100644
--- a/src/runtime/typemanager.cs
+++ b/src/runtime/typemanager.cs
@@ -1,12 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Runtime.InteropServices;
 using System.Reflection.Emit;
@@ -15,19 +6,20 @@
 using System.Reflection;
 using System.Threading;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //=======================================================================
     // The TypeManager class is responsible for building binary-compatible
     // Python type objects that are implemented in managed code.
     //=======================================================================
 
-    internal class TypeManager {
-
+    internal class TypeManager
+    {
         static BindingFlags tbFlags;
         static Dictionary<Type, IntPtr> cache;
 
-        static TypeManager() {
+        static TypeManager()
+        {
             tbFlags = BindingFlags.Public | BindingFlags.Static;
             cache = new Dictionary<Type, IntPtr>(128);
         }
@@ -40,12 +32,14 @@ static TypeManager() {
         // descriptor and utility types like ModuleObject, PropertyObject, etc.
         //====================================================================
 
-        internal static IntPtr GetTypeHandle(Type type) {
+        internal static IntPtr GetTypeHandle(Type type)
+        {
             // Note that these types are cached with a refcount of 1, so they
             // effectively exist until the CPython runtime is finalized.
             IntPtr handle = IntPtr.Zero;
             cache.TryGetValue(type, out handle);
-            if (handle != IntPtr.Zero) {
+            if (handle != IntPtr.Zero)
+            {
                 return handle;
             }
             handle = CreateType(type);
@@ -60,10 +54,12 @@ internal static IntPtr GetTypeHandle(Type type) {
         // the appropriate semantics in Python for the reflected managed type.
         //====================================================================
 
-        internal static IntPtr GetTypeHandle(ManagedType obj, Type type) {
+        internal static IntPtr GetTypeHandle(ManagedType obj, Type type)
+        {
             IntPtr handle = IntPtr.Zero;
             cache.TryGetValue(type, out handle);
-            if (handle != IntPtr.Zero) {
+            if (handle != IntPtr.Zero)
+            {
                 return handle;
             }
             handle = CreateType(obj, type);
@@ -81,8 +77,8 @@ internal static IntPtr GetTypeHandle(ManagedType obj, Type type) {
         // do as much of the allocation and initialization work as possible.
         //====================================================================
 
-        internal static IntPtr CreateType(Type impl) {
-
+        internal static IntPtr CreateType(Type impl)
+        {
             IntPtr type = AllocateTypeObject(impl.Name);
             int ob_size = ObjectOffset.Size(type);
 
@@ -110,15 +106,18 @@ internal static IntPtr CreateType(Type impl) {
         }
 
 
-        internal static IntPtr CreateType(ManagedType impl, Type clrType) {
+        internal static IntPtr CreateType(ManagedType impl, Type clrType)
+        {
             // Cleanup the type name to get rid of funny nested type names.
             string name = "CLR." + clrType.FullName;
             int i = name.LastIndexOf('+');
-            if (i > -1) {
+            if (i > -1)
+            {
                 name = name.Substring(i + 1);
             }
             i = name.LastIndexOf('.');
-            if (i > -1) {
+            if (i > -1)
+            {
                 name = name.Substring(i + 1);
             }
 
@@ -140,16 +139,18 @@ internal static IntPtr CreateType(ManagedType impl, Type clrType) {
             {
                 base_ = Exceptions.Exception;
                 Runtime.Incref(base_);
-            } else
-#endif
-            if (clrType.BaseType != null) {
-                ClassBase bc = ClassManager.GetClass(clrType.BaseType);
-                base_ = bc.pyHandle;
             }
+            else
+#endif
+                if (clrType.BaseType != null)
+                {
+                    ClassBase bc = ClassManager.GetClass(clrType.BaseType);
+                    base_ = bc.pyHandle;
+                }
 
             IntPtr type = AllocateTypeObject(name);
 
-            Marshal.WriteIntPtr(type,TypeOffset.ob_type,Runtime.PyCLRMetaType);
+            Marshal.WriteIntPtr(type, TypeOffset.ob_type, Runtime.PyCLRMetaType);
             Runtime.Incref(Runtime.PyCLRMetaType);
 
             Marshal.WriteIntPtr(type, TypeOffset.tp_basicsize, (IntPtr)ob_size);
@@ -158,7 +159,8 @@ internal static IntPtr CreateType(ManagedType impl, Type clrType) {
 
             InitializeSlots(type, impl.GetType());
 
-            if (base_ != IntPtr.Zero) {
+            if (base_ != IntPtr.Zero)
+            {
                 Marshal.WriteIntPtr(type, TypeOffset.tp_base, base_);
                 Runtime.Incref(base_);
             }
@@ -245,10 +247,10 @@ internal static IntPtr CreateSubType(IntPtr py_name, IntPtr py_base_type, IntPtr
             try
             {
                 Type subType = ClassDerivedObject.CreateDerivedType(name,
-                                                                    baseClass.type,
-                                                                    py_dict,
-                                                                    (string)namespaceStr,
-                                                                    (string)assembly);
+                    baseClass.type,
+                    py_dict,
+                    (string)namespaceStr,
+                    (string)assembly);
 
                 // create the new ManagedType and python type
                 ClassBase subClass = ClassManager.GetClass(subType);
@@ -267,33 +269,34 @@ internal static IntPtr CreateSubType(IntPtr py_name, IntPtr py_base_type, IntPtr
             }
         }
 
-        internal static IntPtr WriteMethodDef(IntPtr mdef, IntPtr name, IntPtr func, int flags, IntPtr doc)
-        {
-            Marshal.WriteIntPtr(mdef, name);
-            Marshal.WriteIntPtr(mdef, (1 * IntPtr.Size), func);
-            Marshal.WriteInt32(mdef, (2 * IntPtr.Size), flags);
-            Marshal.WriteIntPtr(mdef, (3 * IntPtr.Size), doc);
-            return mdef + 4 * IntPtr.Size;
+        internal static IntPtr WriteMethodDef(IntPtr mdef, IntPtr name, IntPtr func, int flags, IntPtr doc)
+        {
+            Marshal.WriteIntPtr(mdef, name);
+            Marshal.WriteIntPtr(mdef, (1*IntPtr.Size), func);
+            Marshal.WriteInt32(mdef, (2*IntPtr.Size), flags);
+            Marshal.WriteIntPtr(mdef, (3*IntPtr.Size), doc);
+            return mdef + 4*IntPtr.Size;
         }
 
-        internal static IntPtr WriteMethodDef(IntPtr mdef, string name, IntPtr func, int flags = 0x0001, string doc = null)
-        {
-            IntPtr namePtr = Marshal.StringToHGlobalAnsi(name);
-            IntPtr docPtr = doc != null ? Marshal.StringToHGlobalAnsi(doc) : IntPtr.Zero;
-
-            return WriteMethodDef(mdef, namePtr, func, flags, docPtr);
-        }
+        internal static IntPtr WriteMethodDef(IntPtr mdef, string name, IntPtr func, int flags = 0x0001,
+            string doc = null)
+        {
+            IntPtr namePtr = Marshal.StringToHGlobalAnsi(name);
+            IntPtr docPtr = doc != null ? Marshal.StringToHGlobalAnsi(doc) : IntPtr.Zero;
 
-        internal static IntPtr WriteMethodDefSentinel(IntPtr mdef)
-        {
-            return WriteMethodDef(mdef, IntPtr.Zero, IntPtr.Zero, 0, IntPtr.Zero);
+            return WriteMethodDef(mdef, namePtr, func, flags, docPtr);
         }
 
-        internal static IntPtr CreateMetaType(Type impl) {
+        internal static IntPtr WriteMethodDefSentinel(IntPtr mdef)
+        {
+            return WriteMethodDef(mdef, IntPtr.Zero, IntPtr.Zero, 0, IntPtr.Zero);
+        }
 
+        internal static IntPtr CreateMetaType(Type impl)
+        {
             // The managed metatype is functionally little different than the
             // standard Python metatype (PyType_Type). It overrides certain of
-            // the standard type slots, and has to subclass PyType_Type for 
+            // the standard type slots, and has to subclass PyType_Type for
             // certain functions in the C runtime to work correctly with it.
 
             IntPtr type = AllocateTypeObject("CLR Metatype");
@@ -322,25 +325,25 @@ internal static IntPtr CreateMetaType(Type impl) {
             flags |= TypeFlags.Managed;
             flags |= TypeFlags.HeapType;
             flags |= TypeFlags.HaveGC;
-            Marshal.WriteIntPtr(type, TypeOffset.tp_flags, (IntPtr)flags);
-
-            // We need space for 3 PyMethodDef structs, each of them
-            // 4 int-ptrs in size.
-            IntPtr mdef = Runtime.PyMem_Malloc(3 * (4 * IntPtr.Size));
-            IntPtr mdefStart = mdef;
-            mdef = WriteMethodDef(
-                mdef,
-                "__instancecheck__",
-                Interop.GetThunk(typeof(MetaType).GetMethod("__instancecheck__"), "BinaryFunc")
-                );
-
-            mdef = WriteMethodDef(
-                mdef,
-                "__subclasscheck__",
-                Interop.GetThunk(typeof(MetaType).GetMethod("__subclasscheck__"), "BinaryFunc")
-                );
-
-            mdef = WriteMethodDefSentinel(mdef);
+            Marshal.WriteIntPtr(type, TypeOffset.tp_flags, (IntPtr)flags);
+
+            // We need space for 3 PyMethodDef structs, each of them
+            // 4 int-ptrs in size.
+            IntPtr mdef = Runtime.PyMem_Malloc(3*(4*IntPtr.Size));
+            IntPtr mdefStart = mdef;
+            mdef = WriteMethodDef(
+                mdef,
+                "__instancecheck__",
+                Interop.GetThunk(typeof(MetaType).GetMethod("__instancecheck__"), "BinaryFunc")
+                );
+
+            mdef = WriteMethodDef(
+                mdef,
+                "__subclasscheck__",
+                Interop.GetThunk(typeof(MetaType).GetMethod("__subclasscheck__"), "BinaryFunc")
+                );
+
+            mdef = WriteMethodDefSentinel(mdef);
 
             Marshal.WriteIntPtr(type, TypeOffset.tp_methods, mdefStart);
 
@@ -357,8 +360,8 @@ internal static IntPtr CreateMetaType(Type impl) {
 
 
         internal static IntPtr BasicSubType(string name, IntPtr base_,
-                                            Type impl) {
-
+            Type impl)
+        {
             // Utility to create a subtype of a std Python type, but with
             // a managed type able to override implementation
 
@@ -401,16 +404,17 @@ internal static IntPtr BasicSubType(string name, IntPtr base_,
         // Utility method to allocate a type object & do basic initialization.
         //====================================================================
 
-        internal static IntPtr AllocateTypeObject(string name) {
+        internal static IntPtr AllocateTypeObject(string name)
+        {
             IntPtr type = Runtime.PyType_GenericAlloc(Runtime.PyTypeType, 0);
 
             // Cheat a little: we'll set tp_name to the internal char * of
             // the Python version of the type name - otherwise we'd have to
             // allocate the tp_name and would have no way to free it.
 #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35)
-            // For python3 we leak two objects. One for the ascii representation
-            // required for tp_name, and another for the unicode representation
-            // for ht_name.
+    // For python3 we leak two objects. One for the ascii representation
+    // required for tp_name, and another for the unicode representation
+    // for ht_name.
             IntPtr temp = Runtime.PyBytes_FromString(name);
             IntPtr raw = Runtime.PyBytes_AS_STRING(temp);
             temp = Runtime.PyUnicode_FromString(name);
@@ -454,28 +458,33 @@ internal static IntPtr AllocateTypeObject(string name) {
         // the Python object to the managed methods of the implementing Type.
         //====================================================================
 
-        internal static void InitializeSlots(IntPtr type, Type impl) {
+        internal static void InitializeSlots(IntPtr type, Type impl)
+        {
             Hashtable seen = new Hashtable(8);
             Type offsetType = typeof(TypeOffset);
 
-            while (impl != null) {
+            while (impl != null)
+            {
                 MethodInfo[] methods = impl.GetMethods(tbFlags);
-                for (int i = 0; i < methods.Length; i++) {
+                for (int i = 0; i < methods.Length; i++)
+                {
                     MethodInfo method = methods[i];
                     string name = method.Name;
-                    if (! (name.StartsWith("tp_") ||
-                           name.StartsWith("nb_") ||
-                           name.StartsWith("sq_") ||
-                           name.StartsWith("mp_") ||
-                           name.StartsWith("bf_")
-                           ) ) {
+                    if (!(name.StartsWith("tp_") ||
+                          name.StartsWith("nb_") ||
+                          name.StartsWith("sq_") ||
+                          name.StartsWith("mp_") ||
+                          name.StartsWith("bf_")
+                        ))
+                    {
                         continue;
                     }
 
-                    if (seen[name] != null) {
+                    if (seen[name] != null)
+                    {
                         continue;
                     }
-                    
+
                     FieldInfo fi = offsetType.GetField(name);
                     int offset = (int)fi.GetValue(offsetType);
 
@@ -487,7 +496,6 @@ internal static void InitializeSlots(IntPtr type, Type impl) {
 
                 impl = impl.BaseType;
             }
-
         }
 
 
@@ -497,20 +505,25 @@ internal static void InitializeSlots(IntPtr type, Type impl) {
         // to appear in the Python type __dict__ (based on custom attribute).
         //====================================================================
 
-        private static void InitMethods(IntPtr pytype, Type type) {
+        private static void InitMethods(IntPtr pytype, Type type)
+        {
             IntPtr dict = Marshal.ReadIntPtr(pytype, TypeOffset.tp_dict);
             Type marker = typeof(PythonMethodAttribute);
 
             BindingFlags flags = BindingFlags.Public | BindingFlags.Static;
             HashSet<string> addedMethods = new HashSet<string>();
 
-            while (type != null) {
+            while (type != null)
+            {
                 MethodInfo[] methods = type.GetMethods(flags);
-                for (int i = 0; i < methods.Length; i++) {
+                for (int i = 0; i < methods.Length; i++)
+                {
                     MethodInfo method = methods[i];
-                    if (!addedMethods.Contains(method.Name)) {
+                    if (!addedMethods.Contains(method.Name))
+                    {
                         object[] attrs = method.GetCustomAttributes(marker, false);
-                        if (attrs.Length > 0) {
+                        if (attrs.Length > 0)
+                        {
                             string method_name = method.Name;
                             MethodInfo[] mi = new MethodInfo[1];
                             mi[0] = method;
@@ -529,13 +542,10 @@ private static void InitMethods(IntPtr pytype, Type type) {
         // Utility method to copy slots from a given type to another type.
         //====================================================================
 
-        internal static void CopySlot(IntPtr from, IntPtr to, int offset) {
+        internal static void CopySlot(IntPtr from, IntPtr to, int offset)
+        {
             IntPtr fp = Marshal.ReadIntPtr(from, offset);
             Marshal.WriteIntPtr(to, offset, fp);
         }
-
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/typemethod.cs b/src/runtime/typemethod.cs
index 9170e5a4c..4e46da2da 100644
--- a/src/runtime/typemethod.cs
+++ b/src/runtime/typemethod.cs
@@ -1,54 +1,48 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.Reflection;
 
-namespace Python.Runtime {
-
+namespace Python.Runtime
+{
     //========================================================================
     // Implements a Python type that provides access to CLR object methods.
     //========================================================================
 
-    internal class TypeMethod : MethodObject {
-
-        public TypeMethod(Type type, string name, MethodInfo[] info) : 
-               base(type, name, info) {}
+    internal class TypeMethod : MethodObject
+    {
+        public TypeMethod(Type type, string name, MethodInfo[] info) :
+            base(type, name, info)
+        {
+        }
 
         public TypeMethod(Type type, string name, MethodInfo[] info, bool allow_threads) :
-               base(type, name, info, allow_threads) { }
+            base(type, name, info, allow_threads)
+        {
+        }
 
-        public override IntPtr Invoke(IntPtr ob, IntPtr args, IntPtr kw) {
+        public override IntPtr Invoke(IntPtr ob, IntPtr args, IntPtr kw)
+        {
             MethodInfo mi = this.info[0];
             Object[] arglist = new Object[3];
             arglist[0] = ob;
             arglist[1] = args;
             arglist[2] = kw;
 
-            try {        
+            try
+            {
                 Object inst = null;
-                if (ob != IntPtr.Zero) {
+                if (ob != IntPtr.Zero)
+                {
                     inst = GetManagedObject(ob);
                 }
-                return (IntPtr)mi.Invoke(inst, BindingFlags.Default, null, arglist, 
-                                 null);
+                return (IntPtr)mi.Invoke(inst, BindingFlags.Default, null, arglist,
+                    null);
             }
-            catch (Exception e) {
+            catch (Exception e)
+            {
                 Exceptions.SetError(e);
                 return IntPtr.Zero;
             }
         }
-
-
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/runtime/x64/clrmodule-platform.il b/src/runtime/x64/clrmodule-platform.il
index d04f74603..bb188df52 100644
--- a/src/runtime/x64/clrmodule-platform.il
+++ b/src/runtime/x64/clrmodule-platform.il
@@ -1,11 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
 
 .vtfixup [1] int64 fromunmanaged at VT_01
 .data VT_01 = int64(0)
diff --git a/src/runtime/x86/clrmodule-platform.il b/src/runtime/x86/clrmodule-platform.il
index aeac29658..f4855c5e2 100644
--- a/src/runtime/x86/clrmodule-platform.il
+++ b/src/runtime/x86/clrmodule-platform.il
@@ -1,11 +1,3 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
 
 .vtfixup [1] int32 fromunmanaged at VT_01
 .data VT_01 = int32(0)
diff --git a/src/testing/Python.Test.csproj b/src/testing/Python.Test.csproj
index 46ca484bc..354a6eae6 100644
--- a/src/testing/Python.Test.csproj
+++ b/src/testing/Python.Test.csproj
@@ -38,7 +38,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseMono|x86'">
     <OutputPath>bin\x86\ReleaseMono\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x86</PlatformTarget>
@@ -49,7 +50,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseMono|x64'">
     <OutputPath>bin\x64\ReleaseMono\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x64</PlatformTarget>
@@ -57,7 +59,7 @@
     <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
     <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
     <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
-  </PropertyGroup>  
+  </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86'">
     <DebugSymbols>true</DebugSymbols>
     <OutputPath>bin\x86\DebugWin\</OutputPath>
@@ -68,7 +70,7 @@
     <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
-  </PropertyGroup>  
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|x64'">
     <DebugSymbols>true</DebugSymbols>
     <OutputPath>bin\x64\DebugWin\</OutputPath>
@@ -82,7 +84,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x86'">
     <OutputPath>bin\x86\ReleaseWin\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x86</PlatformTarget>
@@ -93,7 +96,8 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
     <OutputPath>bin\x64\ReleaseWin\</OutputPath>
-    <DefineConstants Condition="'$(DefineConstants)' == ''"></DefineConstants>
+    <DefineConstants Condition="'$(DefineConstants)' == ''">
+    </DefineConstants>
     <Optimize>true</Optimize>
     <DebugType>pdbonly</DebugType>
     <PlatformTarget>x64</PlatformTarget>
@@ -127,7 +131,6 @@
     <Reference Include="System.Core">
       <RequiredTargetFramework>3.5</RequiredTargetFramework>
     </Reference>
-    <Reference Include="System.Windows.Forms" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\runtime\Python.Runtime.csproj">
@@ -145,7 +148,7 @@
     <TargetAssemblyPdb>$(TargetDir)$(TargetName).pdb</TargetAssemblyPdb>
   </PropertyGroup>
   <Target Name="AfterBuild">
-	<Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" />
-	<Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" />
+    <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" />
+    <Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" />
   </Target>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/testing/arraytest.cs b/src/testing/arraytest.cs
index 8c29e8f75..b9891cac8 100644
--- a/src/testing/arraytest.cs
+++ b/src/testing/arraytest.cs
@@ -1,252 +1,246 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports units tests for indexer access.
     //========================================================================
 
-    public class PublicArrayTest {
-
+    public class PublicArrayTest
+    {
         public int[] items;
 
-        public PublicArrayTest() {
-            items = new int[5] {0, 1, 2, 3, 4};
+        public PublicArrayTest()
+        {
+            items = new int[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class ProtectedArrayTest {
-
+    public class ProtectedArrayTest
+    {
         protected int[] items;
 
-        public ProtectedArrayTest() {
-            items = new int[5] {0, 1, 2, 3, 4};
+        public ProtectedArrayTest()
+        {
+            items = new int[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class InternalArrayTest {
-
+    public class InternalArrayTest
+    {
         internal int[] items;
 
-        public InternalArrayTest() {
-            items = new int[5] {0, 1, 2, 3, 4};
+        public InternalArrayTest()
+        {
+            items = new int[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class PrivateArrayTest {
-
+    public class PrivateArrayTest
+    {
         private int[] items;
 
-        public PrivateArrayTest() {
-            items = new int[5] {0, 1, 2, 3, 4};
+        public PrivateArrayTest()
+        {
+            items = new int[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class BooleanArrayTest {
-
+    public class BooleanArrayTest
+    {
         public bool[] items;
 
-        public BooleanArrayTest() {
-            items = new bool[5] {true, false, true, false, true};
+        public BooleanArrayTest()
+        {
+            items = new bool[5] { true, false, true, false, true };
         }
-
     }
 
 
-    public class ByteArrayTest {
-
+    public class ByteArrayTest
+    {
         public byte[] items;
 
-        public ByteArrayTest() {
-            items = new byte[5] {0, 1, 2, 3, 4};
+        public ByteArrayTest()
+        {
+            items = new byte[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class SByteArrayTest {
-
+    public class SByteArrayTest
+    {
         public sbyte[] items;
 
-        public SByteArrayTest() {
-            items = new sbyte[5] {0, 1, 2, 3, 4};
+        public SByteArrayTest()
+        {
+            items = new sbyte[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class CharArrayTest {
-
+    public class CharArrayTest
+    {
         public char[] items;
 
-        public CharArrayTest() {
-            items = new char[5] {'a', 'b', 'c', 'd', 'e'};
+        public CharArrayTest()
+        {
+            items = new char[5] { 'a', 'b', 'c', 'd', 'e' };
         }
-
     }
 
 
-    public class Int16ArrayTest {
-
+    public class Int16ArrayTest
+    {
         public short[] items;
 
-        public Int16ArrayTest() {
-            items = new short[5] {0, 1, 2, 3, 4};
+        public Int16ArrayTest()
+        {
+            items = new short[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class Int32ArrayTest {
-
+    public class Int32ArrayTest
+    {
         public int[] items;
 
-        public Int32ArrayTest() {
-            items = new int[5] {0, 1, 2, 3, 4};
+        public Int32ArrayTest()
+        {
+            items = new int[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class Int64ArrayTest {
-
+    public class Int64ArrayTest
+    {
         public long[] items;
 
-        public Int64ArrayTest() {
-            items = new long[5] {0, 1, 2, 3, 4};
+        public Int64ArrayTest()
+        {
+            items = new long[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class UInt16ArrayTest {
-
+    public class UInt16ArrayTest
+    {
         public ushort[] items;
 
-        public UInt16ArrayTest() {
-            items = new ushort[5] {0, 1, 2, 3, 4};
+        public UInt16ArrayTest()
+        {
+            items = new ushort[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class UInt32ArrayTest {
-
+    public class UInt32ArrayTest
+    {
         public uint[] items;
 
-        public UInt32ArrayTest() {
-            items = new uint[5] {0, 1, 2, 3, 4};
+        public UInt32ArrayTest()
+        {
+            items = new uint[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class UInt64ArrayTest {
-
+    public class UInt64ArrayTest
+    {
         public ulong[] items;
 
-        public UInt64ArrayTest() {
-            items = new ulong[5] {0, 1, 2, 3, 4};
+        public UInt64ArrayTest()
+        {
+            items = new ulong[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class SingleArrayTest {
-
+    public class SingleArrayTest
+    {
         public float[] items;
 
-        public SingleArrayTest() {
-            items = new float[5] {0.0F, 1.0F, 2.0F, 3.0F, 4.0F};
+        public SingleArrayTest()
+        {
+            items = new float[5] { 0.0F, 1.0F, 2.0F, 3.0F, 4.0F };
         }
-
     }
 
 
-    public class DoubleArrayTest {
-
+    public class DoubleArrayTest
+    {
         public double[] items;
 
-        public DoubleArrayTest() {
-            items = new double[5] {0.0, 1.0, 2.0, 3.0, 4.0};
+        public DoubleArrayTest()
+        {
+            items = new double[5] { 0.0, 1.0, 2.0, 3.0, 4.0 };
         }
-
     }
 
 
-    public class DecimalArrayTest {
-
+    public class DecimalArrayTest
+    {
         public decimal[] items;
 
-        public DecimalArrayTest() {
-            items = new decimal[5] {0, 1, 2, 3, 4};
+        public DecimalArrayTest()
+        {
+            items = new decimal[5] { 0, 1, 2, 3, 4 };
         }
-
     }
 
 
-    public class StringArrayTest {
-
+    public class StringArrayTest
+    {
         public string[] items;
 
-        public StringArrayTest() {
-            items = new string[5] {"0", "1", "2", "3", "4"};
+        public StringArrayTest()
+        {
+            items = new string[5] { "0", "1", "2", "3", "4" };
         }
-
     }
 
-    public class EnumArrayTest {
-
+    public class EnumArrayTest
+    {
         public ShortEnum[] items;
 
-        public EnumArrayTest() {
-            items = new ShortEnum[5] 
-            { ShortEnum.Zero, 
-              ShortEnum.One, 
-              ShortEnum.Two, 
-              ShortEnum.Three, 
-              ShortEnum.Four};
+        public EnumArrayTest()
+        {
+            items = new ShortEnum[5]
+            {
+                ShortEnum.Zero,
+                ShortEnum.One,
+                ShortEnum.Two,
+                ShortEnum.Three,
+                ShortEnum.Four
+            };
         }
-
     }
 
 
-    public class NullArrayTest {
-
+    public class NullArrayTest
+    {
         public object[] items;
         public object[] empty;
 
-        public NullArrayTest() {
-            items = new object[5] {null, null, null, null, null};
-            empty = new object[0] {};
+        public NullArrayTest()
+        {
+            items = new object[5] { null, null, null, null, null };
+            empty = new object[0] { };
         }
-
     }
 
 
-    public class ObjectArrayTest {
-
+    public class ObjectArrayTest
+    {
         public object[] items;
 
-        public ObjectArrayTest() {
+        public ObjectArrayTest()
+        {
             items = new object[5];
             items[0] = new Spam("0");
             items[1] = new Spam("1");
@@ -254,15 +248,15 @@ public ObjectArrayTest() {
             items[3] = new Spam("3");
             items[4] = new Spam("4");
         }
-
     }
 
 
-    public class InterfaceArrayTest {
-
+    public class InterfaceArrayTest
+    {
         public ISpam[] items;
 
-        public InterfaceArrayTest() {
+        public InterfaceArrayTest()
+        {
             items = new ISpam[5];
             items[0] = new Spam("0");
             items[1] = new Spam("1");
@@ -270,15 +264,15 @@ public InterfaceArrayTest() {
             items[3] = new Spam("3");
             items[4] = new Spam("4");
         }
-
     }
 
 
-    public class TypedArrayTest {
-
+    public class TypedArrayTest
+    {
         public Spam[] items;
 
-        public TypedArrayTest() {
+        public TypedArrayTest()
+        {
             items = new Spam[5];
             items[0] = new Spam("0");
             items[1] = new Spam("1");
@@ -286,46 +280,42 @@ public TypedArrayTest() {
             items[3] = new Spam("3");
             items[4] = new Spam("4");
         }
-
     }
 
 
-    public class MultiDimensionalArrayTest {
-
+    public class MultiDimensionalArrayTest
+    {
         public int[,] items;
 
-        public MultiDimensionalArrayTest() {
-            items = new int[5, 5] {
-                {0, 1, 2, 3, 4},
-                {5, 6, 7, 8, 9},
-                {10, 11, 12, 13, 14},
-                {15, 16, 17, 18, 19},
-                {20, 21, 22, 23, 24}
+        public MultiDimensionalArrayTest()
+        {
+            items = new int[5, 5]
+            {
+                { 0, 1, 2, 3, 4 },
+                { 5, 6, 7, 8, 9 },
+                { 10, 11, 12, 13, 14 },
+                { 15, 16, 17, 18, 19 },
+                { 20, 21, 22, 23, 24 }
             };
-
         }
-
     }
 
 
-    public class ArrayConversionTest {
-
-        public static Spam[] EchoRange(Spam[] items) {
+    public class ArrayConversionTest
+    {
+        public static Spam[] EchoRange(Spam[] items)
+        {
             return items;
         }
 
-        public static Spam[,] EchoRangeMD(Spam[,] items) {
+        public static Spam[,] EchoRangeMD(Spam[,] items)
+        {
             return items;
         }
 
-        public static Spam[][] EchoRangeAA(Spam[][] items) {
+        public static Spam[][] EchoRangeAA(Spam[][] items)
+        {
             return items;
         }
-
     }
-
-
-
-
-}
-
+}
\ No newline at end of file
diff --git a/src/testing/classtest.cs b/src/testing/classtest.cs
index 86239c9c5..5f3b0d7ed 100644
--- a/src/testing/classtest.cs
+++ b/src/testing/classtest.cs
@@ -1,32 +1,26 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports CLR class unit tests.
     //========================================================================
 
-    public class ClassTest {
-
-        public static ArrayList GetArrayList() {
+    public class ClassTest
+    {
+        public static ArrayList GetArrayList()
+        {
             ArrayList list = new ArrayList();
-            for (int i = 0; i < 10; i++) {
+            for (int i = 0; i < 10; i++)
+            {
                 list.Add(i);
             }
             return list;
         }
 
-        public static Hashtable GetHashtable() {
+        public static Hashtable GetHashtable()
+        {
             Hashtable dict = new Hashtable();
             dict.Add("one", 1);
             dict.Add("two", 2);
@@ -36,37 +30,35 @@ public static Hashtable GetHashtable() {
             return dict;
         }
 
-        public static IEnumerator GetEnumerator() {
+        public static IEnumerator GetEnumerator()
+        {
             string temp = "test string";
             return temp.GetEnumerator();
         }
-
-
     }
 
 
-    public class ClassCtorTest1 {
+    public class ClassCtorTest1
+    {
         public string value;
 
-        public ClassCtorTest1() {
+        public ClassCtorTest1()
+        {
             value = "default";
         }
-
     }
 
-    public class ClassCtorTest2 {
+    public class ClassCtorTest2
+    {
         public string value;
 
-        public ClassCtorTest2(string v) {
+        public ClassCtorTest2(string v)
+        {
             value = v;
         }
-
     }
 
-    internal class InternalClass {
-
-
+    internal class InternalClass
+    {
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/constructortests.cs b/src/testing/constructortests.cs
index 59181c3af..cffcee888 100644
--- a/src/testing/constructortests.cs
+++ b/src/testing/constructortests.cs
@@ -1,64 +1,53 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using System.IO;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // These classes support the CLR constructor unit tests.
     //========================================================================
 
-    public class EnumConstructorTest {
-
+    public class EnumConstructorTest
+    {
         public TypeCode value;
 
-        public EnumConstructorTest(TypeCode v) {
+        public EnumConstructorTest(TypeCode v)
+        {
             this.value = v;
         }
-
     }
 
 
-    public class FlagsConstructorTest {
-
+    public class FlagsConstructorTest
+    {
         public FileAccess value;
 
-        public FlagsConstructorTest(FileAccess v) {
+        public FlagsConstructorTest(FileAccess v)
+        {
             this.value = v;
         }
-
     }
 
 
-    public class StructConstructorTest {
-
+    public class StructConstructorTest
+    {
         public Guid value;
 
-        public StructConstructorTest(Guid v) {
+        public StructConstructorTest(Guid v)
+        {
             this.value = v;
         }
-
     }
 
 
-    public class SubclassConstructorTest {
-
+    public class SubclassConstructorTest
+    {
         public Exception value;
 
-        public SubclassConstructorTest(Exception v) {
+        public SubclassConstructorTest(Exception v)
+        {
             this.value = v;
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/conversiontest.cs b/src/testing/conversiontest.cs
index 9024b6f51..e4d4762e6 100644
--- a/src/testing/conversiontest.cs
+++ b/src/testing/conversiontest.cs
@@ -1,24 +1,16 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports units tests for field access.
     //========================================================================
 
-    public class ConversionTest {
-
-        public ConversionTest() {
+    public class ConversionTest
+    {
+        public ConversionTest()
+        {
             EnumField = ShortEnum.Zero;
             SpamField = new Spam("spam");
             StringField = "spam";
@@ -44,25 +36,26 @@ public ConversionTest() {
 
         public byte[] ByteArrayField;
         public sbyte[] SByteArrayField;
-
     }
 
 
-    public interface ISpam {
+    public interface ISpam
+    {
         string GetValue();
     }
 
-    public class Spam : ISpam {
+    public class Spam : ISpam
+    {
         string value;
 
-        public Spam(string value) {
+        public Spam(string value)
+        {
             this.value = value;
         }
 
-        public string GetValue() {
+        public string GetValue()
+        {
             return value;
-
         }
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/delegatetest.cs b/src/testing/delegatetest.cs
index 0b8e135cd..d13750c49 100644
--- a/src/testing/delegatetest.cs
+++ b/src/testing/delegatetest.cs
@@ -1,65 +1,63 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports CLR class unit tests.
     //========================================================================
 
     public delegate void PublicDelegate();
+
     internal delegate void InternalDelegate();
 
     public delegate DelegateTest ObjectDelegate();
+
     public delegate string StringDelegate();
-    public delegate bool BoolDelegate();
 
+    public delegate bool BoolDelegate();
 
-    public class DelegateTest {
 
+    public class DelegateTest
+    {
         public delegate void PublicDelegate();
+
         protected delegate void ProtectedDelegate();
+
         internal delegate void InternalDelegate();
+
         private delegate void PrivateDelegate();
 
         public StringDelegate stringDelegate;
         public ObjectDelegate objectDelegate;
         public BoolDelegate boolDelegate;
 
-        public DelegateTest() {
-
+        public DelegateTest()
+        {
         }
 
-        public string SayHello() {
+        public string SayHello()
+        {
             return "hello";
         }
 
-        public static string StaticSayHello() {
+        public static string StaticSayHello()
+        {
             return "hello";
         }
 
-        public string CallStringDelegate(StringDelegate d) {
+        public string CallStringDelegate(StringDelegate d)
+        {
             return d();
         }
 
-        public DelegateTest CallObjectDelegate(ObjectDelegate d) {
+        public DelegateTest CallObjectDelegate(ObjectDelegate d)
+        {
             return d();
         }
 
-        public bool CallBoolDelegate(BoolDelegate d) {
+        public bool CallBoolDelegate(BoolDelegate d)
+        {
             return d();
         }
-
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/doctest.cs b/src/testing/doctest.cs
index 00fa2a904..156248029 100644
--- a/src/testing/doctest.cs
+++ b/src/testing/doctest.cs
@@ -1,16 +1,7 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using Python.Runtime;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports units tests for exposing docstrings from C# to Python
     //========================================================================
@@ -18,44 +9,49 @@ namespace Python.Test {
     // Classes with a constructor have their docstring set to the ctor signature.
     // Test if a class has an explicit doc string it gets set correctly.
     [DocStringAttribute("DocWithCtorTest Class")]
-    public class DocWithCtorTest {
-
-        public DocWithCtorTest() {
+    public class DocWithCtorTest
+    {
+        public DocWithCtorTest()
+        {
         }
 
         [DocStringAttribute("DocWithCtorTest TestMethod")]
-        public void TestMethod() {
+        public void TestMethod()
+        {
         }
 
         [DocStringAttribute("DocWithCtorTest StaticTestMethod")]
-        public static void StaticTestMethod() {
+        public static void StaticTestMethod()
+        {
         }
-
     }
 
     public class DocWithCtorNoDocTest
     {
-        public DocWithCtorNoDocTest(bool x) {
+        public DocWithCtorNoDocTest(bool x)
+        {
         }
 
-        public void TestMethod(double a, int b) {
+        public void TestMethod(double a, int b)
+        {
         }
 
-        public static void StaticTestMethod(double a, int b) {
+        public static void StaticTestMethod(double a, int b)
+        {
         }
     }
 
     [DocStringAttribute("DocWithoutCtorTest Class")]
-    public class DocWithoutCtorTest {
-
+    public class DocWithoutCtorTest
+    {
         [DocStringAttribute("DocWithoutCtorTest TestMethod")]
-        public void TestMethod() {
+        public void TestMethod()
+        {
         }
 
         [DocStringAttribute("DocWithoutCtorTest StaticTestMethod")]
-        public static void StaticTestMethod() {
+        public static void StaticTestMethod()
+        {
         }
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/enumtest.cs b/src/testing/enumtest.cs
index eeabe8984..162771980 100644
--- a/src/testing/enumtest.cs
+++ b/src/testing/enumtest.cs
@@ -1,21 +1,13 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports CLR enum unit tests.
     //========================================================================
 
-    public enum ByteEnum : byte {
+    public enum ByteEnum : byte
+    {
         Zero,
         One,
         Two,
@@ -24,8 +16,8 @@ public enum ByteEnum : byte {
         Five
     }
 
-    public enum SByteEnum : sbyte {
-
+    public enum SByteEnum : sbyte
+    {
         Zero,
         One,
         Two,
@@ -34,7 +26,8 @@ public enum SByteEnum : sbyte {
         Five
     }
 
-    public enum ShortEnum : short {
+    public enum ShortEnum : short
+    {
         Zero,
         One,
         Two,
@@ -43,7 +36,8 @@ public enum ShortEnum : short {
         Five
     }
 
-    public enum UShortEnum : ushort {
+    public enum UShortEnum : ushort
+    {
         Zero,
         One,
         Two,
@@ -52,7 +46,8 @@ public enum UShortEnum : ushort {
         Five
     }
 
-    public enum IntEnum : int{
+    public enum IntEnum : int
+    {
         Zero,
         One,
         Two,
@@ -61,7 +56,8 @@ public enum IntEnum : int{
         Five
     }
 
-    public enum UIntEnum : uint {
+    public enum UIntEnum : uint
+    {
         Zero,
         One,
         Two,
@@ -70,7 +66,8 @@ public enum UIntEnum : uint {
         Five
     }
 
-    public enum LongEnum : long {
+    public enum LongEnum : long
+    {
         Zero,
         One,
         Two,
@@ -79,7 +76,8 @@ public enum LongEnum : long {
         Five
     }
 
-    public enum ULongEnum : ulong {
+    public enum ULongEnum : ulong
+    {
         Zero,
         One,
         Two,
@@ -89,7 +87,8 @@ public enum ULongEnum : ulong {
     }
 
     [FlagsAttribute]
-    public enum FlagsEnum {
+    public enum FlagsEnum
+    {
         Zero,
         One,
         Two,
@@ -97,5 +96,4 @@ public enum FlagsEnum {
         Four,
         Five
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/eventtest.cs b/src/testing/eventtest.cs
index c7f90da86..544e0f259 100644
--- a/src/testing/eventtest.cs
+++ b/src/testing/eventtest.cs
@@ -1,16 +1,7 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports CLR event unit tests.
     //========================================================================
@@ -18,8 +9,8 @@ namespace Python.Test {
     public delegate void TestEventHandler(object sender, TestEventArgs e);
 
 
-    public class EventTest {
-
+    public class EventTest
+    {
         public static event TestEventHandler PublicStaticEvent;
 
         protected static event TestEventHandler ProtectedStaticEvent;
@@ -40,52 +31,65 @@ public class EventTest {
         public static int s_value;
         public int value;
 
-        public EventTest () {
+        public EventTest()
+        {
             this.value = 0;
         }
 
-        static EventTest () {
+        static EventTest()
+        {
             s_value = 0;
         }
 
 
-        public void OnPublicEvent(TestEventArgs e) {
-            if (PublicEvent != null) {
+        public void OnPublicEvent(TestEventArgs e)
+        {
+            if (PublicEvent != null)
+            {
                 PublicEvent(this, e);
             }
         }
 
 
-        public void OnProtectedEvent(TestEventArgs e) {
-            if (ProtectedEvent != null) {
+        public void OnProtectedEvent(TestEventArgs e)
+        {
+            if (ProtectedEvent != null)
+            {
                 ProtectedEvent(this, e);
             }
         }
 
 
-        public static void OnPublicStaticEvent(TestEventArgs e) {
-            if (PublicStaticEvent != null) {
+        public static void OnPublicStaticEvent(TestEventArgs e)
+        {
+            if (PublicStaticEvent != null)
+            {
                 PublicStaticEvent(null, e);
             }
         }
 
 
-        protected static void OnProtectedStaticEvent(TestEventArgs e) {
-            if (ProtectedStaticEvent != null) {
+        protected static void OnProtectedStaticEvent(TestEventArgs e)
+        {
+            if (ProtectedStaticEvent != null)
+            {
                 ProtectedStaticEvent(null, e);
             }
         }
 
 
-        public void GenericHandler(object sender, TestEventArgs e) {
+        public void GenericHandler(object sender, TestEventArgs e)
+        {
             this.value = e.value;
         }
 
-        public static void StaticHandler(object sender, TestEventArgs e) {
+        public static void StaticHandler(object sender, TestEventArgs e)
+        {
             s_value = e.value;
         }
 
-        public static void ShutUpCompiler() {
+        public static void ShutUpCompiler()
+        {
             // Quiet compiler warnings.
             EventTest e = new EventTest();
             TestEventHandler f = new TestEventHandler(e.GenericHandler);
@@ -96,18 +100,16 @@ public static void ShutUpCompiler() {
             e.InternalEvent += f;
             e.PrivateEvent += f;
         }
-
     }
 
 
-    public class TestEventArgs : EventArgs {
+    public class TestEventArgs : EventArgs
+    {
         public int value;
 
-        public TestEventArgs(int v) {
+        public TestEventArgs(int v)
+        {
             this.value = v;
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/exceptiontest.cs b/src/testing/exceptiontest.cs
index 291c7ed58..b38182857 100644
--- a/src/testing/exceptiontest.cs
+++ b/src/testing/exceptiontest.cs
@@ -1,94 +1,84 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports CLR Exception unit tests.
     //========================================================================
 
-    public class ExceptionTest {
-
-        public int ThrowProperty {
-            get {
-                throw new OverflowException("error");
-            }
-            set { 
-                throw new OverflowException("error");
-            }
+    public class ExceptionTest
+    {
+        public int ThrowProperty
+        {
+            get { throw new OverflowException("error"); }
+            set { throw new OverflowException("error"); }
         }
 
-        public static Exception GetBaseException() {
+        public static Exception GetBaseException()
+        {
             return new Exception("error");
         }
 
-        public static OverflowException GetExplicitException() {
+        public static OverflowException GetExplicitException()
+        {
             return new OverflowException("error");
         }
 
-        public static Exception GetWidenedException() {
+        public static Exception GetWidenedException()
+        {
             return new OverflowException("error");
         }
 
-        public static ExtendedException GetExtendedException() {
+        public static ExtendedException GetExtendedException()
+        {
             return new ExtendedException("error");
         }
 
 
-        public static bool SetBaseException(Exception e) {
+        public static bool SetBaseException(Exception e)
+        {
             return typeof(Exception).IsInstanceOfType(e);
         }
 
-        public static bool SetExplicitException(OverflowException e) {
+        public static bool SetExplicitException(OverflowException e)
+        {
             return typeof(OverflowException).IsInstanceOfType(e);
         }
 
-        public static bool SetWidenedException(Exception e) {
+        public static bool SetWidenedException(Exception e)
+        {
             return typeof(Exception).IsInstanceOfType(e);
         }
 
-        public static bool ThrowException() {
+        public static bool ThrowException()
+        {
             throw new OverflowException("error");
         }
     }
 
 
-    public class ExtendedException : OverflowException {
+    public class ExtendedException : OverflowException
+    {
+        public ExtendedException() : base()
+        {
+        }
 
-        public ExtendedException() : base() {}
-        public ExtendedException(string m) : base(m) {}
+        public ExtendedException(string m) : base(m)
+        {
+        }
 
         public string extra = "extra";
 
-        public string ExtraProperty {
-            get { 
-                return extra;
-            }
-            set { 
-                extra = value;
-            }
+        public string ExtraProperty
+        {
+            get { return extra; }
+            set { extra = value; }
         }
 
-        public string GetExtraInfo() {
+        public string GetExtraInfo()
+        {
             return extra;
         }
-
-
     }
-
-
-
-}
-
-
-
-
+}
\ No newline at end of file
diff --git a/src/testing/fieldtest.cs b/src/testing/fieldtest.cs
index 1f345f423..5860bdafb 100644
--- a/src/testing/fieldtest.cs
+++ b/src/testing/fieldtest.cs
@@ -1,30 +1,23 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports units tests for field access.
     //========================================================================
 
-    public class FieldTest {
-
-        public FieldTest() {
+    public class FieldTest
+    {
+        public FieldTest()
+        {
             EnumField = ShortEnum.Zero;
             SpamField = new Spam("spam");
             StringField = "spam";
         }
 
-        public void Shutup() {
+        public void Shutup()
+        {
             int i = PrivateStaticField;
             int j = PrivateField;
         }
@@ -60,8 +53,5 @@ public void Shutup() {
         public FlagsEnum FlagsField;
         public object ObjectField;
         public ISpam SpamField;
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/generictest.cs b/src/testing/generictest.cs
index c8f12ab2b..3019c1eb6 100644
--- a/src/testing/generictest.cs
+++ b/src/testing/generictest.cs
@@ -1,123 +1,134 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports CLR generics unit tests.
     //========================================================================
-    
-    public class GenericWrapper<T> {
+
+    public class GenericWrapper<T>
+    {
         public T value;
 
-        public GenericWrapper(T value) {
+        public GenericWrapper(T value)
+        {
             this.value = value;
         }
     }
 
-    public class GenericTypeDefinition<T, U> {
+    public class GenericTypeDefinition<T, U>
+    {
         public T value1;
         public U value2;
 
-        public GenericTypeDefinition(T arg1, U arg2) {
+        public GenericTypeDefinition(T arg1, U arg2)
+        {
             this.value1 = arg1;
             this.value2 = arg2;
         }
     }
 
-    public class DerivedFromOpenGeneric<V, W> : 
-                 GenericTypeDefinition<int, V> {
-
+    public class DerivedFromOpenGeneric<V, W> :
+        GenericTypeDefinition<int, V>
+    {
         public W value3;
 
-        public DerivedFromOpenGeneric(int arg1, V arg2, W arg3) : 
-               base(arg1, arg2) {
+        public DerivedFromOpenGeneric(int arg1, V arg2, W arg3) :
+            base(arg1, arg2)
+        {
             this.value3 = arg3;
         }
     }
 
 
-    public class GenericNameTest1 {
+    public class GenericNameTest1
+    {
         public static int value = 0;
     }
 
-    public class GenericNameTest1<T> {
+    public class GenericNameTest1<T>
+    {
         public static int value = 1;
     }
 
-    public class GenericNameTest1<T,U> {
+    public class GenericNameTest1<T, U>
+    {
         public static int value = 2;
     }
 
-    public class GenericNameTest2<T> {
+    public class GenericNameTest2<T>
+    {
         public static int value = 1;
     }
 
-    public class GenericNameTest2<T,U> {
+    public class GenericNameTest2<T, U>
+    {
         public static int value = 2;
     }
 
 
-    public class GenericMethodTest<T> {
-
-        public GenericMethodTest() {}
+    public class GenericMethodTest<T>
+    {
+        public GenericMethodTest()
+        {
+        }
 
-        public int Overloaded() {
+        public int Overloaded()
+        {
             return 1;
         }
 
-        public T Overloaded(T arg) {
+        public T Overloaded(T arg)
+        {
             return arg;
         }
 
-        public Q Overloaded<Q>(Q arg) {
+        public Q Overloaded<Q>(Q arg)
+        {
             return arg;
         }
 
-        public U Overloaded<Q, U>(Q arg1, U arg2) {
+        public U Overloaded<Q, U>(Q arg1, U arg2)
+        {
             return arg2;
         }
 
-        public string Overloaded<Q>(int arg1, int arg2, string arg3) {
+        public string Overloaded<Q>(int arg1, int arg2, string arg3)
+        {
             return arg3;
         }
-
     }
 
-    public class GenericStaticMethodTest<T> {
-
-        public GenericStaticMethodTest() {}
+    public class GenericStaticMethodTest<T>
+    {
+        public GenericStaticMethodTest()
+        {
+        }
 
-        public static int Overloaded() {
+        public static int Overloaded()
+        {
             return 1;
         }
 
-        public static T Overloaded(T arg) {
+        public static T Overloaded(T arg)
+        {
             return arg;
         }
 
-        public static Q Overloaded<Q>(Q arg) {
+        public static Q Overloaded<Q>(Q arg)
+        {
             return arg;
         }
 
-        public static U Overloaded<Q, U>(Q arg1, U arg2) {
+        public static U Overloaded<Q, U>(Q arg1, U arg2)
+        {
             return arg2;
         }
 
-        public static string Overloaded<Q>(int arg1, int arg2, string arg3) {
+        public static string Overloaded<Q>(int arg1, int arg2, string arg3)
+        {
             return arg3;
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/globaltest.cs b/src/testing/globaltest.cs
index 70e8ba901..887668d96 100644
--- a/src/testing/globaltest.cs
+++ b/src/testing/globaltest.cs
@@ -1,18 +1,9 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
 //========================================================================
 // Supports units tests for access to types without a namespace.
 //========================================================================
 
-public class NoNamespaceType {}
-
-
+public class NoNamespaceType
+{
+}
\ No newline at end of file
diff --git a/src/testing/indexertest.cs b/src/testing/indexertest.cs
index 7caba4e64..eb0381777 100644
--- a/src/testing/indexertest.cs
+++ b/src/testing/indexertest.cs
@@ -1,371 +1,418 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports units tests for indexer access.
     //========================================================================
 
-    public class IndexerBase {
-
+    public class IndexerBase
+    {
         protected Hashtable t;
 
-        protected IndexerBase() {
+        protected IndexerBase()
+        {
             t = new Hashtable();
         }
 
-        protected string GetValue(object index) {
-            if (index == null) {
+        protected string GetValue(object index)
+        {
+            if (index == null)
+            {
                 return null;
             }
             object value = t[index];
-            if (value != null) {
+            if (value != null)
+            {
                 return (string)value;
             }
             return null;
         }
-            
     }
 
 
-    public class PublicIndexerTest : IndexerBase {
-
-        public PublicIndexerTest() : base () {}
+    public class PublicIndexerTest : IndexerBase
+    {
+        public PublicIndexerTest() : base()
+        {
+        }
 
-        public string this [int index] {
+        public string this[int index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class ProtectedIndexerTest : IndexerBase {
-
-        public ProtectedIndexerTest() : base () {}
+    public class ProtectedIndexerTest : IndexerBase
+    {
+        public ProtectedIndexerTest() : base()
+        {
+        }
 
-        protected string this [int index] {
+        protected string this[int index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class InternalIndexerTest : IndexerBase {
-
-        public InternalIndexerTest() : base () {}
+    public class InternalIndexerTest : IndexerBase
+    {
+        public InternalIndexerTest() : base()
+        {
+        }
 
-        internal string this [int index] {
+        internal string this[int index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class PrivateIndexerTest : IndexerBase {
-
-        public PrivateIndexerTest() : base () {}
+    public class PrivateIndexerTest : IndexerBase
+    {
+        public PrivateIndexerTest() : base()
+        {
+        }
 
-        private string this [int index] {
+        private string this[int index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class BooleanIndexerTest : IndexerBase {
-
-        public BooleanIndexerTest() : base() {}
+    public class BooleanIndexerTest : IndexerBase
+    {
+        public BooleanIndexerTest() : base()
+        {
+        }
 
-        public string this [bool index] {
+        public string this[bool index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class ByteIndexerTest : IndexerBase {
-
-        public ByteIndexerTest() : base() {}
+    public class ByteIndexerTest : IndexerBase
+    {
+        public ByteIndexerTest() : base()
+        {
+        }
 
-        public string this [byte index] {
+        public string this[byte index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class SByteIndexerTest : IndexerBase {
-
-        public SByteIndexerTest() : base() {}
+    public class SByteIndexerTest : IndexerBase
+    {
+        public SByteIndexerTest() : base()
+        {
+        }
 
-        public string this [sbyte index] {
+        public string this[sbyte index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class CharIndexerTest : IndexerBase {
-
-        public CharIndexerTest() : base() {}
+    public class CharIndexerTest : IndexerBase
+    {
+        public CharIndexerTest() : base()
+        {
+        }
 
-        public string this [char index] {
+        public string this[char index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class Int16IndexerTest : IndexerBase {
-
-        public Int16IndexerTest() : base() {}
+    public class Int16IndexerTest : IndexerBase
+    {
+        public Int16IndexerTest() : base()
+        {
+        }
 
-        public string this [short index] {
+        public string this[short index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class Int32IndexerTest : IndexerBase {
-
-        public Int32IndexerTest() : base() {}
+    public class Int32IndexerTest : IndexerBase
+    {
+        public Int32IndexerTest() : base()
+        {
+        }
 
-        public string this [int index] {
+        public string this[int index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class Int64IndexerTest : IndexerBase {
-
-        public Int64IndexerTest() : base() {}
+    public class Int64IndexerTest : IndexerBase
+    {
+        public Int64IndexerTest() : base()
+        {
+        }
 
-        public string this [long index] {
+        public string this[long index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class UInt16IndexerTest : IndexerBase {
-
-        public UInt16IndexerTest() : base() {}
+    public class UInt16IndexerTest : IndexerBase
+    {
+        public UInt16IndexerTest() : base()
+        {
+        }
 
-        public string this [ushort index] {
+        public string this[ushort index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class UInt32IndexerTest : IndexerBase {
-
-        public UInt32IndexerTest() : base() {}
+    public class UInt32IndexerTest : IndexerBase
+    {
+        public UInt32IndexerTest() : base()
+        {
+        }
 
-        public string this [uint index] {
+        public string this[uint index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class UInt64IndexerTest : IndexerBase {
-
-        public UInt64IndexerTest() : base() {}
+    public class UInt64IndexerTest : IndexerBase
+    {
+        public UInt64IndexerTest() : base()
+        {
+        }
 
-        public string this [ulong index] {
+        public string this[ulong index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class SingleIndexerTest : IndexerBase {
-
-        public SingleIndexerTest() : base() {}
+    public class SingleIndexerTest : IndexerBase
+    {
+        public SingleIndexerTest() : base()
+        {
+        }
 
-        public string this [float index] {
+        public string this[float index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class DoubleIndexerTest : IndexerBase {
-
-        public DoubleIndexerTest() : base() {}
+    public class DoubleIndexerTest : IndexerBase
+    {
+        public DoubleIndexerTest() : base()
+        {
+        }
 
-        public string this [double index] {
+        public string this[double index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class DecimalIndexerTest : IndexerBase {
-
-        public DecimalIndexerTest() : base() {}
+    public class DecimalIndexerTest : IndexerBase
+    {
+        public DecimalIndexerTest() : base()
+        {
+        }
 
-        public string this [decimal index] {
+        public string this[decimal index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class StringIndexerTest : IndexerBase {
-
-        public StringIndexerTest() : base() {}
+    public class StringIndexerTest : IndexerBase
+    {
+        public StringIndexerTest() : base()
+        {
+        }
 
-        public string this [string index] {
+        public string this[string index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class EnumIndexerTest : IndexerBase {
-
-        public EnumIndexerTest() : base() {}
+    public class EnumIndexerTest : IndexerBase
+    {
+        public EnumIndexerTest() : base()
+        {
+        }
 
-        public string this [ShortEnum index] {
+        public string this[ShortEnum index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class ObjectIndexerTest : IndexerBase {
-
-        public ObjectIndexerTest() : base() {}
+    public class ObjectIndexerTest : IndexerBase
+    {
+        public ObjectIndexerTest() : base()
+        {
+        }
 
-        public string this [object index] {
+        public string this[object index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class InterfaceIndexerTest : IndexerBase {
-
-        public InterfaceIndexerTest() : base() {}
+    public class InterfaceIndexerTest : IndexerBase
+    {
+        public InterfaceIndexerTest() : base()
+        {
+        }
 
-        public string this [ISpam index] {
+        public string this[ISpam index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class TypedIndexerTest : IndexerBase {
-
-        public TypedIndexerTest() : base() {}
+    public class TypedIndexerTest : IndexerBase
+    {
+        public TypedIndexerTest() : base()
+        {
+        }
 
-        public string this [Spam index] {
+        public string this[Spam index]
+        {
             get { return GetValue(index); }
             set { t[index] = value; }
         }
-
     }
 
 
-    public class MultiArgIndexerTest : IndexerBase {
-
-        public MultiArgIndexerTest() : base() {}
+    public class MultiArgIndexerTest : IndexerBase
+    {
+        public MultiArgIndexerTest() : base()
+        {
+        }
 
-        public string this [int index1, int index2] {
-            get { 
+        public string this[int index1, int index2]
+        {
+            get
+            {
                 string key = index1.ToString() + index2.ToString();
                 object value = t[key];
-                if (value != null) {
+                if (value != null)
+                {
                     return (string)value;
                 }
                 return null;
             }
-            set { 
+            set
+            {
                 string key = index1.ToString() + index2.ToString();
-                t[key] = value; 
+                t[key] = value;
             }
         }
-
     }
 
 
-    public class MultiTypeIndexerTest : IndexerBase {
-
-        public MultiTypeIndexerTest() : base() {}
+    public class MultiTypeIndexerTest : IndexerBase
+    {
+        public MultiTypeIndexerTest() : base()
+        {
+        }
 
-        public string this [int i1, string i2, ISpam i3] {
-            get { 
-                string key = i1.ToString() + i2.ToString() + 
+        public string this[int i1, string i2, ISpam i3]
+        {
+            get
+            {
+                string key = i1.ToString() + i2.ToString() +
                              i3.GetHashCode().ToString();
                 object value = t[key];
-                if (value != null) {
+                if (value != null)
+                {
                     return (string)value;
                 }
                 return null;
             }
-            set { 
-                string key = i1.ToString() + i2.ToString() + 
+            set
+            {
+                string key = i1.ToString() + i2.ToString() +
                              i3.GetHashCode().ToString();
-                t[key] = value; 
+                t[key] = value;
             }
         }
-
     }
 
-    public class MultiDefaultKeyIndexerTest : IndexerBase {
-
-        public MultiDefaultKeyIndexerTest() : base() { }
+    public class MultiDefaultKeyIndexerTest : IndexerBase
+    {
+        public MultiDefaultKeyIndexerTest() : base()
+        {
+        }
 
-        public string this[int i1, int i2 = 2] {
-            get {
+        public string this[int i1, int i2 = 2]
+        {
+            get
+            {
                 string key = i1.ToString() + i2.ToString();
                 return (string)t[key];
             }
-            set {
+            set
+            {
                 string key = i1.ToString() + i2.ToString();
                 t[key] = value;
             }
         }
-
     }
-
-
-
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/interfacetest.cs b/src/testing/interfacetest.cs
index 99bb3fbba..b35ca81a8 100644
--- a/src/testing/interfacetest.cs
+++ b/src/testing/interfacetest.cs
@@ -1,59 +1,65 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports CLR class unit tests.
     //========================================================================
 
-    public interface IPublicInterface {}
-
-    internal interface IInternalInterface {}
+    public interface IPublicInterface
+    {
+    }
 
+    internal interface IInternalInterface
+    {
+    }
 
 
-    public interface ISayHello1 {
+    public interface ISayHello1
+    {
         string SayHello();
     }
 
-    public interface ISayHello2 {
+    public interface ISayHello2
+    {
         string SayHello();
     }
 
-    public class InterfaceTest : ISayHello1, ISayHello2{
-
-        public InterfaceTest() {}
+    public class InterfaceTest : ISayHello1, ISayHello2
+    {
+        public InterfaceTest()
+        {
+        }
 
-        public string HelloProperty {
+        public string HelloProperty
+        {
             get { return "hello"; }
         }
 
-        string ISayHello1.SayHello() {
+        string ISayHello1.SayHello()
+        {
             return "hello 1";
         }
 
-        string ISayHello2.SayHello() {
+        string ISayHello2.SayHello()
+        {
             return "hello 2";
         }
 
-        public interface IPublic {}
-
-        protected interface IProtected {}
+        public interface IPublic
+        {
+        }
 
-        internal interface IInternal {}
+        protected interface IProtected
+        {
+        }
 
-        private interface IPrivate {}
+        internal interface IInternal
+        {
+        }
 
+        private interface IPrivate
+        {
+        }
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/methodtest.cs b/src/testing/methodtest.cs
index 28ef8f553..675b1577c 100644
--- a/src/testing/methodtest.cs
+++ b/src/testing/methodtest.cs
@@ -1,55 +1,56 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.IO;
 using System.Collections.Generic;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports units tests for method access.
     //========================================================================
 
-    public class MethodTest {
-
-        public MethodTest() {}
+    public class MethodTest
+    {
+        public MethodTest()
+        {
+        }
 
-        public string PublicMethod() {
+        public string PublicMethod()
+        {
             return "public";
         }
 
-        public static string PublicStaticMethod() {
+        public static string PublicStaticMethod()
+        {
             return "public static";
         }
 
-        protected string ProtectedMethod() {
+        protected string ProtectedMethod()
+        {
             return "protected";
         }
 
-        protected static string ProtectedStaticMethod() {
+        protected static string ProtectedStaticMethod()
+        {
             return "protected static";
         }
 
-        internal string InternalMethod() {
+        internal string InternalMethod()
+        {
             return "internal";
         }
 
-        internal static string InternalStaticMethod() {
+        internal static string InternalStaticMethod()
+        {
             return "internal static";
         }
 
-        private string PrivateMethod() {
+        private string PrivateMethod()
+        {
             return "private";
         }
 
-        private static string PrivateStaticMethod() {
+        private static string PrivateStaticMethod()
+        {
             return "private static";
         }
 
@@ -58,472 +59,575 @@ private static string PrivateStaticMethod() {
         // Methods to support specific argument conversion unit tests
         //===================================================================
 
-        public TypeCode TestEnumConversion(TypeCode v) {
+        public TypeCode TestEnumConversion(TypeCode v)
+        {
             return v;
         }
 
-        public FileAccess TestFlagsConversion(FileAccess v) {
+        public FileAccess TestFlagsConversion(FileAccess v)
+        {
             return v;
         }
 
-        public Guid TestStructConversion(Guid v) {
+        public Guid TestStructConversion(Guid v)
+        {
             return v;
         }
 
-        public Exception TestSubclassConversion(Exception v) {
+        public Exception TestSubclassConversion(Exception v)
+        {
             return v;
         }
 
-        public Type[] TestNullArrayConversion(Type [] v) {
+        public Type[] TestNullArrayConversion(Type[] v)
+        {
             return v;
         }
 
-        public static string[] TestStringParamsArg(params string[] args) {
+        public static string[] TestStringParamsArg(params string[] args)
+        {
             return args;
         }
 
-        public static object[] TestObjectParamsArg(params object[] args) {
+        public static object[] TestObjectParamsArg(params object[] args)
+        {
             return args;
         }
 
-        public static int[] TestValueParamsArg(params int[] args) {
+        public static int[] TestValueParamsArg(params int[] args)
+        {
             return args;
         }
 
-        public static int[] TestOneArgWithParams(string s, params int[] args) {
+        public static int[] TestOneArgWithParams(string s, params int[] args)
+        {
             return args;
         }
 
-        public static int[] TestTwoArgWithParams(string s, string x, 
-                                                 params int[] args) {
+        public static int[] TestTwoArgWithParams(string s, string x,
+            params int[] args)
+        {
             return args;
         }
 
-        public static int[] TestOverloadedParams(string v, params int[] args) {
+        public static int[] TestOverloadedParams(string v, params int[] args)
+        {
             return args;
         }
 
-        public static int[] TestOverloadedParams(int v, int[] args) {
+        public static int[] TestOverloadedParams(int v, int[] args)
+        {
             return args;
         }
 
-        public static bool TestStringOutParams (string s, out string s1) {
+        public static bool TestStringOutParams(string s, out string s1)
+        {
             s1 = "output string";
             return true;
         }
 
-        public static bool TestStringRefParams (string s, ref string s1) {
+        public static bool TestStringRefParams(string s, ref string s1)
+        {
             s1 = "output string";
             return true;
         }
 
-        public static bool TestNonParamsArrayInLastPlace(int i1, int[] i2) {
+        public static bool TestNonParamsArrayInLastPlace(int i1, int[] i2)
+        {
             return false;
         }
 
-        public static bool TestNonParamsArrayInLastPlace(int i1, int i2, int i3) {
+        public static bool TestNonParamsArrayInLastPlace(int i1, int i2, int i3)
+        {
             return true;
         }
 
-        public static bool TestValueOutParams (string s, out int i1) {
+        public static bool TestValueOutParams(string s, out int i1)
+        {
             i1 = 42;
             return true;
         }
 
-        public static bool TestValueRefParams (string s, ref int i1) {
+        public static bool TestValueRefParams(string s, ref int i1)
+        {
             i1 = 42;
             return true;
         }
 
-        public static bool TestObjectOutParams (object o, out object o1) {
+        public static bool TestObjectOutParams(object o, out object o1)
+        {
             o1 = new System.Exception("test");
             return true;
         }
 
-        public static bool TestObjectRefParams (object o, ref object o1) {
+        public static bool TestObjectRefParams(object o, ref object o1)
+        {
             o1 = new System.Exception("test");
             return true;
         }
 
-        public static bool TestStructOutParams (object o, out Guid o1) {
+        public static bool TestStructOutParams(object o, out Guid o1)
+        {
             o1 = Guid.NewGuid();
             return true;
         }
 
-        public static bool TestStructRefParams (object o, ref Guid o1) {
+        public static bool TestStructRefParams(object o, ref Guid o1)
+        {
             o1 = Guid.NewGuid();
             return true;
         }
 
-        public static void TestVoidSingleOutParam (out int i) {
+        public static void TestVoidSingleOutParam(out int i)
+        {
             i = 42;
         }
 
-        public static void TestVoidSingleRefParam (ref int i) {
+        public static void TestVoidSingleRefParam(ref int i)
+        {
             i = 42;
         }
 
-        public static int TestSingleDefaultParam(int i = 5) {
+        public static int TestSingleDefaultParam(int i = 5)
+        {
             return i;
         }
-        public static int TestTwoDefaultParam(int i = 5, int j = 6) {
+
+        public static int TestTwoDefaultParam(int i = 5, int j = 6)
+        {
             return i + j;
         }
-        public static int TestOneArgAndTwoDefaultParam(int z, int i = 5, int j = 6) {
+
+        public static int TestOneArgAndTwoDefaultParam(int z, int i = 5, int j = 6)
+        {
             return i + j + z;
         }
 
 
+        // overload selection test support
 
-        // overload selection test support 
-
-        public static bool Overloaded(bool v) {
+        public static bool Overloaded(bool v)
+        {
             return v;
         }
 
-        public static byte Overloaded(byte v) {
+        public static byte Overloaded(byte v)
+        {
             return v;
         }
 
-        public static sbyte Overloaded(sbyte v) {
+        public static sbyte Overloaded(sbyte v)
+        {
             return v;
         }
 
-        public static char Overloaded(char v) {
+        public static char Overloaded(char v)
+        {
             return v;
         }
 
-        public static short Overloaded(short v) {
+        public static short Overloaded(short v)
+        {
             return v;
         }
 
-        public static int Overloaded(int v) {
+        public static int Overloaded(int v)
+        {
             return v;
         }
 
-        public static long Overloaded(long v) {
+        public static long Overloaded(long v)
+        {
             return v;
         }
 
-        public static ushort Overloaded(ushort v) {
+        public static ushort Overloaded(ushort v)
+        {
             return v;
         }
 
-        public static uint Overloaded(uint v) {
+        public static uint Overloaded(uint v)
+        {
             return v;
         }
 
-        public static ulong Overloaded(ulong v) {
+        public static ulong Overloaded(ulong v)
+        {
             return v;
         }
 
-        public static float Overloaded(float v) {
+        public static float Overloaded(float v)
+        {
             return v;
         }
 
-        public static double Overloaded(double v) {
+        public static double Overloaded(double v)
+        {
             return v;
         }
 
-        public static decimal Overloaded(decimal v) {
+        public static decimal Overloaded(decimal v)
+        {
             return v;
         }
 
-        public static string Overloaded(string v) {
+        public static string Overloaded(string v)
+        {
             return v;
         }
 
-        public static ShortEnum Overloaded(ShortEnum v) {
+        public static ShortEnum Overloaded(ShortEnum v)
+        {
             return v;
         }
 
-        public static object Overloaded(object v) {
+        public static object Overloaded(object v)
+        {
             return v;
         }
 
-        public static InterfaceTest Overloaded(InterfaceTest v) {
+        public static InterfaceTest Overloaded(InterfaceTest v)
+        {
             return v;
         }
 
-        public static ISayHello1 Overloaded(ISayHello1 v) {
+        public static ISayHello1 Overloaded(ISayHello1 v)
+        {
             return v;
         }
 
-        public static bool[] Overloaded(bool[] v) {
+        public static bool[] Overloaded(bool[] v)
+        {
             return v;
         }
 
-        public static byte[] Overloaded(byte[] v) {
+        public static byte[] Overloaded(byte[] v)
+        {
             return v;
         }
 
-        public static sbyte[] Overloaded(sbyte[] v) {
+        public static sbyte[] Overloaded(sbyte[] v)
+        {
             return v;
         }
 
-        public static char[] Overloaded(char[] v) {
+        public static char[] Overloaded(char[] v)
+        {
             return v;
         }
 
-        public static short[] Overloaded(short[] v) {
+        public static short[] Overloaded(short[] v)
+        {
             return v;
         }
 
-        public static int[] Overloaded(int[] v) {
+        public static int[] Overloaded(int[] v)
+        {
             return v;
         }
 
-        public static long[] Overloaded(long[] v) {
+        public static long[] Overloaded(long[] v)
+        {
             return v;
         }
 
-        public static ushort[] Overloaded(ushort[] v) {
+        public static ushort[] Overloaded(ushort[] v)
+        {
             return v;
         }
 
-        public static uint[] Overloaded(uint[] v) {
+        public static uint[] Overloaded(uint[] v)
+        {
             return v;
         }
 
-        public static ulong[] Overloaded(ulong[] v) {
+        public static ulong[] Overloaded(ulong[] v)
+        {
             return v;
         }
 
-        public static float[] Overloaded(float[] v) {
+        public static float[] Overloaded(float[] v)
+        {
             return v;
         }
 
-        public static double[] Overloaded(double[] v) {
+        public static double[] Overloaded(double[] v)
+        {
             return v;
         }
 
-        public static decimal[] Overloaded(decimal[] v) {
+        public static decimal[] Overloaded(decimal[] v)
+        {
             return v;
         }
 
-        public static string[] Overloaded(string[] v) {
+        public static string[] Overloaded(string[] v)
+        {
             return v;
         }
 
-        public static ShortEnum[] Overloaded(ShortEnum[] v) {
+        public static ShortEnum[] Overloaded(ShortEnum[] v)
+        {
             return v;
         }
 
-        public static object[] Overloaded(object[] v) {
+        public static object[] Overloaded(object[] v)
+        {
             return v;
         }
 
-        public static InterfaceTest[] Overloaded(InterfaceTest[] v){
+        public static InterfaceTest[] Overloaded(InterfaceTest[] v)
+        {
             return v;
         }
 
-        public static ISayHello1[] Overloaded(ISayHello1[] v) {
+        public static ISayHello1[] Overloaded(ISayHello1[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<bool> Overloaded(
-                                           GenericWrapper<bool> v) {
+            GenericWrapper<bool> v)
+        {
             return v;
         }
 
         public static GenericWrapper<byte> Overloaded(
-                                           GenericWrapper<byte> v) {
+            GenericWrapper<byte> v)
+        {
             return v;
         }
 
         public static GenericWrapper<sbyte> Overloaded(
-                                            GenericWrapper<sbyte> v) {
+            GenericWrapper<sbyte> v)
+        {
             return v;
         }
 
         public static GenericWrapper<char> Overloaded(
-                                           GenericWrapper<char> v) {
+            GenericWrapper<char> v)
+        {
             return v;
         }
 
         public static GenericWrapper<short> Overloaded(
-                                            GenericWrapper<short> v) {
+            GenericWrapper<short> v)
+        {
             return v;
         }
 
         public static GenericWrapper<int> Overloaded(
-                                          GenericWrapper<int> v) {
+            GenericWrapper<int> v)
+        {
             return v;
         }
+
         public static GenericWrapper<long> Overloaded(
-                                           GenericWrapper<long> v) {
+            GenericWrapper<long> v)
+        {
             return v;
         }
 
         public static GenericWrapper<ushort> Overloaded(
-                                             GenericWrapper<ushort> v) {
+            GenericWrapper<ushort> v)
+        {
             return v;
         }
 
         public static GenericWrapper<uint> Overloaded(
-                                           GenericWrapper<uint> v) {
+            GenericWrapper<uint> v)
+        {
             return v;
         }
 
         public static GenericWrapper<ulong> Overloaded(
-                                            GenericWrapper<ulong> v) {
+            GenericWrapper<ulong> v)
+        {
             return v;
         }
 
         public static GenericWrapper<float> Overloaded(
-                                            GenericWrapper<float> v) {
+            GenericWrapper<float> v)
+        {
             return v;
         }
 
         public static GenericWrapper<double> Overloaded(
-                                             GenericWrapper<double> v) {
+            GenericWrapper<double> v)
+        {
             return v;
         }
 
         public static GenericWrapper<decimal> Overloaded(
-                                              GenericWrapper<decimal> v) {
+            GenericWrapper<decimal> v)
+        {
             return v;
         }
 
         public static GenericWrapper<string> Overloaded(
-                                             GenericWrapper<string> v) {
+            GenericWrapper<string> v)
+        {
             return v;
         }
 
         public static GenericWrapper<ShortEnum> Overloaded(
-                                                GenericWrapper<ShortEnum> v) {
+            GenericWrapper<ShortEnum> v)
+        {
             return v;
         }
 
         public static GenericWrapper<object> Overloaded(
-                                             GenericWrapper<object> v) {
+            GenericWrapper<object> v)
+        {
             return v;
         }
 
         public static GenericWrapper<InterfaceTest> Overloaded(
-                                          GenericWrapper<InterfaceTest> v) {
+            GenericWrapper<InterfaceTest> v)
+        {
             return v;
         }
 
         public static GenericWrapper<ISayHello1> Overloaded(
-                                                GenericWrapper<ISayHello1> v) {
+            GenericWrapper<ISayHello1> v)
+        {
             return v;
         }
 
         public static GenericWrapper<bool>[] Overloaded(
-                                           GenericWrapper<bool>[] v) {
+            GenericWrapper<bool>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<byte>[] Overloaded(
-                                           GenericWrapper<byte>[] v) {
+            GenericWrapper<byte>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<sbyte>[] Overloaded(
-                                            GenericWrapper<sbyte>[] v) {
+            GenericWrapper<sbyte>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<char>[] Overloaded(
-                                           GenericWrapper<char>[] v) {
+            GenericWrapper<char>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<short>[] Overloaded(
-                                            GenericWrapper<short>[] v) {
+            GenericWrapper<short>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<int>[] Overloaded(
-                                          GenericWrapper<int>[] v) {
+            GenericWrapper<int>[] v)
+        {
             return v;
         }
+
         public static GenericWrapper<long>[] Overloaded(
-                                           GenericWrapper<long>[] v) {
+            GenericWrapper<long>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<ushort>[] Overloaded(
-                                             GenericWrapper<ushort>[] v) {
+            GenericWrapper<ushort>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<uint>[] Overloaded(
-                                           GenericWrapper<uint>[] v) {
+            GenericWrapper<uint>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<ulong>[] Overloaded(
-                                            GenericWrapper<ulong>[] v) {
+            GenericWrapper<ulong>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<float>[] Overloaded(
-                                            GenericWrapper<float>[] v) {
+            GenericWrapper<float>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<double>[] Overloaded(
-                                             GenericWrapper<double>[] v) {
+            GenericWrapper<double>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<decimal>[] Overloaded(
-                                              GenericWrapper<decimal>[] v) {
+            GenericWrapper<decimal>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<string>[] Overloaded(
-                                             GenericWrapper<string>[] v) {
+            GenericWrapper<string>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<ShortEnum>[] Overloaded(
-                                              GenericWrapper<ShortEnum>[] v) {
+            GenericWrapper<ShortEnum>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<object>[] Overloaded(
-                                             GenericWrapper<object>[] v) {
+            GenericWrapper<object>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<InterfaceTest>[] Overloaded(
-                                          GenericWrapper<InterfaceTest>[] v) {
+            GenericWrapper<InterfaceTest>[] v)
+        {
             return v;
         }
 
         public static GenericWrapper<ISayHello1>[] Overloaded(
-                                              GenericWrapper<ISayHello1>[] v) {
-
+            GenericWrapper<ISayHello1>[] v)
+        {
             return v;
         }
 
-        public static int Overloaded(string s, int i, object[] o) {
+        public static int Overloaded(string s, int i, object[] o)
+        {
             return o.Length;
         }
 
-        public static int Overloaded(string s, int i) {
+        public static int Overloaded(string s, int i)
+        {
             return i;
         }
 
-        public static int Overloaded(int i, string s) {
+        public static int Overloaded(int i, string s)
+        {
             return i;
         }
-
     }
 
 
-    public class MethodTestSub : MethodTest {
-
-        public MethodTestSub() : base() {}
+    public class MethodTestSub : MethodTest
+    {
+        public MethodTestSub() : base()
+        {
+        }
 
-        public string PublicMethod(string echo) {
+        public string PublicMethod(string echo)
+        {
             return echo;
         }
-
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/propertytest.cs b/src/testing/propertytest.cs
index 687571d29..f01c02e0b 100644
--- a/src/testing/propertytest.cs
+++ b/src/testing/propertytest.cs
@@ -1,79 +1,87 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports units tests for property access.
     //========================================================================
 
-    public class PropertyTest {
-
-        public PropertyTest() {}
+    public class PropertyTest
+    {
+        public PropertyTest()
+        {
+        }
 
         int _public_property = 0;
-        public int PublicProperty {
+
+        public int PublicProperty
+        {
             get { return _public_property; }
             set { _public_property = value; }
         }
 
         static int _public_static_property = 0;
-        public static int PublicStaticProperty {
+
+        public static int PublicStaticProperty
+        {
             get { return _public_static_property; }
             set { _public_static_property = value; }
         }
 
         int _protected_property = 0;
-        protected int ProtectedProperty {
+
+        protected int ProtectedProperty
+        {
             get { return _protected_property; }
             set { _protected_property = value; }
         }
 
         static int _protected_static_property = 0;
-        protected static int ProtectedStaticProperty {
+
+        protected static int ProtectedStaticProperty
+        {
             get { return _protected_static_property; }
             set { _protected_static_property = value; }
         }
 
         int _internal_property = 0;
-        internal int InternalProperty {
+
+        internal int InternalProperty
+        {
             get { return _internal_property; }
             set { _internal_property = value; }
         }
 
         static int _internal_static_property = 0;
-        internal static int InternalStaticProperty {
+
+        internal static int InternalStaticProperty
+        {
             get { return _internal_static_property; }
             set { _internal_static_property = value; }
         }
 
         int _private_property = 0;
-        private int PrivateProperty {
+
+        private int PrivateProperty
+        {
             get { return _private_property; }
             set { _private_property = value; }
         }
 
         static int _private_static_property = 0;
-        private static int PrivateStaticProperty {
+
+        private static int PrivateStaticProperty
+        {
             get { return _private_static_property; }
             set { _private_static_property = value; }
         }
 
         ShortEnum _enum_property = ShortEnum.Zero;
 
-        public ShortEnum EnumProperty {
+        public ShortEnum EnumProperty
+        {
             get { return _enum_property; }
             set { _enum_property = value; }
         }
-
     }
-
-}
+}
\ No newline at end of file
diff --git a/src/testing/subclasstest.cs b/src/testing/subclasstest.cs
index 7a68c6dca..5d8f171c8 100644
--- a/src/testing/subclasstest.cs
+++ b/src/testing/subclasstest.cs
@@ -81,7 +81,7 @@ public static string test_bar(IInterfaceTest x, string s, int i)
         // test instances can be constructed in managed code
         public static IInterfaceTest create_instance(Type t)
         {
-            return (IInterfaceTest)t.GetConstructor(new Type[] {}).Invoke(new Object[] {});
+            return (IInterfaceTest)t.GetConstructor(new Type[] { }).Invoke(new Object[] { });
         }
 
         // test instances pass through managed code unchanged
@@ -103,4 +103,4 @@ public static int test_event(IInterfaceTest x, int value)
             return et.value;
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/testing/threadtest.cs b/src/testing/threadtest.cs
index caad9fcf4..0a4f46ccc 100644
--- a/src/testing/threadtest.cs
+++ b/src/testing/threadtest.cs
@@ -1,46 +1,40 @@
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
-
 using System;
 using System.Collections;
 using Python.Runtime;
 
-namespace Python.Test {
-
+namespace Python.Test
+{
     //========================================================================
     // Supports CLR threading / reentrancy unit tests.
     //========================================================================
 
-    public class ThreadTest {
-
+    public class ThreadTest
+    {
         private static PyObject module;
 
-        private static string testmod = 
-        "import CLR\n" +
-        "from CLR.Python.Test import ThreadTest\n" + 
-        "\n" +
-        "def echostring(value):\n" + 
-        "    return value\n" + 
-        "\n" + 
-        "def echostring2(value):\n" + 
-        "    return ThreadTest.CallEchoString(value)\n" + 
-        "\n";
+        private static string testmod =
+            "import CLR\n" +
+            "from CLR.Python.Test import ThreadTest\n" +
+            "\n" +
+            "def echostring(value):\n" +
+            "    return value\n" +
+            "\n" +
+            "def echostring2(value):\n" +
+            "    return ThreadTest.CallEchoString(value)\n" +
+            "\n";
 
 
         // This method calls back into the CPython runtime - tests
-        // call this from Python to check that we don't hang on 
+        // call this from Python to check that we don't hang on
         // nested transitions from managed to Python code and back.
 
-        public static string CallEchoString(string arg) {
+        public static string CallEchoString(string arg)
+        {
             IntPtr gs = PythonEngine.AcquireLock();
-            try {
-                if (module == null) {
+            try
+            {
+                if (module == null)
+                {
                     module = PythonEngine.ModuleFromString("tt", testmod);
                 }
                 PyObject func = module.GetAttr("echostring");
@@ -52,15 +46,19 @@ public static string CallEchoString(string arg) {
                 temp.Dispose();
                 return result;
             }
-            finally {
+            finally
+            {
                 PythonEngine.ReleaseLock(gs);
             }
         }
 
-        public static string CallEchoString2(string arg) {
+        public static string CallEchoString2(string arg)
+        {
             IntPtr gs = PythonEngine.AcquireLock();
-            try {
-                if (module == null) {
+            try
+            {
+                if (module == null)
+                {
                     module = PythonEngine.ModuleFromString("tt", testmod);
                 }
 
@@ -73,13 +71,10 @@ public static string CallEchoString2(string arg) {
                 temp.Dispose();
                 return result;
             }
-            finally {
+            finally
+            {
                 PythonEngine.ReleaseLock(gs);
             }
         }
-
-        
     }
-
-
-}
+}
\ No newline at end of file
diff --git a/src/tests/leaktest.py b/src/tests/leaktest.py
index 95f3873a2..383da87c8 100644
--- a/src/tests/leaktest.py
+++ b/src/tests/leaktest.py
@@ -1,15 +1,8 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
+from __future__ import print_function
 import System
 import gc
 
+
 class LeakTest:
     """A leak-check test for the objects implemented in the managed
        runtime. For each kind of object tested, memory should reach
@@ -23,7 +16,7 @@ def __init__(self):
 
     def notify(self, msg):
         if not self.quiet:
-            print msg
+            print(msg)
 
     def start_test(self):
         System.GC.Collect(System.GC.MaxGeneration)
@@ -40,8 +33,8 @@ def end_test(self):
             diff = '+%d' % diff
         else:
             diff = '%d' % diff
-        print "  start: %d  end: %d diff: %s" % (start, end, diff)
-        print ""
+        print("  start: %d  end: %d diff: %s" % (start, end, diff))
+        print("")
 
     def run(self):
         self.testModules()
@@ -50,15 +43,13 @@ def run(self):
         self.testEvents()
         self.testDelegates()
 
-
     def report(self):
         import sys, gc
         gc.collect()
         dicttype = type({})
         for item in gc.get_objects():
             if type(item) != dicttype:
-                print item, sys.getrefcount(item)
-
+                print(item, sys.getrefcount(item))
 
     def testModules(self):
         self.notify("Running module leak check...")
@@ -66,21 +57,20 @@ def testModules(self):
         for i in xrange(self.count):
             if i == 10:
                 self.start_test()
-                
+
             __import__('clr')
             __import__('System')
             __import__('System.IO')
             __import__('System.Net')
-            __import__('System.Xml')            
+            __import__('System.Xml')
 
         self.end_test()
 
-
     def testClasses(self):
         from System.Collections import Hashtable
         from Python.Test import StringDelegate
         from System import Int32
-        
+
         self.notify("Running class leak check...")
 
         for i in xrange(self.count):
@@ -101,10 +91,9 @@ def testClasses(self):
 
         self.end_test()
 
-
     def testEnumerations(self):
         from Python import Test
-        
+
         self.notify("Running enum leak check...")
 
         for i in xrange(self.count):
@@ -137,7 +126,6 @@ def testEnumerations(self):
 
         self.end_test()
 
-
     def testEvents(self):
         from Python.Test import EventTest, TestEventArgs
 
@@ -204,7 +192,8 @@ def testEvents(self):
             testob.PublicEvent -= EventTest.StaticHandler
 
             # Function event handler
-            dict = {'value':None}
+            dict = {'value': None}
+
             def handler(sender, args, dict=dict):
                 dict['value'] = args.value
 
@@ -215,7 +204,6 @@ def handler(sender, args, dict=dict):
 
         self.end_test()
 
-
     def testDelegates(self):
         from Python.Test import DelegateTest, StringDelegate
         import System
@@ -325,12 +313,13 @@ def testDelegates(self):
             del d1
             del d2
             del md
-        
+
         self.end_test()
 
 
 class GenericHandler:
     """A generic handler to test event callbacks."""
+
     def __init__(self):
         self.value = None
 
@@ -340,6 +329,7 @@ def handler(self, sender, args):
 
 class VariableArgsHandler:
     """A variable args handler to test event callbacks."""
+
     def __init__(self):
         self.value = None
 
@@ -350,6 +340,7 @@ def handler(self, *args):
 
 class CallableHandler:
     """A callable handler to test event callbacks."""
+
     def __init__(self):
         self.value = None
 
@@ -359,6 +350,7 @@ def __call__(self, sender, args):
 
 class VarCallableHandler:
     """A variable args callable handler to test event callbacks."""
+
     def __init__(self):
         self.value = None
 
@@ -405,18 +397,13 @@ def c_hello(cls):
         return "hello"
 
     c_hello = classmethod(c_hello)
-    
+
 
 def hello():
     return "hello"
 
 
-
-
 if __name__ == '__main__':
     test = LeakTest()
     test.run()
     test.report()
-
-
-
diff --git a/src/tests/profile.py b/src/tests/profile.py
index cc5e48ac9..6117b9616 100644
--- a/src/tests/profile.py
+++ b/src/tests/profile.py
@@ -1,14 +1,7 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 """Run all of the unit tests for this package over and over,
    in order to provide for better profiling."""
+from __future__ import print_function
+
 
 def main():
     import sys, os, gc, time
@@ -16,27 +9,23 @@ def main():
     dirname = os.path.split(__file__)
     sys.path.append(dirname)
     import runtests
-    
+
     gc.set_debug(gc.DEBUG_LEAK)
 
     start = time.clock()
 
     for i in range(50):
-        print 'iteration: %d' % i
+        print('iteration: %d' % i)
         runtests.main()
 
     stop = time.clock()
     took = str(stop - start)
-    print 'Total Time: %s' % took
-
+    print('Total Time: %s' % took)
 
     for item in gc.get_objects():
-        print item, sys.getrefcount(item)
-
+        print(item, sys.getrefcount(item))
 
 
 if __name__ == '__main__':
     main()
     sys.exit(0)
-    
-
diff --git a/src/tests/runtests.py b/src/tests/runtests.py
index 60bf075bf..3a7bde07b 100644
--- a/src/tests/runtests.py
+++ b/src/tests/runtests.py
@@ -1,18 +1,10 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 """Run all of the unit tests for this package."""
 
 import os
 import sys
 import unittest
 import warnfilter
+
 warnfilter.addClrWarnfilter()
 
 try:
@@ -22,29 +14,30 @@
     import clr
 
 test_modules = (
-        'test_module',  # Passes on its own, but not here if
-        # other test modules that import System.Windows.Forms
-        # run first. They must not do module level import/AddReference()
-        # of the System.Windows.Forms namespace.
-        'test_event',
-        'test_constructors',
-        'test_enum',
-        'test_method',
-        
-        'test_exceptions',
-        'test_compat',    
-        'test_generic',
-        'test_conversion',
-        'test_class',
-        'test_interface',
-        'test_field',
-        'test_property',
-        'test_indexer',
-        'test_delegate',
-        'test_array',
-        'test_thread'
+    'test_module',  # Passes on its own, but not here if
+    # other test modules that import System.Windows.Forms
+    # run first. They must not do module level import/AddReference()
+    # of the System.Windows.Forms namespace.
+    'test_event',
+    'test_constructors',
+    'test_enum',
+    'test_method',
+
+    'test_exceptions',
+    'test_compat',
+    'test_generic',
+    'test_conversion',
+    'test_class',
+    'test_interface',
+    'test_field',
+    'test_property',
+    'test_indexer',
+    'test_delegate',
+    'test_array',
+    'test_thread'
 )
 
+
 def removePyc():
     path = os.path.dirname(os.path.abspath(__file__))
     for name in test_modules:
@@ -52,23 +45,23 @@ def removePyc():
         if os.path.isfile(pyc):
             os.unlink(pyc)
 
-def main(verbosity=1):
 
+def main(verbosity=1):
     removePyc()
-    
+
     suite = unittest.TestSuite()
-    
+
     for name in test_modules:
         module = __import__(name)
         suite.addTests((module.test_suite(),))
-        
+
     result = unittest.TextTestRunner(verbosity=verbosity).run(suite)
     if not result.wasSuccessful():
         raise Exception("Tests failed")
 
+
 if __name__ == '__main__':
     main(1)
     if '--pause' in sys.argv:
         print("Press enter to continue")
         raw_input()
-
diff --git a/src/tests/stress.py b/src/tests/stress.py
index d0716022a..dba74a6df 100644
--- a/src/tests/stress.py
+++ b/src/tests/stress.py
@@ -1,23 +1,15 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 """
 Run all of the unit tests for this package multiple times in a highly
 multithreaded way to stress the system. This makes it possible to look
 for memory leaks and threading issues and provides a good target for a
 profiler to accumulate better data.
 """
+from __future__ import print_function
 
 import sys, os, gc, time, threading, thread
 
-class StressTest:
 
+class StressTest:
     def __init__(self):
         self.dirname = os.path.split(__file__)[0]
         sys.path.append(self.dirname)
@@ -28,8 +20,8 @@ def __init__(self):
 
     def dprint(self, msg):
         # Debugging helper to trace thread-related tests.
-        if 1: print msg
-    
+        if 1: print(msg)
+
     def markStart(self):
         self._start = time.clock()
 
@@ -41,7 +33,7 @@ def elapsed(self):
 
     def printGCReport(self):
         for item in gc.get_objects():
-            print item, sys.getrefcount(item)
+            print(item, sys.getrefcount(item))
 
     def runThread(self, iterations):
         thread_id = thread.get_ident()
@@ -51,9 +43,9 @@ def runThread(self, iterations):
             self.dprint("thread %s iter %d start" % (thread_id, i))
             self.module.main()
             self.dprint("thread %s iter %d end" % (thread_id, i))
-        self.done.append(None)                
+        self.done.append(None)
         self.dprint("thread %s done" % thread_id)
-        
+
     def stressTest(self, iterations=1, threads=1):
         args = (iterations,)
         self.markStart()
@@ -66,7 +58,7 @@ def stressTest(self, iterations=1, threads=1):
         self.markFinish()
         took = self.elapsed()
         self.printGCReport()
-        
+
 
 def main():
     test = StressTest()
@@ -76,5 +68,3 @@ def main():
 if __name__ == '__main__':
     main()
     sys.exit(0)
-    
-
diff --git a/src/tests/stresstest.py b/src/tests/stresstest.py
index 58b448c78..bdb7c3e70 100644
--- a/src/tests/stresstest.py
+++ b/src/tests/stresstest.py
@@ -1,40 +1,30 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 """Basic stress test."""
 
-def main():
-
 
+def main():
     import time
     start = time.clock()
 
     for i in range(2000):
-        print i
+        print(i)
         for name in (
-            'test_module',
-            'test_conversion',
-            #'test_class',
-            'test_interface',
-            'test_enum',
-            'test_field',
-            'test_property',
-            'test_indexer',
-            'test_event',
-            'test_method',
-            #'test_delegate',
-            'test_array',
-            ):
+                'test_module',
+                'test_conversion',
+                # 'test_class',
+                'test_interface',
+                'test_enum',
+                'test_field',
+                'test_property',
+                'test_indexer',
+                'test_event',
+                'test_method',
+                # 'test_delegate',
+                'test_array',
+        ):
             module = __import__(name)
             module.main()
 
-    #import pdb; pdb.set_trace()
+    # import pdb; pdb.set_trace()
 
     stop = time.clock()
     took = str(stop - start)
@@ -42,9 +32,8 @@ def main():
 
     import gc
     for i in gc.get_objects():
-        print i
+        print(i)
+
 
 if __name__ == '__main__':
     main()
-
-
diff --git a/src/tests/test_array.py b/src/tests/test_array.py
index a545c1b4c..9e396d7ed 100644
--- a/src/tests/test_array.py
+++ b/src/tests/test_array.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 import Python.Test as Test
 import System
@@ -26,7 +17,7 @@ def testPublicArray(self):
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -42,14 +33,13 @@ def testPublicArray(self):
         items[-1] = 4
         self.assertTrue(items[-1] == 4)
 
-
     def testProtectedArray(self):
         """Test protected arrays."""
         object = Test.ProtectedArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -65,7 +55,6 @@ def testProtectedArray(self):
         items[-1] = 4
         self.assertTrue(items[-1] == 4)
 
-
     def testInternalArray(self):
         """Test internal arrays."""
 
@@ -75,7 +64,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testPrivateArray(self):
         """Test private arrays."""
 
@@ -85,7 +73,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testArrayBoundsChecking(self):
         """Test array bounds checking."""
 
@@ -128,7 +115,6 @@ def test():
 
         self.assertRaises(IndexError, test)
 
-
     def testArrayContains(self):
         """Test array support for __contains__."""
 
@@ -141,19 +127,18 @@ def testArrayContains(self):
         self.assertTrue(3 in items)
         self.assertTrue(4 in items)
 
-        self.assertFalse(5 in items)    # "H:\Python27\Lib\unittest\case.py", line 592, in deprecated_func,
-        self.assertFalse(-1 in items)   #TypeError: int() argument must be a string or a number, not 'NoneType'
-        self.assertFalse(None in items) # which threw ^ here which is a little odd.
+        self.assertFalse(5 in items)  # "H:\Python27\Lib\unittest\case.py", line 592, in deprecated_func,
+        self.assertFalse(-1 in items)  # TypeError: int() argument must be a string or a number, not 'NoneType'
+        self.assertFalse(None in items)  # which threw ^ here which is a little odd.
         # But when run from runtests.py. Not when this module ran by itself.
 
-
     def testBooleanArray(self):
         """Test boolean arrays."""
         object = Test.BooleanArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == True)
         self.assertTrue(items[1] == False)
         self.assertTrue(items[2] == True)
@@ -178,14 +163,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testByteArray(self):
         """Test byte arrays."""
         object = Test.ByteArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -228,14 +212,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testSByteArray(self):
         """Test sbyte arrays."""
         object = Test.SByteArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -278,14 +261,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testCharArray(self):
         """Test char arrays."""
         object = Test.CharArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 'a')
         self.assertTrue(items[4] == 'e')
 
@@ -316,14 +298,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInt16Array(self):
         """Test Int16 arrays."""
         object = Test.Int16ArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -366,14 +347,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInt32Array(self):
         """Test Int32 arrays."""
         object = Test.Int32ArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -416,14 +396,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInt64Array(self):
         """Test Int64 arrays."""
         object = Test.Int64ArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -466,14 +445,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testUInt16Array(self):
         """Test UInt16 arrays."""
         object = Test.UInt16ArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -515,7 +493,6 @@ def test():
             object[0] = "wrong"
 
         self.assertRaises(TypeError, test)
-        
 
     def testUInt32Array(self):
         """Test UInt32 arrays."""
@@ -523,7 +500,7 @@ def testUInt32Array(self):
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -566,14 +543,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testUInt64Array(self):
         """Test UInt64 arrays."""
         object = Test.UInt64ArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0)
         self.assertTrue(items[4] == 4)
 
@@ -616,14 +592,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testSingleArray(self):
         """Test Single arrays."""
         object = Test.SingleArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0.0)
         self.assertTrue(items[4] == 4.0)
 
@@ -654,14 +629,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testDoubleArray(self):
         """Test Double arrays."""
         object = Test.DoubleArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == 0.0)
         self.assertTrue(items[4] == 4.0)
 
@@ -692,7 +666,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testDecimalArray(self):
         """Test Decimal arrays."""
         object = Test.DecimalArrayTest()
@@ -703,7 +676,7 @@ def testDecimalArray(self):
         min_d = Decimal.Parse("-79228162514264337593543950335")
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == Decimal(0))
         self.assertTrue(items[4] == Decimal(4))
 
@@ -731,14 +704,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testStringArray(self):
         """Test String arrays."""
         object = Test.StringArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == '0')
         self.assertTrue(items[4] == '4')
 
@@ -766,7 +738,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testEnumArray(self):
         """Test enum arrays."""
         from Python.Test import ShortEnum
@@ -774,7 +745,7 @@ def testEnumArray(self):
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == ShortEnum.Zero)
         self.assertTrue(items[4] == ShortEnum.Four)
 
@@ -808,7 +779,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testObjectArray(self):
         """Test object arrays."""
         from Python.Test import Spam
@@ -816,7 +786,7 @@ def testObjectArray(self):
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0].GetValue() == "0")
         self.assertTrue(items[4].GetValue() == "4")
 
@@ -850,14 +820,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testNullArray(self):
         """Test null arrays."""
         object = Test.NullArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0] == None)
         self.assertTrue(items[4] == None)
 
@@ -882,7 +851,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInterfaceArray(self):
         """Test interface arrays."""
         from Python.Test import Spam
@@ -890,7 +858,7 @@ def testInterfaceArray(self):
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0].GetValue() == "0")
         self.assertTrue(items[4].GetValue() == "4")
 
@@ -927,7 +895,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testTypedArray(self):
         """Test typed arrays."""
         from Python.Test import Spam
@@ -935,7 +902,7 @@ def testTypedArray(self):
         items = object.items
 
         self.assertTrue(len(items) == 5)
-        
+
         self.assertTrue(items[0].GetValue() == "0")
         self.assertTrue(items[4].GetValue() == "4")
 
@@ -972,14 +939,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testMultiDimensionalArray(self):
         """Test multi-dimensional arrays."""
         object = Test.MultiDimensionalArrayTest()
         items = object.items
 
         self.assertTrue(len(items) == 25)
-        
+
         self.assertTrue(items[0, 0] == 0)
         self.assertTrue(items[0, 1] == 1)
         self.assertTrue(items[0, 2] == 2)
@@ -1005,7 +971,7 @@ def testMultiDimensionalArray(self):
         self.assertTrue(items[4, 2] == 22)
         self.assertTrue(items[4, 3] == 23)
         self.assertTrue(items[4, 4] == 24)
-        
+
         max = 2147483647
         min = -2147483648
 
@@ -1045,7 +1011,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testArrayIteration(self):
         """Test array iteration."""
         items = Test.Int32ArrayTest().items
@@ -1063,7 +1028,6 @@ def testArrayIteration(self):
         for i in empty:
             raise TypeError('iteration over empty array')
 
-
     def testTupleArrayConversion(self):
         """Test conversion of tuples to array arguments."""
         from Python.Test import ArrayConversionTest
@@ -1078,7 +1042,6 @@ def testTupleArrayConversion(self):
         self.assertTrue(result[0].__class__ == Spam)
         self.assertTrue(len(result) == 10)
 
-
     def testTupleNestedArrayConversion(self):
         """Test conversion of tuples to array-of-array arguments."""
         from Python.Test import ArrayConversionTest
@@ -1091,14 +1054,13 @@ def testTupleNestedArrayConversion(self):
                 subs.append(Spam(str(i)))
             items.append(tuple(subs))
         items = tuple(items)
-        
+
         result = ArrayConversionTest.EchoRangeAA(items)
-        
+
         self.assertTrue(len(result) == 10)
         self.assertTrue(len(result[0]) == 10)
         self.assertTrue(result[0][0].__class__ == Spam)
 
-
     def testListArrayConversion(self):
         """Test conversion of lists to array arguments."""
         from Python.Test import ArrayConversionTest
@@ -1112,7 +1074,6 @@ def testListArrayConversion(self):
         self.assertTrue(result[0].__class__ == Spam)
         self.assertTrue(len(result) == 10)
 
-
     def testListNestedArrayConversion(self):
         """Test conversion of lists to array-of-array arguments."""
         from Python.Test import ArrayConversionTest
@@ -1124,14 +1085,13 @@ def testListNestedArrayConversion(self):
             for n in range(10):
                 subs.append(Spam(str(i)))
             items.append(subs)
-        
+
         result = ArrayConversionTest.EchoRangeAA(items)
-        
+
         self.assertTrue(len(result) == 10)
         self.assertTrue(len(result[0]) == 10)
         self.assertTrue(result[0][0].__class__ == Spam)
 
-
     def testSequenceArrayConversion(self):
         """Test conversion of sequence-like objects to array arguments."""
         from Python.Test import ArrayConversionTest
@@ -1149,7 +1109,6 @@ def testSequenceArrayConversion(self):
         self.assertTrue(result[0].__class__ == Spam)
         self.assertTrue(len(result) == 10)
 
-
     def testSequenceNestedArrayConversion(self):
         """Test conversion of sequences to array-of-array arguments."""
         from Python.Test import ArrayConversionTest
@@ -1165,14 +1124,13 @@ def testSequenceNestedArrayConversion(self):
             for n in range(10):
                 subs.append(Spam(str(i)))
             items.append(subs)
-        
+
         result = ArrayConversionTest.EchoRangeAA(items)
-        
+
         self.assertTrue(len(result) == 10)
         self.assertTrue(len(result[0]) == 10)
         self.assertTrue(result[0][0].__class__ == Spam)
 
-
     def testTupleArrayConversionTypeChecking(self):
         """Test error handling for tuple conversion to array arguments."""
         from Python.Test import ArrayConversionTest
@@ -1193,22 +1151,21 @@ def testTupleArrayConversionTypeChecking(self):
         self.assertTrue(result[1] == None)
         self.assertTrue(len(result) == 10)
 
-        def test(items = items):
+        def test(items=items):
             temp = list(items)
             temp[1] = 1
 
             result = ArrayConversionTest.EchoRange(tuple(temp))
 
-        self.assertRaises(TypeError, test) 
+        self.assertRaises(TypeError, test)
 
-        def test(items = items):
+        def test(items=items):
             temp = list(items)
             temp[1] = "spam"
 
             result = ArrayConversionTest.EchoRange(tuple(temp))
 
-        self.assertRaises(TypeError, test) 
-
+        self.assertRaises(TypeError, test)
 
     def testListArrayConversionTypeChecking(self):
         """Test error handling for list conversion to array arguments."""
@@ -1229,18 +1186,17 @@ def testListArrayConversionTypeChecking(self):
         self.assertTrue(result[1] == None)
         self.assertTrue(len(result) == 10)
 
-        def test(items = items):
+        def test(items=items):
             items[1] = 1
             result = ArrayConversionTest.EchoRange(items)
 
-        self.assertRaises(TypeError, test) 
+        self.assertRaises(TypeError, test)
 
-        def test(items = items):
+        def test(items=items):
             items[1] = "spam"
             result = ArrayConversionTest.EchoRange(items)
 
-        self.assertRaises(TypeError, test) 
-
+        self.assertRaises(TypeError, test)
 
     def testSequenceArrayConversionTypeChecking(self):
         """Test error handling for sequence conversion to array arguments."""
@@ -1265,18 +1221,17 @@ def testSequenceArrayConversionTypeChecking(self):
         self.assertTrue(result[1] == None)
         self.assertTrue(len(result) == 10)
 
-        def test(items = items):
+        def test(items=items):
             items[1] = 1
             result = ArrayConversionTest.EchoRange(items)
 
-        self.assertRaises(TypeError, test) 
+        self.assertRaises(TypeError, test)
 
-        def test(items = items):
+        def test(items=items):
             items[1] = "spam"
             result = ArrayConversionTest.EchoRange(items)
 
-        self.assertRaises(TypeError, test) 
-
+        self.assertRaises(TypeError, test)
 
     def testMDArrayConversion(self):
         """Test passing of multi-dimensional array arguments."""
@@ -1295,14 +1250,13 @@ def testMDArrayConversion(self):
         for i in range(5):
             for n in range(5):
                 items.SetValue(Spam(str((i, n))), (i, n))
-        
+
         result = ArrayConversionTest.EchoRangeMD(items)
-        
+
         self.assertTrue(len(result) == 25)
         self.assertTrue(result[0, 0].__class__ == Spam)
         self.assertTrue(result[0, 0].__class__ == Spam)
 
-
     def testBoxedValueTypeMutationResult(self):
         """Test behavior of boxed value types."""
 
@@ -1311,7 +1265,7 @@ def testBoxedValueTypeMutationResult(self):
         # value type semantics that can be mapped to the CLR, so it is easy
         # to accidentally write code like the following which is not really
         # mutating value types in-place but changing boxed copies.
-        
+
         from System.Drawing import Point
         from System import Array
 
@@ -1340,10 +1294,9 @@ def testBoxedValueTypeMutationResult(self):
             self.assertTrue(items[i].X == i + 1)
             self.assertTrue(items[i].Y == i + 1)
 
-
     def testSpecialArrayCreation(self):
         """Test using the Array[<type>] syntax for creating arrays."""
-        from Python.Test import ISayHello1, InterfaceTest, ShortEnum        
+        from Python.Test import ISayHello1, InterfaceTest, ShortEnum
         from System import Array
         inst = InterfaceTest()
 
@@ -1354,128 +1307,127 @@ def testSpecialArrayCreation(self):
 
         value = Array[bool]([True, True])
         self.assertTrue(value[0] == True)
-        self.assertTrue(value[1] == True)        
+        self.assertTrue(value[1] == True)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Byte]([0, 255])
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 255)        
+        self.assertTrue(value[1] == 255)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.SByte]([0, 127])
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 127)        
+        self.assertTrue(value[1] == 127)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Char]([six.u('A'), six.u('Z')])
         self.assertTrue(value[0] == six.u('A'))
         self.assertTrue(value[1] == six.u('Z'))
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Char]([0, 65535])
         self.assertTrue(value[0] == unichr(0))
-        self.assertTrue(value[1] == unichr(65535))        
+        self.assertTrue(value[1] == unichr(65535))
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Int16]([0, 32767])
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 32767)        
+        self.assertTrue(value[1] == 32767)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Int32]([0, 2147483647])
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 2147483647)        
+        self.assertTrue(value[1] == 2147483647)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[int]([0, 2147483647])
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 2147483647)        
+        self.assertTrue(value[1] == 2147483647)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Int64]([0, long(9223372036854775807)])
         self.assertTrue(value[0] == 0)
         self.assertTrue(value[1] == long(9223372036854775807))
         self.assertTrue(value.Length == 2)
-        
+
         # there's no explicit long type in python3, use System.Int64 instead
         if not six.PY3:
             value = Array[long]([0, long(9223372036854775807)])
             self.assertTrue(value[0] == 0)
             self.assertTrue(value[1] == long(9223372036854775807))
             self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.UInt16]([0, 65000])
         self.assertTrue(value[0] == 0)
         self.assertTrue(value[1] == 65000)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.UInt32]([0, long(4294967295)])
         self.assertTrue(value[0] == 0)
         self.assertTrue(value[1] == long(4294967295))
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.UInt64]([0, long(18446744073709551615)])
         self.assertTrue(value[0] == 0)
         self.assertTrue(value[1] == long(18446744073709551615))
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Single]([0.0, 3.402823e38])
         self.assertTrue(value[0] == 0.0)
-        self.assertTrue(value[1] == 3.402823e38)        
+        self.assertTrue(value[1] == 3.402823e38)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Double]([0.0, 1.7976931348623157e308])
         self.assertTrue(value[0] == 0.0)
-        self.assertTrue(value[1] == 1.7976931348623157e308)        
+        self.assertTrue(value[1] == 1.7976931348623157e308)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[float]([0.0, 1.7976931348623157e308])
         self.assertTrue(value[0] == 0.0)
-        self.assertTrue(value[1] == 1.7976931348623157e308)        
+        self.assertTrue(value[1] == 1.7976931348623157e308)
         self.assertTrue(value.Length == 2)
-        
-        value = Array[System.Decimal]([System.Decimal.Zero,System.Decimal.One])
+
+        value = Array[System.Decimal]([System.Decimal.Zero, System.Decimal.One])
         self.assertTrue(value[0] == System.Decimal.Zero)
-        self.assertTrue(value[1] == System.Decimal.One)        
+        self.assertTrue(value[1] == System.Decimal.One)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.String](["one", "two"])
         self.assertTrue(value[0] == "one")
         self.assertTrue(value[1] == "two")
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[str](["one", "two"])
         self.assertTrue(value[0] == "one")
         self.assertTrue(value[1] == "two")
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[ShortEnum]([ShortEnum.Zero, ShortEnum.One])
         self.assertTrue(value[0] == ShortEnum.Zero)
         self.assertTrue(value[1] == ShortEnum.One)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[System.Object]([inst, inst])
         self.assertTrue(value[0].__class__ == inst.__class__)
-        self.assertTrue(value[1].__class__ == inst.__class__)        
+        self.assertTrue(value[1].__class__ == inst.__class__)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[InterfaceTest]([inst, inst])
         self.assertTrue(value[0].__class__ == inst.__class__)
-        self.assertTrue(value[1].__class__ == inst.__class__)        
+        self.assertTrue(value[1].__class__ == inst.__class__)
         self.assertTrue(value.Length == 2)
-        
+
         value = Array[ISayHello1]([inst, inst])
         self.assertTrue(value[0].__class__ == inst.__class__)
-        self.assertTrue(value[1].__class__ == inst.__class__)        
+        self.assertTrue(value[1].__class__ == inst.__class__)
         self.assertTrue(value.Length == 2)
 
         inst = System.Exception("badness")
         value = Array[System.Exception]([inst, inst])
         self.assertTrue(value[0].__class__ == inst.__class__)
-        self.assertTrue(value[1].__class__ == inst.__class__)        
+        self.assertTrue(value[1].__class__ == inst.__class__)
         self.assertTrue(value.Length == 2)
 
-
     def testArrayAbuse(self):
         """Test array abuse."""
         _class = Test.PublicArrayTest
@@ -1524,13 +1476,13 @@ def test():
         self.assertRaises(TypeError, test)
 
 
-
 def test_suite():
     return unittest.makeSuite(ArrayTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_class.py b/src/tests/test_class.py
index da50ea876..fe8fc982b 100644
--- a/src/tests/test_class.py
+++ b/src/tests/test_class.py
@@ -1,11 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
 from System.Collections import Hashtable
 from Python.Test import ClassTest
 import sys, os, string, unittest, types
@@ -27,13 +19,11 @@ def testBasicReferenceType(self):
         String = System.String
         self.assertEquals(String.Empty, "")
 
-
     def testBasicValueType(self):
         """Test usage of CLR defined value types."""
         Int32 = System.Int32
         self.assertEquals(Int32.MaxValue, 2147483647)
 
-
     def testClassStandardAttrs(self):
         """Test standard class attributes."""
         self.assertTrue(ClassTest.__name__ == 'ClassTest')
@@ -41,25 +31,21 @@ def testClassStandardAttrs(self):
         self.assertTrue(type(ClassTest.__dict__) == DictProxyType)
         self.assertTrue(len(ClassTest.__doc__) > 0)
 
-
     def testClassDocstrings(self):
         """Test standard class docstring generation"""
         value = 'Void .ctor()'
         self.assertTrue(ClassTest.__doc__ == value)
 
-
     def testClassDefaultStr(self):
         """Test the default __str__ implementation for managed objects."""
         s = System.String("this is a test")
         self.assertTrue(str(s) == "this is a test")
 
-
     def testClassDefaultRepr(self):
         """Test the default __repr__ implementation for managed objects."""
         s = System.String("this is a test")
         self.assertTrue(repr(s).startswith("<System.String object"))
 
-
     def testNonPublicClass(self):
         """Test that non-public classes are inaccessible."""
         from Python import Test
@@ -74,7 +60,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testBasicSubclass(self):
         """Test basic subclass of a managed class."""
 
@@ -93,17 +78,16 @@ def howMany(self):
         self.assertTrue(table.Count == 0)
 
         table.set_Item('one', 'one')
-        
+
         self.assertTrue(table.howMany() == 1)
         self.assertTrue(table.Count == 1)
 
         MyTable = None
 
-
     def testSubclassWithNoArgConstructor(self):
         """Test subclass of a managed class with a no-arg constructor."""
         from Python.Test import ClassCtorTest1
-        
+
         class SubClass(ClassCtorTest1):
             def __init__(self, name):
                 self.name = name
@@ -114,7 +98,7 @@ def __init__(self, name):
     def testSubclassWithVariousConstructors(self):
         """Test subclass of a managed class with various constructors."""
         from Python.Test import ClassCtorTest2
-        
+
         class SubClass(ClassCtorTest2):
             def __init__(self, v):
                 ClassCtorTest2.__init__(self)
@@ -131,7 +115,6 @@ def __init__(self, v):
         inst = SubClass2('test')
         self.assertTrue(inst.value == 'test')
 
-
     def testStructConstruction(self):
         """Test construction of structs."""
         from System.Drawing import Point
@@ -150,13 +133,11 @@ def testStructConstruction(self):
         self.assertTrue(p.X == 10)
         self.assertTrue(p.Y == 10)
 
-
-
     # test strange __new__ interactions
-    
+
     # test weird metatype
     # test recursion
-    # test 
+    # test
 
 
     def testIEnumerableIteration(self):
@@ -172,7 +153,6 @@ def testIEnumerableIteration(self):
             cname = item.__class__.__name__
             self.assertTrue(cname.endswith('DictionaryEntry'))
 
-
     def testIEnumeratorIteration(self):
         """Test iteration over objects supporting IEnumerator."""
         chars = Test.ClassTest.GetEnumerator()
@@ -180,14 +160,10 @@ def testIEnumeratorIteration(self):
         for item in chars:
             self.assertTrue(item in 'test string')
 
-
-
-
     def testOverrideGetItem(self):
         """Test managed subclass overriding __getitem__."""
 
         class MyTable(Hashtable):
-                
             def __getitem__(self, key):
                 value = Hashtable.__getitem__(self, key)
                 return 'my ' + str(value)
@@ -201,14 +177,12 @@ def __getitem__(self, key):
         self.assertTrue(table['two'] == 'my two')
         self.assertTrue(table['three'] == 'my three')
 
-        self.assertTrue(table.Count == 3)                    
-
+        self.assertTrue(table.Count == 3)
 
     def testOverrideSetItem(self):
         """Test managed subclass overriding __setitem__."""
 
         class MyTable(Hashtable):
-                
             def __setitem__(self, key, value):
                 value = 'my ' + str(value)
                 Hashtable.__setitem__(self, key, value)
@@ -222,26 +196,26 @@ def __setitem__(self, key, value):
         self.assertTrue(table['two'] == 'my two')
         self.assertTrue(table['three'] == 'my three')
 
-        self.assertTrue(table.Count == 3)                    
-
+        self.assertTrue(table.Count == 3)
 
 
 class ClassicClass:
     def kind(self):
         return 'classic'
 
+
 class NewStyleClass(object):
     def kind(self):
         return 'new-style'
 
 
-
 def test_suite():
     return unittest.makeSuite(ClassTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_compat.py b/src/tests/test_compat.py
index 66c9cff16..8c74b855a 100644
--- a/src/tests/test_compat.py
+++ b/src/tests/test_compat.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 import six
 
@@ -31,7 +22,7 @@ def isCLRRootModule(self, object):
         return type(object).__name__ == 'CLRModule'
 
     def isCLRClass(self, object):
-        return type(object).__name__ == 'CLR Metatype' # for now
+        return type(object).__name__ == 'CLR Metatype'  # for now
 
     # Tests for old-style CLR-prefixed module naming.
 
@@ -55,7 +46,6 @@ def testSimpleImport(self):
             self.assertTrue(type(httplib) == types.ModuleType)
             self.assertTrue(httplib.__name__ == 'httplib')
 
-
     def testSimpleImportWithAlias(self):
         """Test simple import with aliasing."""
         import CLR as myCLR
@@ -76,24 +66,22 @@ def testSimpleImportWithAlias(self):
             self.assertTrue(type(myHttplib) == types.ModuleType)
             self.assertTrue(myHttplib.__name__ == 'httplib')
 
-
     def testDottedNameImport(self):
         """Test dotted-name import."""
         import CLR.System
         self.assertTrue(self.isCLRModule(CLR.System))
         self.assertTrue(CLR.System.__name__ == 'System')
-        
+
         import System
         self.assertTrue(self.isCLRModule(System))
         self.assertTrue(System.__name__ == 'System')
-        
+
         self.assertTrue(System is CLR.System)
 
         import xml.dom
         self.assertTrue(type(xml.dom) == types.ModuleType)
         self.assertTrue(xml.dom.__name__ == 'xml.dom')
 
-
     def testDottedNameImportWithAlias(self):
         """Test dotted-name import with aliasing."""
         import CLR.System as myCLRSystem
@@ -105,12 +93,11 @@ def testDottedNameImportWithAlias(self):
         self.assertTrue(mySystem.__name__ == 'System')
 
         self.assertTrue(mySystem is myCLRSystem)
-        
+
         import xml.dom as myDom
         self.assertTrue(type(myDom) == types.ModuleType)
         self.assertTrue(myDom.__name__ == 'xml.dom')
 
-
     def testSimpleImportFrom(self):
         """Test simple 'import from'."""
         from CLR import System
@@ -121,7 +108,6 @@ def testSimpleImportFrom(self):
         self.assertTrue(type(dom) == types.ModuleType)
         self.assertTrue(dom.__name__ == 'xml.dom')
 
-
     def testSimpleImportFromWithAlias(self):
         """Test simple 'import from' with aliasing."""
         from CLR import System as mySystem
@@ -132,7 +118,6 @@ def testSimpleImportFromWithAlias(self):
         self.assertTrue(type(myDom) == types.ModuleType)
         self.assertTrue(myDom.__name__ == 'xml.dom')
 
-
     def testDottedNameImportFrom(self):
         """Test dotted-name 'import from'."""
         from CLR.System import Xml
@@ -151,7 +136,6 @@ def testDottedNameImportFrom(self):
         self.assertTrue(type(PullDOM) == ClassType)
         self.assertTrue(PullDOM.__name__ == 'PullDOM')
 
-
     def testDottedNameImportFromWithAlias(self):
         """Test dotted-name 'import from' with aliasing."""
         from CLR.System import Xml as myXml
@@ -170,7 +154,6 @@ def testDottedNameImportFromWithAlias(self):
         self.assertTrue(type(myPullDOM) == ClassType)
         self.assertTrue(myPullDOM.__name__ == 'PullDOM')
 
-
     def testFromModuleImportStar(self):
         """Test from module import * behavior."""
         import clr
@@ -186,7 +169,7 @@ def testFromModuleImportStar(self):
         self.assertTrue(m2.__name__ == 'System.Management')
         self.assertTrue(self.isCLRModule(m2))
         self.assertTrue(len(locals().keys()) > count + 1)
-        
+
         self.assertTrue(m is m2)
 
     def testExplicitAssemblyLoad(self):
@@ -197,14 +180,13 @@ def testExplicitAssemblyLoad(self):
 
         assembly = Assembly.LoadWithPartialName('System.Data')
         self.assertTrue(assembly != None)
-        
+
         import CLR.System.Data
         self.assertTrue('System.Data' in sys.modules)
 
         assembly = Assembly.LoadWithPartialName('SpamSpamSpamSpamEggsAndSpam')
         self.assertTrue(assembly == None)
 
-
     def testImplicitLoadAlreadyValidNamespace(self):
         """Test implicit assembly load over an already valid namespace."""
         # In this case, the mscorlib assembly (loaded by default) defines
@@ -216,9 +198,9 @@ def testImplicitLoadAlreadyValidNamespace(self):
         import CLR.System
         self.assertTrue(self.isCLRClass(CLR.System.UriBuilder))
 
-
     def testImportNonExistantModule(self):
         """Test import failure for a non-existant module."""
+
         def test():
             import System.SpamSpamSpam
 
@@ -234,9 +216,9 @@ def testLookupNoNamespaceType(self):
         import CLR
         self.assertTrue(self.isCLRClass(CLR.NoNamespaceType))
 
-
     def testModuleLookupRecursion(self):
         """Test for recursive lookup handling."""
+
         def test1():
             from CLR import CLR
 
@@ -248,14 +230,13 @@ def test2():
 
         self.assertRaises(AttributeError, test2)
 
-
     def testModuleGetAttr(self):
         """Test module getattr behavior."""
         import CLR.System as System
 
         int_type = System.Int32
         self.assertTrue(self.isCLRClass(int_type))
-        
+
         module = System.Xml
         self.assertTrue(self.isCLRModule(module))
 
@@ -268,7 +249,7 @@ def test():
             spam = getattr(System, 1)
 
         self.assertRaises(TypeError, test)
-        
+
     def test000MultipleImports(self):
         # import CLR did raise a Seg Fault once
         # test if the Exceptions.warn() method still causes it
@@ -279,9 +260,11 @@ def test000MultipleImports(self):
 def test_suite():
     return unittest.makeSuite(CompatibilityTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     try:
         import System
@@ -290,4 +273,3 @@ def main():
         import clr
 
     main()
-
diff --git a/src/tests/test_constructors.py b/src/tests/test_constructors.py
index 593b8afd8..fdc1ef060 100644
--- a/src/tests/test_constructors.py
+++ b/src/tests/test_constructors.py
@@ -1,14 +1,6 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 import clr
+
 clr.AddReference("Python.Test")
 import Python.Test as Test
 import System
@@ -25,17 +17,15 @@ def testEnumConstructor(self):
         ob = EnumConstructorTest(TypeCode.Int32)
         self.assertTrue(ob.value == TypeCode.Int32)
 
-
     def testFlagsConstructor(self):
         """Test flags constructor args"""
         from Python.Test import FlagsConstructorTest
         from System.IO import FileAccess
-        
+
         flags = FileAccess.Read | FileAccess.Write
         ob = FlagsConstructorTest(flags)
         self.assertTrue(ob.value == flags)
 
-
     def testStructConstructor(self):
         """Test struct constructor args"""
         from System import Guid
@@ -45,7 +35,6 @@ def testStructConstructor(self):
         ob = StructConstructorTest(guid)
         self.assertTrue(ob.value == guid)
 
-
     def testSubclassConstructor(self):
         """Test subclass constructor args"""
         from Python.Test import SubclassConstructorTest
@@ -59,13 +48,13 @@ class sub(System.Exception):
         self.assertTrue(isinstance(ob.value, System.Exception))
 
 
-
 def test_suite():
     return unittest.makeSuite(ConstructorTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_conversion.py b/src/tests/test_conversion.py
index 961c7b9e8..a00a91c48 100644
--- a/src/tests/test_conversion.py
+++ b/src/tests/test_conversion.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 from Python.Test import ConversionTest
 import System
@@ -26,12 +17,12 @@ def testBoolConversion(self):
         self.assertTrue(object.BooleanField == False)
         self.assertTrue(object.BooleanField is False)
         self.assertTrue(object.BooleanField == 0)
-        
+
         object.BooleanField = True
         self.assertTrue(object.BooleanField == True)
         self.assertTrue(object.BooleanField is True)
         self.assertTrue(object.BooleanField == 1)
-        
+
         object.BooleanField = False
         self.assertTrue(object.BooleanField == False)
         self.assertTrue(object.BooleanField is False)
@@ -72,7 +63,6 @@ def testBoolConversion(self):
         self.assertTrue(object.BooleanField is True)
         self.assertTrue(object.BooleanField == 1)
 
-
     def testSByteConversion(self):
         """Test sbyte conversion."""
         self.assertTrue(System.SByte.MaxValue == 127)
@@ -95,34 +85,33 @@ def testSByteConversion(self):
 
         def test():
             ConversionTest().SByteField = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().SByteField = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().SByteField = 128
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().SByteField = -129
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.SByte(128)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.SByte(-129)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testByteConversion(self):
         """Test byte conversion."""
@@ -146,34 +135,33 @@ def testByteConversion(self):
 
         def test():
             ConversionTest().ByteField = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().ByteField = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().ByteField = 256
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().ByteField = -1
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Byte(256)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Byte(-1)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testCharConversion(self):
         """Test char conversion."""
@@ -194,12 +182,12 @@ def testCharConversion(self):
 
         def test():
             ConversionTest().CharField = 65536
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().CharField = -1
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
@@ -207,7 +195,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInt16Conversion(self):
         """Test int16 conversion."""
         self.assertTrue(System.Int16.MaxValue == 32767)
@@ -230,34 +217,33 @@ def testInt16Conversion(self):
 
         def test():
             ConversionTest().Int16Field = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().Int16Field = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().Int16Field = 32768
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().Int16Field = -32769
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Int16(32768)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Int16(-32769)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testInt32Conversion(self):
         """Test int32 conversion."""
@@ -281,34 +267,33 @@ def testInt32Conversion(self):
 
         def test():
             ConversionTest().Int32Field = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().Int32Field = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().Int32Field = 2147483648
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().Int32Field = -2147483649
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Int32(2147483648)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Int32(-2147483649)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testInt64Conversion(self):
         """Test int64 conversion."""
@@ -332,34 +317,33 @@ def testInt64Conversion(self):
 
         def test():
             ConversionTest().Int64Field = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().Int64Field = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().Int64Field = long(9223372036854775808)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().Int64Field = long(-9223372036854775809)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Int64(long(9223372036854775808))
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Int64(long(-9223372036854775809))
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testUInt16Conversion(self):
         """Test uint16 conversion."""
@@ -383,34 +367,33 @@ def testUInt16Conversion(self):
 
         def test():
             ConversionTest().UInt16Field = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().UInt16Field = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().UInt16Field = 65536
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().UInt16Field = -1
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.UInt16(65536)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.UInt16(-1)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testUInt32Conversion(self):
         """Test uint32 conversion."""
@@ -434,34 +417,33 @@ def testUInt32Conversion(self):
 
         def test():
             ConversionTest().UInt32Field = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().UInt32Field = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().UInt32Field = long(4294967296)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().UInt32Field = -1
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.UInt32(long(4294967296))
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.UInt32(-1)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testUInt64Conversion(self):
         """Test uint64 conversion."""
@@ -485,34 +467,33 @@ def testUInt64Conversion(self):
 
         def test():
             ConversionTest().UInt64Field = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().UInt64Field = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().UInt64Field = long(18446744073709551616)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().UInt64Field = -1
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.UInt64(long(18446744073709551616))
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.UInt64(-1)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testSingleConversion(self):
         """Test single conversion."""
@@ -536,34 +517,33 @@ def testSingleConversion(self):
 
         def test():
             ConversionTest().SingleField = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().SingleField = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().SingleField = 3.402824e38
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().SingleField = -3.402824e38
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Single(3.402824e38)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Single(-3.402824e38)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testDoubleConversion(self):
         """Test double conversion."""
@@ -587,34 +567,33 @@ def testDoubleConversion(self):
 
         def test():
             ConversionTest().DoubleField = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().DoubleField = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().DoubleField = 1.7976931348623159e308
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             ConversionTest().DoubleField = -1.7976931348623159e308
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Double(1.7976931348623159e308)
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             value = System.Double(-1.7976931348623159e308)
-            
-        self.assertRaises(OverflowError, test)
 
+        self.assertRaises(OverflowError, test)
 
     def testDecimalConversion(self):
         """Test decimal conversion."""
@@ -622,7 +601,7 @@ def testDecimalConversion(self):
 
         max_d = Decimal.Parse("79228162514264337593543950335")
         min_d = Decimal.Parse("-79228162514264337593543950335")
-        
+
         self.assertTrue(Decimal.ToInt64(Decimal(10)) == long(10))
 
         object = ConversionTest()
@@ -645,19 +624,18 @@ def testDecimalConversion(self):
 
         def test():
             ConversionTest().DecimalField = None
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().DecimalField = "spam"
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
             ConversionTest().DecimalField = 1
-            
-        self.assertRaises(TypeError, test)
 
+        self.assertRaises(TypeError, test)
 
     def testStringConversion(self):
         """Test string / unicode conversion."""
@@ -689,9 +667,8 @@ def testStringConversion(self):
 
         def test():
             ConversionTest().StringField = 1
-            
-        self.assertRaises(TypeError, test)
 
+        self.assertRaises(TypeError, test)
 
     def testInterfaceConversion(self):
         """Test interface conversion."""
@@ -701,7 +678,7 @@ def testInterfaceConversion(self):
 
         self.assertTrue(ISpam(object.SpamField).GetValue() == "spam")
         self.assertTrue(object.SpamField.GetValue() == "spam")
-        
+
         object.SpamField = Spam("eggs")
         self.assertTrue(ISpam(object.SpamField).GetValue() == "eggs")
         self.assertTrue(object.SpamField.GetValue() == "eggs")
@@ -723,7 +700,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testObjectConversion(self):
         """Test object conversion."""
         from Python.Test import Spam
@@ -752,7 +728,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testEnumConversion(self):
         """Test enum conversion."""
         from Python.Test import ShortEnum
@@ -795,7 +770,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testNullConversion(self):
         """Test null conversion."""
         object = ConversionTest()
@@ -821,14 +795,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testByteArrayConversion(self):
         """Test byte array conversion."""
         object = ConversionTest()
 
         self.assertTrue(object.ByteArrayField == None)
 
-        object.ByteArrayField = [0, 1, 2 , 3, 4]
+        object.ByteArrayField = [0, 1, 2, 3, 4]
         array = object.ByteArrayField
         self.assertTrue(len(array) == 5)
         self.assertTrue(array[0] == 0)
@@ -840,14 +813,13 @@ def testByteArrayConversion(self):
         for i in range(len(value)):
             self.assertTrue(array[i] == six.indexbytes(value, i))
 
-
     def testSByteArrayConversion(self):
         """Test sbyte array conversion."""
         object = ConversionTest()
 
         self.assertTrue(object.SByteArrayField == None)
 
-        object.SByteArrayField = [0, 1, 2 , 3, 4]
+        object.SByteArrayField = [0, 1, 2, 3, 4]
         array = object.SByteArrayField
         self.assertTrue(len(array) == 5)
         self.assertTrue(array[0] == 0)
@@ -860,19 +832,13 @@ def testSByteArrayConversion(self):
             self.assertTrue(array[i] == six.indexbytes(value, i))
 
 
-
-
-
-
-
-
-
 def test_suite():
     return unittest.makeSuite(ConversionTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_delegate.py b/src/tests/test_delegate.py
index 0d2315925..26b85ec5e 100644
--- a/src/tests/test_delegate.py
+++ b/src/tests/test_delegate.py
@@ -1,12 +1,5 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
 import clr
+
 clr.AddReference('Python.Test')
 
 from Python.Test import DelegateTest, PublicDelegate
@@ -33,7 +26,6 @@ def testDelegateStandardAttrs(self):
         self.assertTrue(type(PublicDelegate.__dict__) == DictProxyType)
         self.assertTrue(PublicDelegate.__doc__ == None)
 
-
     def testGlobalDelegateVisibility(self):
         """Test visibility of module-level delegates."""
         from Python.Test import PublicDelegate
@@ -51,7 +43,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testNestedDelegateVisibility(self):
         """Test visibility of nested delegates."""
         ob = DelegateTest.PublicDelegate
@@ -70,7 +61,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testDelegateFromFunction(self):
         """Test delegate implemented with a Python function."""
 
@@ -87,7 +77,6 @@ def sayhello():
         self.assertTrue(ob.CallStringDelegate(ob.stringDelegate) == "hello")
         self.assertTrue(ob.stringDelegate() == "hello")
 
-
     def testDelegateFromMethod(self):
         """Test delegate implemented with a Python instance method."""
 
@@ -106,7 +95,6 @@ def sayhello(self):
         self.assertTrue(ob.CallStringDelegate(ob.stringDelegate) == "hello")
         self.assertTrue(ob.stringDelegate() == "hello")
 
-
     def testDelegateFromUnboundMethod(self):
         """Test failure mode for unbound methods."""
 
@@ -120,13 +108,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testDelegateFromStaticMethod(self):
         """Test delegate implemented with a Python static method."""
 
         class Hello:
             def sayhello():
                 return "hello"
+
             sayhello = staticmethod(sayhello)
 
         d = StringDelegate(Hello.sayhello)
@@ -150,13 +138,13 @@ def sayhello():
         self.assertTrue(ob.CallStringDelegate(ob.stringDelegate) == "hello")
         self.assertTrue(ob.stringDelegate() == "hello")
 
-
     def testDelegateFromClassMethod(self):
         """Test delegate implemented with a Python class method."""
 
         class Hello:
             def sayhello(self):
                 return "hello"
+
             sayhello = classmethod(sayhello)
 
         d = StringDelegate(Hello.sayhello)
@@ -180,7 +168,6 @@ def sayhello(self):
         self.assertTrue(ob.CallStringDelegate(ob.stringDelegate) == "hello")
         self.assertTrue(ob.stringDelegate() == "hello")
 
-
     def testDelegateFromCallable(self):
         """Test delegate implemented with a Python callable object."""
 
@@ -199,7 +186,6 @@ def __call__(self):
         self.assertTrue(ob.CallStringDelegate(ob.stringDelegate) == "hello")
         self.assertTrue(ob.stringDelegate() == "hello")
 
-
     def testDelegateFromManagedInstanceMethod(self):
         """Test delegate implemented with a managed instance method."""
         ob = DelegateTest()
@@ -212,7 +198,6 @@ def testDelegateFromManagedInstanceMethod(self):
         self.assertTrue(ob.CallStringDelegate(ob.stringDelegate) == "hello")
         self.assertTrue(ob.stringDelegate() == "hello")
 
-
     def testDelegateFromManagedStaticMethod(self):
         """Test delegate implemented with a managed static method."""
         d = StringDelegate(DelegateTest.StaticSayHello)
@@ -225,7 +210,6 @@ def testDelegateFromManagedStaticMethod(self):
         self.assertTrue(ob.CallStringDelegate(ob.stringDelegate) == "hello")
         self.assertTrue(ob.stringDelegate() == "hello")
 
-
     def testDelegateFromDelegate(self):
         """Test delegate implemented with another delegate."""
 
@@ -243,9 +227,9 @@ def sayhello():
         self.assertTrue(ob.CallStringDelegate(ob.stringDelegate) == "hello")
         self.assertTrue(ob.stringDelegate() == "hello")
 
-    
     def testDelegateWithInvalidArgs(self):
         """Test delegate instantiation with invalid (non-callable) args."""
+
         def test():
             d = StringDelegate(None)
 
@@ -261,7 +245,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testMulticastDelegate(self):
         """Test multicast delegates."""
 
@@ -282,20 +265,19 @@ def count(self):
 
         self.assertTrue(ob.CallStringDelegate(md) == "ok")
         self.assertTrue(inst.value == 2)
-        
+
         self.assertTrue(md() == "ok")
         self.assertTrue(inst.value == 4)
 
-
     def testSubclassDelegateFails(self):
         """Test that subclassing of a delegate type fails."""
+
         def test():
             class Boom(PublicDelegate):
                 pass
 
         self.assertRaises(TypeError, test)
 
-
     def testDelegateEquality(self):
         """Test delegate equality."""
 
@@ -307,7 +289,6 @@ def sayhello():
         ob.stringDelegate = d
         self.assertTrue(ob.stringDelegate == d)
 
-
     def testBoolDelegate(self):
         """Test boolean delegate."""
 
@@ -317,30 +298,29 @@ def always_so_negative():
         d = BoolDelegate(always_so_negative)
         ob = DelegateTest()
         ob.CallBoolDelegate(d)
-        
 
         self.assertTrue(not d())
 
         self.assertTrue(not ob.CallBoolDelegate(d))
 
-    # test async delegates
-    
-    # test multicast delegates
+        # test async delegates
+
+        # test multicast delegates
+
+        # test explicit op_
 
-    # test explicit op_
+        # test sig mismatch, both on managed and Python side
 
-    # test sig mismatch, both on managed and Python side
-    
-    # test return wrong type
+        # test return wrong type
 
-    
 
 def test_suite():
     return unittest.makeSuite(DelegateTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_docstring.py b/src/tests/test_docstring.py
index 0d0e49f77..9eaea09bb 100644
--- a/src/tests/test_docstring.py
+++ b/src/tests/test_docstring.py
@@ -1,13 +1,6 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
 import unittest
 import clr
+
 clr.AddReference('Python.Test')
 
 from Python.Test import DocWithCtorTest, DocWithoutCtorTest, DocWithCtorNoDocTest
@@ -21,13 +14,11 @@ def testDocWithCtor(self):
         self.assertEqual(DocWithCtorTest.TestMethod.__doc__, 'DocWithCtorTest TestMethod')
         self.assertEqual(DocWithCtorTest.StaticTestMethod.__doc__, 'DocWithCtorTest StaticTestMethod')
 
-
     def testDocWithCtorNoDoc(self):
         self.assertEqual(DocWithCtorNoDocTest.__doc__, 'Void .ctor(Boolean)')
         self.assertEqual(DocWithCtorNoDocTest.TestMethod.__doc__, 'Void TestMethod(Double, Int32)')
         self.assertEqual(DocWithCtorNoDocTest.StaticTestMethod.__doc__, 'Void StaticTestMethod(Double, Int32)')
 
-
     def testDocWithoutCtor(self):
         self.assertEqual(DocWithoutCtorTest.__doc__, 'DocWithoutCtorTest Class')
         self.assertEqual(DocWithoutCtorTest.TestMethod.__doc__, 'DocWithoutCtorTest TestMethod')
diff --git a/src/tests/test_engine.py b/src/tests/test_engine.py
index 0e5277072..43437c779 100644
--- a/src/tests/test_engine.py
+++ b/src/tests/test_engine.py
@@ -1,15 +1,7 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 from Python.Runtime import PythonEngine
 
+
 # XXX This test module isn't used!
 
 class EngineTests(unittest.TestCase):
@@ -27,28 +19,28 @@ def testImportModule(self):
         n = m.GetAttr("__name__")
         self.assertTrue(n.AsManagedObject(System.String) == "sys")
 
-
     def testRunString(self):
         """Test the RunString method."""
         PythonEngine.AcquireLock()
-        
+
         code = "import sys; sys.singleline_worked = 1"
         PythonEngine.RunString(code)
         self.assertTrue(sys.singleline_worked == 1)
-        
+
         code = "import sys\nsys.multiline_worked = 1"
         PythonEngine.RunString(code)
         self.assertTrue(sys.multiline_worked == 1)
 
         PythonEngine.ReleaseLock()
-        
+
 
 def test_suite():
     return unittest.makeSuite(EngineTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_enum.py b/src/tests/test_enum.py
index 26b14c274..fae32bbe6 100644
--- a/src/tests/test_enum.py
+++ b/src/tests/test_enum.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 from System import DayOfWeek
 from Python import Test
@@ -29,7 +20,6 @@ def testEnumStandardAttrs(self):
         self.assertTrue(type(DayOfWeek.__dict__) == DictProxyType)
         self.assertTrue(DayOfWeek.__doc__ == None)
 
-
     def testEnumGetMember(self):
         """Test access to enum members."""
         self.assertTrue(DayOfWeek.Sunday == 0)
@@ -40,85 +30,77 @@ def testEnumGetMember(self):
         self.assertTrue(DayOfWeek.Friday == 5)
         self.assertTrue(DayOfWeek.Saturday == 6)
 
-
     def testByteEnum(self):
         """Test byte enum."""
         self.assertTrue(Test.ByteEnum.Zero == 0)
         self.assertTrue(Test.ByteEnum.One == 1)
         self.assertTrue(Test.ByteEnum.Two == 2)
 
-
     def testSByteEnum(self):
         """Test sbyte enum."""
         self.assertTrue(Test.SByteEnum.Zero == 0)
         self.assertTrue(Test.SByteEnum.One == 1)
         self.assertTrue(Test.SByteEnum.Two == 2)
 
-
     def testShortEnum(self):
         """Test short enum."""
         self.assertTrue(Test.ShortEnum.Zero == 0)
         self.assertTrue(Test.ShortEnum.One == 1)
         self.assertTrue(Test.ShortEnum.Two == 2)
 
-
     def testUShortEnum(self):
         """Test ushort enum."""
         self.assertTrue(Test.UShortEnum.Zero == 0)
         self.assertTrue(Test.UShortEnum.One == 1)
         self.assertTrue(Test.UShortEnum.Two == 2)
 
-
     def testIntEnum(self):
         """Test int enum."""
         self.assertTrue(Test.IntEnum.Zero == 0)
         self.assertTrue(Test.IntEnum.One == 1)
         self.assertTrue(Test.IntEnum.Two == 2)
 
-
     def testUIntEnum(self):
         """Test uint enum."""
         self.assertTrue(Test.UIntEnum.Zero == long(0))
         self.assertTrue(Test.UIntEnum.One == long(1))
         self.assertTrue(Test.UIntEnum.Two == long(2))
 
-
     def testLongEnum(self):
         """Test long enum."""
         self.assertTrue(Test.LongEnum.Zero == long(0))
         self.assertTrue(Test.LongEnum.One == long(1))
         self.assertTrue(Test.LongEnum.Two == long(2))
 
-
     def testULongEnum(self):
         """Test ulong enum."""
         self.assertTrue(Test.ULongEnum.Zero == long(0))
         self.assertTrue(Test.ULongEnum.One == long(1))
         self.assertTrue(Test.ULongEnum.Two == long(2))
 
-
     def testInstantiateEnumFails(self):
         """Test that instantiation of an enum class fails."""
+
         def test():
             ob = DayOfWeek()
 
         self.assertRaises(TypeError, test)
 
-
     def testSubclassEnumFails(self):
         """Test that subclassing of an enumeration fails."""
+
         def test():
             class Boom(DayOfWeek):
                 pass
 
         self.assertRaises(TypeError, test)
 
-
     def testEnumSetMemberFails(self):
         """Test that setattr operations on enumerations fail."""
+
         def test():
             DayOfWeek.Sunday = 13
-            
+
         self.assertRaises(TypeError, test)
 
         def test():
@@ -126,7 +108,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testEnumWithFlagsAttrConversion(self):
         """Test enumeration conversion with FlagsAttribute set."""
         # This works because the FlagsField enum has FlagsAttribute.
@@ -135,9 +116,8 @@ def testEnumWithFlagsAttrConversion(self):
         # This should fail because our test enum doesn't have it.
         def test():
             Test.FieldTest().EnumField = 99
- 
-        self.assertRaises(ValueError, test)
 
+        self.assertRaises(ValueError, test)
 
     def testEnumConversion(self):
         """Test enumeration conversion."""
@@ -149,27 +129,27 @@ def testEnumConversion(self):
 
         def test():
             Test.FieldTest().EnumField = 20
-            
+
         self.assertRaises(ValueError, test)
 
         def test():
             Test.FieldTest().EnumField = 100000
-            
+
         self.assertRaises(OverflowError, test)
 
         def test():
             Test.FieldTest().EnumField = "str"
-            
-        self.assertRaises(TypeError, test)
 
+        self.assertRaises(TypeError, test)
 
 
 def test_suite():
     return unittest.makeSuite(EnumTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_event.py b/src/tests/test_event.py
index 614828a77..c68f9629a 100644
--- a/src/tests/test_event.py
+++ b/src/tests/test_event.py
@@ -1,12 +1,5 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
 import clr
+
 clr.AddReference('Python.Test')
 
 import sys, os, string, unittest, types
@@ -31,7 +24,6 @@ def testPublicInstanceEvent(self):
 
         object.PublicEvent -= handler.handler
 
-
     def testPublicStaticEvent(self):
         """Test public static events."""
         handler = GenericHandler()
@@ -42,7 +34,6 @@ def testPublicStaticEvent(self):
         EventTest.OnPublicStaticEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 10)
 
-
     def testProtectedInstanceEvent(self):
         """Test protected instance events."""
         object = EventTest()
@@ -57,7 +48,6 @@ def testProtectedInstanceEvent(self):
 
         object.ProtectedEvent -= handler.handler
 
-
     def testProtectedStaticEvent(self):
         """Test protected static events."""
         object = EventTest
@@ -72,7 +62,6 @@ def testProtectedStaticEvent(self):
 
         EventTest.ProtectedStaticEvent -= handler.handler
 
-
     def testInternalEvents(self):
         """Test internal events."""
 
@@ -91,7 +80,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testPrivateEvents(self):
         """Test private events."""
 
@@ -110,7 +98,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testMulticastEvent(self):
         """Test multicast events."""
         object = EventTest()
@@ -122,15 +109,15 @@ def testMulticastEvent(self):
         object.PublicEvent += handler1.handler
         object.PublicEvent += handler2.handler
         object.PublicEvent += handler3.handler
-        
+
         object.OnPublicEvent(TestEventArgs(10))
-        
+
         self.assertTrue(handler1.value == 10)
         self.assertTrue(handler2.value == 10)
         self.assertTrue(handler3.value == 10)
 
         object.OnPublicEvent(TestEventArgs(20))
-        
+
         self.assertTrue(handler1.value == 20)
         self.assertTrue(handler2.value == 20)
         self.assertTrue(handler3.value == 20)
@@ -139,7 +126,6 @@ def testMulticastEvent(self):
         object.PublicEvent -= handler2.handler
         object.PublicEvent -= handler3.handler
 
-
     def testInstanceMethodHandler(self):
         """Test instance method handlers."""
         object = EventTest()
@@ -148,16 +134,15 @@ def testInstanceMethodHandler(self):
         object.PublicEvent += handler.handler
         self.assertTrue(handler.value == None)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 10)
 
         object.PublicEvent -= handler.handler
         self.assertTrue(handler.value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(handler.value == 10)
 
-
     def testVarArgsInstanceMethodHandler(self):
         """Test vararg instance method handlers."""
         object = EventTest()
@@ -166,16 +151,15 @@ def testVarArgsInstanceMethodHandler(self):
         object.PublicEvent += handler.handler
         self.assertTrue(handler.value == None)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 10)
 
         object.PublicEvent -= handler.handler
         self.assertTrue(handler.value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(handler.value == 10)
 
-
     def testCallableObjectHandler(self):
         """Test callable object handlers."""
         object = EventTest()
@@ -184,16 +168,15 @@ def testCallableObjectHandler(self):
         object.PublicEvent += handler
         self.assertTrue(handler.value == None)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 10)
 
         object.PublicEvent -= handler
         self.assertTrue(handler.value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(handler.value == 10)
 
-
     def testVarArgsCallableHandler(self):
         """Test varargs callable handlers."""
         object = EventTest()
@@ -202,16 +185,15 @@ def testVarArgsCallableHandler(self):
         object.PublicEvent += handler
         self.assertTrue(handler.value == None)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 10)
 
         object.PublicEvent -= handler
         self.assertTrue(handler.value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(handler.value == 10)
 
-
     def testStaticMethodHandler(self):
         """Test static method handlers."""
         object = EventTest()
@@ -221,16 +203,15 @@ def testStaticMethodHandler(self):
         object.PublicEvent += handler.handler
         self.assertTrue(handler.value == None)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 10)
 
         object.PublicEvent -= handler.handler
         self.assertTrue(handler.value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(handler.value == 10)
 
-
     def testClassMethodHandler(self):
         """Test class method handlers."""
         object = EventTest()
@@ -240,16 +221,15 @@ def testClassMethodHandler(self):
         object.PublicEvent += handler.handler
         self.assertTrue(handler.value == None)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 10)
 
         object.PublicEvent -= handler.handler
         self.assertTrue(handler.value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(handler.value == 10)
 
-
     def testManagedInstanceMethodHandler(self):
         """Test managed instance method handlers."""
         object = EventTest()
@@ -257,16 +237,15 @@ def testManagedInstanceMethodHandler(self):
         object.PublicEvent += object.GenericHandler
         self.assertTrue(object.value == 0)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(object.value == 10)
 
         object.PublicEvent -= object.GenericHandler
         self.assertTrue(object.value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(object.value == 10)
 
-
     def testManagedStaticMethodHandler(self):
         """Test managed static method handlers."""
         object = EventTest()
@@ -275,16 +254,15 @@ def testManagedStaticMethodHandler(self):
         object.PublicEvent += object.StaticHandler
         self.assertTrue(EventTest.s_value == 0)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(EventTest.s_value == 10)
 
         object.PublicEvent -= object.StaticHandler
         self.assertTrue(EventTest.s_value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(EventTest.s_value == 10)
 
-
     def testUnboundMethodHandler(self):
         """Test failure mode for unbound method handlers."""
         object = EventTest()
@@ -297,11 +275,10 @@ def testUnboundMethodHandler(self):
 
         raise TypeError("should have raised a TypeError")
 
-
     def testFunctionHandler(self):
         """Test function handlers."""
         object = EventTest()
-        dict = {'value':None}
+        dict = {'value': None}
 
         def handler(sender, args, dict=dict):
             dict['value'] = args.value
@@ -309,16 +286,15 @@ def handler(sender, args, dict=dict):
         object.PublicEvent += handler
         self.assertTrue(dict['value'] == None)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(dict['value'] == 10)
 
         object.PublicEvent -= handler
         self.assertTrue(dict['value'] == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(dict['value'] == 10)
 
-
     def testAddNonCallableHandler(self):
         """Test handling of attempts to add non-callable handlers."""
 
@@ -335,16 +311,14 @@ def test():
         self.assertRaises(TypeError, test)
 
         def test():
-
             class spam:
                 pass
-            
+
             object = EventTest()
             object.PublicEvent += spam()
 
         self.assertRaises(TypeError, test)
 
-
     def testRemoveMultipleHandlers(self):
         """Test removing multiple instances of the same handler."""
         object = EventTest()
@@ -356,17 +330,17 @@ def testRemoveMultipleHandlers(self):
         h2 = handler.handler
         object.PublicEvent += h2
 
-        object.OnPublicEvent(TestEventArgs(10))     
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 20)
 
         object.PublicEvent -= h1
 
-        object.OnPublicEvent(TestEventArgs(10))     
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 30)
 
         object.PublicEvent -= h2
 
-        object.OnPublicEvent(TestEventArgs(10))     
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 30)
 
         # try again, removing in a different order.
@@ -380,20 +354,19 @@ def testRemoveMultipleHandlers(self):
         h2 = handler.handler
         object.PublicEvent += h2
 
-        object.OnPublicEvent(TestEventArgs(10))     
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 20)
 
         object.PublicEvent -= h2
 
-        object.OnPublicEvent(TestEventArgs(10))     
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 30)
 
         object.PublicEvent -= h1
 
-        object.OnPublicEvent(TestEventArgs(10))     
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 30)
 
-
     def testRemoveMultipleStaticHandlers(self):
         """Test removing multiple instances of a static handler."""
         object = EventTest()
@@ -405,17 +378,17 @@ def testRemoveMultipleStaticHandlers(self):
         h2 = handler.handler
         object.PublicStaticEvent += h2
 
-        object.OnPublicStaticEvent(TestEventArgs(10))     
+        object.OnPublicStaticEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 20)
 
         object.PublicStaticEvent -= h1
 
-        object.OnPublicStaticEvent(TestEventArgs(10))     
+        object.OnPublicStaticEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 30)
 
         object.PublicStaticEvent -= h2
 
-        object.OnPublicStaticEvent(TestEventArgs(10))     
+        object.OnPublicStaticEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 30)
 
         # try again, removing in a different order.
@@ -429,20 +402,19 @@ def testRemoveMultipleStaticHandlers(self):
         h2 = handler.handler
         object.PublicStaticEvent += h2
 
-        object.OnPublicStaticEvent(TestEventArgs(10))     
+        object.OnPublicStaticEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 20)
 
         object.PublicStaticEvent -= h2
 
-        object.OnPublicStaticEvent(TestEventArgs(10))     
+        object.OnPublicStaticEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 30)
 
         object.PublicStaticEvent -= h1
 
-        object.OnPublicStaticEvent(TestEventArgs(10))     
+        object.OnPublicStaticEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 30)
 
-
     def testRandomMultipleHandlers(self):
         """Test random subscribe / unsubscribe of the same handlers."""
         import random
@@ -477,7 +449,7 @@ def testRandomMultipleHandlers(self):
         handler2.value = 0
         object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler2.value == 20)
-        
+
         object.PublicEvent -= handler2.handler
 
         handler2.value = 0
@@ -490,7 +462,6 @@ def testRandomMultipleHandlers(self):
         object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler2.value == 0)
 
-
     def testRemoveInternalCallHandler(self):
         """Test remove on an event sink implemented w/internalcall."""
         object = EventTest()
@@ -501,9 +472,9 @@ def h(sender, args):
         object.PublicEvent += h
         object.PublicEvent -= h
 
-
     def testRemoveUnknownHandler(self):
         """Test removing an event handler that was never added."""
+
         def test():
             object = EventTest()
             handler = GenericHandler()
@@ -512,7 +483,6 @@ def test():
 
         self.assertRaises(ValueError, test)
 
-
     def testHandlerCallbackFailure(self):
         """Test failure mode for inappropriate handlers."""
 
@@ -546,7 +516,6 @@ def test():
 
         object.PublicEvent -= handler.handler
 
-
     def testIncorrectInvokation(self):
         """Test incorrect invokation of events."""
         object = EventTest()
@@ -566,7 +535,6 @@ def test():
 
         object.PublicEvent -= handler.handler
 
-
     def testExplicitCLSEventRegistration(self):
         """Test explicit CLS event registration."""
         object = EventTest()
@@ -576,16 +544,15 @@ def testExplicitCLSEventRegistration(self):
         object.add_PublicEvent(delegate)
         self.assertTrue(handler.value == None)
 
-        object.OnPublicEvent(TestEventArgs(10))        
+        object.OnPublicEvent(TestEventArgs(10))
         self.assertTrue(handler.value == 10)
 
         object.remove_PublicEvent(delegate)
         self.assertTrue(handler.value == 10)
 
-        object.OnPublicEvent(TestEventArgs(20))        
+        object.OnPublicEvent(TestEventArgs(20))
         self.assertTrue(handler.value == 10)
 
-
     def testImplicitCLSEventRegistration(self):
         """Test implicit CLS event registration."""
 
@@ -596,7 +563,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testEventDescriptorAbuse(self):
         """Test event descriptor abuse."""
 
@@ -634,9 +600,9 @@ def test():
         self.assertRaises(TypeError, test)
 
 
-
 class GenericHandler:
     """A generic handler to test event callbacks."""
+
     def __init__(self):
         self.value = None
 
@@ -646,6 +612,7 @@ def handler(self, sender, args):
 
 class VariableArgsHandler:
     """A variable args handler to test event callbacks."""
+
     def __init__(self):
         self.value = None
 
@@ -656,6 +623,7 @@ def handler(self, *args):
 
 class CallableHandler:
     """A callable handler to test event callbacks."""
+
     def __init__(self):
         self.value = None
 
@@ -665,6 +633,7 @@ def __call__(self, sender, args):
 
 class VarCallableHandler:
     """A variable args callable handler to test event callbacks."""
+
     def __init__(self):
         self.value = None
 
@@ -697,6 +666,7 @@ def handler(cls, sender, args):
 
 class MultipleHandler:
     """A generic handler to test multiple callbacks."""
+
     def __init__(self):
         self.value = 0
 
@@ -704,13 +674,13 @@ def handler(self, sender, args):
         self.value += args.value
 
 
-
 def test_suite():
     return unittest.makeSuite(EventTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_exceptions.py b/src/tests/test_exceptions.py
index 8435424da..4b6386447 100644
--- a/src/tests/test_exceptions.py
+++ b/src/tests/test_exceptions.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 import System
 import six
@@ -14,6 +5,7 @@
 if six.PY3:
     unicode = str
 
+
 # Note: all of these tests are known to fail because Python currently
 # doesn't allow new-style classes to be used as exceptions. I'm leaving
 # the tests in place in to document 'how it ought to work' in the hopes
@@ -25,14 +17,13 @@ class ExceptionTests(unittest.TestCase):
     def testUnifiedExceptionSemantics(self):
         """Test unified exception semantics."""
         from System import Exception, Object
-        
+
         e = Exception('Something bad happened')
         if not six.PY3:
             import exceptions
             self.assertTrue(isinstance(e, exceptions.Exception))
         self.assertTrue(isinstance(e, Exception))
 
-
     def testStandardExceptionAttributes(self):
         """Test accessing standard exception attributes."""
         from System import OverflowException
@@ -48,18 +39,17 @@ def testStandardExceptionAttributes(self):
 
         v = e.ToString()
         self.assertTrue(len(v) > 0)
-                       
 
     def testExtendedExceptionAttributes(self):
         """Test accessing extended exception attributes."""
         from Python.Test import ExceptionTest, ExtendedException
         from System import Exception, OverflowException
-        
+
         e = ExceptionTest.GetExtendedException()
         self.assertTrue(isinstance(e, ExtendedException))
         self.assertTrue(isinstance(e, OverflowException))
         self.assertTrue(isinstance(e, Exception))
-        
+
         self.assertTrue(e.Message == 'error')
 
         e.Source = 'Test Suite'
@@ -71,10 +61,9 @@ def testExtendedExceptionAttributes(self):
         self.assertTrue(e.ExtraProperty == 'extra')
         e.ExtraProperty = 'changed'
         self.assertTrue(e.ExtraProperty == 'changed')
-                       
+
         self.assertTrue(e.GetExtraInfo() == 'changed')
-        
-                        
+
     def testRaiseClassException(self):
         """Test class exception propagation."""
         from System import NullReferenceException
@@ -91,7 +80,6 @@ def test():
             self.assertTrue(type is NullReferenceException)
             self.assertTrue(isinstance(value, NullReferenceException))
 
-
     def testRaiseClassExceptionWithValue(self):
         """Test class exception propagation with associated value."""
         from System import NullReferenceException
@@ -109,7 +97,6 @@ def test():
             self.assertTrue(isinstance(value, NullReferenceException))
             self.assertTrue(value.Message == 'Aiiieee!')
 
-
     def testRaiseInstanceException(self):
         """Test instance exception propagation."""
         from System import NullReferenceException
@@ -127,7 +114,6 @@ def test():
             self.assertTrue(isinstance(value, NullReferenceException))
             self.assertTrue(len(value.Message) > 0)
 
-
     def testRaiseInstanceExceptionWithArgs(self):
         """Test instance exception propagation with args."""
         from System import NullReferenceException
@@ -145,7 +131,6 @@ def test():
             self.assertTrue(isinstance(value, NullReferenceException))
             self.assertTrue(value.Message == 'Aiiieee!')
 
-
     def testManagedExceptionPropagation(self):
         """Test propagation of exceptions raised in managed code."""
         from System import Decimal, OverflowException
@@ -155,7 +140,6 @@ def test():
 
         self.assertRaises(OverflowException, test)
 
-
     def testManagedExceptionConversion(self):
         """Test conversion of managed exceptions."""
         from System import Exception, OverflowException
@@ -179,8 +163,7 @@ def testManagedExceptionConversion(self):
         self.assertTrue(v)
 
         v = ExceptionTest.SetWidenedException(OverflowException('error'))
-        self.assertTrue(v)     
-
+        self.assertTrue(v)
 
     def testCatchExceptionFromManagedMethod(self):
         """Test catching an exception from a managed method."""
@@ -196,7 +179,6 @@ def testCatchExceptionFromManagedMethod(self):
 
         raise SystemError('failed to catch exception from managed method')
 
-
     def testCatchExceptionFromManagedProperty(self):
         """Test catching an exception from a managed property."""
         from Python.Test import ExceptionTest
@@ -218,7 +200,6 @@ def testCatchExceptionFromManagedProperty(self):
 
         raise SystemError('failed to catch exception from managed property')
 
-
     def testCatchExceptionManagedClass(self):
         """Test catching the managed class of an exception."""
         from System import OverflowException
@@ -230,7 +211,6 @@ def testCatchExceptionManagedClass(self):
 
         raise SystemError('failed to catch managed class exception')
 
-
     def testCatchExceptionPythonClass(self):
         """Test catching the python class of an exception."""
         from System import OverflowException
@@ -246,7 +226,6 @@ def testCatchExceptionPythonClass(self):
 
         raise SystemError('failed to catch python class exception')
 
-
     def testCatchExceptionBaseClass(self):
         """Test catching the base of an exception."""
         from System import OverflowException, ArithmeticException
@@ -258,7 +237,6 @@ def testCatchExceptionBaseClass(self):
 
         raise SystemError('failed to catch base exception')
 
-
     def testCatchExceptionNestedBaseClass(self):
         """Test catching the nested base of an exception."""
         from System import OverflowException, SystemException
@@ -270,7 +248,6 @@ def testCatchExceptionNestedBaseClass(self):
 
         raise SystemError('failed to catch nested base exception')
 
-
     def testCatchExceptionWithAssignment(self):
         """Test catching an exception with assignment."""
         from System import OverflowException
@@ -281,7 +258,6 @@ def testCatchExceptionWithAssignment(self):
             e = sys.exc_info()[1]
             self.assertTrue(isinstance(e, OverflowException))
 
-
     def testCatchExceptionUnqualified(self):
         """Test catching an unqualified exception."""
         from System import OverflowException
@@ -293,7 +269,6 @@ def testCatchExceptionUnqualified(self):
 
         raise SystemError('failed to catch unqualified exception')
 
-
     def testApparentModuleOfException(self):
         """Test the apparent module of an exception."""
         from System import Exception, OverflowException
@@ -301,7 +276,6 @@ def testApparentModuleOfException(self):
         self.assertTrue(Exception.__module__ == 'System')
         self.assertTrue(OverflowException.__module__ == 'System')
 
-
     def testStrOfException(self):
         """Test the str() representation of an exception."""
         from System import NullReferenceException
@@ -316,22 +290,21 @@ def testStrOfException(self):
             Convert.ToDateTime('this will fail')
         except FormatException:
             e = sys.exc_info()[1]
-            msg = unicode(e).encode("utf8") # fix for international installation
+            msg = unicode(e).encode("utf8")  # fix for international installation
             self.assertTrue(msg.find(unicode('System.Convert.ToDateTime').encode("utf8")) > -1, msg)
 
-            
     def testPythonCompatOfManagedExceptions(self):
         """Test if managed exceptions are compatible with Python's implementation
         """
         from System import OverflowException
         msg = "A simple message"
-        
+
         e = OverflowException(msg)
         self.assertEqual(e.message, msg)
-        self.assertTrue(isinstance(e.message, unicode)) # ???
+        self.assertTrue(isinstance(e.message, unicode))  # ???
         self.assertEqual(str(e), msg)
         self.assertEqual(unicode(e), msg)
-        
+
         self.assertEqual(e.args, (msg,))
         self.assertTrue(isinstance(e.args, tuple))
         self.assertEqual(repr(e), "OverflowException('A simple message',)")
@@ -355,20 +328,22 @@ def testExceptionIsInstanceOfSystemObject(self):
         # be true, even though it does not really subclass Object.
         from System import OverflowException
         from System import Object
-        
+
         o = OverflowException('error')
 
         if sys.version_info >= (2, 6):
             self.assertTrue(isinstance(o, Object))
         else:
             self.assertFalse(isinstance(o, Object))
-        
+
 
 def test_suite():
     return unittest.makeSuite(ExceptionTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
diff --git a/src/tests/test_field.py b/src/tests/test_field.py
index 1ec9c7744..d765e3888 100644
--- a/src/tests/test_field.py
+++ b/src/tests/test_field.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 from Python.Test import FieldTest
 from Python.Test import ShortEnum
@@ -35,7 +26,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testPublicStaticField(self):
         """Test public static fields."""
         object = FieldTest();
@@ -58,7 +48,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testProtectedInstanceField(self):
         """Test protected instance fields."""
         object = FieldTest();
@@ -72,7 +61,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testProtectedStaticField(self):
         """Test protected static fields."""
         object = FieldTest();
@@ -95,7 +83,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testReadOnlyInstanceField(self):
         """Test readonly instance fields."""
         self.assertTrue(FieldTest().ReadOnlyField == 0)
@@ -110,7 +97,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testReadOnlyStaticField(self):
         """Test readonly static fields."""
         object = FieldTest();
@@ -138,7 +124,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testConstantField(self):
         """Test const fields."""
         object = FieldTest();
@@ -166,7 +151,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInternalField(self):
         """Test internal fields."""
 
@@ -185,7 +169,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testPrivateField(self):
         """Test private fields."""
 
@@ -204,7 +187,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testFieldDescriptorGetSet(self):
         """Test field descriptor get / set."""
 
@@ -228,15 +210,14 @@ def testFieldDescriptorGetSet(self):
         descriptor = FieldTest.__dict__['PublicStaticField']
         self.assertTrue(type(descriptor) != IntType)
 
-
     def testFieldDescriptorWrongType(self):
         """Test setting a field using a value of the wrong type."""
+
         def test():
             FieldTest().PublicField = "spam"
 
         self.assertRaises(TypeError, test)
 
-
     def testFieldDescriptorAbuse(self):
         """Test field descriptor abuse."""
         desc = FieldTest.__dict__['PublicField']
@@ -251,7 +232,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testBooleanField(self):
         """Test boolean fields."""
         # change this to true / false later for Python 2.3?
@@ -270,7 +250,6 @@ def testBooleanField(self):
         object.BooleanField = 0
         self.assertTrue(object.BooleanField == False)
 
-
     def testSByteField(self):
         """Test sbyte fields."""
         object = FieldTest()
@@ -279,7 +258,6 @@ def testSByteField(self):
         object.SByteField = 1
         self.assertTrue(object.SByteField == 1)
 
-
     def testByteField(self):
         """Test byte fields."""
         object = FieldTest()
@@ -288,7 +266,6 @@ def testByteField(self):
         object.ByteField = 1
         self.assertTrue(object.ByteField == 1)
 
-
     def testCharField(self):
         """Test char fields."""
         object = FieldTest()
@@ -297,13 +274,12 @@ def testCharField(self):
 
         object.CharField = 'B'
         self.assertTrue(object.CharField == six.u('B'))
-        self.assertTrue(object.CharField ==  'B')
+        self.assertTrue(object.CharField == 'B')
 
         object.CharField = six.u('C')
         self.assertTrue(object.CharField == six.u('C'))
         self.assertTrue(object.CharField == 'C')
 
-
     def testInt16Field(self):
         """Test int16 fields."""
         object = FieldTest()
@@ -312,7 +288,6 @@ def testInt16Field(self):
         object.Int16Field = 1
         self.assertTrue(object.Int16Field == 1)
 
-
     def testInt32Field(self):
         """Test int32 fields."""
         object = FieldTest()
@@ -321,7 +296,6 @@ def testInt32Field(self):
         object.Int32Field = 1
         self.assertTrue(object.Int32Field == 1)
 
-
     def testInt64Field(self):
         """Test int64 fields."""
         object = FieldTest()
@@ -330,7 +304,6 @@ def testInt64Field(self):
         object.Int64Field = 1
         self.assertTrue(object.Int64Field == 1)
 
-
     def testUInt16Field(self):
         """Test uint16 fields."""
         object = FieldTest()
@@ -339,7 +312,6 @@ def testUInt16Field(self):
         object.UInt16Field = 1
         self.assertTrue(object.UInt16Field == 1)
 
-
     def testUInt32Field(self):
         """Test uint32 fields."""
         object = FieldTest()
@@ -348,7 +320,6 @@ def testUInt32Field(self):
         object.UInt32Field = 1
         self.assertTrue(object.UInt32Field == 1)
 
-
     def testUInt64Field(self):
         """Test uint64 fields."""
         object = FieldTest()
@@ -357,7 +328,6 @@ def testUInt64Field(self):
         object.UInt64Field = 1
         self.assertTrue(object.UInt64Field == 1)
 
-
     def testSingleField(self):
         """Test single fields."""
         object = FieldTest()
@@ -366,7 +336,6 @@ def testSingleField(self):
         object.SingleField = 1.1
         self.assertTrue(object.SingleField == 1.1)
 
-
     def testDoubleField(self):
         """Test double fields."""
         object = FieldTest()
@@ -375,7 +344,6 @@ def testDoubleField(self):
         object.DoubleField = 1.1
         self.assertTrue(object.DoubleField == 1.1)
 
-
     def testDecimalField(self):
         """Test decimal fields."""
         object = FieldTest()
@@ -384,22 +352,20 @@ def testDecimalField(self):
         object.DecimalField = System.Decimal(1)
         self.assertTrue(object.DecimalField == System.Decimal(1))
 
-
     def testStringField(self):
         """Test string fields."""
         object = FieldTest()
         self.assertTrue(object.StringField == "spam")
 
         object.StringField = "eggs"
-        self.assertTrue(object.StringField == "eggs")        
-
+        self.assertTrue(object.StringField == "eggs")
 
     def testInterfaceField(self):
         """Test interface fields."""
         from Python.Test import Spam, ISpam
 
         object = FieldTest()
-        
+
         self.assertTrue(ISpam(object.SpamField).GetValue() == "spam")
         self.assertTrue(object.SpamField.GetValue() == "spam")
 
@@ -407,7 +373,6 @@ def testInterfaceField(self):
         self.assertTrue(ISpam(object.SpamField).GetValue() == "eggs")
         self.assertTrue(object.SpamField.GetValue() == "eggs")
 
-
     def testObjectField(self):
         """Test object fields."""
         object = FieldTest()
@@ -422,7 +387,6 @@ def testObjectField(self):
         object.ObjectField = None
         self.assertTrue(object.ObjectField == None)
 
-
     def testEnumField(self):
         """Test enum fields."""
         object = FieldTest()
@@ -431,7 +395,6 @@ def testEnumField(self):
         object.EnumField = ShortEnum.One
         self.assertTrue(object.EnumField == ShortEnum.One)
 
-
     def testNullableField(self):
         """Test nullable fields."""
         object = FieldTest()
@@ -458,13 +421,13 @@ def test():
         self.assertRaises(TypeError, test)
 
 
-
 def test_suite():
     return unittest.makeSuite(FieldTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_generic.py b/src/tests/test_generic.py
index 1d7c6ef67..1e8b58f21 100644
--- a/src/tests/test_generic.py
+++ b/src/tests/test_generic.py
@@ -1,13 +1,5 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import clr
+
 clr.AddReference('Python.Test')
 
 from System.Collections.Generic import Dictionary, List
@@ -45,7 +37,7 @@ def testPythonTypeAliasing(self):
         dict = Dictionary[System.Int32, System.Int32]()
         self.assertEquals(dict.Count, 0)
         dict.Add(1, 1)
-        self.assertTrue(dict[1] == 1)       
+        self.assertTrue(dict[1] == 1)
 
         dict = Dictionary[long, long]()
         self.assertEquals(dict.Count, 0)
@@ -103,6 +95,7 @@ def testOpenGenericType(self):
         from Python.Test import DerivedFromOpenGeneric
 
         OpenGenericType = DerivedFromOpenGeneric.__bases__[0]
+
         def test():
             inst = OpenGenericType()
 
@@ -110,7 +103,7 @@ def test():
 
         def test():
             type = OpenGenericType[System.String]
-            
+
         self.assertRaises(TypeError, test)
 
     def testDerivedFromOpenGenericType(self):
@@ -118,7 +111,7 @@ def testDerivedFromOpenGenericType(self):
         Test a generic type derived from an open generic type.
         """
         from Python.Test import DerivedFromOpenGeneric
-        
+
         type = DerivedFromOpenGeneric[System.String, System.String]
         inst = type(1, 'two', 'three')
 
@@ -166,15 +159,15 @@ def _testGenericWrapperByType(self, ptype, value, test_type=0):
         inst = GenericWrapper[atype](items)
         self.assertTrue(len(inst.value) == 3)
         self.assertTrue(inst.value[0] == value)
-        self.assertTrue(inst.value[1] == value)            
-        
+        self.assertTrue(inst.value[1] == value)
+
     def testGenericTypeBinding(self):
         """
         Test argument conversion / binding for generic methods.
         """
         from Python.Test import InterfaceTest, ISayHello1, ShortEnum
         import System
-        
+
         self._testGenericWrapperByType(System.Boolean, True)
         self._testGenericWrapperByType(bool, True)
         self._testGenericWrapperByType(System.Byte, 255)
@@ -192,7 +185,7 @@ def testGenericTypeBinding(self):
         self._testGenericWrapperByType(System.UInt64, long(18446744073709551615))
         self._testGenericWrapperByType(System.Single, 3.402823e38)
         self._testGenericWrapperByType(System.Double, 1.7976931348623157e308)
-        self._testGenericWrapperByType(float, 1.7976931348623157e308)         
+        self._testGenericWrapperByType(float, 1.7976931348623157e308)
         self._testGenericWrapperByType(System.Decimal, System.Decimal.One)
         self._testGenericWrapperByType(System.String, "test")
         self._testGenericWrapperByType(unicode, "test")
@@ -211,26 +204,34 @@ def _testGenericMethodByType(self, ptype, value, test_type=0):
 
         # Explicit selection (static method)
         result = stype.Overloaded[ptype](value)
-        if test_type: self.assertTrue(result.__class__ == value.__class__)
-        else:         self.assertTrue(result == value)
+        if test_type:
+            self.assertTrue(result.__class__ == value.__class__)
+        else:
+            self.assertTrue(result == value)
 
         # Type inference (static method)
         result = stype.Overloaded(value)
         self.assertTrue(result == value)
-        if test_type: self.assertTrue(result.__class__ == value.__class__)
-        else:         self.assertTrue(result == value)
+        if test_type:
+            self.assertTrue(result.__class__ == value.__class__)
+        else:
+            self.assertTrue(result == value)
 
         # Explicit selection (instance method)
         result = itype().Overloaded[ptype](value)
-        self.assertTrue(result == value)        
-        if test_type: self.assertTrue(result.__class__ == value.__class__)
-        else:         self.assertTrue(result == value)
+        self.assertTrue(result == value)
+        if test_type:
+            self.assertTrue(result.__class__ == value.__class__)
+        else:
+            self.assertTrue(result == value)
 
         # Type inference (instance method)
         result = itype().Overloaded(value)
         self.assertTrue(result == value)
-        if test_type: self.assertTrue(result.__class__ == value.__class__)
-        else:         self.assertTrue(result == value)
+        if test_type:
+            self.assertTrue(result.__class__ == value.__class__)
+        else:
+            self.assertTrue(result == value)
 
         atype = System.Array[ptype]
         items = atype([value, value, value])
@@ -240,49 +241,49 @@ def _testGenericMethodByType(self, ptype, value, test_type=0):
         if test_type:
             self.assertTrue(len(result) == 3)
             self.assertTrue(result[0].__class__ == value.__class__)
-            self.assertTrue(result[1].__class__ == value.__class__)            
+            self.assertTrue(result[1].__class__ == value.__class__)
         else:
             self.assertTrue(len(result) == 3)
             self.assertTrue(result[0] == value)
-            self.assertTrue(result[1] == value)            
+            self.assertTrue(result[1] == value)
 
         # Type inference (static method)
         result = stype.Overloaded(items)
         if test_type:
             self.assertTrue(len(result) == 3)
             self.assertTrue(result[0].__class__ == value.__class__)
-            self.assertTrue(result[1].__class__ == value.__class__)            
+            self.assertTrue(result[1].__class__ == value.__class__)
         else:
             self.assertTrue(len(result) == 3)
             self.assertTrue(result[0] == value)
-            self.assertTrue(result[1] == value)            
+            self.assertTrue(result[1] == value)
 
         # Explicit selection (instance method)
         result = itype().Overloaded[atype](items)
         if test_type:
             self.assertTrue(len(result) == 3)
             self.assertTrue(result[0].__class__ == value.__class__)
-            self.assertTrue(result[1].__class__ == value.__class__)            
+            self.assertTrue(result[1].__class__ == value.__class__)
         else:
             self.assertTrue(len(result) == 3)
             self.assertTrue(result[0] == value)
-            self.assertTrue(result[1] == value)            
+            self.assertTrue(result[1] == value)
 
         # Type inference (instance method)
         result = itype().Overloaded(items)
         if test_type:
             self.assertTrue(len(result) == 3)
             self.assertTrue(result[0].__class__ == value.__class__)
-            self.assertTrue(result[1].__class__ == value.__class__)            
+            self.assertTrue(result[1].__class__ == value.__class__)
         else:
             self.assertTrue(len(result) == 3)
             self.assertTrue(result[0] == value)
-            self.assertTrue(result[1] == value)            
+            self.assertTrue(result[1] == value)
 
     def testGenericMethodBinding(self):
         from Python.Test import GenericMethodTest, GenericStaticMethodTest
         from System import InvalidOperationException
-        
+
         # Can invoke a static member on a closed generic type.
         value = GenericStaticMethodTest[str].Overloaded()
         self.assertTrue(value == 1)
@@ -313,7 +314,7 @@ def testGenericMethodTypeHandling(self):
 
         # XXX BUG: The value doesn't fit into Int64 and PythonNet doesn't
         # recognize it as UInt64 for unknown reasons.
-##        self._testGenericMethodByType(System.UInt64, 18446744073709551615L)
+        ##        self._testGenericMethodByType(System.UInt64, 18446744073709551615L)
         self._testGenericMethodByType(System.Boolean, True)
         self._testGenericMethodByType(bool, True)
         self._testGenericMethodByType(System.Byte, 255)
@@ -331,7 +332,7 @@ def testGenericMethodTypeHandling(self):
         self._testGenericMethodByType(System.UInt16, 65000)
         self._testGenericMethodByType(System.Single, 3.402823e38)
         self._testGenericMethodByType(System.Double, 1.7976931348623157e308)
-        self._testGenericMethodByType(float, 1.7976931348623157e308)         
+        self._testGenericMethodByType(float, 1.7976931348623157e308)
         self._testGenericMethodByType(System.Decimal, System.Decimal.One)
         self._testGenericMethodByType(System.String, "test")
         self._testGenericMethodByType(unicode, "test")
@@ -354,31 +355,31 @@ def testCorrectOverloadSelection(self):
         substr = String("substring")
         self.assertTrue(substr.Substring(2) == substr.Substring.__overloads__[Int32](
             Int32(2)))
-        self.assertTrue(substr.Substring(2, 3) == substr.Substring.__overloads__[Int32,Int32](
+        self.assertTrue(substr.Substring(2, 3) == substr.Substring.__overloads__[Int32, Int32](
             Int32(2), Int32(3)))
 
         for atype, value1, value2 in zip([Double, Single, Int16, Int32, Int64],
-                                 [1.0, 1.0, 1, 1, 1],
-                                 [2.0, 0.5, 2, 0, -1]):
+                                         [1.0, 1.0, 1, 1, 1],
+                                         [2.0, 0.5, 2, 0, -1]):
             self.assertTrue(Math.Abs(atype(value1)) == Math.Abs.__overloads__[atype](atype(value1)))
             self.assertTrue(Math.Abs(value1) == Math.Abs.__overloads__[atype](atype(value1)))
             self.assertTrue(
-                Math.Max(atype(value1), 
+                Math.Max(atype(value1),
                          atype(value2)) == Math.Max.__overloads__[atype, atype](
-                         atype(value1),
-                         atype(value2)))
+                    atype(value1),
+                    atype(value2)))
             if (atype is Int64) and six.PY2:
                 value2 = long(value2)
             self.assertTrue(
-                Math.Max(atype(value1), 
+                Math.Max(atype(value1),
                          value2) == Math.Max.__overloads__[atype, atype](
-                         atype(value1),
-                         atype(value2)))
+                    atype(value1),
+                    atype(value2)))
 
         clr.AddReference("System.Runtime.InteropServices")
         from System.Runtime.InteropServices import GCHandle, GCHandleType
         from System import Array, Byte
-        CSArray = Array.CreateInstance(Byte, 1000) 
+        CSArray = Array.CreateInstance(Byte, 1000)
         handler = GCHandle.Alloc(CSArray, GCHandleType.Pinned)
 
     def testGenericMethodOverloadSelection(self):
@@ -455,6 +456,7 @@ def testGenericMethodOverloadSelection(self):
 
         def test():
             value = type.Overloaded[str, bool, int]("true", True, 1)
+
         self.assertRaises(TypeError, test)
 
         def test():
@@ -594,7 +596,7 @@ def testMethodOverloadSelectionWithGenericTypes(self):
         input = vtype([GenericWrapper[int](0), GenericWrapper[int](1)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 0)
-        self.assertTrue(value[1].value == 1)        
+        self.assertTrue(value[1].value == 1)
 
     def testOverloadSelectionWithArraysOfGenericTypes(self):
         """Check overload selection using arrays of generic types."""
@@ -604,7 +606,7 @@ def testOverloadSelectionWithArraysOfGenericTypes(self):
 
         gtype = GenericWrapper[System.Boolean]
         vtype = System.Array[gtype]
-        input = vtype([gtype(True),gtype(True)])
+        input = vtype([gtype(True), gtype(True)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == True)
         self.assertTrue(value.Length == 2)
@@ -615,56 +617,56 @@ def testOverloadSelectionWithArraysOfGenericTypes(self):
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == True)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Byte]
         vtype = System.Array[gtype]
         input = vtype([gtype(255), gtype(255)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 255)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.SByte]
         vtype = System.Array[gtype]
         input = vtype([gtype(127), gtype(127)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 127)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Char]
         vtype = System.Array[gtype]
         input = vtype([gtype(six.u('A')), gtype(six.u('A'))])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == six.u('A'))
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Char]
         vtype = System.Array[gtype]
         input = vtype([gtype(65535), gtype(65535)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == unichr(65535))
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Int16]
         vtype = System.Array[gtype]
-        input = vtype([gtype(32767),gtype(32767)])
+        input = vtype([gtype(32767), gtype(32767)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 32767)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Int32]
         vtype = System.Array[gtype]
         input = vtype([gtype(2147483647), gtype(2147483647)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 2147483647)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[int]
         vtype = System.Array[gtype]
         input = vtype([gtype(2147483647), gtype(2147483647)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 2147483647)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Int64]
         vtype = System.Array[gtype]
         input = vtype([gtype(long(9223372036854775807)),
@@ -682,21 +684,21 @@ def testOverloadSelectionWithArraysOfGenericTypes(self):
             value = MethodTest.Overloaded.__overloads__[vtype](input)
             self.assertTrue(value[0].value == long(9223372036854775807))
             self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.UInt16]
         vtype = System.Array[gtype]
         input = vtype([gtype(65000), gtype(65000)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 65000)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.UInt32]
         vtype = System.Array[gtype]
         input = vtype([gtype(long(4294967295)), gtype(long(4294967295))])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == long(4294967295))
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.UInt64]
         vtype = System.Array[gtype]
         input = vtype([gtype(long(18446744073709551615)),
@@ -704,14 +706,14 @@ def testOverloadSelectionWithArraysOfGenericTypes(self):
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == long(18446744073709551615))
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Single]
         vtype = System.Array[gtype]
         input = vtype([gtype(3.402823e38), gtype(3.402823e38)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 3.402823e38)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Double]
         vtype = System.Array[gtype]
         input = vtype([gtype(1.7976931348623157e308),
@@ -719,7 +721,7 @@ def testOverloadSelectionWithArraysOfGenericTypes(self):
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 1.7976931348623157e308)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[float]
         vtype = System.Array[gtype]
         input = vtype([gtype(1.7976931348623157e308),
@@ -727,7 +729,7 @@ def testOverloadSelectionWithArraysOfGenericTypes(self):
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == 1.7976931348623157e308)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Decimal]
         vtype = System.Array[gtype]
         input = vtype([gtype(System.Decimal.One),
@@ -735,42 +737,42 @@ def testOverloadSelectionWithArraysOfGenericTypes(self):
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == System.Decimal.One)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.String]
         vtype = System.Array[gtype]
         input = vtype([gtype("spam"), gtype("spam")])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == "spam")
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[str]
         vtype = System.Array[gtype]
         input = vtype([gtype("spam"), gtype("spam")])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == "spam")
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[ShortEnum]
         vtype = System.Array[gtype]
         input = vtype([gtype(ShortEnum.Zero), gtype(ShortEnum.Zero)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value == ShortEnum.Zero)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[System.Object]
         vtype = System.Array[gtype]
         input = vtype([gtype(inst), gtype(inst)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value.__class__ == inst.__class__)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[InterfaceTest]
         vtype = System.Array[gtype]
         input = vtype([gtype(inst), gtype(inst)])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].value.__class__ == inst.__class__)
         self.assertTrue(value.Length == 2)
-        
+
         gtype = GenericWrapper[ISayHello1]
         vtype = System.Array[gtype]
         input = vtype([gtype(inst), gtype(inst)])
@@ -787,16 +789,15 @@ def testNestedGenericClass(self):
         """Check nested generic classes."""
         # XXX NotImplemented
         pass
-    
 
 
 def test_suite():
     return unittest.makeSuite(GenericTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
-
diff --git a/src/tests/test_indexer.py b/src/tests/test_indexer.py
index 691ebb871..5e74c76f0 100644
--- a/src/tests/test_indexer.py
+++ b/src/tests/test_indexer.py
@@ -1,14 +1,6 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 import clr
+
 clr.AddReference("Python.Test")
 import Python.Test as Test
 import six
@@ -27,26 +19,24 @@ def testPublicIndexer(self):
 
         object[0] = "zero"
         self.assertTrue(object[0] == "zero")
-        
+
         object[1] = "one"
         self.assertTrue(object[1] == "one")
 
         self.assertTrue(object[10] == None)
 
-
     def testProtectedIndexer(self):
         """Test protected indexers."""
         object = Test.ProtectedIndexerTest()
 
         object[0] = "zero"
         self.assertTrue(object[0] == "zero")
-        
+
         object[1] = "one"
         self.assertTrue(object[1] == "one")
 
         self.assertTrue(object[10] == None)
 
-
     def testInternalIndexer(self):
         """Test internal indexers."""
         object = Test.InternalIndexerTest()
@@ -66,7 +56,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testPrivateIndexer(self):
         """Test private indexers."""
         object = Test.PrivateIndexerTest()
@@ -86,7 +75,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testBooleanIndexer(self):
         """Test boolean indexers."""
         object = Test.BooleanIndexerTest()
@@ -96,17 +84,16 @@ def testBooleanIndexer(self):
 
         object[0] = "false"
         self.assertTrue(object[0] == "false")
-        
+
         object[1] = "true"
         self.assertTrue(object[1] == "true")
 
         object[False] = "false"
         self.assertTrue(object[False] == "false")
-        
+
         object[True] = "true"
         self.assertTrue(object[True] == "true")
 
-
     def testByteIndexer(self):
         """Test byte indexers."""
         object = Test.ByteIndexerTest()
@@ -117,7 +104,7 @@ def testByteIndexer(self):
 
         object[max] = str(max)
         self.assertTrue(object[max] == str(max))
-        
+
         object[min] = str(min)
         self.assertTrue(object[min] == str(min))
 
@@ -133,7 +120,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testSByteIndexer(self):
         """Test sbyte indexers."""
         object = Test.SByteIndexerTest()
@@ -144,7 +130,7 @@ def testSByteIndexer(self):
 
         object[max] = str(max)
         self.assertTrue(object[max] == str(max))
-        
+
         object[min] = str(min)
         self.assertTrue(object[min] == str(min))
 
@@ -160,18 +146,17 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testCharIndexer(self):
         """Test char indexers."""
         object = Test.CharIndexerTest()
         max = unichr(65535)
         min = unichr(0)
-    
+
         self.assertTrue(object[max] == None)
 
         object[max] = "max"
         self.assertTrue(object[max] == "max")
-        
+
         object[min] = "min"
         self.assertTrue(object[min] == "min")
 
@@ -187,7 +172,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInt16Indexer(self):
         """Test Int16 indexers."""
         object = Test.Int16IndexerTest()
@@ -198,7 +182,7 @@ def testInt16Indexer(self):
 
         object[max] = str(max)
         self.assertTrue(object[max] == str(max))
-        
+
         object[min] = str(min)
         self.assertTrue(object[min] == str(min))
 
@@ -214,7 +198,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInt32Indexer(self):
         """Test Int32 indexers."""
         object = Test.Int32IndexerTest()
@@ -225,7 +208,7 @@ def testInt32Indexer(self):
 
         object[max] = str(max)
         self.assertTrue(object[max] == str(max))
-        
+
         object[min] = str(min)
         self.assertTrue(object[min] == str(min))
 
@@ -241,7 +224,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInt64Indexer(self):
         """Test Int64 indexers."""
         object = Test.Int64IndexerTest()
@@ -252,7 +234,7 @@ def testInt64Indexer(self):
 
         object[max] = str(max)
         self.assertTrue(object[max] == str(max))
-        
+
         object[min] = str(min)
         self.assertTrue(object[min] == str(min))
 
@@ -268,7 +250,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testUInt16Indexer(self):
         """Test UInt16 indexers."""
         object = Test.UInt16IndexerTest()
@@ -279,7 +260,7 @@ def testUInt16Indexer(self):
 
         object[max] = str(max)
         self.assertTrue(object[max] == str(max))
-        
+
         object[min] = str(min)
         self.assertTrue(object[min] == str(min))
 
@@ -295,7 +276,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testUInt32Indexer(self):
         """Test UInt32 indexers."""
         object = Test.UInt32IndexerTest()
@@ -306,7 +286,7 @@ def testUInt32Indexer(self):
 
         object[max] = str(max)
         self.assertTrue(object[max] == str(max))
-        
+
         object[min] = str(min)
         self.assertTrue(object[min] == str(min))
 
@@ -322,7 +302,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testUInt64Indexer(self):
         """Test UInt64 indexers."""
         object = Test.UInt64IndexerTest()
@@ -333,7 +312,7 @@ def testUInt64Indexer(self):
 
         object[max] = str(max)
         self.assertTrue(object[max] == str(max))
-        
+
         object[min] = str(min)
         self.assertTrue(object[min] == str(min))
 
@@ -349,7 +328,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testSingleIndexer(self):
         """Test Single indexers."""
         object = Test.SingleIndexerTest()
@@ -360,7 +338,7 @@ def testSingleIndexer(self):
 
         object[max] = "max"
         self.assertTrue(object[max] == "max")
-        
+
         object[min] = "min"
         self.assertTrue(object[min] == "min")
 
@@ -376,7 +354,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testDoubleIndexer(self):
         """Test Double indexers."""
         object = Test.DoubleIndexerTest()
@@ -387,7 +364,7 @@ def testDoubleIndexer(self):
 
         object[max] = "max"
         self.assertTrue(object[max] == "max")
-        
+
         object[min] = "min"
         self.assertTrue(object[min] == "min")
 
@@ -403,7 +380,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testDecimalIndexer(self):
         """Test Decimal indexers."""
         object = Test.DecimalIndexerTest()
@@ -416,7 +392,7 @@ def testDecimalIndexer(self):
 
         object[max_d] = "max"
         self.assertTrue(object[max_d] == "max")
-        
+
         object[min_d] = "min"
         self.assertTrue(object[min_d] == "min")
 
@@ -432,7 +408,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testStringIndexer(self):
         """Test String indexers."""
         object = Test.StringIndexerTest()
@@ -445,7 +420,7 @@ def testStringIndexer(self):
         self.assertTrue(object["spam"] == six.u("spam"))
         self.assertTrue(object[six.u("spam")] == "spam")
         self.assertTrue(object[six.u("spam")] == six.u("spam"))
-        
+
         object[six.u("eggs")] = six.u("eggs")
         self.assertTrue(object["eggs"] == "eggs")
         self.assertTrue(object["eggs"] == six.u("eggs"))
@@ -464,7 +439,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testEnumIndexer(self):
         """Test enum indexers."""
         object = Test.EnumIndexerTest()
@@ -475,7 +449,7 @@ def testEnumIndexer(self):
 
         object[key] = "spam"
         self.assertTrue(object[key] == "spam")
-        
+
         object[key] = "eggs"
         self.assertTrue(object[key] == "eggs")
 
@@ -494,7 +468,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testObjectIndexer(self):
         """Test object indexers."""
         object = Test.ObjectIndexerTest()
@@ -509,7 +482,7 @@ def testObjectIndexer(self):
 
         object[spam] = "spam"
         self.assertTrue(object[spam] == "spam")
-        
+
         object["spam"] = "eggs"
         self.assertTrue(object["spam"] == "eggs")
 
@@ -522,13 +495,13 @@ def testObjectIndexer(self):
         def test():
             class eggs:
                 pass
+
             key = eggs()
             object = Test.ObjectIndexerTest()
             object[key] = "wrong"
 
         self.assertRaises(TypeError, test)
 
-
     def testInterfaceIndexer(self):
         """Test interface indexers."""
         object = Test.InterfaceIndexerTest()
@@ -540,7 +513,7 @@ def testInterfaceIndexer(self):
 
         object[spam] = "spam"
         self.assertTrue(object[spam] == "spam")
-        
+
         object[spam] = "eggs"
         self.assertTrue(object[spam] == "eggs")
 
@@ -556,7 +529,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testTypedIndexer(self):
         """Test typed indexers."""
         object = Test.TypedIndexerTest()
@@ -568,7 +540,7 @@ def testTypedIndexer(self):
 
         object[spam] = "spam"
         self.assertTrue(object[spam] == "spam")
-        
+
         object[spam] = "eggs"
         self.assertTrue(object[spam] == "eggs")
 
@@ -584,14 +556,13 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testMultiArgIndexer(self):
         """Test indexers that take multiple index arguments."""
         object = Test.MultiArgIndexerTest()
 
         object[0, 1] = "zero one"
         self.assertTrue(object[0, 1] == "zero one")
-        
+
         object[1, 9] = "one nine"
         self.assertTrue(object[1, 9] == "one nine")
 
@@ -609,7 +580,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testMultiTypeIndexer(self):
         """Test indexers that take multiple indices of different types."""
         object = Test.MultiTypeIndexerTest()
@@ -617,7 +587,7 @@ def testMultiTypeIndexer(self):
 
         object[0, "one", spam] = "zero one spam"
         self.assertTrue(object[0, "one", spam] == "zero one spam")
-        
+
         object[1, "nine", spam] = "one nine spam"
         self.assertTrue(object[1, "nine", spam] == "one nine spam")
 
@@ -632,19 +602,17 @@ def test():
             object[0, 1, spam] = "wrong"
 
         self.assertRaises(TypeError, test)
-        
-        
+
     def testMultiDefaultKeyIndexer(self):
         """Test indexers that take multiple indices with a default key arguments."""
-        #default argument is 2 in the MultiDefaultKeyIndexerTest object
+        # default argument is 2 in the MultiDefaultKeyIndexerTest object
         object = Test.MultiDefaultKeyIndexerTest()
         object[0, 2] = "zero one spam"
         self.assertTrue(object[0] == "zero one spam")
-        
+
         object[1] = "one nine spam"
         self.assertTrue(object[1, 2] == "one nine spam")
 
-
     def testIndexerWrongKeyType(self):
         """Test calling an indexer using a key of the wrong type."""
 
@@ -660,7 +628,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testIndexerWrongValueType(self):
         """Test calling an indexer using a value of the wrong type."""
 
@@ -670,20 +637,18 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testUnboundIndexer(self):
         """Test calling an unbound indexer."""
         object = Test.PublicIndexerTest()
 
         Test.PublicIndexerTest.__setitem__(object, 0, "zero")
         self.assertTrue(object[0] == "zero")
-        
+
         Test.PublicIndexerTest.__setitem__(object, 1, "one")
         self.assertTrue(object[1] == "one")
 
         self.assertTrue(object[10] == None)
 
-
     def testIndexerAbuse(self):
         """Test indexer abuse."""
         _class = Test.PublicIndexerTest
@@ -710,13 +675,13 @@ def test():
         self.assertRaises(AttributeError, test)
 
 
-
 def test_suite():
     return unittest.makeSuite(IndexerTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_interface.py b/src/tests/test_interface.py
index 4412aefb2..1e495fe25 100644
--- a/src/tests/test_interface.py
+++ b/src/tests/test_interface.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 from Python.Test import InterfaceTest
 import sys, os, string, unittest, types
 import Python.Test as Test
@@ -29,12 +20,11 @@ def testInterfaceStandardAttrs(self):
         self.assertTrue(ip.__module__ == 'Python.Test')
         self.assertTrue(type(ip.__dict__) == DictProxyType)
 
-
     def testGlobalInterfaceVisibility(self):
         """Test visibility of module-level interfaces."""
         from Python.Test import IPublicInterface
         self.assertTrue(IPublicInterface.__name__ == 'IPublicInterface')
-        
+
         def test():
             from Python.Test import IInternalInterface
 
@@ -45,7 +35,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testNestedInterfaceVisibility(self):
         """Test visibility of nested interfaces."""
         ob = InterfaceTest.IPublic
@@ -64,7 +53,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testExplicitCastToInterface(self):
         """Test explicit cast to an interface."""
         ob = InterfaceTest()
@@ -84,13 +72,13 @@ def testExplicitCastToInterface(self):
         self.assertFalse(hasattr(i2, 'HelloProperty'))
 
 
-
 def test_suite():
     return unittest.makeSuite(InterfaceTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_method.py b/src/tests/test_method.py
index ca5729a43..4ddade755 100644
--- a/src/tests/test_method.py
+++ b/src/tests/test_method.py
@@ -1,14 +1,6 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 import clr
+
 clr.AddReference("Python.Test")
 
 from Python.Test import MethodTest, MethodTestSub
@@ -25,6 +17,7 @@ class MethodTests(unittest.TestCase):
 
     def testInstanceMethodDescriptor(self):
         """Test instance method descriptor behavior."""
+
         def test():
             MethodTest().PublicMethod = 0
 
@@ -45,9 +38,9 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testStaticMethodDescriptor(self):
         """Test static method descriptor behavior."""
+
         def test():
             MethodTest().PublicStaticMethod = 0
 
@@ -68,26 +61,22 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testPublicInstanceMethod(self):
         """Test public instance method visibility."""
         object = MethodTest();
         self.assertTrue(object.PublicMethod() == "public")
 
-
     def testPublicStaticMethod(self):
         """Test public static method visibility."""
         object = MethodTest();
         self.assertTrue(MethodTest.PublicStaticMethod() == "public static")
         self.assertTrue(object.PublicStaticMethod() == "public static")
 
-
     def testProtectedInstanceMethod(self):
         """Test protected instance method visibility."""
         object = MethodTest();
         self.assertTrue(object.ProtectedMethod() == "protected")
 
-
     def testProtectedStaticMethod(self):
         """Test protected static method visibility."""
         object = MethodTest();
@@ -95,9 +84,9 @@ def testProtectedStaticMethod(self):
         self.assertTrue(MethodTest.ProtectedStaticMethod() == result)
         self.assertTrue(object.ProtectedStaticMethod() == result)
 
-
     def testInternalMethod(self):
         """Test internal method visibility."""
+
         def test():
             f = MethodTest().InternalMethod
 
@@ -118,9 +107,9 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testPrivateMethod(self):
         """Test private method visibility."""
+
         def test():
             f = MethodTest().PrivateMethod
 
@@ -141,7 +130,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testUnboundManagedMethodCall(self):
         """Test calling unbound managed methods."""
 
@@ -153,7 +141,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
         object = MethodTestSub();
         self.assertTrue(MethodTestSub.PublicMethod(object) == "public")
         self.assertTrue(MethodTestSub.PublicMethod(object, "echo") == "echo")
@@ -163,7 +150,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testOverloadedMethodInheritance(self):
         """Test that overloads are inherited properly."""
 
@@ -176,13 +162,11 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
         object = MethodTestSub();
         self.assertTrue(object.PublicMethod() == "public")
 
         self.assertTrue(object.PublicMethod("echo") == "echo")
 
-
     def testMethodDescriptorAbuse(self):
         """Test method descriptor abuse."""
         desc = MethodTest.__dict__['PublicMethod']
@@ -197,17 +181,15 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testMethodDocstrings(self):
         """Test standard method docstring generation"""
         method = MethodTest.GetType
         value = 'System.Type GetType()'
         self.assertTrue(method.__doc__ == value)
 
-
-    #======================================================================
+    # ======================================================================
     # Tests of specific argument and result conversion scenarios
-    #======================================================================
+    # ======================================================================
 
     def testMethodCallEnumConversion(self):
         """Test enum conversion in method call."""
@@ -217,7 +199,6 @@ def testMethodCallEnumConversion(self):
         r = object.TestEnumConversion(TypeCode.Int32)
         self.assertTrue(r == TypeCode.Int32)
 
-
     def testMethodCallFlagsConversion(self):
         """Test flags conversion in method call."""
         from System.IO import FileAccess
@@ -227,7 +208,6 @@ def testMethodCallFlagsConversion(self):
         r = object.TestFlagsConversion(flags)
         self.assertTrue(r == flags)
 
-
     def testMethodCallStructConversion(self):
         """Test struct conversion in method call."""
         from System import Guid
@@ -238,9 +218,9 @@ def testMethodCallStructConversion(self):
         r = object.TestStructConversion(guid)
         self.assertTrue(r.ToString() == temp)
 
-
     def testSubclassInstanceConversion(self):
         """Test subclass instance conversion in method call."""
+
         class TestSubException(System.Exception):
             pass
 
@@ -249,7 +229,6 @@ class TestSubException(System.Exception):
         result = object.TestSubclassConversion(instance)
         self.assertTrue(isinstance(result, System.Exception))
 
-
     def testNullArrayConversion(self):
         """Test null array conversion in method call."""
         from System import Type
@@ -258,7 +237,6 @@ def testNullArrayConversion(self):
         r = object.TestNullArrayConversion(None)
         self.assertTrue(r == None)
 
-
     def testStringParamsArgs(self):
         """Test use of string params."""
         result = MethodTest.TestStringParamsArg('one', 'two', 'three')
@@ -266,14 +244,13 @@ def testStringParamsArgs(self):
         self.assertEqual(len(result), 3, result)
         self.assertTrue(result[0] == 'one')
         self.assertTrue(result[1] == 'two')
-        self.assertTrue(result[2] == 'three')        
+        self.assertTrue(result[2] == 'three')
 
         result = MethodTest.TestStringParamsArg(['one', 'two', 'three'])
         self.assertTrue(len(result) == 3)
         self.assertTrue(result[0] == 'one')
         self.assertTrue(result[1] == 'two')
-        self.assertTrue(result[2] == 'three')        
-
+        self.assertTrue(result[2] == 'three')
 
     def testObjectParamsArgs(self):
         """Test use of object params."""
@@ -281,14 +258,13 @@ def testObjectParamsArgs(self):
         self.assertEqual(len(result), 3, result)
         self.assertTrue(result[0] == 'one')
         self.assertTrue(result[1] == 'two')
-        self.assertTrue(result[2] == 'three')        
+        self.assertTrue(result[2] == 'three')
 
         result = MethodTest.TestObjectParamsArg(['one', 'two', 'three'])
         self.assertEqual(len(result), 3, result)
         self.assertTrue(result[0] == 'one')
         self.assertTrue(result[1] == 'two')
-        self.assertTrue(result[2] == 'three')        
-
+        self.assertTrue(result[2] == 'three')
 
     def testValueParamsArgs(self):
         """Test use of value type params."""
@@ -296,13 +272,13 @@ def testValueParamsArgs(self):
         self.assertEqual(len(result), 3)
         self.assertTrue(result[0] == 1)
         self.assertTrue(result[1] == 2)
-        self.assertTrue(result[2] == 3)        
+        self.assertTrue(result[2] == 3)
 
         result = MethodTest.TestValueParamsArg([1, 2, 3])
         self.assertEqual(len(result), 3)
         self.assertTrue(result[0] == 1)
         self.assertTrue(result[1] == 2)
-        self.assertTrue(result[2] == 3)        
+        self.assertTrue(result[2] == 3)
 
     def testNonParamsArrayInLastPlace(self):
         """Test overload resolution with of non-"params" array as last parameter."""
@@ -323,7 +299,6 @@ def testStringOutParams(self):
         self.assertTrue(result[0] == True)
         self.assertTrue(result[1] == "output string")
 
-
     def testStringRefParams(self):
         """Test use of string byref parameters."""
         result = MethodTest.TestStringRefParams("hi", "there")
@@ -338,7 +313,6 @@ def testStringRefParams(self):
         self.assertTrue(result[0] == True)
         self.assertTrue(result[1] == "output string")
 
-
     def testValueOutParams(self):
         """Test use of value type out-parameters."""
         result = MethodTest.TestValueOutParams("hi", 1)
@@ -353,7 +327,6 @@ def test():
         # None cannot be converted to a value type like int, long, etc.
         self.assertRaises(TypeError, test)
 
-
     def testValueRefParams(self):
         """Test use of value type byref parameters."""
         result = MethodTest.TestValueRefParams("hi", 1)
@@ -368,7 +341,6 @@ def test():
         # None cannot be converted to a value type like int, long, etc.
         self.assertRaises(TypeError, test)
 
-
     def testObjectOutParams(self):
         """Test use of object out-parameters."""
         result = MethodTest.TestObjectOutParams("hi", MethodTest())
@@ -383,7 +355,6 @@ def testObjectOutParams(self):
         self.assertTrue(result[0] == True)
         self.assertTrue(isinstance(result[1], System.Exception))
 
-
     def testObjectRefParams(self):
         """Test use of object byref parameters."""
         result = MethodTest.TestObjectRefParams("hi", MethodTest())
@@ -398,10 +369,9 @@ def testObjectRefParams(self):
         self.assertTrue(result[0] == True)
         self.assertTrue(isinstance(result[1], System.Exception))
 
-
     def testStructOutParams(self):
         """Test use of struct out-parameters."""
-        result = MethodTest.TestStructOutParams("hi",System.Guid.NewGuid())
+        result = MethodTest.TestStructOutParams("hi", System.Guid.NewGuid())
         self.assertTrue(type(result) == type(()))
         self.assertEqual(len(result), 2)
         self.assertTrue(result[0] == True)
@@ -413,10 +383,9 @@ def test():
         # None cannot be converted to a value type like a struct
         self.assertRaises(TypeError, test)
 
-
     def testStructRefParams(self):
         """Test use of struct byref parameters."""
-        result = MethodTest.TestStructRefParams("hi",System.Guid.NewGuid())
+        result = MethodTest.TestStructRefParams("hi", System.Guid.NewGuid())
         self.assertTrue(type(result) == type(()))
         self.assertTrue(len(result) == 2)
         self.assertTrue(result[0] == True)
@@ -428,7 +397,6 @@ def test():
         # None cannot be converted to a value type like a struct
         self.assertRaises(TypeError, test)
 
-
     def testVoidSingleOutParam(self):
         """Test void method with single out-parameter."""
         result = MethodTest.TestVoidSingleOutParam(9)
@@ -440,7 +408,6 @@ def test():
         # None cannot be converted to a value type
         self.assertRaises(TypeError, test)
 
-
     def testVoidSingleRefParam(self):
         """Test void method with single ref-parameter."""
         result = MethodTest.TestVoidSingleRefParam(9)
@@ -451,35 +418,34 @@ def test():
 
         # None cannot be converted to a value type
         self.assertRaises(TypeError, test)
-        
+
     def testSingleDefaultParam(self):
         """Test void method with single ref-parameter."""
         result = MethodTest.TestSingleDefaultParam()
         self.assertTrue(result == 5)
-        
+
     def testOneArgAndTwoDefaultParam(self):
         """Test void method with single ref-parameter."""
         result = MethodTest.TestOneArgAndTwoDefaultParam(11)
         self.assertTrue(result == 22)
-        
+
         result = MethodTest.TestOneArgAndTwoDefaultParam(15)
         self.assertTrue(result == 26)
-        
+
         result = MethodTest.TestOneArgAndTwoDefaultParam(20)
         self.assertTrue(result == 31)
-        
+
     def testTwoDefaultParam(self):
         """Test void method with single ref-parameter."""
         result = MethodTest.TestTwoDefaultParam()
-        self.assertTrue(result == 11)        
-
+        self.assertTrue(result == 11)
 
     def testExplicitSelectionWithOutModifier(self):
         """Check explicit overload selection with out modifiers."""
         refstr = System.String("").GetType().MakeByRefType()
         result = MethodTest.TestStringOutParams.__overloads__[str, refstr](
             "hi", "there"
-            )
+        )
         self.assertTrue(type(result) == type(()))
         self.assertTrue(len(result) == 2)
         self.assertTrue(result[0] == True)
@@ -487,19 +453,18 @@ def testExplicitSelectionWithOutModifier(self):
 
         result = MethodTest.TestStringOutParams.__overloads__[str, refstr](
             "hi", None
-            )
+        )
         self.assertTrue(type(result) == type(()))
         self.assertTrue(len(result) == 2)
         self.assertTrue(result[0] == True)
         self.assertTrue(result[1] == "output string")
 
-
     def testExplicitSelectionWithRefModifier(self):
         """Check explicit overload selection with ref modifiers."""
-        refstr = System.String("").GetType().MakeByRefType()        
+        refstr = System.String("").GetType().MakeByRefType()
         result = MethodTest.TestStringRefParams.__overloads__[str, refstr](
             "hi", "there"
-            )
+        )
         self.assertTrue(type(result) == type(()))
         self.assertTrue(len(result) == 2)
         self.assertTrue(result[0] == True)
@@ -507,20 +472,19 @@ def testExplicitSelectionWithRefModifier(self):
 
         result = MethodTest.TestStringRefParams.__overloads__[str, refstr](
             "hi", None
-            )
+        )
         self.assertTrue(type(result) == type(()))
         self.assertTrue(len(result) == 2)
         self.assertTrue(result[0] == True)
         self.assertTrue(result[1] == "output string")
 
-
     def testExplicitOverloadSelection(self):
         """Check explicit overload selection using [] syntax."""
         from Python.Test import ISayHello1, InterfaceTest, ShortEnum
         from System import Array
         inst = InterfaceTest()
 
-        value =MethodTest.Overloaded.__overloads__[System.Boolean](True)
+        value = MethodTest.Overloaded.__overloads__[System.Boolean](True)
         self.assertTrue(value == True)
 
         value = MethodTest.Overloaded.__overloads__[bool](True)
@@ -549,14 +513,14 @@ def testExplicitOverloadSelection(self):
 
         value = MethodTest.Overloaded.__overloads__[System.Int64](
             long(9223372036854775807)
-            )
+        )
         self.assertTrue(value == long(9223372036854775807))
 
         # Python 3 has no explicit long type, use System.Int64 instead
         if not six.PY3:
             value = MethodTest.Overloaded.__overloads__[long](
                 long(9223372036854775807)
-                )
+            )
             self.assertTrue(value == long(9223372036854775807))
 
         value = MethodTest.Overloaded.__overloads__[System.UInt16](65000)
@@ -567,7 +531,7 @@ def testExplicitOverloadSelection(self):
 
         value = MethodTest.Overloaded.__overloads__[System.UInt64](
             long(18446744073709551615)
-            )
+        )
         self.assertTrue(value == long(18446744073709551615))
 
         value = MethodTest.Overloaded.__overloads__[System.Single](3.402823e38)
@@ -575,17 +539,17 @@ def testExplicitOverloadSelection(self):
 
         value = MethodTest.Overloaded.__overloads__[System.Double](
             1.7976931348623157e308
-            )
+        )
         self.assertTrue(value == 1.7976931348623157e308)
 
         value = MethodTest.Overloaded.__overloads__[float](
             1.7976931348623157e308
-            )
+        )
         self.assertTrue(value == 1.7976931348623157e308)
 
         value = MethodTest.Overloaded.__overloads__[System.Decimal](
             System.Decimal.One
-            )
+        )
         self.assertTrue(value == System.Decimal.One)
 
         value = MethodTest.Overloaded.__overloads__[System.String]("spam")
@@ -609,7 +573,7 @@ def testExplicitOverloadSelection(self):
         atype = Array[System.Object]
         value = MethodTest.Overloaded.__overloads__[str, int, atype](
             "one", 1, atype([1, 2, 3])
-            )
+        )
         self.assertTrue(value == 3)
 
         value = MethodTest.Overloaded.__overloads__[str, int]("one", 1)
@@ -618,7 +582,6 @@ def testExplicitOverloadSelection(self):
         value = MethodTest.Overloaded.__overloads__[int, str](1, "one")
         self.assertTrue(value == 1)
 
-
     def testOverloadSelectionWithArrayTypes(self):
         """Check overload selection using array types."""
         from Python.Test import ISayHello1, InterfaceTest, ShortEnum
@@ -629,25 +592,25 @@ def testOverloadSelectionWithArrayTypes(self):
         input = vtype([True, True])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == True)
-        self.assertTrue(value[1] == True)        
+        self.assertTrue(value[1] == True)
 
         vtype = Array[bool]
         input = vtype([True, True])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == True)
-        self.assertTrue(value[1] == True)        
+        self.assertTrue(value[1] == True)
 
         vtype = Array[System.Byte]
         input = vtype([0, 255])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 255)        
-        
+        self.assertTrue(value[1] == 255)
+
         vtype = Array[System.SByte]
         input = vtype([0, 127])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 127)        
+        self.assertTrue(value[1] == 127)
 
         vtype = Array[System.Char]
         input = vtype([six.u('A'), six.u('Z')])
@@ -659,25 +622,25 @@ def testOverloadSelectionWithArrayTypes(self):
         input = vtype([0, 65535])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == unichr(0))
-        self.assertTrue(value[1] == unichr(65535))        
+        self.assertTrue(value[1] == unichr(65535))
 
         vtype = Array[System.Int16]
         input = vtype([0, 32767])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 32767)        
+        self.assertTrue(value[1] == 32767)
 
         vtype = Array[System.Int32]
         input = vtype([0, 2147483647])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 2147483647)        
+        self.assertTrue(value[1] == 2147483647)
 
         vtype = Array[int]
         input = vtype([0, 2147483647])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 2147483647)        
+        self.assertTrue(value[1] == 2147483647)
 
         vtype = Array[System.Int64]
         input = vtype([0, long(9223372036854775807)])
@@ -697,7 +660,7 @@ def testOverloadSelectionWithArrayTypes(self):
         input = vtype([0, 65000])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0)
-        self.assertTrue(value[1] == 65000)        
+        self.assertTrue(value[1] == 65000)
 
         vtype = Array[System.UInt32]
         input = vtype([0, long(4294967295)])
@@ -715,25 +678,25 @@ def testOverloadSelectionWithArrayTypes(self):
         input = vtype([0.0, 3.402823e38])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0.0)
-        self.assertTrue(value[1] == 3.402823e38)        
+        self.assertTrue(value[1] == 3.402823e38)
 
         vtype = Array[System.Double]
         input = vtype([0.0, 1.7976931348623157e308])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0.0)
-        self.assertTrue(value[1] == 1.7976931348623157e308)        
+        self.assertTrue(value[1] == 1.7976931348623157e308)
 
         vtype = Array[float]
         input = vtype([0.0, 1.7976931348623157e308])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == 0.0)
-        self.assertTrue(value[1] == 1.7976931348623157e308)        
+        self.assertTrue(value[1] == 1.7976931348623157e308)
 
         vtype = Array[System.Decimal]
         input = vtype([System.Decimal.Zero, System.Decimal.One])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0] == System.Decimal.Zero)
-        self.assertTrue(value[1] == System.Decimal.One)        
+        self.assertTrue(value[1] == System.Decimal.One)
 
         vtype = Array[System.String]
         input = vtype(["one", "two"])
@@ -757,24 +720,23 @@ def testOverloadSelectionWithArrayTypes(self):
         input = vtype([inst, inst])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].__class__ == inst.__class__)
-        self.assertTrue(value[1].__class__ == inst.__class__)        
+        self.assertTrue(value[1].__class__ == inst.__class__)
 
         vtype = Array[InterfaceTest]
         input = vtype([inst, inst])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].__class__ == inst.__class__)
-        self.assertTrue(value[1].__class__ == inst.__class__)        
+        self.assertTrue(value[1].__class__ == inst.__class__)
 
         vtype = Array[ISayHello1]
         input = vtype([inst, inst])
         value = MethodTest.Overloaded.__overloads__[vtype](input)
         self.assertTrue(value[0].__class__ == inst.__class__)
-        self.assertTrue(value[1].__class__ == inst.__class__)        
-
+        self.assertTrue(value[1].__class__ == inst.__class__)
 
     def testExplicitOverloadSelectionFailure(self):
         """Check that overload selection fails correctly."""
-        
+
         def test():
             value = MethodTest.Overloaded.__overloads__[System.Type](True)
 
@@ -788,7 +750,7 @@ def test():
         def test():
             value = MethodTest.Overloaded.__overloads__[str, int, int](
                 "", 1, 1
-                )
+            )
 
         self.assertRaises(TypeError, test)
 
@@ -798,13 +760,13 @@ def test():
         self.assertRaises(TypeError, test)
 
 
-
 def test_suite():
     return unittest.makeSuite(MethodTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_module.py b/src/tests/test_module.py
index 0d340652a..f03954d28 100644
--- a/src/tests/test_module.py
+++ b/src/tests/test_module.py
@@ -1,12 +1,5 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
 import clr
+
 clr.AddReference('Python.Test')
 clr.AddReference('System.Data')
 
@@ -35,7 +28,7 @@ def isCLRRootModule(self, object):
         return type(object).__name__ == 'CLRModule'
 
     def isCLRClass(self, object):
-        return type(object).__name__ == 'CLR Metatype' # for now
+        return type(object).__name__ == 'CLR Metatype'  # for now
 
     def testAAAImportHookWorks(self):
         """Test that the import hook works correctly both using the
@@ -60,7 +53,7 @@ def testPreloadVar(self):
             self.assertTrue(clr.getPreload() is False, clr.getPreload())
             clr.setPreload(1)
             self.assertTrue(clr.getPreload() is True, clr.getPreload())
-            
+
             import System.Configuration
             content = dir(System.Configuration)
             self.assertTrue(len(content) > 10, content)
@@ -78,7 +71,6 @@ def testModuleInterface(self):
         self.assertTrue(self.isCLRClass(System.String))
         self.assertTrue(self.isCLRClass(System.Int32))
 
-
     def testSimpleImport(self):
         """Test simple import."""
         import System
@@ -98,7 +90,6 @@ def testSimpleImport(self):
             self.assertTrue(type(httplib) == types.ModuleType)
             self.assertTrue(httplib.__name__ == 'httplib')
 
-
     def testSimpleImportWithAlias(self):
         """Test simple import with aliasing."""
         import System as mySystem
@@ -118,7 +109,6 @@ def testSimpleImportWithAlias(self):
             self.assertTrue(type(myHttplib) == types.ModuleType)
             self.assertTrue(myHttplib.__name__ == 'httplib')
 
-
     def testDottedNameImport(self):
         """Test dotted-name import."""
         import System.Reflection
@@ -129,7 +119,6 @@ def testDottedNameImport(self):
         self.assertTrue(type(xml.dom) == types.ModuleType)
         self.assertTrue(xml.dom.__name__ == 'xml.dom')
 
-
     def testMultipleDottedNameImport(self):
         """Test an import bug with multiple dotted imports."""
         import System.Data
@@ -139,7 +128,6 @@ def testMultipleDottedNameImport(self):
         self.assertTrue(self.isCLRModule(System.Data))
         self.assertTrue(System.Data.__name__ == 'System.Data')
 
-        
     def testDottedNameImportWithAlias(self):
         """Test dotted-name import with aliasing."""
         import System.Reflection as SysRef
@@ -150,7 +138,6 @@ def testDottedNameImportWithAlias(self):
         self.assertTrue(type(myDom) == types.ModuleType)
         self.assertTrue(myDom.__name__ == 'xml.dom')
 
-
     def testSimpleImportFrom(self):
         """Test simple 'import from'."""
         from System import Reflection
@@ -161,7 +148,6 @@ def testSimpleImportFrom(self):
         self.assertTrue(type(dom) == types.ModuleType)
         self.assertTrue(dom.__name__ == 'xml.dom')
 
-
     def testSimpleImportFromWithAlias(self):
         """Test simple 'import from' with aliasing."""
         from System import Collections as Coll
@@ -172,14 +158,13 @@ def testSimpleImportFromWithAlias(self):
         self.assertTrue(type(myDom) == types.ModuleType)
         self.assertTrue(myDom.__name__ == 'xml.dom')
 
-
     def testDottedNameImportFrom(self):
         """Test dotted-name 'import from'."""
         from System.Collections import Specialized
         self.assertTrue(self.isCLRModule(Specialized))
         self.assertTrue(
             Specialized.__name__ == 'System.Collections.Specialized'
-            )
+        )
 
         from System.Collections.Specialized import StringCollection
         self.assertTrue(self.isCLRClass(StringCollection))
@@ -193,7 +178,6 @@ def testDottedNameImportFrom(self):
         self.assertTrue(type(PullDOM) == ClassType)
         self.assertTrue(PullDOM.__name__ == 'PullDOM')
 
-
     def testDottedNameImportFromWithAlias(self):
         """Test dotted-name 'import from' with aliasing."""
         from System.Collections import Specialized as Spec
@@ -212,7 +196,6 @@ def testDottedNameImportFromWithAlias(self):
         self.assertTrue(type(myPullDOM) == ClassType)
         self.assertTrue(myPullDOM.__name__ == 'PullDOM')
 
-
     def testFromModuleImportStar(self):
         """Test from module import * behavior."""
         count = len(locals().keys())
@@ -221,7 +204,6 @@ def testFromModuleImportStar(self):
         self.assertTrue(self.isCLRModule(m))
         self.assertTrue(len(locals().keys()) > count + 1)
 
-
     def testImplicitAssemblyLoad(self):
         """Test implicit assembly loading via import."""
         with warnings.catch_warnings(record=True) as w:
@@ -244,7 +226,6 @@ def testImplicitAssemblyLoad(self):
             self.assertTrue(Form.__name__ == 'Form')
             self.assertEqual(len(w), 0)
 
-
     def testExplicitAssemblyLoad(self):
         """Test explicit assembly loading using standard CLR tools."""
         from System.Reflection import Assembly
@@ -252,14 +233,13 @@ def testExplicitAssemblyLoad(self):
 
         assembly = Assembly.LoadWithPartialName('System.Data')
         self.assertTrue(assembly != None)
-        
+
         import System.Data
         self.assertTrue('System.Data' in sys.modules)
 
         assembly = Assembly.LoadWithPartialName('SpamSpamSpamSpamEggsAndSpam')
         self.assertTrue(assembly == None)
 
-
     def testImplicitLoadAlreadyValidNamespace(self):
         """Test implicit assembly load over an already valid namespace."""
         # In this case, the mscorlib assembly (loaded by default) defines
@@ -271,24 +251,23 @@ def testImplicitLoadAlreadyValidNamespace(self):
         import System
         self.assertTrue(self.isCLRClass(System.UriBuilder))
 
-
     def testImportNonExistantModule(self):
         """Test import failure for a non-existant module."""
+
         def test():
             import System.SpamSpamSpam
 
         self.assertTrue(ImportError, test)
 
-
     def testLookupNoNamespaceType(self):
         """Test lookup of types without a qualified namespace."""
         import Python.Test
         import clr
         self.assertTrue(self.isCLRClass(clr.NoNamespaceType))
 
-
     def testModuleLookupRecursion(self):
         """Test for recursive lookup handling."""
+
         def test1():
             from System import System
 
@@ -300,14 +279,13 @@ def test2():
 
         self.assertTrue(AttributeError, test2)
 
-
     def testModuleGetAttr(self):
         """Test module getattr behavior."""
         import System
 
         int_type = System.Int32
         self.assertTrue(self.isCLRClass(int_type))
-        
+
         module = System.Xml
         self.assertTrue(self.isCLRModule(module))
 
@@ -321,14 +299,13 @@ def test():
 
         self.assertTrue(TypeError, test)
 
-
     def testModuleAttrAbuse(self):
         """Test handling of attempts to set module attributes."""
 
         # It would be safer to use a dict-proxy as the __dict__ for CLR
         # modules, but as of Python 2.3 some parts of the CPython runtime
         # like dir() will fail if a module dict is not a real dictionary.
-        
+
         def test():
             import System
             System.__dict__['foo'] = 0
@@ -336,7 +313,6 @@ def test():
 
         self.assertTrue(test())
 
-
     def testModuleTypeAbuse(self):
         """Test handling of attempts to break the module type."""
         import System
@@ -358,7 +334,7 @@ def test():
         self.assertTrue(TypeError, test)
 
     def test_ClrListAssemblies(self):
-        from clr import ListAssemblies 
+        from clr import ListAssemblies
         verbose = list(ListAssemblies(True))
         short = list(ListAssemblies(False))
         self.assertTrue(six.u('mscorlib') in short)
@@ -370,20 +346,21 @@ def test_ClrAddReference(self):
         from clr import AddReference
         from System.IO import FileNotFoundException
         for name in ("System", "Python.Runtime"):
-            assy = AddReference(name) 
+            assy = AddReference(name)
             assyName = assy.GetName().Name
             self.assertEqual(assyName, name)
-        
-        self.assertRaises(FileNotFoundException, 
-            AddReference, "somethingtotallysilly")
+
+        self.assertRaises(FileNotFoundException,
+                          AddReference, "somethingtotallysilly")
 
 
 def test_suite():
     return unittest.makeSuite(ModuleTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_property.py b/src/tests/test_property.py
index 4b00040ef..5bb653848 100644
--- a/src/tests/test_property.py
+++ b/src/tests/test_property.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 from Python.Test import PropertyTest
 import six
@@ -33,7 +24,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testPublicStaticProperty(self):
         """Test public static properties."""
         object = PropertyTest();
@@ -56,7 +46,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testProtectedInstanceProperty(self):
         """Test protected instance properties."""
         object = PropertyTest();
@@ -70,7 +59,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testProtectedStaticProperty(self):
         """Test protected static properties."""
         object = PropertyTest();
@@ -93,7 +81,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInternalProperty(self):
         """Test internal properties."""
 
@@ -112,7 +99,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testPrivateProperty(self):
         """Test private properties."""
 
@@ -131,7 +117,6 @@ def test():
 
         self.assertRaises(AttributeError, test)
 
-
     def testPropertyDescriptorGetSet(self):
         """Test property descriptor get / set."""
 
@@ -155,16 +140,15 @@ def testPropertyDescriptorGetSet(self):
         descriptor = PropertyTest.__dict__['PublicStaticProperty']
         self.assertTrue(type(descriptor) != IntType)
 
-
     def testPropertyDescriptorWrongType(self):
         """Test setting a property using a value of the wrong type."""
+
         def test():
             object = PropertyTest()
             object.PublicProperty = "spam"
 
         self.assertTrue(TypeError, test)
 
-
     def testPropertyDescriptorAbuse(self):
         """Test property descriptor abuse."""
         desc = PropertyTest.__dict__['PublicProperty']
@@ -179,7 +163,6 @@ def test():
 
         self.assertRaises(TypeError, test)
 
-
     def testInterfaceProperty(self):
         """Test properties of interfaces. Added after a bug report
            that an IsAbstract check was inappropriate and prevented
@@ -191,13 +174,13 @@ def testInterfaceProperty(self):
         self.assertTrue(coll.Count == 0)
 
 
-
 def test_suite():
     return unittest.makeSuite(PropertyTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/test_subclass.py b/src/tests/test_subclass.py
index f116eb4de..43e8fb7aa 100644
--- a/src/tests/test_subclass.py
+++ b/src/tests/test_subclass.py
@@ -1,12 +1,5 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
 import clr
+
 clr.AddReference('Python.Test')
 clr.AddReference('System')
 
@@ -15,6 +8,7 @@
 from System.Collections.Generic import List
 from System import NotImplementedException
 
+
 # class that implements the test interface
 class InterfaceTestClass(IInterfaceTest):
     __namespace__ = "Python.Test"
@@ -25,6 +19,7 @@ def foo(self):
     def bar(self, x, i):
         return "/".join([x] * i)
 
+
 # class that derives from a class deriving from IInterfaceTest
 class DerivedClass(SubClassTest):
     __namespace__ = "Python.Test"
@@ -48,6 +43,7 @@ def return_list(self):
         l.Add("C")
         return l
 
+
 # class that implements IInterfaceTest.TestEvent
 class DerivedEventTest(IInterfaceTest):
     __namespace__ = "Python.Test"
@@ -131,7 +127,6 @@ def testCreateInstance(self):
         self.assertEqual(id(y), id(object2))
 
     def testEvents(self):
-
         class EventHandler:
             def handler(self, x, args):
                 self.value = args.value
@@ -156,8 +151,10 @@ def handler(self, x, args):
 def test_suite():
     return unittest.makeSuite(SubClassTests)
 
+
 def main():
     unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
diff --git a/src/tests/test_thread.py b/src/tests/test_thread.py
index 22d4c9538..67873d83c 100644
--- a/src/tests/test_thread.py
+++ b/src/tests/test_thread.py
@@ -1,12 +1,3 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 import sys, os, string, unittest, types
 from Python.Test import ThreadTest
 import six
@@ -32,7 +23,6 @@ def testSimpleCallbackToPython(self):
         self.assertTrue(result == "spam")
         dprint("thread %s SimpleCallBack ret" % thread.get_ident())
 
-                
     def testDoubleCallbackToPython(self):
         """Test a call to managed code that then calls back into Python
            that then calls managed code that then calls Python again."""
@@ -40,7 +30,6 @@ def testDoubleCallbackToPython(self):
         result = ThreadTest.CallEchoString2("spam")
         self.assertTrue(result == "spam")
         dprint("thread %s DoubleCallBack ret" % thread.get_ident())
-    
 
     def testPythonThreadCallsToCLR(self):
         """Test calls by Python-spawned threads into managed code."""
@@ -49,13 +38,14 @@ def testPythonThreadCallsToCLR(self):
         from System import String
 
         done = []
+
         def run_thread():
             for i in range(10):
                 time.sleep(0.1)
                 dprint("thread %s %d" % (thread.get_ident(), i))
                 mstr = String("thread %s %d" % (thread.get_ident(), i))
                 pstr = mstr.ToString()
-                done.append(None)                
+                done.append(None)
                 dprint("thread %s %d done" % (thread.get_ident(), i))
 
         def start_threads(count):
@@ -72,15 +62,14 @@ def start_threads(count):
         return
 
 
-    
-
 def test_suite():
     return unittest.makeSuite(ThreadTests)
 
+
 def main():
     for i in range(50):
         unittest.TextTestRunner().run(test_suite())
 
+
 if __name__ == '__main__':
     main()
-
diff --git a/src/tests/warnfilter.py b/src/tests/warnfilter.py
index b7a947cb9..8e378b86c 100644
--- a/src/tests/warnfilter.py
+++ b/src/tests/warnfilter.py
@@ -1,18 +1,10 @@
-# ===========================================================================
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# ===========================================================================
-
 """Warnfilter
 """
 
 from warnings import filterwarnings
 from warnings import resetwarnings
 
+
 def addClrWarnfilter(action="ignore", append=False):
     msgs = ["^The CLR module is deprecated.*", "^Importing from the CLR\.\* namespace.*"]
     for msg in msgs:
diff --git a/tools/geninterop/geninterop.py b/tools/geninterop/geninterop.py
index 2d4e15bc9..c74bc85e9 100644
--- a/tools/geninterop/geninterop.py
+++ b/tools/geninterop/geninterop.py
@@ -128,7 +128,6 @@ def __add_struct_member(self, type_name):
             # otherwise add it as a single member
             struct_members.append((member_name, type_name))
 
-
     def __get_leaf_node(self, node):
         if isinstance(node, c_ast.Typedef):
             return self.__get_leaf_node(node.type)
@@ -212,15 +211,7 @@ def gen_interop_code(members):
 
     class_definition = """
 // Auto-generated by %s.
-// DOT NOT MODIFIY BY HAND.
-// ==========================================================================
-// This software is subject to the provisions of the Zope Public License,
-// Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-// FOR A PARTICULAR PURPOSE.
-// ==========================================================================
+// DO NOT MODIFIY BY HAND.
 #if (%s)
 using System;
 using System.Collections;
@@ -289,4 +280,3 @@ def main():
 
 if __name__ == "__main__":
     sys.exit(main())
-