diff --git a/include/dynamic-graph/factory.h b/include/dynamic-graph/factory.h
index 760a73a263331b9e79ef7c3abc6d20e0a39fdf59..5c2e19233c01454c1f61ace19810a46b8540c679 100644
--- a/include/dynamic-graph/factory.h
+++ b/include/dynamic-graph/factory.h
@@ -75,8 +75,6 @@ class DYNAMIC_GRAPH_DLLAPI FactoryStorage
   void listEntities(std::vector <std::string>& outList);
   void  commandLine( const std::string& cmdLine,std::istringstream& cmdArgs,
 		     std::ostream& os );
-
-
 };
 
 DYNAMIC_GRAPH_DLLAPI extern FactoryStorage g_factory;
@@ -104,25 +102,26 @@ class DYNAMIC_GRAPH_DLLAPI EntityRegisterer
 
   ~EntityRegisterer( void );
 };
+}  // namespace dynamicgraph
 
 /*! This macro should be used to automatically register an entity
  * of classType to the g_factory. It is then possible to create it
  * with the g_factory.
  */
-#define DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(classType,className)		\
+#define DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(classType, className)	\
   const std::string classType::CLASS_NAME = className;			\
   extern "C" {								\
-    Entity *EntityMaker##_##classType( const std::string& objname )	\
+    ::dynamicgraph::Entity*						\
+    EntityMaker##_##classType(const std::string& objname)		\
     {									\
-      return new classType( objname );					\
+      return new classType (objname);					\
     }									\
-    EntityRegisterer reg##_##classType( className,			\
-					&EntityMaker##_##classType );   \
+    ::dynamicgraph::EntityRegisterer					\
+    reg##_##classType (className,					\
+		       &EntityMaker##_##classType);			\
   }									\
   struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
 
-}  // namespace dynamicgraph
-
 #endif /* #ifndef __FACTORY_HH__ */