Index: branches/thasling/DistributedGA/DistributedGA.Core.Host/Program.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core.Host/Program.cs	(revision 13971)
+++ branches/thasling/DistributedGA/DistributedGA.Core.Host/Program.cs	(revision 13972)
@@ -31,9 +31,9 @@
           var message = CreateMessage(pi, i);
           Console.WriteLine("Publishing messages...");
-          h.PublishDataToNetwork(message);
+          //h.PublishDataToNetwork(message);
           Console.WriteLine("Messages published.");
           Console.WriteLine("Recieved messages:");
           foreach (var item in h.GetDataFromNetwork()) {
-            Console.WriteLine(string.Format("Message:{0}", GetString(item)));
+            //Console.WriteLine(string.Format("Message:{0}", GetString(item)));
           }
         }
Index: branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs	(revision 13971)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs	(revision 13972)
@@ -22,6 +22,6 @@
     //two queues are used to gather and and provide population more efficiently
     private object activeQueueLocker = new Object();
-    private SizedConcurrentQueue<byte[]> writeQueue;
-    private SizedConcurrentQueue<byte[]> readQueue;
+    private SizedConcurrentQueue<KeyValuePair<PeerInfo,byte[]>> writeQueue;
+    private SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[]>> readQueue;
 
     //uses IMessageService for recieving population from one peer at once
@@ -38,6 +38,6 @@
         }; // TODO: get own peerinfo
 
-        writeQueue = new SizedConcurrentQueue<byte[]>();
-        readQueue = new SizedConcurrentQueue<byte[]>();
+        writeQueue = new SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[]>>();
+        readQueue = new SizedConcurrentQueue<KeyValuePair<PeerInfo,byte[]>>();
         writeQueue.Limit = messageCacheCapacity;
         readQueue.Limit = writeQueue.Limit;
@@ -70,5 +70,5 @@
     }
 
-    public void PublishDataToNetwork(byte[][] data) {
+    public void PublishDataToNetwork(byte[] data) {
       try {
         foreach (PeerInfo peer in peerListManager.GetPeerList()) {
@@ -87,8 +87,8 @@
     }
 
-    public byte[][] GetDataFromNetwork() {
+    public List<KeyValuePair<PeerInfo, byte[]>> GetDataFromNetwork() {
       try {
-        List<byte[]> res = new List<byte[]>();
-        byte[] item = null;
+        List<KeyValuePair<PeerInfo, byte[]>> res = new List<KeyValuePair<PeerInfo, byte[]>>();
+        KeyValuePair<PeerInfo,byte[]> item;
         lock (activeQueueLocker) {
           //changing the current queue for storing items to send
@@ -105,5 +105,5 @@
           }
         }
-        return res.ToArray();
+        return res;//.ToArray();
       }
       catch (Exception ex) {
@@ -146,5 +146,5 @@
       if (e != null && e.Sender.ProblemInstance.Equals(ownInstance.ProblemInstance)) {
         lock (activeQueueLocker) {
-            writeQueue.Enqueue(e.data);
+            writeQueue.Enqueue(new KeyValuePair<PeerInfo, byte[]>(e.Sender, e.data));
         }
 
Index: branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs	(revision 13971)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs	(revision 13972)
@@ -15,6 +15,6 @@
 
     //providing two queues for faster access
-    private SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[][]>> bufferedMessagesWrite;
-    private SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[][]>> bufferedMessagesRead;
+    private SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[]>> bufferedMessagesWrite;
+    private SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[]>> bufferedMessagesRead;
 
 
@@ -25,7 +25,7 @@
     public void Init(PeerInfo source, int messageCacheCapacity) {
       myself = source;
-      bufferedMessagesRead = new SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[][]>>();
+      bufferedMessagesRead = new SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[]>>();
       bufferedMessagesRead.Limit = messageCacheCapacity;
-      bufferedMessagesWrite = new SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[][]>>();
+      bufferedMessagesWrite = new SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[]>>();
       bufferedMessagesWrite.Limit = bufferedMessagesRead.Limit;
       timer = new Timer(1000 * 10); //each 10 seconds
@@ -34,6 +34,6 @@
     }
 
-    public void SendData(PeerInfo destination, byte[][] data) {
-      bufferedMessagesWrite.Enqueue(new KeyValuePair<PeerInfo, byte[][]>(destination, data));
+    public void SendData(PeerInfo destination, byte[] data) {
+      bufferedMessagesWrite.Enqueue(new KeyValuePair<PeerInfo, byte[]>(destination, data));
     }
 
@@ -50,7 +50,7 @@
         bufferedMessagesRead = bufferedMessagesWrite;
         bufferedMessagesWrite = tmp;
-        List<KeyValuePair<PeerInfo, byte[][]>> messages = new List<KeyValuePair<PeerInfo, byte[][]>>();
+        List<KeyValuePair<PeerInfo, byte[]>> messages = new List<KeyValuePair<PeerInfo, byte[]>>();
         while (!bufferedMessagesRead.IsEmpty) {
-          KeyValuePair<PeerInfo, byte[][]> message;
+          KeyValuePair<PeerInfo, byte[]> message;
           if (bufferedMessagesRead.TryDequeue(out message)) {
             messages.Add(message);
@@ -72,5 +72,5 @@
     /// <param name="messages">a list with multiple messages to the same  destination</param>
     /// <returns></returns>
-    private List<KeyValuePair<PeerInfo, byte[][]>> MergeMessages(List<KeyValuePair<PeerInfo, byte[][]>> messages) {
+    private List<KeyValuePair<PeerInfo, byte[][]>> MergeMessages(List<KeyValuePair<PeerInfo, byte[]>> messages) {
       List<KeyValuePair<PeerInfo, byte[][]>> res = new List<KeyValuePair<PeerInfo, byte[][]>>();
       Dictionary<PeerInfo, List<byte[]>> cache = new Dictionary<PeerInfo, List<byte[]>>();
@@ -79,7 +79,7 @@
           cache.Add(messagePackage.Key, new List<byte[]>());
         }
-        for (int i = 0; i <= messagePackage.Value.GetUpperBound(0); i++) {
-          cache[messagePackage.Key].Add(messagePackage.Value[i]);
-        }
+        //for (int i = 0; i <= messagePackage.Value.GetUpperBound(0); i++) {
+          cache[messagePackage.Key].Add(messagePackage.Value);
+        //}
       }
       //now we have a dictionary with all messages per destionation
Index: branches/thasling/DistributedGA/DistributedGA.Core/Interface/IMessageHandler.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Interface/IMessageHandler.cs	(revision 13971)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Interface/IMessageHandler.cs	(revision 13972)
@@ -9,7 +9,7 @@
     void Init(string lanIpPrefix, string contactServerUrl, string problemInstance, int messageCacheCapacty, double communicationRate);
 
-    void PublishDataToNetwork(byte[][] data);
+    void PublishDataToNetwork(byte[] data);
 
-    byte[][] GetDataFromNetwork();
+    List<KeyValuePair<PeerInfo, byte[]>> GetDataFromNetwork();
 
     PeerInfo GetPeerInfo();
Index: branches/thasling/DistributedGA/DistributedGA.Core/Interface/IMessageSender.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Interface/IMessageSender.cs	(revision 13971)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Interface/IMessageSender.cs	(revision 13972)
@@ -7,5 +7,5 @@
     void Init(PeerInfo source, int messageCacheCapacity);
 
-    void SendData(PeerInfo destination, byte[][] data);
+    void SendData(PeerInfo destination, byte[] data);
 
     void Dispose();
Index: branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs	(revision 13971)
+++ branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs	(revision 13972)
@@ -208,7 +208,7 @@
         {
           // send
-          var message = new byte[emigrantsList.Count][];
           for (int ei = 0; ei < emigrantsList.Count; ei++) {
             using (var stream = new MemoryStream()) {
+              byte[] message;
               var emigrantScope = emigrantsList[ei];
 
@@ -219,8 +219,9 @@
               }
               HeuristicLab.Persistence.Default.Xml.XmlGenerator.Serialize(msgScope, stream);
-              message[ei] = stream.GetBuffer();
+              message = stream.GetBuffer();
+              h.PublishDataToNetwork(message);
+
             }
           }
-          h.PublishDataToNetwork(message);
         }
 
@@ -229,6 +230,7 @@
           // recieve
           var message = h.GetDataFromNetwork();
-          for (int ei = 0; ei < message.Length; ei++) {
-            using (var stream = new MemoryStream(message[ei])) {
+          //for (int ei = 0; ei < message.Length; ei++) {
+          foreach (var msg in message) {
+            using (var stream = new MemoryStream(msg.Value)) {
               var immigrantScope = HeuristicLab.Persistence.Default.Xml.XmlParser.Deserialize<IScope>(stream);
 
@@ -278,5 +280,6 @@
               double quality = 0.0;
               quality = qImmigrant;
-              log.LogMessage(string.Format("Recieved individual with quality {0}", quality));
+              log.LogMessage(string.Format("Recieved individual with quality {0} from peer {1}:{2} ; Job: {3}",
+                                            quality, msg.Key.IpAddress, msg.Key.Port, msg.Key.ProblemInstance));
             }
           }
Index: branches/thasling/DistributedGA/DistributedGA.Hive/P2PTask.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Hive/P2PTask.cs	(revision 13971)
+++ branches/thasling/DistributedGA/DistributedGA.Hive/P2PTask.cs	(revision 13972)
@@ -115,10 +115,10 @@
                         var message = CreateMessage(pi, i);
                         Console.WriteLine("Publishing messages...");
-                        h.PublishDataToNetwork(message);
+                        //h.PublishDataToNetwork(message);
                         Console.WriteLine("Messages published.");
                         Console.WriteLine("Recieved messages:");
                         foreach (var item in h.GetDataFromNetwork())
                         {
-                            log.LogMessage(string.Format("Message:{0}", GetString(item)));
+                            //log.LogMessage(string.Format("Message:{0}", GetString(item)));
                         }
                         ExecutionTime = DateTime.Now - startTime;
