diff --git a/Core/InputOutput/IntensityDataIOFactory.cpp b/Core/InputOutput/IntensityDataIOFactory.cpp
index e91a16a4e7d3b5caad8dd4716b490ced7544878c..381598e97da6e31dfd9e72e96e183f7bebcff7ad 100644
--- a/Core/InputOutput/IntensityDataIOFactory.cpp
+++ b/Core/InputOutput/IntensityDataIOFactory.cpp
@@ -31,17 +31,12 @@ OutputData<double > *IntensityDataIOFactory::readOutputData(
     return P_reader->getOutputData();
 }
 
-IHistogram *IntensityDataIOFactory::readHistogram(const std::string &file_name)
+IHistogram *IntensityDataIOFactory::readIntensityData(const std::string &file_name)
 {
     boost::scoped_ptr<OutputData<double> > data(readOutputData(file_name));
     return IHistogram::createHistogram(*data);
 }
 
-IHistogram *IntensityDataIOFactory::readIntensityData(const std::string &file_name)
-{
-    return readHistogram(file_name);
-}
-
 
 
 /* ************************************************************************* */
@@ -54,21 +49,9 @@ void IntensityDataIOFactory::writeOutputData(const OutputData<double>& data,
     return P_writer->writeOutputData(data);
 }
 
-//void IntensityDataIOFactory::writeOutputData(const IHistogram &histogram,
-//                                                const std::string &file_name)
-//{
-//    writeHistogram(histogram, file_name);
-//}
-
-void IntensityDataIOFactory::writeHistogram(const IHistogram &histogram,
-                                                const std::string &file_name)
+void IntensityDataIOFactory::writeIntensityData(const IHistogram &histogram, const std::string &file_name)
 {
     boost::scoped_ptr<OutputData<double> > data(histogram.createOutputData());
     writeOutputData(*data, file_name);
 }
 
-void IntensityDataIOFactory::writeIntensityData(const IHistogram &histogram, const std::string &file_name)
-{
-    writeHistogram(histogram, file_name);
-}
-
diff --git a/Core/InputOutput/IntensityDataIOFactory.h b/Core/InputOutput/IntensityDataIOFactory.h
index 114a4b17e7e0ff896366662d8e8ab9503b4c21d6..5bd191e2ff574aad0f040a62044ef568cf29cb83 100644
--- a/Core/InputOutput/IntensityDataIOFactory.h
+++ b/Core/InputOutput/IntensityDataIOFactory.h
@@ -28,24 +28,39 @@ class IHistogram;
 //! @class IntensityDataIOFactory
 //! @ingroup input_output
 //! @brief Provides users with possibility to read and write IntensityData from/to files
-//! in different format.
+//! in different format. Type of the file will be deduced from file name.
+//! *.txt - ASCII file with 2D array [nrow][ncol], layout as in numpy.
+//! *.int - BornAgain internal ASCII format.
+//! *.tif - 32-bits tiff file.
+//! If file name ends woth "*.gz" or "*.bz2" the file will be zipped on the fly using
+//! appropriate algorithm.
+
+/*! Usage:
+\code{.py}
+# reading from ASCII file or g-zipped ASCII file
+histogram = IntensityDataIOFactory.readIntensityData("filename.txt")
+histogram = IntensityDataIOFactory.readIntensityData("filename.txt.gz")
+
+# writing to 32-bits tiff file or b-zipped tiff file
+IntensityDataIOFactory.writeIntensityData(histogram, "filename.tif")
+IntensityDataIOFactory.writeIntensityData(histogram, "filename.tif.bz2")
+\endcode
+*/
 
 class BA_CORE_API_ IntensityDataIOFactory
 {
 public:
+    //! Reads file and returns newly created OutputData object
     static OutputData<double > *readOutputData(const std::string& file_name);
 
-    static IHistogram *readHistogram(const std::string& file_name);
-
+    //! Reads file and returns newly created Histogram object
     static IHistogram *readIntensityData(const std::string& file_name);
 
-
+    //! Writes OutputData in file
     static void writeOutputData(const OutputData<double>& data,
             const std::string& file_name);
 
-    static void writeHistogram(const IHistogram &histogram,
-            const std::string& file_name);
-
+    //! Writes histogram in file
     static void writeIntensityData(const IHistogram &histogram,
             const std::string& file_name);
 
diff --git a/Core/InputOutput/OutputDataReadFactory.h b/Core/InputOutput/OutputDataReadFactory.h
index c27f1a9f588a25804062dd50be596190bde42704..cd62f83ef453224dd571b92449ffe2c3a240ff88 100644
--- a/Core/InputOutput/OutputDataReadFactory.h
+++ b/Core/InputOutput/OutputDataReadFactory.h
@@ -23,7 +23,7 @@
 class IOutputDataReadStrategy;
 
 //! @class OutputDataReadFactory
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Creates reader appropariate for given type of files
 
 class BA_CORE_API_ OutputDataReadFactory
diff --git a/Core/InputOutput/OutputDataReadStrategy.h b/Core/InputOutput/OutputDataReadStrategy.h
index ca05637ad68468ed10ce86b99d4e094fee5e2a25..b18368b9ca0d6748b409a634bff3290cc0257de7 100644
--- a/Core/InputOutput/OutputDataReadStrategy.h
+++ b/Core/InputOutput/OutputDataReadStrategy.h
@@ -22,7 +22,7 @@ template <class T> class OutputData;
 
 
 //! @class IOutputDataReadStrategy
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Interface for reading strategy of OutputData from file
 class BA_CORE_API_ IOutputDataReadStrategy
 {
@@ -34,7 +34,7 @@ private:
 
 
 //! @class OutputDataReadINTStrategy
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Strategy to read BornAgain native IntensityData from ASCII file
 class OutputDataReadINTStrategy : public IOutputDataReadStrategy
 {
@@ -43,7 +43,7 @@ public:
 };
 
 //! @class OutputDataReadNumpyTXTStrategy
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Strategy to read OutputData from simple ASCII file with the layout as in numpy.savetxt
 class OutputDataReadNumpyTXTStrategy : public IOutputDataReadStrategy
 {
@@ -57,7 +57,7 @@ public:
 class TiffHandler;
 
 //! @class OutputDataReadTiffStrategy
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Reads tiff files
 
 class BA_CORE_API_ OutputDataReadTiffStrategy : public IOutputDataReadStrategy
diff --git a/Core/InputOutput/OutputDataReader.h b/Core/InputOutput/OutputDataReader.h
index e07a409e68ba63523694b236853e1c5653853841..e8260dcebbc412f34380092bb8293f8ada7acb1a 100644
--- a/Core/InputOutput/OutputDataReader.h
+++ b/Core/InputOutput/OutputDataReader.h
@@ -25,7 +25,7 @@
 template <class T> class OutputData;
 
 //! @class OutputDataReader
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Reads OutputData from file using different reading strategies.
 
 class BA_CORE_API_ OutputDataReader
diff --git a/Core/InputOutput/OutputDataWriteFactory.h b/Core/InputOutput/OutputDataWriteFactory.h
index 1143d95e605a0b5096d7ee897ab438ee065fc5cb..161497fe1f33232271332ae96209378dacda9a4f 100644
--- a/Core/InputOutput/OutputDataWriteFactory.h
+++ b/Core/InputOutput/OutputDataWriteFactory.h
@@ -23,7 +23,7 @@
 class IOutputDataWriteStrategy;
 
 //! @class OutputDataWriteFactory
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Creates writer appropariate for given type of files
 
 class BA_CORE_API_ OutputDataWriteFactory
diff --git a/Core/InputOutput/OutputDataWriteStrategy.h b/Core/InputOutput/OutputDataWriteStrategy.h
index d91eead9d0c59fd9450ce52a2e5e66fa8a57511c..18fc4774b30b4170dd01c1927ca23126c14dc92b 100644
--- a/Core/InputOutput/OutputDataWriteStrategy.h
+++ b/Core/InputOutput/OutputDataWriteStrategy.h
@@ -23,7 +23,7 @@ template <class T> class OutputData;
 
 
 //! @class IOutputDataWriteStrategy
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Strategy interface to write OututData in file
 
 class BA_CORE_API_ IOutputDataWriteStrategy
@@ -38,7 +38,7 @@ protected:
 };
 
 //! @class OutputDataWriteINTStrategy
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Strategy to write OutputData to special BornAgain ASCII format
 class OutputDataWriteINTStrategy : public IOutputDataWriteStrategy
 {
@@ -47,7 +47,7 @@ public:
 };
 
 //! @class OutputDataWriteNumpyTXTStrategy
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Strategy to write OutputData to simple ASCII file with the layout as in numpy.savetxt
 class OutputDataWriteNumpyTXTStrategy : public IOutputDataWriteStrategy
 {
@@ -61,7 +61,7 @@ public:
 class TiffHandler;
 
 //! @class OutputDataWriteTiffStrategy
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Strategy to write OutputData to tiff files
 class OutputDataWriteTiffStrategy : public IOutputDataWriteStrategy
 {
diff --git a/Core/InputOutput/OutputDataWriter.h b/Core/InputOutput/OutputDataWriter.h
index 04f4a631d2c0199acb6392d64ebafbfd15afb323..ad5e180a93311bbdf0e00694c07f926917491272 100644
--- a/Core/InputOutput/OutputDataWriter.h
+++ b/Core/InputOutput/OutputDataWriter.h
@@ -24,7 +24,7 @@
 template <class T> class OutputData;
 
 //! @class OutputDataWriter
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Write OutputData to file using different witing strategies
 class BA_CORE_API_ OutputDataWriter
 {
diff --git a/Core/InputOutput/TiffHandler.h b/Core/InputOutput/TiffHandler.h
index 8b1b37bc7c1e8f44f78e3741dabbd41855d5da53..d0333dab505eddec55c73456066c7ead8e96ce0f 100644
--- a/Core/InputOutput/TiffHandler.h
+++ b/Core/InputOutput/TiffHandler.h
@@ -26,7 +26,7 @@
 #include <boost/scoped_ptr.hpp>
 
 //! @class TiffHandler
-//! @ingroup input_output
+//! @ingroup input_output_internal
 //! @brief Reads/write tiff files, should be used through TiffReadStrategy
 
 class BA_CORE_API_ TiffHandler
diff --git a/Core/PythonAPI/src/IntensityDataIOFactory.pypp.cpp b/Core/PythonAPI/src/IntensityDataIOFactory.pypp.cpp
index db22ab74cfd70701da3b768687b1c7a093082d99..68198a45f64a726f90a569b0252cd45e2618cd4a 100644
--- a/Core/PythonAPI/src/IntensityDataIOFactory.pypp.cpp
+++ b/Core/PythonAPI/src/IntensityDataIOFactory.pypp.cpp
@@ -30,19 +30,8 @@ void register_IntensityDataIOFactory_class(){
 
     { //::IntensityDataIOFactory
         typedef bp::class_< IntensityDataIOFactory > IntensityDataIOFactory_exposer_t;
-        IntensityDataIOFactory_exposer_t IntensityDataIOFactory_exposer = IntensityDataIOFactory_exposer_t( "IntensityDataIOFactory", "Provides users with possibility to read and write IntensityData from/to files in different format." );
+        IntensityDataIOFactory_exposer_t IntensityDataIOFactory_exposer = IntensityDataIOFactory_exposer_t( "IntensityDataIOFactory" );
         bp::scope IntensityDataIOFactory_scope( IntensityDataIOFactory_exposer );
-        { //::IntensityDataIOFactory::readHistogram
-        
-            typedef ::IHistogram * ( *readHistogram_function_type )( ::std::string const & );
-            
-            IntensityDataIOFactory_exposer.def( 
-                "readHistogram"
-                , readHistogram_function_type( &::IntensityDataIOFactory::readHistogram )
-                , ( bp::arg("file_name") )
-                , bp::return_value_policy< bp::manage_new_object >() );
-        
-        }
         { //::IntensityDataIOFactory::readIntensityData
         
             typedef ::IHistogram * ( *readIntensityData_function_type )( ::std::string const & );
@@ -51,7 +40,8 @@ void register_IntensityDataIOFactory_class(){
                 "readIntensityData"
                 , readIntensityData_function_type( &::IntensityDataIOFactory::readIntensityData )
                 , ( bp::arg("file_name") )
-                , bp::return_value_policy< bp::manage_new_object >() );
+                , bp::return_value_policy< bp::manage_new_object >()
+                , "Reads file and returns newly created Histogram object." );
         
         }
         { //::IntensityDataIOFactory::readOutputData
@@ -62,17 +52,8 @@ void register_IntensityDataIOFactory_class(){
                 "readOutputData"
                 , readOutputData_function_type( &::IntensityDataIOFactory::readOutputData )
                 , ( bp::arg("file_name") )
-                , bp::return_value_policy< bp::manage_new_object >() );
-        
-        }
-        { //::IntensityDataIOFactory::writeHistogram
-        
-            typedef void ( *writeHistogram_function_type )( ::IHistogram const &,::std::string const & );
-            
-            IntensityDataIOFactory_exposer.def( 
-                "writeHistogram"
-                , writeHistogram_function_type( &::IntensityDataIOFactory::writeHistogram )
-                , ( bp::arg("histogram"), bp::arg("file_name") ) );
+                , bp::return_value_policy< bp::manage_new_object >()
+                , "Reads file and returns newly created OutputData object." );
         
         }
         { //::IntensityDataIOFactory::writeIntensityData
@@ -82,7 +63,8 @@ void register_IntensityDataIOFactory_class(){
             IntensityDataIOFactory_exposer.def( 
                 "writeIntensityData"
                 , writeIntensityData_function_type( &::IntensityDataIOFactory::writeIntensityData )
-                , ( bp::arg("histogram"), bp::arg("file_name") ) );
+                , ( bp::arg("histogram"), bp::arg("file_name") )
+                , "Writes histogram in file." );
         
         }
         { //::IntensityDataIOFactory::writeOutputData
@@ -92,13 +74,12 @@ void register_IntensityDataIOFactory_class(){
             IntensityDataIOFactory_exposer.def( 
                 "writeOutputData"
                 , writeOutputData_function_type( &::IntensityDataIOFactory::writeOutputData )
-                , ( bp::arg("data"), bp::arg("file_name") ) );
+                , ( bp::arg("data"), bp::arg("file_name") )
+                , "Writes OutputData in file." );
         
         }
-        IntensityDataIOFactory_exposer.staticmethod( "readHistogram" );
         IntensityDataIOFactory_exposer.staticmethod( "readIntensityData" );
         IntensityDataIOFactory_exposer.staticmethod( "readOutputData" );
-        IntensityDataIOFactory_exposer.staticmethod( "writeHistogram" );
         IntensityDataIOFactory_exposer.staticmethod( "writeIntensityData" );
         IntensityDataIOFactory_exposer.staticmethod( "writeOutputData" );
     }
diff --git a/Doc/Doxygen/defgroups.doc b/Doc/Doxygen/defgroups.doc
index 134973e722b529adf2fab32cd9e9831ae651556e..7afb0a16c54524e68fd99e24f1533442d9983f22 100644
--- a/Doc/Doxygen/defgroups.doc
+++ b/Doc/Doxygen/defgroups.doc
@@ -51,7 +51,13 @@
 @brief Different tools.
 
 \defgroup tools_internal
-@brief More different tools.
+@brief Tools internal classes.
+
+\defgroup input_output Input and output
+@brief Various routines for input/output.
+
+\defgroup input_output_internal
+@brief Input/output internal classes.
 
 
 */
diff --git a/Doc/Doxygen/userapi.doc b/Doc/Doxygen/userapi.doc
index daf004d227dc745d29795595a5cfe0f67528ed32..7ccd006fe417fbc43d4817bb24246127356a5f67 100644
--- a/Doc/Doxygen/userapi.doc
+++ b/Doc/Doxygen/userapi.doc
@@ -18,6 +18,8 @@ List of implemented interference functions
 Additional routines
 <li> \ref tools "Tools" <BR> 
 Different tools mainly to deal with intensity data
+<li> \ref input_output "Input and output" <BR> 
+Various routines to write intensity data on disk and to import user data.
 <li> \ref fitting "Fitting" <BR> 
 Fitting routines
 </ul>
@@ -32,6 +34,7 @@ Here is a list of additional classes from internal API.
 <li> \ref interference_internal "Interference functions (internal)" 
 <li> \ref algorithms_internal "Algorithms (internal)" <BR> 
 <li> \ref tools_internal "Tools (internal)" <BR> 
+<li> \ref input_output_internal "Input/output (internal)" <BR> 
 <li> \ref fitting_internal "Fitting (internal)" <BR> 
 </ul>
 
diff --git a/Examples/python/utils/plot_intensity_data_diff.py b/Examples/python/utils/plot_intensity_data_diff.py
index 871c9daf2e48f8fd34920a6067aa043370e8014f..9cdb91b59fae97248d46081b6f0f326645044680 100644
--- a/Examples/python/utils/plot_intensity_data_diff.py
+++ b/Examples/python/utils/plot_intensity_data_diff.py
@@ -4,27 +4,27 @@
 
 import numpy
 import matplotlib
-import pylab
+from matplotlib import pyplot as plt
 from bornagain import *
 
 
 def plot_intensity_data(ref, data):
-    phi_min = rad2deg(ref.getAxis(0).getMin())
-    phi_max = rad2deg(ref.getAxis(0).getMax())
-    alpha_min = rad2deg(ref.getAxis(1).getMin())
-    alpha_max = rad2deg(ref.getAxis(1).getMax())
-    im = pylab.imshow(numpy.rot90(data, 1), norm=matplotlib.colors.LogNorm(),
-                      extent=[phi_min, phi_max, alpha_min, alpha_max])
-    cb = pylab.colorbar(im)
+    im = plt.imshow(data,
+                    norm=matplotlib.colors.LogNorm(),
+                    extent=[ref.getXmin()/deg, ref.getXmax()/deg, ref.getYmin()/deg, ref.getYmax()/deg],
+                    aspect='auto')
+
+    cb = plt.colorbar(im)
     cb.set_label(r'Intensity (arb. u.)', size=16)
-    pylab.xlabel(r'$\phi_f (^{\circ})$', fontsize=16)
-    pylab.ylabel(r'$\alpha_f (^{\circ})$', fontsize=16)
-    pylab.show()
+    plt.xlabel(r'$\phi_f (^{\circ})$', fontsize=16)
+    plt.ylabel(r'$\alpha_f (^{\circ})$', fontsize=16)
+    plt.show()
 
 
 if __name__ == '__main__':
     if len(sys.argv)!=3:
         exit("Usage: python plot_intensity_data_diff.py intensity_reference.int.gz intensity_other.int.gz")
+    print "xxx"
     intensity_ref = IntensityDataIOFactory.readIntensityData(sys.argv[1])
     intensity_other = IntensityDataIOFactory.readIntensityData(sys.argv[2])
     data = numpy.abs((intensity_ref.getArray() - intensity_other.getArray())/intensity_ref.getArray())
diff --git a/dev-tools/python-bindings/settings_core.py b/dev-tools/python-bindings/settings_core.py
index 1e4ea74184d9b8ae9d9c25d86bb2b044bb390533..319a0650af2ffc3e364cdd5b856e73d4034275c9 100644
--- a/dev-tools/python-bindings/settings_core.py
+++ b/dev-tools/python-bindings/settings_core.py
@@ -410,7 +410,7 @@ def ManualClassTunings(mb):
     cl = mb.class_("IntensityDataIOFactory")
 
     cl.member_function("readOutputData").call_policies = call_policies.return_value_policy(call_policies.manage_new_object)
-    cl.member_function("readHistogram").call_policies = call_policies.return_value_policy(call_policies.manage_new_object)
+    # cl.member_function("readHistogram").call_policies = call_policies.return_value_policy(call_policies.manage_new_object)
     cl.member_function("readIntensityData").call_policies = call_policies.return_value_policy(call_policies.manage_new_object)