diff --git a/src/Makefile.am b/src/Makefile.am
index 004eeba8073d907ac39ef6899744590225e53a85..31a09732ce8c147b2a2aec0919c32cb8a227a843 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -72,5 +72,7 @@ endif
 
 
 
-TESTS = tnl-unit-tests \
-        tnl-benchmarks
\ No newline at end of file
+TESTS = tnl-unit-tests 
+
+##tnl-unit-tests \
+##        tnl-benchmarks
\ No newline at end of file
diff --git a/src/core/tnl-cuda-kernels.h b/src/core/tnl-cuda-kernels.h
index 9b5bbc2ed006421ff8843d5075acc22436b7740b..75b97d750751b2e2af4979876c20d593978de5be 100644
--- a/src/core/tnl-cuda-kernels.h
+++ b/src/core/tnl-cuda-kernels.h
@@ -403,7 +403,7 @@ bool tnlCUDAReduction( const int size,
    if( ! deviceAux )
    {
       int sizeAlloc = :: Max( 1, size / desBlockSize );
-      if( ! deviceAuxVct. SetNewSize( sizeAlloc ) )
+      if( ! deviceAuxVct. setNewSize( sizeAlloc ) )
          return false;
       deviceAux = deviceAuxVct. Data();
    }
@@ -648,7 +648,7 @@ bool tnlCUDASimpleReduction5( const int size,
    if( ! deviceAux )
    {
       int sizeAlloc = :: Max( 1, size / desBlockSize );
-      if( ! deviceAuxVct. SetNewSize( sizeAlloc ) )
+      if( ! deviceAuxVct. setNewSize( sizeAlloc ) )
          return false;
       deviceAux = deviceAuxVct. Data();
    }
@@ -874,7 +874,7 @@ bool tnlCUDASimpleReduction4( const int size,
    if( ! deviceAux )
    {
       int sizeAlloc = :: Max( 1, size / desBlockSize );
-      if( ! deviceAuxVct. SetNewSize( sizeAlloc ) )
+      if( ! deviceAuxVct. setNewSize( sizeAlloc ) )
          return false;
       deviceAux = deviceAuxVct. Data();
    }
@@ -1085,7 +1085,7 @@ bool tnlCUDASimpleReduction3( const int size,
    if( ! deviceAux )
    {
       int sizeAlloc = :: Max( 1, size / desBlockSize );
-      if( ! deviceAuxVct. SetNewSize( sizeAlloc ) )
+      if( ! deviceAuxVct. setNewSize( sizeAlloc ) )
          return false;
       deviceAux = deviceAuxVct. Data();
    }
@@ -1261,7 +1261,7 @@ bool tnlCUDASimpleReduction2( const int size,
    if( ! deviceAux )
    {
       int sizeAlloc = :: Max( 1, size / desBlockSize );
-      if( ! deviceAuxVct. SetNewSize( sizeAlloc ) )
+      if( ! deviceAuxVct. setNewSize( sizeAlloc ) )
          return false;
       deviceAux = deviceAuxVct. Data();
    }
@@ -1420,7 +1420,7 @@ bool tnlCUDASimpleReduction1( const int size,
    if( ! deviceAux )
    {
       int sizeAlloc = :: Max( 1, size / desBlockSize );
-      if( ! deviceAuxVct. SetNewSize( sizeAlloc ) )
+      if( ! deviceAuxVct. setNewSize( sizeAlloc ) )
          return false;
       deviceAux = deviceAuxVct. Data();
    }
diff --git a/src/core/tnlCUDAKernelsTester.h b/src/core/tnlCUDAKernelsTester.h
index 10e871a6986c19294705aca3a3a79002ff83cb7f..b70f8598c0c1e2198a3f8fc6ae4245a1572eb87b 100644
--- a/src/core/tnlCUDAKernelsTester.h
+++ b/src/core/tnlCUDAKernelsTester.h
@@ -106,7 +106,7 @@ template< class T > class tnlCUDAKernelsTester : public CppUnit :: TestCase
    {
       const int size = host_input. GetSize();
       tnlLongVectorCUDA< T > device_input;
-      if( ! device_input. SetNewSize( size ) )
+      if( ! device_input. setNewSize( size ) )
          return false;
       device_input. copyFrom( host_input );
 
diff --git a/src/core/tnlFieldCUDA2D.h b/src/core/tnlFieldCUDA2D.h
index c008a0498730dde24c4c73a7a12610cac4d52bbe..16ce0b6780747537ac02f9e91cda5f849a51c2fe 100644
--- a/src/core/tnlFieldCUDA2D.h
+++ b/src/core/tnlFieldCUDA2D.h
@@ -70,7 +70,7 @@ template< class T > class tnlFieldCUDA2D : public tnlLongVectorCUDA< T >
    {
       x_size = new_x_size;
       y_size = new_y_size;
-      return tnlLongVectorCUDA< T > :: SetNewSize( x_size * y_size );
+      return tnlLongVectorCUDA< T > :: setNewSize( x_size * y_size );
    };
 
    bool SetNewDimensions( const tnlFieldCUDA2D< T >& f )
@@ -78,6 +78,11 @@ template< class T > class tnlFieldCUDA2D : public tnlLongVectorCUDA< T >
       return SetNewDimensions( f. GetXSize(), f. GetYSize() );
    };
 
+   bool SetNewDimensions( const tnlField2D< T >& f )
+   {
+	   return SetNewDimensions( f. GetXSize(), f. GetYSize() );
+   };
+
    void SetSharedData( T* _data, const int _x_size, const int _y_size )
    {
       tnlLongVectorCUDA< T > :: SetSharedData( _data, _x_size * _y_size );
diff --git a/src/core/tnlLongVectorCUDA.h b/src/core/tnlLongVectorCUDA.h
index bd1adcbeac10a591b78d38f7b9f52361d6389f22..989c3264c1c862de945d190a612233c238d635b5 100644
--- a/src/core/tnlLongVectorCUDA.h
+++ b/src/core/tnlLongVectorCUDA.h
@@ -44,6 +44,7 @@ using namespace std;
 #include <core/tnlObject.h>
 #include <core/param-types.h>
 #include <core/tnlLongVector.h>
+#include <debug/tnlDebug.h>
 
 template< class T > class tnlLongVectorCUDA : public tnlObject
 {
@@ -51,17 +52,9 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
    //! Constructor with given size
    tnlLongVectorCUDA( const char* name = 0, int _size = 0 )
 #ifdef HAVE_CUDA
-    : tnlObject( name ), size( _size ), data( NULL ), shared_data( false )
+    : tnlObject( name ), size( 0 ), data( NULL ), shared_data( false )
    {
-      if( size && cudaMalloc( ( void** ) &data, ( size ) * sizeof( T ) ) != cudaSuccess  )
-      {
-         cerr << "Unable to allocate new long vector '" << GetName() << "' with size "
-              << size << " on CUDA device for "
-              << GetName() << "." << endl;
-         data = NULL;
-         abort();
-      }
-      //data ++;
+      if( _size ) setNewSize( _size );
    };
 #else
    {
@@ -72,16 +65,10 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
    //! Constructor with another long vector as template
    tnlLongVectorCUDA( const tnlLongVectorCUDA& v )
 #ifdef HAVE_CUDA
-    : tnlObject( v ), size( v. size ), data( NULL ), shared_data( false )
+    : tnlObject( v ), size( 0 ), data( NULL ), shared_data( false )
    {
-	  if( size )
-		  if( cudaMalloc( ( void** ) &data, size * sizeof( T ) ) != cudaSuccess )
-		  {
-			  cerr << "Unable to allocate new long vector '" << GetName() << "' with size " << size << " on CUDA device." << endl;
-			  data = NULL;
-			  abort();
-		  }
-      //data ++;
+	  if( v. GetSize() )
+		  setNewSize( v. size );
    };
 #else
    {
@@ -92,15 +79,9 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
    //! Constructor with another long vector as template
    tnlLongVectorCUDA( const tnlLongVector< T >& v )
 #ifdef HAVE_CUDA
-    : tnlObject( v ), size( v. GetSize() ), data( NULL ), shared_data( false )
+    : tnlObject( v ), size( 0 ), data( NULL ), shared_data( false )
    {
-      if( size && cudaMalloc( ( void** ) &data, size * sizeof( T ) ) != cudaSuccess )
-      {
-         cerr << "Unable to allocate new long vector with size " << size << " on CUDA device." << endl;
-         data = NULL;
-         abort();
-      }
-      //data ++;
+	   if( v. GetSize() ) setNewSize( v. GetSize() );
    };
 #else
    {
@@ -116,19 +97,21 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
    }
 
 
-   bool SetNewSize( int _size )
+   bool setNewSize( int _size )
 #ifdef HAVE_CUDA
    {
-      if( debug )
-	   cout << "Setting new size to " << _size << " for " << GetName() << endl;
+	  dbgFunctionName( "tnlLongVectorCUDA", "setNewSize" );
+      dbgCout( "Setting new size to " << _size << " for " << GetName() );
       if( size == _size ) return true;
       if( data && ! shared_data )
       {
+    	 dbgCout( "Freeing allocated memory on CUDA device of " << GetName() );
          cudaFree( data );
          data = NULL;
       }
       size = _size;
       shared_data = false;
+      cerr << "###########" << endl;
       if( cudaMalloc( ( void** ) &data, size * sizeof( T ) ) != cudaSuccess )
       {
          cerr << "Unable to allocate new long vector with size "
@@ -147,9 +130,14 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
    };
 #endif
 
-   bool SetNewSize( const tnlLongVectorCUDA< T >& v )
+   bool setNewSize( const tnlLongVectorCUDA< T >& v )
    {
-      return SetNewSize( v. GetSize() );
+      return setNewSize( v. GetSize() );
+   };
+
+   bool setNewSize( const tnlLongVector< T >& v )
+   {
+	   return setNewSize( v. GetSize() );
    };
 
    void SetSharedData( T* _data, const int _size )
@@ -239,11 +227,11 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
    virtual
    ~tnlLongVectorCUDA()
    {
+	   dbgFunctionName( "tnlLongVectorCUDA", "~tnlLOngVectorCUDA" );
 #ifdef HAVE_CUDA
       if( data && ! shared_data )
       {
-         if( debug )
-            cout << "Freeing allocated memory of " << GetName() << " on CUDA device." << endl;
+         dbgCout( "Freeing allocated memory of " << GetName() << " on CUDA device." );
          if( cudaFree( data ) != cudaSuccess )
          {
             cerr << "Unable to free alocated memory on CUDA device of " << GetName() << "." << endl;
@@ -254,11 +242,6 @@ template< class T > class tnlLongVectorCUDA : public tnlObject
 #endif
    };
 
-   static void setDebug( bool _debug )
-   {
-      debug = _debug;
-   };
-
    private:
 
    int size;
@@ -290,6 +273,4 @@ template< class T > bool tnlLongVector< T > :: copyFrom( const tnlLongVectorCUDA
 
 }
 
-template< class T > bool tnlLongVectorCUDA< T > :: debug;
-
 #endif /* TNLLONGVECTORCUDA_H_ */
diff --git a/src/core/tnlLongVectorCUDATester.h b/src/core/tnlLongVectorCUDATester.h
index 0f3e100d0b8dfdd88d5b1c5b452907752a993195..885a53331e470a6a4dbae14cf6f7b4a37a5c35dd 100644
--- a/src/core/tnlLongVectorCUDATester.h
+++ b/src/core/tnlLongVectorCUDATester.h
@@ -25,6 +25,7 @@
 #include <cppunit/TestResult.h>
 #include <cppunit/TestCaller.h>
 #include <cppunit/TestCase.h>
+#include <cppunit/Message.h>
 #include <core/tnlLongVectorCUDA.h>
 #include <core/tnlLongVector.h>
 
@@ -164,13 +165,14 @@ template< class T > class tnlLongVectorCUDATester : public CppUnit :: TestCase
       tnlLongVectorCUDA< T > cuda_vector_1;
       CPPUNIT_ASSERT( !cuda_vector_1 );
  
-      cuda_vector_1. SetNewSize( 100 );
+      cuda_vector_1. setNewSize( 100 );
+
       CPPUNIT_ASSERT( cuda_vector_1 );
       CPPUNIT_ASSERT( cuda_vector_1. GetSize() == 100 );
 
       tnlLongVectorCUDA< T > cuda_vector_2;
       CPPUNIT_ASSERT( !cuda_vector_2 );
-      cuda_vector_2. SetNewSize( cuda_vector_1 );
+      cuda_vector_2. setNewSize( cuda_vector_1 );
       CPPUNIT_ASSERT( cuda_vector_2. GetSize() == 100 );
 
       tnlLongVectorCUDA< T > cuda_vector_3( "cuda-vector", 100 );
diff --git a/src/core/tnlObject.cpp b/src/core/tnlObject.cpp
index ca49633088c8f958342d4bf72b49aadda2857d72..af114326eaade8629dbe26d8d5c9c3b2f43436af 100644
--- a/src/core/tnlObject.cpp
+++ b/src/core/tnlObject.cpp
@@ -25,7 +25,6 @@
 
 const char magic_number[] = "SIM33";
 
-bool tnlObject :: debug = false;
 //--------------------------------------------------------------------------
 tnlObject :: tnlObject( )
 {
@@ -33,9 +32,9 @@ tnlObject :: tnlObject( )
 //--------------------------------------------------------------------------
 tnlObject :: tnlObject( const char* name )
 {
+   dbgFunctionName( "tnlObject", "tnlObject" );
+   dbgCout( "Initiating object " << GetName() );
    SetName( name );
-   if( debug )
-      cout << "Initiating object " << GetName() << endl;
 }
 //--------------------------------------------------------------------------
 tnlObject :: tnlObject( const tnlObject& object )
@@ -85,11 +84,6 @@ bool tnlObject :: Load( istream& file )
    return true;
 }
 //--------------------------------------------------------------------------
-void tnlObject :: setDebug( bool _debug )
-{
-   debug = _debug;
-}
-//--------------------------------------------------------------------------
 bool GetObjectType( istream& file, tnlString& type )
 {
    dbgFunctionName( "", "GetObjectType" );
diff --git a/src/core/tnlObject.h b/src/core/tnlObject.h
index 6c91c5e6be00dcdb7043ccf137fb844397856574..3378f613d317d5e1a11b52ba9bf0b6cc27e9f0d6 100644
--- a/src/core/tnlObject.h
+++ b/src/core/tnlObject.h
@@ -59,9 +59,6 @@ class tnlObject
    //! Method for restoring the object from a file
    virtual bool Load( istream& file );   
 
-   //! Debug moder setter
-   static void setDebug( bool );
-
    //! Destructor
    virtual ~tnlObject(){};
 
@@ -69,10 +66,6 @@ class tnlObject
 
    //! Object name
    tnlString name;
-
-   //! Turns on debuging messages
-   static bool debug;
-
 };
 
 bool GetObjectType( istream& file, tnlString& type );
diff --git a/src/tnl-benchmarks.h b/src/tnl-benchmarks.h
index 07213972ce9cf58a27efd3921a7b9d3aee0c2d5f..b9b4a467a7eb015aa1ff302be33d77f7a2115b09 100644
--- a/src/tnl-benchmarks.h
+++ b/src/tnl-benchmarks.h
@@ -28,10 +28,10 @@ bool transferBenchmark( const int size,
                         double& device_to_device_band_width )
 {
 
-  tnlLongVector< T > host_vector( size );
-  tnlLongVector< T > host_vector2( size );
-  tnlLongVectorCUDA< T > device_vector( size );
-  tnlLongVectorCUDA< T > device_vector2( size );
+  tnlLongVector< T > host_vector( "transferBenchmark:host-vector", size );
+  tnlLongVector< T > host_vector2( "transferBenchmark:host-vector-2", size );
+  tnlLongVectorCUDA< T > device_vector( "transferBenchmark:device-vector", size );
+  tnlLongVectorCUDA< T > device_vector2( "transferBenchmark:device-vector-2", size );
 
    for( int i = 0; i < size; i ++ )
       host_vector[ i ] = i + 1;
@@ -122,9 +122,9 @@ template< class T >
 void reductionBenchmark( const int size,
                          const int algorithm )
 {
-   tnlLongVector< T > host_vector( size );
-   tnlLongVectorCUDA< T > device_vector( size );
-   tnlLongVectorCUDA< T > device_aux( size / 2 );
+   tnlLongVector< T > host_vector( "reductionBenchmark:host-vector", size );
+   tnlLongVectorCUDA< T > device_vector( "reductionBenchmark:device-vector", size );
+   tnlLongVectorCUDA< T > device_aux( "reductionBenchmark:device-aux", size / 2 );
 
    for( int i = 0; i < size; i ++ )
       host_vector[ i ] = i + 1;