Index: code/branches/FICN/src/network/CMakeLists.txt
===================================================================
--- code/branches/FICN/src/network/CMakeLists.txt	(revision 413)
+++ code/branches/FICN/src/network/CMakeLists.txt	(revision 415)
@@ -6,4 +6,5 @@
   ConnectionManager.cc
   GameStateManager.cc
+  GameStateClient.cc
   PacketBuffer.cc
   PacketDecoder.cc
Index: code/branches/FICN/src/network/Client.cc
===================================================================
--- code/branches/FICN/src/network/Client.cc	(revision 413)
+++ code/branches/FICN/src/network/Client.cc	(revision 415)
@@ -149,5 +149,5 @@
     id=orxonox::ID(std::string(clid->message));
     if(id!=NULL)
-      id->setNetworkID(clid->classid);
+      id->setNetworkID(clid->clid);
     return;
   }
Index: code/branches/FICN/src/network/ConnectionManager.cc
===================================================================
--- code/branches/FICN/src/network/ConnectionManager.cc	(revision 413)
+++ code/branches/FICN/src/network/ConnectionManager.cc	(revision 415)
@@ -90,5 +90,5 @@
   
   bool ConnectionManager::addPacketAll(ENetPacket *packet){
-    for(int i=0; i<clientVector.size(); i++){
+    for(unsigned int i=0; i<clientVector.size(); i++){
       if(enet_peer_send(&(peerMap.find(clientVector[i])->second), i, packet)!=0)
          return false;
@@ -158,5 +158,5 @@
     bool disconnected=false;
     ENetEvent event;
-    for(int i=0; i<clientVector.size(); i++){
+    for(unsigned int i=0; i<clientVector.size(); i++){
       enet_peer_disconnect(&(peerMap.find(clientVector[i])->second), 0);
       while( !disconnected && enet_host_service(server, &event, NETWORK_WAIT_TIMEOUT) > 0){
Index: code/branches/FICN/src/network/GameStateManager.h
===================================================================
--- code/branches/FICN/src/network/GameStateManager.h	(revision 413)
+++ code/branches/FICN/src/network/GameStateManager.h	(revision 415)
@@ -20,31 +20,9 @@
 #include "orxonox/core/IdentifierIncludes.h"
 #include "orxonox/core/Iterator.h"
-#include "PacketManager.h"
+#include "PacketTypes.h"
 
 namespace network {
 
-/**
- * This struct defines a gamestate:
- * size: total size of the data in *data
- * data: pointer to the data allocated in the memory
- */
-  struct GameState{
-  int id;
-  int size;
-  unsigned char *data;
-};
 
-/**
- * this struct defines a gamestate:
- * compsize is the size of the compressed data
- * normsize is the size of the uncompressed data
- * data are the gamestates
- */
-  struct GameStateCompressed{
-	int id; 
-	int compsize;
-	int normsize;
-	unsigned char *data;
-  };
 
 /**
Index: code/branches/FICN/src/network/PacketDecoder.cc
===================================================================
--- code/branches/FICN/src/network/PacketDecoder.cc	(revision 413)
+++ code/branches/FICN/src/network/PacketDecoder.cc	(revision 415)
@@ -137,5 +137,5 @@
         cid->length = ((classid*)(packet->data))->length;
         cid->id = ((classid *)(packet->data))->id;
-        cid->classid = ((classid *)(packet->data))->classid;
+        cid->clid = ((classid *)(packet->data))->clid;
         cid->message = (const char *)malloc(cid->length);
         enet_packet_destroy( packet );
@@ -193,5 +193,5 @@
         cout << "id of classid:    " << cid->id << endl;
         cout << "size of classid:  " << cid->length << endl;
-        cout << "ID of classid:    " << cid->classid <<endl;
+        cout << "ID of classid:    " << cid->clid <<endl;
         cout << "data of classid:  " << cid->message <<endl;
 }
Index: code/branches/FICN/src/network/PacketGenerator.cc
===================================================================
--- code/branches/FICN/src/network/PacketGenerator.cc	(revision 413)
+++ code/branches/FICN/src/network/PacketGenerator.cc	(revision 415)
@@ -14,5 +14,4 @@
 #include <cstring>
 
-using namespace std;
 using namespace network;
 
@@ -23,5 +22,5 @@
 ENetPacket* PacketGenerator::acknowledgement( int state, int reliable )
 {
-	cout << "generating new acknowledgement" << endl;
+        std::cout << "generating new acknowledgement" << std::endl;
 	ack* ackreq = new ack;
 	ackreq->id = ACK;
@@ -35,5 +34,5 @@
 ENetPacket* PacketGenerator::mousem( double x, double y, int reliable )
 {
-	cout << "generating new mouse" << endl;
+	std::cout << "generating new mouse" << std::endl;
 	mouse* mousemove = new mouse;
 	mousemove->id = MOUSE;
@@ -48,5 +47,5 @@
 ENetPacket* PacketGenerator::keystrike( char press, int reliable )
 {
-	cout << "generating new keyboard" << endl;
+	std::cout << "generating new keyboard" << std::endl;
 	keyboard* key = new keyboard;
 	key->id = KEYBOARD;
Index: code/branches/FICN/src/network/PacketManager.h
===================================================================
--- code/branches/FICN/src/network/PacketManager.h	(revision 413)
+++ code/branches/FICN/src/network/PacketManager.h	(revision 415)
@@ -4,17 +4,12 @@
 #include <string>
 #include <enet/enet.h>
-#include "GameStateManager.h"
+#include "PacketTypes.h"
 
 //enum netowk generaly used to set the type ID of a packet
 namespace network{
   
-enum packet_id {
-	ACK,
-	MOUSE,
-	KEYBOARD,
-	CHAT,
-	GAMESTATE ,
-    CLASSID
-};
+  
+
+
 
 /*
@@ -36,20 +31,4 @@
         ENetPacket* clid( int classid, std::string classname, int reliable = ENET_PACKET_FLAG_RELIABLE );
 private:
-	//used to set the bytes in the right order
-	struct ack {
-		int id;
-		int a;
-	};
-
-	struct mouse {
-		int id;
-		double x;
-		double y;
-	};
-
-	struct keyboard {
-		int id;
-		char press;
-	};	
 };
 
@@ -66,32 +45,6 @@
 	//call this function to decode, it calls the right decoding function below
 	bool elaborate( ENetPacket* packet, int clientId );
-        struct classid{
-          int id;
-          int length;
-          int classid;
-          const char *message;
-        };
+        
 private:
-	struct ack {
-		int id;
-		int a;
-	};
-
-	struct mouse {
-		int id;
-		double x;
-		double y;
-	};
-
-	struct keyboard {
-		int id;
-		char press;
-	};
-	//only in this class, not PacketGenerator, used as pattern to put incoming
-	//bytes inside
-	struct chat {
-		int id;
-		const char* message;
-	};
         
         
