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 @@
 	}
 }
-
