Index: /binary-improvements/7dtd-server-fixes/src/API.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/API.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/API.cs	(revision 325)
@@ -1,8 +1,14 @@
-using System;
 using System.Collections.Generic;
 
-namespace AllocsFixes
-{
+namespace AllocsFixes {
 	public class API : IModApi {
+		public void InitMod () {
+			ModEvents.GameAwake.RegisterHandler (GameAwake);
+			ModEvents.GameShutdown.RegisterHandler (GameShutdown);
+			ModEvents.SavePlayerData.RegisterHandler (SavePlayerData);
+			ModEvents.PlayerSpawning.RegisterHandler (PlayerSpawning);
+			ModEvents.PlayerDisconnected.RegisterHandler (PlayerDisconnected);
+			ModEvents.ChatMessage.RegisterHandler (ChatMessage);
+		}
 
 		public void GameAwake () {
@@ -13,5 +19,5 @@
 			StateManager.Shutdown ();
 		}
-		
+
 		public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) {
 			PlayerDataStuff.GM_SavePlayerData (_cInfo, _playerDataFile);
@@ -21,22 +27,13 @@
 			AllocsLogFunctions.RequestToSpawnPlayer (_cInfo, _chunkViewDim, _playerProfile);
 		}
-		
+
 		public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
 			AllocsLogFunctions.PlayerDisconnected (_cInfo, _bShutdown);
 		}
 
-		public bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, bool _localizeMain, List<int> _recipientEntityIds) {
+		public bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName,
+			bool _localizeMain, List<int> _recipientEntityIds) {
 			return ChatHookExample.Hook (_cInfo, _type, _msg, _mainName);
-		}
-
-		public void InitMod () {
-			ModEvents.GameAwake.RegisterHandler (GameAwake);
-			ModEvents.GameShutdown.RegisterHandler (GameShutdown);
-			ModEvents.SavePlayerData.RegisterHandler (SavePlayerData);
-			ModEvents.PlayerSpawning.RegisterHandler (PlayerSpawning);
-			ModEvents.PlayerDisconnected.RegisterHandler (PlayerDisconnected);
-			ModEvents.ChatMessage.RegisterHandler (ChatMessage);
 		}
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs	(revision 325)
@@ -1,24 +1,19 @@
+using System;
 using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using UnityEngine;
 
-namespace AllocsFixes
-{
-	public class AllocsLogFunctions
-	{
-		public static void RequestToSpawnPlayer (ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile)
-		{
+namespace AllocsFixes {
+	public class AllocsLogFunctions {
+		public static void RequestToSpawnPlayer (ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile) {
 			try {
 				Log.Out ("Player connected" +
-					", entityid=" + _cInfo.entityId +
-					", name=" + _cInfo.playerName +
-					", steamid=" + _cInfo.playerId +
-					", steamOwner=" + _cInfo.ownerId +
-					", ip=" + _cInfo.ip
+				         ", entityid=" + _cInfo.entityId +
+				         ", name=" + _cInfo.playerName +
+				         ", steamid=" + _cInfo.playerId +
+				         ", steamOwner=" + _cInfo.ownerId +
+				         ", ip=" + _cInfo.ip
 				);
 
 				PersistentContainer.Instance.Players [_cInfo.playerId, true].SetOnline (_cInfo);
-				PersistentData.PersistentContainer.Instance.Save ();
+				PersistentContainer.Instance.Save ();
 			} catch (Exception e) {
 				Log.Out ("Error in AllocsLogFunctions.RequestToSpawnPlayer: " + e);
@@ -26,6 +21,5 @@
 		}
 
-		public static void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown)
-		{
+		public static void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
 			try {
 				Player p = PersistentContainer.Instance.Players [_cInfo.playerId, true];
@@ -35,5 +29,6 @@
 					Log.Out ("Disconnected player not found in client list...");
 				}
-				PersistentData.PersistentContainer.Instance.Save ();
+
+				PersistentContainer.Instance.Save ();
 			} catch (Exception e) {
 				Log.Out ("Error in AllocsLogFunctions.PlayerDisconnected: " + e);
Index: /binary-improvements/7dtd-server-fixes/src/AllocsUtils.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/AllocsUtils.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/AllocsUtils.cs	(revision 325)
@@ -1,13 +1,10 @@
-using System;
+using UnityEngine;
 
-namespace AllocsFixes
-{
+namespace AllocsFixes {
 	public static class AllocsUtils {
-
-		public static string ColorToHex (UnityEngine.Color _color) {
-			return string.Format ("{0:X02}{1:X02}{2:X02}", (int)(_color.r * 255), (int)(_color.g * 255), (int)(_color.b * 255));
+		public static string ColorToHex (Color _color) {
+			return string.Format ("{0:X02}{1:X02}{2:X02}", (int) (_color.r * 255), (int) (_color.g * 255),
+				(int) (_color.b * 255));
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs	(revision 325)
@@ -1,16 +1,15 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
 
 // Information about this assembly is defined by the following attributes. 
 // Change them to the values specific to your project.
 
-[assembly: AssemblyTitle("7dtd-server-fixes")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("Alloc")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
+[assembly: AssemblyTitle ("7dtd-server-fixes")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("")]
+[assembly: AssemblyCopyright ("Alloc")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
 
 // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
@@ -18,5 +17,5 @@
 // and "{Major}.{Minor}.{Build}.*" will update just the revision.
 
-[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyVersion ("0.0.0.0")]
 
 // The following attributes are used to specify the signing key for the assembly, 
@@ -25,3 +24,2 @@
 //[assembly: AssemblyDelaySign(false)]
 //[assembly: AssemblyKeyFile("")]
-
Index: /binary-improvements/7dtd-server-fixes/src/BlockingQueue.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/BlockingQueue.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/BlockingQueue.cs	(revision 325)
@@ -1,15 +1,11 @@
-using System;
 using System.Collections.Generic;
 using System.Threading;
 
-namespace AllocsFixes
-{
-	public class BlockingQueue<T>
-	{
-		private bool closing = false;
-		private Queue<T> queue = new Queue<T> ();
+namespace AllocsFixes {
+	public class BlockingQueue<T> {
+		private readonly Queue<T> queue = new Queue<T> ();
+		private bool closing;
 
-		public void Enqueue (T item)
-		{
+		public void Enqueue (T item) {
 			lock (queue) {
 				queue.Enqueue (item);
@@ -18,19 +14,19 @@
 		}
 
-		public T Dequeue ()
-		{
+		public T Dequeue () {
 			lock (queue) {
 				while (queue.Count == 0) {
 					if (closing) {
-						return default(T);
+						return default (T);
 					}
+
 					Monitor.Wait (queue);
 				}
+
 				return queue.Dequeue ();
 			}
 		}
 
-		public void Close ()
-		{
+		public void Close () {
 			lock (queue) {
 				closing = true;
@@ -38,6 +34,4 @@
 			}
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/ChatHookExample.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/ChatHookExample.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/ChatHookExample.cs	(revision 325)
@@ -1,8 +1,6 @@
-using System;
-
-namespace AllocsFixes
-{
+namespace AllocsFixes {
 	public class ChatHookExample {
-		private const string ANSWER = "     [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]";
+		private const string ANSWER =
+			"     [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]";
 
 		public static bool Hook (ClientInfo _cInfo, EChatType _type, string _message, string _playerName) {
@@ -11,8 +9,9 @@
 					if (_cInfo != null) {
 						Log.Out ("Sent chat hook reply to {0}", _cInfo.playerId);
-						_cInfo.SendPackage (new NetPackageChat(EChatType.Whisper, -1, ANSWER, "", false, null));
+						_cInfo.SendPackage (new NetPackageChat (EChatType.Whisper, -1, ANSWER, "", false, null));
 					} else {
 						Log.Error ("ChatHookExample: Argument _cInfo null on message: {0}", _message);
 					}
+
 					return false;
 				}
@@ -21,5 +20,4 @@
 			return true;
 		}
-
 	}
 }
Index: /binary-improvements/7dtd-server-fixes/src/FileCache/AbstractCache.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/FileCache/AbstractCache.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/FileCache/AbstractCache.cs	(revision 325)
@@ -1,8 +1,5 @@
 namespace AllocsFixes.FileCache {
-    public abstract class AbstractCache {
-        public AbstractCache () {
-        }
-
-        public abstract byte[] GetFileContent (string filename);
-    }
+	public abstract class AbstractCache {
+		public abstract byte[] GetFileContent (string filename);
+	}
 }
Index: /binary-improvements/7dtd-server-fixes/src/FileCache/DirectAccess.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/FileCache/DirectAccess.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/FileCache/DirectAccess.cs	(revision 325)
@@ -1,18 +1,9 @@
 using System;
-using System.Collections.Generic;
 using System.IO;
 
-namespace AllocsFixes.FileCache
-{
+namespace AllocsFixes.FileCache {
 	// Not caching at all, simply reading from disk on each request
-	public class DirectAccess : AbstractCache
-	{
-
-		public DirectAccess ()
-		{
-		}
-
-		public override byte[] GetFileContent (string filename)
-		{
+	public class DirectAccess : AbstractCache {
+		public override byte[] GetFileContent (string filename) {
 			try {
 				if (!File.Exists (filename)) {
@@ -24,8 +15,7 @@
 				Log.Out ("Error in DirectAccess.GetFileContent: " + e);
 			}
+
 			return null;
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/FileCache/MapTileCache.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/FileCache/MapTileCache.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/FileCache/MapTileCache.cs	(revision 325)
@@ -2,23 +2,14 @@
 using System.IO;
 using UnityEngine;
+using Object = UnityEngine.Object;
 
-namespace AllocsFixes.FileCache
-{
+namespace AllocsFixes.FileCache {
 	// Special "cache" for map tile folder as both map rendering and webserver access files in there.
 	// Only map rendering tiles are cached. Writing is done by WriteThrough.
-	public class MapTileCache : AbstractCache
-	{
-		private struct CurrentZoomFile
-		{
-			public string filename;
-			public byte[] data;
-		}
-
+	public class MapTileCache : AbstractCache {
+		private readonly byte[] transparentTile;
 		private CurrentZoomFile[] cache;
 
-		private byte[] transparentTile;
-
-		public MapTileCache (int _tileSize)
-		{
+		public MapTileCache (int _tileSize) {
 			Texture2D tex = new Texture2D (_tileSize, _tileSize);
 			Color nullColor = new Color (0, 0, 0, 0);
@@ -28,15 +19,14 @@
 				}
 			}
+
 			transparentTile = tex.EncodeToPNG ();
-			UnityEngine.Object.Destroy (tex);
+			Object.Destroy (tex);
 		}
 
-		public void SetZoomCount (int count)
-		{
+		public void SetZoomCount (int count) {
 			cache = new CurrentZoomFile[count];
 		}
 
-		public byte[] LoadTile (int zoomlevel, string filename)
-		{
+		public byte[] LoadTile (int zoomlevel, string filename) {
 			try {
 				lock (cache) {
@@ -51,4 +41,5 @@
 						cache [zoomlevel].data = File.ReadAllBytes (filename);
 					}
+
 					return cache [zoomlevel].data;
 				}
@@ -56,9 +47,9 @@
 				Log.Out ("Error in MapTileCache.LoadTile: " + e);
 			}
+
 			return null;
 		}
 
-		public void SaveTile (int zoomlevel, byte[] content)
-		{
+		public void SaveTile (int zoomlevel, byte[] content) {
 			try {
 				lock (cache) {
@@ -73,11 +64,11 @@
 		}
 
-		public override byte[] GetFileContent (string filename)
-		{
+		public override byte[] GetFileContent (string filename) {
 			try {
 				lock (cache) {
 					foreach (CurrentZoomFile czf in cache) {
-						if (czf.filename != null && czf.filename.Equals (filename))
+						if (czf.filename != null && czf.filename.Equals (filename)) {
 							return czf.data;
+						}
 					}
 
@@ -85,4 +76,5 @@
 						return transparentTile;
 					}
+
 					return File.ReadAllBytes (filename);
 				}
@@ -90,8 +82,12 @@
 				Log.Out ("Error in MapTileCache.GetFileContent: " + e);
 			}
+
 			return null;
 		}
 
+		private struct CurrentZoomFile {
+			public string filename;
+			public byte[] data;
+		}
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/FileCache/SimpleCache.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/FileCache/SimpleCache.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/FileCache/SimpleCache.cs	(revision 325)
@@ -3,18 +3,10 @@
 using System.IO;
 
-namespace AllocsFixes.FileCache
-{
+namespace AllocsFixes.FileCache {
 	// Caching all files, useful for completely static folders only
-	public class SimpleCache : AbstractCache
-	{
+	public class SimpleCache : AbstractCache {
+		private readonly Dictionary<string, byte[]> fileCache = new Dictionary<string, byte[]> ();
 
-		private Dictionary<string, byte[]> fileCache = new Dictionary<string, byte[]> ();
-
-		public SimpleCache ()
-		{
-		}
-
-		public override byte[] GetFileContent (string filename)
-		{
+		public override byte[] GetFileContent (string filename) {
 			try {
 				lock (fileCache) {
@@ -32,8 +24,7 @@
 				Log.Out ("Error in SimpleCache.GetFileContent: " + e);
 			}
+
 			return null;
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/JSONArray.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/JSONArray.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/JSONArray.cs	(revision 325)
@@ -1,11 +1,8 @@
-using System;
 using System.Collections.Generic;
 using System.Text;
 
-namespace AllocsFixes.JSON
-{
-	public class JSONArray : JSONNode
-	{
-		private List<JSONNode> nodes = new List<JSONNode> ();
+namespace AllocsFixes.JSON {
+	public class JSONArray : JSONNode {
+		private readonly List<JSONNode> nodes = new List<JSONNode> ();
 
 		public JSONNode this [int index] {
@@ -18,31 +15,38 @@
 		}
 
-		public void Add (JSONNode node)
-		{
+		public void Add (JSONNode node) {
 			nodes.Add (node);
 		}
 
-		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0)
-		{
+		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0) {
 			stringBuilder.Append ("[");
-			if (prettyPrint)
+			if (prettyPrint) {
 				stringBuilder.Append ('\n');
+			}
+
 			foreach (JSONNode n in nodes) {
-				if (prettyPrint)
-					stringBuilder.Append (new String ('\t', currentLevel + 1));
+				if (prettyPrint) {
+					stringBuilder.Append (new string ('\t', currentLevel + 1));
+				}
+
 				n.ToString (stringBuilder, prettyPrint, currentLevel + 1);
 				stringBuilder.Append (",");
-				if (prettyPrint)
+				if (prettyPrint) {
 					stringBuilder.Append ('\n');
+				}
 			}
-			if (nodes.Count > 0)
+
+			if (nodes.Count > 0) {
 				stringBuilder.Remove (stringBuilder.Length - (prettyPrint ? 2 : 1), 1);
-			if (prettyPrint)
-				stringBuilder.Append (new String ('\t', currentLevel));
+			}
+
+			if (prettyPrint) {
+				stringBuilder.Append (new string ('\t', currentLevel));
+			}
+
 			stringBuilder.Append ("]");
 		}
 
-		public static JSONArray Parse (string json, ref int offset)
-		{
+		public static JSONArray Parse (string json, ref int offset) {
 			//Log.Out ("ParseArray enter (" + offset + ")");
 			JSONArray arr = new JSONArray ();
@@ -58,9 +62,13 @@
 							nextElemAllowed = true;
 							offset++;
-						} else
-							throw new MalformedJSONException ("Could not parse array, found a comma without a value first");
+						} else {
+							throw new MalformedJSONException (
+								"Could not parse array, found a comma without a value first");
+						}
+
 						break;
 					case ']':
 						offset++;
+
 						//Log.Out ("JSON:Parsed Array: " + arr.ToString ());
 						return arr;
@@ -72,6 +80,4 @@
 			}
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/JSONBoolean.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/JSONBoolean.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/JSONBoolean.cs	(revision 325)
@@ -1,28 +1,21 @@
-using System;
 using System.Text;
 
-namespace AllocsFixes.JSON
-{
-	public class JSONBoolean : JSONValue
-	{
-		private bool value;
+namespace AllocsFixes.JSON {
+	public class JSONBoolean : JSONValue {
+		private readonly bool value;
 
-		public JSONBoolean (bool value)
-		{
+		public JSONBoolean (bool value) {
 			this.value = value;
 		}
 
-		public bool GetBool ()
-		{
+		public bool GetBool () {
 			return value;
 		}
 
-		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0)
-		{
+		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0) {
 			stringBuilder.Append (value ? "true" : "false");
 		}
 
-		public static JSONBoolean Parse (string json, ref int offset)
-		{
+		public static JSONBoolean Parse (string json, ref int offset) {
 			//Log.Out ("ParseBool enter (" + offset + ")");
 
@@ -31,14 +24,14 @@
 				offset += 4;
 				return new JSONBoolean (true);
-			} else if (json.Substring (offset, 5).Equals ("false")) {
+			}
+
+			if (json.Substring (offset, 5).Equals ("false")) {
 				//Log.Out ("JSON:Parsed Bool: false");
 				offset += 5;
 				return new JSONBoolean (false);
-			} else {
-				throw new MalformedJSONException ("No valid boolean found");
 			}
+
+			throw new MalformedJSONException ("No valid boolean found");
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/JSONNode.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/JSONNode.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/JSONNode.cs	(revision 325)
@@ -1,10 +1,7 @@
-using System;
 using System.Text;
 
-namespace AllocsFixes.JSON
-{
-	public abstract class JSONNode
-	{
-		public abstract void ToString(StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0);
+namespace AllocsFixes.JSON {
+	public abstract class JSONNode {
+		public abstract void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0);
 
 		public override string ToString () {
Index: /binary-improvements/7dtd-server-fixes/src/JSON/JSONNull.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/JSONNull.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/JSONNull.cs	(revision 325)
@@ -1,20 +1,11 @@
-using System;
 using System.Text;
 
-namespace AllocsFixes.JSON
-{
-	public class JSONNull : JSONValue
-	{
-		public JSONNull ()
-		{
-		}
-
-		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0)
-		{
+namespace AllocsFixes.JSON {
+	public class JSONNull : JSONValue {
+		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0) {
 			stringBuilder.Append ("null");
 		}
 
-		public static JSONNull Parse (string json, ref int offset)
-		{
+		public static JSONNull Parse (string json, ref int offset) {
 			//Log.Out ("ParseNull enter (" + offset + ")");
 
@@ -23,10 +14,8 @@
 				offset += 4;
 				return new JSONNull ();
-			} else {
-				throw new MalformedJSONException ("No valid null value found");
 			}
+
+			throw new MalformedJSONException ("No valid null value found");
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/JSONNumber.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/JSONNumber.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/JSONNumber.cs	(revision 325)
@@ -2,32 +2,25 @@
 using System.Text;
 
-namespace AllocsFixes.JSON
-{
-	public class JSONNumber : JSONValue
-	{
-		private double value;
+namespace AllocsFixes.JSON {
+	public class JSONNumber : JSONValue {
+		private readonly double value;
 
-		public JSONNumber (double value)
-		{
+		public JSONNumber (double value) {
 			this.value = value;
 		}
 
-		public double GetDouble ()
-		{
+		public double GetDouble () {
 			return value;
 		}
 
-		public int GetInt ()
-		{
-			return (int)Math.Round(value);
+		public int GetInt () {
+			return (int) Math.Round (value);
 		}
 
-		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0)
-		{
+		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0) {
 			stringBuilder.Append (value.ToCultureInvariantString ());
 		}
 
-		public static JSONNumber Parse (string json, ref int offset)
-		{
+		public static JSONNumber Parse (string json, ref int offset) {
 			//Log.Out ("ParseNumber enter (" + offset + ")");
 			StringBuilder sbNum = new StringBuilder ();
@@ -37,48 +30,56 @@
 			while (offset < json.Length) {
 				if (json [offset] >= '0' && json [offset] <= '9') {
-					if (hasExp)
+					if (hasExp) {
 						sbExp.Append (json [offset]);
-					else
+					} else {
 						sbNum.Append (json [offset]);
+					}
 				} else if (json [offset] == '.') {
 					if (hasExp) {
 						throw new MalformedJSONException ("Decimal separator in exponent");
+					}
+
+					if (hasDec) {
+						throw new MalformedJSONException ("Multiple decimal separators in number found");
+					}
+
+					if (sbNum.Length == 0) {
+						throw new MalformedJSONException ("No leading digits before decimal separator found");
+					}
+
+					sbNum.Append ('.');
+					hasDec = true;
+				} else if (json [offset] == '-') {
+					if (hasExp) {
+						if (sbExp.Length > 0) {
+							throw new MalformedJSONException ("Negative sign in exponent after digits");
+						}
+
+						sbExp.Append (json [offset]);
 					} else {
-						if (hasDec)
-							throw new MalformedJSONException ("Multiple decimal separators in number found");
-						else if (sbNum.Length == 0) {
-							throw new MalformedJSONException ("No leading digits before decimal separator found");
-						} else {
-							sbNum.Append ('.');
-							hasDec = true;
+						if (sbNum.Length > 0) {
+							throw new MalformedJSONException ("Negative sign in mantissa after digits");
 						}
-					}
-				} else	if (json [offset] == '-') {
-					if (hasExp) {
-						if (sbExp.Length > 0)
-							throw new MalformedJSONException ("Negative sign in exponent after digits");
-						else
-							sbExp.Append (json [offset]);
-					} else {
-						if (sbNum.Length > 0)
-							throw new MalformedJSONException ("Negative sign in mantissa after digits");
-						else
-							sbNum.Append (json [offset]);
+
+						sbNum.Append (json [offset]);
 					}
 				} else if (json [offset] == 'e' || json [offset] == 'E') {
-					if (hasExp)
+					if (hasExp) {
 						throw new MalformedJSONException ("Multiple exponential markers in number found");
-					else if (sbNum.Length == 0) {
+					}
+
+					if (sbNum.Length == 0) {
 						throw new MalformedJSONException ("No leading digits before exponential marker found");
-					} else {
-						sbExp = new StringBuilder ();
-						hasExp = true;
 					}
+
+					sbExp = new StringBuilder ();
+					hasExp = true;
 				} else if (json [offset] == '+') {
 					if (hasExp) {
-						if (sbExp.Length > 0)
+						if (sbExp.Length > 0) {
 							throw new MalformedJSONException ("Positive sign in exponent after digits");
-						else
-							sbExp.Append (json [offset]);
+						}
+
+						sbExp.Append (json [offset]);
 					} else {
 						throw new MalformedJSONException ("Positive sign in mantissa found");
@@ -86,6 +87,6 @@
 				} else {
 					double number;
-					if (!StringParsers.TryParseDouble(sbNum.ToString (), out number)) {
-						throw new MalformedJSONException ("Mantissa is not a valid decimal (\"" + sbNum.ToString () + "\")");
+					if (!StringParsers.TryParseDouble (sbNum.ToString (), out number)) {
+						throw new MalformedJSONException ("Mantissa is not a valid decimal (\"" + sbNum + "\")");
 					}
 
@@ -93,5 +94,5 @@
 						int exp;
 						if (!int.TryParse (sbExp.ToString (), out exp)) {
-							throw new MalformedJSONException ("Exponent is not a valid integer (\"" + sbExp.ToString () + "\")");
+							throw new MalformedJSONException ("Exponent is not a valid integer (\"" + sbExp + "\")");
 						}
 
@@ -102,10 +103,10 @@
 					return new JSONNumber (number);
 				}
+
 				offset++;
 			}
+
 			throw new MalformedJSONException ("End of JSON reached before parsing number finished");
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/JSONObject.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/JSONObject.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/JSONObject.cs	(revision 325)
@@ -1,11 +1,8 @@
-using System;
 using System.Collections.Generic;
 using System.Text;
 
-namespace AllocsFixes.JSON
-{
-	public class JSONObject : JSONNode
-	{
-		private Dictionary<string, JSONNode> nodes = new Dictionary<string, JSONNode> ();
+namespace AllocsFixes.JSON {
+	public class JSONObject : JSONNode {
+		private readonly Dictionary<string, JSONNode> nodes = new Dictionary<string, JSONNode> ();
 
 		public JSONNode this [string name] {
@@ -22,39 +19,47 @@
 		}
 
-		public bool ContainsKey (string name)
-		{
+		public bool ContainsKey (string name) {
 			return nodes.ContainsKey (name);
 		}
 
-		public void Add (string name, JSONNode node)
-		{
+		public void Add (string name, JSONNode node) {
 			nodes.Add (name, node);
 		}
 
-		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0)
-		{
+		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0) {
 			stringBuilder.Append ("{");
-			if (prettyPrint)
+			if (prettyPrint) {
 				stringBuilder.Append ('\n');
+			}
+
 			foreach (KeyValuePair<string, JSONNode> kvp in nodes) {
-				if (prettyPrint)
-					stringBuilder.Append (new String ('\t', currentLevel + 1));
-				stringBuilder.Append (String.Format ("\"{0}\":", kvp.Key));
-				if (prettyPrint)
+				if (prettyPrint) {
+					stringBuilder.Append (new string ('\t', currentLevel + 1));
+				}
+
+				stringBuilder.Append (string.Format ("\"{0}\":", kvp.Key));
+				if (prettyPrint) {
 					stringBuilder.Append (" ");
+				}
+
 				kvp.Value.ToString (stringBuilder, prettyPrint, currentLevel + 1);
 				stringBuilder.Append (",");
-				if (prettyPrint)
+				if (prettyPrint) {
 					stringBuilder.Append ('\n');
+				}
 			}
-			if (nodes.Count > 0)
+
+			if (nodes.Count > 0) {
 				stringBuilder.Remove (stringBuilder.Length - (prettyPrint ? 2 : 1), 1);
-			if (prettyPrint)
-				stringBuilder.Append (new String ('\t', currentLevel));
+			}
+
+			if (prettyPrint) {
+				stringBuilder.Append (new string ('\t', currentLevel));
+			}
+
 			stringBuilder.Append ("}");
 		}
 
-		public static JSONObject Parse (string json, ref int offset)
-		{
+		public static JSONObject Parse (string json, ref int offset) {
 			//Log.Out ("ParseObject enter (" + offset + ")");
 			JSONObject obj = new JSONObject ();
@@ -70,6 +75,8 @@
 							Parser.SkipWhitespace (json, ref offset);
 							if (json [offset] != ':') {
-								throw new MalformedJSONException ("Could not parse object, missing colon (\":\") after key");
+								throw new MalformedJSONException (
+									"Could not parse object, missing colon (\":\") after key");
 							}
+
 							offset++;
 							JSONNode val = Parser.ParseInternal (json, ref offset);
@@ -77,6 +84,8 @@
 							nextElemAllowed = false;
 						} else {
-							throw new MalformedJSONException ("Could not parse object, found new key without a separating comma");
+							throw new MalformedJSONException (
+								"Could not parse object, found new key without a separating comma");
 						}
+
 						break;
 					case ',':
@@ -84,9 +93,13 @@
 							nextElemAllowed = true;
 							offset++;
-						} else
-							throw new MalformedJSONException ("Could not parse object, found a comma without a key/value pair first");
+						} else {
+							throw new MalformedJSONException (
+								"Could not parse object, found a comma without a key/value pair first");
+						}
+
 						break;
 					case '}':
 						offset++;
+
 						//Log.Out ("JSON:Parsed Object: " + obj.ToString ());
 						return obj;
@@ -94,6 +107,4 @@
 			}
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/JSONString.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/JSONString.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/JSONString.cs	(revision 325)
@@ -1,23 +1,17 @@
-using System;
 using System.Text;
 
-namespace AllocsFixes.JSON
-{
-	public class JSONString : JSONValue
-	{
-		private string value;
+namespace AllocsFixes.JSON {
+	public class JSONString : JSONValue {
+		private readonly string value;
 
-		public JSONString (string value)
-		{
+		public JSONString (string value) {
 			this.value = value;
 		}
 
-		public string GetString ()
-		{
+		public string GetString () {
 			return value;
 		}
 
-		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0)
-		{
+		public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, int currentLevel = 0) {
 			if (value == null || value.Length == 0) {
 				stringBuilder.Append ("\"\"");
@@ -27,6 +21,5 @@
 			int len = value.Length;
 
-			stringBuilder.EnsureCapacity (stringBuilder.Length + 2*len);
-			String t;
+			stringBuilder.EnsureCapacity (stringBuilder.Length + 2 * len);
 
 			stringBuilder.Append ('"');
@@ -36,4 +29,5 @@
 					case '\\':
 					case '"':
+
 //					case '/':
 						stringBuilder.Append ('\\');
@@ -58,8 +52,9 @@
 						if (c < ' ') {
 							stringBuilder.Append ("\\u");
-							stringBuilder.Append (((int)c).ToString ("X4"));
+							stringBuilder.Append (((int) c).ToString ("X4"));
 						} else {
 							stringBuilder.Append (c);
 						}
+
 						break;
 				}
@@ -69,6 +64,5 @@
 		}
 
-		public static JSONString Parse (string json, ref int offset)
-		{
+		public static JSONString Parse (string json, ref int offset) {
 			//Log.Out ("ParseString enter (" + offset + ")");
 			StringBuilder sb = new StringBuilder ();
@@ -103,8 +97,10 @@
 								break;
 						}
+
 						offset++;
 						break;
 					case '"':
 						offset++;
+
 						//Log.Out ("JSON:Parsed String: " + sb.ToString ());
 						return new JSONString (sb.ToString ());
@@ -115,8 +111,7 @@
 				}
 			}
+
 			throw new MalformedJSONException ("End of JSON reached before parsing string finished");
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/JSONValue.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/JSONValue.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/JSONValue.cs	(revision 325)
@@ -1,8 +1,4 @@
-﻿using System;
-
-namespace AllocsFixes.JSON
-{
+﻿namespace AllocsFixes.JSON {
 	public abstract class JSONValue : JSONNode {
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/MalformedJSONException.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/MalformedJSONException.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/MalformedJSONException.cs	(revision 325)
@@ -2,24 +2,17 @@
 using System.Runtime.Serialization;
 
-namespace AllocsFixes.JSON
-{
-	public class MalformedJSONException : ApplicationException
-	{
-		public MalformedJSONException ()
-		{
+namespace AllocsFixes.JSON {
+	public class MalformedJSONException : ApplicationException {
+		public MalformedJSONException () {
 		}
 
-		public MalformedJSONException (string message) : base(message)
-		{
+		public MalformedJSONException (string message) : base (message) {
 		}
 
-		public MalformedJSONException (string message, System.Exception inner) : base(message, inner)
-		{
+		public MalformedJSONException (string message, Exception inner) : base (message, inner) {
 		}
- 
-		protected MalformedJSONException (SerializationInfo info, StreamingContext context) : base(info, context)
-		{
+
+		protected MalformedJSONException (SerializationInfo info, StreamingContext context) : base (info, context) {
 		}
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/JSON/Parser.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/JSON/Parser.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/JSON/Parser.cs	(revision 325)
@@ -1,19 +1,12 @@
-using System;
-using System.Text;
-
-namespace AllocsFixes.JSON
-{
-	public class Parser
-	{
-
-		public static JSONNode Parse (string json)
-		{
+namespace AllocsFixes.JSON {
+	public class Parser {
+		public static JSONNode Parse (string json) {
 			int offset = 0;
 			return ParseInternal (json, ref offset);
 		}
 
-		public static JSONNode ParseInternal (string json, ref int offset)
-		{
+		public static JSONNode ParseInternal (string json, ref int offset) {
 			SkipWhitespace (json, ref offset);
+
 			//Log.Out ("ParseInternal (" + offset + "): Decide on: '" + json [offset] + "'");
 			switch (json [offset]) {
@@ -34,6 +27,5 @@
 		}
 
-		public static void SkipWhitespace (string json, ref int offset)
-		{
+		public static void SkipWhitespace (string json, ref int offset) {
 			//Log.Out ("SkipWhitespace (" + offset + "): '" + json [offset] + "'");
 			while (offset < json.Length) {
@@ -49,9 +41,7 @@
 				}
 			}
+
 			throw new MalformedJSONException ("End of JSON reached before parsing finished");
 		}
-
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/LandClaimList.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/LandClaimList.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/LandClaimList.cs	(revision 325)
@@ -1,9 +1,7 @@
 using System;
 using System.Collections.Generic;
-
 using AllocsFixes.PersistentData;
 
-namespace AllocsFixes
-{
+namespace AllocsFixes {
 	public class LandClaimList {
 		public delegate bool OwnerFilter (Player owner);
@@ -11,10 +9,12 @@
 		public delegate bool PositionFilter (Vector3i position);
 
-		public static Dictionary<Player, List<Vector3i>> GetLandClaims (OwnerFilter[] _ownerFilters, PositionFilter[] _positionFilters) {
+		public static Dictionary<Player, List<Vector3i>> GetLandClaims (OwnerFilter[] _ownerFilters,
+			PositionFilter[] _positionFilters) {
 			Dictionary<Vector3i, PersistentPlayerData> d = GameManager.Instance.GetPersistentPlayerList ().m_lpBlockMap;
 			Dictionary<Player, List<Vector3i>> result = new Dictionary<Player, List<Vector3i>> ();
 
 			if (d != null) {
-				Dictionary<PersistentPlayerData, List<Vector3i>> owners = new Dictionary<PersistentPlayerData, List<Vector3i>> ();
+				Dictionary<PersistentPlayerData, List<Vector3i>> owners =
+					new Dictionary<PersistentPlayerData, List<Vector3i>> ();
 				foreach (KeyValuePair<Vector3i, PersistentPlayerData> kvp in d) {
 					bool allowed = true;
@@ -27,8 +27,10 @@
 						}
 					}
+
 					if (allowed) {
 						if (!owners.ContainsKey (kvp.Value)) {
 							owners.Add (kvp.Value, new List<Vector3i> ());
 						}
+
 						owners [kvp.Value].Add (kvp.Key);
 					}
@@ -36,5 +38,5 @@
 
 				foreach (KeyValuePair<PersistentPlayerData, List<Vector3i>> kvp in owners) {
-					Player p = PersistentData.PersistentContainer.Instance.Players [kvp.Key.PlayerId, false];
+					Player p = PersistentContainer.Instance.Players [kvp.Key.PlayerId, false];
 					if (p == null) {
 						p = new Player (kvp.Key.PlayerId);
@@ -59,4 +61,5 @@
 				}
 			}
+
 			return result;
 		}
@@ -73,6 +76,4 @@
 			return p => _f1 (p) || _f2 (p);
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/LiveData/Animals.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/LiveData/Animals.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/LiveData/Animals.cs	(revision 325)
@@ -1,15 +1,9 @@
-﻿using System;
-using System.Collections.Generic;
-
-namespace AllocsFixes.LiveData
-{
-	public class Animals : EntityFilterList<EntityAnimal>
-    {
-
+﻿namespace AllocsFixes.LiveData {
+	public class Animals : EntityFilterList<EntityAnimal> {
 		public static readonly Animals Instance = new Animals ();
 
 		protected override EntityAnimal predicate (Entity _e) {
 			if (_e is EntityAnimal) {
-				EntityAnimal ea = (EntityAnimal)_e;
+				EntityAnimal ea = (EntityAnimal) _e;
 
 				if (ea.IsAlive ()) {
@@ -17,8 +11,7 @@
 				}
 			}
+
 			return null;
 		}
-
-    }
+	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/LiveData/EntityFilterList.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/LiveData/EntityFilterList.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/LiveData/EntityFilterList.cs	(revision 325)
@@ -2,8 +2,6 @@
 using System.Collections.Generic;
 
-namespace AllocsFixes.LiveData
-{
-	public abstract class EntityFilterList<T> where T: Entity
-    {
+namespace AllocsFixes.LiveData {
+	public abstract class EntityFilterList<T> where T : Entity {
 		public void Get (List<T> _list) {
 			_list.Clear ();
@@ -18,6 +16,5 @@
 					}
 				}
-			}
-			catch (Exception e) {
+			} catch (Exception e) {
 				Log.Exception (e);
 			}
@@ -35,14 +32,12 @@
 					}
 				}
-			}
-			catch (Exception e) {
+			} catch (Exception e) {
 				Log.Exception (e);
 			}
+
 			return count;
 		}
 
 		protected abstract T predicate (Entity _e);
-
-    }
+	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/LiveData/Hostiles.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/LiveData/Hostiles.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/LiveData/Hostiles.cs	(revision 325)
@@ -1,13 +1,7 @@
-﻿using System;
-using System.Collections.Generic;
-
-namespace AllocsFixes.LiveData
-{
-	public class Hostiles : EntityFilterList<EntityEnemy>
-	{
-
+﻿namespace AllocsFixes.LiveData {
+	public class Hostiles : EntityFilterList<EntityEnemy> {
 		public static readonly Hostiles Instance = new Hostiles ();
 
-		override protected EntityEnemy predicate (Entity _e) {
+		protected override EntityEnemy predicate (Entity _e) {
 			if (_e is EntityEnemy) {
 				if (_e.IsAlive ()) {
@@ -15,8 +9,7 @@
 				}
 			}
+
 			return null;
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/PersistentData/Attributes.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/PersistentData/Attributes.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/PersistentData/Attributes.cs	(revision 325)
@@ -1,22 +1,13 @@
 using System;
-using System.Collections.Generic;
-using System.Runtime.Serialization;
-using System.Text.RegularExpressions;
 
-namespace AllocsFixes.PersistentData
-{
+namespace AllocsFixes.PersistentData {
 	[Serializable]
-	public class Attributes
-	{
+	public class Attributes {
 		private bool hideChatCommands;
 		private String hideChatCommandPrefix;
 
 		public bool HideChatCommands {
-			get {
-				return hideChatCommands;
-			}
-			set {
-				hideChatCommands = value;
-			}
+			get { return hideChatCommands; }
+			set { hideChatCommands = value; }
 		}
 
@@ -26,12 +17,9 @@
 					hideChatCommandPrefix = "";
 				}
+
 				return hideChatCommandPrefix;
 			}
-			set {
-				hideChatCommandPrefix = value;
-			}
+			set { hideChatCommandPrefix = value; }
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/PersistentData/InvItem.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/PersistentData/InvItem.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/PersistentData/InvItem.cs	(revision 325)
@@ -2,6 +2,5 @@
 using System.Runtime.Serialization;
 
-namespace AllocsFixes.PersistentData
-{
+namespace AllocsFixes.PersistentData {
 	[Serializable]
 	public class InvItem {
@@ -26,3 +25,2 @@
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs	(revision 325)
@@ -3,85 +3,85 @@
 
 namespace AllocsFixes.PersistentData {
-    [Serializable]
-    public class Inventory {
-        public List<InvItem> bag;
-        public List<InvItem> belt;
-        public InvItem[] equipment;
+	[Serializable]
+	public class Inventory {
+		public List<InvItem> bag;
+		public List<InvItem> belt;
+		public InvItem[] equipment;
 
-        public Inventory () {
-            bag = new List<InvItem> ();
-            belt = new List<InvItem> ();
-            equipment = null;
-        }
+		public Inventory () {
+			bag = new List<InvItem> ();
+			belt = new List<InvItem> ();
+			equipment = null;
+		}
 
-        public void Update (PlayerDataFile pdf) {
-            lock (this) {
-                //Log.Out ("Updating player inventory - player id: " + pdf.id);
-                ProcessInv (bag, pdf.bag, pdf.id);
-                ProcessInv (belt, pdf.inventory, pdf.id);
-                ProcessEqu (pdf.equipment, pdf.id);
-            }
-        }
+		public void Update (PlayerDataFile pdf) {
+			lock (this) {
+				//Log.Out ("Updating player inventory - player id: " + pdf.id);
+				ProcessInv (bag, pdf.bag, pdf.id);
+				ProcessInv (belt, pdf.inventory, pdf.id);
+				ProcessEqu (pdf.equipment, pdf.id);
+			}
+		}
 
-        private void ProcessInv (List<InvItem> target, ItemStack[] sourceFields, int id) {
-            target.Clear ();
-            for (int i = 0; i < sourceFields.Length; i++) {
-                InvItem item = CreateInvItem (sourceFields [i].itemValue, sourceFields [i].count, id);
-                if (item != null && sourceFields [i].itemValue.Modifications != null) {
-                    ProcessParts (sourceFields [i].itemValue.Modifications, item, id);
-                }
+		private void ProcessInv (List<InvItem> target, ItemStack[] sourceFields, int id) {
+			target.Clear ();
+			for (int i = 0; i < sourceFields.Length; i++) {
+				InvItem item = CreateInvItem (sourceFields [i].itemValue, sourceFields [i].count, id);
+				if (item != null && sourceFields [i].itemValue.Modifications != null) {
+					ProcessParts (sourceFields [i].itemValue.Modifications, item, id);
+				}
 
-                target.Add (item);
-            }
-        }
+				target.Add (item);
+			}
+		}
 
-        private void ProcessEqu (Equipment sourceEquipment, int _playerId) {
-            equipment = new InvItem[sourceEquipment.GetSlotCount ()];
-            for (int i = 0; i < sourceEquipment.GetSlotCount (); i++) {
-                equipment [i] = CreateInvItem (sourceEquipment.GetSlotItem (i), 1, _playerId);
-            }
-        }
+		private void ProcessEqu (Equipment sourceEquipment, int _playerId) {
+			equipment = new InvItem[sourceEquipment.GetSlotCount ()];
+			for (int i = 0; i < sourceEquipment.GetSlotCount (); i++) {
+				equipment [i] = CreateInvItem (sourceEquipment.GetSlotItem (i), 1, _playerId);
+			}
+		}
 
-        private void ProcessParts (ItemValue[] _parts, InvItem _item, int _playerId) {
-            InvItem[] itemParts = new InvItem[_parts.Length];
-            for (int i = 0; i < _parts.Length; i++) {
-                InvItem partItem = CreateInvItem (_parts [i], 1, _playerId);
-                if (partItem != null && _parts [i].Modifications != null) {
-                    ProcessParts (_parts [i].Modifications, partItem, _playerId);
-                }
+		private void ProcessParts (ItemValue[] _parts, InvItem _item, int _playerId) {
+			InvItem[] itemParts = new InvItem[_parts.Length];
+			for (int i = 0; i < _parts.Length; i++) {
+				InvItem partItem = CreateInvItem (_parts [i], 1, _playerId);
+				if (partItem != null && _parts [i].Modifications != null) {
+					ProcessParts (_parts [i].Modifications, partItem, _playerId);
+				}
 
-                itemParts [i] = partItem;
-            }
+				itemParts [i] = partItem;
+			}
 
-            _item.parts = itemParts;
-        }
+			_item.parts = itemParts;
+		}
 
-        private InvItem CreateInvItem (ItemValue _itemValue, int _count, int _playerId) {
-            if (_count > 0 && _itemValue != null && !_itemValue.Equals (ItemValue.None)) {
-                ItemClass itemClass = ItemClass.list [_itemValue.type];
-                int maxAllowed = itemClass.Stacknumber.Value;
-                string name = itemClass.GetItemName ();
+		private InvItem CreateInvItem (ItemValue _itemValue, int _count, int _playerId) {
+			if (_count > 0 && _itemValue != null && !_itemValue.Equals (ItemValue.None)) {
+				ItemClass itemClass = ItemClass.list [_itemValue.type];
+				int maxAllowed = itemClass.Stacknumber.Value;
+				string name = itemClass.GetItemName ();
 
-                if (_count > maxAllowed) {
-                    Log.Out ("Player with ID " + _playerId + " has stack for \"" + name + "\" greater than allowed (" +
-                             _count + " > " + maxAllowed + ")");
-                }
+				if (_count > maxAllowed) {
+					Log.Out ("Player with ID " + _playerId + " has stack for \"" + name + "\" greater than allowed (" +
+					         _count + " > " + maxAllowed + ")");
+				}
 
-                InvItem item = null;
-                if (_itemValue.HasQuality) {
-                    item = new InvItem (name, _count, _itemValue.Quality, _itemValue.MaxUseTimes, _itemValue.UseTimes);
-                } else {
-                    item = new InvItem (name, _count, -1, _itemValue.MaxUseTimes, _itemValue.UseTimes);
-                }
+				InvItem item = null;
+				if (_itemValue.HasQuality) {
+					item = new InvItem (name, _count, _itemValue.Quality, _itemValue.MaxUseTimes, _itemValue.UseTimes);
+				} else {
+					item = new InvItem (name, _count, -1, _itemValue.MaxUseTimes, _itemValue.UseTimes);
+				}
 
-                item.icon = itemClass.GetIconName ();
+				item.icon = itemClass.GetIconName ();
 
-                item.iconcolor = AllocsUtils.ColorToHex (itemClass.GetIconTint ());
+				item.iconcolor = AllocsUtils.ColorToHex (itemClass.GetIconTint ());
 
-                return item;
-            } else {
-                return null;
-            }
-        }
-    }
+				return item;
+			}
+
+			return null;
+		}
+	}
 }
Index: /binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs	(revision 325)
@@ -4,27 +4,26 @@
 using System.Runtime.Serialization.Formatters.Binary;
 
-namespace AllocsFixes.PersistentData
-{
+namespace AllocsFixes.PersistentData {
 	[Serializable]
-	public class PersistentContainer
-	{
+	public class PersistentContainer {
 		private Players players;
-		[OptionalField]
-		private Attributes attributes;
+		[OptionalField] private Attributes attributes;
 
 		public Players Players {
 			get {
-				if (players == null)
+				if (players == null) {
 					players = new Players ();
+				}
+
 				return players;
 			}
 		}
 
-		public Attributes Attributes
-		{
+		public Attributes Attributes {
 			get {
 				if (attributes == null) {
-					attributes = new Attributes();
+					attributes = new Attributes ();
 				}
+
 				return attributes;
 			}
@@ -38,14 +37,13 @@
 					instance = new PersistentContainer ();
 				}
+
 				return instance;
 			}
 		}
 
-		private PersistentContainer ()
-		{
+		private PersistentContainer () {
 		}
 
-		public void Save ()
-		{
+		public void Save () {
 			Stream stream = File.Open (GameUtils.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Create);
 			BinaryFormatter bFormatter = new BinaryFormatter ();
@@ -54,6 +52,5 @@
 		}
 
-		public static bool Load ()
-		{
+		public static bool Load () {
 			if (File.Exists (GameUtils.GetSaveGameDir () + "/AllocsPeristentData.bin")) {
 				try {
@@ -61,5 +58,5 @@
 					Stream stream = File.Open (GameUtils.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Open);
 					BinaryFormatter bFormatter = new BinaryFormatter ();
-					obj = (PersistentContainer)bFormatter.Deserialize (stream);
+					obj = (PersistentContainer) bFormatter.Deserialize (stream);
 					stream.Close ();
 					instance = obj;
@@ -70,8 +67,7 @@
 				}
 			}
+
 			return false;
 		}
-
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs	(revision 325)
@@ -4,36 +4,33 @@
 
 namespace AllocsFixes.PersistentData {
-    [Serializable]
-    public class Player {
-        private readonly string steamId;
-        private int entityId;
-        private string name;
-        private string ip;
-        private long totalPlayTime;
-
-        [OptionalField] private DateTime
-            lastOnline;
-
-        private Inventory inventory;
-
-        [OptionalField] private int
-            lastPositionX, lastPositionY, lastPositionZ;
-
-        [OptionalField] [Obsolete ("experience no longer available, use level and expToNextLevel instead")]
-        private uint experience;
-
-        [OptionalField] private bool chatMuted;
-        [OptionalField] private int maxChatLength;
-        [OptionalField] private string chatColor;
-        [OptionalField] private bool chatName;
-        [OptionalField] private uint expToNextLevel;
-        [OptionalField] private int level;
-
-        [NonSerialized] private ClientInfo
-            clientInfo;
-
-        public string SteamID {
-            get { return steamId; }
-        }
+	[Serializable]
+	public class Player {
+		private readonly string steamId;
+		private int entityId;
+		private string name;
+		private string ip;
+		private long totalPlayTime;
+
+		[OptionalField] private DateTime lastOnline;
+
+		private Inventory inventory;
+
+		[OptionalField] private int lastPositionX, lastPositionY, lastPositionZ;
+
+		[OptionalField] [Obsolete ("experience no longer available, use level and expToNextLevel instead")]
+		private uint experience;
+
+		[OptionalField] private bool chatMuted;
+		[OptionalField] private int maxChatLength;
+		[OptionalField] private string chatColor;
+		[OptionalField] private bool chatName;
+		[OptionalField] private uint expToNextLevel;
+		[OptionalField] private int level;
+
+		[NonSerialized] private ClientInfo clientInfo;
+
+		public string SteamID {
+			get { return steamId; }
+		}
 
         public int EntityID {
@@ -41,177 +38,181 @@
         }
 
-        public string Name {
-            get { return name == null ? string.Empty : name; }
-        }
-
-        public string IP {
-            get { return ip == null ? string.Empty : ip; }
-        }
-
-        public Inventory Inventory {
-            get {
-                if (inventory == null)
-                    inventory = new Inventory ();
-                return inventory;
-            }
-        }
-
-        public bool IsOnline {
-            get { return clientInfo != null; }
-        }
-
-        public ClientInfo ClientInfo {
-            get { return clientInfo; }
-        }
-
-        public EntityPlayer Entity {
-            get {
-                if (IsOnline) {
-                    return GameManager.Instance.World.Players.dict [clientInfo.entityId];
-                } else {
-                    return null;
-                }
-            }
-        }
-
-        public long TotalPlayTime {
-            get {
-                if (IsOnline) {
-                    return totalPlayTime + (long) (DateTime.Now - lastOnline).TotalSeconds;
-                } else {
-                    return totalPlayTime;
-                }
-            }
-        }
-
-        public DateTime LastOnline {
-            get {
-                if (IsOnline)
-                    return DateTime.Now;
-                else
-                    return lastOnline;
-            }
-        }
-
-        public Vector3i LastPosition {
-            get {
-                if (IsOnline)
-                    return new Vector3i (Entity.GetPosition ());
-                else
-                    return new Vector3i (lastPositionX, lastPositionY, lastPositionZ);
-            }
-        }
-
-        public bool LandProtectionActive {
-            get {
-                return GameManager.Instance.World.IsLandProtectionValidForPlayer (GameManager.Instance
-                    .GetPersistentPlayerList ().GetPlayerData (SteamID));
-            }
-        }
-
-        public float LandProtectionMultiplier {
-            get {
-                return GameManager.Instance.World.GetLandProtectionHardnessModifierForPlayer (GameManager.Instance
-                    .GetPersistentPlayerList ().GetPlayerData (SteamID));
-            }
-        }
-
-
-        [Obsolete ("Experience no longer available, use Level instead")]
-        public uint Experience {
-            get { return 0; }
-        }
-
-        public float Level {
-            get {
-                float expForNextLevel =
-                    (int) Math.Min ((Progression.BaseExpToLevel * Mathf.Pow (Progression.ExpMultiplier, level + 1)),
-                        int.MaxValue);
-                float fLevel = level + 1f - ((float) expToNextLevel / expForNextLevel);
-                return fLevel;
-            }
-        }
-
-        public bool IsChatMuted {
-            get { return chatMuted; }
-            set { chatMuted = value; }
-        }
-
-        public int MaxChatLength {
-            get {
-                if (maxChatLength == 0) {
-                    maxChatLength = 255;
-                }
-
-                return maxChatLength;
-            }
-            set { maxChatLength = value; }
-        }
-
-        public string ChatColor {
-            get {
-                if (chatColor == null || chatColor == "") {
-                    chatColor = "";
-                }
-
-                return chatColor;
-            }
-
-            set { chatColor = value; }
-        }
-
-        public bool ChatName {
-            get { return chatName; }
-
-            set { chatName = value; }
-        }
-
-        public void SetOffline () {
-            if (clientInfo != null) {
-                Log.Out ("Player set to offline: " + steamId);
-                lastOnline = DateTime.Now;
-                try {
-                    Vector3i lastPos = new Vector3i (Entity.GetPosition ());
-                    lastPositionX = lastPos.x;
-                    lastPositionY = lastPos.y;
-                    lastPositionZ = lastPos.z;
-                    totalPlayTime += (long) (Time.timeSinceLevelLoad - Entity.CreationTimeSinceLevelLoad);
-                } catch (NullReferenceException) {
-                    Log.Out ("Entity not available. Something seems to be wrong here...");
-                }
-
-                clientInfo = null;
-            }
-        }
-
-        public void SetOnline (ClientInfo ci) {
-            Log.Out ("Player set to online: " + steamId);
-            clientInfo = ci;
+		public string Name {
+			get { return name == null ? string.Empty : name; }
+		}
+
+		public string IP {
+			get { return ip == null ? string.Empty : ip; }
+		}
+
+		public Inventory Inventory {
+			get {
+				if (inventory == null) {
+					inventory = new Inventory ();
+				}
+
+				return inventory;
+			}
+		}
+
+		public bool IsOnline {
+			get { return clientInfo != null; }
+		}
+
+		public ClientInfo ClientInfo {
+			get { return clientInfo; }
+		}
+
+		public EntityPlayer Entity {
+			get {
+				if (IsOnline) {
+					return GameManager.Instance.World.Players.dict [clientInfo.entityId];
+				}
+
+				return null;
+			}
+		}
+
+		public long TotalPlayTime {
+			get {
+				if (IsOnline) {
+					return totalPlayTime + (long) (DateTime.Now - lastOnline).TotalSeconds;
+				}
+
+				return totalPlayTime;
+			}
+		}
+
+		public DateTime LastOnline {
+			get {
+				if (IsOnline) {
+					return DateTime.Now;
+				}
+
+				return lastOnline;
+			}
+		}
+
+		public Vector3i LastPosition {
+			get {
+				if (IsOnline) {
+					return new Vector3i (Entity.GetPosition ());
+				}
+
+				return new Vector3i (lastPositionX, lastPositionY, lastPositionZ);
+			}
+		}
+
+		public bool LandProtectionActive {
+			get {
+				return GameManager.Instance.World.IsLandProtectionValidForPlayer (GameManager.Instance
+					.GetPersistentPlayerList ().GetPlayerData (SteamID));
+			}
+		}
+
+		public float LandProtectionMultiplier {
+			get {
+				return GameManager.Instance.World.GetLandProtectionHardnessModifierForPlayer (GameManager.Instance
+					.GetPersistentPlayerList ().GetPlayerData (SteamID));
+			}
+		}
+
+
+		[Obsolete ("Experience no longer available, use Level instead")]
+		public uint Experience {
+			get { return 0; }
+		}
+
+		public float Level {
+			get {
+				float expForNextLevel =
+					(int) Math.Min (Progression.BaseExpToLevel * Mathf.Pow (Progression.ExpMultiplier, level + 1),
+						int.MaxValue);
+				float fLevel = level + 1f - expToNextLevel / expForNextLevel;
+				return fLevel;
+			}
+		}
+
+		public bool IsChatMuted {
+			get { return chatMuted; }
+			set { chatMuted = value; }
+		}
+
+		public int MaxChatLength {
+			get {
+				if (maxChatLength == 0) {
+					maxChatLength = 255;
+				}
+
+				return maxChatLength;
+			}
+			set { maxChatLength = value; }
+		}
+
+		public string ChatColor {
+			get {
+				if (chatColor == null || chatColor == "") {
+					chatColor = "";
+				}
+
+				return chatColor;
+			}
+
+			set { chatColor = value; }
+		}
+
+		public bool ChatName {
+			get { return chatName; }
+
+			set { chatName = value; }
+		}
+
+		public Player (string steamId) {
+			this.steamId = steamId;
+			inventory = new Inventory ();
+		}
+
+		public void SetOffline () {
+			if (clientInfo != null) {
+				Log.Out ("Player set to offline: " + steamId);
+				lastOnline = DateTime.Now;
+				try {
+					Vector3i lastPos = new Vector3i (Entity.GetPosition ());
+					lastPositionX = lastPos.x;
+					lastPositionY = lastPos.y;
+					lastPositionZ = lastPos.z;
+					totalPlayTime += (long) (Time.timeSinceLevelLoad - Entity.CreationTimeSinceLevelLoad);
+				} catch (NullReferenceException) {
+					Log.Out ("Entity not available. Something seems to be wrong here...");
+				}
+
+				clientInfo = null;
+			}
+		}
+
+		public void SetOnline (ClientInfo ci) {
+			Log.Out ("Player set to online: " + steamId);
+			clientInfo = ci;
             entityId = ci.entityId;
-            name = ci.playerName;
-            ip = ci.ip;
-            lastOnline = DateTime.Now;
-        }
-
-        public void Update (PlayerDataFile _pdf) {
-            UpdateProgression (_pdf);
-            inventory.Update (_pdf);
-        }
-
-        private void UpdateProgression (PlayerDataFile _pdf) {
-            if (_pdf.progressionData.Length > 0) {
-                using (PooledBinaryReader pbr = MemoryPools.poolBinaryReader.AllocSync (false)) {
-                    pbr.SetBaseStream (_pdf.progressionData);
-                    Progression p = Progression.Read (pbr, null);
-                    expToNextLevel = (uint) p.ExpToNextLevel;
-                    level = p.Level;
-                }
-            }
-        }
-
-        public Player (string steamId) {
-            this.steamId = steamId;
-            this.inventory = new Inventory ();
-        }
-    }
+			name = ci.playerName;
+			ip = ci.ip;
+			lastOnline = DateTime.Now;
+		}
+
+		public void Update (PlayerDataFile _pdf) {
+			UpdateProgression (_pdf);
+			inventory.Update (_pdf);
+		}
+
+		private void UpdateProgression (PlayerDataFile _pdf) {
+			if (_pdf.progressionData.Length > 0) {
+				using (PooledBinaryReader pbr = MemoryPools.poolBinaryReader.AllocSync (false)) {
+					pbr.SetBaseStream (_pdf.progressionData);
+					Progression p = Progression.Read (pbr, null);
+					expToNextLevel = (uint) p.ExpToNextLevel;
+					level = p.Level;
+				}
+			}
+		}
+	}
 }
Index: /binary-improvements/7dtd-server-fixes/src/PersistentData/Players.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/PersistentData/Players.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/PersistentData/Players.cs	(revision 325)
@@ -1,12 +1,10 @@
 using System;
 using System.Collections.Generic;
-using System.Runtime.Serialization;
 using System.Text.RegularExpressions;
 
-namespace AllocsFixes.PersistentData
-{
+namespace AllocsFixes.PersistentData {
 	[Serializable]
 	public class Players {
-		private Dictionary<string, Player> players = new Dictionary<string, Player> ();
+		private readonly Dictionary<string, Player> players = new Dictionary<string, Player> ();
 
 		public Player this [string steamId, bool create] {
@@ -14,15 +12,18 @@
 				if (string.IsNullOrEmpty (steamId)) {
 					return null;
-				} else if (players.ContainsKey (steamId)) {
+				}
+
+				if (players.ContainsKey (steamId)) {
 					return players [steamId];
-				} else {
-					if (create && steamId != null && steamId.Length == 17) {
-						Log.Out ("Created new player entry for ID: " + steamId);
-						Player p = new Player (steamId);
-						players.Add (steamId, p);
-						return p;
-					}
-					return null;
 				}
+
+				if (create && steamId != null && steamId.Length == 17) {
+					Log.Out ("Created new player entry for ID: " + steamId);
+					Player p = new Player (steamId);
+					players.Add (steamId, p);
+					return p;
+				}
+
+				return null;
 			}
 		}
@@ -53,28 +54,29 @@
 			if (_nameOrId.Length == 17 && long.TryParse (_nameOrId, out tempLong)) {
 				return _nameOrId;
-			} else {
-				int entityId = -1;
-				if (int.TryParse (_nameOrId, out entityId)) {
-					foreach (KeyValuePair<string, Player> kvp in players) {
-						if (kvp.Value.IsOnline && kvp.Value.EntityID == entityId) {
-							return kvp.Key;
-						}
-					}
-				}
+			}
 
-				_nameOrId = _nameOrId.ToLower ();
+			int entityId = -1;
+			if (int.TryParse (_nameOrId, out entityId)) {
 				foreach (KeyValuePair<string, Player> kvp in players) {
-					string name = kvp.Value.Name.ToLower ();
-					if (_ignoreColorCodes) {
-						name = Regex.Replace (name, "\\[[0-9a-fA-F]{6}\\]", "");
-					}
-					if (kvp.Value.IsOnline && name.Equals (_nameOrId)) {
+					if (kvp.Value.IsOnline && kvp.Value.EntityID == entityId) {
 						return kvp.Key;
 					}
 				}
 			}
+
+			_nameOrId = _nameOrId.ToLower ();
+			foreach (KeyValuePair<string, Player> kvp in players) {
+				string name = kvp.Value.Name.ToLower ();
+				if (_ignoreColorCodes) {
+					name = Regex.Replace (name, "\\[[0-9a-fA-F]{6}\\]", "");
+				}
+
+				if (kvp.Value.IsOnline && name.Equals (_nameOrId)) {
+					return kvp.Key;
+				}
+			}
+
 			return null;
 		}
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs	(revision 325)
@@ -1,21 +1,14 @@
+using System;
 using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
 
-namespace AllocsFixes
-{
-	public class PlayerDataStuff
-	{
-
-		public static void GM_SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile)
-		{
+namespace AllocsFixes {
+	public class PlayerDataStuff {
+		public static void GM_SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) {
 			try {
-				PersistentContainer.Instance.Players[_cInfo.playerId, true].Update (_playerDataFile);
+				PersistentContainer.Instance.Players [_cInfo.playerId, true].Update (_playerDataFile);
 			} catch (Exception e) {
 				Log.Out ("Error in GM_SavePlayerData: " + e);
 			}
 		}
-
-
 	}
 }
Index: /binary-improvements/7dtd-server-fixes/src/StateManager.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/StateManager.cs	(revision 324)
+++ /binary-improvements/7dtd-server-fixes/src/StateManager.cs	(revision 325)
@@ -1,13 +1,10 @@
 using System;
-using System.Reflection;
+using AllocsFixes.PersistentData;
 
-namespace AllocsFixes
-{
-	public class StateManager
-	{
-		public static void Awake ()
-		{
+namespace AllocsFixes {
+	public class StateManager {
+		public static void Awake () {
 			try {
-				PersistentData.PersistentContainer.Load ();
+				PersistentContainer.Load ();
 			} catch (Exception e) {
 				Log.Out ("Error in StateManager.Awake: " + e);
@@ -15,9 +12,8 @@
 		}
 
-		public static void Shutdown ()
-		{
+		public static void Shutdown () {
 			try {
 				Log.Out ("Server shutting down!");
-				PersistentData.PersistentContainer.Instance.Save ();
+				PersistentContainer.Instance.Save ();
 			} catch (Exception e) {
 				Log.Out ("Error in StateManager.Shutdown: " + e);
@@ -26,3 +22,2 @@
 	}
 }
-
Index: /binary-improvements/AllocsCommands/AssemblyInfo.cs
===================================================================
--- /binary-improvements/AllocsCommands/AssemblyInfo.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/AssemblyInfo.cs	(revision 325)
@@ -1,16 +1,15 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
 
 // Information about this assembly is defined by the following attributes. 
 // Change them to the values specific to your project.
 
-[assembly: AssemblyTitle("AllocsCommands")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("ci")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
+[assembly: AssemblyTitle ("AllocsCommands")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("")]
+[assembly: AssemblyCopyright ("ci")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
 
 // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
@@ -18,5 +17,5 @@
 // and "{Major}.{Minor}.{Build}.*" will update just the revision.
 
-[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyVersion ("0.0.0.0")]
 
 // The following attributes are used to specify the signing key for the assembly, 
@@ -25,3 +24,2 @@
 //[assembly: AssemblyDelaySign(false)]
 //[assembly: AssemblyKeyFile("")]
-
Index: /binary-improvements/AllocsCommands/Chat.cs
===================================================================
--- /binary-improvements/AllocsCommands/Chat.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Chat.cs	(revision 325)
@@ -1,8 +1,4 @@
-using System;
-
-namespace AllocsFixes.CustomCommands
-{
+namespace AllocsFixes.CustomCommands {
 	public class Chat {
-
 		public static void SendMessage (ClientInfo _receiver, ClientInfo _sender, string _message) {
 			string senderName;
@@ -13,11 +9,12 @@
 				senderName = "Server";
 			}
-			_receiver.SendPackage (new NetPackageGameMessage (EnumGameMessages.Chat, _message, senderName + " (PM)", false, "", false));
+
+			_receiver.SendPackage (new NetPackageGameMessage (EnumGameMessages.Chat, _message, senderName + " (PM)",
+				false, "", false));
 			string receiverName = _receiver.playerName;
-			SdtdConsole.Instance.Output ("Message to player " + (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") + " sent with sender \"" + senderName + "\"");
+			SdtdConsole.Instance.Output ("Message to player " +
+			                             (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") +
+			                             " sent with sender \"" + senderName + "\"");
 		}
-
-
 	}
 }
-
Index: /binary-improvements/AllocsCommands/Commands/Give.cs
===================================================================
--- /binary-improvements/AllocsCommands/Commands/Give.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Commands/Give.cs	(revision 325)
@@ -3,6 +3,5 @@
 using UnityEngine;
 
-namespace AllocsFixes.CustomCommands
-{
+namespace AllocsFixes.CustomCommands {
 	public class Give : ConsoleCmdAbstract {
 		public override string GetDescription () {
@@ -12,15 +11,15 @@
 		public override string GetHelp () {
 			return "Give an item to a player by dropping it in front of that player\n" +
-				"Usage:\n" +
-				"   give <name / entity id> <item name> <amount>\n" +
-				"   give <name / entity id> <item name> <amount> <quality>\n" +
-				"Either pass the full name of a player or his entity id (given by e.g. \"lpi\").\n" +
-				"Item name has to be the exact name of an item as listed by \"listitems\".\n" +
-				"Amount is the number of instances of this item to drop (as a single stack).\n" +
-				"Quality is the quality of the dropped items for items that have a quality.";
+			       "Usage:\n" +
+			       "   give <name / entity id> <item name> <amount>\n" +
+			       "   give <name / entity id> <item name> <amount> <quality>\n" +
+			       "Either pass the full name of a player or his entity id (given by e.g. \"lpi\").\n" +
+			       "Item name has to be the exact name of an item as listed by \"listitems\".\n" +
+			       "Amount is the number of instances of this item to drop (as a single stack).\n" +
+			       "Quality is the quality of the dropped items for items that have a quality.";
 		}
 
 		public override string[] GetCommands () {
-			return new string[] { "give", string.Empty };
+			return new[] {"give", string.Empty};
 		}
 
@@ -28,5 +27,6 @@
 			try {
 				if (_params.Count != 3 && _params.Count != 4) {
-					SdtdConsole.Instance.Output ("Wrong number of arguments, expected 3 or 4, found " + _params.Count + ".");
+					SdtdConsole.Instance.Output ("Wrong number of arguments, expected 3 or 4, found " + _params.Count +
+					                             ".");
 					return;
 				}
@@ -56,5 +56,5 @@
 
 				if (_params.Count == 4) {
-					if(!int.TryParse(_params [1], out quality) || quality <= 0) {
+					if (!int.TryParse (_params [1], out quality) || quality <= 0) {
 						SdtdConsole.Instance.Output ("Quality is not an integer or not greater than zero.");
 						return;
@@ -64,7 +64,7 @@
 				if (ItemClass.list [iv.type].HasSubItems) {
 					for (int i = 0; i < iv.Modifications.Length; i++) {
-						ItemValue tmp = iv.Modifications[i];
+						ItemValue tmp = iv.Modifications [i];
 						tmp.Quality = quality;
-						iv.Modifications[i] = tmp;
+						iv.Modifications [i] = tmp;
 					}
 				} else if (ItemClass.list [iv.type].HasQuality) {
Index: /binary-improvements/AllocsCommands/Commands/ListItems.cs
===================================================================
--- /binary-improvements/AllocsCommands/Commands/ListItems.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Commands/ListItems.cs	(revision 325)
@@ -2,29 +2,24 @@
 using System.Collections.Generic;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class ListItems : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class ListItems : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "lists all items that contain the given substring";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "listitems", "li" };
+		public override string[] GetCommands () {
+			return new[] {"listitems", "li"};
 		}
 
 		public override string GetHelp () {
 			return "List all available item names\n" +
-				"Usage:\n" +
-				"   1. listitems <searchString>\n" +
-				"   2. listitems *\n" +
-				"1. List only names that contain the given string.\n" +
-				"2. List all names.";
+			       "Usage:\n" +
+			       "   1. listitems <searchString>\n" +
+			       "   2. listitems *\n" +
+			       "1. List only names that contain the given string.\n" +
+			       "2. List all names.";
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
 				if (_params.Count != 1 || _params [0].Length == 0) {
@@ -34,5 +29,5 @@
 
 				int count = ItemClass.ItemNames.Count;
-				bool showAll = _params[0].Trim().Equals("*");
+				bool showAll = _params [0].Trim ().Equals ("*");
 
 				int listed = 0;
Index: /binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs
===================================================================
--- /binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs	(revision 325)
@@ -1,12 +1,9 @@
-using AllocsFixes.PersistentData;
 using System;
 using System.Collections.Generic;
+using AllocsFixes.PersistentData;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class ListKnownPlayers : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class ListKnownPlayers : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "lists all players that were ever online";
 		}
@@ -14,21 +11,19 @@
 		public override string GetHelp () {
 			return "Usage:\n" +
-				   "  1. listknownplayers\n" +
-				   "  2. listknownplayers -online\n" +
-				   "  3. listknownplayers -notbanned\n" +
-				   "  4. listknownplayers <player name / steamid>\n" +
-				   "1. Lists all players that have ever been online\n" +
-				   "2. Lists only the players that are currently online\n" +
-				   "3. Lists only the players that are not banned\n" +
-				   "4. Lists all players whose name contains the given string or matches the given SteamID";
+			       "  1. listknownplayers\n" +
+			       "  2. listknownplayers -online\n" +
+			       "  3. listknownplayers -notbanned\n" +
+			       "  4. listknownplayers <player name / steamid>\n" +
+			       "1. Lists all players that have ever been online\n" +
+			       "2. Lists only the players that are currently online\n" +
+			       "3. Lists only the players that are not banned\n" +
+			       "4. Lists all players whose name contains the given string or matches the given SteamID";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "listknownplayers", "lkp" };
+		public override string[] GetCommands () {
+			return new[] {"listknownplayers", "lkp"};
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
 				AdminTools admTools = GameManager.Instance.adminTools;
@@ -56,5 +51,6 @@
 
 					if (p != null) {
-						SdtdConsole.Instance.Output (String.Format ("{0}. {1}, id={2}, steamid={3}, online={4}, ip={5}, playtime={6} m, seen={7}",
+						SdtdConsole.Instance.Output (string.Format (
+							"{0}. {1}, id={2}, steamid={3}, online={4}, ip={5}, playtime={6} m, seen={7}",
 							0, p.Name, p.EntityID, nameFilter, p.IsOnline, p.IP,
 							p.TotalPlayTime / 60,
@@ -62,5 +58,5 @@
 						);
 					} else {
-						SdtdConsole.Instance.Output (String.Format ("SteamID {0} unknown!", nameFilter));
+						SdtdConsole.Instance.Output (string.Format ("SteamID {0} unknown!", nameFilter));
 					}
 				} else {
@@ -74,11 +70,13 @@
 							&& (nameFilter.Length == 0 || p.Name.ToLower ().Contains (nameFilter))
 						) {
-							SdtdConsole.Instance.Output (String.Format ("{0}. {1}, id={2}, steamid={3}, online={4}, ip={5}, playtime={6} m, seen={7}",
-							                                    ++num, p.Name, p.EntityID, sid, p.IsOnline, p.IP,
-							                                    p.TotalPlayTime / 60,
-							                                    p.LastOnline.ToString ("yyyy-MM-dd HH:mm"))
+							SdtdConsole.Instance.Output (string.Format (
+								"{0}. {1}, id={2}, steamid={3}, online={4}, ip={5}, playtime={6} m, seen={7}",
+								++num, p.Name, p.EntityID, sid, p.IsOnline, p.IP,
+								p.TotalPlayTime / 60,
+								p.LastOnline.ToString ("yyyy-MM-dd HH:mm"))
 							);
 						}
 					}
+
 					SdtdConsole.Instance.Output ("Total of " + PersistentContainer.Instance.Players.Count + " known");
 				}
Index: /binary-improvements/AllocsCommands/Commands/ListLandProtection.cs
===================================================================
--- /binary-improvements/AllocsCommands/Commands/ListLandProtection.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Commands/ListLandProtection.cs	(revision 325)
@@ -1,11 +1,9 @@
 using System;
 using System.Collections.Generic;
+using AllocsFixes.PersistentData;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class ListLandProtection : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class ListLandProtection : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "lists all land protection blocks and owners";
 		}
@@ -13,20 +11,18 @@
 		public override string GetHelp () {
 			return "Usage:\n" +
-			"  1. listlandprotection summary\n" +
-			"  2. listlandprotection <steam id / player name / entity id> [parseable]\n" +
-			"  3. listlandprotection nearby [length]\n" +
-			"1. Lists only players that own claimstones, the number they own and the protection status\n" +
-			"2. Lists only the claims of the player given by his SteamID / entity id / playername, including the individual claim positions.\n" +
-			"   If \"parseable\" is specified the output of the individual claims will be in a format better suited for programmatical readout.\n" +
-			"3. Lists claims in a square with edge length of 64 (or the optionally specified size) around the executing player\n";
+			       "  1. listlandprotection summary\n" +
+			       "  2. listlandprotection <steam id / player name / entity id> [parseable]\n" +
+			       "  3. listlandprotection nearby [length]\n" +
+			       "1. Lists only players that own claimstones, the number they own and the protection status\n" +
+			       "2. Lists only the claims of the player given by his SteamID / entity id / playername, including the individual claim positions.\n" +
+			       "   If \"parseable\" is specified the output of the individual claims will be in a format better suited for programmatical readout.\n" +
+			       "3. Lists claims in a square with edge length of 64 (or the optionally specified size) around the executing player\n";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "listlandprotection", "llp" };
+		public override string[] GetCommands () {
+			return new[] {"listlandprotection", "llp"};
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
 				if (_senderInfo.RemoteClientInfo != null) {
@@ -41,5 +37,5 @@
 				bool summaryOnly = false;
 				string steamIdFilter = string.Empty;
-				Vector3i closeTo = default(Vector3i);
+				Vector3i closeTo = default (Vector3i);
 				bool onlyCloseToPlayer = false;
 				int closeToDistance = 32;
@@ -71,10 +67,12 @@
 						try {
 							if (_params.Count == 3) {
-								if (!int.TryParse (_params[1], out closeToDistance)) {
+								if (!int.TryParse (_params [1], out closeToDistance)) {
 									SdtdConsole.Instance.Output ("Given length is not an integer!");
 									return;
 								}
+
 								closeToDistance /= 2;
 							}
+
 							ClientInfo ci = ConsoleHelper.ParseParamSteamIdOnline (_params [_params.Count - 1]);
 							EntityPlayer ep = w.Players.dict [ci.entityId];
@@ -95,15 +93,16 @@
 				LandClaimList.OwnerFilter[] ownerFilters = null;
 				if (!string.IsNullOrEmpty (steamIdFilter)) {
-					ownerFilters = new LandClaimList.OwnerFilter[] { LandClaimList.SteamIdFilter (steamIdFilter) };
+					ownerFilters = new[] {LandClaimList.SteamIdFilter (steamIdFilter)};
 				}
+
 				LandClaimList.PositionFilter[] posFilters = null;
 				if (onlyCloseToPlayer) {
-					posFilters = new LandClaimList.PositionFilter[] { LandClaimList.CloseToFilter2dRect (closeTo, closeToDistance) };
+					posFilters = new[] {LandClaimList.CloseToFilter2dRect (closeTo, closeToDistance)};
 				}
 
-				Dictionary<PersistentData.Player, List<Vector3i>> claims = LandClaimList.GetLandClaims (ownerFilters, posFilters);
+				Dictionary<Player, List<Vector3i>> claims = LandClaimList.GetLandClaims (ownerFilters, posFilters);
 
-				foreach (KeyValuePair<PersistentData.Player, List<Vector3i>> kvp in claims) {
-					SdtdConsole.Instance.Output (String.Format (
+				foreach (KeyValuePair<Player, List<Vector3i>> kvp in claims) {
+					SdtdConsole.Instance.Output (string.Format (
 						"Player \"{0} ({1})\" owns {4} keystones (protected: {2}, current hardness multiplier: {3})",
 						kvp.Key.Name,
@@ -115,7 +114,8 @@
 						foreach (Vector3i v in kvp.Value) {
 							if (parseableOutput) {
-								SdtdConsole.Instance.Output ("LandProtectionOf: id=" + kvp.Key.SteamID + ", playerName=" + kvp.Key.Name + ", location=" + v.ToString ());
+								SdtdConsole.Instance.Output ("LandProtectionOf: id=" + kvp.Key.SteamID +
+								                             ", playerName=" + kvp.Key.Name + ", location=" + v);
 							} else {
-								SdtdConsole.Instance.Output ("   (" + v.ToString () + ")");
+								SdtdConsole.Instance.Output ("   (" + v + ")");
 							}
 						}
@@ -123,6 +123,7 @@
 				}
 
-				if (steamIdFilter.Length == 0)
+				if (steamIdFilter.Length == 0) {
 					SdtdConsole.Instance.Output ("Total of " + ppl.m_lpBlockMap.Count + " keystones in the game");
+				}
 			} catch (Exception e) {
 				Log.Out ("Error in ListLandProtection.Run: " + e);
Index: /binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs
===================================================================
--- /binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs	(revision 325)
@@ -1,11 +1,9 @@
 using System;
 using System.Collections.Generic;
+using AllocsFixes.PersistentData;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class RemoveLandProtection : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class RemoveLandProtection : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "removes the association of a land protection block to the owner";
 		}
@@ -13,42 +11,45 @@
 		public override string GetHelp () {
 			return "Usage:" +
-				   "  1. removelandprotection <steamid>\n" +
-				   "  2. removelandprotection <x> <y> <z>\n" +
-				   "  3. removelandprotection nearby [length]\n" +
-				   "1. Remove all land claims owned by the user with the given SteamID\n" +
-				   "2. Remove only the claim block on the exactly given block position\n" +
-				   "3. Remove all claims in a square with edge length of 64 (or the optionally specified size) around the executing player";
+			       "  1. removelandprotection <steamid>\n" +
+			       "  2. removelandprotection <x> <y> <z>\n" +
+			       "  3. removelandprotection nearby [length]\n" +
+			       "1. Remove all land claims owned by the user with the given SteamID\n" +
+			       "2. Remove only the claim block on the exactly given block position\n" +
+			       "3. Remove all claims in a square with edge length of 64 (or the optionally specified size) around the executing player";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "removelandprotection", "rlp" };
+		public override string[] GetCommands () {
+			return new[] {"removelandprotection", "rlp"};
 		}
 
-		private void removeById (string _id)
-		{
+		private void removeById (string _id) {
 			try {
 				PersistentPlayerList ppl = GameManager.Instance.GetPersistentPlayerList ();
 
 				if (_id.Length < 1 || !ppl.Players.ContainsKey (_id)) {
-					SdtdConsole.Instance.Output ("Not a valid Steam ID or user has never logged on. Use \"listlandprotection\" to get a list of keystones.");
+					SdtdConsole.Instance.Output (
+						"Not a valid Steam ID or user has never logged on. Use \"listlandprotection\" to get a list of keystones.");
 					return;
 				}
+
 				if (ppl.Players [_id].LPBlocks == null || ppl.Players [_id].LPBlocks.Count == 0) {
-					SdtdConsole.Instance.Output ("Player does not own any keystones. Use \"listlandprotection\" to get a list of keystones.");
+					SdtdConsole.Instance.Output (
+						"Player does not own any keystones. Use \"listlandprotection\" to get a list of keystones.");
 					return;
 				}
 
 				List<BlockChangeInfo> changes = new List<BlockChangeInfo> ();
-				foreach (Vector3i pos in ppl.Players[_id].LPBlocks) {
+				foreach (Vector3i pos in ppl.Players [_id].LPBlocks) {
 					BlockChangeInfo bci = new BlockChangeInfo (pos, new BlockValue (0), true, false);
 					changes.Add (bci);
 				}
+
 				GameManager.Instance.SetBlocksRPC (changes);
 
-				SdtdConsole.Instance.Output ("Tried to remove #" + changes.Count + " land protection blocks for player \"" + _id + "\". Note "+
-				                      "that only blocks in chunks that are currently loaded (close to any player) could be removed. "+
-				                      "Please check for remaining blocks by running:");
-				SdtdConsole.Instance.Output("  listlandprotection " + _id);
+				SdtdConsole.Instance.Output ("Tried to remove #" + changes.Count +
+				                             " land protection blocks for player \"" + _id + "\". Note " +
+				                             "that only blocks in chunks that are currently loaded (close to any player) could be removed. " +
+				                             "Please check for remaining blocks by running:");
+				SdtdConsole.Instance.Output ("  listlandprotection " + _id);
 			} catch (Exception e) {
 				Log.Out ("Error in RemoveLandProtection.removeById: " + e);
@@ -56,6 +57,5 @@
 		}
 
-		private void removeByPosition (List<string> _coords)
-		{
+		private void removeByPosition (List<string> _coords) {
 			try {
 				int x = int.MinValue;
@@ -77,5 +77,6 @@
 				Dictionary<Vector3i, PersistentPlayerData> d = ppl.m_lpBlockMap;
 				if (d == null || !d.ContainsKey (v)) {
-					SdtdConsole.Instance.Output ("No land protection block at the given position or not a valid position. Use \"listlandprotection\" to get a list of keystones.");
+					SdtdConsole.Instance.Output (
+						"No land protection block at the given position or not a valid position. Use \"listlandprotection\" to get a list of keystones.");
 					return;
 				}
@@ -88,5 +89,5 @@
 				GameManager.Instance.SetBlocksRPC (changes);
 
-				SdtdConsole.Instance.Output ("Land protection block at (" + v.ToString () + ") removed");
+				SdtdConsole.Instance.Output ("Land protection block at (" + v + ") removed");
 			} catch (Exception e) {
 				Log.Out ("Error in RemoveLandProtection.removeByPosition: " + e);
@@ -94,6 +95,5 @@
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
 				if (_senderInfo.RemoteClientInfo != null) {
@@ -107,19 +107,22 @@
 						int closeToDistance = 32;
 						if (_params.Count == 3) {
-							if (!int.TryParse (_params[1], out closeToDistance)) {
+							if (!int.TryParse (_params [1], out closeToDistance)) {
 								SdtdConsole.Instance.Output ("Given length is not an integer!");
 								return;
 							}
+
 							closeToDistance /= 2;
 						}
+
 						ClientInfo ci = ConsoleHelper.ParseParamSteamIdOnline (_params [_params.Count - 1]);
 						EntityPlayer ep = GameManager.Instance.World.Players.dict [ci.entityId];
 						Vector3i closeTo = new Vector3i (ep.GetPosition ());
-						LandClaimList.PositionFilter[] posFilters = new LandClaimList.PositionFilter[] { LandClaimList.CloseToFilter2dRect (closeTo, closeToDistance) };
-						Dictionary<PersistentData.Player, List<Vector3i>> claims = LandClaimList.GetLandClaims (null, posFilters);
+						LandClaimList.PositionFilter[] posFilters =
+							{LandClaimList.CloseToFilter2dRect (closeTo, closeToDistance)};
+						Dictionary<Player, List<Vector3i>> claims = LandClaimList.GetLandClaims (null, posFilters);
 
 						try {
 							List<BlockChangeInfo> changes = new List<BlockChangeInfo> ();
-							foreach (KeyValuePair<PersistentData.Player, List<Vector3i>> kvp in claims) {
+							foreach (KeyValuePair<Player, List<Vector3i>> kvp in claims) {
 								foreach (Vector3i v in kvp.Value) {
 									BlockChangeInfo bci = new BlockChangeInfo (v, new BlockValue (0), true, false);
@@ -127,14 +130,13 @@
 								}
 							}
+
 							GameManager.Instance.SetBlocksRPC (changes);
 						} catch (Exception e) {
 							SdtdConsole.Instance.Output ("Error removing claims");
 							Log.Out ("Error in RemoveLandProtection.Run: " + e);
-							return;
 						}
 					} catch (Exception e) {
 						SdtdConsole.Instance.Output ("Error getting current player's position");
 						Log.Out ("Error in RemoveLandProtection.Run: " + e);
-						return;
 					}
 				} else if (_params.Count == 1) {
Index: /binary-improvements/AllocsCommands/Commands/Reply.cs
===================================================================
--- /binary-improvements/AllocsCommands/Commands/Reply.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Commands/Reply.cs	(revision 325)
@@ -1,11 +1,7 @@
-using System;
 using System.Collections.Generic;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class Reply : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class Reply : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "send a message to  the player who last sent you a PM";
 		}
@@ -13,15 +9,13 @@
 		public override string GetHelp () {
 			return "Usage:\n" +
-				   "   reply <message>\n" +
-				   "Send the given message to the user you last received a PM from.";
+			       "   reply <message>\n" +
+			       "Send the given message to the user you last received a PM from.";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "reply", "re" };
+		public override string[] GetCommands () {
+			return new[] {"reply", "re"};
 		}
 
-		private void RunInternal (ClientInfo _sender, List<string> _params)
-		{
+		private void RunInternal (ClientInfo _sender, List<string> _params) {
 			if (_params.Count < 1) {
 				SdtdConsole.Instance.Output ("Usage: reply <message>");
@@ -35,5 +29,6 @@
 				Chat.SendMessage (receiver, _sender, message);
 			} else {
-				SdtdConsole.Instance.Output ("You have not received a PM so far or sender of last received PM is no longer online.");
+				SdtdConsole.Instance.Output (
+					"You have not received a PM so far or sender of last received PM is no longer online.");
 			}
 		}
Index: /binary-improvements/AllocsCommands/Commands/SayToPlayer.cs
===================================================================
--- /binary-improvements/AllocsCommands/Commands/SayToPlayer.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Commands/SayToPlayer.cs	(revision 325)
@@ -2,10 +2,7 @@
 using System.Collections.Generic;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class SayToPlayer : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class SayToPlayer : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "send a message to a single player";
 		}
@@ -13,15 +10,13 @@
 		public override string GetHelp () {
 			return "Usage:\n" +
-				   "   pm <player name / steam id / entity id> <message>\n" +
-				   "Send a PM to the player given by the player name or entity id (as given by e.g. \"lpi\").";
+			       "   pm <player name / steam id / entity id> <message>\n" +
+			       "Send a PM to the player given by the player name or entity id (as given by e.g. \"lpi\").";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "sayplayer", "pm" };
+		public override string[] GetCommands () {
+			return new[] {"sayplayer", "pm"};
 		}
 
-		private void RunInternal (ClientInfo _sender, List<string> _params)
-		{
+		private void RunInternal (ClientInfo _sender, List<string> _params) {
 			if (_params.Count < 2) {
 				SdtdConsole.Instance.Output ("Usage: sayplayer <playername|entityid> <message>");
@@ -39,6 +34,5 @@
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
 				if (_senderInfo.RemoteClientInfo != null) {
Index: /binary-improvements/AllocsCommands/Commands/ShowInventory.cs
===================================================================
--- /binary-improvements/AllocsCommands/Commands/ShowInventory.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/Commands/ShowInventory.cs	(revision 325)
@@ -1,35 +1,28 @@
-using AllocsFixes.PersistentData;
 using System;
 using System.Collections.Generic;
+using AllocsFixes.PersistentData;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class ShowInventory : ConsoleCmdAbstract
-	{
-
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class ShowInventory : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "list inventory of a given player";
 		}
 
-		public override string GetHelp ()
-		{
+		public override string GetHelp () {
 			return "Usage:\n" +
-			"   showinventory <steam id / player name / entity id> [tag]\n" +
-			"Show the inventory of the player given by his SteamID, player name or\n" +
-			"entity id (as given by e.g. \"lpi\").\n" +
-			"Optionally specify a tag that is included in each line of the output. In\n" +
-			"this case output is designed to be easily parseable by tools.\n" +
-			"Note: This only shows the player's inventory after it was first sent to\n" +
-			"the server which happens at least every 30 seconds.";
+			       "   showinventory <steam id / player name / entity id> [tag]\n" +
+			       "Show the inventory of the player given by his SteamID, player name or\n" +
+			       "entity id (as given by e.g. \"lpi\").\n" +
+			       "Optionally specify a tag that is included in each line of the output. In\n" +
+			       "this case output is designed to be easily parseable by tools.\n" +
+			       "Note: This only shows the player's inventory after it was first sent to\n" +
+			       "the server which happens at least every 30 seconds.";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "showinventory", "si" };
+		public override string[] GetCommands () {
+			return new[] {"showinventory", "si"};
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
 				if (_params.Count < 1) {
@@ -40,5 +33,6 @@
 				string steamid = PersistentContainer.Instance.Players.GetSteamID (_params [0], true);
 				if (steamid == null) {
-					SdtdConsole.Instance.Output ("Playername or entity/steamid id not found or no inventory saved (first saved after a player has been online for 30s).");
+					SdtdConsole.Instance.Output (
+						"Playername or entity/steamid id not found or no inventory saved (first saved after a player has been online for 30s).");
 					return;
 				}
@@ -52,24 +46,32 @@
 				PersistentData.Inventory inv = p.Inventory;
 
-				if (tag == null)
+				if (tag == null) {
 					SdtdConsole.Instance.Output ("Belt of player " + p.Name + ":");
+				}
+
 				PrintInv (inv.belt, p.EntityID, "belt", tag);
-				if (tag == null)
+				if (tag == null) {
 					SdtdConsole.Instance.Output (string.Empty);
+				}
 
-				if (tag == null)
+				if (tag == null) {
 					SdtdConsole.Instance.Output ("Bagpack of player " + p.Name + ":");
+				}
+
 				PrintInv (inv.bag, p.EntityID, "backpack", tag);
-				if (tag == null)
+				if (tag == null) {
 					SdtdConsole.Instance.Output (string.Empty);
+				}
 
-				if (tag == null)
+				if (tag == null) {
 					SdtdConsole.Instance.Output ("Equipment of player " + p.Name + ":");
+				}
+
 				PrintEquipment (inv.equipment, p.EntityID, "equipment", tag);
 
-				if (tag != null)                {
-					SdtdConsole.Instance.Output ("tracker_item id=" + p.EntityID + ", tag=" + tag + ", SHOWINVENTORY DONE");
+				if (tag != null) {
+					SdtdConsole.Instance.Output ("tracker_item id=" + p.EntityID + ", tag=" + tag +
+					                             ", SHOWINVENTORY DONE");
 				}
-
 			} catch (Exception e) {
 				Log.Out ("Error in ShowInventory.Run: " + e);
@@ -77,19 +79,25 @@
 		}
 
-		private void PrintInv (List<InvItem> _inv, int _entityId, string _location, string _tag)
-		{
+		private void PrintInv (List<InvItem> _inv, int _entityId, string _location, string _tag) {
 			for (int i = 0; i < _inv.Count; i++) {
 				if (_inv [i] != null) {
-					if (_tag == null) { // no Tag defined -> readable output
+					if (_tag == null) {
+						// no Tag defined -> readable output
 						if (_inv [i].quality < 0) {
-							SdtdConsole.Instance.Output (string.Format ("    Slot {0}: {1:000} * {2}", i, _inv [i].count, _inv [i].itemName));
+							SdtdConsole.Instance.Output (string.Format ("    Slot {0}: {1:000} * {2}", i,
+								_inv [i].count, _inv [i].itemName));
 						} else {
-							SdtdConsole.Instance.Output (string.Format ("    Slot {0}: {1:000} * {2} - quality: {3}", i, _inv [i].count, _inv [i].itemName, _inv [i].quality));
+							SdtdConsole.Instance.Output (string.Format ("    Slot {0}: {1:000} * {2} - quality: {3}", i,
+								_inv [i].count, _inv [i].itemName, _inv [i].quality));
 						}
+
 						DoParts (_inv [i].parts, 1, null);
-					} else { // Tag defined -> parseable output
-						String partsMsg = DoParts(_inv[i].parts, 1, "");
-						String msg = "tracker_item id=" + _entityId + ", tag=" + _tag + ", location=" + _location + ", slot=" + i + ", item=" + _inv[i].itemName + ", qnty=" + _inv[i].count + ", quality=" + _inv[i].quality + ", parts=(" + partsMsg + ")";
-						SdtdConsole.Instance.Output(msg);
+					} else {
+						// Tag defined -> parseable output
+						string partsMsg = DoParts (_inv [i].parts, 1, "");
+						string msg = "tracker_item id=" + _entityId + ", tag=" + _tag + ", location=" + _location +
+						             ", slot=" + i + ", item=" + _inv [i].itemName + ", qnty=" + _inv [i].count +
+						             ", quality=" + _inv [i].quality + ", parts=(" + partsMsg + ")";
+						SdtdConsole.Instance.Output (msg);
 					}
 				}
@@ -97,6 +105,5 @@
 		}
 
-		private void PrintEquipment (InvItem[] _equipment, int _entityId, string _location, string _tag)
-		{
+		private void PrintEquipment (InvItem[] _equipment, int _entityId, string _location, string _tag) {
 			AddEquipment ("head", _equipment, EquipmentSlots.Headgear, _entityId, _location, _tag);
 			AddEquipment ("eyes", _equipment, EquipmentSlots.Eyewear, _entityId, _location, _tag);
@@ -114,6 +121,6 @@
 		}
 
-		private void AddEquipment (string _slotname, InvItem[] _items, EquipmentSlots _slot, int _entityId, string _location, string _tag)
-		{
+		private void AddEquipment (string _slotname, InvItem[] _items, EquipmentSlots _slot, int _entityId,
+			string _location, string _tag) {
 			int[] slotindices = XUiM_PlayerEquipment.GetSlotIndicesByEquipmentSlot (_slot);
 
@@ -121,16 +128,24 @@
 				if (_items != null && _items [slotindices [i]] != null) {
 					InvItem item = _items [slotindices [i]];
-					if (_tag == null) { // no Tag defined -> readable output
+					if (_tag == null) {
+						// no Tag defined -> readable output
 						if (item.quality < 0) {
-							SdtdConsole.Instance.Output (string.Format ("    Slot {0:8}: {1:000}", _slotname, item.itemName));
+							SdtdConsole.Instance.Output (string.Format ("    Slot {0:8}: {1:000}", _slotname,
+								item.itemName));
 						} else {
-							SdtdConsole.Instance.Output (string.Format ("    Slot {0:8}: {1:000} - quality: {2}", _slotname, item.itemName, item.quality));
+							SdtdConsole.Instance.Output (string.Format ("    Slot {0:8}: {1:000} - quality: {2}",
+								_slotname, item.itemName, item.quality));
 						}
+
 						DoParts (_items [slotindices [i]].parts, 1, null);
-					} else { // Tag defined -> parseable output
-						String partsMsg = DoParts(_items[slotindices[i]].parts, 1, "");
-						String msg = "tracker_item id=" + _entityId + ", tag=" + _tag + ", location=" + _location + ", slot=" + _slotname + ", item=" + item.itemName + ", qnty=1, quality=" + item.quality + ", parts=(" +  partsMsg + ")";
-						SdtdConsole.Instance.Output(msg);
+					} else {
+						// Tag defined -> parseable output
+						string partsMsg = DoParts (_items [slotindices [i]].parts, 1, "");
+						string msg = "tracker_item id=" + _entityId + ", tag=" + _tag + ", location=" + _location +
+						             ", slot=" + _slotname + ", item=" + item.itemName + ", qnty=1, quality=" +
+						             item.quality + ", parts=(" + partsMsg + ")";
+						SdtdConsole.Instance.Output (msg);
 					}
+
 					return;
 				}
@@ -138,22 +153,27 @@
 		}
 
-		private string DoParts (InvItem[] _parts, int _indent, string _currentMessage)
-		{
+		private string DoParts (InvItem[] _parts, int _indent, string _currentMessage) {
 			if (_parts != null && _parts.Length > 0) {
 				string indenter = new string (' ', _indent * 4);
 				for (int i = 0; i < _parts.Length; i++) {
 					if (_parts [i] != null) {
-						if (_currentMessage == null) { // no currentMessage given -> readable output
+						if (_currentMessage == null) {
+							// no currentMessage given -> readable output
 							if (_parts [i].quality < 0) {
-								SdtdConsole.Instance.Output (string.Format ("{0}         - {1}", indenter, _parts [i].itemName));
+								SdtdConsole.Instance.Output (string.Format ("{0}         - {1}", indenter,
+									_parts [i].itemName));
 							} else {
-								SdtdConsole.Instance.Output (string.Format ("{0}         - {1} - quality: {2}", indenter, _parts [i].itemName, _parts [i].quality));
+								SdtdConsole.Instance.Output (string.Format ("{0}         - {1} - quality: {2}",
+									indenter, _parts [i].itemName, _parts [i].quality));
 							}
+
 							DoParts (_parts [i].parts, _indent + 1, _currentMessage);
-						} else { // currentMessage given -> parseable output
+						} else {
+							// currentMessage given -> parseable output
 							if (_currentMessage.Length > 0) {
 								_currentMessage += ",";
 							}
-							_currentMessage += _parts[i].itemName + "@" + _parts[i].quality;
+
+							_currentMessage += _parts [i].itemName + "@" + _parts [i].quality;
 							_currentMessage = DoParts (_parts [i].parts, _indent + 1, _currentMessage);
 						}
@@ -161,7 +181,7 @@
 				}
 			}
+
 			return _currentMessage;
 		}
-
 	}
 }
Index: /binary-improvements/AllocsCommands/PrivateMessageConnections.cs
===================================================================
--- /binary-improvements/AllocsCommands/PrivateMessageConnections.cs	(revision 324)
+++ /binary-improvements/AllocsCommands/PrivateMessageConnections.cs	(revision 325)
@@ -1,19 +1,14 @@
-using System;
 using System.Collections.Generic;
 using Steamworks;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class PrivateMessageConnections
-	{
-		private static Dictionary<CSteamID, CSteamID> senderOfLastPM = new Dictionary<CSteamID, CSteamID> ();
+namespace AllocsFixes.CustomCommands {
+	public class PrivateMessageConnections {
+		private static readonly Dictionary<CSteamID, CSteamID> senderOfLastPM = new Dictionary<CSteamID, CSteamID> ();
 
-		public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver)
-		{
+		public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver) {
 			senderOfLastPM [_receiver.steamId] = _sender.steamId;
 		}
 
-		public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player)
-		{
+		public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player) {
 			if (senderOfLastPM.ContainsKey (_player.steamId)) {
 				CSteamID recSteamId = senderOfLastPM [_player.steamId];
@@ -21,4 +16,5 @@
 				return recInfo;
 			}
+
 			return null;
 		}
Index: /binary-improvements/MapRendering/API.cs
===================================================================
--- /binary-improvements/MapRendering/API.cs	(revision 324)
+++ /binary-improvements/MapRendering/API.cs	(revision 325)
@@ -1,16 +1,23 @@
-using System;
+using AllocsFixes.NetConnections.Servers.Web;
+using AllocsFixes.NetConnections.Servers.Web.Handlers;
 
-namespace MapRendering
-{
+namespace MapRendering {
 	public class API : IModApi {
+		public void InitMod () {
+			ModEvents.GameAwake.RegisterHandler (GameAwake);
+			ModEvents.GameStartDone.RegisterHandler (GameStartDone);
+			ModEvents.GameShutdown.RegisterHandler (GameShutdown);
+			ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone);
+		}
+
 		private void GameAwake () {
 			// ReSharper disable once ObjectCreationAsStatement
-			new AllocsFixes.NetConnections.Servers.Web.Web ();
-			AllocsFixes.NetConnections.Servers.Web.LogBuffer.Instance.GetType ();
+			new Web ();
+			LogBuffer.Instance.GetType ();
 		}
 
 		private void GameStartDone () {
-			if (AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance != null) {
-				AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance.LoadIcons ();
+			if (ItemIconHandler.Instance != null) {
+				ItemIconHandler.Instance.LoadIcons ();
 			}
 		}
@@ -23,12 +30,4 @@
 			AllocsFixes.MapRendering.MapRendering.RenderSingleChunk (_chunk);
 		}
-
-		public void InitMod () {
-			ModEvents.GameAwake.RegisterHandler (GameAwake);
-			ModEvents.GameStartDone.RegisterHandler (GameStartDone);
-			ModEvents.GameShutdown.RegisterHandler (GameShutdown);
-			ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone);
-		}
 	}
 }
-
Index: /binary-improvements/MapRendering/AssemblyInfo.cs
===================================================================
--- /binary-improvements/MapRendering/AssemblyInfo.cs	(revision 324)
+++ /binary-improvements/MapRendering/AssemblyInfo.cs	(revision 325)
@@ -1,16 +1,15 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
 
 // Information about this assembly is defined by the following attributes. 
 // Change them to the values specific to your project.
 
-[assembly: AssemblyTitle("MapRendering")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("ci")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
+[assembly: AssemblyTitle ("MapRendering")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("")]
+[assembly: AssemblyCopyright ("ci")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
 
 // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
@@ -18,5 +17,5 @@
 // and "{Major}.{Minor}.{Build}.*" will update just the revision.
 
-[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyVersion ("0.0.0.0")]
 
 // The following attributes are used to specify the signing key for the assembly, 
@@ -25,3 +24,2 @@
 //[assembly: AssemblyDelaySign(false)]
 //[assembly: AssemblyKeyFile("")]
-
Index: /binary-improvements/MapRendering/Commands/EnableOpenIDDebug.cs
===================================================================
--- /binary-improvements/MapRendering/Commands/EnableOpenIDDebug.cs	(revision 324)
+++ /binary-improvements/MapRendering/Commands/EnableOpenIDDebug.cs	(revision 325)
@@ -1,28 +1,24 @@
 using System;
 using System.Collections.Generic;
+using AllocsFixes.NetConnections.Servers.Web;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class EnableOpenIDDebug : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class EnableOpenIDDebug : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "enable/disable OpenID debugging";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "openiddebug" };
+		public override string[] GetCommands () {
+			return new[] {"openiddebug"};
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
 				if (_params.Count != 1) {
-					SdtdConsole.Instance.Output ("Current state: " + AllocsFixes.NetConnections.Servers.Web.OpenID.debugOpenId);
+					SdtdConsole.Instance.Output ("Current state: " + OpenID.debugOpenId);
 					return;
 				}
 
-				AllocsFixes.NetConnections.Servers.Web.OpenID.debugOpenId = _params[0].Equals("1");
+				OpenID.debugOpenId = _params [0].Equals ("1");
 				SdtdConsole.Instance.Output ("Set OpenID debugging to " + _params [0].Equals ("1"));
 			} catch (Exception e) {
Index: /binary-improvements/MapRendering/Commands/EnableRendering.cs
===================================================================
--- /binary-improvements/MapRendering/Commands/EnableRendering.cs	(revision 324)
+++ /binary-improvements/MapRendering/Commands/EnableRendering.cs	(revision 325)
@@ -2,27 +2,22 @@
 using System.Collections.Generic;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class EnableRendering : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class EnableRendering : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "enable/disable live map rendering";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "enablerendering" };
+		public override string[] GetCommands () {
+			return new[] {"enablerendering"};
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
 				if (_params.Count != 1) {
-					SdtdConsole.Instance.Output ("Current state: " + AllocsFixes.MapRendering.MapRendering.renderingEnabled);
+					SdtdConsole.Instance.Output ("Current state: " + MapRendering.MapRendering.renderingEnabled);
 					return;
 				}
 
-				AllocsFixes.MapRendering.MapRendering.renderingEnabled = _params[0].Equals("1");
+				MapRendering.MapRendering.renderingEnabled = _params [0].Equals ("1");
 				SdtdConsole.Instance.Output ("Set live map rendering to " + _params [0].Equals ("1"));
 			} catch (Exception e) {
Index: /binary-improvements/MapRendering/Commands/ReloadWebPermissions.cs
===================================================================
--- /binary-improvements/MapRendering/Commands/ReloadWebPermissions.cs	(revision 324)
+++ /binary-improvements/MapRendering/Commands/ReloadWebPermissions.cs	(revision 325)
@@ -1,23 +1,19 @@
 using System;
 using System.Collections.Generic;
+using AllocsFixes.NetConnections.Servers.Web;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class ReloadWebPermissions : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class ReloadWebPermissions : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "force reload of web permissions file";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "reloadwebpermissions" };
+		public override string[] GetCommands () {
+			return new[] {"reloadwebpermissions"};
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
-				AllocsFixes.NetConnections.Servers.Web.WebPermissions.Instance.Load ();
+				WebPermissions.Instance.Load ();
 				SdtdConsole.Instance.Output ("Web permissions file reloaded");
 			} catch (Exception e) {
Index: /binary-improvements/MapRendering/Commands/RenderMap.cs
===================================================================
--- /binary-improvements/MapRendering/Commands/RenderMap.cs	(revision 324)
+++ /binary-improvements/MapRendering/Commands/RenderMap.cs	(revision 325)
@@ -1,25 +1,18 @@
-using AllocsFixes.MapRendering;
 using System;
-using System.IO;
 using System.Collections.Generic;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class RenderMap : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class RenderMap : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "render the current map to a file";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "rendermap" };
+		public override string[] GetCommands () {
+			return new[] {"rendermap"};
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
-				AllocsFixes.MapRendering.MapRendering.Instance.RenderFullMap ();
+				MapRendering.MapRendering.Instance.RenderFullMap ();
 
 				SdtdConsole.Instance.Output ("Render map done");
Index: /binary-improvements/MapRendering/Commands/WebPermissionsCmd.cs
===================================================================
--- /binary-improvements/MapRendering/Commands/WebPermissionsCmd.cs	(revision 324)
+++ /binary-improvements/MapRendering/Commands/WebPermissionsCmd.cs	(revision 325)
@@ -1,29 +1,24 @@
-using System;
 using System.Collections.Generic;
-using System.IO;
+using AllocsFixes.NetConnections.Servers.Web;
 
-using AllocsFixes.NetConnections.Servers.Web;
-using UnityEngine;
-
-namespace AllocsFixes.CustomCommands
-{
+namespace AllocsFixes.CustomCommands {
 	public class WebPermissionsCmd : ConsoleCmdAbstract {
 		public override string[] GetCommands () {
-			return new string[] { "webpermission" };
+			return new[] {"webpermission"};
 		}
-	
-		public override string GetDescription () { 
+
+		public override string GetDescription () {
 			return "Manage web permission levels";
 		}
-	
+
 		public override string GetHelp () {
 			return "Set/get permission levels required to access a given web functionality. Default\n" +
-				"level required for functions that are not explicitly specified is 0.\n" +
-				"Usage:\n" +
-				"   webpermission add <webfunction> <level>\n" +
-				"   webpermission remove <webfunction>\n" +
-				"   webpermission list";
+			       "level required for functions that are not explicitly specified is 0.\n" +
+			       "Usage:\n" +
+			       "   webpermission add <webfunction> <level>\n" +
+			       "   webpermission remove <webfunction>\n" +
+			       "   webpermission list";
 		}
-	
+
 		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			if (_params.Count >= 1) {
@@ -46,5 +41,5 @@
 			}
 		}
-	
+
 		private void ExecuteAdd (List<string> _params) {
 			if (_params.Count != 3) {
@@ -52,10 +47,10 @@
 				return;
 			}
-		
+
 			if (!WebPermissions.Instance.IsKnownModule (_params [1])) {
 				SdtdConsole.Instance.Output ("\"" + _params [1] + "\" is not a valid web function.");
 				return;
 			}
-		
+
 			int level;
 			if (!int.TryParse (_params [2], out level)) {
@@ -63,9 +58,9 @@
 				return;
 			}
-		
+
 			WebPermissions.Instance.AddModulePermission (_params [1], level);
 			SdtdConsole.Instance.Output (string.Format ("{0} added with permission level of {1}.", _params [1], level));
 		}
-	
+
 		private void ExecuteRemove (List<string> _params) {
 			if (_params.Count != 2) {
@@ -73,14 +68,14 @@
 				return;
 			}
-		
+
 			if (!WebPermissions.Instance.IsKnownModule (_params [1])) {
 				SdtdConsole.Instance.Output ("\"" + _params [1] + "\" is not a valid web function.");
 				return;
 			}
-		
+
 			WebPermissions.Instance.RemoveModulePermission (_params [1]);
 			SdtdConsole.Instance.Output (string.Format ("{0} removed from permissions list.", _params [1]));
 		}
-	
+
 		private void ExecuteList () {
 			SdtdConsole.Instance.Output ("Defined web function permissions:");
@@ -90,5 +85,4 @@
 			}
 		}
-
 	}
 }
Index: /binary-improvements/MapRendering/Commands/WebTokens.cs
===================================================================
--- /binary-improvements/MapRendering/Commands/WebTokens.cs	(revision 324)
+++ /binary-improvements/MapRendering/Commands/WebTokens.cs	(revision 325)
@@ -1,20 +1,15 @@
-using System;
 using System.Collections.Generic;
-using System.IO;
 using System.Text.RegularExpressions;
+using AllocsFixes.NetConnections.Servers.Web;
 
-using AllocsFixes.NetConnections.Servers.Web;
-using UnityEngine;
-
-namespace AllocsFixes.CustomCommands
-{
+namespace AllocsFixes.CustomCommands {
 	public class WebTokens : ConsoleCmdAbstract {
-		private static Regex validNameTokenMatcher = new Regex (@"^\w+$");
+		private static readonly Regex validNameTokenMatcher = new Regex (@"^\w+$");
 
 		public override string[] GetCommands () {
-			return new string[] { "webtokens" };
+			return new[] {"webtokens"};
 		}
-	
-		public override string GetDescription () { 
+
+		public override string GetDescription () {
 			return "Manage web tokens";
 		}
@@ -22,10 +17,10 @@
 		public override string GetHelp () {
 			return "Set/get webtoken permission levels. A level of 0 is maximum permission.\n" +
-				"Usage:\n" +
-				"   webtokens add <username> <usertoken> <level>\n" +
-				"   webtokens remove <username>\n" +
-				"   webtokens list";
+			       "Usage:\n" +
+			       "   webtokens add <username> <usertoken> <level>\n" +
+			       "   webtokens remove <username>\n" +
+			       "   webtokens list";
 		}
-	
+
 		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			if (_params.Count >= 1) {
@@ -61,5 +56,6 @@
 
 			if (!validNameTokenMatcher.IsMatch (_params [1])) {
-				SdtdConsole.Instance.Output ("Argument 'username' may only contain characters (A-Z, a-z), digits (0-9) and underscores (_).");
+				SdtdConsole.Instance.Output (
+					"Argument 'username' may only contain characters (A-Z, a-z), digits (0-9) and underscores (_).");
 				return;
 			}
@@ -71,5 +67,6 @@
 
 			if (!validNameTokenMatcher.IsMatch (_params [2])) {
-				SdtdConsole.Instance.Output ("Argument 'usertoken' may only contain characters (A-Z, a-z), digits (0-9) and underscores (_).");
+				SdtdConsole.Instance.Output (
+					"Argument 'usertoken' may only contain characters (A-Z, a-z), digits (0-9) and underscores (_).");
 				return;
 			}
@@ -82,7 +79,9 @@
 
 			WebPermissions.Instance.AddAdmin (_params [1], _params [2], level);
-			SdtdConsole.Instance.Output (string.Format ("Web user with name={0} and password={1} added with permission level of {2}.", _params [1], _params [2], level));
+			SdtdConsole.Instance.Output (string.Format (
+				"Web user with name={0} and password={1} added with permission level of {2}.", _params [1], _params [2],
+				level));
 		}
-	
+
 		private void ExecuteRemove (List<string> _params) {
 			if (_params.Count != 2) {
@@ -90,5 +89,5 @@
 				return;
 			}
-		
+
 			if (string.IsNullOrEmpty (_params [1])) {
 				SdtdConsole.Instance.Output ("Argument 'username' is empty.");
@@ -97,5 +96,6 @@
 
 			if (!validNameTokenMatcher.IsMatch (_params [1])) {
-				SdtdConsole.Instance.Output ("Argument 'username' may only contain characters (A-Z, a-z), digits (0-9) and underscores (_).");
+				SdtdConsole.Instance.Output (
+					"Argument 'username' may only contain characters (A-Z, a-z), digits (0-9) and underscores (_).");
 				return;
 			}
@@ -104,13 +104,13 @@
 			SdtdConsole.Instance.Output (string.Format ("{0} removed from web user permissions list.", _params [1]));
 		}
-	
+
 		private void ExecuteList () {
 			SdtdConsole.Instance.Output ("Defined webuser permissions:");
 			SdtdConsole.Instance.Output ("  Level: Name / Token");
 			foreach (WebPermissions.AdminToken at in WebPermissions.Instance.GetAdmins ()) {
-				SdtdConsole.Instance.Output (string.Format ("  {0,5}: {1} / {2}", at.permissionLevel, at.name, at.token));
+				SdtdConsole.Instance.Output (
+					string.Format ("  {0,5}: {1} / {2}", at.permissionLevel, at.name, at.token));
 			}
 		}
-	
 	}
 }
Index: /binary-improvements/MapRendering/Commands/webstat.cs
===================================================================
--- /binary-improvements/MapRendering/Commands/webstat.cs	(revision 324)
+++ /binary-improvements/MapRendering/Commands/webstat.cs	(revision 325)
@@ -1,33 +1,34 @@
 using System;
 using System.Collections.Generic;
+using AllocsFixes.NetConnections.Servers.Web;
 
-namespace AllocsFixes.CustomCommands
-{
-	public class webstat : ConsoleCmdAbstract
-	{
-		public override string GetDescription ()
-		{
+namespace AllocsFixes.CustomCommands {
+	public class webstat : ConsoleCmdAbstract {
+		public override string GetDescription () {
 			return "DEBUG PURPOSES ONLY";
 		}
 
-		public override string[] GetCommands ()
-		{
-			return new string[] { "webstat" };
+		public override string[] GetCommands () {
+			return new[] {"webstat"};
 		}
 
-		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
-		{
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
 			try {
-				int curHandlers = AllocsFixes.NetConnections.Servers.Web.Web.currentHandlers;
-				int totalHandlers = AllocsFixes.NetConnections.Servers.Web.Web.handlingCount;
-				long totalTime = AllocsFixes.NetConnections.Servers.Web.Web.totalHandlingTime;
+				int curHandlers = Web.currentHandlers;
+				int totalHandlers = Web.handlingCount;
+				long totalTime = Web.totalHandlingTime;
 				SdtdConsole.Instance.Output ("Current Web handlers: " + curHandlers + " - total: " + totalHandlers);
-				SdtdConsole.Instance.Output (" - Total time: " + totalTime + " µs - average time: " + (totalTime / totalHandlers) + " µs");
+				SdtdConsole.Instance.Output (" - Total time: " + totalTime + " µs - average time: " +
+				                             totalTime / totalHandlers + " µs");
 
-				curHandlers = AllocsFixes.NetConnections.Servers.Web.WebCommandResult.currentHandlers;
-				totalHandlers = AllocsFixes.NetConnections.Servers.Web.WebCommandResult.handlingCount;
-				totalTime = AllocsFixes.NetConnections.Servers.Web.WebCommandResult.totalHandlingTime;
-				SdtdConsole.Instance.Output ("Current Web command handlers: " + curHandlers + " - total: " + totalHandlers);
-				SdtdConsole.Instance.Output (" - Total time: " + totalTime + " µs" + (totalHandlers > 0 ? " - average time: " + (totalTime / totalHandlers) + " µs" : ""));
+				curHandlers = WebCommandResult.currentHandlers;
+				totalHandlers = WebCommandResult.handlingCount;
+				totalTime = WebCommandResult.totalHandlingTime;
+				SdtdConsole.Instance.Output ("Current Web command handlers: " + curHandlers + " - total: " +
+				                             totalHandlers);
+				SdtdConsole.Instance.Output (" - Total time: " + totalTime + " µs" +
+				                             (totalHandlers > 0
+					                             ? " - average time: " + totalTime / totalHandlers + " µs"
+					                             : ""));
 			} catch (Exception e) {
 				Log.Out ("Error in webstat.Run: " + e);
Index: /binary-improvements/MapRendering/MapRendering/Constants.cs
===================================================================
--- /binary-improvements/MapRendering/MapRendering/Constants.cs	(revision 324)
+++ /binary-improvements/MapRendering/MapRendering/Constants.cs	(revision 325)
@@ -1,16 +1,17 @@
-using System;
-
-namespace AllocsFixes.MapRendering
-{
-	public class Constants
-	{
+namespace AllocsFixes.MapRendering {
+	public class Constants {
 		public static int MAP_BLOCK_SIZE = 128;
 		public static int MAP_CHUNK_SIZE = 16;
 		public static int MAP_REGION_SIZE = 512;
-		public static int MAP_BLOCK_TO_CHUNK_DIV { get { return MAP_BLOCK_SIZE / MAP_CHUNK_SIZE; } }
-		public static int MAP_REGION_TO_CHUNK_DIV { get { return MAP_REGION_SIZE / MAP_CHUNK_SIZE; } }
 		public static int ZOOMLEVELS = 5;
 		public static string MAP_DIRECTORY = string.Empty;
+
+		public static int MAP_BLOCK_TO_CHUNK_DIV {
+			get { return MAP_BLOCK_SIZE / MAP_CHUNK_SIZE; }
+		}
+
+		public static int MAP_REGION_TO_CHUNK_DIV {
+			get { return MAP_REGION_SIZE / MAP_CHUNK_SIZE; }
+		}
 	}
 }
-
Index: /binary-improvements/MapRendering/MapRendering/MapRenderBlockBuffer.cs
===================================================================
--- /binary-improvements/MapRendering/MapRendering/MapRenderBlockBuffer.cs	(revision 324)
+++ /binary-improvements/MapRendering/MapRendering/MapRenderBlockBuffer.cs	(revision 325)
@@ -1,34 +1,30 @@
 using System;
 using System.IO;
-using System.Threading;
+using AllocsFixes.FileCache;
 using UnityEngine;
 
-namespace AllocsFixes.MapRendering
-{
-	public class MapRenderBlockBuffer
-	{
-		private int zoomLevel;
+namespace AllocsFixes.MapRendering {
+	public class MapRenderBlockBuffer {
+		private readonly Texture2D blockMap = new Texture2D (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE);
+		private readonly MapTileCache cache;
+		private readonly Color nullColor = new Color (0, 0, 0, 0);
+		private readonly Texture2D zoomBuffer = new Texture2D (1, 1);
+		private readonly int zoomLevel;
 		private string currentBlockMap = string.Empty;
-		private Texture2D blockMap = new Texture2D (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE);
-		private Texture2D zoomBuffer = new Texture2D (1, 1);
-		private Color nullColor = new Color (0, 0, 0, 0);
-		private AllocsFixes.FileCache.MapTileCache cache;
 
-		public MapRenderBlockBuffer (int level, AllocsFixes.FileCache.MapTileCache cache)
-		{
+		public MapRenderBlockBuffer (int level, MapTileCache cache) {
 			zoomLevel = level;
 			this.cache = cache;
 		}
 
-		public void ResetBlock ()
-		{
+		public void ResetBlock () {
 			currentBlockMap = string.Empty;
 		}
 
-		public void SaveBlock ()
-		{
+		public void SaveBlock () {
 			try {
-				if (currentBlockMap.Length > 0)
+				if (currentBlockMap.Length > 0) {
 					saveTextureToFile (currentBlockMap);
+				}
 			} catch (Exception e) {
 				Log.Out ("Exception in MapRenderBlockBuffer.SaveBlock(): " + e);
@@ -36,9 +32,8 @@
 		}
 
-		public bool LoadBlock (Vector2i block)
-		{
+		public bool LoadBlock (Vector2i block) {
 			bool res = false;
 			lock (blockMap) {
-				string folder = Constants.MAP_DIRECTORY + "/" + (zoomLevel) + "/" + block.x;
+				string folder = Constants.MAP_DIRECTORY + "/" + zoomLevel + "/" + block.x;
 				string fileName = folder + "/" + block.y + ".png";
 				Directory.CreateDirectory (folder);
@@ -48,6 +43,8 @@
 					loadTextureFromFile (fileName);
 				}
+
 				currentBlockMap = fileName;
 			}
+
 			return res;
 		}
@@ -55,12 +52,13 @@
 		public void SetPart (Vector2i offset, int partSize, Color32[] pixels) {
 			if (offset.x + partSize > blockMap.width || offset.y + partSize > blockMap.height) {
-				Log.Error (string.Format ("MapBlockBuffer[{0}].SetPart ({1}, {2}, {3}) has blockMap.size ({4}/{5})", zoomLevel, offset, partSize, pixels.Length, blockMap.width, blockMap.height));
+				Log.Error (string.Format ("MapBlockBuffer[{0}].SetPart ({1}, {2}, {3}) has blockMap.size ({4}/{5})",
+					zoomLevel, offset, partSize, pixels.Length, blockMap.width, blockMap.height));
 				return;
 			}
+
 			blockMap.SetPixels32 (offset.x, offset.y, partSize, partSize, pixels);
 		}
 
-		public Color32[] GetHalfScaled ()
-		{
+		public Color32[] GetHalfScaled () {
 			zoomBuffer.Resize (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE);
 			zoomBuffer.SetPixels32 (blockMap.GetPixels32 ());
@@ -71,8 +69,8 @@
 		}
 
-		private void loadTextureFromFile (string _fileName)
-		{
+		private void loadTextureFromFile (string _fileName) {
 			byte[] array = cache.LoadTile (zoomLevel, _fileName);
-			if (array == null || !blockMap.LoadImage (array) || blockMap.height != Constants.MAP_BLOCK_SIZE || blockMap.width != Constants.MAP_BLOCK_SIZE) {
+			if (array == null || !blockMap.LoadImage (array) || blockMap.height != Constants.MAP_BLOCK_SIZE ||
+			    blockMap.width != Constants.MAP_BLOCK_SIZE) {
 				if (array != null) {
 					Log.Error ("Map image tile " + _fileName + " has been corrupted, recreating tile");
@@ -82,4 +80,5 @@
 					blockMap.Resize (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE);
 				}
+
 				for (int x = 0; x < Constants.MAP_BLOCK_SIZE; x++) {
 					for (int y = 0; y < Constants.MAP_BLOCK_SIZE; y++) {
@@ -94,5 +93,4 @@
 			cache.SaveTile (zoomLevel, array);
 		}
-
 	}
 }
Index: /binary-improvements/MapRendering/MapRendering/MapRendering.cs
===================================================================
--- /binary-improvements/MapRendering/MapRendering/MapRendering.cs	(revision 324)
+++ /binary-improvements/MapRendering/MapRendering/MapRendering.cs	(revision 325)
@@ -1,15 +1,46 @@
-using AllocsFixes.JSON;
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;
 using System.Threading;
+using System.Timers;
+using AllocsFixes.FileCache;
+using AllocsFixes.JSON;
 using UnityEngine;
-
-namespace AllocsFixes.MapRendering
-{
-	public class MapRendering
-	{
+using Object = UnityEngine.Object;
+
+namespace AllocsFixes.MapRendering {
+	public class MapRendering {
 		private static MapRendering instance;
+
+		private static readonly object lockObject = new object ();
+		public static bool renderingEnabled = true;
+		private readonly MapTileCache cache = new MapTileCache (Constants.MAP_BLOCK_SIZE);
+		private readonly Dictionary<Vector2i, Color32[]> dirtyChunks = new Dictionary<Vector2i, Color32[]> ();
+		private readonly MicroStopwatch msw = new MicroStopwatch ();
+		private readonly MapRenderBlockBuffer[] zoomLevelBuffers;
+		private Coroutine renderCoroutineRef;
+		private bool renderingFullMap;
+		private float renderTimeout = float.MaxValue;
+
+		private MapRendering () {
+			Constants.MAP_DIRECTORY = GameUtils.GetSaveGameDir () + "/map";
+
+			lock (lockObject) {
+				if (!LoadMapInfo ()) {
+					WriteMapInfo ();
+				}
+			}
+
+			cache.SetZoomCount (Constants.ZOOMLEVELS);
+
+			zoomLevelBuffers = new MapRenderBlockBuffer[Constants.ZOOMLEVELS];
+			for (int i = 0; i < Constants.ZOOMLEVELS; i++) {
+				zoomLevelBuffers [i] = new MapRenderBlockBuffer (i, cache);
+			}
+
+			renderCoroutineRef = ThreadManager.StartCoroutine (renderCoroutine ());
+		}
 
 		public static MapRendering Instance {
@@ -18,43 +49,14 @@
 					instance = new MapRendering ();
 				}
+
 				return instance;
 			}
 		}
 
-		private static object lockObject = new object ();
-		private MapRenderBlockBuffer[] zoomLevelBuffers;
-		private Dictionary<Vector2i, Color32[]> dirtyChunks = new Dictionary<Vector2i, Color32[]> ();
-		private bool renderingFullMap = false;
-		public static bool renderingEnabled = true;
-		private MicroStopwatch msw = new MicroStopwatch ();
-		private AllocsFixes.FileCache.MapTileCache cache = new AllocsFixes.FileCache.MapTileCache (Constants.MAP_BLOCK_SIZE);
-		private float renderTimeout = float.MaxValue;
-		private Coroutine renderCoroutineRef;
-
-		public static AllocsFixes.FileCache.MapTileCache GetTileCache() {
+		public static MapTileCache GetTileCache () {
 			return Instance.cache;
 		}
 
-		private MapRendering ()
-		{
-			Constants.MAP_DIRECTORY = GameUtils.GetSaveGameDir () + "/map";
-
-			lock (lockObject) {
-				if (!LoadMapInfo ())
-					WriteMapInfo ();
-			}
-
-			cache.SetZoomCount (Constants.ZOOMLEVELS);
-
-			zoomLevelBuffers = new MapRenderBlockBuffer[Constants.ZOOMLEVELS];
-			for (int i = 0; i < Constants.ZOOMLEVELS; i++) {
-				zoomLevelBuffers [i] = new MapRenderBlockBuffer (i, cache);
-			}
-
-			renderCoroutineRef = ThreadManager.StartCoroutine (renderCoroutine ());
-		}
-
-		public static void Shutdown ()
-		{
+		public static void Shutdown () {
 			if (Instance.renderCoroutineRef != null) {
 				ThreadManager.StopCoroutine (Instance.renderCoroutineRef);
@@ -63,23 +65,25 @@
 		}
 
-		public static void RenderSingleChunk (Chunk chunk)
-		{
+		public static void RenderSingleChunk (Chunk chunk) {
 			if (renderingEnabled) {
-				ThreadPool.UnsafeQueueUserWorkItem ((o) =>
-				{
+				ThreadPool.UnsafeQueueUserWorkItem (o => {
 					try {
 						if (!Instance.renderingFullMap) {
 							lock (lockObject) {
-								Chunk c = (Chunk)o;
+								Chunk c = (Chunk) o;
 								Vector3i cPos = c.GetWorldPos ();
-								Vector2i cPos2 = new Vector2i (cPos.x / Constants.MAP_CHUNK_SIZE, cPos.z / Constants.MAP_CHUNK_SIZE);
+								Vector2i cPos2 = new Vector2i (cPos.x / Constants.MAP_CHUNK_SIZE,
+									cPos.z / Constants.MAP_CHUNK_SIZE);
 
 								ushort[] mapColors = c.GetMapColors ();
 								if (mapColors != null) {
-									Color32[] realColors = new Color32[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
+									Color32[] realColors =
+										new Color32[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
 									for (int i_colors = 0; i_colors < mapColors.Length; i_colors++) {
 										realColors [i_colors] = shortColorToColor32 (mapColors [i_colors]);
 									}
+
 									Instance.dirtyChunks [cPos2] = realColors;
+
 									//Log.Out ("Add Dirty: " + cPos2);
 								}
@@ -93,6 +97,5 @@
 		}
 
-		public void RenderFullMap ()
-		{
+		public void RenderFullMap () {
 			MicroStopwatch microStopwatch = new MicroStopwatch ();
 
@@ -101,14 +104,16 @@
 			Texture2D fullMapTexture = null;
 
-			Vector2i minChunk = default(Vector2i), maxChunk = default(Vector2i);
-			Vector2i minPos = default(Vector2i), maxPos = default(Vector2i);
+			Vector2i minChunk = default (Vector2i), maxChunk = default (Vector2i);
+			Vector2i minPos = default (Vector2i), maxPos = default (Vector2i);
 			int widthChunks, heightChunks, widthPix, heightPix;
-			getWorldExtent (rfm, out minChunk, out maxChunk, out minPos, out maxPos, out widthChunks, out heightChunks, out widthPix, out heightPix);
-
-			Log.Out (String.Format ("RenderMap: min: {0}, max: {1}, minPos: {2}, maxPos: {3}, w/h: {4}/{5}, wP/hP: {6}/{7}",
-			                        minChunk.ToString (), maxChunk.ToString (),
-			                        minPos.ToString (), maxPos.ToString (),
-			                        widthChunks, heightChunks,
-			                        widthPix, heightPix)
+			getWorldExtent (rfm, out minChunk, out maxChunk, out minPos, out maxPos, out widthChunks, out heightChunks,
+				out widthPix, out heightPix);
+
+			Log.Out (string.Format (
+				"RenderMap: min: {0}, max: {1}, minPos: {2}, maxPos: {3}, w/h: {4}/{5}, wP/hP: {6}/{7}",
+				minChunk.ToString (), maxChunk.ToString (),
+				minPos.ToString (), maxPos.ToString (),
+				widthChunks, heightChunks,
+				widthPix, heightPix)
 			);
 
@@ -121,17 +126,21 @@
 					Directory.Delete (Constants.MAP_DIRECTORY, true);
 				}
+
 				WriteMapInfo ();
 
 				renderingFullMap = true;
 
-				if (widthPix <= 8192 && heightPix <= 8192)
+				if (widthPix <= 8192 && heightPix <= 8192) {
 					fullMapTexture = new Texture2D (widthPix, heightPix);
-
-				Vector2i curFullMapPos = default(Vector2i);
-				Vector2i curChunkPos = default(Vector2i);
+				}
+
+				Vector2i curFullMapPos = default (Vector2i);
+				Vector2i curChunkPos = default (Vector2i);
 				for (curFullMapPos.x = 0; curFullMapPos.x < widthPix; curFullMapPos.x += Constants.MAP_CHUNK_SIZE) {
-					for (curFullMapPos.y = 0; curFullMapPos.y < heightPix; curFullMapPos.y += Constants.MAP_CHUNK_SIZE) {
-						curChunkPos.x = (curFullMapPos.x / Constants.MAP_CHUNK_SIZE) + minChunk.x;
-						curChunkPos.y = (curFullMapPos.y / Constants.MAP_CHUNK_SIZE) + minChunk.y;
+					for (curFullMapPos.y = 0;
+						curFullMapPos.y < heightPix;
+						curFullMapPos.y += Constants.MAP_CHUNK_SIZE) {
+						curChunkPos.x = curFullMapPos.x / Constants.MAP_CHUNK_SIZE + minChunk.x;
+						curChunkPos.y = curFullMapPos.y / Constants.MAP_CHUNK_SIZE + minChunk.y;
 
 						try {
@@ -141,11 +150,15 @@
 								ushort[] mapColors = c.GetMapColors ();
 								if (mapColors != null) {
-									Color32[] realColors = new Color32[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
+									Color32[] realColors =
+										new Color32[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
 									for (int i_colors = 0; i_colors < mapColors.Length; i_colors++) {
 										realColors [i_colors] = shortColorToColor32 (mapColors [i_colors]);
 									}
+
 									dirtyChunks [curChunkPos] = realColors;
-									if (fullMapTexture != null)
-										fullMapTexture.SetPixels32 (curFullMapPos.x, curFullMapPos.y, Constants.MAP_CHUNK_SIZE, Constants.MAP_CHUNK_SIZE, realColors);
+									if (fullMapTexture != null) {
+										fullMapTexture.SetPixels32 (curFullMapPos.x, curFullMapPos.y,
+											Constants.MAP_CHUNK_SIZE, Constants.MAP_CHUNK_SIZE, realColors);
+									}
 								}
 							}
@@ -159,5 +172,6 @@
 					}
 
-					Log.Out (String.Format ("RenderMap: {0}/{1} ({2}%)", curFullMapPos.x, widthPix, (int)((float)curFullMapPos.x / widthPix * 100)));
+					Log.Out (string.Format ("RenderMap: {0}/{1} ({2}%)", curFullMapPos.x, widthPix,
+						(int) ((float) curFullMapPos.x / widthPix * 100)));
 				}
 			}
@@ -166,5 +180,5 @@
 				byte[] array = fullMapTexture.EncodeToPNG ();
 				File.WriteAllBytes (Constants.MAP_DIRECTORY + "/map.png", array);
-				UnityEngine.Object.Destroy (fullMapTexture);
+				Object.Destroy (fullMapTexture);
 				fullMapTexture = null;
 			}
@@ -176,6 +190,5 @@
 		}
 
-		private void SaveAllBlockMaps (object source, System.Timers.ElapsedEventArgs e)
-		{
+		private void SaveAllBlockMaps (object source, ElapsedEventArgs e) {
 			for (int i = 0; i < Constants.ZOOMLEVELS; i++) {
 				zoomLevelBuffers [i].SaveBlock ();
@@ -183,5 +196,5 @@
 		}
 
-		private System.Collections.IEnumerator renderCoroutine () {
+		private IEnumerator renderCoroutine () {
 			while (true) {
 				lock (lockObject) {
@@ -189,14 +202,15 @@
 						renderTimeout = Time.time + 0.5f;
 					}
+
 					if (Time.time > renderTimeout || dirtyChunks.Count > 200) {
 						RenderDirtyChunks ();
 					}
 				}
+
 				yield return new WaitForSeconds (0.2f);
 			}
 		}
 
-		private void RenderDirtyChunks ()
-		{
+		private void RenderDirtyChunks () {
 			msw.ResetAndRestart ();
 
@@ -210,26 +224,30 @@
 				//Log.Out ("Start Dirty: " + chunkPos);
 
-				Vector2i block = default(Vector2i), blockOffset = default(Vector2i);
-				getBlockNumber (chunkPos, out block, out blockOffset, Constants.MAP_BLOCK_TO_CHUNK_DIV, Constants.MAP_CHUNK_SIZE);
+				Vector2i block = default (Vector2i), blockOffset = default (Vector2i);
+				getBlockNumber (chunkPos, out block, out blockOffset, Constants.MAP_BLOCK_TO_CHUNK_DIV,
+					Constants.MAP_CHUNK_SIZE);
 
 				zoomLevelBuffers [Constants.ZOOMLEVELS - 1].LoadBlock (block);
 
-				Vector2i v_block = default(Vector2i), v_blockOffset = default(Vector2i);
+				Vector2i v_block = default (Vector2i), v_blockOffset = default (Vector2i);
 				foreach (Vector2i v in keys) {
-					getBlockNumber (v, out v_block, out v_blockOffset, Constants.MAP_BLOCK_TO_CHUNK_DIV, Constants.MAP_CHUNK_SIZE);
+					getBlockNumber (v, out v_block, out v_blockOffset, Constants.MAP_BLOCK_TO_CHUNK_DIV,
+						Constants.MAP_CHUNK_SIZE);
 					if (v_block.Equals (block)) {
 						//Log.Out ("Dirty: " + v + " render: true");
 						chunksDone.Add (v);
 						if (dirtyChunks [v].Length != Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE) {
-							Log.Error (string.Format ("Rendering chunk has incorrect data size of {0} instead of {1}", dirtyChunks [v].Length, Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE));
-						}
-						zoomLevelBuffers [Constants.ZOOMLEVELS - 1].SetPart (v_blockOffset, Constants.MAP_CHUNK_SIZE, dirtyChunks [v]);
-					} else {
-						//Log.Out ("Dirty: " + v + " render: false");
-					}
-				}
-
-				foreach (Vector2i v in chunksDone)
+							Log.Error (string.Format ("Rendering chunk has incorrect data size of {0} instead of {1}",
+								dirtyChunks [v].Length, Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE));
+						}
+
+						zoomLevelBuffers [Constants.ZOOMLEVELS - 1]
+							.SetPart (v_blockOffset, Constants.MAP_CHUNK_SIZE, dirtyChunks [v]);
+					}
+				}
+
+				foreach (Vector2i v in chunksDone) {
 					dirtyChunks.Remove (v);
+				}
 
 				RenderZoomLevel (Constants.ZOOMLEVELS - 1, block);
@@ -239,12 +257,12 @@
 		}
 
-		private void RenderZoomLevel (int level, Vector2i innerBlock)
-		{
+		private void RenderZoomLevel (int level, Vector2i innerBlock) {
 			if (level > 0) {
-				Vector2i block = default(Vector2i), blockOffset = default(Vector2i);
+				Vector2i block = default (Vector2i), blockOffset = default (Vector2i);
 				getBlockNumber (innerBlock, out block, out blockOffset, 2, Constants.MAP_BLOCK_SIZE / 2);
 
 				zoomLevelBuffers [level - 1].LoadBlock (block);
-				zoomLevelBuffers [level - 1].SetPart (blockOffset, Constants.MAP_BLOCK_SIZE / 2, zoomLevelBuffers [level].GetHalfScaled ());
+				zoomLevelBuffers [level - 1].SetPart (blockOffset, Constants.MAP_BLOCK_SIZE / 2,
+					zoomLevelBuffers [level].GetHalfScaled ());
 
 				RenderZoomLevel (level - 1, block);
@@ -252,16 +270,15 @@
 		}
 
-		private void getBlockNumber (Vector2i innerPos, out Vector2i block, out Vector2i blockOffset, int scaleFactor, int offsetSize)
-		{
-			block = default(Vector2i);
-			blockOffset = default(Vector2i);
-			block.x = ((innerPos.x + 16777216) / scaleFactor) - (16777216 / scaleFactor);
-			block.y = ((innerPos.y + 16777216) / scaleFactor) - (16777216 / scaleFactor);
-			blockOffset.x = ((innerPos.x + 16777216) % scaleFactor) * offsetSize;
-			blockOffset.y = ((innerPos.y + 16777216) % scaleFactor) * offsetSize;
-		}
-
-		private void WriteMapInfo ()
-		{
+		private void getBlockNumber (Vector2i innerPos, out Vector2i block, out Vector2i blockOffset, int scaleFactor,
+			int offsetSize) {
+			block = default (Vector2i);
+			blockOffset = default (Vector2i);
+			block.x = (innerPos.x + 16777216) / scaleFactor - 16777216 / scaleFactor;
+			block.y = (innerPos.y + 16777216) / scaleFactor - 16777216 / scaleFactor;
+			blockOffset.x = (innerPos.x + 16777216) % scaleFactor * offsetSize;
+			blockOffset.y = (innerPos.y + 16777216) % scaleFactor * offsetSize;
+		}
+
+		private void WriteMapInfo () {
 			JSONObject mapInfo = new JSONObject ();
 			mapInfo.Add ("blockSize", new JSONNumber (Constants.MAP_BLOCK_SIZE));
@@ -272,6 +289,5 @@
 		}
 
-		private bool LoadMapInfo ()
-		{
+		private bool LoadMapInfo () {
 			if (File.Exists (Constants.MAP_DIRECTORY + "/mapinfo.json")) {
 				string json = File.ReadAllText (Constants.MAP_DIRECTORY + "/mapinfo.json", Encoding.UTF8);
@@ -279,9 +295,13 @@
 					JSONNode node = Parser.Parse (json);
 					if (node is JSONObject) {
-						JSONObject jo = (JSONObject)node;
-						if (jo.ContainsKey ("blockSize"))
-							Constants.MAP_BLOCK_SIZE = ((JSONNumber)jo ["blockSize"]).GetInt ();
-						if (jo.ContainsKey ("maxZoom"))
-							Constants.ZOOMLEVELS = ((JSONNumber)jo ["maxZoom"]).GetInt () + 1;
+						JSONObject jo = (JSONObject) node;
+						if (jo.ContainsKey ("blockSize")) {
+							Constants.MAP_BLOCK_SIZE = ((JSONNumber) jo ["blockSize"]).GetInt ();
+						}
+
+						if (jo.ContainsKey ("maxZoom")) {
+							Constants.ZOOMLEVELS = ((JSONNumber) jo ["maxZoom"]).GetInt () + 1;
+						}
+
 						return true;
 					}
@@ -292,34 +312,41 @@
 				}
 			}
+
 			return false;
 		}
 
 		private void getWorldExtent (RegionFileManager rfm, out Vector2i minChunk, out Vector2i maxChunk,
-	                                    out Vector2i minPos, out Vector2i maxPos,
-	                                    out int widthChunks, out int heightChunks,
-	                                    out int widthPix, out int heightPix)
-		{
-			minChunk = default(Vector2i);
-			maxChunk = default(Vector2i);
-			minPos = default(Vector2i);
-			maxPos = default(Vector2i);
+			out Vector2i minPos, out Vector2i maxPos,
+			out int widthChunks, out int heightChunks,
+			out int widthPix, out int heightPix) {
+			minChunk = default (Vector2i);
+			maxChunk = default (Vector2i);
+			minPos = default (Vector2i);
+			maxPos = default (Vector2i);
 
 			long[] keys = rfm.GetAllChunkKeys ();
-			int minX = Int32.MaxValue;
-			int minY = Int32.MaxValue;
-			int maxX = Int32.MinValue;
-			int maxY = Int32.MinValue;
+			int minX = int.MaxValue;
+			int minY = int.MaxValue;
+			int maxX = int.MinValue;
+			int maxY = int.MinValue;
 			foreach (long key in keys) {
 				int x = WorldChunkCache.extractX (key);
 				int y = WorldChunkCache.extractZ (key);
 
-				if (x < minX)
+				if (x < minX) {
 					minX = x;
-				if (x > maxX)
+				}
+
+				if (x > maxX) {
 					maxX = x;
-				if (y < minY)
+				}
+
+				if (y < minY) {
 					minY = y;
-				if (y > maxY)
+				}
+
+				if (y > maxY) {
 					maxY = y;
+				}
 			}
 
@@ -343,14 +370,12 @@
 		}
 
-		private static Color shortColorToColor (ushort col)
-		{
-			return new Color (((float)(col >> 10 & 31) / 31f), ((float)(col >> 5 & 31) / 31f), ((float)(col & 31) / 31f), 255);
-		}
-
-		private static Color32 shortColorToColor32 (ushort col)
-		{
-			byte r = (byte)(256 * (col >> 10 & 31) / 32);
-			byte g = (byte)(256 * (col >> 5 & 31) / 32);
-			byte b = (byte)(256 * (col & 31) / 32);
+		private static Color shortColorToColor (ushort col) {
+			return new Color (((col >> 10) & 31) / 31f, ((col >> 5) & 31) / 31f, (col & 31) / 31f, 255);
+		}
+
+		private static Color32 shortColorToColor32 (ushort col) {
+			byte r = (byte) (256 * ((col >> 10) & 31) / 32);
+			byte g = (byte) (256 * ((col >> 5) & 31) / 32);
+			byte b = (byte) (256 * (col & 31) / 32);
 			byte a = 255;
 			return new Color32 (r, g, b, a);
Index: /binary-improvements/MapRendering/Web/API/ExecuteConsoleCommand.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/ExecuteConsoleCommand.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/ExecuteConsoleCommand.cs	(revision 325)
@@ -1,15 +1,11 @@
-using AllocsFixes.JSON;
-using AllocsFixes.PersistentData;
 using System;
-using System.Collections.Generic;
 using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-	public class ExecuteConsoleCommand : WebAPI
-	{
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	public class ExecuteConsoleCommand : WebAPI {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			if (string.IsNullOrEmpty (req.QueryString ["command"])) {
-				resp.StatusCode = (int)HttpStatusCode.BadRequest;
+				resp.StatusCode = (int) HttpStatusCode.BadRequest;
 				Web.SetResponseTextContent (resp, "No command given");
 				return;
@@ -17,7 +13,9 @@
 
 			WebCommandResult.ResultType responseType =
-				req.QueryString ["raw"] != null ? WebCommandResult.ResultType.Raw :
-				(req.QueryString ["simple"] != null ? WebCommandResult.ResultType.ResultOnly :
-					WebCommandResult.ResultType.Full);
+				req.QueryString ["raw"] != null
+					? WebCommandResult.ResultType.Raw
+					: (req.QueryString ["simple"] != null
+						? WebCommandResult.ResultType.ResultOnly
+						: WebCommandResult.ResultType.Full);
 
 			string commandline = req.QueryString ["command"];
@@ -28,13 +26,14 @@
 
 			if (command == null) {
-				resp.StatusCode = (int)HttpStatusCode.NotImplemented;
+				resp.StatusCode = (int) HttpStatusCode.NotImplemented;
 				Web.SetResponseTextContent (resp, "Unknown command");
 				return;
 			}
 
-			AdminToolsCommandPermissions atcp = GameManager.Instance.adminTools.GetAdminToolsCommandPermission (command.GetCommands ());
+			AdminToolsCommandPermissions atcp =
+				GameManager.Instance.adminTools.GetAdminToolsCommandPermission (command.GetCommands ());
 
 			if (permissionLevel > atcp.PermissionLevel) {
-				resp.StatusCode = (int)HttpStatusCode.Forbidden;
+				resp.StatusCode = (int) HttpStatusCode.Forbidden;
 				Web.SetResponseTextContent (resp, "You are not allowed to execute this command");
 				return;
@@ -51,3 +50,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetAllowedCommands.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetAllowedCommands.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetAllowedCommands.cs	(revision 325)
@@ -1,16 +1,14 @@
+using System.Net;
 using AllocsFixes.JSON;
-using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
+namespace AllocsFixes.NetConnections.Servers.Web.API {
 	public class GetAllowedCommands : WebAPI {
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			JSONObject result = new JSONObject ();
 			JSONArray entries = new JSONArray ();
 			foreach (IConsoleCommand cc in SdtdConsole.Instance.GetCommands ()) {
-				AdminToolsCommandPermissions atcp = GameManager.Instance.adminTools.GetAdminToolsCommandPermission (cc.GetCommands ());
+				AdminToolsCommandPermissions atcp =
+					GameManager.Instance.adminTools.GetAdminToolsCommandPermission (cc.GetCommands ());
 				if (permissionLevel <= atcp.PermissionLevel) {
 					string cmd = string.Empty;
@@ -20,4 +18,5 @@
 						}
 					}
+
 					JSONObject cmdObj = new JSONObject ();
 					cmdObj.Add ("command", new JSONString (cmd));
@@ -38,3 +37,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetAnimalsLocation.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetAnimalsLocation.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetAnimalsLocation.cs	(revision 325)
@@ -1,44 +1,41 @@
-﻿using AllocsFixes.JSON;
+﻿using System.Collections.Generic;
+using System.Net;
+using AllocsFixes.JSON;
 using AllocsFixes.LiveData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-    class GetAnimalsLocation : WebAPI
-    {
-		private List<EntityAnimal> animals = new List<EntityAnimal> ();
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	internal class GetAnimalsLocation : WebAPI {
+		private readonly List<EntityAnimal> animals = new List<EntityAnimal> ();
 
-        public override void HandleRequest(HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-        {
-            JSONArray animalsJsResult = new JSONArray();
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
+			JSONArray animalsJsResult = new JSONArray ();
 
 			Animals.Instance.Get (animals);
-			for (int i = 0; i < animals.Count; i++)
-			{
+			for (int i = 0; i < animals.Count; i++) {
 				EntityAnimal entity = animals [i];
-                Vector3i position = new Vector3i(entity.GetPosition());
+				Vector3i position = new Vector3i (entity.GetPosition ());
 
-                JSONObject jsonPOS = new JSONObject();
-                jsonPOS.Add("x", new JSONNumber(position.x));
-                jsonPOS.Add("y", new JSONNumber(position.y));
-                jsonPOS.Add("z", new JSONNumber(position.z));
+				JSONObject jsonPOS = new JSONObject ();
+				jsonPOS.Add ("x", new JSONNumber (position.x));
+				jsonPOS.Add ("y", new JSONNumber (position.y));
+				jsonPOS.Add ("z", new JSONNumber (position.z));
 
-                JSONObject pJson = new JSONObject();
-                pJson.Add("id", new JSONNumber(entity.entityId));
+				JSONObject pJson = new JSONObject ();
+				pJson.Add ("id", new JSONNumber (entity.entityId));
 
-                if (!string.IsNullOrEmpty(entity.EntityName))
-                    pJson.Add("name", new JSONString(entity.EntityName));
-                else
-                    pJson.Add("name", new JSONString("animal class #" + entity.entityClass.ToString()));
+				if (!string.IsNullOrEmpty (entity.EntityName)) {
+					pJson.Add ("name", new JSONString (entity.EntityName));
+				} else {
+					pJson.Add ("name", new JSONString ("animal class #" + entity.entityClass));
+				}
 
-                pJson.Add("position", jsonPOS);
+				pJson.Add ("position", jsonPOS);
 
-                animalsJsResult.Add(pJson);
-            }
-            
-            WriteJSON(resp, animalsJsResult);
-        }
-    }
+				animalsJsResult.Add (pJson);
+			}
+
+			WriteJSON (resp, animalsJsResult);
+		}
+	}
 }
Index: /binary-improvements/MapRendering/Web/API/GetHostileLocation.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetHostileLocation.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetHostileLocation.cs	(revision 325)
@@ -1,44 +1,41 @@
-﻿using AllocsFixes.JSON;
+﻿using System.Collections.Generic;
+using System.Net;
+using AllocsFixes.JSON;
 using AllocsFixes.LiveData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-    class GetHostileLocation : WebAPI
-    {
-		private List<EntityEnemy> enemies = new List<EntityEnemy> ();
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	internal class GetHostileLocation : WebAPI {
+		private readonly List<EntityEnemy> enemies = new List<EntityEnemy> ();
 
-        public override void HandleRequest(HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-        {
-            JSONArray hostilesJsResult = new JSONArray();
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
+			JSONArray hostilesJsResult = new JSONArray ();
 
 			Hostiles.Instance.Get (enemies);
-			for (int i = 0; i < enemies.Count; i++)
-            {
+			for (int i = 0; i < enemies.Count; i++) {
 				EntityEnemy entity = enemies [i];
-                Vector3i position = new Vector3i(entity.GetPosition());
+				Vector3i position = new Vector3i (entity.GetPosition ());
 
-                JSONObject jsonPOS = new JSONObject();
-                jsonPOS.Add("x", new JSONNumber(position.x));
-                jsonPOS.Add("y", new JSONNumber(position.y));
-                jsonPOS.Add("z", new JSONNumber(position.z));
+				JSONObject jsonPOS = new JSONObject ();
+				jsonPOS.Add ("x", new JSONNumber (position.x));
+				jsonPOS.Add ("y", new JSONNumber (position.y));
+				jsonPOS.Add ("z", new JSONNumber (position.z));
 
-                JSONObject pJson = new JSONObject();
-                pJson.Add("id", new JSONNumber(entity.entityId));
+				JSONObject pJson = new JSONObject ();
+				pJson.Add ("id", new JSONNumber (entity.entityId));
 
-                if (!string.IsNullOrEmpty(entity.EntityName))
-                    pJson.Add("name", new JSONString(entity.EntityName));
-                else
-                    pJson.Add("name", new JSONString("enemy class #" + entity.entityClass.ToString()));
+				if (!string.IsNullOrEmpty (entity.EntityName)) {
+					pJson.Add ("name", new JSONString (entity.EntityName));
+				} else {
+					pJson.Add ("name", new JSONString ("enemy class #" + entity.entityClass));
+				}
 
-                pJson.Add("position", jsonPOS);
+				pJson.Add ("position", jsonPOS);
 
-                hostilesJsResult.Add(pJson);
-            }
+				hostilesJsResult.Add (pJson);
+			}
 
-            WriteJSON(resp, hostilesJsResult);
-        }
-    }
+			WriteJSON (resp, hostilesJsResult);
+		}
+	}
 }
Index: /binary-improvements/MapRendering/Web/API/GetLandClaims.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetLandClaims.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetLandClaims.cs	(revision 325)
@@ -1,12 +1,11 @@
+using System.Collections.Generic;
+using System.Net;
 using AllocsFixes.JSON;
 using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
+namespace AllocsFixes.NetConnections.Servers.Web.API {
 	public class GetLandClaims : WebAPI {
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			string requestedSteamID = string.Empty;
 
@@ -15,5 +14,5 @@
 				requestedSteamID = req.QueryString ["steamid"];
 				if (requestedSteamID.Length != 17 || !ulong.TryParse (requestedSteamID, out lViewersSteamID)) {
-					resp.StatusCode = (int)HttpStatusCode.BadRequest;
+					resp.StatusCode = (int) HttpStatusCode.BadRequest;
 					Web.SetResponseTextContent (resp, "Invalid SteamID given");
 					return;
@@ -25,5 +24,5 @@
 
 			bool bViewAll = WebConnection.CanViewAllClaims (permissionLevel);
-            
+
 			JSONObject result = new JSONObject ();
 			result.Add ("claimsize", new JSONNumber (GamePrefs.GetInt (EnumGamePrefs.LandClaimSize)));
@@ -35,20 +34,20 @@
 			if (!string.IsNullOrEmpty (requestedSteamID) || !bViewAll) {
 				if (!string.IsNullOrEmpty (requestedSteamID) && !bViewAll) {
-					ownerFilters = new LandClaimList.OwnerFilter[] {
+					ownerFilters = new[] {
 						LandClaimList.SteamIdFilter (user.SteamID.ToString ()),
 						LandClaimList.SteamIdFilter (requestedSteamID)
 					};
 				} else if (!bViewAll) {
-					ownerFilters = new LandClaimList.OwnerFilter[] { LandClaimList.SteamIdFilter (user.SteamID.ToString ()) };
+					ownerFilters = new[] {LandClaimList.SteamIdFilter (user.SteamID.ToString ())};
 				} else {
-					ownerFilters = new LandClaimList.OwnerFilter[] { LandClaimList.SteamIdFilter (requestedSteamID) };
+					ownerFilters = new[] {LandClaimList.SteamIdFilter (requestedSteamID)};
 				}
 			}
+
 			LandClaimList.PositionFilter[] posFilters = null;
 
-			Dictionary<PersistentData.Player, List<Vector3i>> claims = LandClaimList.GetLandClaims (ownerFilters, posFilters);
+			Dictionary<Player, List<Vector3i>> claims = LandClaimList.GetLandClaims (ownerFilters, posFilters);
 
-			foreach (KeyValuePair<PersistentData.Player, List<Vector3i>> kvp in claims) {
-
+			foreach (KeyValuePair<Player, List<Vector3i>> kvp in claims) {
 				try {
 					JSONObject owner = new JSONObject ();
@@ -83,3 +82,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetLog.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetLog.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetLog.cs	(revision 325)
@@ -1,12 +1,10 @@
-using AllocsFixes.JSON;
-using AllocsFixes.PersistentData;
-using System;
 using System.Collections.Generic;
 using System.Net;
+using AllocsFixes.JSON;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
+namespace AllocsFixes.NetConnections.Servers.Web.API {
 	public class GetLog : WebAPI {
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			int firstLine, lastLine;
 
@@ -39,3 +37,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetPlayerInventories.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetPlayerInventories.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetPlayerInventories.cs	(revision 325)
@@ -1,14 +1,12 @@
+using System.Net;
 using AllocsFixes.JSON;
 using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
 namespace AllocsFixes.NetConnections.Servers.Web.API {
 	public class GetPlayerInventories : WebAPI {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
+			JSONArray AllInventoriesResult = new JSONArray ();
 
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
-			JSONArray AllInventoriesResult = new JSONArray ();
-            
 			foreach (string sid in PersistentContainer.Instance.Players.SteamIDs) {
 				Player p = PersistentContainer.Instance.Players [sid, false];
@@ -55,6 +53,4 @@
 			WriteJSON (resp, AllInventoriesResult);
 		}
-
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs	(revision 325)
@@ -1,15 +1,13 @@
+using System.Collections.Generic;
+using System.Net;
 using AllocsFixes.JSON;
 using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
+namespace AllocsFixes.NetConnections.Servers.Web.API {
 	public class GetPlayerInventory : WebAPI {
-
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			if (req.QueryString ["steamid"] == null) {
-				resp.StatusCode = (int)HttpStatusCode.InternalServerError;
+				resp.StatusCode = (int) HttpStatusCode.InternalServerError;
 				Web.SetResponseTextContent (resp, "No SteamID given");
 				return;
@@ -18,5 +16,5 @@
 			Player p = PersistentContainer.Instance.Players [req.QueryString ["steamid"], false];
 			if (p == null) {
-				resp.StatusCode = (int)HttpStatusCode.InternalServerError;
+				resp.StatusCode = (int) HttpStatusCode.InternalServerError;
 				Web.SetResponseTextContent (resp, "Invalid or unknown SteamID given");
 				return;
@@ -87,11 +85,10 @@
 					jsonItem.Add ("qualitycolor", new JSONString (QualityInfo.GetQualityColorHex (_item.quality)));
 				}
+
 				return jsonItem;
-			} else {
-				return new JSONNull ();
 			}
+
+			return new JSONNull ();
 		}
-
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetPlayerList.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetPlayerList.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetPlayerList.cs	(revision 325)
@@ -1,4 +1,2 @@
-using AllocsFixes.JSON;
-using AllocsFixes.PersistentData;
 using System;
 using System.Collections.Generic;
@@ -6,24 +4,18 @@
 using System.Net;
 using System.Text.RegularExpressions;
-
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-	public class GetPlayerList : WebAPI
-	{
-		private static Regex numberFilterMatcher = new Regex (@"^(>=|=>|>|<=|=<|<|==|=)?\s*([0-9]+(\.[0-9]*)?)$");
-		private enum NumberMatchType {
-			Equal,
-			Greater,
-			GreaterEqual,
-			Lesser,
-			LesserEqual
-		}
-
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-		{
-            AdminTools admTools = GameManager.Instance.adminTools;
-            user = user ?? new WebConnection ("", "", 0L);
-
-            bool bViewAll = WebConnection.CanViewAllPlayers (permissionLevel);
+using AllocsFixes.JSON;
+using AllocsFixes.PersistentData;
+
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	public class GetPlayerList : WebAPI {
+		private static readonly Regex numberFilterMatcher =
+			new Regex (@"^(>=|=>|>|<=|=<|<|==|=)?\s*([0-9]+(\.[0-9]*)?)$");
+
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
+			AdminTools admTools = GameManager.Instance.adminTools;
+			user = user ?? new WebConnection ("", "", 0L);
+
+			bool bViewAll = WebConnection.CanViewAllPlayers (permissionLevel);
 
 			// TODO: Sort (and filter?) prior to converting to JSON ... hard as how to get the correct column's data? (i.e. column name matches JSON object field names, not source data)
@@ -46,26 +38,28 @@
 
 			foreach (string sid in playersList.SteamIDs) {
-                Player p = playersList [sid, false];
-
-                ulong player_steam_ID = 0L;
-                if (!ulong.TryParse (sid, out player_steam_ID))
-                    player_steam_ID = 0L;
-
-                if ((player_steam_ID == user.SteamID) || bViewAll) {
-                    JSONObject pos = new JSONObject ();
-                    pos.Add("x", new JSONNumber (p.LastPosition.x));
-                    pos.Add("y", new JSONNumber (p.LastPosition.y));
-                    pos.Add("z", new JSONNumber (p.LastPosition.z));
-
-                    JSONObject pJson = new JSONObject ();
-                    pJson.Add("steamid", new JSONString (sid));
-					pJson.Add("entityid", new JSONNumber (p.EntityID));
-                    pJson.Add("ip", new JSONString (p.IP));
-                    pJson.Add("name", new JSONString (p.Name));
-                    pJson.Add("online", new JSONBoolean (p.IsOnline));
-                    pJson.Add("position", pos);
+				Player p = playersList [sid, false];
+
+				ulong player_steam_ID = 0L;
+				if (!ulong.TryParse (sid, out player_steam_ID)) {
+					player_steam_ID = 0L;
+				}
+
+				if (player_steam_ID == user.SteamID || bViewAll) {
+					JSONObject pos = new JSONObject ();
+					pos.Add ("x", new JSONNumber (p.LastPosition.x));
+					pos.Add ("y", new JSONNumber (p.LastPosition.y));
+					pos.Add ("z", new JSONNumber (p.LastPosition.z));
+
+					JSONObject pJson = new JSONObject ();
+					pJson.Add ("steamid", new JSONString (sid));
+					pJson.Add ("entityid", new JSONNumber (p.EntityID));
+					pJson.Add ("ip", new JSONString (p.IP));
+					pJson.Add ("name", new JSONString (p.Name));
+					pJson.Add ("online", new JSONBoolean (p.IsOnline));
+					pJson.Add ("position", pos);
 
 					pJson.Add ("totalplaytime", new JSONNumber (p.TotalPlayTime));
-					pJson.Add ("lastonline", new JSONString (p.LastOnline.ToUniversalTime ().ToString ("yyyy-MM-ddTHH:mm:ssZ")));
+					pJson.Add ("lastonline",
+						new JSONString (p.LastOnline.ToUniversalTime ().ToString ("yyyy-MM-ddTHH:mm:ssZ")));
 					pJson.Add ("ping", new JSONNumber (p.IsOnline ? p.ClientInfo.ping : -1));
 
@@ -76,9 +70,10 @@
 						banned = new JSONBoolean (false);
 					}
+
 					pJson.Add ("banned", banned);
 
 					playerList.Add (pJson);
-                }
-            }
+				}
+			}
 
 			IEnumerable<JSONObject> list = playerList;
@@ -124,5 +119,6 @@
 		}
 
-		private IEnumerable<JSONObject> ExecuteFilter (IEnumerable<JSONObject> _list, string _filterCol, string _filterVal) {
+		private IEnumerable<JSONObject> ExecuteFilter (IEnumerable<JSONObject> _list, string _filterCol,
+			string _filterVal) {
 			if (_list.Count () == 0) {
 				return _list;
@@ -131,13 +127,18 @@
 			if (_list.First ().ContainsKey (_filterCol)) {
 				Type colType = _list.First () [_filterCol].GetType ();
-				if (colType == typeof(JSONNumber)) {
+				if (colType == typeof (JSONNumber)) {
 					return ExecuteNumberFilter (_list, _filterCol, _filterVal);
-				} else if (colType == typeof(JSONBoolean)) {
+				}
+
+				if (colType == typeof (JSONBoolean)) {
 					bool value = _filterVal.Trim ().ToLower () == "true";
 					return _list.Where (line => (line [_filterCol] as JSONBoolean).GetBool () == value);
-				} else if (colType == typeof(JSONString)) {
+				}
+
+				if (colType == typeof (JSONString)) {
 					// regex-match whole ^string$, replace * by .*, ? by .?, + by .+
 					_filterVal = _filterVal.Replace ("*", ".*").Replace ("?", ".?").Replace ("+", ".+");
 					_filterVal = "^" + _filterVal + "$";
+
 					//Log.Out ("GetPlayerList: Filter on String with Regex '" + _filterVal + "'");
 					Regex matcher = new Regex (_filterVal, RegexOptions.IgnoreCase);
@@ -145,9 +146,11 @@
 				}
 			}
+
 			return _list;
 		}
 
 
-		private IEnumerable<JSONObject> ExecuteNumberFilter (IEnumerable<JSONObject> _list, string _filterCol, string _filterVal) {
+		private IEnumerable<JSONObject> ExecuteNumberFilter (IEnumerable<JSONObject> _list, string _filterCol,
+			string _filterVal) {
 			// allow value (exact match), =, ==, >=, >, <=, <
 			Match filterMatch = numberFilterMatcher.Match (_filterVal);
@@ -157,46 +160,47 @@
 				double epsilon = value / 100000;
 				switch (filterMatch.Groups [1].Value) {
-				case "":
-				case "=":
-				case "==":
-					matchType = NumberMatchType.Equal;
-					break;
-				case ">":
-					matchType = NumberMatchType.Greater;
-					break;
-				case ">=":
-				case "=>":
-					matchType = NumberMatchType.GreaterEqual;
-					break;
-				case "<":
-					matchType = NumberMatchType.Lesser;
-					break;
-				case "<=":
-				case "=<":
-					matchType = NumberMatchType.LesserEqual;
-					break;
-				default:
-					matchType = NumberMatchType.Equal;
-					break;
-				}
-				return _list.Where (delegate(JSONObject line) {
+					case "":
+					case "=":
+					case "==":
+						matchType = NumberMatchType.Equal;
+						break;
+					case ">":
+						matchType = NumberMatchType.Greater;
+						break;
+					case ">=":
+					case "=>":
+						matchType = NumberMatchType.GreaterEqual;
+						break;
+					case "<":
+						matchType = NumberMatchType.Lesser;
+						break;
+					case "<=":
+					case "=<":
+						matchType = NumberMatchType.LesserEqual;
+						break;
+					default:
+						matchType = NumberMatchType.Equal;
+						break;
+				}
+
+				return _list.Where (delegate (JSONObject line) {
 					double objVal = (line [_filterCol] as JSONNumber).GetDouble ();
 					switch (matchType) {
-					case NumberMatchType.Greater:
-						return objVal > value;
-					case NumberMatchType.GreaterEqual:
-						return objVal >= value;
-					case NumberMatchType.Lesser:
-						return objVal < value;
-					case NumberMatchType.LesserEqual:
-						return objVal <= value;
-					case NumberMatchType.Equal:
-					default:
-						return NearlyEqual (objVal, value, epsilon);
+						case NumberMatchType.Greater:
+							return objVal > value;
+						case NumberMatchType.GreaterEqual:
+							return objVal >= value;
+						case NumberMatchType.Lesser:
+							return objVal < value;
+						case NumberMatchType.LesserEqual:
+							return objVal <= value;
+						case NumberMatchType.Equal:
+						default:
+							return NearlyEqual (objVal, value, epsilon);
 					}
 				});
-			} else {
-				Log.Out ("GetPlayerList: ignoring invalid filter for number-column '{0}': '{1}'", _filterCol, _filterVal);
-			}
+			}
+
+			Log.Out ("GetPlayerList: ignoring invalid filter for number-column '{0}': '{1}'", _filterCol, _filterVal);
 			return _list;
 		}
@@ -210,51 +214,54 @@
 			if (_list.First ().ContainsKey (_sortCol)) {
 				Type colType = _list.First () [_sortCol].GetType ();
-				if (colType == typeof(JSONNumber)) {
+				if (colType == typeof (JSONNumber)) {
 					if (_ascending) {
 						return _list.OrderBy (line => (line [_sortCol] as JSONNumber).GetDouble ());
-					} else {
-						return _list.OrderByDescending (line => (line [_sortCol] as JSONNumber).GetDouble ());
-					}
-				} else if (colType == typeof(JSONBoolean)) {
+					}
+
+					return _list.OrderByDescending (line => (line [_sortCol] as JSONNumber).GetDouble ());
+				}
+
+				if (colType == typeof (JSONBoolean)) {
 					if (_ascending) {
 						return _list.OrderBy (line => (line [_sortCol] as JSONBoolean).GetBool ());
-					} else {
-						return _list.OrderByDescending (line => (line [_sortCol] as JSONBoolean).GetBool ());
-					}
-				} else {
-					if (_ascending) {
-						return _list.OrderBy (line => line [_sortCol].ToString ());
-					} else {
-						return _list.OrderByDescending (line => line [_sortCol].ToString ());
-					}
-				}
-			}
+					}
+
+					return _list.OrderByDescending (line => (line [_sortCol] as JSONBoolean).GetBool ());
+				}
+
+				if (_ascending) {
+					return _list.OrderBy (line => line [_sortCol].ToString ());
+				}
+
+				return _list.OrderByDescending (line => line [_sortCol].ToString ());
+			}
+
 			return _list;
 		}
 
 
-		private bool NearlyEqual(double a, double b, double epsilon)
-		{
-			double absA = Math.Abs(a);
-			double absB = Math.Abs(b);
-			double diff = Math.Abs(a - b);
-
-			if (a == b)
-			{ // shortcut, handles infinities
+		private bool NearlyEqual (double a, double b, double epsilon) {
+			double absA = Math.Abs (a);
+			double absB = Math.Abs (b);
+			double diff = Math.Abs (a - b);
+
+			if (a == b) {
 				return true;
-			} 
-			else if (a == 0 || b == 0 || diff < Double.Epsilon) 
-			{
-				// a or b is zero or both are extremely close to it
-				// relative error is less meaningful here
+			}
+
+			if (a == 0 || b == 0 || diff < double.Epsilon) {
 				return diff < epsilon;
 			}
-			else
-			{ // use relative error
-				return diff / (absA + absB) < epsilon;
-			}
-		}
-
+
+			return diff / (absA + absB) < epsilon;
+		}
+
+		private enum NumberMatchType {
+			Equal,
+			Greater,
+			GreaterEqual,
+			Lesser,
+			LesserEqual
+		}
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs	(revision 325)
@@ -1,16 +1,12 @@
+using System.Net;
 using AllocsFixes.JSON;
 using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-	public class GetPlayersLocation : WebAPI
-	{
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-		{
-            AdminTools admTools = GameManager.Instance.adminTools;
-            user = user ?? new WebConnection ("", "", 0L);
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	public class GetPlayersLocation : WebAPI {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
+			AdminTools admTools = GameManager.Instance.adminTools;
+			user = user ?? new WebConnection ("", "", 0L);
 
 			bool listOffline = false;
@@ -19,44 +15,48 @@
 			}
 
-            bool bViewAll = WebConnection.CanViewAllPlayers (permissionLevel);
+			bool bViewAll = WebConnection.CanViewAllPlayers (permissionLevel);
 
-            JSONArray playersJsResult = new JSONArray ();
+			JSONArray playersJsResult = new JSONArray ();
 
 			Players playersList = PersistentContainer.Instance.Players;
 
 			foreach (string sid in playersList.SteamIDs) {
-                if (admTools != null)
-                    if (admTools.IsBanned (sid))
-                        continue;
+				if (admTools != null) {
+					if (admTools.IsBanned (sid)) {
+						continue;
+					}
+				}
 
-                Player p = playersList [sid, false];
+				Player p = playersList [sid, false];
 
 				if (listOffline || p.IsOnline) {
-	                ulong player_steam_ID = 0L;
-	                if (!ulong.TryParse (sid, out player_steam_ID))
-	                    player_steam_ID = 0L;
+					ulong player_steam_ID = 0L;
+					if (!ulong.TryParse (sid, out player_steam_ID)) {
+						player_steam_ID = 0L;
+					}
 
-	                if ((player_steam_ID == user.SteamID) || bViewAll) {
-	                    JSONObject pos = new JSONObject ();
-	                    pos.Add("x", new JSONNumber (p.LastPosition.x));
-	                    pos.Add("y", new JSONNumber (p.LastPosition.y));
-	                    pos.Add("z", new JSONNumber (p.LastPosition.z));
+					if (player_steam_ID == user.SteamID || bViewAll) {
+						JSONObject pos = new JSONObject ();
+						pos.Add ("x", new JSONNumber (p.LastPosition.x));
+						pos.Add ("y", new JSONNumber (p.LastPosition.y));
+						pos.Add ("z", new JSONNumber (p.LastPosition.z));
 
-	                    JSONObject pJson = new JSONObject ();
-	                    pJson.Add("steamid", new JSONString (sid));
-	//					pJson.Add("entityid", new JSONNumber (p.EntityID));
-	//                    pJson.Add("ip", new JSONString (p.IP));
-	                    pJson.Add("name", new JSONString (p.Name));
-	                    pJson.Add("online", new JSONBoolean (p.IsOnline));
-	                    pJson.Add("position", pos);
+						JSONObject pJson = new JSONObject ();
+						pJson.Add ("steamid", new JSONString (sid));
 
-	//					pJson.Add ("totalplaytime", new JSONNumber (p.TotalPlayTime));
-	//					pJson.Add ("lastonline", new JSONString (p.LastOnline.ToString ("s")));
-	//					pJson.Add ("ping", new JSONNumber (p.IsOnline ? p.ClientInfo.ping : -1));
+						//					pJson.Add("entityid", new JSONNumber (p.EntityID));
+						//                    pJson.Add("ip", new JSONString (p.IP));
+						pJson.Add ("name", new JSONString (p.Name));
+						pJson.Add ("online", new JSONBoolean (p.IsOnline));
+						pJson.Add ("position", pos);
+
+						//					pJson.Add ("totalplaytime", new JSONNumber (p.TotalPlayTime));
+						//					pJson.Add ("lastonline", new JSONString (p.LastOnline.ToString ("s")));
+						//					pJson.Add ("ping", new JSONNumber (p.IsOnline ? p.ClientInfo.ping : -1));
 
 						playersJsResult.Add (pJson);
-	                }
+					}
 				}
-            }
+			}
 
 			WriteJSON (resp, playersJsResult);
@@ -64,3 +64,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetPlayersOnline.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetPlayersOnline.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetPlayersOnline.cs	(revision 325)
@@ -1,15 +1,12 @@
+using System.Collections.Generic;
+using System.Net;
 using AllocsFixes.JSON;
 using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-	public class GetPlayersOnline : WebAPI
-	{
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-		{
-			JSONArray players = new JSONArray();
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	public class GetPlayersOnline : WebAPI {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
+			JSONArray players = new JSONArray ();
 
 			World w = GameManager.Instance.World;
@@ -18,10 +15,10 @@
 				Player player = PersistentContainer.Instance.Players [ci.playerId, false];
 
-				JSONObject pos = new JSONObject();
-				pos.Add ("x", new JSONNumber ((int)current.Value.GetPosition ().x));
-				pos.Add ("y", new JSONNumber ((int)current.Value.GetPosition ().y));
-				pos.Add ("z", new JSONNumber ((int)current.Value.GetPosition ().z));
+				JSONObject pos = new JSONObject ();
+				pos.Add ("x", new JSONNumber ((int) current.Value.GetPosition ().x));
+				pos.Add ("y", new JSONNumber ((int) current.Value.GetPosition ().y));
+				pos.Add ("z", new JSONNumber ((int) current.Value.GetPosition ().z));
 
-				JSONObject p = new JSONObject();
+				JSONObject p = new JSONObject ();
 				p.Add ("steamid", new JSONString (ci.playerId));
 				p.Add ("entityid", new JSONNumber (ci.entityId));
@@ -46,10 +43,9 @@
 				p.Add ("ping", new JSONNumber (ci != null ? ci.ping : -1));
 
-				players.Add(p);
+				players.Add (p);
 			}
 
-			WriteJSON(resp, players);
+			WriteJSON (resp, players);
 		}
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetServerInfo.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetServerInfo.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetServerInfo.cs	(revision 325)
@@ -1,20 +1,16 @@
+using System;
+using System.Net;
 using AllocsFixes.JSON;
-using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-	public class GetServerInfo : WebAPI
-	{
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-		{
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	public class GetServerInfo : WebAPI {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			JSONObject serverInfo = new JSONObject ();
 
 			GameServerInfo gsi = Steam.Masterserver.Server.LocalGameInfo;
 
-			foreach (string stringGamePref in Enum.GetNames(typeof(GameInfoString))) {
-				string value = gsi.GetValue ( (GameInfoString)Enum.Parse (typeof(GameInfoString), stringGamePref) );
+			foreach (string stringGamePref in Enum.GetNames (typeof (GameInfoString))) {
+				string value = gsi.GetValue ((GameInfoString) Enum.Parse (typeof (GameInfoString), stringGamePref));
 
 				JSONObject singleStat = new JSONObject ();
@@ -25,6 +21,6 @@
 			}
 
-			foreach (string intGamePref in Enum.GetNames(typeof(GameInfoInt))) {
-				int value = gsi.GetValue ( (GameInfoInt)Enum.Parse (typeof(GameInfoInt), intGamePref) );
+			foreach (string intGamePref in Enum.GetNames (typeof (GameInfoInt))) {
+				int value = gsi.GetValue ((GameInfoInt) Enum.Parse (typeof (GameInfoInt), intGamePref));
 
 				JSONObject singleStat = new JSONObject ();
@@ -35,6 +31,6 @@
 			}
 
-			foreach (string boolGamePref in Enum.GetNames(typeof(GameInfoBool))) {
-				bool value = gsi.GetValue ( (GameInfoBool)Enum.Parse (typeof(GameInfoBool), boolGamePref) );
+			foreach (string boolGamePref in Enum.GetNames (typeof (GameInfoBool))) {
+				bool value = gsi.GetValue ((GameInfoBool) Enum.Parse (typeof (GameInfoBool), boolGamePref));
 
 				JSONObject singleStat = new JSONObject ();
@@ -46,7 +42,6 @@
 
 
-			WriteJSON(resp, serverInfo);
+			WriteJSON (resp, serverInfo);
 		}
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetStats.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetStats.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetStats.cs	(revision 325)
@@ -1,15 +1,10 @@
+using System.Net;
 using AllocsFixes.JSON;
 using AllocsFixes.LiveData;
-using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-	public class GetStats : WebAPI
-	{
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-		{
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	public class GetStats : WebAPI {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			JSONObject result = new JSONObject ();
 
@@ -32,3 +27,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/GetWebUIUpdates.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/GetWebUIUpdates.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/GetWebUIUpdates.cs	(revision 325)
@@ -1,15 +1,13 @@
+using System.Net;
 using AllocsFixes.JSON;
 using AllocsFixes.LiveData;
-using AllocsFixes.PersistentData;
-using System;
-using System.Collections.Generic;
-using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
+namespace AllocsFixes.NetConnections.Servers.Web.API {
 	public class GetWebUIUpdates : WebAPI {
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			int latestLine;
-			if (req.QueryString ["latestLine"] == null || !int.TryParse (req.QueryString ["latestLine"], out latestLine)) {
+			if (req.QueryString ["latestLine"] == null ||
+			    !int.TryParse (req.QueryString ["latestLine"], out latestLine)) {
 				latestLine = 0;
 			}
@@ -37,3 +35,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/API/Null.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/Null.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/Null.cs	(revision 325)
@@ -1,19 +1,14 @@
-﻿using AllocsFixes.JSON;
-using System;
-using System.Collections.Generic;
-using System.Net;
+﻿using System.Net;
 using System.Text;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-    public class Null : WebAPI
-    {
-        public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-        {
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	public class Null : WebAPI {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			resp.ContentLength64 = 0;
 			resp.ContentType = "text/plain";
 			resp.ContentEncoding = Encoding.ASCII;
 			resp.OutputStream.Write (new byte[] { }, 0, 0);
-        }
-    }
+		}
+	}
 }
Index: /binary-improvements/MapRendering/Web/API/WebAPI.cs
===================================================================
--- /binary-improvements/MapRendering/Web/API/WebAPI.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/API/WebAPI.cs	(revision 325)
@@ -1,12 +1,9 @@
-using System;
 using System.Net;
 using System.Text;
+using AllocsFixes.JSON;
 
-namespace AllocsFixes.NetConnections.Servers.Web.API
-{
-	public abstract class WebAPI
-	{
-		public static void WriteJSON (HttpListenerResponse resp, JSON.JSONNode root)
-		{
+namespace AllocsFixes.NetConnections.Servers.Web.API {
+	public abstract class WebAPI {
+		public static void WriteJSON (HttpListenerResponse resp, JSONNode root) {
 			StringBuilder sb = new StringBuilder ();
 			root.ToString (sb);
@@ -18,6 +15,5 @@
 		}
 
-		public static void WriteText (HttpListenerResponse _resp, string _text)
-		{
+		public static void WriteText (HttpListenerResponse _resp, string _text) {
 			byte[] buf = Encoding.UTF8.GetBytes (_text);
 			_resp.ContentLength64 = buf.Length;
@@ -27,5 +23,6 @@
 		}
 
-		public abstract void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel);
+		public abstract void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel);
 
 		public virtual int DefaultPermissionLevel () {
@@ -34,3 +31,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/ConnectionHandler.cs
===================================================================
--- /binary-improvements/MapRendering/Web/ConnectionHandler.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/ConnectionHandler.cs	(revision 325)
@@ -2,9 +2,8 @@
 using System.Collections.Generic;
 
-namespace AllocsFixes.NetConnections.Servers.Web
-{
+namespace AllocsFixes.NetConnections.Servers.Web {
 	public class ConnectionHandler {
+		private readonly Dictionary<string, WebConnection> connections = new Dictionary<string, WebConnection> ();
 		private Web parent;
-		private Dictionary<string, WebConnection> connections = new Dictionary<string, WebConnection> ();
 
 		public ConnectionHandler (Web _parent) {
@@ -18,4 +17,5 @@
 
 			WebConnection con = connections [_sessionId];
+
 //			if (con.Age.TotalMinutes > parent.sessionTimeoutMinutes) {
 //				connections.Remove (_sessionId);
@@ -49,6 +49,4 @@
 			}
 		}
-
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/Handlers/ApiHandler.cs
===================================================================
--- /binary-improvements/MapRendering/Web/Handlers/ApiHandler.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/Handlers/ApiHandler.cs	(revision 325)
@@ -1,15 +1,12 @@
-using AllocsFixes.NetConnections.Servers.Web.API;
 using System;
 using System.Collections.Generic;
-using System.IO;
 using System.Net;
 using System.Reflection;
-using System.Threading;
+using AllocsFixes.NetConnections.Servers.Web.API;
 
-namespace AllocsFixes.NetConnections.Servers.Web.Handlers
-{
+namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
 	public class ApiHandler : PathHandler {
-		private string staticPart;
-		private Dictionary<String, WebAPI> apis = new Dictionary<string, WebAPI> ();
+		private readonly Dictionary<string, WebAPI> apis = new Dictionary<string, WebAPI> ();
+		private readonly string staticPart;
 
 		public ApiHandler (string staticPart, string moduleName = null) : base (moduleName) {
@@ -17,8 +14,8 @@
 
 			foreach (Type t in Assembly.GetExecutingAssembly ().GetTypes ()) {
-				if (!t.IsAbstract && t.IsSubclassOf (typeof(WebAPI))) {
+				if (!t.IsAbstract && t.IsSubclassOf (typeof (WebAPI))) {
 					ConstructorInfo ctor = t.GetConstructor (new Type [0]);
 					if (ctor != null) {
-						WebAPI apiInstance = (WebAPI)ctor.Invoke (new object [0]);
+						WebAPI apiInstance = (WebAPI) ctor.Invoke (new object [0]);
 						addApi (t.Name.ToLower (), apiInstance);
 					}
@@ -26,14 +23,14 @@
 			}
 
-            // Add dummy types
-            Type dummy_t = typeof (API.Null);
-            ConstructorInfo dummy_ctor = dummy_t.GetConstructor (new Type [0]);
-            if (dummy_ctor != null) {
-                WebAPI dummy_apiInstance = (WebAPI)dummy_ctor.Invoke (new object[0]);
+			// Add dummy types
+			Type dummy_t = typeof (Null);
+			ConstructorInfo dummy_ctor = dummy_t.GetConstructor (new Type [0]);
+			if (dummy_ctor != null) {
+				WebAPI dummy_apiInstance = (WebAPI) dummy_ctor.Invoke (new object[0]);
 
-                // Permissions that don't map to a real API
-                addApi("viewallclaims", dummy_apiInstance);
-                addApi("viewallplayers", dummy_apiInstance);
-            }
+				// Permissions that don't map to a real API
+				addApi ("viewallclaims", dummy_apiInstance);
+				addApi ("viewallplayers", dummy_apiInstance);
+			}
 		}
 
@@ -43,32 +40,32 @@
 		}
 
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			string apiName = req.Url.AbsolutePath.Remove (0, staticPart.Length);
 			if (!AuthorizeForCommand (apiName, user, permissionLevel)) {
-				resp.StatusCode = (int)HttpStatusCode.Forbidden;
+				resp.StatusCode = (int) HttpStatusCode.Forbidden;
 				if (user != null) {
 					//Log.Out ("ApiHandler: user '{0}' not allowed to execute '{1}'", user.SteamID, apiName);
-				} else {
-					//Log.Out ("ApiHandler: unidentified user from '{0}' not allowed to execute '{1}'", req.RemoteEndPoint.Address, apiName);
 				}
+
 				return;
-			} else {
-				foreach (KeyValuePair<string, WebAPI> kvp in apis) {
-					if (apiName.StartsWith (kvp.Key)) {
-						try {
-							kvp.Value.HandleRequest (req, resp, user, permissionLevel);
-							return;
-						} catch (Exception e) {
-							Log.Error ("Error in ApiHandler.HandleRequest(): Handler {0} threw an exception:", kvp.Key);
-							Log.Exception (e);
-							resp.StatusCode = (int)HttpStatusCode.InternalServerError;
-							return;
-						}
+			}
+
+			foreach (KeyValuePair<string, WebAPI> kvp in apis) {
+				if (apiName.StartsWith (kvp.Key)) {
+					try {
+						kvp.Value.HandleRequest (req, resp, user, permissionLevel);
+						return;
+					} catch (Exception e) {
+						Log.Error ("Error in ApiHandler.HandleRequest(): Handler {0} threw an exception:", kvp.Key);
+						Log.Exception (e);
+						resp.StatusCode = (int) HttpStatusCode.InternalServerError;
+						return;
 					}
 				}
 			}
-	
+
 			Log.Out ("Error in ApiHandler.HandleRequest(): No handler found for API \"" + apiName + "\"");
-			resp.StatusCode = (int)HttpStatusCode.NotFound;
+			resp.StatusCode = (int) HttpStatusCode.NotFound;
 		}
 
@@ -76,7 +73,4 @@
 			return WebPermissions.Instance.ModuleAllowedWithLevel ("webapi." + apiName, permissionLevel);
 		}
-
 	}
-
 }
-
Index: /binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs
===================================================================
--- /binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs	(revision 325)
@@ -1,32 +1,33 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Net;
-using System.Threading;
+using UnityEngine;
+using Object = UnityEngine.Object;
 
-using UnityEngine;
-using System.IO;
+namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
+	public class ItemIconHandler : PathHandler {
+		private readonly Dictionary<string, byte[]> icons = new Dictionary<string, byte[]> ();
+		private readonly bool logMissingFiles;
 
-namespace AllocsFixes.NetConnections.Servers.Web.Handlers
-{
-	public class ItemIconHandler : PathHandler {
-		private static ItemIconHandler instance = null;
-		public static ItemIconHandler Instance {
-			get { return instance; }
+		private readonly string staticPart;
+		private bool loaded;
+
+		static ItemIconHandler () {
+			Instance = null;
 		}
 
-		private string staticPart;
-		private bool logMissingFiles;
-		private Dictionary<string, byte[]> icons = new Dictionary<string, byte[]> ();
-		private bool loaded = false;
-
-		public ItemIconHandler (string staticPart, bool logMissingFiles, string moduleName = null) : base(moduleName) {
+		public ItemIconHandler (string staticPart, bool logMissingFiles, string moduleName = null) : base (moduleName) {
 			this.staticPart = staticPart;
 			this.logMissingFiles = logMissingFiles;
-			ItemIconHandler.instance = this;
+			Instance = this;
 		}
 
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public static ItemIconHandler Instance { get; private set; }
+
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			if (!loaded) {
-				resp.StatusCode = (int)HttpStatusCode.InternalServerError;
+				resp.StatusCode = (int) HttpStatusCode.InternalServerError;
 				Log.Out ("Web:IconHandler: Icons not loaded");
 				return;
@@ -44,9 +45,8 @@
 				resp.OutputStream.Write (itemIconData, 0, itemIconData.Length);
 			} else {
-				resp.StatusCode = (int)HttpStatusCode.NotFound;
+				resp.StatusCode = (int) HttpStatusCode.NotFound;
 				if (logMissingFiles) {
 					Log.Out ("Web:IconHandler:FileNotFound: \"" + req.Url.AbsolutePath + "\" ");
 				}
-				return;
 			}
 		}
@@ -66,4 +66,5 @@
 					return false;
 				}
+
 				DynamicUIAtlas atlas = atlasObj.GetComponent<DynamicUIAtlas> ();
 				if (atlas == null) {
@@ -78,5 +79,6 @@
 				Texture2D atlasTex;
 
-				if (!DynamicUIAtlasTools.ReadPrebakedAtlasDescriptor (textureResourceName, out sprites, out elementWidth, out elementHeight)) {
+				if (!DynamicUIAtlasTools.ReadPrebakedAtlasDescriptor (textureResourceName, out sprites,
+					out elementWidth, out elementHeight)) {
 					SdtdConsole.Instance.Output ("Web:IconHandler: Could not read dynamic atlas descriptor");
 					return false;
@@ -98,4 +100,5 @@
 								tintedIcons.Add (name, new List<Color> ());
 							}
+
 							List<Color> list = tintedIcons [name];
 							list.Add (tintColor);
@@ -108,11 +111,13 @@
 					string name = data.name;
 					Texture2D tex = new Texture2D (data.width, data.height, TextureFormat.ARGB32, false);
-					tex.SetPixels (atlasTex.GetPixels (data.x, atlasTex.height - data.height - data.y, data.width, data.height));
+					tex.SetPixels (atlasTex.GetPixels (data.x, atlasTex.height - data.height - data.y, data.width,
+						data.height));
 
 					AddIcon (name, tex, tintedIcons);
 
-					UnityEngine.Object.Destroy (tex);
+					Object.Destroy (tex);
 				}
-				Resources.UnloadAsset(atlasTex);
+
+				Resources.UnloadAsset (atlasTex);
 
 				// Load icons from mods
@@ -131,5 +136,5 @@
 											}
 
-											UnityEngine.Object.Destroy (tex);
+											Object.Destroy (tex);
 										}
 									}
@@ -168,11 +173,9 @@
 						icons [tintedName] = tintedTex.EncodeToPNG ();
 
-						UnityEngine.Object.Destroy (tintedTex);
+						Object.Destroy (tintedTex);
 					}
 				}
 			}
 		}
-
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/Handlers/PathHandler.cs
===================================================================
--- /binary-improvements/MapRendering/Web/Handlers/PathHandler.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/Handlers/PathHandler.cs	(revision 325)
@@ -1,29 +1,27 @@
-using System;
 using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.Handlers
-{
-	public abstract class PathHandler
-	{
-		private string moduleName = null;
+namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
+	public abstract class PathHandler {
+		private readonly string moduleName;
+
+		protected PathHandler (string _moduleName, int _defaultPermissionLevel = 0) {
+			moduleName = _moduleName;
+			WebPermissions.Instance.AddKnownModule (_moduleName, _defaultPermissionLevel);
+		}
+
 		public string ModuleName {
 			get { return moduleName; }
 		}
 
-		protected PathHandler (string _moduleName, int _defaultPermissionLevel = 0) {
-			this.moduleName = _moduleName;
-			WebPermissions.Instance.AddKnownModule (_moduleName, _defaultPermissionLevel);
-		}
-
-		public abstract void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel);
+		public abstract void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel);
 
 		public bool IsAuthorizedForHandler (WebConnection user, int permissionLevel) {
 			if (moduleName != null) {
 				return WebPermissions.Instance.ModuleAllowedWithLevel (moduleName, permissionLevel);
-			} else {
-				return true;
 			}
+
+			return true;
 		}
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/Handlers/SessionHandler.cs
===================================================================
--- /binary-improvements/MapRendering/Web/Handlers/SessionHandler.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/Handlers/SessionHandler.cs	(revision 325)
@@ -1,20 +1,17 @@
-using System;
-using System.Collections.Generic;
 using System.IO;
 using System.Net;
 using System.Text;
-using System.Threading;
 
-namespace AllocsFixes.NetConnections.Servers.Web.Handlers
-{
+namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
 	public class SessionHandler : PathHandler {
-		private string staticPart;
-		private Web parent;
-		private string header = "";
-		private string footer = "";
+		private readonly string footer = "";
+		private readonly string header = "";
+		private readonly Web parent;
+		private readonly string staticPart;
 
-		public SessionHandler (string _staticPart, string _dataFolder, Web _parent, string moduleName = null) : base(moduleName) {
-			this.staticPart = _staticPart;
-			this.parent = _parent;
+		public SessionHandler (string _staticPart, string _dataFolder, Web _parent, string moduleName = null) :
+			base (moduleName) {
+			staticPart = _staticPart;
+			parent = _parent;
 
 			if (File.Exists (_dataFolder + "/sessionheader.tmpl")) {
@@ -27,5 +24,6 @@
 		}
 
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			string subpath = req.Url.AbsolutePath.Remove (0, staticPart.Length);
 
@@ -37,7 +35,8 @@
 					resp.Redirect ("/static/index.html");
 					return;
-				} else {
-					result.Append ("<h1>Login failed, <a href=\"/static/index.html\">click to return to main page</a>.</h1>");
 				}
+
+				result.Append (
+					"<h1>Login failed, <a href=\"/static/index.html\">click to return to main page</a>.</h1>");
 			} else if (subpath.StartsWith ("logout")) {
 				if (user != null) {
@@ -48,7 +47,8 @@
 					resp.Redirect ("/static/index.html");
 					return;
-				} else {
-					result.Append ("<h1>Not logged in, <a href=\"/static/index.html\">click to return to main page</a>.</h1>");
 				}
+
+				result.Append (
+					"<h1>Not logged in, <a href=\"/static/index.html\">click to return to main page</a>.</h1>");
 			} else if (subpath.StartsWith ("login")) {
 				string host = (Web.isSslRedirected (req) ? "https://" : "http://") + req.UserHostName;
@@ -57,5 +57,6 @@
 				return;
 			} else {
-				result.Append ("<h1>Unknown command, <a href=\"/static/index.html\">click to return to main page</a>.</h1>");
+				result.Append (
+					"<h1>Unknown command, <a href=\"/static/index.html\">click to return to main page</a>.</h1>");
 			}
 
@@ -68,7 +69,4 @@
 			resp.OutputStream.Write (buf, 0, buf.Length);
 		}
-
 	}
-
 }
-
Index: /binary-improvements/MapRendering/Web/Handlers/SimpleRedirectHandler.cs
===================================================================
--- /binary-improvements/MapRendering/Web/Handlers/SimpleRedirectHandler.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/Handlers/SimpleRedirectHandler.cs	(revision 325)
@@ -1,21 +1,16 @@
-using System;
 using System.Net;
 
-namespace AllocsFixes.NetConnections.Servers.Web.Handlers
-{
-	public class SimpleRedirectHandler : PathHandler
-	{
-		string target;
+namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
+	public class SimpleRedirectHandler : PathHandler {
+		private readonly string target;
 
-		public SimpleRedirectHandler (string target, string moduleName = null) : base(moduleName)
-		{
+		public SimpleRedirectHandler (string target, string moduleName = null) : base (moduleName) {
 			this.target = target;
 		}
 
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-		{
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			resp.Redirect (target);
 		}
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/Handlers/StaticHandler.cs
===================================================================
--- /binary-improvements/MapRendering/Web/Handlers/StaticHandler.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/Handlers/StaticHandler.cs	(revision 325)
@@ -1,27 +1,23 @@
-using System;
-using System.Collections.Generic;
 using System.IO;
 using System.Net;
-using System.Threading;
+using AllocsFixes.FileCache;
 
-namespace AllocsFixes.NetConnections.Servers.Web.Handlers
-{
-	public class StaticHandler : PathHandler
-	{
-		private string datapath;
-		private string staticPart;
-		private AllocsFixes.FileCache.AbstractCache cache;
-		private bool logMissingFiles;
+namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
+	public class StaticHandler : PathHandler {
+		private readonly AbstractCache cache;
+		private readonly string datapath;
+		private readonly bool logMissingFiles;
+		private readonly string staticPart;
 
-		public StaticHandler (string staticPart, string filePath, AllocsFixes.FileCache.AbstractCache cache, bool logMissingFiles, string moduleName = null) : base(moduleName)
-		{
+		public StaticHandler (string staticPart, string filePath, AbstractCache cache, bool logMissingFiles,
+			string moduleName = null) : base (moduleName) {
 			this.staticPart = staticPart;
-			this.datapath = filePath;
+			datapath = filePath;
 			this.cache = cache;
 			this.logMissingFiles = logMissingFiles;
 		}
 
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel)
-		{
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			string fn = req.Url.AbsolutePath.Remove (0, staticPart.Length);
 
@@ -33,11 +29,11 @@
 				resp.OutputStream.Write (content, 0, content.Length);
 			} else {
-				resp.StatusCode = (int)HttpStatusCode.NotFound;
-				if (logMissingFiles)
-					Log.Out ("Web:Static:FileNotFound: \"" + req.Url.AbsolutePath + "\" @ \"" + datapath + "/" + req.Url.AbsolutePath.Remove (0, staticPart.Length) + "\"");
-				return;
+				resp.StatusCode = (int) HttpStatusCode.NotFound;
+				if (logMissingFiles) {
+					Log.Out ("Web:Static:FileNotFound: \"" + req.Url.AbsolutePath + "\" @ \"" + datapath + "/" +
+					         req.Url.AbsolutePath.Remove (0, staticPart.Length) + "\"");
+				}
 			}
 		}
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/Handlers/UserStatusHandler.cs
===================================================================
--- /binary-improvements/MapRendering/Web/Handlers/UserStatusHandler.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/Handlers/UserStatusHandler.cs	(revision 325)
@@ -1,17 +1,13 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
 using System.Net;
-using System.Threading;
-using System.Text;
 using AllocsFixes.JSON;
+using AllocsFixes.NetConnections.Servers.Web.API;
 
-namespace AllocsFixes.NetConnections.Servers.Web.Handlers
-{
+namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
 	public class UserStatusHandler : PathHandler {
-		public UserStatusHandler (string moduleName = null) : base(moduleName) {
+		public UserStatusHandler (string moduleName = null) : base (moduleName) {
 		}
 
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) {
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
+			int permissionLevel) {
 			JSONObject result = new JSONObject ();
 
@@ -23,14 +19,13 @@
 				JSONObject permObj = new JSONObject ();
 				permObj.Add ("module", new JSONString (perm.module));
-				permObj.Add ("allowed", new JSONBoolean (WebPermissions.Instance.ModuleAllowedWithLevel (perm.module, permissionLevel)));
+				permObj.Add ("allowed",
+					new JSONBoolean (WebPermissions.Instance.ModuleAllowedWithLevel (perm.module, permissionLevel)));
 				perms.Add (permObj);
 			}
+
 			result.Add ("permissions", perms);
 
-			AllocsFixes.NetConnections.Servers.Web.API.WebAPI.WriteJSON (resp, result);
+			WebAPI.WriteJSON (resp, result);
 		}
-
 	}
-
 }
-
Index: /binary-improvements/MapRendering/Web/LogBuffer.cs
===================================================================
--- /binary-improvements/MapRendering/Web/LogBuffer.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/LogBuffer.cs	(revision 325)
@@ -2,12 +2,21 @@
 using System.Collections.Generic;
 using System.Text.RegularExpressions;
-
 using UnityEngine;
 
-namespace AllocsFixes.NetConnections.Servers.Web
-{
+namespace AllocsFixes.NetConnections.Servers.Web {
 	public class LogBuffer {
 		private const int MAX_ENTRIES = 3000;
 		private static LogBuffer instance;
+
+		private static readonly Regex logMessageMatcher =
+			new Regex (@"^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2}) ([0-9]+[,.][0-9]+) [A-Z]+ (.*)$");
+
+		private readonly List<LogEntry> logEntries = new List<LogEntry> ();
+
+		private int listOffset;
+
+		private LogBuffer () {
+			Logger.Main.LogCallbacks += LogCallback;
+		}
 
 		public static LogBuffer Instance {
@@ -16,11 +25,8 @@
 					instance = new LogBuffer ();
 				}
+
 				return instance;
 			}
 		}
-
-		private static Regex logMessageMatcher = new Regex (@"^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2}) ([0-9]+[,.][0-9]+) [A-Z]+ (.*)$");
-		private List<LogEntry> logEntries = new List<LogEntry> ();
-		private int listOffset = 0;
 
 		public int OldestLine {
@@ -55,10 +61,7 @@
 					}
 				}
+
 				return null;
 			}
-		}
-
-		private LogBuffer () {
-			Logger.Main.LogCallbacks += LogCallback;
 		}
 
@@ -123,11 +126,10 @@
 		public class LogEntry {
 			public string date;
+			public string message;
 			public string time;
-			public string uptime;
-			public string message;
 			public string trace;
 			public LogType type;
+			public string uptime;
 		}
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/MimeType.cs
===================================================================
--- /binary-improvements/MapRendering/Web/MimeType.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/MimeType.cs	(revision 325)
@@ -2,573 +2,571 @@
 using System.Collections.Generic;
 
-namespace AllocsFixes.NetConnections.Servers.Web
-{
-	public class MimeType
-	{
-		private static IDictionary<string, string> _mappings = new Dictionary<string, string> (StringComparer.InvariantCultureIgnoreCase) {
-        {".323", "text/h323"},
-        {".3g2", "video/3gpp2"},
-        {".3gp", "video/3gpp"},
-        {".3gp2", "video/3gpp2"},
-        {".3gpp", "video/3gpp"},
-        {".7z", "application/x-7z-compressed"},
-        {".aa", "audio/audible"},
-        {".AAC", "audio/aac"},
-        {".aaf", "application/octet-stream"},
-        {".aax", "audio/vnd.audible.aax"},
-        {".ac3", "audio/ac3"},
-        {".aca", "application/octet-stream"},
-        {".accda", "application/msaccess.addin"},
-        {".accdb", "application/msaccess"},
-        {".accdc", "application/msaccess.cab"},
-        {".accde", "application/msaccess"},
-        {".accdr", "application/msaccess.runtime"},
-        {".accdt", "application/msaccess"},
-        {".accdw", "application/msaccess.webapplication"},
-        {".accft", "application/msaccess.ftemplate"},
-        {".acx", "application/internet-property-stream"},
-        {".AddIn", "text/xml"},
-        {".ade", "application/msaccess"},
-        {".adobebridge", "application/x-bridge-url"},
-        {".adp", "application/msaccess"},
-        {".ADT", "audio/vnd.dlna.adts"},
-        {".ADTS", "audio/aac"},
-        {".afm", "application/octet-stream"},
-        {".ai", "application/postscript"},
-        {".aif", "audio/x-aiff"},
-        {".aifc", "audio/aiff"},
-        {".aiff", "audio/aiff"},
-        {".air", "application/vnd.adobe.air-application-installer-package+zip"},
-        {".amc", "application/x-mpeg"},
-        {".application", "application/x-ms-application"},
-        {".art", "image/x-jg"},
-        {".asa", "application/xml"},
-        {".asax", "application/xml"},
-        {".ascx", "application/xml"},
-        {".asd", "application/octet-stream"},
-        {".asf", "video/x-ms-asf"},
-        {".ashx", "application/xml"},
-        {".asi", "application/octet-stream"},
-        {".asm", "text/plain"},
-        {".asmx", "application/xml"},
-        {".aspx", "application/xml"},
-        {".asr", "video/x-ms-asf"},
-        {".asx", "video/x-ms-asf"},
-        {".atom", "application/atom+xml"},
-        {".au", "audio/basic"},
-        {".avi", "video/x-msvideo"},
-        {".axs", "application/olescript"},
-        {".bas", "text/plain"},
-        {".bcpio", "application/x-bcpio"},
-        {".bin", "application/octet-stream"},
-        {".bmp", "image/bmp"},
-        {".c", "text/plain"},
-        {".cab", "application/octet-stream"},
-        {".caf", "audio/x-caf"},
-        {".calx", "application/vnd.ms-office.calx"},
-        {".cat", "application/vnd.ms-pki.seccat"},
-        {".cc", "text/plain"},
-        {".cd", "text/plain"},
-        {".cdda", "audio/aiff"},
-        {".cdf", "application/x-cdf"},
-        {".cer", "application/x-x509-ca-cert"},
-        {".chm", "application/octet-stream"},
-        {".class", "application/x-java-applet"},
-        {".clp", "application/x-msclip"},
-        {".cmx", "image/x-cmx"},
-        {".cnf", "text/plain"},
-        {".cod", "image/cis-cod"},
-        {".config", "application/xml"},
-        {".contact", "text/x-ms-contact"},
-        {".coverage", "application/xml"},
-        {".cpio", "application/x-cpio"},
-        {".cpp", "text/plain"},
-        {".crd", "application/x-mscardfile"},
-        {".crl", "application/pkix-crl"},
-        {".crt", "application/x-x509-ca-cert"},
-        {".cs", "text/plain"},
-        {".csdproj", "text/plain"},
-        {".csh", "application/x-csh"},
-        {".csproj", "text/plain"},
-        {".css", "text/css"},
-        {".csv", "text/csv"},
-        {".cur", "application/octet-stream"},
-        {".cxx", "text/plain"},
-        {".dat", "application/octet-stream"},
-        {".datasource", "application/xml"},
-        {".dbproj", "text/plain"},
-        {".dcr", "application/x-director"},
-        {".def", "text/plain"},
-        {".deploy", "application/octet-stream"},
-        {".der", "application/x-x509-ca-cert"},
-        {".dgml", "application/xml"},
-        {".dib", "image/bmp"},
-        {".dif", "video/x-dv"},
-        {".dir", "application/x-director"},
-        {".disco", "text/xml"},
-        {".dll", "application/x-msdownload"},
-        {".dll.config", "text/xml"},
-        {".dlm", "text/dlm"},
-        {".doc", "application/msword"},
-        {".docm", "application/vnd.ms-word.document.macroEnabled.12"},
-        {".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
-        {".dot", "application/msword"},
-        {".dotm", "application/vnd.ms-word.template.macroEnabled.12"},
-        {".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"},
-        {".dsp", "application/octet-stream"},
-        {".dsw", "text/plain"},
-        {".dtd", "text/xml"},
-        {".dtsConfig", "text/xml"},
-        {".dv", "video/x-dv"},
-        {".dvi", "application/x-dvi"},
-        {".dwf", "drawing/x-dwf"},
-        {".dwp", "application/octet-stream"},
-        {".dxr", "application/x-director"},
-        {".eml", "message/rfc822"},
-        {".emz", "application/octet-stream"},
-        {".eot", "application/octet-stream"},
-        {".eps", "application/postscript"},
-        {".etl", "application/etl"},
-        {".etx", "text/x-setext"},
-        {".evy", "application/envoy"},
-        {".exe", "application/octet-stream"},
-        {".exe.config", "text/xml"},
-        {".fdf", "application/vnd.fdf"},
-        {".fif", "application/fractals"},
-        {".filters", "Application/xml"},
-        {".fla", "application/octet-stream"},
-        {".flr", "x-world/x-vrml"},
-        {".flv", "video/x-flv"},
-        {".fsscript", "application/fsharp-script"},
-        {".fsx", "application/fsharp-script"},
-        {".generictest", "application/xml"},
-        {".gif", "image/gif"},
-        {".group", "text/x-ms-group"},
-        {".gsm", "audio/x-gsm"},
-        {".gtar", "application/x-gtar"},
-        {".gz", "application/x-gzip"},
-        {".h", "text/plain"},
-        {".hdf", "application/x-hdf"},
-        {".hdml", "text/x-hdml"},
-        {".hhc", "application/x-oleobject"},
-        {".hhk", "application/octet-stream"},
-        {".hhp", "application/octet-stream"},
-        {".hlp", "application/winhlp"},
-        {".hpp", "text/plain"},
-        {".hqx", "application/mac-binhex40"},
-        {".hta", "application/hta"},
-        {".htc", "text/x-component"},
-        {".htm", "text/html"},
-        {".html", "text/html"},
-        {".htt", "text/webviewhtml"},
-        {".hxa", "application/xml"},
-        {".hxc", "application/xml"},
-        {".hxd", "application/octet-stream"},
-        {".hxe", "application/xml"},
-        {".hxf", "application/xml"},
-        {".hxh", "application/octet-stream"},
-        {".hxi", "application/octet-stream"},
-        {".hxk", "application/xml"},
-        {".hxq", "application/octet-stream"},
-        {".hxr", "application/octet-stream"},
-        {".hxs", "application/octet-stream"},
-        {".hxt", "text/html"},
-        {".hxv", "application/xml"},
-        {".hxw", "application/octet-stream"},
-        {".hxx", "text/plain"},
-        {".i", "text/plain"},
-        {".ico", "image/x-icon"},
-        {".ics", "application/octet-stream"},
-        {".idl", "text/plain"},
-        {".ief", "image/ief"},
-        {".iii", "application/x-iphone"},
-        {".inc", "text/plain"},
-        {".inf", "application/octet-stream"},
-        {".inl", "text/plain"},
-        {".ins", "application/x-internet-signup"},
-        {".ipa", "application/x-itunes-ipa"},
-        {".ipg", "application/x-itunes-ipg"},
-        {".ipproj", "text/plain"},
-        {".ipsw", "application/x-itunes-ipsw"},
-        {".iqy", "text/x-ms-iqy"},
-        {".isp", "application/x-internet-signup"},
-        {".ite", "application/x-itunes-ite"},
-        {".itlp", "application/x-itunes-itlp"},
-        {".itms", "application/x-itunes-itms"},
-        {".itpc", "application/x-itunes-itpc"},
-        {".IVF", "video/x-ivf"},
-        {".jar", "application/java-archive"},
-        {".java", "application/octet-stream"},
-        {".jck", "application/liquidmotion"},
-        {".jcz", "application/liquidmotion"},
-        {".jfif", "image/pjpeg"},
-        {".jnlp", "application/x-java-jnlp-file"},
-        {".jpb", "application/octet-stream"},
-        {".jpe", "image/jpeg"},
-        {".jpeg", "image/jpeg"},
-        {".jpg", "image/jpeg"},
-        {".js", "application/x-javascript"},
-		{".json", "application/json"},
-        {".jsx", "text/jscript"},
-        {".jsxbin", "text/plain"},
-        {".latex", "application/x-latex"},
-        {".library-ms", "application/windows-library+xml"},
-        {".lit", "application/x-ms-reader"},
-        {".loadtest", "application/xml"},
-        {".lpk", "application/octet-stream"},
-        {".lsf", "video/x-la-asf"},
-        {".lst", "text/plain"},
-        {".lsx", "video/x-la-asf"},
-        {".lzh", "application/octet-stream"},
-        {".m13", "application/x-msmediaview"},
-        {".m14", "application/x-msmediaview"},
-        {".m1v", "video/mpeg"},
-        {".m2t", "video/vnd.dlna.mpeg-tts"},
-        {".m2ts", "video/vnd.dlna.mpeg-tts"},
-        {".m2v", "video/mpeg"},
-        {".m3u", "audio/x-mpegurl"},
-        {".m3u8", "audio/x-mpegurl"},
-        {".m4a", "audio/m4a"},
-        {".m4b", "audio/m4b"},
-        {".m4p", "audio/m4p"},
-        {".m4r", "audio/x-m4r"},
-        {".m4v", "video/x-m4v"},
-        {".mac", "image/x-macpaint"},
-        {".mak", "text/plain"},
-        {".man", "application/x-troff-man"},
-        {".manifest", "application/x-ms-manifest"},
-        {".map", "text/plain"},
-        {".master", "application/xml"},
-        {".mda", "application/msaccess"},
-        {".mdb", "application/x-msaccess"},
-        {".mde", "application/msaccess"},
-        {".mdp", "application/octet-stream"},
-        {".me", "application/x-troff-me"},
-        {".mfp", "application/x-shockwave-flash"},
-        {".mht", "message/rfc822"},
-        {".mhtml", "message/rfc822"},
-        {".mid", "audio/mid"},
-        {".midi", "audio/mid"},
-        {".mix", "application/octet-stream"},
-        {".mk", "text/plain"},
-        {".mmf", "application/x-smaf"},
-        {".mno", "text/xml"},
-        {".mny", "application/x-msmoney"},
-        {".mod", "video/mpeg"},
-        {".mov", "video/quicktime"},
-        {".movie", "video/x-sgi-movie"},
-        {".mp2", "video/mpeg"},
-        {".mp2v", "video/mpeg"},
-        {".mp3", "audio/mpeg"},
-        {".mp4", "video/mp4"},
-        {".mp4v", "video/mp4"},
-        {".mpa", "video/mpeg"},
-        {".mpe", "video/mpeg"},
-        {".mpeg", "video/mpeg"},
-        {".mpf", "application/vnd.ms-mediapackage"},
-        {".mpg", "video/mpeg"},
-        {".mpp", "application/vnd.ms-project"},
-        {".mpv2", "video/mpeg"},
-        {".mqv", "video/quicktime"},
-        {".ms", "application/x-troff-ms"},
-        {".msi", "application/octet-stream"},
-        {".mso", "application/octet-stream"},
-        {".mts", "video/vnd.dlna.mpeg-tts"},
-        {".mtx", "application/xml"},
-        {".mvb", "application/x-msmediaview"},
-        {".mvc", "application/x-miva-compiled"},
-        {".mxp", "application/x-mmxp"},
-        {".nc", "application/x-netcdf"},
-        {".nsc", "video/x-ms-asf"},
-        {".nws", "message/rfc822"},
-        {".ocx", "application/octet-stream"},
-        {".oda", "application/oda"},
-        {".odc", "text/x-ms-odc"},
-        {".odh", "text/plain"},
-        {".odl", "text/plain"},
-        {".odp", "application/vnd.oasis.opendocument.presentation"},
-        {".ods", "application/oleobject"},
-        {".odt", "application/vnd.oasis.opendocument.text"},
-        {".one", "application/onenote"},
-        {".onea", "application/onenote"},
-        {".onepkg", "application/onenote"},
-        {".onetmp", "application/onenote"},
-        {".onetoc", "application/onenote"},
-        {".onetoc2", "application/onenote"},
-        {".orderedtest", "application/xml"},
-        {".osdx", "application/opensearchdescription+xml"},
-        {".p10", "application/pkcs10"},
-        {".p12", "application/x-pkcs12"},
-        {".p7b", "application/x-pkcs7-certificates"},
-        {".p7c", "application/pkcs7-mime"},
-        {".p7m", "application/pkcs7-mime"},
-        {".p7r", "application/x-pkcs7-certreqresp"},
-        {".p7s", "application/pkcs7-signature"},
-        {".pbm", "image/x-portable-bitmap"},
-        {".pcast", "application/x-podcast"},
-        {".pct", "image/pict"},
-        {".pcx", "application/octet-stream"},
-        {".pcz", "application/octet-stream"},
-        {".pdf", "application/pdf"},
-        {".pfb", "application/octet-stream"},
-        {".pfm", "application/octet-stream"},
-        {".pfx", "application/x-pkcs12"},
-        {".pgm", "image/x-portable-graymap"},
-        {".pic", "image/pict"},
-        {".pict", "image/pict"},
-        {".pkgdef", "text/plain"},
-        {".pkgundef", "text/plain"},
-        {".pko", "application/vnd.ms-pki.pko"},
-        {".pls", "audio/scpls"},
-        {".pma", "application/x-perfmon"},
-        {".pmc", "application/x-perfmon"},
-        {".pml", "application/x-perfmon"},
-        {".pmr", "application/x-perfmon"},
-        {".pmw", "application/x-perfmon"},
-        {".png", "image/png"},
-        {".pnm", "image/x-portable-anymap"},
-        {".pnt", "image/x-macpaint"},
-        {".pntg", "image/x-macpaint"},
-        {".pnz", "image/png"},
-        {".pot", "application/vnd.ms-powerpoint"},
-        {".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12"},
-        {".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"},
-        {".ppa", "application/vnd.ms-powerpoint"},
-        {".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"},
-        {".ppm", "image/x-portable-pixmap"},
-        {".pps", "application/vnd.ms-powerpoint"},
-        {".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"},
-        {".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"},
-        {".ppt", "application/vnd.ms-powerpoint"},
-        {".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"},
-        {".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"},
-        {".prf", "application/pics-rules"},
-        {".prm", "application/octet-stream"},
-        {".prx", "application/octet-stream"},
-        {".ps", "application/postscript"},
-        {".psc1", "application/PowerShell"},
-        {".psd", "application/octet-stream"},
-        {".psess", "application/xml"},
-        {".psm", "application/octet-stream"},
-        {".psp", "application/octet-stream"},
-        {".pub", "application/x-mspublisher"},
-        {".pwz", "application/vnd.ms-powerpoint"},
-        {".qht", "text/x-html-insertion"},
-        {".qhtm", "text/x-html-insertion"},
-        {".qt", "video/quicktime"},
-        {".qti", "image/x-quicktime"},
-        {".qtif", "image/x-quicktime"},
-        {".qtl", "application/x-quicktimeplayer"},
-        {".qxd", "application/octet-stream"},
-        {".ra", "audio/x-pn-realaudio"},
-        {".ram", "audio/x-pn-realaudio"},
-        {".rar", "application/octet-stream"},
-        {".ras", "image/x-cmu-raster"},
-        {".rat", "application/rat-file"},
-        {".rc", "text/plain"},
-        {".rc2", "text/plain"},
-        {".rct", "text/plain"},
-        {".rdlc", "application/xml"},
-        {".resx", "application/xml"},
-        {".rf", "image/vnd.rn-realflash"},
-        {".rgb", "image/x-rgb"},
-        {".rgs", "text/plain"},
-        {".rm", "application/vnd.rn-realmedia"},
-        {".rmi", "audio/mid"},
-        {".rmp", "application/vnd.rn-rn_music_package"},
-        {".roff", "application/x-troff"},
-        {".rpm", "audio/x-pn-realaudio-plugin"},
-        {".rqy", "text/x-ms-rqy"},
-        {".rtf", "application/rtf"},
-        {".rtx", "text/richtext"},
-        {".ruleset", "application/xml"},
-        {".s", "text/plain"},
-        {".safariextz", "application/x-safari-safariextz"},
-        {".scd", "application/x-msschedule"},
-        {".sct", "text/scriptlet"},
-        {".sd2", "audio/x-sd2"},
-        {".sdp", "application/sdp"},
-        {".sea", "application/octet-stream"},
-        {".searchConnector-ms", "application/windows-search-connector+xml"},
-        {".setpay", "application/set-payment-initiation"},
-        {".setreg", "application/set-registration-initiation"},
-        {".settings", "application/xml"},
-        {".sgimb", "application/x-sgimb"},
-        {".sgml", "text/sgml"},
-        {".sh", "application/x-sh"},
-        {".shar", "application/x-shar"},
-        {".shtml", "text/html"},
-        {".sit", "application/x-stuffit"},
-        {".sitemap", "application/xml"},
-        {".skin", "application/xml"},
-        {".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"},
-        {".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"},
-        {".slk", "application/vnd.ms-excel"},
-        {".sln", "text/plain"},
-        {".slupkg-ms", "application/x-ms-license"},
-        {".smd", "audio/x-smd"},
-        {".smi", "application/octet-stream"},
-        {".smx", "audio/x-smd"},
-        {".smz", "audio/x-smd"},
-        {".snd", "audio/basic"},
-        {".snippet", "application/xml"},
-        {".snp", "application/octet-stream"},
-        {".sol", "text/plain"},
-        {".sor", "text/plain"},
-        {".spc", "application/x-pkcs7-certificates"},
-        {".spl", "application/futuresplash"},
-        {".src", "application/x-wais-source"},
-        {".srf", "text/plain"},
-        {".SSISDeploymentManifest", "text/xml"},
-        {".ssm", "application/streamingmedia"},
-        {".sst", "application/vnd.ms-pki.certstore"},
-        {".stl", "application/vnd.ms-pki.stl"},
-        {".sv4cpio", "application/x-sv4cpio"},
-        {".sv4crc", "application/x-sv4crc"},
-        {".svc", "application/xml"},
-        {".swf", "application/x-shockwave-flash"},
-        {".t", "application/x-troff"},
-        {".tar", "application/x-tar"},
-        {".tcl", "application/x-tcl"},
-        {".testrunconfig", "application/xml"},
-        {".testsettings", "application/xml"},
-        {".tex", "application/x-tex"},
-        {".texi", "application/x-texinfo"},
-        {".texinfo", "application/x-texinfo"},
-        {".tgz", "application/x-compressed"},
-        {".thmx", "application/vnd.ms-officetheme"},
-        {".thn", "application/octet-stream"},
-        {".tif", "image/tiff"},
-        {".tiff", "image/tiff"},
-        {".tlh", "text/plain"},
-        {".tli", "text/plain"},
-        {".toc", "application/octet-stream"},
-        {".tr", "application/x-troff"},
-        {".trm", "application/x-msterminal"},
-        {".trx", "application/xml"},
-        {".ts", "video/vnd.dlna.mpeg-tts"},
-        {".tsv", "text/tab-separated-values"},
-        {".ttf", "application/octet-stream"},
-        {".tts", "video/vnd.dlna.mpeg-tts"},
-        {".txt", "text/plain"},
-        {".u32", "application/octet-stream"},
-        {".uls", "text/iuls"},
-        {".user", "text/plain"},
-        {".ustar", "application/x-ustar"},
-        {".vb", "text/plain"},
-        {".vbdproj", "text/plain"},
-        {".vbk", "video/mpeg"},
-        {".vbproj", "text/plain"},
-        {".vbs", "text/vbscript"},
-        {".vcf", "text/x-vcard"},
-        {".vcproj", "Application/xml"},
-        {".vcs", "text/plain"},
-        {".vcxproj", "Application/xml"},
-        {".vddproj", "text/plain"},
-        {".vdp", "text/plain"},
-        {".vdproj", "text/plain"},
-        {".vdx", "application/vnd.ms-visio.viewer"},
-        {".vml", "text/xml"},
-        {".vscontent", "application/xml"},
-        {".vsct", "text/xml"},
-        {".vsd", "application/vnd.visio"},
-        {".vsi", "application/ms-vsi"},
-        {".vsix", "application/vsix"},
-        {".vsixlangpack", "text/xml"},
-        {".vsixmanifest", "text/xml"},
-        {".vsmdi", "application/xml"},
-        {".vspscc", "text/plain"},
-        {".vss", "application/vnd.visio"},
-        {".vsscc", "text/plain"},
-        {".vssettings", "text/xml"},
-        {".vssscc", "text/plain"},
-        {".vst", "application/vnd.visio"},
-        {".vstemplate", "text/xml"},
-        {".vsto", "application/x-ms-vsto"},
-        {".vsw", "application/vnd.visio"},
-        {".vsx", "application/vnd.visio"},
-        {".vtx", "application/vnd.visio"},
-        {".wav", "audio/wav"},
-        {".wave", "audio/wav"},
-        {".wax", "audio/x-ms-wax"},
-        {".wbk", "application/msword"},
-        {".wbmp", "image/vnd.wap.wbmp"},
-        {".wcm", "application/vnd.ms-works"},
-        {".wdb", "application/vnd.ms-works"},
-        {".wdp", "image/vnd.ms-photo"},
-        {".webarchive", "application/x-safari-webarchive"},
-        {".webtest", "application/xml"},
-        {".wiq", "application/xml"},
-        {".wiz", "application/msword"},
-        {".wks", "application/vnd.ms-works"},
-        {".WLMP", "application/wlmoviemaker"},
-        {".wlpginstall", "application/x-wlpg-detect"},
-        {".wlpginstall3", "application/x-wlpg3-detect"},
-        {".wm", "video/x-ms-wm"},
-        {".wma", "audio/x-ms-wma"},
-        {".wmd", "application/x-ms-wmd"},
-        {".wmf", "application/x-msmetafile"},
-        {".wml", "text/vnd.wap.wml"},
-        {".wmlc", "application/vnd.wap.wmlc"},
-        {".wmls", "text/vnd.wap.wmlscript"},
-        {".wmlsc", "application/vnd.wap.wmlscriptc"},
-        {".wmp", "video/x-ms-wmp"},
-        {".wmv", "video/x-ms-wmv"},
-        {".wmx", "video/x-ms-wmx"},
-        {".wmz", "application/x-ms-wmz"},
-        {".wpl", "application/vnd.ms-wpl"},
-        {".wps", "application/vnd.ms-works"},
-        {".wri", "application/x-mswrite"},
-        {".wrl", "x-world/x-vrml"},
-        {".wrz", "x-world/x-vrml"},
-        {".wsc", "text/scriptlet"},
-        {".wsdl", "text/xml"},
-        {".wvx", "video/x-ms-wvx"},
-        {".x", "application/directx"},
-        {".xaf", "x-world/x-vrml"},
-        {".xaml", "application/xaml+xml"},
-        {".xap", "application/x-silverlight-app"},
-        {".xbap", "application/x-ms-xbap"},
-        {".xbm", "image/x-xbitmap"},
-        {".xdr", "text/plain"},
-        {".xht", "application/xhtml+xml"},
-        {".xhtml", "application/xhtml+xml"},
-        {".xla", "application/vnd.ms-excel"},
-        {".xlam", "application/vnd.ms-excel.addin.macroEnabled.12"},
-        {".xlc", "application/vnd.ms-excel"},
-        {".xld", "application/vnd.ms-excel"},
-        {".xlk", "application/vnd.ms-excel"},
-        {".xll", "application/vnd.ms-excel"},
-        {".xlm", "application/vnd.ms-excel"},
-        {".xls", "application/vnd.ms-excel"},
-        {".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"},
-        {".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"},
-        {".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
-        {".xlt", "application/vnd.ms-excel"},
-        {".xltm", "application/vnd.ms-excel.template.macroEnabled.12"},
-        {".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"},
-        {".xlw", "application/vnd.ms-excel"},
-        {".xml", "text/xml"},
-        {".xmta", "application/xml"},
-        {".xof", "x-world/x-vrml"},
-        {".XOML", "text/plain"},
-        {".xpm", "image/x-xpixmap"},
-        {".xps", "application/vnd.ms-xpsdocument"},
-        {".xrm-ms", "text/xml"},
-        {".xsc", "application/xml"},
-        {".xsd", "text/xml"},
-        {".xsf", "text/xml"},
-        {".xsl", "text/xml"},
-        {".xslt", "text/xml"},
-        {".xsn", "application/octet-stream"},
-        {".xss", "application/xml"},
-        {".xtp", "application/octet-stream"},
-        {".xwd", "image/x-xwindowdump"},
-        {".z", "application/x-compress"},
-        {".zip", "application/x-zip-compressed"},
-        };
+namespace AllocsFixes.NetConnections.Servers.Web {
+	public class MimeType {
+		private static readonly IDictionary<string, string> _mappings =
+			new Dictionary<string, string> (StringComparer.InvariantCultureIgnoreCase) {
+				{".323", "text/h323"},
+				{".3g2", "video/3gpp2"},
+				{".3gp", "video/3gpp"},
+				{".3gp2", "video/3gpp2"},
+				{".3gpp", "video/3gpp"},
+				{".7z", "application/x-7z-compressed"},
+				{".aa", "audio/audible"},
+				{".AAC", "audio/aac"},
+				{".aaf", "application/octet-stream"},
+				{".aax", "audio/vnd.audible.aax"},
+				{".ac3", "audio/ac3"},
+				{".aca", "application/octet-stream"},
+				{".accda", "application/msaccess.addin"},
+				{".accdb", "application/msaccess"},
+				{".accdc", "application/msaccess.cab"},
+				{".accde", "application/msaccess"},
+				{".accdr", "application/msaccess.runtime"},
+				{".accdt", "application/msaccess"},
+				{".accdw", "application/msaccess.webapplication"},
+				{".accft", "application/msaccess.ftemplate"},
+				{".acx", "application/internet-property-stream"},
+				{".AddIn", "text/xml"},
+				{".ade", "application/msaccess"},
+				{".adobebridge", "application/x-bridge-url"},
+				{".adp", "application/msaccess"},
+				{".ADT", "audio/vnd.dlna.adts"},
+				{".ADTS", "audio/aac"},
+				{".afm", "application/octet-stream"},
+				{".ai", "application/postscript"},
+				{".aif", "audio/x-aiff"},
+				{".aifc", "audio/aiff"},
+				{".aiff", "audio/aiff"},
+				{".air", "application/vnd.adobe.air-application-installer-package+zip"},
+				{".amc", "application/x-mpeg"},
+				{".application", "application/x-ms-application"},
+				{".art", "image/x-jg"},
+				{".asa", "application/xml"},
+				{".asax", "application/xml"},
+				{".ascx", "application/xml"},
+				{".asd", "application/octet-stream"},
+				{".asf", "video/x-ms-asf"},
+				{".ashx", "application/xml"},
+				{".asi", "application/octet-stream"},
+				{".asm", "text/plain"},
+				{".asmx", "application/xml"},
+				{".aspx", "application/xml"},
+				{".asr", "video/x-ms-asf"},
+				{".asx", "video/x-ms-asf"},
+				{".atom", "application/atom+xml"},
+				{".au", "audio/basic"},
+				{".avi", "video/x-msvideo"},
+				{".axs", "application/olescript"},
+				{".bas", "text/plain"},
+				{".bcpio", "application/x-bcpio"},
+				{".bin", "application/octet-stream"},
+				{".bmp", "image/bmp"},
+				{".c", "text/plain"},
+				{".cab", "application/octet-stream"},
+				{".caf", "audio/x-caf"},
+				{".calx", "application/vnd.ms-office.calx"},
+				{".cat", "application/vnd.ms-pki.seccat"},
+				{".cc", "text/plain"},
+				{".cd", "text/plain"},
+				{".cdda", "audio/aiff"},
+				{".cdf", "application/x-cdf"},
+				{".cer", "application/x-x509-ca-cert"},
+				{".chm", "application/octet-stream"},
+				{".class", "application/x-java-applet"},
+				{".clp", "application/x-msclip"},
+				{".cmx", "image/x-cmx"},
+				{".cnf", "text/plain"},
+				{".cod", "image/cis-cod"},
+				{".config", "application/xml"},
+				{".contact", "text/x-ms-contact"},
+				{".coverage", "application/xml"},
+				{".cpio", "application/x-cpio"},
+				{".cpp", "text/plain"},
+				{".crd", "application/x-mscardfile"},
+				{".crl", "application/pkix-crl"},
+				{".crt", "application/x-x509-ca-cert"},
+				{".cs", "text/plain"},
+				{".csdproj", "text/plain"},
+				{".csh", "application/x-csh"},
+				{".csproj", "text/plain"},
+				{".css", "text/css"},
+				{".csv", "text/csv"},
+				{".cur", "application/octet-stream"},
+				{".cxx", "text/plain"},
+				{".dat", "application/octet-stream"},
+				{".datasource", "application/xml"},
+				{".dbproj", "text/plain"},
+				{".dcr", "application/x-director"},
+				{".def", "text/plain"},
+				{".deploy", "application/octet-stream"},
+				{".der", "application/x-x509-ca-cert"},
+				{".dgml", "application/xml"},
+				{".dib", "image/bmp"},
+				{".dif", "video/x-dv"},
+				{".dir", "application/x-director"},
+				{".disco", "text/xml"},
+				{".dll", "application/x-msdownload"},
+				{".dll.config", "text/xml"},
+				{".dlm", "text/dlm"},
+				{".doc", "application/msword"},
+				{".docm", "application/vnd.ms-word.document.macroEnabled.12"},
+				{".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
+				{".dot", "application/msword"},
+				{".dotm", "application/vnd.ms-word.template.macroEnabled.12"},
+				{".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"},
+				{".dsp", "application/octet-stream"},
+				{".dsw", "text/plain"},
+				{".dtd", "text/xml"},
+				{".dtsConfig", "text/xml"},
+				{".dv", "video/x-dv"},
+				{".dvi", "application/x-dvi"},
+				{".dwf", "drawing/x-dwf"},
+				{".dwp", "application/octet-stream"},
+				{".dxr", "application/x-director"},
+				{".eml", "message/rfc822"},
+				{".emz", "application/octet-stream"},
+				{".eot", "application/octet-stream"},
+				{".eps", "application/postscript"},
+				{".etl", "application/etl"},
+				{".etx", "text/x-setext"},
+				{".evy", "application/envoy"},
+				{".exe", "application/octet-stream"},
+				{".exe.config", "text/xml"},
+				{".fdf", "application/vnd.fdf"},
+				{".fif", "application/fractals"},
+				{".filters", "Application/xml"},
+				{".fla", "application/octet-stream"},
+				{".flr", "x-world/x-vrml"},
+				{".flv", "video/x-flv"},
+				{".fsscript", "application/fsharp-script"},
+				{".fsx", "application/fsharp-script"},
+				{".generictest", "application/xml"},
+				{".gif", "image/gif"},
+				{".group", "text/x-ms-group"},
+				{".gsm", "audio/x-gsm"},
+				{".gtar", "application/x-gtar"},
+				{".gz", "application/x-gzip"},
+				{".h", "text/plain"},
+				{".hdf", "application/x-hdf"},
+				{".hdml", "text/x-hdml"},
+				{".hhc", "application/x-oleobject"},
+				{".hhk", "application/octet-stream"},
+				{".hhp", "application/octet-stream"},
+				{".hlp", "application/winhlp"},
+				{".hpp", "text/plain"},
+				{".hqx", "application/mac-binhex40"},
+				{".hta", "application/hta"},
+				{".htc", "text/x-component"},
+				{".htm", "text/html"},
+				{".html", "text/html"},
+				{".htt", "text/webviewhtml"},
+				{".hxa", "application/xml"},
+				{".hxc", "application/xml"},
+				{".hxd", "application/octet-stream"},
+				{".hxe", "application/xml"},
+				{".hxf", "application/xml"},
+				{".hxh", "application/octet-stream"},
+				{".hxi", "application/octet-stream"},
+				{".hxk", "application/xml"},
+				{".hxq", "application/octet-stream"},
+				{".hxr", "application/octet-stream"},
+				{".hxs", "application/octet-stream"},
+				{".hxt", "text/html"},
+				{".hxv", "application/xml"},
+				{".hxw", "application/octet-stream"},
+				{".hxx", "text/plain"},
+				{".i", "text/plain"},
+				{".ico", "image/x-icon"},
+				{".ics", "application/octet-stream"},
+				{".idl", "text/plain"},
+				{".ief", "image/ief"},
+				{".iii", "application/x-iphone"},
+				{".inc", "text/plain"},
+				{".inf", "application/octet-stream"},
+				{".inl", "text/plain"},
+				{".ins", "application/x-internet-signup"},
+				{".ipa", "application/x-itunes-ipa"},
+				{".ipg", "application/x-itunes-ipg"},
+				{".ipproj", "text/plain"},
+				{".ipsw", "application/x-itunes-ipsw"},
+				{".iqy", "text/x-ms-iqy"},
+				{".isp", "application/x-internet-signup"},
+				{".ite", "application/x-itunes-ite"},
+				{".itlp", "application/x-itunes-itlp"},
+				{".itms", "application/x-itunes-itms"},
+				{".itpc", "application/x-itunes-itpc"},
+				{".IVF", "video/x-ivf"},
+				{".jar", "application/java-archive"},
+				{".java", "application/octet-stream"},
+				{".jck", "application/liquidmotion"},
+				{".jcz", "application/liquidmotion"},
+				{".jfif", "image/pjpeg"},
+				{".jnlp", "application/x-java-jnlp-file"},
+				{".jpb", "application/octet-stream"},
+				{".jpe", "image/jpeg"},
+				{".jpeg", "image/jpeg"},
+				{".jpg", "image/jpeg"},
+				{".js", "application/x-javascript"},
+				{".json", "application/json"},
+				{".jsx", "text/jscript"},
+				{".jsxbin", "text/plain"},
+				{".latex", "application/x-latex"},
+				{".library-ms", "application/windows-library+xml"},
+				{".lit", "application/x-ms-reader"},
+				{".loadtest", "application/xml"},
+				{".lpk", "application/octet-stream"},
+				{".lsf", "video/x-la-asf"},
+				{".lst", "text/plain"},
+				{".lsx", "video/x-la-asf"},
+				{".lzh", "application/octet-stream"},
+				{".m13", "application/x-msmediaview"},
+				{".m14", "application/x-msmediaview"},
+				{".m1v", "video/mpeg"},
+				{".m2t", "video/vnd.dlna.mpeg-tts"},
+				{".m2ts", "video/vnd.dlna.mpeg-tts"},
+				{".m2v", "video/mpeg"},
+				{".m3u", "audio/x-mpegurl"},
+				{".m3u8", "audio/x-mpegurl"},
+				{".m4a", "audio/m4a"},
+				{".m4b", "audio/m4b"},
+				{".m4p", "audio/m4p"},
+				{".m4r", "audio/x-m4r"},
+				{".m4v", "video/x-m4v"},
+				{".mac", "image/x-macpaint"},
+				{".mak", "text/plain"},
+				{".man", "application/x-troff-man"},
+				{".manifest", "application/x-ms-manifest"},
+				{".map", "text/plain"},
+				{".master", "application/xml"},
+				{".mda", "application/msaccess"},
+				{".mdb", "application/x-msaccess"},
+				{".mde", "application/msaccess"},
+				{".mdp", "application/octet-stream"},
+				{".me", "application/x-troff-me"},
+				{".mfp", "application/x-shockwave-flash"},
+				{".mht", "message/rfc822"},
+				{".mhtml", "message/rfc822"},
+				{".mid", "audio/mid"},
+				{".midi", "audio/mid"},
+				{".mix", "application/octet-stream"},
+				{".mk", "text/plain"},
+				{".mmf", "application/x-smaf"},
+				{".mno", "text/xml"},
+				{".mny", "application/x-msmoney"},
+				{".mod", "video/mpeg"},
+				{".mov", "video/quicktime"},
+				{".movie", "video/x-sgi-movie"},
+				{".mp2", "video/mpeg"},
+				{".mp2v", "video/mpeg"},
+				{".mp3", "audio/mpeg"},
+				{".mp4", "video/mp4"},
+				{".mp4v", "video/mp4"},
+				{".mpa", "video/mpeg"},
+				{".mpe", "video/mpeg"},
+				{".mpeg", "video/mpeg"},
+				{".mpf", "application/vnd.ms-mediapackage"},
+				{".mpg", "video/mpeg"},
+				{".mpp", "application/vnd.ms-project"},
+				{".mpv2", "video/mpeg"},
+				{".mqv", "video/quicktime"},
+				{".ms", "application/x-troff-ms"},
+				{".msi", "application/octet-stream"},
+				{".mso", "application/octet-stream"},
+				{".mts", "video/vnd.dlna.mpeg-tts"},
+				{".mtx", "application/xml"},
+				{".mvb", "application/x-msmediaview"},
+				{".mvc", "application/x-miva-compiled"},
+				{".mxp", "application/x-mmxp"},
+				{".nc", "application/x-netcdf"},
+				{".nsc", "video/x-ms-asf"},
+				{".nws", "message/rfc822"},
+				{".ocx", "application/octet-stream"},
+				{".oda", "application/oda"},
+				{".odc", "text/x-ms-odc"},
+				{".odh", "text/plain"},
+				{".odl", "text/plain"},
+				{".odp", "application/vnd.oasis.opendocument.presentation"},
+				{".ods", "application/oleobject"},
+				{".odt", "application/vnd.oasis.opendocument.text"},
+				{".one", "application/onenote"},
+				{".onea", "application/onenote"},
+				{".onepkg", "application/onenote"},
+				{".onetmp", "application/onenote"},
+				{".onetoc", "application/onenote"},
+				{".onetoc2", "application/onenote"},
+				{".orderedtest", "application/xml"},
+				{".osdx", "application/opensearchdescription+xml"},
+				{".p10", "application/pkcs10"},
+				{".p12", "application/x-pkcs12"},
+				{".p7b", "application/x-pkcs7-certificates"},
+				{".p7c", "application/pkcs7-mime"},
+				{".p7m", "application/pkcs7-mime"},
+				{".p7r", "application/x-pkcs7-certreqresp"},
+				{".p7s", "application/pkcs7-signature"},
+				{".pbm", "image/x-portable-bitmap"},
+				{".pcast", "application/x-podcast"},
+				{".pct", "image/pict"},
+				{".pcx", "application/octet-stream"},
+				{".pcz", "application/octet-stream"},
+				{".pdf", "application/pdf"},
+				{".pfb", "application/octet-stream"},
+				{".pfm", "application/octet-stream"},
+				{".pfx", "application/x-pkcs12"},
+				{".pgm", "image/x-portable-graymap"},
+				{".pic", "image/pict"},
+				{".pict", "image/pict"},
+				{".pkgdef", "text/plain"},
+				{".pkgundef", "text/plain"},
+				{".pko", "application/vnd.ms-pki.pko"},
+				{".pls", "audio/scpls"},
+				{".pma", "application/x-perfmon"},
+				{".pmc", "application/x-perfmon"},
+				{".pml", "application/x-perfmon"},
+				{".pmr", "application/x-perfmon"},
+				{".pmw", "application/x-perfmon"},
+				{".png", "image/png"},
+				{".pnm", "image/x-portable-anymap"},
+				{".pnt", "image/x-macpaint"},
+				{".pntg", "image/x-macpaint"},
+				{".pnz", "image/png"},
+				{".pot", "application/vnd.ms-powerpoint"},
+				{".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12"},
+				{".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"},
+				{".ppa", "application/vnd.ms-powerpoint"},
+				{".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"},
+				{".ppm", "image/x-portable-pixmap"},
+				{".pps", "application/vnd.ms-powerpoint"},
+				{".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"},
+				{".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"},
+				{".ppt", "application/vnd.ms-powerpoint"},
+				{".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"},
+				{".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"},
+				{".prf", "application/pics-rules"},
+				{".prm", "application/octet-stream"},
+				{".prx", "application/octet-stream"},
+				{".ps", "application/postscript"},
+				{".psc1", "application/PowerShell"},
+				{".psd", "application/octet-stream"},
+				{".psess", "application/xml"},
+				{".psm", "application/octet-stream"},
+				{".psp", "application/octet-stream"},
+				{".pub", "application/x-mspublisher"},
+				{".pwz", "application/vnd.ms-powerpoint"},
+				{".qht", "text/x-html-insertion"},
+				{".qhtm", "text/x-html-insertion"},
+				{".qt", "video/quicktime"},
+				{".qti", "image/x-quicktime"},
+				{".qtif", "image/x-quicktime"},
+				{".qtl", "application/x-quicktimeplayer"},
+				{".qxd", "application/octet-stream"},
+				{".ra", "audio/x-pn-realaudio"},
+				{".ram", "audio/x-pn-realaudio"},
+				{".rar", "application/octet-stream"},
+				{".ras", "image/x-cmu-raster"},
+				{".rat", "application/rat-file"},
+				{".rc", "text/plain"},
+				{".rc2", "text/plain"},
+				{".rct", "text/plain"},
+				{".rdlc", "application/xml"},
+				{".resx", "application/xml"},
+				{".rf", "image/vnd.rn-realflash"},
+				{".rgb", "image/x-rgb"},
+				{".rgs", "text/plain"},
+				{".rm", "application/vnd.rn-realmedia"},
+				{".rmi", "audio/mid"},
+				{".rmp", "application/vnd.rn-rn_music_package"},
+				{".roff", "application/x-troff"},
+				{".rpm", "audio/x-pn-realaudio-plugin"},
+				{".rqy", "text/x-ms-rqy"},
+				{".rtf", "application/rtf"},
+				{".rtx", "text/richtext"},
+				{".ruleset", "application/xml"},
+				{".s", "text/plain"},
+				{".safariextz", "application/x-safari-safariextz"},
+				{".scd", "application/x-msschedule"},
+				{".sct", "text/scriptlet"},
+				{".sd2", "audio/x-sd2"},
+				{".sdp", "application/sdp"},
+				{".sea", "application/octet-stream"},
+				{".searchConnector-ms", "application/windows-search-connector+xml"},
+				{".setpay", "application/set-payment-initiation"},
+				{".setreg", "application/set-registration-initiation"},
+				{".settings", "application/xml"},
+				{".sgimb", "application/x-sgimb"},
+				{".sgml", "text/sgml"},
+				{".sh", "application/x-sh"},
+				{".shar", "application/x-shar"},
+				{".shtml", "text/html"},
+				{".sit", "application/x-stuffit"},
+				{".sitemap", "application/xml"},
+				{".skin", "application/xml"},
+				{".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"},
+				{".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"},
+				{".slk", "application/vnd.ms-excel"},
+				{".sln", "text/plain"},
+				{".slupkg-ms", "application/x-ms-license"},
+				{".smd", "audio/x-smd"},
+				{".smi", "application/octet-stream"},
+				{".smx", "audio/x-smd"},
+				{".smz", "audio/x-smd"},
+				{".snd", "audio/basic"},
+				{".snippet", "application/xml"},
+				{".snp", "application/octet-stream"},
+				{".sol", "text/plain"},
+				{".sor", "text/plain"},
+				{".spc", "application/x-pkcs7-certificates"},
+				{".spl", "application/futuresplash"},
+				{".src", "application/x-wais-source"},
+				{".srf", "text/plain"},
+				{".SSISDeploymentManifest", "text/xml"},
+				{".ssm", "application/streamingmedia"},
+				{".sst", "application/vnd.ms-pki.certstore"},
+				{".stl", "application/vnd.ms-pki.stl"},
+				{".sv4cpio", "application/x-sv4cpio"},
+				{".sv4crc", "application/x-sv4crc"},
+				{".svc", "application/xml"},
+				{".swf", "application/x-shockwave-flash"},
+				{".t", "application/x-troff"},
+				{".tar", "application/x-tar"},
+				{".tcl", "application/x-tcl"},
+				{".testrunconfig", "application/xml"},
+				{".testsettings", "application/xml"},
+				{".tex", "application/x-tex"},
+				{".texi", "application/x-texinfo"},
+				{".texinfo", "application/x-texinfo"},
+				{".tgz", "application/x-compressed"},
+				{".thmx", "application/vnd.ms-officetheme"},
+				{".thn", "application/octet-stream"},
+				{".tif", "image/tiff"},
+				{".tiff", "image/tiff"},
+				{".tlh", "text/plain"},
+				{".tli", "text/plain"},
+				{".toc", "application/octet-stream"},
+				{".tr", "application/x-troff"},
+				{".trm", "application/x-msterminal"},
+				{".trx", "application/xml"},
+				{".ts", "video/vnd.dlna.mpeg-tts"},
+				{".tsv", "text/tab-separated-values"},
+				{".ttf", "application/octet-stream"},
+				{".tts", "video/vnd.dlna.mpeg-tts"},
+				{".txt", "text/plain"},
+				{".u32", "application/octet-stream"},
+				{".uls", "text/iuls"},
+				{".user", "text/plain"},
+				{".ustar", "application/x-ustar"},
+				{".vb", "text/plain"},
+				{".vbdproj", "text/plain"},
+				{".vbk", "video/mpeg"},
+				{".vbproj", "text/plain"},
+				{".vbs", "text/vbscript"},
+				{".vcf", "text/x-vcard"},
+				{".vcproj", "Application/xml"},
+				{".vcs", "text/plain"},
+				{".vcxproj", "Application/xml"},
+				{".vddproj", "text/plain"},
+				{".vdp", "text/plain"},
+				{".vdproj", "text/plain"},
+				{".vdx", "application/vnd.ms-visio.viewer"},
+				{".vml", "text/xml"},
+				{".vscontent", "application/xml"},
+				{".vsct", "text/xml"},
+				{".vsd", "application/vnd.visio"},
+				{".vsi", "application/ms-vsi"},
+				{".vsix", "application/vsix"},
+				{".vsixlangpack", "text/xml"},
+				{".vsixmanifest", "text/xml"},
+				{".vsmdi", "application/xml"},
+				{".vspscc", "text/plain"},
+				{".vss", "application/vnd.visio"},
+				{".vsscc", "text/plain"},
+				{".vssettings", "text/xml"},
+				{".vssscc", "text/plain"},
+				{".vst", "application/vnd.visio"},
+				{".vstemplate", "text/xml"},
+				{".vsto", "application/x-ms-vsto"},
+				{".vsw", "application/vnd.visio"},
+				{".vsx", "application/vnd.visio"},
+				{".vtx", "application/vnd.visio"},
+				{".wav", "audio/wav"},
+				{".wave", "audio/wav"},
+				{".wax", "audio/x-ms-wax"},
+				{".wbk", "application/msword"},
+				{".wbmp", "image/vnd.wap.wbmp"},
+				{".wcm", "application/vnd.ms-works"},
+				{".wdb", "application/vnd.ms-works"},
+				{".wdp", "image/vnd.ms-photo"},
+				{".webarchive", "application/x-safari-webarchive"},
+				{".webtest", "application/xml"},
+				{".wiq", "application/xml"},
+				{".wiz", "application/msword"},
+				{".wks", "application/vnd.ms-works"},
+				{".WLMP", "application/wlmoviemaker"},
+				{".wlpginstall", "application/x-wlpg-detect"},
+				{".wlpginstall3", "application/x-wlpg3-detect"},
+				{".wm", "video/x-ms-wm"},
+				{".wma", "audio/x-ms-wma"},
+				{".wmd", "application/x-ms-wmd"},
+				{".wmf", "application/x-msmetafile"},
+				{".wml", "text/vnd.wap.wml"},
+				{".wmlc", "application/vnd.wap.wmlc"},
+				{".wmls", "text/vnd.wap.wmlscript"},
+				{".wmlsc", "application/vnd.wap.wmlscriptc"},
+				{".wmp", "video/x-ms-wmp"},
+				{".wmv", "video/x-ms-wmv"},
+				{".wmx", "video/x-ms-wmx"},
+				{".wmz", "application/x-ms-wmz"},
+				{".wpl", "application/vnd.ms-wpl"},
+				{".wps", "application/vnd.ms-works"},
+				{".wri", "application/x-mswrite"},
+				{".wrl", "x-world/x-vrml"},
+				{".wrz", "x-world/x-vrml"},
+				{".wsc", "text/scriptlet"},
+				{".wsdl", "text/xml"},
+				{".wvx", "video/x-ms-wvx"},
+				{".x", "application/directx"},
+				{".xaf", "x-world/x-vrml"},
+				{".xaml", "application/xaml+xml"},
+				{".xap", "application/x-silverlight-app"},
+				{".xbap", "application/x-ms-xbap"},
+				{".xbm", "image/x-xbitmap"},
+				{".xdr", "text/plain"},
+				{".xht", "application/xhtml+xml"},
+				{".xhtml", "application/xhtml+xml"},
+				{".xla", "application/vnd.ms-excel"},
+				{".xlam", "application/vnd.ms-excel.addin.macroEnabled.12"},
+				{".xlc", "application/vnd.ms-excel"},
+				{".xld", "application/vnd.ms-excel"},
+				{".xlk", "application/vnd.ms-excel"},
+				{".xll", "application/vnd.ms-excel"},
+				{".xlm", "application/vnd.ms-excel"},
+				{".xls", "application/vnd.ms-excel"},
+				{".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"},
+				{".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"},
+				{".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
+				{".xlt", "application/vnd.ms-excel"},
+				{".xltm", "application/vnd.ms-excel.template.macroEnabled.12"},
+				{".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"},
+				{".xlw", "application/vnd.ms-excel"},
+				{".xml", "text/xml"},
+				{".xmta", "application/xml"},
+				{".xof", "x-world/x-vrml"},
+				{".XOML", "text/plain"},
+				{".xpm", "image/x-xpixmap"},
+				{".xps", "application/vnd.ms-xpsdocument"},
+				{".xrm-ms", "text/xml"},
+				{".xsc", "application/xml"},
+				{".xsd", "text/xml"},
+				{".xsf", "text/xml"},
+				{".xsl", "text/xml"},
+				{".xslt", "text/xml"},
+				{".xsn", "application/octet-stream"},
+				{".xss", "application/xml"},
+				{".xtp", "application/octet-stream"},
+				{".xwd", "image/x-xwindowdump"},
+				{".z", "application/x-compress"},
+				{".zip", "application/x-zip-compressed"}
+			};
 
-		public static string GetMimeType (string extension)
-		{
+		public static string GetMimeType (string extension) {
 			if (extension == null) {
 				throw new ArgumentNullException ("extension");
@@ -585,3 +583,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/OpenID.cs
===================================================================
--- /binary-improvements/MapRendering/Web/OpenID.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/OpenID.cs	(revision 325)
@@ -5,24 +5,30 @@
 using System.Net;
 using System.Net.Security;
+using System.Reflection;
+using System.Security.Cryptography.X509Certificates;
 using System.Text;
 using System.Text.RegularExpressions;
-using System.Security.Cryptography.X509Certificates;
-using System.Reflection;
-
-namespace AllocsFixes.NetConnections.Servers.Web
-{
+
+namespace AllocsFixes.NetConnections.Servers.Web {
 	public static class OpenID {
 		private const string STEAM_LOGIN = "https://steamcommunity.com/openid/login";
-		private static Regex steamIdUrlMatcher = new Regex (@"^https?:\/\/steamcommunity\.com\/openid\/id\/([0-9]{17,18})");
-
-		private static readonly X509Certificate2 caCert = new X509Certificate2 (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/steam-rootca.cer");
-		private static readonly X509Certificate2 caIntermediateCert = new X509Certificate2 (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/steam-intermediate.cer");
+
+		private static readonly Regex steamIdUrlMatcher =
+			new Regex (@"^https?:\/\/steamcommunity\.com\/openid\/id\/([0-9]{17,18})");
+
+		private static readonly X509Certificate2 caCert =
+			new X509Certificate2 (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) +
+			                      "/steam-rootca.cer");
+
+		private static readonly X509Certificate2 caIntermediateCert =
+			new X509Certificate2 (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) +
+			                      "/steam-intermediate.cer");
 
 		private static readonly bool verboseSsl = false;
-		public static bool debugOpenId = false;
+		public static bool debugOpenId;
 
 		static OpenID () {
-			for (int i = 0; i < System.Environment.GetCommandLineArgs ().Length; i++) {
-				if (System.Environment.GetCommandLineArgs () [i].EqualsCaseInsensitive ("-debugopenid")) {
+			for (int i = 0; i < Environment.GetCommandLineArgs ().Length; i++) {
+				if (Environment.GetCommandLineArgs () [i].EqualsCaseInsensitive ("-debugopenid")) {
 					debugOpenId = true;
 				}
@@ -34,4 +40,5 @@
 						Log.Out ("Steam certificate: No error (1)");
 					}
+
 					return true;
 				}
@@ -49,4 +56,5 @@
 						Log.Out ("Steam certificate: No error (2)");
 					}
+
 					return true;
 				}
@@ -58,4 +66,5 @@
 						Log.Out ("Steam certificate: No error (3)");
 					}
+
 					return true;
 				}
@@ -66,4 +75,5 @@
 						Log.Out ("Validating cert: " + chainEl.Certificate.Subject);
 					}
+
 					// Iterate all status flags of the current cert
 					foreach (X509ChainStatus chainStatus in chainEl.ChainElementStatus) {
@@ -71,14 +81,18 @@
 							Log.Out ("   Status: " + chainStatus.Status);
 						}
+
 						if (chainStatus.Status == X509ChainStatusFlags.NoError) {
 							// This status is not an error, skip
 							continue;
 						}
+
 						if (chainStatus.Status == X509ChainStatusFlags.UntrustedRoot && chainEl.Certificate == caCert) {
 							// This status is about the cert being an untrusted root certificate but the certificate is one of those we added, ignore
 							continue;
 						}
+
 						// This status is an error, print information
-						Log.Warning ("Steam certificate error: " + chainEl.Certificate.Subject + " ### Error: " + chainStatus.Status);
+						Log.Warning ("Steam certificate error: " + chainEl.Certificate.Subject + " ### Error: " +
+						             chainStatus.Status);
 						privateChain.Reset ();
 						return false;
@@ -87,5 +101,6 @@
 
 				foreach (X509ChainStatus chainStatus in privateChain.ChainStatus) {
-					if (chainStatus.Status != X509ChainStatusFlags.NoError && chainStatus.Status != X509ChainStatusFlags.UntrustedRoot) {
+					if (chainStatus.Status != X509ChainStatusFlags.NoError &&
+					    chainStatus.Status != X509ChainStatusFlags.UntrustedRoot) {
 						Log.Warning ("Steam certificate error: " + chainStatus.Status);
 						privateChain.Reset ();
@@ -99,7 +114,7 @@
 					Log.Out ("Steam certificate: No error (4)");
 				}
+
 				return true;
 			};
-
 		}
 
@@ -123,4 +138,5 @@
 				return 0;
 			}
+
 			if (mode == "error") {
 				Log.Warning ("Steam OpenID login error: " + getValue (_req, "openid.error"));
@@ -128,6 +144,8 @@
 					PrintOpenIdResponse (_req);
 				}
+
 				return 0;
 			}
+
 			string steamIdString = getValue (_req, "openid.claimed_id");
 			ulong steamId = 0;
@@ -140,4 +158,5 @@
 					PrintOpenIdResponse (_req);
 				}
+
 				return 0;
 			}
@@ -161,5 +180,5 @@
 
 			byte[] postData = Encoding.ASCII.GetBytes (buildUrlParams (queryParams));
-			HttpWebRequest request = (HttpWebRequest)WebRequest.Create (STEAM_LOGIN);
+			HttpWebRequest request = (HttpWebRequest) WebRequest.Create (STEAM_LOGIN);
 			request.Method = "POST";
 			request.ContentType = "application/x-www-form-urlencoded";
@@ -170,5 +189,5 @@
 			}
 
-			HttpWebResponse response = (HttpWebResponse)request.GetResponse ();
+			HttpWebResponse response = (HttpWebResponse) request.GetResponse ();
 			string responseString = null;
 			using (Stream st = response.GetResponseStream ()) {
@@ -180,8 +199,8 @@
 			if (responseString.ToLower ().Contains ("is_valid:true")) {
 				return steamId;
-			} else {
-				Log.Warning ("Steam OpenID login failed: {0}", responseString);
-				return 0;
-			}
+			}
+
+			Log.Warning ("Steam OpenID login failed: {0}", responseString);
+			return 0;
 		}
 
@@ -192,4 +211,5 @@
 				paramsArr [i++] = kvp.Key + "=" + Uri.EscapeDataString (kvp.Value);
 			}
+
 			return string.Join ("&", paramsArr);
 		}
@@ -200,4 +220,5 @@
 				throw new MissingMemberException ("OpenID parameter \"" + _name + "\" missing");
 			}
+
 			return nvc [_name];
 		}
@@ -209,6 +230,4 @@
 			}
 		}
-
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/Web.cs
===================================================================
--- /binary-improvements/MapRendering/Web/Web.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/Web.cs	(revision 325)
@@ -1,5 +1,4 @@
 using System;
 using System.Collections.Generic;
-using System.Collections.Specialized;
 using System.IO;
 using System.Net;
@@ -8,28 +7,18 @@
 using System.Text;
 using System.Threading;
+using AllocsFixes.FileCache;
+using AllocsFixes.NetConnections.Servers.Web.Handlers;
 using UnityEngine;
 
-using AllocsFixes.NetConnections.Servers.Web.Handlers;
-
-namespace AllocsFixes.NetConnections.Servers.Web
-{
+namespace AllocsFixes.NetConnections.Servers.Web {
 	public class Web : IConsoleServer {
 		private const int GUEST_PERMISSION_LEVEL = 2000;
+		public static int handlingCount;
+		public static int currentHandlers;
+		public static long totalHandlingTime = 0;
 		private readonly HttpListener _listener = new HttpListener ();
-		private Dictionary<string, PathHandler> handlers = new Dictionary<string, PathHandler> ();
-		public static int handlingCount = 0;
-		public static int currentHandlers = 0;
-		public static long totalHandlingTime = 0;
-		private string dataFolder;
-		private bool useStaticCache = false;
-
-		public static bool isSslRedirected (HttpListenerRequest req) {
-			string proto = req.Headers ["X-Forwarded-Proto"];
-			if (!string.IsNullOrEmpty (proto)) {
-				return proto.Equals ("https", StringComparison.OrdinalIgnoreCase);
-			}
-
-			return false;
-		}
+		private readonly string dataFolder;
+		private readonly Dictionary<string, PathHandler> handlers = new Dictionary<string, PathHandler> ();
+		private readonly bool useStaticCache;
 
 		public ConnectionHandler connectionHandler;
@@ -42,5 +31,7 @@
 					return;
 				}
-				if (!Directory.Exists (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/webserver")) {
+
+				if (!Directory.Exists (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) +
+				                       "/webserver")) {
 					Log.Out ("Webserver not started (folder \"webserver\" not found in WebInterface mod folder)");
 					return;
@@ -56,39 +47,39 @@
 					return;
 				}
- 
-				handlers.Add (
-						"/index.htm",
-						new SimpleRedirectHandler ("/static/index.html"));
-				handlers.Add (
-						"/favicon.ico",
-						new SimpleRedirectHandler ("/static/favicon.ico"));
-				handlers.Add (
+
+				handlers.Add (
+					"/index.htm",
+					new SimpleRedirectHandler ("/static/index.html"));
+				handlers.Add (
+					"/favicon.ico",
+					new SimpleRedirectHandler ("/static/favicon.ico"));
+				handlers.Add (
+					"/session/",
+					new SessionHandler (
 						"/session/",
-						new SessionHandler (
-									"/session/",
-									dataFolder,
-									this)
-				);
-				handlers.Add (
-						"/userstatus",
-						new UserStatusHandler ()
+						dataFolder,
+						this)
+				);
+				handlers.Add (
+					"/userstatus",
+					new UserStatusHandler ()
 				);
 				if (useStaticCache) {
 					handlers.Add (
+						"/static/",
+						new StaticHandler (
 							"/static/",
-							new StaticHandler (
-									"/static/",
-									dataFolder,
-									new AllocsFixes.FileCache.SimpleCache (),
-									false)
+							dataFolder,
+							new SimpleCache (),
+							false)
 					);
 				} else {
 					handlers.Add (
+						"/static/",
+						new StaticHandler (
 							"/static/",
-							new StaticHandler (
-									"/static/",
-									dataFolder,
-									new AllocsFixes.FileCache.DirectAccess (),
-									false)
+							dataFolder,
+							new DirectAccess (),
+							false)
 					);
 				}
@@ -118,10 +109,10 @@
 				connectionHandler = new ConnectionHandler (this);
 
-				_listener.Prefixes.Add (String.Format ("http://*:{0}/", webPort + 2));
+				_listener.Prefixes.Add (string.Format ("http://*:{0}/", webPort + 2));
 				_listener.Start ();
 
 				SdtdConsole.Instance.RegisterServer (this);
 
-				_listener.BeginGetContext (new AsyncCallback (HandleRequest), _listener);
+				_listener.BeginGetContext (HandleRequest, _listener);
 
 				Log.Out ("Started Webserver on " + (webPort + 2));
@@ -129,4 +120,30 @@
 				Log.Out ("Error in Web.ctor: " + e);
 			}
+		}
+
+		public void Disconnect () {
+			try {
+				_listener.Stop ();
+				_listener.Close ();
+			} catch (Exception e) {
+				Log.Out ("Error in Web.Disconnect: " + e);
+			}
+		}
+
+		public void SendLine (string line) {
+			connectionHandler.SendLine (line);
+		}
+
+		public void SendLog (string text, string trace, LogType type) {
+			// Do nothing, handled by LogBuffer internally
+		}
+
+		public static bool isSslRedirected (HttpListenerRequest req) {
+			string proto = req.Headers ["X-Forwarded-Proto"];
+			if (!string.IsNullOrEmpty (proto)) {
+				return proto.Equals ("https", StringComparison.OrdinalIgnoreCase);
+			}
+
+			return false;
 		}
 
@@ -135,7 +152,8 @@
 				Interlocked.Increment (ref handlingCount);
 				Interlocked.Increment (ref currentHandlers);
+
 //				MicroStopwatch msw = new MicroStopwatch ();
 				HttpListenerContext ctx = _listener.EndGetContext (result);
-				_listener.BeginGetContext (new AsyncCallback (HandleRequest), _listener);
+				_listener.BeginGetContext (HandleRequest, _listener);
 				try {
 					HttpListenerRequest request = ctx.Request;
@@ -163,5 +181,5 @@
 					// No game yet -> fail request
 					if (GameManager.Instance.World == null) {
-						response.StatusCode = (int)HttpStatusCode.ServiceUnavailable;
+						response.StatusCode = (int) HttpStatusCode.ServiceUnavailable;
 						return;
 					}
@@ -174,13 +192,12 @@
 							if (request.Url.AbsolutePath.StartsWith (kvp.Key)) {
 								if (!kvp.Value.IsAuthorizedForHandler (conn, permissionLevel)) {
-									response.StatusCode = (int)HttpStatusCode.Forbidden;
+									response.StatusCode = (int) HttpStatusCode.Forbidden;
 									if (conn != null) {
 										//Log.Out ("Web.HandleRequest: user '{0}' not allowed to access '{1}'", conn.SteamID, kvp.Value.ModuleName);
-									} else {
-										//Log.Out ("Web.HandleRequest: unidentified user from '{0}' not allowed to access '{1}'", request.RemoteEndPoint.Address, kvp.Value.ModuleName);
 									}
 								} else {
 									kvp.Value.HandleRequest (request, response, conn, permissionLevel);
 								}
+
 								return;
 							}
@@ -190,8 +207,9 @@
 					// Not really relevant for non-debugging purposes:
 					//Log.Out ("Error in Web.HandleRequest(): No handler found for path \"" + request.Url.AbsolutePath + "\"");
-					response.StatusCode = (int)HttpStatusCode.NotFound;
+					response.StatusCode = (int) HttpStatusCode.NotFound;
 				} catch (IOException e) {
 					if (e.InnerException is SocketException) {
-						Log.Out ("Error in Web.HandleRequest(): Remote host closed connection: " + e.InnerException.Message);
+						Log.Out ("Error in Web.HandleRequest(): Remote host closed connection: " +
+						         e.InnerException.Message);
 					} else {
 						Log.Out ("Error (IO) in Web.HandleRequest(): " + e);
@@ -203,4 +221,5 @@
 						ctx.Response.Close ();
 					}
+
 //					msw.Stop ();
 //					totalHandlingTime += msw.ElapsedMicroseconds;
@@ -223,15 +242,17 @@
 				if (con != null) {
 					_con = con;
-					return GameManager.Instance.adminTools.GetAdminToolsClientInfo (_con.SteamID.ToString ()).PermissionLevel;
+					return GameManager.Instance.adminTools.GetAdminToolsClientInfo (_con.SteamID.ToString ())
+						.PermissionLevel;
 				}
 			}
 
 			if (_req.QueryString ["adminuser"] != null && _req.QueryString ["admintoken"] != null) {
-				WebPermissions.AdminToken admin = WebPermissions.Instance.GetWebAdmin (_req.QueryString ["adminuser"], _req.QueryString ["admintoken"]);
+				WebPermissions.AdminToken admin = WebPermissions.Instance.GetWebAdmin (_req.QueryString ["adminuser"],
+					_req.QueryString ["admintoken"]);
 				if (admin != null) {
 					return admin.permissionLevel;
-				} else {
-					Log.Warning ("Invalid Admintoken used from " + _req.RemoteEndPoint.ToString ());
-				}
+				}
+
+				Log.Warning ("Invalid Admintoken used from " + _req.RemoteEndPoint);
 			}
 
@@ -242,10 +263,12 @@
 						WebConnection con = connectionHandler.LogIn (id, _req.RemoteEndPoint.Address.ToString ());
 						_con = con;
-						int level = GameManager.Instance.adminTools.GetAdminToolsClientInfo (id.ToString ()).PermissionLevel;
-						Log.Out ("Steam OpenID login from {0} with ID {1}, permission level {2}", _req.RemoteEndPoint.ToString (), con.SteamID, level);
+						int level = GameManager.Instance.adminTools.GetAdminToolsClientInfo (id.ToString ())
+							.PermissionLevel;
+						Log.Out ("Steam OpenID login from {0} with ID {1}, permission level {2}",
+							_req.RemoteEndPoint.ToString (), con.SteamID, level);
 						return level;
-					} else {
-						Log.Out ("Steam OpenID login failed from {0}", _req.RemoteEndPoint.ToString ());
-					}
+					}
+
+					Log.Out ("Steam OpenID login failed from {0}", _req.RemoteEndPoint.ToString ());
 				} catch (Exception e) {
 					Log.Error ("Error validating login:");
@@ -255,21 +278,4 @@
 
 			return GUEST_PERMISSION_LEVEL;
-		}
-
-		public void Disconnect () {
-			try {
-				_listener.Stop ();
-				_listener.Close ();
-			} catch (Exception e) {
-				Log.Out ("Error in Web.Disconnect: " + e);
-			}
-		}
-
-		public void SendLine (string line) {
-			connectionHandler.SendLine (line);
-		}
-
-		public void SendLog (string text, string trace, UnityEngine.LogType type) {
-			// Do nothing, handled by LogBuffer internally
 		}
 
@@ -281,5 +287,4 @@
 			resp.OutputStream.Write (buf, 0, buf.Length);
 		}
-
 	}
 }
Index: /binary-improvements/MapRendering/Web/WebCommandResult.cs
===================================================================
--- /binary-improvements/MapRendering/Web/WebCommandResult.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/WebCommandResult.cs	(revision 325)
@@ -1,17 +1,15 @@
 ﻿using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Net;
+using System.Net.Sockets;
 using System.Text;
+using System.Threading;
+using AllocsFixes.JSON;
+using AllocsFixes.NetConnections.Servers.Web.API;
+using UnityEngine;
 
-using AllocsFixes.JSON;
-using System.IO;
-using System.Net.Sockets;
-using System.Threading;
-using AllocsFixes.NetConnections.Servers.Web.API;
-
-namespace AllocsFixes.NetConnections.Servers.Web
-{
-	public class WebCommandResult : IConsoleConnection
-	{
+namespace AllocsFixes.NetConnections.Servers.Web {
+	public class WebCommandResult : IConsoleConnection {
 		public enum ResultType {
 			Full,
@@ -20,14 +18,15 @@
 		}
 
-		public static int handlingCount = 0;
-		public static int currentHandlers = 0;
-		public static long totalHandlingTime = 0;
+		public static int handlingCount;
+		public static int currentHandlers;
+		public static long totalHandlingTime;
+		private readonly string command;
+		private readonly string parameters;
 
-		private HttpListenerResponse response;
-		private string command;
-		private string parameters;
-		private ResultType responseType;
+		private readonly HttpListenerResponse response;
+		private readonly ResultType responseType;
 
-		public WebCommandResult (string _command, string _parameters, ResultType _responseType, HttpListenerResponse _response) {
+		public WebCommandResult (string _command, string _parameters, ResultType _responseType,
+			HttpListenerResponse _response) {
 			Interlocked.Increment (ref handlingCount);
 			Interlocked.Increment (ref currentHandlers);
@@ -65,9 +64,11 @@
 						result = resultObj;
 					}
+
 					WebAPI.WriteJSON (response, result);
 				}
 			} catch (IOException e) {
 				if (e.InnerException is SocketException) {
-					Log.Out ("Error in WebCommandResult.SendLines(): Remote host closed connection: " + e.InnerException.Message);
+					Log.Out ("Error in WebCommandResult.SendLines(): Remote host closed connection: " +
+					         e.InnerException.Message);
 				} else {
 					Log.Out ("Error (IO) in WebCommandResult.SendLines(): " + e);
@@ -85,4 +86,5 @@
 					Log.Out ("WebCommandResult.SendLines(): Took {0} µs", msw.ElapsedMicroseconds);
 				}
+
 				Interlocked.Decrement (ref currentHandlers);
 			}
@@ -93,9 +95,9 @@
 		}
 
-		public void SendLog (string _msg, string _trace, UnityEngine.LogType _type) {
+		public void SendLog (string _msg, string _trace, LogType _type) {
 			//throw new NotImplementedException ();
 		}
 
-		public void EnableLogLevel (UnityEngine.LogType _type, bool _enable) {
+		public void EnableLogLevel (LogType _type, bool _enable) {
 			//throw new NotImplementedException ();
 		}
@@ -106,3 +108,2 @@
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/WebConnection.cs
===================================================================
--- /binary-improvements/MapRendering/Web/WebConnection.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/WebConnection.cs	(revision 325)
@@ -1,28 +1,27 @@
 using System;
 using System.Collections.Generic;
-using AllocsFixes.NetConnections.Servers.Web;
 using UnityEngine;
 
-namespace AllocsFixes.NetConnections.Servers.Web
-{
+namespace AllocsFixes.NetConnections.Servers.Web {
 	public class WebConnection : ConsoleConnectionAbstract {
-		private string sessionId;
-		private string endpoint;
-		private ulong steamId;
-		private DateTime login;
+		private readonly DateTime login;
+		private readonly List<string> outputLines = new List<string> ();
 		private DateTime lastAction;
-		private List<string> outputLines = new List<string> ();
+		private readonly string conDescription;
 
-		public string SessionID {
-			get { return sessionId; }
+		public WebConnection (string _sessionId, string _endpoint, ulong _steamId) {
+			SessionID = _sessionId;
+			Endpoint = _endpoint;
+			SteamID = _steamId;
+			login = DateTime.Now;
+			lastAction = login;
+			conDescription = "WebPanel from " + Endpoint;
 		}
 
-		public string Endpoint {
-			get { return endpoint; }
-		}
+		public string SessionID { get; private set; }
 
-		public ulong SteamID {
-			get { return steamId; }
-		}
+		public string Endpoint { get; private set; }
+
+		public ulong SteamID { get; private set; }
 
 		public TimeSpan Age {
@@ -30,52 +29,48 @@
 		}
 
-        public static bool CanViewAllPlayers (int _permissionLevel) {
-            bool val = false;
+		public static bool CanViewAllPlayers (int _permissionLevel) {
+			bool val = false;
 
-            try {
-                const int defaultPermissionLevel = 0;
+			try {
+				const int defaultPermissionLevel = 0;
 
-                val = _permissionLevel <= defaultPermissionLevel;
+				val = _permissionLevel <= defaultPermissionLevel;
 
-                foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ())
-                    if (wap.module.Trim ().ToLower () == "webapi.viewallplayers")
-                        val = _permissionLevel <= wap.permissionLevel;
-            }
-            catch { }
+				foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) {
+					if (wap.module.Trim ().ToLower () == "webapi.viewallplayers") {
+						val = _permissionLevel <= wap.permissionLevel;
+					}
+				}
+			} catch {
+			}
 
-            return val;
-        }
+			return val;
+		}
 
-        public static bool CanViewAllClaims (int _permissionLevel) {
-            bool val = false;
+		public static bool CanViewAllClaims (int _permissionLevel) {
+			bool val = false;
 
-            try {
-                const int defaultPermissionLevel = 0;
+			try {
+				const int defaultPermissionLevel = 0;
 
-                val = _permissionLevel <= defaultPermissionLevel;
+				val = _permissionLevel <= defaultPermissionLevel;
 
-                foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ())
-                    if (wap.module.Trim ().ToLower () == "webapi.viewallclaims")
-                        val = _permissionLevel <= wap.permissionLevel;
-            }
-            catch { }
+				foreach (WebPermissions.WebModulePermission wap in WebPermissions.Instance.GetModules ()) {
+					if (wap.module.Trim ().ToLower () == "webapi.viewallclaims") {
+						val = _permissionLevel <= wap.permissionLevel;
+					}
+				}
+			} catch {
+			}
 
-            return val;
-        }
-
-		public WebConnection (string _sessionId, string _endpoint, ulong _steamId) {
-			this.sessionId = _sessionId;
-			this.endpoint = _endpoint;
-			this.steamId = _steamId;
-			this.login = DateTime.Now;
-			this.lastAction = this.login;
+			return val;
 		}
 
 		public void UpdateUsage () {
-			this.lastAction = DateTime.Now;
+			lastAction = DateTime.Now;
 		}
 
 		public override string GetDescription () {
-			return "WebPanel from " + endpoint;
+			return conDescription;
 		}
 
@@ -91,6 +86,4 @@
 			// Do nothing, handled by LogBuffer
 		}
-
 	}
 }
-
Index: /binary-improvements/MapRendering/Web/WebPermissions.cs
===================================================================
--- /binary-improvements/MapRendering/Web/WebPermissions.cs	(revision 324)
+++ /binary-improvements/MapRendering/Web/WebPermissions.cs	(revision 325)
@@ -1,29 +1,19 @@
-using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Xml;
 
-namespace AllocsFixes.NetConnections.Servers.Web
-{
+namespace AllocsFixes.NetConnections.Servers.Web {
 	public class WebPermissions {
-		private static WebPermissions instance = null;
-
-		public static WebPermissions Instance {
-			get {
-				lock (typeof(WebPermissions)) {
-					if (instance == null) {
-						instance = new WebPermissions ();
-					}
-					return instance;
-				}
-			}
-		}
-
 		private const string PERMISSIONS_FILE = "webpermissions.xml";
-		Dictionary<string, AdminToken> admintokens;
-		Dictionary<string, WebModulePermission> modules;
-		Dictionary<string, WebModulePermission> knownModules = new Dictionary<string, WebModulePermission> ();
-		WebModulePermission defaultModulePermission = new WebModulePermission ("", 0);
-		FileSystemWatcher fileWatcher;
+		private static WebPermissions instance;
+		private readonly WebModulePermission defaultModulePermission = new WebModulePermission ("", 0);
+
+		private readonly Dictionary<string, WebModulePermission> knownModules =
+			new Dictionary<string, WebModulePermission> ();
+
+		private Dictionary<string, AdminToken> admintokens;
+		private FileSystemWatcher fileWatcher;
+
+		private Dictionary<string, WebModulePermission> modules;
 
 		public WebPermissions () {
@@ -33,4 +23,16 @@
 		}
 
+		public static WebPermissions Instance {
+			get {
+				lock (typeof (WebPermissions)) {
+					if (instance == null) {
+						instance = new WebPermissions ();
+					}
+
+					return instance;
+				}
+			}
+		}
+
 		public bool ModuleAllowedWithLevel (string _module, int _level) {
 			WebModulePermission permInfo = GetModulePermission (_module);
@@ -41,7 +43,7 @@
 			if (IsAdmin (_name) && admintokens [_name].token == _token) {
 				return admintokens [_name];
-			} else {
-				return null;
-			}
+			}
+
+			return null;
 		}
 
@@ -50,4 +52,5 @@
 				return modules [_module.ToLower ()];
 			}
+
 			return defaultModulePermission;
 		}
@@ -83,5 +86,5 @@
 			return result;
 		}
-	
+
 
 		// Commands
@@ -99,7 +102,8 @@
 			if (!string.IsNullOrEmpty (_module)) {
 				lock (this) {
-                    if (!IsKnownModule( _module)) {
+					if (!IsKnownModule (_module)) {
 						knownModules.Add (_module, new WebModulePermission (_module, _defaultPermission));
-                    }
+					}
+
 					if (_defaultPermission > 0 && !modules.ContainsKey (_module.ToLower ())) {
 						AddModulePermission (_module, _defaultPermission);
@@ -114,9 +118,9 @@
 					return knownModules.ContainsKey (_module);
 				}
-			} else {
-				return false;
-			}
-		}
-	
+			}
+
+			return false;
+		}
+
 		public void RemoveModulePermission (string _module, bool _save = true) {
 			lock (this) {
@@ -140,5 +144,5 @@
 			return result;
 		}
-	
+
 
 		//IO Tasks
@@ -146,7 +150,7 @@
 		private void InitFileWatcher () {
 			fileWatcher = new FileSystemWatcher (GetFilePath (), GetFileName ());
-			fileWatcher.Changed += new FileSystemEventHandler (OnFileChanged);
-			fileWatcher.Created += new FileSystemEventHandler (OnFileChanged);
-			fileWatcher.Deleted += new FileSystemEventHandler (OnFileChanged);
+			fileWatcher.Changed += OnFileChanged;
+			fileWatcher.Created += OnFileChanged;
+			fileWatcher.Deleted += OnFileChanged;
 			fileWatcher.EnableRaisingEvents = true;
 		}
@@ -198,4 +202,5 @@
 							continue;
 						}
+
 						if (subChild.NodeType != XmlNodeType.Element) {
 							Log.Warning ("Unexpected XML node found in 'admintokens' section: " + subChild.OuterXml);
@@ -203,18 +208,21 @@
 						}
 
-						XmlElement lineItem = (XmlElement)subChild;
+						XmlElement lineItem = (XmlElement) subChild;
 
 						if (!lineItem.HasAttribute ("name")) {
-							Log.Warning ("Ignoring admintoken-entry because of missing 'name' attribute: " + subChild.OuterXml);
+							Log.Warning ("Ignoring admintoken-entry because of missing 'name' attribute: " +
+							             subChild.OuterXml);
 							continue;
 						}
 
 						if (!lineItem.HasAttribute ("token")) {
-							Log.Warning ("Ignoring admintoken-entry because of missing 'token' attribute: " + subChild.OuterXml);
+							Log.Warning ("Ignoring admintoken-entry because of missing 'token' attribute: " +
+							             subChild.OuterXml);
 							continue;
 						}
 
 						if (!lineItem.HasAttribute ("permission_level")) {
-							Log.Warning ("Ignoring admintoken-entry because of missing 'permission_level' attribute: " + subChild.OuterXml);
+							Log.Warning ("Ignoring admintoken-entry because of missing 'permission_level' attribute: " +
+							             subChild.OuterXml);
 							continue;
 						}
@@ -224,10 +232,11 @@
 						int permissionLevel = 2000;
 						if (!int.TryParse (lineItem.GetAttribute ("permission_level"), out permissionLevel)) {
-							Log.Warning ("Ignoring admintoken-entry because of invalid (non-numeric) value for 'permission_level' attribute: " + subChild.OuterXml);
-							continue;
-						}
-
-						AddAdmin (name, token, permissionLevel, false); 
-					
+							Log.Warning (
+								"Ignoring admintoken-entry because of invalid (non-numeric) value for 'permission_level' attribute: " +
+								subChild.OuterXml);
+							continue;
+						}
+
+						AddAdmin (name, token, permissionLevel, false);
 					}
 				}
@@ -238,4 +247,5 @@
 							continue;
 						}
+
 						if (subChild.NodeType != XmlNodeType.Element) {
 							Log.Warning ("Unexpected XML node found in 'permissions' section: " + subChild.OuterXml);
@@ -243,26 +253,29 @@
 						}
 
-						XmlElement lineItem = (XmlElement)subChild;
+						XmlElement lineItem = (XmlElement) subChild;
 
 						if (!lineItem.HasAttribute ("module")) {
-							Log.Warning ("Ignoring permission-entry because of missing 'module' attribute: " + subChild.OuterXml);
-							continue;
-						}
-					
+							Log.Warning ("Ignoring permission-entry because of missing 'module' attribute: " +
+							             subChild.OuterXml);
+							continue;
+						}
+
 						if (!lineItem.HasAttribute ("permission_level")) {
-							Log.Warning ("Ignoring permission-entry because of missing 'permission_level' attribute: " + subChild.OuterXml);
-							continue;
-						}
-					
+							Log.Warning ("Ignoring permission-entry because of missing 'permission_level' attribute: " +
+							             subChild.OuterXml);
+							continue;
+						}
+
 						int permissionLevel = 0;
 						if (!int.TryParse (lineItem.GetAttribute ("permission_level"), out permissionLevel)) {
-							Log.Warning ("Ignoring permission-entry because of invalid (non-numeric) value for 'permission_level' attribute: " + subChild.OuterXml);
-							continue;
-						}
-
-						AddModulePermission (lineItem.GetAttribute ("module").ToLower (), permissionLevel, false); 
-					}
-				}
-
+							Log.Warning (
+								"Ignoring permission-entry because of invalid (non-numeric) value for 'permission_level' attribute: " +
+								subChild.OuterXml);
+							continue;
+						}
+
+						AddModulePermission (lineItem.GetAttribute ("module").ToLower (), permissionLevel, false);
+					}
+				}
 			}
 
@@ -273,40 +286,47 @@
 			fileWatcher.EnableRaisingEvents = false;
 
-			using (StreamWriter sw = new StreamWriter(GetFullPath ())) {
-                sw.WriteLine ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
-                sw.WriteLine ("<webpermissions>");
-                sw.WriteLine  ();
-                sw.WriteLine ("	<admintokens>");
-                sw.WriteLine ("		<!-- <token name=\"adminuser1\" token=\"supersecrettoken\" permission_level=\"0\" /> -->");
-                foreach (AdminToken at in admintokens.Values) {
-                    sw.WriteLine (string.Format ("		<token name=\"{0}\" token=\"{1}\" permission_level=\"{2}\" />", at.name, at.token, at.permissionLevel));
-                }
-                sw.WriteLine ("	</admintokens>");
-                sw.WriteLine ();
-                sw.WriteLine ("	<permissions>");
-                foreach (WebModulePermission wap in modules.Values) {
-                    sw.WriteLine (string.Format ("		<permission module=\"{0}\" permission_level=\"{1}\" />", wap.module, wap.permissionLevel));
-                }
-                sw.WriteLine ("		<!-- <permission module=\"web.map\" permission_level=\"1000\" /> -->");
-                sw.WriteLine ();
-                sw.WriteLine ("		<!-- <permission module=\"webapi.getlog\" permission_level=\"0\" /> -->");
-                sw.WriteLine ("		<!-- <permission module=\"webapi.executeconsolecommand\" permission_level=\"0\" /> -->");
-                sw.WriteLine ();
-                sw.WriteLine ("		<!-- <permission module=\"webapi.getstats\" permission_level=\"1000\" /> -->");
-                sw.WriteLine ("		<!-- <permission module=\"webapi.getplayersonline\" permission_level=\"1000\" /> -->");
-                sw.WriteLine ();
-                sw.WriteLine ("		<!-- <permission module=\"webapi.getplayerslocation\" permission_level=\"1000\" /> -->");
-                sw.WriteLine ("		<!-- <permission module=\"webapi.viewallplayers\" permission_level=\"1\" /> -->");
-                sw.WriteLine ();
-                sw.WriteLine ("		<!-- <permission module=\"webapi.getlandclaims\" permission_level=\"1000\" /> -->");
-                sw.WriteLine ("		<!-- <permission module=\"webapi.viewallclaims\" permission_level=\"1\" /> -->");
-                sw.WriteLine ();
-                sw.WriteLine ("		<!-- <permission module=\"webapi.getplayerinventory\" permission_level=\"1\" /> -->");
-                sw.WriteLine ();
-                sw.WriteLine ("		<!-- <permission module=\"webapi.gethostilelocation\" permission_level=\"1\" /> -->");
-                sw.WriteLine ("		<!-- <permission module=\"webapi.getanimalslocation\" permission_level=\"1\" /> -->");
-                sw.WriteLine ("	</permissions>");
-                sw.WriteLine ();
-                sw.WriteLine ("</webpermissions>");
+			using (StreamWriter sw = new StreamWriter (GetFullPath ())) {
+				sw.WriteLine ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+				sw.WriteLine ("<webpermissions>");
+				sw.WriteLine ();
+				sw.WriteLine ("	<admintokens>");
+				sw.WriteLine (
+					"		<!-- <token name=\"adminuser1\" token=\"supersecrettoken\" permission_level=\"0\" /> -->");
+				foreach (AdminToken at in admintokens.Values) {
+					sw.WriteLine ("		<token name=\"{0}\" token=\"{1}\" permission_level=\"{2}\" />", at.name, at.token,
+						at.permissionLevel);
+				}
+
+				sw.WriteLine ("	</admintokens>");
+				sw.WriteLine ();
+				sw.WriteLine ("	<permissions>");
+				foreach (WebModulePermission wap in modules.Values) {
+					sw.WriteLine ("		<permission module=\"{0}\" permission_level=\"{1}\" />", wap.module,
+						wap.permissionLevel);
+				}
+
+				sw.WriteLine ("		<!-- <permission module=\"web.map\" permission_level=\"1000\" /> -->");
+				sw.WriteLine ();
+				sw.WriteLine ("		<!-- <permission module=\"webapi.getlog\" permission_level=\"0\" /> -->");
+				sw.WriteLine (
+					"		<!-- <permission module=\"webapi.executeconsolecommand\" permission_level=\"0\" /> -->");
+				sw.WriteLine ();
+				sw.WriteLine ("		<!-- <permission module=\"webapi.getstats\" permission_level=\"1000\" /> -->");
+				sw.WriteLine ("		<!-- <permission module=\"webapi.getplayersonline\" permission_level=\"1000\" /> -->");
+				sw.WriteLine ();
+				sw.WriteLine (
+					"		<!-- <permission module=\"webapi.getplayerslocation\" permission_level=\"1000\" /> -->");
+				sw.WriteLine ("		<!-- <permission module=\"webapi.viewallplayers\" permission_level=\"1\" /> -->");
+				sw.WriteLine ();
+				sw.WriteLine ("		<!-- <permission module=\"webapi.getlandclaims\" permission_level=\"1000\" /> -->");
+				sw.WriteLine ("		<!-- <permission module=\"webapi.viewallclaims\" permission_level=\"1\" /> -->");
+				sw.WriteLine ();
+				sw.WriteLine ("		<!-- <permission module=\"webapi.getplayerinventory\" permission_level=\"1\" /> -->");
+				sw.WriteLine ();
+				sw.WriteLine ("		<!-- <permission module=\"webapi.gethostilelocation\" permission_level=\"1\" /> -->");
+				sw.WriteLine ("		<!-- <permission module=\"webapi.getanimalslocation\" permission_level=\"1\" /> -->");
+				sw.WriteLine ("	</permissions>");
+				sw.WriteLine ();
+				sw.WriteLine ("</webpermissions>");
 
 				sw.Flush ();
@@ -318,9 +338,8 @@
 
 
-		
 		public class AdminToken {
 			public string name;
+			public int permissionLevel;
 			public string token;
-			public int permissionLevel;
 
 			public AdminToken (string _name, string _token, int _permissionLevel) {
@@ -340,7 +359,4 @@
 			}
 		}
-
-
 	}
 }
-
