diff --git a/DDSurfaces/include/DDSurfaces/IMaterial.h b/DDSurfaces/include/DDSurfaces/IMaterial.h
index dcae15e1520dfb8af9a1567e87a826dd0853576b..7bd5d47c9238f1b72e7276e02fcaf2e5c71b04de 100644
--- a/DDSurfaces/include/DDSurfaces/IMaterial.h
+++ b/DDSurfaces/include/DDSurfaces/IMaterial.h
@@ -38,7 +38,7 @@ namespace DDSurfaces {
   };
 
  /// dump IMaterial operator 
-  std::ostream& operator<<( std::ostream& os , const IMaterial& m ) {
+  inline std::ostream& operator<<( std::ostream& os , const IMaterial& m ) {
 
     os << "  " << m.name() << ", Z: " << m.Z() << ", A: " << m.A() << ", densitiy: " << m.density() << ", radiationLength: " <<  m.radiationLength() 
        << ", interactionLength: " << m.interactionLength() ;
diff --git a/DDSurfaces/include/DDSurfaces/ISurface.h b/DDSurfaces/include/DDSurfaces/ISurface.h
index 68f9c482f77c9aab26d03b50c415ab87836c53e9..d9193014f68b9f9370d3db934f206f11d5b3fa04 100644
--- a/DDSurfaces/include/DDSurfaces/ISurface.h
+++ b/DDSurfaces/include/DDSurfaces/ISurface.h
@@ -11,6 +11,8 @@ namespace DDSurfaces {
   
   struct SurfaceType ;
 
+  typedef long long int long64 ;
+
  /** Interface for tracking surfaces. 
    * The surface provides access to vectors for u,v,n and the orgigin and
    * the inner and outer materials with corresponding thicknesses.
@@ -28,6 +30,9 @@ namespace DDSurfaces {
     /// properties of the surface encoded in Type.
     virtual const SurfaceType& type() const =0 ;
     
+    /// The id of this surface - corresponds to DetElement id ( or'ed with the placement ids )
+    virtual long64 id() const =0 ;
+
     /// Checks if the given point lies within the surface
     virtual bool insideBounds(const Vector3D& point, double epsilon=1.e-4) const =0 ;
     
@@ -178,7 +183,7 @@ namespace DDSurfaces {
   } ;
 
   /// dump SurfaceType operator 
-  std::ostream& operator<<( std::ostream& os , const SurfaceType& t ) {
+  inline std::ostream& operator<<( std::ostream& os , const SurfaceType& t ) {
 
     os << "sensitive[" << t.isSensitive() << "] helper[" << t.isHelper() << "] plane[" << t.isPlane()  << "] cylinder[" << t.isCylinder()  
        << "] parallelToZ[" << t.isParallelToZ()  << "] orthogonalToZ[" << t. isOrthogonalToZ()  << "] zCylinder[" << t.isZCylinder() 
@@ -190,9 +195,9 @@ namespace DDSurfaces {
 
 
   /// dump ISurface operator 
-  std::ostream& operator<<( std::ostream& os , const ISurface& s ) {
+  inline std::ostream& operator<<( std::ostream& os , const ISurface& s ) {
     
-    os <<  "   type : " << s.type() << std::endl  
+    os <<  "   id: " << s.id() << " type : " << s.type() << std::endl  
        <<  "   u : " << s.u() << " v : " << s.v() << " normal : " << s.normal() << " origin : " << s.origin() << std::endl   ;
     os <<  "   inner material : " << s.innerMaterial() << std::endl  
        <<  "   outerMaterial :  " << s.outerMaterial() << std::endl   ;
diff --git a/DDSurfaces/include/DDSurfaces/Vector3D.h b/DDSurfaces/include/DDSurfaces/Vector3D.h
index cd4f8bf25471ac3d89a5e63985013304e933d99e..0e3e4ab74779962455271cf9c3d4701639b325aa 100644
--- a/DDSurfaces/include/DDSurfaces/Vector3D.h
+++ b/DDSurfaces/include/DDSurfaces/Vector3D.h
@@ -287,7 +287,7 @@ namespace DDSurfaces {
   
   
   /** Output operator */
-  std::ostream & operator << (std::ostream & os, const Vector3D &v) {
+  inline std::ostream & operator << (std::ostream & os, const Vector3D &v) {
 
     os << "( " << v[0] << ", " << v[1] << ", " << v[2] << " )" ;