Index: binary-improvements/7dtd-server-fixes/src/PersistentData/InvItem.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PersistentData/InvItem.cs	(revision 144)
+++ binary-improvements/7dtd-server-fixes/src/PersistentData/InvItem.cs	(revision 144)
@@ -0,0 +1,17 @@
+using System;
+using System.Runtime.Serialization;
+
+namespace AllocsFixes.PersistentData
+{
+	[Serializable]
+	public class InvItem
+	{
+		public string itemName;
+		public int count;
+
+		public InvItem (string itemName, int count)
+		{
+		}
+	}
+}
+
Index: binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs	(revision 144)
+++ binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs	(revision 144)
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using System.Threading;
+
+namespace AllocsFixes.PersistentData
+{
+	[Serializable]
+	public class Inventory
+	{
+		public List<InvItem> bag;
+		public List<InvItem> belt;
+
+		public Inventory ()
+		{
+			bag = new List<InvItem> ();
+			belt = new List<InvItem> ();
+		}
+
+		public void Update (PlayerDataFile pdf)
+		{
+			Log.Out ("Updating player inventory - player id: " + pdf.id);
+			ProcessInv (bag, pdf.bag);
+			ProcessInv (belt, pdf.inventory);
+			Log.Out ("Now: belt: " + belt.Count + " - bag: " + bag.Count);
+		}
+
+		private void ProcessInv (List<InvItem> target, InventoryField[] sourceFields)
+		{
+			Monitor.Enter (target);
+			try {
+				target.Clear ();
+				for (int i = 0; i < sourceFields.Length; i++) {
+					if (sourceFields [i].count > 0) {
+						int count = sourceFields [i].count;
+						string name = getInvFieldName (sourceFields [i]);
+
+						target.Add (new InvItem (name, count));
+					} else {
+						target.Add (null);
+					}
+				}
+			} finally {
+				Monitor.Exit (target);
+			}
+		}
+
+		private string getInvFieldName (InventoryField item)
+		{
+			ItemBase iBase = ItemBase.list [item.itemValue.type];
+			string name = iBase.name;
+			if (iBase.IsBlock ()) {
+				ItemBlock iBlock = (ItemBlock)iBase;
+				name = iBlock.GetItemName (item.itemValue);
+			}
+			return name;
+		}
+
+
+	}
+}
+
Index: binary-improvements/7dtd-server-fixes/src/PersistentData/KnownPlayers.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PersistentData/KnownPlayers.cs	(revision 143)
+++ 	(revision )
@@ -1,23 +1,0 @@
-using System;
-using System.Runtime.Serialization;
-
-namespace AllocsFixes.PersistentData
-{
-	[Serializable]
-	public class KnownPlayers
-	{
-		private int entityId;
-		private string name;
-
-		public KnownPlayers ()
-		{
-		}
-
-		public KnownPlayers (SerializationInfo info, StreamingContext ctxt)
-		{
-			this.entityId = info.GetInt32 ("entityId");
-			this.name = info.GetString ("name");
-		}
-	}
-}
-
Index: binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs	(revision 143)
+++ binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs	(revision 144)
@@ -1,4 +1,3 @@
 using System;
-using System.Collections.Generic;
 using System.IO;
 using System.Runtime.Serialization;
@@ -10,5 +9,14 @@
 	public class PersistentContainer
 	{
-		public Dictionary<string, KnownPlayers> players = new Dictionary<string, KnownPlayers> ();
+		private Players players;
+
+		public Players Players {
+			get {
+				if (players == null)
+					players = new Players ();
+				return players;
+			}
+		}
+
 		private static PersistentContainer instance;
 
@@ -24,5 +32,4 @@
 		private PersistentContainer ()
 		{
-			Log.Out ("new PersistentContainer()");
 		}
 
Index: binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs	(revision 144)
+++ binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs	(revision 144)
@@ -0,0 +1,99 @@
+using System;
+using System.Runtime.Serialization;
+using UnityEngine;
+
+namespace AllocsFixes.PersistentData
+{
+	[Serializable]
+	public class Player
+	{
+		private readonly string steamId;
+		private int entityId;
+		private string name;
+		private string ip;
+		private long totalPlayTime;
+		private Inventory inventory;
+		[NonSerialized]
+		private ClientInfo
+			clientInfo;
+
+		public string SteamID {
+			get { return steamId; }
+		}
+
+		public int EntityID {
+			get { return entityId; }
+			set { entityId = value; }
+		}
+
+		public string Name {
+			get { return name; }
+			set { name = value; }
+		}
+
+		public string IP {
+			get { return ip; }
+			set { ip = value; }
+		}
+
+		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 CommonMappingFunctions.GetEntityPlayer (clientInfo);
+				} else {
+					return null;
+				}
+			}
+		}
+
+		public long TotalPlayTime {
+			get {
+				if (IsOnline) {
+					return totalPlayTime + (long)(Time.timeSinceLevelLoad - Entity.CreationTimeSinceLevelLoad);
+				} else {
+					return totalPlayTime;
+				}
+			}
+		}
+
+		public void SetOffline ()
+		{
+			Log.Out ("Player set to offline: " + steamId);
+			totalPlayTime += (long)(Time.timeSinceLevelLoad - Entity.CreationTimeSinceLevelLoad);
+			clientInfo = null;
+		}
+
+		public void SetOnline (ClientInfo ci)
+		{
+			Log.Out ("Player set to online: " + steamId);
+			clientInfo = ci;
+			entityId = CommonMappingFunctions.GetEntityID (ci);
+			name = CommonMappingFunctions.GetPlayerName (ci);
+			ip = ci.networkPlayer.ipAddress;
+		}
+
+		public Player (string steamId)
+		{
+			this.steamId = steamId;
+			this.inventory = new Inventory ();
+		}
+
+
+	}
+}
Index: binary-improvements/7dtd-server-fixes/src/PersistentData/Players.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PersistentData/Players.cs	(revision 144)
+++ binary-improvements/7dtd-server-fixes/src/PersistentData/Players.cs	(revision 144)
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using System.Text.RegularExpressions;
+
+namespace AllocsFixes.PersistentData
+{
+	[Serializable]
+	public class Players
+	{
+		private Dictionary<string, Player> players = new Dictionary<string, Player> ();
+
+		public Player this [string steamId] {
+			get {
+				if (players.ContainsKey (steamId))
+					return players [steamId];
+				else {
+					if (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;
+				}
+			}
+		}
+
+		public List<string> SteamIDs {
+			get { return new List<string> (players.Keys); }
+		}
+
+		public string GetSteamID (string _nameOrId, bool _ignoreColorCodes)
+		{
+			if (_nameOrId == null || _nameOrId.Length == 0)
+				return null;
+
+			long tempLong;
+			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 ();
+					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 && kvp.Value.Name.Equals (name)) {
+							return kvp.Key;
+						}
+					}
+				}
+			}
+			return null;
+		}
+	}
+}
+
