diff --git a/GaudiPluginService/CMakeLists.txt b/GaudiPluginService/CMakeLists.txt
index c8bf19e02e374b85875e16202649ad6b8279cdb6..2408f501640e682bcb5c79cb6d8ef5cd642564ec 100644
--- a/GaudiPluginService/CMakeLists.txt
+++ b/GaudiPluginService/CMakeLists.txt
@@ -19,8 +19,8 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
   SET ( GaudiPluginService_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE )
 endif()
 
-add_executable(listcomponents src/listcomponents.cpp src/PluginService.cpp)
-target_link_libraries(listcomponents ${CMAKE_DL_LIBS})
+add_executable(listcomponents src/listcomponents.cpp ) #src/PluginService.cpp)
+target_link_libraries(listcomponents DD4hepGaudiPluginMgr  ${CMAKE_DL_LIBS} )
 
 install(TARGETS listcomponents DD4hepGaudiPluginMgr
   RUNTIME DESTINATION bin
diff --git a/GaudiPluginService/src/PluginService.cpp b/GaudiPluginService/src/PluginService.cpp
index a865497567e43e66c644d7e701903cbb49eec632..1c5cf3712be2602b2e61fefe0a84a41ff357841d 100644
--- a/GaudiPluginService/src/PluginService.cpp
+++ b/GaudiPluginService/src/PluginService.cpp
@@ -24,12 +24,16 @@
 #include <cxxabi.h>
 #include <sys/stat.h>
 
-#if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+#if  defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L 
 #define REG_SCOPE_LOCK \
   std::lock_guard<std::recursive_mutex> _guard(m_mutex);
 
+
+//namespace Gaudi { namespace PluginService { namespace Details { class Registry ; } } }
+
 namespace {
   std::mutex registrySingletonMutex;
+  //  Gaudi::PluginService::Details::Registry* _theRegistry ;
 }
 #define SINGLETON_LOCK \
   std::lock_guard<std::mutex> _guard(::registrySingletonMutex);
@@ -133,9 +137,17 @@ namespace Gaudi { namespace PluginService {
       return demangle(id.name());
     }
 
+    // Registry& Registry::instance() {
+    //   SINGLETON_LOCK
+    // 	if( ::_theRegistry == 0 ){
+    // 	  ::_theRegistry = new Registry ;
+    // 	}
+    //   return * ::_theRegistry ;
+    // }
+
     Registry& Registry::instance() {
       SINGLETON_LOCK
-      static Registry r;
+	static Registry r;
       return r;
     }
 
@@ -253,10 +265,6 @@ namespace Gaudi { namespace PluginService {
         entry = facts.insert(std::make_pair(id,
                                             FactoryInfo("unknown", factory,
                                                         type, rtype, className, props))).first;
-#if APPLE
-#define DEBUG_FOR_MAC 1
-#endif
-
 #if DEBUG_FOR_MAC
 	std::cout << " --  registering factory id: " << id << " class : " << className << " with registry " << this << std::endl ;
 #endif
diff --git a/GaudiPluginService/src/listcomponents.cpp b/GaudiPluginService/src/listcomponents.cpp
index ac547eb46bf702c88cc294602e9e1bb8a0eec09e..f8db28cac3192067b9aad22751e202174c9ff65e 100644
--- a/GaudiPluginService/src/listcomponents.cpp
+++ b/GaudiPluginService/src/listcomponents.cpp
@@ -46,15 +46,6 @@ int main(int argc, char* argv[]) {
       Gaudi::PluginService::Details::Registry::instance();
   typedef Gaudi::PluginService::Details::Registry::KeyType key_type;
 
-#if APPLE
-#define DEBUG_FOR_MAC 1
-#endif
-
-#if DEBUG_FOR_MAC
-  Gaudi::PluginService::SetDebug( 2 ) ;
-#endif
-
-
   // cache to keep track of the loaded factories
   std::map<key_type, std::string> loaded;
   {