Index: binary-improvements/NamePatcher/NamePatcher.cs
===================================================================
--- binary-improvements/NamePatcher/NamePatcher.cs	(revision 104)
+++ binary-improvements/NamePatcher/NamePatcher.cs	(revision 107)
@@ -8,4 +8,5 @@
 namespace NamePatcher
 {
+
 	class NamePatcher
 	{
@@ -56,170 +57,7 @@
 		}
 
-		static void applyManualPatches (ModuleDefinition mainModule)
-		{
-			NameNormalizer.setName (mainModule.GetType ("ItemBlock").BaseType.Resolve (), "ItemBase");
-
-			foreach (FieldDefinition fd in mainModule.GetType ("Authenticator").Fields) {
-				TypeReference fdType = fd.FieldType;
-				if (fdType.FullName.Contains ("Dictionary") && fdType.FullName.Contains ("System.String")) {
-					Console.WriteLine ("Renaming and making public Authenticator field -> usersToIDs");
-					fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public;
-					NameNormalizer.setName (fd, "usersToIDs");
-				}
-			}
-
-			foreach (FieldDefinition fd in mainModule.GetType("PlayerDataFile").Fields) {
-				TypeReference fdType = fd.FieldType;
-				if (fd.Name.Equals ("inventory") && fdType.IsArray) {
-					foreach (FieldDefinition fd2 in fdType.Resolve().Fields) {
-						TypeReference fd2Type = fd2.FieldType;
-						if (fd2Type.FullName.Equals ("System.Int32")) {
-							Console.WriteLine ("Renaming inventory field field -> count");
-							NameNormalizer.setName (fd2, "count");
-						}
-						if (fd2Type.FullName.Equals ("ItemValue")) {
-							Console.WriteLine ("Renaming inventory field field -> itemValue");
-							NameNormalizer.setName (fd2, "itemValue");
-						}
-					}
-					Console.WriteLine ("Renaming inventory field class -> InventoryField");
-					NameNormalizer.setName (fdType.Resolve (), "InventoryField");
-				}
-			}
-
-			foreach (FieldDefinition fd in mainModule.GetType ("AdminTools").Fields) {
-				TypeReference fdType = fd.FieldType;
-				if (fdType.FullName.Contains ("List") && fdType.FullName.Contains ("AdminToolsCommandPermissions")) {
-					Console.WriteLine ("Renaming and making public admin tools field -> commandPermissions");
-					fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public;
-					NameNormalizer.setName (fd, "commandPermissions");
-				}
-			}
-
-			foreach (FieldDefinition fd in mainModule.GetType ("World").Fields) {
-				TypeReference fdType = fd.FieldType;
-				if (fdType.FullName.Equals ("System.UInt64")) {
-					Console.WriteLine ("Renaming world field -> gameTime");
-					NameNormalizer.setName (fd, "gameTime");
-				}
-			}
-
-			foreach (FieldDefinition fd in mainModule.GetType ("GameManager").Fields) {
-				TypeReference fdType = fd.FieldType;
-				if (fdType.FullName.Equals ("ConnectionManager")) {
-					Console.WriteLine ("Renaming and making public GameMananger field -> connectionManager");
-					fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public;
-					NameNormalizer.setName (fd, "connectionManager");
-				}
-			}
-
-			foreach (FieldDefinition fd in mainModule.GetType ("ConnectionManager").Fields) {
-				TypeReference fdType = fd.FieldType;
-				if (fdType.FullName.Equals ("GameManager")) {
-					Console.WriteLine ("Renaming and making public ConnectionManager field -> gameManager");
-					fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public;
-					NameNormalizer.setName (fd, "gameManager");
-				}
-				if (fdType.FullName.Contains ("Dictionary") && fdType.FullName.Contains ("ClientInfo")) {
-					Console.WriteLine ("Renaming and making public ConnectionManager field -> connectedClients");
-					fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public;
-					NameNormalizer.setName (fd, "connectedClients");
-				}
-				if (fdType.FullName.Contains ("Dictionary") && fdType.FullName.Contains ("System.Int32,System.Int32")) {
-					Console.WriteLine ("Renaming and making public ConnectionManager field -> mapClientToEntity");
-					fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public;
-					NameNormalizer.setName (fd, "mapClientToEntity");
-				}
-			}
-
-			string consoleTypeName = string.Empty;
-			TypeDefinition typeTelnetServer = mainModule.GetType ("NetTelnetServer");
-			foreach (FieldDefinition fd in typeTelnetServer.Fields) {
-				if (NameNormalizer.makeValidName (fd.FieldType.Name) != null) {
-					Console.WriteLine ("Renaming console class -> ConsoleSdtd");
-					consoleTypeName = fd.FieldType.Name;
-					NameNormalizer.setName (fd.FieldType.Resolve (), "ConsoleSdtd");
-					NameNormalizer.setName (fd, "console");
-				}
-			}
-
-			if (consoleTypeName.Length > 0) {
-				TypeDefinition typeConsole = mainModule.GetType (consoleTypeName);
-				string consoleCommandTypeName = string.Empty;
-				foreach (MethodDefinition md in typeConsole.Methods) {
-					if (!md.IsConstructor) {
-						if (md.Parameters.Count == 3 && md.Parameters [0].ParameterType.Name.Equals ("NetworkPlayer")) {
-							Console.WriteLine ("Renaming console method -> ExecuteCmdFromClient");
-							NameNormalizer.setName (md, "ExecuteCmdFromClient");
-						}
-					}
-				}
-				foreach (FieldDefinition fd in typeConsole.Fields) {
-					TypeReference fdType = fd.FieldType;
-					if (fdType.FullName.Contains ("Generic.List")) {
-						if (fdType.IsGenericInstance) {
-							GenericInstanceType genType = (GenericInstanceType)fdType;
-							TypeReference genRef = genType.GenericArguments [0];
-							if (genRef.Name.Length < 2) {
-								Console.WriteLine ("Renaming console command class -> ConsoleCommand");
-								NameNormalizer.setName (genRef.Resolve (), "ConsoleCommand");
-								NameNormalizer.setName (fd, "commands");
-								consoleCommandTypeName = genRef.Name;
-							}
-						}
-					}
-					if (fdType.FullName.Equals ("GameManager")) {
-						Console.WriteLine ("Renaming and making public console field -> gameManager");
-						fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public;
-						NameNormalizer.setName (fd, "gameManager");
-					}
-				}
-
-				if (consoleCommandTypeName.Length > 0) {
-					foreach (MethodDefinition md in typeConsole.Methods) {
-						if (!md.IsConstructor) {
-							if (md.Parameters.Count == 1 && md.Parameters [0].ParameterType.Name.Equals (consoleCommandTypeName)) {
-								Console.WriteLine ("Renaming console method -> AddCommand");
-								NameNormalizer.setName (md, "AddCommand");
-							}
-							if (md.Parameters.Count == 1 && md.Parameters [0].ParameterType.FullName.Equals ("System.String") && md.ReturnType.FullName.Equals (consoleCommandTypeName)) {
-								Console.WriteLine ("Renaming console method -> getCommand");
-								NameNormalizer.setName (md, "getCommand");
-							}
-						}
-					}
-
-					TypeDefinition typeConsoleCommand = mainModule.GetType (consoleCommandTypeName);
-					foreach (MethodDefinition md in typeConsoleCommand.Methods) {
-						if (!md.IsConstructor) {
-							if (md.Parameters.Count == 1 && md.Parameters [0].ParameterType.Name.Equals (consoleTypeName)) {
-								Console.WriteLine ("Renaming console command method -> Help");
-								NameNormalizer.setName (md, "Help");
-							}
-							if (md.Parameters.Count == 0 && md.ReturnType.Name.Equals ("Int32")) {
-								Console.WriteLine ("Renaming console command method -> Timeout");
-								NameNormalizer.setName (md, "Timeout");
-							}
-							if (md.Parameters.Count == 0 && md.ReturnType.Name.Equals ("String[]")) {
-								Console.WriteLine ("Renaming console command method -> Names");
-								NameNormalizer.setName (md, "Names");
-							}
-							if (md.Parameters.Count == 0 && md.ReturnType.Name.Equals ("String")) {
-								Console.WriteLine ("Renaming console command method -> Description");
-								NameNormalizer.setName (md, "Description");
-							}
-							if (md.Parameters.Count == 1 && md.Parameters [0].ParameterType.IsArray) {
-								Console.WriteLine ("Renaming console command method -> Run");
-								NameNormalizer.setName (md, "Run");
-							}
-						}
-					}
-				}
-			}
-		}
-
 		static void Main (string[] args)
 		{
-			Console.WriteLine ("NamePatcher for 7dtd's Assembly-CSharp.dll [by DerPopo, modified by Alloc] for Dedi build 320404");
+			Console.WriteLine ("NamePatcher for 7dtd's Assembly-CSharp.dll [by DerPopo, modified by Alloc]");
 			if (!TryArgs (args)) {
 				DrawUsage ();
@@ -247,5 +85,5 @@
 
 
-			applyManualPatches (input.MainModule);
+			ManualPatches.applyManualPatches (input.MainModule);
 
 
