Index: binary-improvements/MapRendering/Web/Handlers/PathHandler.cs
===================================================================
--- binary-improvements/MapRendering/Web/Handlers/PathHandler.cs	(revision 371)
+++ binary-improvements/MapRendering/Web/Handlers/PathHandler.cs	(revision 372)
@@ -12,17 +12,11 @@
 		}
 
-		public string ModuleName {
-			get { return moduleName; }
-		}
+		public string ModuleName => moduleName;
 
 		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);
-			}
-
-			return true;
+		public virtual bool IsAuthorizedForHandler (WebConnection _user, int _permissionLevel) {
+			return moduleName == null || WebPermissions.Instance.ModuleAllowedWithLevel (moduleName, _permissionLevel);
 		}
 
Index: binary-improvements/MapRendering/Web/SSE/EventBase.cs
===================================================================
--- binary-improvements/MapRendering/Web/SSE/EventBase.cs	(revision 371)
+++ binary-improvements/MapRendering/Web/SSE/EventBase.cs	(revision 372)
@@ -55,12 +55,15 @@
 				stringBuilder.Append ("data: ");
 				
-				if (data is string dataString) {
-					stringBuilder.AppendLine (dataString);
-				} else if (data is JSONNode dataJson) {
-					dataJson.ToString (stringBuilder);
-					stringBuilder.AppendLine ("");
-				} else {
-					Log.Error ($"SSE ({Name}): Data is neither string nor JSON.");
-					continue;
+				switch (data) {
+					case string dataString:
+						stringBuilder.AppendLine (dataString);
+						break;
+					case JSONNode dataJson:
+						dataJson.ToString (stringBuilder);
+						stringBuilder.AppendLine ("");
+						break;
+					default:
+						logError ("Data is neither string nor JSON.", false);
+						continue;
 				}
 				
@@ -76,5 +79,5 @@
 						bytesToSend = Encoding.UTF8.GetBytes (output, 0, output.Length, buf, 0);
 					} catch (ArgumentException e) {
-						Log.Error ($"SSE ({Name}): Exception while encoding data for output, most likely exceeding buffer size:");
+						logError ("Exception while encoding data for output, most likely exceeding buffer size:", false);
 						Log.Exception (e);
 						return;
@@ -95,6 +98,5 @@
 							totalClosed++;
 
-							Log.Out (
-								$"SSE ({Name}): Can not write to endpoint, closing. (Left open: {currentlyOpen}, total opened: {totalOpened}, closed: {totalClosed}");
+							logError ("Can not write to endpoint, closing", true);
 							openStreams.RemoveAt (i);
 							resp.Close ();
@@ -107,10 +109,9 @@
 
 						if (e.InnerException is SocketException se) {
-							if (se.SocketErrorCode != SocketError.ConnectionAborted) {
-								Log.Error ($"SSE ({Name}): SocketError ({se.SocketErrorCode}) while trying to write: (Left open: {currentlyOpen}, total opened: {totalOpened}, closed: {totalClosed}");
+							if (se.SocketErrorCode != SocketError.ConnectionAborted && se.SocketErrorCode != SocketError.Shutdown) {
+								logError ($"SocketError ({se.SocketErrorCode}) while trying to write", true);
 							}
 						} else {
-							Log.Error (
-								$"SSE ({Name}): IOException while trying to write: (Left open: {currentlyOpen}, total opened: {totalOpened}, closed: {totalClosed}");
+							logError ("IOException while trying to write:", true);
 							Log.Exception (e);
 						}
@@ -122,6 +123,5 @@
 
 						openStreams.RemoveAt (i);
-						Log.Error (
-							$"SSE ({Name}): Exception while trying to write: (Left open: {currentlyOpen}, total opened: {totalOpened}, closed: {totalClosed}");
+						logError ("Exception while trying to write:", true);
 						Log.Exception (e);
 						resp.Close ();
@@ -131,4 +131,10 @@
 		}
 
+		protected void logError (string _message, bool _printConnections) {
+			Log.Error (_printConnections
+				? $"SSE ({Name}): {_message} (Left open: {currentlyOpen}, total opened: {totalOpened}, closed: {totalClosed})"
+				: $"SSE ({Name}): {_message}");
+		}
+
 		public virtual int DefaultPermissionLevel () {
 			return 0;
Index: binary-improvements/MapRendering/Web/WebPermissions.cs
===================================================================
--- binary-improvements/MapRendering/Web/WebPermissions.cs	(revision 371)
+++ binary-improvements/MapRendering/Web/WebPermissions.cs	(revision 372)
@@ -18,5 +18,5 @@
 		private readonly Dictionary<string, WebModulePermission> modules = new CaseInsensitiveStringDictionary<WebModulePermission> ();
 
-		public WebPermissions () {
+		private WebPermissions () {
 			allModulesList = new List<WebModulePermission> ();
 			allModulesListRO = new ReadOnlyCollection<WebModulePermission> (allModulesList);
@@ -29,9 +29,5 @@
 			get {
 				lock (typeof (WebPermissions)) {
-					if (instance == null) {
-						instance = new WebPermissions ();
-					}
-
-					return instance;
+					return instance ?? (instance = new WebPermissions ());
 				}
 			}
@@ -52,6 +48,5 @@
 
 		public WebModulePermission GetModulePermission (string _module) {
-			WebModulePermission result;
-			if (modules.TryGetValue (_module, out result)) {
+			if (modules.TryGetValue (_module, out WebModulePermission result)) {
 				return result;
 			}
@@ -192,10 +187,10 @@
 
 			if (!File.Exists (GetFullPath ())) {
-				Log.Out (string.Format ("Permissions file '{0}' not found, creating.", GetFileName ()));
+				Log.Out ($"Permissions file '{GetFileName ()}' not found, creating.");
 				Save ();
 				return;
 			}
 
-			Log.Out (string.Format ("Loading permissions file at '{0}'", GetFullPath ()));
+			Log.Out ($"Loading permissions file at '{GetFullPath ()}'");
 
 			XmlDocument xmlDoc = new XmlDocument ();
