diff --git a/MAC/APL/APLCommon/src/CTState.cc b/MAC/APL/APLCommon/src/CTState.cc
index c6dc2b8d5aba8dd1a3989de6151b3cdea443a10b..51fe38e48ce3c766f492e8da693c24f6da7c4ef5 100644
--- a/MAC/APL/APLCommon/src/CTState.cc
+++ b/MAC/APL/APLCommon/src/CTState.cc
@@ -29,6 +29,7 @@
 #include "Controller_Protocol.ph"
 
 namespace LOFAR {
+  using namespace Controller_Protocol;
   namespace APLCommon {
 
 typedef struct stateSignal {
diff --git a/MAC/APL/APLCommon/src/ChildControl.cc b/MAC/APL/APLCommon/src/ChildControl.cc
index b3d330652d9d2b2f7207a0983b02ea5c2a54bc89..b494b87bff0a5db668f3dc9b3d8e156e415caa2e 100644
--- a/MAC/APL/APLCommon/src/ChildControl.cc
+++ b/MAC/APL/APLCommon/src/ChildControl.cc
@@ -41,6 +41,8 @@
 using namespace boost;
 
 namespace LOFAR {
+  using namespace Controller_Protocol;
+  using namespace StartDaemon_Protocol;
   using namespace GCF::TM;
   namespace APLCommon {
 
diff --git a/MAC/APL/APLCommon/src/ControllerDefines.cc b/MAC/APL/APLCommon/src/ControllerDefines.cc
index 6556607eb993bbfdce06f1e0fa4fcbfeca40ce38..23ba0997a3ba465ab6406df23f771180dc0c2bd1 100644
--- a/MAC/APL/APLCommon/src/ControllerDefines.cc
+++ b/MAC/APL/APLCommon/src/ControllerDefines.cc
@@ -36,6 +36,7 @@
 using namespace boost;
 
 namespace LOFAR {
+  using namespace Controller_Protocol;
   namespace APLCommon {
 
 typedef struct cntlrDefinition {
diff --git a/MAC/APL/APLCommon/src/ParentControl.cc b/MAC/APL/APLCommon/src/ParentControl.cc
index 9d93ec87c229faef6b679b4a0b7415ede8436220..1a323baa3d0530ca7942ba6d0dadd1132ca23989 100644
--- a/MAC/APL/APLCommon/src/ParentControl.cc
+++ b/MAC/APL/APLCommon/src/ParentControl.cc
@@ -36,6 +36,8 @@
 #include <StartDaemon_Protocol.ph>
 
 namespace LOFAR {
+  using namespace Controller_Protocol;
+  using namespace StartDaemon_Protocol;
   using namespace GCF::TM;
   using namespace boost::posix_time;
   namespace APLCommon {
diff --git a/MAC/APL/APLCommon/test/ControllerProtMenu.cc b/MAC/APL/APLCommon/test/ControllerProtMenu.cc
index 7700f4411da899325f309e6e6e70cdceee1593a4..3cd94a55626d13aa5c29a75b4abc9b3b2e577ce3 100644
--- a/MAC/APL/APLCommon/test/ControllerProtMenu.cc
+++ b/MAC/APL/APLCommon/test/ControllerProtMenu.cc
@@ -37,6 +37,7 @@
 using namespace std;
 
 namespace LOFAR {
+	using namespace Controller_Protocol;
 	using namespace APLCommon;
 	using namespace GCF::TM;
 	namespace Test {
diff --git a/MAC/APL/APLCommon/test/tOutOfBand.cc b/MAC/APL/APLCommon/test/tOutOfBand.cc
index 03c5bf292c990bc5bf76ff6f1406dcd87e5f0b4c..a1adea295c64080276939101c3d25ab0993f9cb9 100644
--- a/MAC/APL/APLCommon/test/tOutOfBand.cc
+++ b/MAC/APL/APLCommon/test/tOutOfBand.cc
@@ -30,6 +30,7 @@
 #include "Controller_Protocol.ph"
 
 using namespace LOFAR;
+using namespace LOFAR::Controller_Protocol;
 using namespace LOFAR::APLCommon;
 
 typedef struct stateFlow_t {
diff --git a/MAC/APL/APLCommon/test/tParentControl.cc b/MAC/APL/APLCommon/test/tParentControl.cc
index 9ba05f7c6611d1ba933e97185127d5640957dd38..3df79fb805ef1c9b65fb1ff138b7a849680c0c3e 100644
--- a/MAC/APL/APLCommon/test/tParentControl.cc
+++ b/MAC/APL/APLCommon/test/tParentControl.cc
@@ -27,7 +27,6 @@
 #include <Common/ParameterSet.h>
 #include <MACIO/MACServiceInfo.h>
 #include <APL/APLCommon/APL_Defines.h>
-//#include <APL/APLCommon/Controller_Protocol.ph>
 #include <APL/APLCommon/ControllerDefines.h>
 #include <APL/APLCommon/ParentControl.h>
 #include <Controller_Protocol.ph>
@@ -38,6 +37,8 @@
 using namespace LOFAR::GCF::TM;
 
 namespace LOFAR {
+	using namespace Controller_Protocol;
+	using namespace StartDaemon_Protocol;
 	namespace APLCommon {
 
 #define FAKEPARENTCTRLSERVICENAME	"FakeParentController:v1.0"
diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc b/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc
index 169a1496c396fcedd4821264828211b7a48feacc..7694237699f59afa5607f9b77425531c5ad2b656 100644
--- a/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc
+++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc
@@ -44,6 +44,7 @@
 #define MAX2(a,b)	((a) > (b)) ? (a) : (b)
 
 namespace LOFAR {
+	using namespace DP_Protocol;
 	using namespace APL::RTDBCommon;
 	using namespace GCF::TM;
 	using namespace GCF::PVSS;
diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc b/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc
index 3395dc59d3233fc365e589c9951dd03cd7cc4348..d55756d0dd54c24d8a48f9ecaba2862447a6fafa 100644
--- a/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc
+++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc
@@ -45,6 +45,7 @@
 #define MAX2(a,b)	((a) > (b)) ? (a) : (b)
 
 namespace LOFAR {
+	using namespace DP_Protocol;
 	using namespace APL::RTDBCommon;
 	using namespace GCF::TM;
 	using namespace GCF::PVSS;
diff --git a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc
index 6afb4bb872440cdccfe704581360c215772750f7..e8fc93f543ba364256dfdfcd57cc1ceb689bd128 100644
--- a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc
+++ b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc
@@ -59,6 +59,8 @@ using namespace boost::posix_time;
 using namespace std;
 
 namespace LOFAR {
+	using namespace DP_Protocol;
+	using namespace Controller_Protocol;
 	using namespace APLCommon;
 	using namespace OTDB;
 	namespace CEPCU {
diff --git a/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc b/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc
index f6e1d880f10618d39615a14a1683a4943186bba7..ffc164431e2df37778bcc9ea1569c977d376b661 100644
--- a/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc
+++ b/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc
@@ -53,6 +53,8 @@ using namespace boost::posix_time;
 using qpid::messaging::Message;
 
 namespace LOFAR {
+	using namespace DP_Protocol;
+	using namespace Controller_Protocol;
 	using namespace APLCommon;
 	using namespace GCF::TM;
 	using namespace GCF::PVSS;
diff --git a/MAC/APL/CUDaemons/CT_StartDaemon/CTStartDaemon.cc b/MAC/APL/CUDaemons/CT_StartDaemon/CTStartDaemon.cc
index 9ef212f531f1db668a36e2f97f90e461ad0e9c4f..5884acf40985630b4e7daf415b20ee896a7cadff 100644
--- a/MAC/APL/CUDaemons/CT_StartDaemon/CTStartDaemon.cc
+++ b/MAC/APL/CUDaemons/CT_StartDaemon/CTStartDaemon.cc
@@ -41,6 +41,7 @@
 using namespace LOFAR::GCF::TM;
 
 namespace LOFAR {
+  using namespace StartDaemon_Protocol;
   namespace CUDaemons {
 
 //
diff --git a/MAC/APL/CUDaemons/PVSSGateway_Stub/PVSSGatewayStub.cc b/MAC/APL/CUDaemons/PVSSGateway_Stub/PVSSGatewayStub.cc
index 77571f23f3ff2c0287de04ea667e2de43f2ca29d..4b6b6b829445005aa4ef0ffc98ccad5a86bfbedb 100644
--- a/MAC/APL/CUDaemons/PVSSGateway_Stub/PVSSGatewayStub.cc
+++ b/MAC/APL/CUDaemons/PVSSGateway_Stub/PVSSGatewayStub.cc
@@ -36,6 +36,7 @@
 #include <signal.h>
 
 namespace LOFAR {
+  using namespace KVT_Protocol;
   using namespace MACIO;
   namespace GCF {
     using namespace TM;
diff --git a/MAC/APL/CUDaemons/Service_Broker/ServiceBroker.cc b/MAC/APL/CUDaemons/Service_Broker/ServiceBroker.cc
index 22ea47c26d6764b7d5075b775d38dbd462e16355..4992123c94957a1770f9f243638e3fb0ced33f1e 100644
--- a/MAC/APL/CUDaemons/Service_Broker/ServiceBroker.cc
+++ b/MAC/APL/CUDaemons/Service_Broker/ServiceBroker.cc
@@ -35,6 +35,7 @@
 #include <Service_Broker/Package__Version.h>
 
 namespace LOFAR {
+    using namespace SB_Protocol;
     using namespace MACIO;
     using namespace GCF::TM;
 	namespace CUDaemons {
diff --git a/MAC/APL/CUDaemons/test/LDtestMenu.cc b/MAC/APL/CUDaemons/test/LDtestMenu.cc
index c0bc2e4ac48fd6fa91ddaed2cd21e7828a0af3c8..41a9d1cfd80d5f8566f68eef3029b47cdac8901e 100644
--- a/MAC/APL/CUDaemons/test/LDtestMenu.cc
+++ b/MAC/APL/CUDaemons/test/LDtestMenu.cc
@@ -32,6 +32,7 @@
 using namespace LOFAR;
 using namespace LOFAR::APLCommon;
 using namespace LOFAR::CUdaemons;
+using namespace LOFAR::StartDaemon_protocol;
 
 static	EventPort*		SDport = 0;
 
diff --git a/MAC/APL/CURTDBDaemons/src/KeyValueLogger/KeyValueLogger.cc b/MAC/APL/CURTDBDaemons/src/KeyValueLogger/KeyValueLogger.cc
index 356b2672b7b0a0d7bc9b984d2ab37990fec373ce..e6c90b627989f55990be1ff68e741438538504a3 100644
--- a/MAC/APL/CURTDBDaemons/src/KeyValueLogger/KeyValueLogger.cc
+++ b/MAC/APL/CURTDBDaemons/src/KeyValueLogger/KeyValueLogger.cc
@@ -39,6 +39,8 @@
 #include <boost/date_time/posix_time/posix_time.hpp>
 
 namespace LOFAR {
+  using namespace KVT_Protocol;
+  using namespace DP_Protocol;
   using namespace MACIO;
   using namespace OTDB;
   namespace GCF {
diff --git a/MAC/APL/CURTDBDaemons/src/LogProcessor/LogProcessor.cc b/MAC/APL/CURTDBDaemons/src/LogProcessor/LogProcessor.cc
index f618a1233f6c58b68761e87288c4ba9b7336397f..9e98752ca4197ca4c8d17a9ee845bed86a452934 100644
--- a/MAC/APL/CURTDBDaemons/src/LogProcessor/LogProcessor.cc
+++ b/MAC/APL/CURTDBDaemons/src/LogProcessor/LogProcessor.cc
@@ -37,6 +37,8 @@
 using namespace log4cplus;
 using namespace log4cplus::helpers;
 namespace LOFAR {
+  using namespace LOG_Protocol;
+  using namespace DP_Protocol;
   using namespace MACIO;
   namespace GCF {
     using namespace TM;
diff --git a/MAC/APL/CURTDBDaemons/src/PVSSGateway/PVSSGateway.cc b/MAC/APL/CURTDBDaemons/src/PVSSGateway/PVSSGateway.cc
index 4875626938b5bd42eb02714782f79a79c98def27..4e6fb29b648757082b7fe865247175120fcb4434 100644
--- a/MAC/APL/CURTDBDaemons/src/PVSSGateway/PVSSGateway.cc
+++ b/MAC/APL/CURTDBDaemons/src/PVSSGateway/PVSSGateway.cc
@@ -41,6 +41,8 @@
 #include <signal.h>
 
 namespace LOFAR {
+  using namespace KVT_Protocol;
+  using namespace DP_Protocol;
   using namespace MACIO;
   namespace GCF {
     using namespace TM;
diff --git a/MAC/APL/CURTDBDaemons/src/SASGateway/SASGateway.cc b/MAC/APL/CURTDBDaemons/src/SASGateway/SASGateway.cc
index 918e625925768cc2e8ba0779fc7286e605cfd401..b6f36b6ca53b6334942d3aa1a293be1313e386b2 100644
--- a/MAC/APL/CURTDBDaemons/src/SASGateway/SASGateway.cc
+++ b/MAC/APL/CURTDBDaemons/src/SASGateway/SASGateway.cc
@@ -39,6 +39,8 @@
 #include <boost/date_time/posix_time/posix_time.hpp>
 
 namespace LOFAR {
+  using namespace KVT_Protocol;
+  using namespace DP_Protocol;
   using namespace MACIO;
   using namespace OTDB;
   namespace GCF {
diff --git a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc
index b49165c731176b373ff8bd90565de0fd6f3ac927..2a2ae4014f290e7344021de39b12dac5222e964e 100644
--- a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc
+++ b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc
@@ -64,6 +64,8 @@ const int	MAX_PROCMAP_ERRORS = 3;
 
 using namespace boost::posix_time;
 namespace LOFAR {
+	using namespace DP_Protocol;
+	using namespace CM_Protocol;
 	using namespace APLCommon;
 	using namespace APL::RTDBCommon;
 	using namespace GCF::TM;
diff --git a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitorMain.cc b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitorMain.cc
index 7dd28c43474c9c0dbe3d50ace9ecb0001518efdb..3234e51e5af7a8c3795deeabc3f2217a6183041a 100644
--- a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitorMain.cc
+++ b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitorMain.cc
@@ -34,6 +34,7 @@ using namespace LOFAR;
 using namespace LOFAR::GCF;
 using namespace LOFAR::GCF::TM;
 using namespace LOFAR::RTDBDaemons;
+using namespace LOFAR::DP_Protocol;
 
 // Use a terminate handler that can produce a backtrace.
 Exception::TerminateHandler t(Exception::terminate);
diff --git a/MAC/APL/MainCU/src/CRTriggerControl/TriggerControl.cc b/MAC/APL/MainCU/src/CRTriggerControl/TriggerControl.cc
index a6e461c9b1eddd05d564f04370c73f60a4d73a65..7fe1d74c71be0f3043dd7dc438dcd2045e9ed320 100644
--- a/MAC/APL/MainCU/src/CRTriggerControl/TriggerControl.cc
+++ b/MAC/APL/MainCU/src/CRTriggerControl/TriggerControl.cc
@@ -60,6 +60,9 @@ using namespace std;
 using namespace LOFAR::StringUtil;
 
 namespace LOFAR {
+    using namespace DP_Protocol;
+    using namespace Controller_Protocol;
+    using namespace CR_Protocol;
     using namespace APLCommon;
     namespace MainCU {
 
diff --git a/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc b/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc
index 5464388d30bb33ac1d421301d7fe5b8765d52124..cbfcd97a3e834c3518126e743a27a9d109001cc9 100644
--- a/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc
+++ b/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc
@@ -54,6 +54,9 @@ using namespace boost::posix_time;
 using namespace std;
 
 namespace LOFAR {
+	using namespace Controller_Protocol;
+	using namespace DP_Protocol;
+	using namespace CM_Protocol;
 	using namespace APLCommon;
 	namespace MainCU {
 
diff --git a/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc b/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc
index e8e80b190b01349b4edbec085dffe4f2655fabd7..6614dd202eb6a7e9ddc8358bb6762b30ec7b2f33 100644
--- a/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc
+++ b/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc
@@ -52,6 +52,8 @@ using namespace boost::posix_time;
 using namespace std;
 
 namespace LOFAR {
+	using namespace DP_Protocol;
+	using namespace CM_Protocol;
 	using namespace APLCommon;
 	namespace MainCU {
 
diff --git a/MAC/APL/MainCU/src/MACScheduler/claimTest.cc b/MAC/APL/MainCU/src/MACScheduler/claimTest.cc
index a95d6bf80560f1f8309ac1f60b39b529adda122b..2885766d8e13105ce6460d397869db20a95f1fb0 100644
--- a/MAC/APL/MainCU/src/MACScheduler/claimTest.cc
+++ b/MAC/APL/MainCU/src/MACScheduler/claimTest.cc
@@ -41,6 +41,8 @@ using namespace LOFAR::GCF::RTDB;
 using namespace std;
 
 namespace LOFAR {
+	using namespace CM_Protocol;
+	using namespace DP_Protocol;
 	using namespace APLCommon;
 	namespace MainCU {
 
diff --git a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
index 62a099b482fd5716d5919cdd7d252c23b250c01c..89b2b518e43753d969a2e0fe2c032f22753b4d41 100644
--- a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
+++ b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
@@ -48,6 +48,9 @@
 using namespace boost::posix_time;
 
 namespace LOFAR {
+	using namespace Controller_Protocol;
+	using namespace DP_Protocol;
+	using namespace CM_Protocol;
 	using namespace APLCommon;
 	using namespace GCF::TM;
 	using namespace GCF::PVSS;
diff --git a/MAC/APL/PAC/Cal_Server/src/SubArraySubscription.cc b/MAC/APL/PAC/Cal_Server/src/SubArraySubscription.cc
index 82c4f46092d7ed64180221bfbd5abeb8e4e1c017..a55f3cd306eb3c606c07a7a234756e15edf79d9b 100644
--- a/MAC/APL/PAC/Cal_Server/src/SubArraySubscription.cc
+++ b/MAC/APL/PAC/Cal_Server/src/SubArraySubscription.cc
@@ -30,6 +30,7 @@
 using namespace LOFAR;
 using namespace CAL;
 using namespace RTC;
+using namespace CAL_Protocol;
 
 void SubArraySubscription::update(Subject* subject)
 {
diff --git a/MAC/APL/PAC/Cal_Server/src/calinfo.cc b/MAC/APL/PAC/Cal_Server/src/calinfo.cc
index b4e785ab2e2c3521115f6754a6dbb67eb0f91d51..4c131190445dc8f74ade757559ce9811accec4d6 100644
--- a/MAC/APL/PAC/Cal_Server/src/calinfo.cc
+++ b/MAC/APL/PAC/Cal_Server/src/calinfo.cc
@@ -32,6 +32,7 @@
 #include "calinfo.h" 
 
 namespace LOFAR {
+  using namespace CAL_Protocol;
   using namespace GCF;
   using namespace GCF::TM;
   namespace CAL {
diff --git a/MAC/APL/PAC/Cal_Server/test/CalTest.h b/MAC/APL/PAC/Cal_Server/test/CalTest.h
index 397501a613d30c36515e391270c2212d88856f72..ec000bd284b1d2a06440934946c3f419093d5aec 100644
--- a/MAC/APL/PAC/Cal_Server/test/CalTest.h
+++ b/MAC/APL/PAC/Cal_Server/test/CalTest.h
@@ -77,7 +77,7 @@ namespace LOFAR {
 	  // ports
 	  GCFPort m_server;
 
-	  memptr_t	m_handle; // subscription handle
+	  void*		m_handle; // subscription handle
 	  int 		m_counter1; // general purpose test counter, semantics assigned per test
 
 	  string  m_name;        // name of the current array
diff --git a/MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.cc b/MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.cc
index cd78782f1e4e5a805171fc149fbe2659e2c4fe66..8eaaf40446c416de6e39646d83a440391d415125 100644
--- a/MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.cc
+++ b/MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.cc
@@ -45,6 +45,7 @@ using namespace blitz;
 using namespace LOFAR;
 using namespace BS;
 using namespace IBS_Protocol;
+using namespace RSP_Protocol;
 using namespace std;
 using namespace RTC;
 using namespace CASATools;
diff --git a/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc b/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc
index bf65b2021e5009b12dfc97ac763b1f449e2f8f84..3f42e964d85a1e80d200f1e1fbf7c6b370c38983 100644
--- a/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc
+++ b/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc
@@ -59,6 +59,7 @@ namespace LOFAR {
   using namespace RTC;
   using namespace IBS_Protocol;
   using namespace RSP_Protocol;
+  using namespace CAL_Protocol;
   using namespace GCF::TM;
   namespace BS {
 
diff --git a/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h b/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h
index 07d08ab605288444b7721d06c278f880af9e103e..3a5ded97e48bb60de3578d34a206a9b9bb371a7e 100644
--- a/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h
+++ b/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h
@@ -37,6 +37,7 @@
 
 namespace LOFAR {
   using namespace CASATools;
+  using namespace IBS_Protocol;
   using GCF::TM::GCFTask;
   using GCF::TM::GCFPort;
   using GCF::TM::GCFTCPPort;
diff --git a/MAC/APL/PAC/ITRFBeamServer/src/beamctl.h b/MAC/APL/PAC/ITRFBeamServer/src/beamctl.h
index c0e8eb2d0eb208f7ad23356258572f6f13db5030..32cdad4ac92c4560080de34223ee4851f8810086 100644
--- a/MAC/APL/PAC/ITRFBeamServer/src/beamctl.h
+++ b/MAC/APL/PAC/ITRFBeamServer/src/beamctl.h
@@ -36,6 +36,7 @@ namespace LOFAR {
   using GCF::TM::GCFPort;
   using GCF::TM::GCFTCPPort;
   using GCF::TM::GCFPortInterface;
+  using IBS_Protocol::Pointing;
   namespace BS {
 
 class beamctl : public GCFTask
diff --git a/MAC/APL/PAC/SHMInfo_Server/src/SHMInfoServer.cc b/MAC/APL/PAC/SHMInfo_Server/src/SHMInfoServer.cc
index f964a2fa885fce3a66b8d48fdf8d4636bd666d95..10a3b6cc17fa5791dc537a9c65063196a8ca7941 100644
--- a/MAC/APL/PAC/SHMInfo_Server/src/SHMInfoServer.cc
+++ b/MAC/APL/PAC/SHMInfo_Server/src/SHMInfoServer.cc
@@ -33,10 +33,12 @@
 #include "SHMSession.h"
 #include "SHM_Protocol.ph"
 #include "SHMInfoServer.h"
-//MAXMOD add for antenna coords
 #include <APL/CAL_Protocol/CAL_Protocol.ph>
 
 namespace LOFAR {
+	using namespace RSP_Protocol;
+	using namespace CAL_Protocol;
+	using namespace SHM_Protocol;
 	using namespace MACIO;
 	using namespace GCF::TM;
 	namespace AMI {
diff --git a/MAC/APL/PAC/SHMInfo_Server/src/SHMPolicyHandler.cc b/MAC/APL/PAC/SHMInfo_Server/src/SHMPolicyHandler.cc
index 406616ec3d8f4107a7b474d273752498f7c5e474..0296cc52e1f5b3c933566aabaa62e5fe195eea61 100644
--- a/MAC/APL/PAC/SHMInfo_Server/src/SHMPolicyHandler.cc
+++ b/MAC/APL/PAC/SHMInfo_Server/src/SHMPolicyHandler.cc
@@ -37,13 +37,10 @@ using std::ifstream;
 
 #define ASCII_LINE_SIZE 1024
 
-namespace LOFAR 
-{
-using namespace GCF::Common;
-//using namespace APLCommon;
-
- namespace AMI
- {
+namespace LOFAR {
+  using namespace GCF::Common;
+  using namespace SHM_Protocol;
+ namespace AMI {
 
 string trim(string source)
 {  
diff --git a/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc b/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc
index cf33625872d2e749523c16cfcb0401ab0df7168f..3851bbd69a672c925a5e214db261bb9a25ed8622 100644
--- a/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc
+++ b/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc
@@ -39,6 +39,7 @@ using namespace blitz;
 
 
 namespace LOFAR {
+	using namespace SHM_Protocol;
 	using namespace GCF::TM;
 	using namespace RTC;
 	using namespace APL::RTDBCommon;
diff --git a/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.h b/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.h
index 99d143562c34e87bbae3c11f6cee2c6b78517646..c3698b0aa6b21489c9cca2ef2271aacdf8946514 100644
--- a/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.h
+++ b/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.h
@@ -40,6 +40,7 @@ namespace blitz {
 
 namespace LOFAR {
 	using MACIO::GCFEvent;
+	using namespace RSP_Protocol;
 	namespace AMI {  
 
 class SHMInfoServer;
diff --git a/MAC/APL/PAC/SHMInfo_Server/src/SHMSubscription.cc b/MAC/APL/PAC/SHMInfo_Server/src/SHMSubscription.cc
index 427b81810abbd0cf0304c583fd8a48df6c8fb9a1..3b80b81a0b0ecf40916cde6d5a19407b12aefb0f 100644
--- a/MAC/APL/PAC/SHMInfo_Server/src/SHMSubscription.cc
+++ b/MAC/APL/PAC/SHMInfo_Server/src/SHMSubscription.cc
@@ -28,14 +28,11 @@
 #include <GCF/PVSS/PVSSInfo.h>
 #include <GCF/PVSS/GCF_PValue.h>
 
-namespace LOFAR
-{
-
-using namespace GCF::Common;
-using namespace GCF::PAL;
-  
-  namespace AMI
-  {
+namespace LOFAR {
+  using namespace GCF::Common;
+  using namespace GCF::PAL;
+  using namespace SHM_Protocol;
+  namespace AMI {
     
 INIT_TRACER_CONTEXT(SHMSubscription, LOFARLOGGER_PACKAGE);
 
diff --git a/MAC/APL/PAC/SHMInfo_Server/src/SHM_Protocol.prot b/MAC/APL/PAC/SHMInfo_Server/src/SHM_Protocol.prot
index 069b7387ab9bc3f070ff21a8ee264b8bf3d619c1..de20e51ae06551b2ebec33ad74f1b5d17ba486bc 100644
--- a/MAC/APL/PAC/SHMInfo_Server/src/SHM_Protocol.prot
+++ b/MAC/APL/PAC/SHMInfo_Server/src/SHM_Protocol.prot
@@ -8,10 +8,8 @@ prefix = "SHM"; // for the signal names
 id = "(LOFAR::MACIO::F_APL_PROTOCOL+5)"; 
 include = '<Common/LofarTypes.h>';
 
-//MAXMOD
 include = '<XCStatistics.h>';
 include = '<RspStatus.h>';
-//include = '<XCSubbandSelection.h>';  MAXMOD-TEST removal
 
 // The "SHM" (MAC Information Server) protocol describes all possible
 // interactions between the MAC (Monitoring-And-Control) and SHM
diff --git a/MAC/APL/PIC/RSP_Driver/src/BMRead.cc b/MAC/APL/PIC/RSP_Driver/src/BMRead.cc
index 6fe90647eb80d4dd9bff5dedaf7be0d241b20bd1..1791a1642aa35e69d119781ec32676c11a16d5c3 100644
--- a/MAC/APL/PIC/RSP_Driver/src/BMRead.cc
+++ b/MAC/APL/PIC/RSP_Driver/src/BMRead.cc
@@ -33,9 +33,11 @@
 #include "Cache.h"
 
 using namespace blitz;
-using namespace LOFAR;
-using namespace RSP;
-using namespace RTC;
+namespace LOFAR {
+  using namespace RSP_Protocol;
+  using namespace EPA_Protocol;
+  using namespace RTC;
+  namespace RSP {
 
 BMRead::BMRead(GCFPortInterface& board_port, int board_id)
   : SyncAction(board_port, board_id, 1)
@@ -106,3 +108,5 @@ GCFEvent::TResult BMRead::handleack(GCFEvent& event, GCFPortInterface& /*port*/)
   LOG_DEBUG_STR("BMRead::handleack() done");
   return GCFEvent::HANDLED;
 }
+  } // namespace RSP
+} // namespace LOFAR
diff --git a/MAC/APL/PIC/RSP_Driver/src/BMWrite.cc b/MAC/APL/PIC/RSP_Driver/src/BMWrite.cc
index cf5289f508d104ea8ee43a4817534fe201b45297..7e17e6b9193419ec311a9b226ee4925ce10d100e 100644
--- a/MAC/APL/PIC/RSP_Driver/src/BMWrite.cc
+++ b/MAC/APL/PIC/RSP_Driver/src/BMWrite.cc
@@ -36,8 +36,11 @@
 
 using namespace blitz;
 using namespace LOFAR;
-using namespace RSP;
-using namespace RTC;
+namespace LOFAR {
+  using namespace RSP_Protocol;
+  using namespace EPA_Protocol;
+  using namespace RTC;
+  namespace RSP {
 
 BMWrite::BMWrite(GCFPortInterface& board_port, int board_id)
   : SyncAction(board_port, board_id, 1)
@@ -112,3 +115,5 @@ GCFEvent::TResult BMWrite::handleack(GCFEvent& event, GCFPortInterface& /*port*/
   
   return GCFEvent::HANDLED;
 }
+  } // namespace RSP
+} // namespace LOFAR
diff --git a/MAC/APL/PIC/RSP_Driver/src/Cache.h b/MAC/APL/PIC/RSP_Driver/src/Cache.h
index 041d1505b1f4a98289869221a4e9ded42c61bf19..69c7c891ddbd4ba89ccfa8da38783e5fb6493de3 100644
--- a/MAC/APL/PIC/RSP_Driver/src/Cache.h
+++ b/MAC/APL/PIC/RSP_Driver/src/Cache.h
@@ -35,6 +35,7 @@
 #include "SerdesBuffer.h"
 
 namespace LOFAR {
+  using namespace RSP_Protocol;
   namespace RSP {
 
 class Cache; // forward declaration
diff --git a/MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc b/MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc
index 0a4a349882807150222a9012330cfb3d37f2deff..26e5bed7bced16697b06335f920de000ddced844 100644
--- a/MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc
+++ b/MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc
@@ -173,6 +173,8 @@
 #define PPS_FETCH_TIMEOUT { 3, 0 }
 
 namespace LOFAR {
+	using namespace EPA_Protocol;
+	using namespace RSP_Protocol;
 	using namespace GCF::TM;
 	namespace RSP {
 	using namespace blitz;
diff --git a/MAC/APL/PIC/RSP_Driver/src/rspctl.cc b/MAC/APL/PIC/RSP_Driver/src/rspctl.cc
index 0a6c9a1b00cabcf65dcaec2a51534c3351acd2d8..3a9860108a0d1612f41e9d9fbf41ffc0a3ece3e7 100644
--- a/MAC/APL/PIC/RSP_Driver/src/rspctl.cc
+++ b/MAC/APL/PIC/RSP_Driver/src/rspctl.cc
@@ -60,6 +60,8 @@
 								c-'A'+10 : ((c>='a' && c<='f') ? c-'a'+10 : 0)))
 
 namespace LOFAR {
+	using namespace RSP_Protocol;
+	using namespace EPA_Protocol;
 	using namespace GCF::TM;
 	namespace rspctl {
 	using namespace std;
diff --git a/MAC/APL/PIC/RSP_Driver/src/rspctl.h b/MAC/APL/PIC/RSP_Driver/src/rspctl.h
index 049dc5c2a5cb9432e3b59089e8bc8a0537a61eda..0cf23cb8d3fba1443f63168243c38ed0b5685284 100644
--- a/MAC/APL/PIC/RSP_Driver/src/rspctl.h
+++ b/MAC/APL/PIC/RSP_Driver/src/rspctl.h
@@ -43,6 +43,7 @@
 #include <boost/dynamic_bitset.hpp>
 
 namespace LOFAR {
+	using namespace RSP_Protocol;
 	using GCF::TM::GCFTask;
 	using GCF::TM::GCFPort;
 	using GCF::TM::GCFTCPPort;
diff --git a/MAC/APL/PIC/RSP_Driver/test/EPAStub.h b/MAC/APL/PIC/RSP_Driver/test/EPAStub.h
index 2871c0cb8134b74ae5a469cc7ba7aafb8024f79d..d5e77c2a426db017efd4c804d21f8e14667d50be 100644
--- a/MAC/APL/PIC/RSP_Driver/test/EPAStub.h
+++ b/MAC/APL/PIC/RSP_Driver/test/EPAStub.h
@@ -29,6 +29,7 @@
 #include <GCF/TM/GCF_Control.h>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   using GCF::TM::GCFTask;
   using GCF::TM::GCFPortInterface;
   using GCF::TM::GCFTimerPort;
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h
index 931cb954c1ef0389d8f2279d4eaca750fc1e2dac..205f8f9da2981c6e49ba7ca1322a234f36dfcec3 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h
@@ -34,6 +34,7 @@
 #include <Common/LofarTypes.h>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class BitmodeInfo
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BypassSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BypassSettings.h
index b7ca02e17ce001021520cf80f311e1b4a0e1f85f..ad1f73f68038a6a37007983df4262bbfb40a40f8 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BypassSettings.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BypassSettings.h
@@ -33,6 +33,7 @@
 #include <APL/RSP_Protocol/EPA_Protocol.ph>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
 // Note: Bypass registers are per BP, so each register has info for the X
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/HBASettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/HBASettings.h
index 7339e7108250cc5435f5b2a798f4e7e2da07e22d..2f82c80ba4cf97178f4e9dec7addcd6d8026543c 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/HBASettings.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/HBASettings.h
@@ -33,6 +33,7 @@
 #include <Common/LofarTypes.h>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class HBASettings
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Latency.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Latency.h
index e4a77f31026bbd4928095cf36570720fd6eef654..03d9b3f2dd8628755c9ece9e5beb0386f9446c84 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Latency.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Latency.h
@@ -33,6 +33,7 @@
 #include <APL/RSP_Protocol/EPA_Protocol.ph>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class Latency
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RCUSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RCUSettings.h
index bea7241826b05882f1813d58bd068e81469fe429..4dd92886410204f30e61f32b5838a0ad64340ab1 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RCUSettings.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RCUSettings.h
@@ -34,6 +34,7 @@
 #include <Common/StringUtil.h>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
 // Note: The rcucontrol value is presented in the user interface as an uint32 value.
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RSUSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RSUSettings.h
index 3f445c746421411dbc54983d02b8f7f1db798fb8..480528f52255dfcc870ec3013dda17064936413a 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RSUSettings.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RSUSettings.h
@@ -33,6 +33,7 @@
 #include <Common/LofarTypes.h>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class RSUSettings {
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SDOMode.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SDOMode.h
index 922fdd3008dc27a461cc994f520cc6ae8c2cab0a..10ef392424582d5e08b04ff4ac413a840dba802c 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SDOMode.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SDOMode.h
@@ -34,6 +34,7 @@
 #include <Common/LofarTypes.h>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class SDOModeInfo
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SPUStatus.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SPUStatus.h
index 5b65f7ce0cbc1d589fa8dc7b772ef556c481a52a..cbb338368d86d0dbfea93224abf7c8807bbf1ce3 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SPUStatus.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SPUStatus.h
@@ -33,6 +33,7 @@
 #include <APL/RSP_Protocol/EPA_Protocol.ph>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
 class SPUStatus
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SystemStatus.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SystemStatus.h
index 9c248c021ff141e7da64a2bc8560640749c2b13b..e0c0cb296f1c844e74c69ce9e131b79ebfd35772 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SystemStatus.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SystemStatus.h
@@ -33,6 +33,7 @@
 #include <APL/RSP_Protocol/EPA_Protocol.ph>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class SystemStatus
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TBBSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TBBSettings.h
index 3cec2e122e6ae1b58eb9464892de3cf727805e73..bf8f98695f9d5c3ccfbb518b35a6d59e71b648f0 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TBBSettings.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TBBSettings.h
@@ -32,6 +32,7 @@
 #include <Common/LofarTypes.h>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class TBBSettings
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TDStatus.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TDStatus.h
index c3b0785ef49eb3905f78467578de0cc22f48925b..12aa00e9ab11164b70a3a7173d03fa18d4b450de 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TDStatus.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TDStatus.h
@@ -33,6 +33,7 @@
 #include <APL/RSP_Protocol/EPA_Protocol.ph>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class TDStatus
diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Versions.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Versions.h
index 9701c6474859b9595425fd362b728b87f2e48a01..9eb1a4d2ae583dc039b26e9168a148860e5c0c0e 100644
--- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Versions.h
+++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Versions.h
@@ -34,6 +34,7 @@
 #include <Common/LofarTypes.h>
 
 namespace LOFAR {
+  using namespace EPA_Protocol;
   namespace RSP_Protocol {
 
     class Versions
diff --git a/MAC/APL/PIC/TBB_Driver/src/Command.h b/MAC/APL/PIC/TBB_Driver/src/Command.h
index c53ec4dba3c51c45c18ea50d60626167b4ca9e0c..05e5a6141ad850d1f864f9435c70468c59a746df 100644
--- a/MAC/APL/PIC/TBB_Driver/src/Command.h
+++ b/MAC/APL/PIC/TBB_Driver/src/Command.h
@@ -31,6 +31,7 @@
 #include "DriverSettings.h"
 
 namespace LOFAR {
+    using namespace TBB_Protocol;
 	namespace TBB {
 
 
diff --git a/MAC/APL/PIC/TBB_Driver/src/DriverSettings.cc b/MAC/APL/PIC/TBB_Driver/src/DriverSettings.cc
index c220d823c2f41b063d8ef966c1144d71c0b2dc48..4e751be266f645576d3e503a235d7490f3d65e02 100644
--- a/MAC/APL/PIC/TBB_Driver/src/DriverSettings.cc
+++ b/MAC/APL/PIC/TBB_Driver/src/DriverSettings.cc
@@ -33,7 +33,7 @@
 #include <fstream>
 
 using namespace LOFAR;
-	//using namespace GCFCommon;
+using namespace TBB_Protocol;
 using namespace TBB;
 
 // rcu to channel conversion, rcu-0 is on channel-2
diff --git a/MAC/APL/PIC/TBB_Driver/src/MsgHandler.h b/MAC/APL/PIC/TBB_Driver/src/MsgHandler.h
index a882dae53f88d54c7bd64e5adc635aaa4d7b4ca9..231130668d7cc4312c4cad9ffcd5f6b3ca1f8dfe 100644
--- a/MAC/APL/PIC/TBB_Driver/src/MsgHandler.h
+++ b/MAC/APL/PIC/TBB_Driver/src/MsgHandler.h
@@ -36,6 +36,8 @@
 #include "DriverSettings.h"
 
 namespace LOFAR {
+	using namespace TBB_Protocol;
+	using namespace TP_Protocol;
 	namespace TBB {
 		
 
diff --git a/MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc b/MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc
index a16dfa903dbeb45948baa48466264984f771cba1..fc13ebd86f3af45237905545fb941d425d068fd4 100644
--- a/MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc
+++ b/MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc
@@ -83,6 +83,9 @@ using namespace LOFAR;
 using namespace GCF::TM;
 using namespace MACIO;
 using namespace TBB;
+using namespace TBB_Protocol;
+using namespace RSP_Protocol;
+using namespace TP_Protocol;
 using namespace std;
 
 // Use a terminate handler that can produce a backtrace.
diff --git a/MAC/APL/PIC/TBB_Driver/src/tbbctl.h b/MAC/APL/PIC/TBB_Driver/src/tbbctl.h
index 3726e2e5709ed345ccbebba026a79260693d5154..873bd6385cc8c34292735ad1be871bacfdd81d06 100644
--- a/MAC/APL/PIC/TBB_Driver/src/tbbctl.h
+++ b/MAC/APL/PIC/TBB_Driver/src/tbbctl.h
@@ -37,6 +37,7 @@
 
 
 namespace LOFAR {
+  using namespace TBB_Protocol;
   using GCF::TM::GCFTask;
   using GCF::TM::GCFPort;
   using GCF::TM::GCFTimerPort;
diff --git a/MAC/APL/RTDBCommon/src/ClaimMgrTask.cc b/MAC/APL/RTDBCommon/src/ClaimMgrTask.cc
index 30e48df00e5d1e0982cf3b8f6c7f575f1eafbb3a..476b71e1bd120dd13c73a177e10bf4fcba4422bf 100644
--- a/MAC/APL/RTDBCommon/src/ClaimMgrTask.cc
+++ b/MAC/APL/RTDBCommon/src/ClaimMgrTask.cc
@@ -30,6 +30,8 @@
 #include "CM_Protocol.ph"
 
 namespace LOFAR {
+  using namespace CM_Protocol;
+  using namespace DP_Protocol;
   using namespace GCF::TM;
   using namespace GCF::PVSS;
   using namespace GCF::RTDB;
diff --git a/MAC/APL/RTDBCommon/src/disabledRCUlist.cc b/MAC/APL/RTDBCommon/src/disabledRCUlist.cc
index e99a476b818057a205419d8ad2948c9068db57fe..0884352b54d0ad828d6c6e9f85ac019492bc3043 100644
--- a/MAC/APL/RTDBCommon/src/disabledRCUlist.cc
+++ b/MAC/APL/RTDBCommon/src/disabledRCUlist.cc
@@ -36,6 +36,7 @@
 string	gResult;
 
 namespace LOFAR {
+  using namespace DP_Protocol;
   using namespace GCF;
   using namespace GCF::TM;
   using namespace GCF::PVSS;
diff --git a/MAC/APL/RTDBCommon/src/setObjectState.cc b/MAC/APL/RTDBCommon/src/setObjectState.cc
index 9988889453654c17e9a13cd54479c69ac90e9098..a9d8c294bff9267953413fb1613baae11a7a2578 100644
--- a/MAC/APL/RTDBCommon/src/setObjectState.cc
+++ b/MAC/APL/RTDBCommon/src/setObjectState.cc
@@ -34,6 +34,7 @@
 int	gError = 0;
 
 namespace LOFAR {
+  using namespace DP_Protocol;
   using namespace GCF;
   using namespace GCF::TM;
   using namespace GCF::PVSS;
diff --git a/MAC/APL/RTDBCommon/test/tClaimManager.cc b/MAC/APL/RTDBCommon/test/tClaimManager.cc
index dbf1b21a67f02d8e6fb26f488d70ca86bea6b57f..0b115c109aab8623ba5370f57454a8e037f2e1a9 100644
--- a/MAC/APL/RTDBCommon/test/tClaimManager.cc
+++ b/MAC/APL/RTDBCommon/test/tClaimManager.cc
@@ -28,6 +28,7 @@
 #include "tClaimManager.h"
 
 namespace LOFAR {
+  using namespace CM_Protocol;
   using namespace GCF;
   using namespace GCF::TM;
   namespace APL {
diff --git a/MAC/APL/StationCU/src/BeamControl/BeamControl.cc b/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
index b5bbbcb16f967c7e74977e2b2a9c93fd0472a186..65538f138023e7505b2e31d4a2719e7c005c8596 100644
--- a/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
+++ b/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
@@ -55,6 +55,9 @@ using namespace std;
 
 namespace LOFAR {
 	using namespace APLCommon;
+	using namespace DP_Protocol;
+	using namespace Controller_Protocol;
+	using namespace IBS_Protocol;
 	namespace StationCU {
 
 #define MAX2(a,b)	((a)>(b)?(a):(b))
diff --git a/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc b/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc
index 255d5363efba0e29a1c6d2d87ed16788a917695b..a482c6044dd13ccb21884ec0d1f66c5115dad701 100644
--- a/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc
+++ b/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc
@@ -49,6 +49,9 @@ using namespace boost::posix_time;
 
 namespace LOFAR {
 	using namespace APLCommon;
+	using namespace DP_Protocol;
+	using namespace Controller_Protocol;
+	using namespace CAL_Protocol;
 	namespace StationCU {
 	
 // static pointer to this object for signal handler
diff --git a/MAC/APL/StationCU/src/ClockControl/ClockControl.cc b/MAC/APL/StationCU/src/ClockControl/ClockControl.cc
index e14df9add8477a8dff42f078c77656cceab227da..e561d2fb1dd83dfe5b241c427b3195f230182cad 100644
--- a/MAC/APL/StationCU/src/ClockControl/ClockControl.cc
+++ b/MAC/APL/StationCU/src/ClockControl/ClockControl.cc
@@ -48,6 +48,10 @@ using namespace std;
 
 namespace LOFAR {
 	using namespace APLCommon;
+	using namespace Controller_Protocol;
+	using namespace RSP_Protocol;
+	using namespace DP_Protocol;
+	using namespace Clock_Protocol;
 	namespace StationCU {
 	
 
diff --git a/MAC/APL/StationCU/src/ClockControl/clkctl.cc b/MAC/APL/StationCU/src/ClockControl/clkctl.cc
index 81fde40a8c4a31c5363ac8dced8546337cb04bc3..78dc253db80a59fe41a412d6b52332b7641af4dc 100644
--- a/MAC/APL/StationCU/src/ClockControl/clkctl.cc
+++ b/MAC/APL/StationCU/src/ClockControl/clkctl.cc
@@ -31,6 +31,7 @@
 #include "clkctl.h"
 
 namespace LOFAR {
+	using namespace Clock_Protocol;
 	using namespace LOFAR::GCF::TM;
 
 ClkCtl::ClkCtl(const string& name) :
diff --git a/MAC/APL/StationCU/src/HardwareMonitor/ECMonitor.cc b/MAC/APL/StationCU/src/HardwareMonitor/ECMonitor.cc
index b1517b62bffc7b8bcfdde73a95ffdb80373fba13..37a4ace390422986eaaa99fd48baa73dcf3a17d7 100644
--- a/MAC/APL/StationCU/src/HardwareMonitor/ECMonitor.cc
+++ b/MAC/APL/StationCU/src/HardwareMonitor/ECMonitor.cc
@@ -54,6 +54,8 @@ namespace LOFAR {
 	using namespace GCF::RTDB;
 	using namespace APLCommon;
 	using namespace APL::RTDBCommon;
+	using namespace EC_Protocol;
+	using namespace DP_Protocol;
 	namespace StationCU {
 
 //
diff --git a/MAC/APL/StationCU/src/HardwareMonitor/HardwareMonitorMain.cc b/MAC/APL/StationCU/src/HardwareMonitor/HardwareMonitorMain.cc
index d21c9bf1728cdf037b199ce6de29c188dddc9895..d8d7a688456fb93e805debd5e2e3faeb6ca6a032 100644
--- a/MAC/APL/StationCU/src/HardwareMonitor/HardwareMonitorMain.cc
+++ b/MAC/APL/StationCU/src/HardwareMonitor/HardwareMonitorMain.cc
@@ -36,6 +36,8 @@ using namespace LOFAR;
 using namespace LOFAR::GCF;
 using namespace LOFAR::GCF::TM;
 using namespace LOFAR::StationCU;
+using namespace LOFAR::RSP_Protocol;
+using namespace LOFAR::DP_Protocol;
 
 // Use a terminate handler that can produce a backtrace.
 Exception::TerminateHandler t(Exception::terminate);
diff --git a/MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc b/MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc
index b75f4d372b67d774f8e886c8af868952119b9aea..3d38d28ad155f8f4af72a3fa89e86c588a1212e1 100644
--- a/MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc
+++ b/MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc
@@ -44,6 +44,8 @@
 #define MAX2(a,b)	((a) > (b)) ? (a) : (b)
 
 namespace LOFAR {
+	using namespace RSP_Protocol;
+	using namespace DP_Protocol;
 	using namespace APLCommon;
 	using namespace APL::RTDBCommon;
 	using namespace GCF::TM;
diff --git a/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc b/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc
index 8a953191bd556853c38d2f3d92b657dc8d4f4023..9519bc804b93ab91be2d9bcac11247d86cc66add 100644
--- a/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc
+++ b/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc
@@ -42,6 +42,8 @@
 using namespace boost::posix_time;
 
 namespace LOFAR {
+	using namespace TBB_Protocol;
+	using namespace DP_Protocol;
 	using namespace GCF::TM;
 	using namespace GCF::PVSS;
 	using namespace GCF::RTDB;
diff --git a/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.h b/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.h
index 73535f2f0e4fa0646d983445faa39df89e1a8176..2025c83f4beeb0d8dcb42edbc52cf515a43b2e6a 100644
--- a/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.h
+++ b/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.h
@@ -36,6 +36,7 @@
 // forward declaration
 
 namespace LOFAR {
+    using namespace TBB_Protocol;
 	namespace StationCU {
 
 using	MACIO::GCFEvent;
diff --git a/MAC/APL/StationCU/src/StationControl/ActiveObs.cc b/MAC/APL/StationCU/src/StationControl/ActiveObs.cc
index 9a80f1d7db55fc6837192543115490cea79a3249..c8e440540e3b5243f8835e61c9deac807bc80216 100644
--- a/MAC/APL/StationCU/src/StationControl/ActiveObs.cc
+++ b/MAC/APL/StationCU/src/StationControl/ActiveObs.cc
@@ -42,6 +42,8 @@
 #include "ActiveObs.h"
 
 namespace LOFAR {
+	using namespace Controller_Protocol;
+	using namespace DP_Protocol;
 	using namespace APLCommon;
 	using namespace MACIO;
 	using namespace GCF::TM;
diff --git a/MAC/APL/StationCU/src/StationControl/StationControl.cc b/MAC/APL/StationCU/src/StationControl/StationControl.cc
index 88b9691ef877a0a8a7d46760179adc3026a34697..082acb939af6c8d4d0c79703b3e7951a1111a563 100644
--- a/MAC/APL/StationCU/src/StationControl/StationControl.cc
+++ b/MAC/APL/StationCU/src/StationControl/StationControl.cc
@@ -67,6 +67,10 @@ using namespace std;
 
 namespace LOFAR {
 	using namespace APLCommon;
+	using namespace Controller_Protocol;
+	using namespace RSP_Protocol;
+	using namespace DP_Protocol;
+	using namespace Clock_Protocol;
 	namespace StationCU {
 
 // static pointer to this object for signalhandler
diff --git a/MAC/APL/StationCU/src/TBBControl/TBBControl.cc b/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
index b05d1d5d73de3242a9df7b77ee78040785ef822d..6788e2bd7d3156ef684b851c737dd89403017f5b 100644
--- a/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
+++ b/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
@@ -61,6 +61,11 @@ using namespace boost::posix_time;
 using namespace std;
 
 namespace LOFAR {
+    using namespace Controller_Protocol;
+    using namespace CR_Protocol;
+    using namespace TBB_Protocol;
+    using namespace RSP_Protocol;
+    using namespace DP_Protocol;
     using namespace GCF::TM;
     using namespace GCF::PVSS;
     using namespace GCF::RTDB;
diff --git a/MAC/APL/StationCU/src/TBBControl/trigctl.cc b/MAC/APL/StationCU/src/TBBControl/trigctl.cc
index 9264d4936861514d5f036bd2c9931042e047f058..783d38fe17158788f6b93c58b03c8bc0c09c2684 100644
--- a/MAC/APL/StationCU/src/TBBControl/trigctl.cc
+++ b/MAC/APL/StationCU/src/TBBControl/trigctl.cc
@@ -57,6 +57,7 @@ using namespace std;
 using namespace LOFAR;
 using namespace GCF::TM;
 using namespace CR_Protocol;
+using namespace TBB_Protocol;
 using namespace TrigCtl;
 
 // Use a terminate handler that can produce a backtrace.
diff --git a/MAC/GCF/RTDB/src/DPanswer.cc b/MAC/GCF/RTDB/src/DPanswer.cc
index 8b334e631fa3c75f9410df45fb1975d79018e429..3e77e439e74a61ef77636fe0afebfd9ab0068018 100644
--- a/MAC/GCF/RTDB/src/DPanswer.cc
+++ b/MAC/GCF/RTDB/src/DPanswer.cc
@@ -29,6 +29,7 @@
 #include "DPanswer.h"
 
 namespace LOFAR {
+  using namespace DP_Protocol;
   using namespace MACIO;
   namespace GCF {
     namespace RTDB {
diff --git a/MAC/GCF/RTDB/test/tDPservice.cc b/MAC/GCF/RTDB/test/tDPservice.cc
index 5d915b54c5050fd2525cf0815ebf39fef574885b..1a54d4d83e8779ab3b65216e94a58e384613b305 100644
--- a/MAC/GCF/RTDB/test/tDPservice.cc
+++ b/MAC/GCF/RTDB/test/tDPservice.cc
@@ -33,6 +33,7 @@
 #include "DPresponse.h"
 
 namespace LOFAR {
+  using namespace DP_Protocol;
   namespace GCF {
   using namespace TM;
   using namespace PVSS;
diff --git a/MAC/GCF/RTDB/test/tPerformanceReport.cc b/MAC/GCF/RTDB/test/tPerformanceReport.cc
index 8c1673961f2f86fc1cbdabc2454c7436bf9dc177..be7a8684e84081944cca543c8811b1de1168180e 100644
--- a/MAC/GCF/RTDB/test/tPerformanceReport.cc
+++ b/MAC/GCF/RTDB/test/tPerformanceReport.cc
@@ -36,6 +36,7 @@ int		NR_OF_ACTIONS(1000);
 bool	gReadMode;
 
 namespace LOFAR {
+  using namespace DP_Protocol;
   namespace GCF {
   using namespace TM;
   using namespace PVSS;
diff --git a/MAC/GCF/RTDB/test/tPropertySet.cc b/MAC/GCF/RTDB/test/tPropertySet.cc
index 252df33a5c9d2937cffd51978d4702f7a30b192e..114f455c78d4cbf3b8dc75cd38e8cf893a0d8f6b 100644
--- a/MAC/GCF/RTDB/test/tPropertySet.cc
+++ b/MAC/GCF/RTDB/test/tPropertySet.cc
@@ -31,6 +31,7 @@
 #include "tPropertySet.h"
 
 namespace LOFAR {
+  using namespace DP_Protocol;
   namespace GCF {
   using namespace TM;
   using namespace PVSS;
diff --git a/MAC/GCF/RTDB/test/tRTDBPerformance.cc b/MAC/GCF/RTDB/test/tRTDBPerformance.cc
index 59e03e2db51baf837a429dc176aeb970686b7fbf..c52a6c2a8b89ce72314d63670b384eca398016b7 100644
--- a/MAC/GCF/RTDB/test/tRTDBPerformance.cc
+++ b/MAC/GCF/RTDB/test/tRTDBPerformance.cc
@@ -33,6 +33,7 @@
 #include "RTDBPerfResp.h"
 
 namespace LOFAR {
+  using namespace DP_Protocol;
   namespace GCF {
   using namespace TM;
   using namespace PVSS;
diff --git a/MAC/GCF/RTDB/test/tRTDBPort.cc b/MAC/GCF/RTDB/test/tRTDBPort.cc
index 6dd5a1365353a4594d91df8281baeb05b51d1770..4d7a642056229cbd9b16cba0e197ce8ce01e3cc7 100644
--- a/MAC/GCF/RTDB/test/tRTDBPort.cc
+++ b/MAC/GCF/RTDB/test/tRTDBPort.cc
@@ -31,6 +31,7 @@
 #include "tRTDBPort.h"
 
 namespace LOFAR {
+  using namespace KVT_Protocol;
   namespace GCF {
   using namespace TM;
   using namespace PVSS;
diff --git a/MAC/GCF/RTDB/test/testQuery.cc b/MAC/GCF/RTDB/test/testQuery.cc
index 17a7480673e541b3b8014f04c704ae739169b3f5..b5c004755da83b3397c0f01e408d0acef853c93f 100644
--- a/MAC/GCF/RTDB/test/testQuery.cc
+++ b/MAC/GCF/RTDB/test/testQuery.cc
@@ -36,6 +36,7 @@ static string DPclause;
 static string whereClause;
 
 namespace LOFAR {
+  using namespace DP_Protocol;
   namespace GCF {
   using namespace TM;
   using namespace PVSS;
diff --git a/MAC/GCF/TM/src/PortImpl/GCF_TCPPort.cc b/MAC/GCF/TM/src/PortImpl/GCF_TCPPort.cc
index 2b56e883d5d7093556015f92bcb961f77fe402c3..af83278dc8bf529e613a1dd7319c8bace6927628 100644
--- a/MAC/GCF/TM/src/PortImpl/GCF_TCPPort.cc
+++ b/MAC/GCF/TM/src/PortImpl/GCF_TCPPort.cc
@@ -38,6 +38,7 @@
 const uint UDP_BUFFER_SIZE = 1600;
 
 namespace LOFAR {
+  using namespace SB_Protocol;
   namespace GCF {
     using namespace SB;
     namespace TM {
diff --git a/MAC/GCF/TM/src/ServiceBroker/ServiceBrokerTask.cc b/MAC/GCF/TM/src/ServiceBroker/ServiceBrokerTask.cc
index 6e99bc2a6827b35decfa24da242cbe54987ad384..4b4edc3434cb723fd88f9bb3d74d79089577822f 100644
--- a/MAC/GCF/TM/src/ServiceBroker/ServiceBrokerTask.cc
+++ b/MAC/GCF/TM/src/ServiceBroker/ServiceBrokerTask.cc
@@ -31,9 +31,10 @@
 #include <unistd.h>
 
 namespace LOFAR {
- namespace GCF {
-  using namespace TM;
-  namespace SB {
+  using namespace SB_Protocol;
+  namespace GCF {
+    using namespace TM;
+    namespace SB {
 
 //
 // Initialize static elements
diff --git a/MAC/GCF/TM/test/Echo.cc b/MAC/GCF/TM/test/Echo.cc
index 98680a672854173a59796da22c0b6a2a648f9ec6..cfa8e916771b5d16776d182b8d29f46e076a3613 100644
--- a/MAC/GCF/TM/test/Echo.cc
+++ b/MAC/GCF/TM/test/Echo.cc
@@ -32,8 +32,9 @@ static	int			gSeqnr;
 static	LOFAR::GCF::TM::GCFTCPPort*	gClientPort;
 
 namespace LOFAR {
- namespace GCF {
-  namespace TM {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 Echo::Echo(string name) : GCFTask((State)&Echo::initial, name)
 {
diff --git a/MAC/GCF/TM/test/Ping.cc b/MAC/GCF/TM/test/Ping.cc
index 08e7e3f0b56ded1166179d34636eae7a96615f01..aacdace9eac10e644f742e310a93a73f4071b9f7 100644
--- a/MAC/GCF/TM/test/Ping.cc
+++ b/MAC/GCF/TM/test/Ping.cc
@@ -28,12 +28,10 @@
 #include "Echo_Protocol.ph"
 
 
-namespace LOFAR 
-{
- namespace GCF 
- {
-  namespace TM 
-  {
+namespace LOFAR {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 /**
  * Function to calculate the elapsed time between two tiemval's.
diff --git a/MAC/GCF/TM/test/tAutoOpen.cc b/MAC/GCF/TM/test/tAutoOpen.cc
index b50df9898bdd29c26a249962df6ad410c8304c41..38a2f03613680731d23206b51ff46af953006a25 100644
--- a/MAC/GCF/TM/test/tAutoOpen.cc
+++ b/MAC/GCF/TM/test/tAutoOpen.cc
@@ -29,8 +29,9 @@
 #include "tServer.h"
 
 namespace LOFAR {
- namespace GCF {
-  namespace TM {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 
 // Constructors of both classes
diff --git a/MAC/GCF/TM/test/tClient.cc b/MAC/GCF/TM/test/tClient.cc
index 671a51135bf0bd9c6bf98e695efd7f36934e5f7f..c4d4cf6730799b3fe4435404870b3ddc3e7ee767 100644
--- a/MAC/GCF/TM/test/tClient.cc
+++ b/MAC/GCF/TM/test/tClient.cc
@@ -28,8 +28,9 @@
 #include "tClient.h"
 
 namespace LOFAR {
- namespace GCF {
-  namespace TM {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 
 // Constructors of both classes
diff --git a/MAC/GCF/TM/test/tEventBinding.cc b/MAC/GCF/TM/test/tEventBinding.cc
index 692ebdfbbf94ba58454b8bd2563a654325251793..2f646f1452f5976124f5a0d4195c39cd2f2341c4 100644
--- a/MAC/GCF/TM/test/tEventBinding.cc
+++ b/MAC/GCF/TM/test/tEventBinding.cc
@@ -29,8 +29,9 @@
 #include "tServer.h"
 
 namespace LOFAR {
- namespace GCF {
-  namespace TM {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 static int	gCounter1;
 static int	gCounter2;
diff --git a/MAC/GCF/TM/test/tEventQueue.cc b/MAC/GCF/TM/test/tEventQueue.cc
index 7117401142eee501df95744879e6c4fbf2f0c7c8..9b78365a01a70985b3857afdd741effbaa924a79 100644
--- a/MAC/GCF/TM/test/tEventQueue.cc
+++ b/MAC/GCF/TM/test/tEventQueue.cc
@@ -32,8 +32,9 @@ static	int	gTest = 0;
 static	int	gTimerID;
 
 namespace LOFAR {
- namespace GCF {
-  namespace TM {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 
 // Constructors of both classes
diff --git a/MAC/GCF/TM/test/tITCPort.cc b/MAC/GCF/TM/test/tITCPort.cc
index d49ad07f9fcb2dfd32a5123d72c94ff2855a639e..d76d63e22cd00f589982957b3deac27411b6461e 100644
--- a/MAC/GCF/TM/test/tITCPort.cc
+++ b/MAC/GCF/TM/test/tITCPort.cc
@@ -33,8 +33,9 @@
 #include "Echo_Protocol.ph"
 
 namespace LOFAR {
- namespace GCF {
-  namespace TM {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 EchoPingEvent 	gPing;
 EchoPingEvent 	gPing2;
diff --git a/MAC/GCF/TM/test/tServer.cc b/MAC/GCF/TM/test/tServer.cc
index ed8b86dc3e69b4b480d4e196c5662696d85e32bb..0c9051ebc412e50f317e2fa82bf810d8961428e1 100644
--- a/MAC/GCF/TM/test/tServer.cc
+++ b/MAC/GCF/TM/test/tServer.cc
@@ -28,8 +28,9 @@
 #include "Echo_Protocol.ph"
 
 namespace LOFAR {
- namespace GCF {
-  namespace TM {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 tServer::tServer(string name, uint	startupDelay) : 
 	GCFTask((State)&tServer::initial, name),
diff --git a/MAC/GCF/TM/test/tStateResult.cc b/MAC/GCF/TM/test/tStateResult.cc
index b68904ed0b2383511ce47c2a820ddb1d1250471b..54406a6167849b36024afa0bada4659c3201ab91 100644
--- a/MAC/GCF/TM/test/tStateResult.cc
+++ b/MAC/GCF/TM/test/tStateResult.cc
@@ -30,8 +30,9 @@
 #include "tServer.h"
 
 namespace LOFAR {
- namespace GCF {
-  namespace TM {
+  using namespace Echo_Protocol;
+  namespace GCF {
+    namespace TM {
 
 
 // Constructors of both classes
diff --git a/MAC/MACIO/autogen/protocol.tpl b/MAC/MACIO/autogen/protocol.tpl
index 763352f1284df120094ebe305655a0322fec90af..c89e7bef42bd262c95b1ae4d2a1a0e51d3666ce0 100644
--- a/MAC/MACIO/autogen/protocol.tpl
+++ b/MAC/MACIO/autogen/protocol.tpl
@@ -9,7 +9,7 @@
 [+ DEFINE signal_id +][+ signal_name +]_ID[+ ENDDEF +]
 [+ DEFINE cap_signal +][+ (string-substitute (string-capitalize! (get "signal")) '( "_" )' ( "" )) +][+ ENDDEF +]
 [+ DEFINE event_class_name +][+ prefix_cap +][+ cap_signal +]Event[+ ENDDEF +]
-[+ DEFINE event_class_decl +][+ event_class_name +] : public MACIO::GCFEvent[+ ENDDEF +]
+[+ DEFINE event_class_decl +][+ event_class_name +] : public LOFAR::MACIO::GCFEvent[+ ENDDEF +]
 [+ DEFINE protocol_name +][+ (string-upcase (base-name)) +][+ ENDDEF +]
 [+ DEFINE project +][+ IF (exist? "project") +][+ (get "project") +][+ ELSE +]LOFAR[+ ENDIF +][+ ENDDEF +]
 [+ DEFINE event_class_member_type +][+ IF (*== (get "type") "]") +][+ (substring (get "type") 0 (string-index (get "type") #\[)) +][+ ELSE +][+ (get "type") +][+ ENDIF +][+ ENDDEF +]
@@ -38,15 +38,16 @@
 #include <MACIO/Marshalling.tcc>
 #include "[+ (base-name) +].ph"
 
-using namespace LOFAR::MACIO;
-[+ IF (exist? "project") +]using namespace LOFAR;[+ ENDIF +]
-using namespace std;
+// using namespace LOFAR::MACIO;
+namespace [+ project +] {
+  namespace [+ (base-name) +] {
+    using namespace std;
 
-[+ FOR Cfunction "" +][+ (get "result")+] [+ project +]::[+ (base-name) +]::[+ (get "name") +] {
+[+ FOR Cfunction "" +][+ (get "result")+] [+ (get "name") +] {
 [+ (get "code") +]
 }[+ ENDFOR +]
 
-const char* [+ project +]::[+ (base-name) +]::[+ protocol_name +]_signalnames[] = 
+const char* [+ protocol_name +]_signalnames[] = 
 {
   "[+ protocol_name +]: invalid signal",[+ FOR event "," +]
   "[+ signal_name +]"[+ ENDFOR +]
@@ -57,9 +58,9 @@ const char* [+ protocol_name +]_errornames[] =
 	"[+ (get "msg") +]"[+ ENDFOR error +]
 };
 
-const struct protocolStrings		[+ project +]::[+ (base-name) +]::[+ protocol-name +]_STRINGS = {
+const struct LOFAR::MACIO::protocolStrings		[+ protocol-name +]_STRINGS = {
 	[+ (count "event") +]+1, [+ (count "error") +], 
-	[+ project +]::[+ (base-name) +]::[+ protocol_name +]_signalnames,
+	[+ protocol_name +]_signalnames,
 	[+ protocol_name +]_errornames
 };
 [+ ELSE +]
@@ -74,10 +75,9 @@ const struct protocolStrings		[+ project +]::[+ (base-name) +]::[+ protocol-name
 #include <string>
 #include <cstring>
 
-namespace [+ project +]
-{
-	namespace [+ (base-name) +]
-	{
+namespace [+ project +] {
+  namespace [+ (base-name) +] {
+    using namespace LOFAR;
 
 [+ (get "prelude") +]
 
@@ -121,7 +121,7 @@ extern const struct LOFAR::MACIO::protocolStrings [+ protocol-name +]_STRINGS;
   class [+ event_class_decl +]
   {
     public:
-      [+ event_class_name +](MACIO::GCFEvent& e);
+      [+ event_class_name +](LOFAR::MACIO::GCFEvent& e);
       [+ event_class_name +]();
       virtual ~[+ event_class_name +]();
 
@@ -130,7 +130,7 @@ extern const struct LOFAR::MACIO::protocolStrings [+ protocol-name +]_STRINGS;
 
       void pack();
       virtual [+ event_class_name +]*	clone();
-      ostream& print (ostream& os) const;
+      virtual void print (ostream& os) const;
 
     private:
       [+ event_class_name +]([+ event_class_name +]&);
@@ -141,11 +141,12 @@ extern const struct LOFAR::MACIO::protocolStrings [+ protocol-name +]_STRINGS;
 
 inline ostream& operator<<(ostream& os, const [+ event_class_name +]& event)
 {
-    return (event.print(os));
+    event.print(os);
+	return os;
 };
  [+ ELSE +]
-[+ event_class_name +]::[+ event_class_name +](MACIO::GCFEvent& e)
-  : MACIO::GCFEvent(e)[+ FOR param "" +][+ IF (or (*== (get "type") "[]") (*== (get "type") "*")) +],
+[+ event_class_name +]::[+ event_class_name +](LOFAR::MACIO::GCFEvent& e)
+  : LOFAR::MACIO::GCFEvent(e)[+ FOR param "" +][+ IF (or (*== (get "type") "[]") (*== (get "type") "*")) +],
     [+ (get "name") +](0)[+ ENDIF +][+ IF (*== (get "type") "[]") +],
     [+ (get "name") +]NOE(0)[+ ENDIF +][+ ENDFOR +]
 {
@@ -153,7 +154,7 @@ inline ostream& operator<<(ostream& os, const [+ event_class_name +]& event)
 }
       
 [+ event_class_name +]::[+ event_class_name +]()
-  : MACIO::GCFEvent([+ signal_name +])[+ FOR param "" +][+ IF (or (*== (get "type") "[]") (*== (get "type") "*")) +],
+  : LOFAR::MACIO::GCFEvent([+ signal_name +])[+ FOR param "" +][+ IF (or (*== (get "type") "[]") (*== (get "type") "*")) +],
     [+ (get "name") +](0)[+ ENDIF +][+ IF (*== (get "type") "[]") +],
     [+ (get "name") +]NOE(0)[+ ENDIF +][+ ENDFOR +]
 {        
@@ -189,7 +190,6 @@ void [+ event_class_name +]::pack()
   [+ ENDIF +][+ ENDFOR +]
 	[+ IF (= (count "param") 0) +]
   // no params in this event to pack
-  (void)__offset;
 	[+ ENDIF +]
 }
 
@@ -216,7 +216,7 @@ void [+ event_class_name +]::unpack()
     MSH_unpack(_buffer, __offset, [+ (get "name") +]);
     [+ ENDIF +][+ ENDFOR +]
 	_buffer  = 0;
-        (void)__offset;
+	__offset = 0;
 }
 
 [+ event_class_name +]* [+ event_class_name +]::clone()
@@ -228,12 +228,12 @@ void [+ event_class_name +]::unpack()
     return (clonedEvent);
 }
 
-ostream& [+ event_class_name +]::print(ostream& os) const
+void [+ event_class_name +]::print(ostream& os) const
 {
 using LOFAR::operator<<;
   // Note: 'userdefined' classes are only printed if they are 'printable'
   //       base classes are printed except when they are 'nonprintable'
-  MACIO::GCFEvent::print(os);
+  LOFAR::MACIO::GCFEvent::print(os);
   [+ FOR param "" +][+ IF (==* (get "type") "struct") +][+ ELSE +]
     [+ IF (or (and (exist? "userdefined") (exist? "printable")) (and (not(exist? "userdefined")) (not(exist? "nonprintable")))) +]
       [+ IF (*== (get "type") "*") +]
@@ -241,15 +241,13 @@ using LOFAR::operator<<;
       [+ ELSE +]
       os << " [+ (get "name") +] = " <<  [+ (get "name") +] << endl; // [+ (get "type") +]
       [+ ENDIF +][+ ENDIF +][+ ENDIF +]
-  [+ ENDFOR +]return (os);
+  [+ ENDFOR +]
 }
 [+ ENDIF +][+ ENDFOR +]
 
-[+ IF (= (suffix) "ph") +]
 	} // namespace [+ (base-name) +]
 } // namespace [+ project +]
 
-using namespace [+ project +]::[+ (base-name) +];
-
+[+ IF (= (suffix) "ph") +]
 #endif
 [+ ENDIF +]
diff --git a/MAC/MACIO/include/MACIO/Marshalling.tcc b/MAC/MACIO/include/MACIO/Marshalling.tcc
index 0e8b571c28a1ef481c285815da4be08f60c94656..debadb1956f5a600a695aac543f8f38294be8e15 100644
--- a/MAC/MACIO/include/MACIO/Marshalling.tcc
+++ b/MAC/MACIO/include/MACIO/Marshalling.tcc
@@ -34,7 +34,12 @@
 #include <boost/dynamic_bitset.hpp>
 #include <sstream>
 
-using namespace LOFAR;
+using LOFAR::int32;
+using LOFAR::uint32;
+using LOFAR::map;
+using LOFAR::stringstream;
+using LOFAR::vector;
+using LOFAR::KVpair;
 
 // Basic template
 template<typename T> inline uint32 MSH_size(const T	&tVar)
diff --git a/MAC/MACIO/include/MACIO/RTmetadata.h b/MAC/MACIO/include/MACIO/RTmetadata.h
index de776587deb802b3ee0f892cb8257c7234e4f952..5760e99893abdde75204616ce288c93f1187e34e 100644
--- a/MAC/MACIO/include/MACIO/RTmetadata.h
+++ b/MAC/MACIO/include/MACIO/RTmetadata.h
@@ -43,6 +43,7 @@
 // Avoid 'using namespace' in headerfiles
 
 namespace LOFAR {
+  using namespace KVT_Protocol;
   namespace MACIO {
 
 // \addtogroup MACIO
diff --git a/MAC/MACIO/src/EventPort.cc b/MAC/MACIO/src/EventPort.cc
index fceda40f61fc535ac35b00cb4bea62972ff8d65d..404ca21eea905a6bacf8926aac88f7ec830396b1 100644
--- a/MAC/MACIO/src/EventPort.cc
+++ b/MAC/MACIO/src/EventPort.cc
@@ -35,6 +35,7 @@
 //#include "GSB_Defines.h"
 
 namespace LOFAR {
+  using namespace SB_Protocol;
   namespace MACIO {
 
 // Note: the difference with GCF-ports is that this port is only based on the
diff --git a/MAC/MACIO/test/Clone_Protocol.prot b/MAC/MACIO/test/Clone_Protocol.prot
index 0ffb8e30a9d60afdc98f391ed88731dc36dee2c7..268d21af0117a2197dad79d3a7365dc5dec4d6e8 100644
--- a/MAC/MACIO/test/Clone_Protocol.prot
+++ b/MAC/MACIO/test/Clone_Protocol.prot
@@ -8,7 +8,6 @@ prefix = "Clone"; // for the signal names
 id = "LOFAR::MACIO::F_APL_PROTOCOL";
 // specify extra include files
 // e.g.
-include = '<MACIO/StringVector.h>';
 include = '<sys/time.h>';
 
 //
@@ -52,9 +51,7 @@ event = {
 	dir = IN;
 	param = {
 		name = "SV";
-		type = "MACIO::StringVector";
-		userdefined;
-		printable;
+		type = "vector<string>";
 	};
 };
 
diff --git a/MAC/MACIO/test/tClone.cc b/MAC/MACIO/test/tClone.cc
index f8ed9a1400931b1e7c03ec164e05b6c869b69f2d..3785ac9da00fad8f62716ab2ed11c0985a47c7a6 100644
--- a/MAC/MACIO/test/tClone.cc
+++ b/MAC/MACIO/test/tClone.cc
@@ -30,6 +30,7 @@
 #include "Clone_Protocol.ph"
 
 using namespace LOFAR;
+using namespace LOFAR::Clone_Protocol;
 using namespace LOFAR::MACIO;
 
 int main (int	/*argc*/, char* argv[]) 
@@ -68,12 +69,12 @@ int main (int	/*argc*/, char* argv[])
 
 	LOG_INFO("Cloning an event with a stringVector");
 	CloneVectorEvent	theOrgVector;
-	theOrgVector.SV().push_back("aap");
-	theOrgVector.SV().push_back("noot");
-	theOrgVector.SV().push_back("mies");
-	theOrgVector.SV().push_back("wim");
-	theOrgVector.SV().push_back("zus");
-	theOrgVector.SV().push_back("jet");
+	theOrgVector.SV.push_back("aap");
+	theOrgVector.SV.push_back("noot");
+	theOrgVector.SV.push_back("mies");
+	theOrgVector.SV.push_back("wim");
+	theOrgVector.SV.push_back("zus");
+	theOrgVector.SV.push_back("jet");
 	LOG_INFO_STR(theOrgVector);
 
 	CloneVectorEvent*	theClonedVector = theOrgVector.clone();
diff --git a/MAC/MACIO/test/tEventPort.cc b/MAC/MACIO/test/tEventPort.cc
index 6c95d91665ae6f8b4ea88d747e37f0d9011ec119..31d197e402830c436812a6a43507b24ba12c0c9c 100644
--- a/MAC/MACIO/test/tEventPort.cc
+++ b/MAC/MACIO/test/tEventPort.cc
@@ -27,6 +27,7 @@
 #include "Echo_Protocol.ph"
 
 using namespace LOFAR;
+using namespace LOFAR::Echo_Protocol;
 using namespace LOFAR::MACIO;
 
 static	EchoPingEvent		pingEvent;
diff --git a/MAC/MACIO/test/tMarshalling.cc b/MAC/MACIO/test/tMarshalling.cc
index 013bfe578a92e7b8b11887a35a242753d89d8268..679ca1bc023da46b8ebd0183fae3069c2e936644 100644
--- a/MAC/MACIO/test/tMarshalling.cc
+++ b/MAC/MACIO/test/tMarshalling.cc
@@ -33,9 +33,6 @@
 #include "tMarshalling.h"
 
 
-using namespace LOFAR;
-using namespace std;
-
 namespace LOFAR {
 
 SubArray::SubArray(int i, double d, string s) :
@@ -101,6 +98,9 @@ size_t SubArrayNC::unpack(const char*	buffer) {
 
 } // namespace LOFAR
 
+using namespace LOFAR;
+using namespace std;
+
 int main (int	/*argc*/, char**	/*argv[]*/)
 {
 	// string test
@@ -344,33 +344,4 @@ int main (int	/*argc*/, char**	/*argv[]*/)
 		iterdv++;
 	}
 	ASSERTSTR (offset1 == offset2 && dv1 == dv2, "Failure in vector<double>");
-
-	// KVpair
-	KVpair intVar("integerVar", 3125);
-	KVpair strVar("stringVar", "3125");
-	KVpair dblVar("doubleVar", 3125.0);
-
-	cout << "intVar size=" << MSH_size(intVar) << endl;
-	cout << "strVar size=" << MSH_size(strVar) << endl;
-	cout << "dblVar size=" << MSH_size(dblVar) << endl;
-
-	bzero(buf, 4096);
-	offset = 0;
-	MSH_pack(buf, offset, intVar);
-	MSH_pack(buf, offset, strVar);
-	MSH_pack(buf, offset, dblVar);
-	cout << "packed:" << endl;
-	hexdump(buf, offset);
-
-	offset = 0;
-	KVpair	intVar2;
-	MSH_unpack(buf, offset, intVar2);
-	KVpair	strVar2;
-	MSH_unpack(buf, offset, strVar2);
-	KVpair	dblVar2;
-	MSH_unpack(buf, offset, dblVar2);
-
-	ASSERTSTR(intVar == intVar2, "integer KVpair different after pack and unpack!");
-	ASSERTSTR(strVar == strVar2, "string KVpair different after pack and unpack!");
-	ASSERTSTR(dblVar == dblVar2, "double KVpair different after pack and unpack!");
 }
diff --git a/MAC/MACIO/test/tProtocol.cc b/MAC/MACIO/test/tProtocol.cc
index 56423b0e39c463410ec00ed3ca16e76822bff45e..d86b4dafed6bd480f1a65a638e98e93470634088 100644
--- a/MAC/MACIO/test/tProtocol.cc
+++ b/MAC/MACIO/test/tProtocol.cc
@@ -30,6 +30,8 @@
 #include "Echo_Protocol.ph"
 
 using namespace LOFAR;
+using namespace LOFAR::testprotocol;
+using namespace LOFAR::Echo_Protocol;
 using namespace LOFAR::MACIO;
 
 int main (int	/*argc*/, char* argv[])