Index: code/branches/netp5/src/network/packet/Acknowledgement.cc
===================================================================
--- code/branches/netp5/src/network/packet/Acknowledgement.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/Acknowledgement.cc	(revision 3209)
@@ -27,9 +27,8 @@
  */
 
+#include "Acknowledgement.h"
 
-#include "Acknowledgement.h"
-#include "network/Host.h"
+#include "util/Debug.h"
 #include "network/GamestateHandler.h"
-#include "core/CoreIncludes.h"
 
 namespace orxonox {
Index: code/branches/netp5/src/network/packet/Acknowledgement.h
===================================================================
--- code/branches/netp5/src/network/packet/Acknowledgement.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/Acknowledgement.h	(revision 3209)
@@ -26,13 +26,13 @@
  *
  */
-#ifndef NETWORKACKNOLEDGEMENT_H
-#define NETWORKACKNOLEDGEMENT_H
 
-#include "../NetworkPrereqs.h"
+#ifndef _Acknowledgement_H__
+#define _Acknowledgement_H__
+
+#include "network/NetworkPrereqs.h"
 #include "Packet.h"
 
+namespace orxonox {
 const unsigned int ACKID_NACK = 0;
-
-namespace orxonox {
 namespace packet {
 /**
@@ -56,3 +56,3 @@
 } //namespace orxonox
 
-#endif
+#endif /* _Acknowledgement_H__ */
Index: code/branches/netp5/src/network/packet/Chat.cc
===================================================================
--- code/branches/netp5/src/network/packet/Chat.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/Chat.cc	(revision 3209)
@@ -29,6 +29,5 @@
 #include "Chat.h"
 
-#include <enet/enet.h>
-#include <cassert>
+#include <string>
 #include "network/Host.h"
 
@@ -36,5 +35,5 @@
 namespace packet {
   
-#define   PACKET_FLAGS_CHAT ENET_PACKET_FLAG_RELIABLE
+#define   PACKET_FLAGS_CHAT PacketFlag::Reliable
 #define   _PACKETID         0
 const int _PLAYERID     =   _PACKETID + sizeof(ENUM::Type);
@@ -42,5 +41,5 @@
 #define   _MESSAGE          _MESSAGELENGTH + sizeof(uint32_t)
 
-Chat::Chat( std::string message, unsigned int playerID )
+Chat::Chat( const std::string& message, unsigned int playerID )
  : Packet()
 {
Index: code/branches/netp5/src/network/packet/Chat.h
===================================================================
--- code/branches/netp5/src/network/packet/Chat.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/Chat.h	(revision 3209)
@@ -1,11 +1,34 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss <scheusso [at] ee.ethz.ch>
+ *   Co-authors:
+ *      ...
+ *
+ */
 
-#ifndef NETWORKCHAT_H
-#define NETWORKCHAT_H
+#ifndef _NETWORK_Chat_H__
+#define _NETWORK_Chat_H__
 
-#include "../NetworkPrereqs.h"
-
-#include <string>
-#include <cstring>
-
+#include "network/NetworkPrereqs.h"
 #include "Packet.h"
 
@@ -18,5 +41,5 @@
 {
 public:
-  Chat( std::string message, unsigned int playerID );
+  Chat( const std::string& message, unsigned int playerID );
   Chat( uint8_t* data, unsigned int clientID );
   ~Chat();
@@ -35,3 +58,3 @@
 } //namespace orxonox
 
-#endif
+#endif /* _NETWORK_Chat_H__ */
Index: code/branches/netp5/src/network/packet/ClassID.cc
===================================================================
--- code/branches/netp5/src/network/packet/ClassID.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/ClassID.cc	(revision 3209)
@@ -27,15 +27,12 @@
  */
 
+#include "ClassID.h"
 
-
-#include "ClassID.h"
-#include <enet/enet.h>
-#include "core/CoreIncludes.h"
-#include "core/Factory.h"
-#include <cstring>
-#include <string>
 #include <cassert>
 #include <map>
 #include <queue>
+#include <string>
+
+#include "core/CoreIncludes.h"
 
 namespace orxonox {
@@ -43,5 +40,5 @@
 
 
-#define PACKET_FLAGS_CLASSID  ENET_PACKET_FLAG_RELIABLE
+#define PACKET_FLAGS_CLASSID  PacketFlag::Reliable
 #define _PACKETID             0
 
Index: code/branches/netp5/src/network/packet/ClassID.h
===================================================================
--- code/branches/netp5/src/network/packet/ClassID.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/ClassID.h	(revision 3209)
@@ -26,11 +26,9 @@
  *
  */
-#ifndef NETWORKCLASSID_H
-#define NETWORKCLASSID_H
 
-#include "../NetworkPrereqs.h"
+#ifndef _NETWORK_ClassID_H__
+#define _NETWORK_ClassID_H__
 
-#include <string>
-
+#include "network/NetworkPrereqs.h"
 #include "Packet.h"
 
@@ -58,3 +56,3 @@
 } //namespace orxonox
 
-#endif
+#endif /* _NETWORK_ClassID_H__ */
Index: code/branches/netp5/src/network/packet/DeleteObjects.cc
===================================================================
--- code/branches/netp5/src/network/packet/DeleteObjects.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/DeleteObjects.cc	(revision 3209)
@@ -29,13 +29,13 @@
 
 #include "DeleteObjects.h"
-#include <enet/enet.h>
+
+#include <cassert>
+#include "util/Debug.h"
 #include "network/synchronisable/Synchronisable.h"
-#include "core/CoreIncludes.h"
-#include <cassert>
 
 namespace orxonox {
 namespace packet {
 
-#define PACKET_FLAG_DELETE  ENET_PACKET_FLAG_RELIABLE
+#define PACKET_FLAG_DELETE  PacketFlag::Reliable
 #define _PACKETID           0
 #define _QUANTITY           _PACKETID + sizeof(ENUM::Type)
Index: code/branches/netp5/src/network/packet/DeleteObjects.h
===================================================================
--- code/branches/netp5/src/network/packet/DeleteObjects.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/DeleteObjects.h	(revision 3209)
@@ -26,11 +26,9 @@
  *
  */
-#ifndef NETWORKPACKETDELETEOBJECTS_H
-#define NETWORKPACKETDELETEOBJECTS_H
+#ifndef _DeleteObjects_H__
+#define _DeleteObjects_H__
 
-#include "../NetworkPrereqs.h"
-
+#include "network/NetworkPrereqs.h"
 #include "Packet.h"
-
 
 namespace orxonox {
@@ -57,3 +55,3 @@
 } //namespace orxonox
 
-#endif
+#endif /* _DeleteObjects_H__ */
Index: code/branches/netp5/src/network/packet/FunctionCalls.cc
===================================================================
--- code/branches/netp5/src/network/packet/FunctionCalls.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/FunctionCalls.cc	(revision 3209)
@@ -29,15 +29,12 @@
 #include "FunctionCalls.h"
 
-#include <enet/enet.h>
 #include <cassert>
-#include <cstring>
-#include "network/Host.h"
+#include "util/MultiType.h"
 #include "network/NetworkFunction.h"
-#include "util/MultiType.h"
 
 namespace orxonox {
 namespace packet {
   
-#define   PACKET_FLAGS_FUNCTIONCALLS ENET_PACKET_FLAG_RELIABLE
+#define   PACKET_FLAGS_FUNCTIONCALLS PacketFlag::Reliable
 #define   _PACKETID         0
 const unsigned int FUNCTIONCALLS_MEM_ALLOCATION = 1000;
Index: code/branches/netp5/src/network/packet/FunctionCalls.h
===================================================================
--- code/branches/netp5/src/network/packet/FunctionCalls.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/FunctionCalls.h	(revision 3209)
@@ -1,17 +1,40 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss <scheusso [at] ee.ethz.ch>
+ *   Co-authors:
+ *      ...
+ *
+ */
 
-#ifndef NETWORKFUNCTIONCALLS_H
-#define NETWORKFUNCTIONCALLS_H
+#ifndef _FunctionCalls_H__
+#define _FunctionCalls_H__
 
-#include "../NetworkPrereqs.h"
+#include "network/NetworkPrereqs.h"
 
-#include <string>
-#include <cstring>
-
+#include <cassert>
+#include "util/UtilPrereqs.h"
 #include "Packet.h"
-#include <cassert>
 
 namespace orxonox {
-
-class MultiType;
 
 namespace packet {
@@ -44,3 +67,3 @@
 } //namespace orxonox
 
-#endif
+#endif /* _FunctionCalls_H__ */
Index: code/branches/netp5/src/network/packet/FunctionIDs.cc
===================================================================
--- code/branches/netp5/src/network/packet/FunctionIDs.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/FunctionIDs.cc	(revision 3209)
@@ -27,13 +27,13 @@
  */
 
+#include "FunctionIDs.h"
 
-
-#include "FunctionIDs.h"
-#include "network/NetworkFunction.h"
-#include <enet/enet.h>
-#include "core/CoreIncludes.h"
-#include <string>
 #include <cassert>
 #include <queue>
+#include <string>
+
+#include "util/Debug.h"
+#include "core/ObjectList.h"
+#include "network/NetworkFunction.h"
 
 namespace orxonox {
@@ -41,5 +41,5 @@
 
 
-#define PACKET_FLAGS_FUNCTIONIDS  ENET_PACKET_FLAG_RELIABLE
+#define PACKET_FLAGS_FUNCTIONIDS  PacketFlag::Reliable
 #define _PACKETID                 0
 
Index: code/branches/netp5/src/network/packet/FunctionIDs.h
===================================================================
--- code/branches/netp5/src/network/packet/FunctionIDs.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/FunctionIDs.h	(revision 3209)
@@ -26,11 +26,9 @@
  *
  */
-#ifndef NETWORKFUNCTIONIDS_H
-#define NETWORKFUNCTIONIDS_H
 
-#include "../NetworkPrereqs.h"
+#ifndef _FunctionIDs_H__
+#define _FunctionIDs_H__
 
-#include <string>
-
+#include "network/NetworkPrereqs.h"
 #include "Packet.h"
 
@@ -58,3 +56,3 @@
 } //namespace orxonox
 
-#endif
+#endif /* _FunctionIDs_H__ */
Index: code/branches/netp5/src/network/packet/Gamestate.cc
===================================================================
--- code/branches/netp5/src/network/packet/Gamestate.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/Gamestate.cc	(revision 3209)
@@ -28,15 +28,12 @@
 
 #include "Gamestate.h"
-#include <enet/enet.h>
+
 #include <zlib.h>
-#include <cassert>
-#include "../GamestateHandler.h"
-#include "../synchronisable/Synchronisable.h"
-#include "../TrafficControl.h"
+
+#include "util/Debug.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-
-
-
+#include "core/ObjectList.h"
+#include "network/synchronisable/Synchronisable.h"
+#include "network/GamestateHandler.h"
 
 namespace orxonox {
@@ -46,5 +43,5 @@
 #define GAMESTATE_START(data) (data + GamestateHeader::getSize())
 
-#define PACKET_FLAG_GAMESTATE  ENET_PACKET_FLAG_RELIABLE
+#define PACKET_FLAG_GAMESTATE  PacketFlag::Reliable
 
 
Index: code/branches/netp5/src/network/packet/Gamestate.h
===================================================================
--- code/branches/netp5/src/network/packet/Gamestate.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/Gamestate.h	(revision 3209)
@@ -28,18 +28,15 @@
 
 
-#ifndef NETWORK_PACKETGAMESTATE_H
-#define NETWORK_PACKETGAMESTATE_H
+#ifndef _Gamestate_H__
+#define _Gamestate_H__
 
 #include "network/NetworkPrereqs.h"
 
+#include <cassert>
+#include <list>
+
+#include "util/CRC32.h"
+#include "network/TrafficControl.h"
 #include "Packet.h"
-#include "network/TrafficControl.h"
-#include <string.h>
-#include <map>
-#include <vector>
-#include <cassert>
-#ifndef NDEBUG
-#include "util/CRC32.h"
-#endif
 
 namespace orxonox {
@@ -138,3 +135,3 @@
 }
 
-#endif
+#endif /* _Gamestate_H__ */
Index: code/branches/netp5/src/network/packet/Packet.cc
===================================================================
--- code/branches/netp5/src/network/packet/Packet.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/Packet.cc	(revision 3209)
@@ -32,11 +32,11 @@
 #include <cassert>
 #include <enet/enet.h>
-
-#include "network/ClientInformation.h"
-
+#include <boost/static_assert.hpp>
+
+#include "util/Debug.h"
 #include "Acknowledgement.h"
-#include "DeleteObjects.h"
 #include "Chat.h"
 #include "ClassID.h"
+#include "DeleteObjects.h"
 #include "FunctionCalls.h"
 #include "FunctionIDs.h"
@@ -44,5 +44,5 @@
 #include "Welcome.h"
 #include "network/Host.h"
-#include "core/CoreIncludes.h"
+#include "network/ClientInformation.h"
 
 namespace orxonox{
@@ -50,5 +50,10 @@
 namespace packet{
 
-#define PACKET_FLAG_DEFAULT ENET_PACKET_FLAG_NO_ALLOCATE
+// Make sure we assume the right values
+BOOST_STATIC_ASSERT(static_cast<int>(PacketFlag::Reliable)   == static_cast<int>(ENET_PACKET_FLAG_RELIABLE));
+BOOST_STATIC_ASSERT(static_cast<int>(PacketFlag::Unsequence) == static_cast<int>(ENET_PACKET_FLAG_UNSEQUENCED));
+BOOST_STATIC_ASSERT(static_cast<int>(PacketFlag::NoAllocate) == static_cast<int>(ENET_PACKET_FLAG_NO_ALLOCATE));
+
+#define PACKET_FLAG_DEFAULT PacketFlag::NoAllocate
 #define _PACKETID           0
 
@@ -103,5 +108,5 @@
   }
   else if (this->data_) {
-    // This destructor was probably called as a consequence to ENet executing our callback.
+    // This destructor was probably called as a consequence of ENet executing our callback.
     // It simply serves us to be able to deallocate the packet content (data_) ourselves since
     // we have created it in the first place.
Index: code/branches/netp5/src/network/packet/Packet.h
===================================================================
--- code/branches/netp5/src/network/packet/Packet.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/Packet.h	(revision 3209)
@@ -26,9 +26,8 @@
  *
  */
-#ifndef NETWORKPACKET_H
-#define NETWORKPACKET_H
+#ifndef _NETWORK_Packet_H__
+#define _NETWORK_Packet_H__
 
 #include "network/NetworkPrereqs.h"
-
 #include <map>
 
@@ -102,3 +101,3 @@
 } //namespace orxonox
 
-#endif
+#endif /* _NETWORK_Packet_H__ */
Index: code/branches/netp5/src/network/packet/Welcome.cc
===================================================================
--- code/branches/netp5/src/network/packet/Welcome.cc	(revision 3208)
+++ code/branches/netp5/src/network/packet/Welcome.cc	(revision 3209)
@@ -29,16 +29,15 @@
  */
 
+#include "Welcome.h"
 
-#include "Welcome.h"
-#include <enet/enet.h>
 #include <cassert>
+#include "util/Debug.h"
 #include "network/Host.h"
 #include "network/synchronisable/Synchronisable.h"
-#include "core/CoreIncludes.h"
 
 namespace orxonox {
 namespace packet {
 
-#define PACKET_FLAGS_CLASSID  ENET_PACKET_FLAG_RELIABLE
+#define PACKET_FLAGS_CLASSID  PacketFlag::Reliable
 #define _PACKETID             0
 #define _CLIENTID             _PACKETID + sizeof(ENUM::Type)
Index: code/branches/netp5/src/network/packet/Welcome.h
===================================================================
--- code/branches/netp5/src/network/packet/Welcome.h	(revision 3208)
+++ code/branches/netp5/src/network/packet/Welcome.h	(revision 3209)
@@ -26,9 +26,8 @@
  *
  */
-#ifndef NETWORKWELCOME_H
-#define NETWORKWELCOME_H
+#ifndef _NETWORK_Welcome_H__
+#define _NETWORK_Welcome_H__
 
-#include "../NetworkPrereqs.h"
-
+#include "network/NetworkPrereqs.h"
 #include "Packet.h"
 
@@ -56,3 +55,3 @@
 } //namespace orxonox
 
-#endif
+#endif /* _NETWORK_Welcome_H__ */
