diff --git a/libcorpus2_whole/document.cpp b/libcorpus2_whole/document.cpp
index 889fbf2ffbb0dde38a2bae92f12cfbb25ba9439c..6b949b349df9ea938cafd63e51cae6c72c4b8b5d 100644
--- a/libcorpus2_whole/document.cpp
+++ b/libcorpus2_whole/document.cpp
@@ -18,6 +18,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
 #include <boost/make_shared.hpp>
 
 namespace Corpus2 {
+namespace whole {
 
 Document::Document()
 	: paragraphs_(), relations_()
@@ -28,4 +29,5 @@ Document::~Document()
 {
 }
 
-} /* end ns Corpus2 */
+} // whole ns
+} // Corpus2 ns
diff --git a/libcorpus2_whole/document.h b/libcorpus2_whole/document.h
index 0401386dfc451cf8f07ed8fe31bfb5f278dc81ec..97ad4b8d480aa0e64a27b04fb3458c753cf1d452 100644
--- a/libcorpus2_whole/document.h
+++ b/libcorpus2_whole/document.h
@@ -22,6 +22,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
 #include <boost/shared_ptr.hpp>
 
 namespace Corpus2 {
+namespace whole {
 
 /**
  * A whole document, consisting of consecutive paragraphs ("chunks"), being
@@ -63,6 +64,7 @@ protected:
 	std::vector< boost::shared_ptr<Relation> > relations_;
 };
 
-} /* end ns Corpus2 */
+} // whole ns
+} // Corpus2 ns
 
 #endif // LIBCORPUS2_WHOLE_DOCUMENT_H
diff --git a/libcorpus2_whole/io/documentreader.cpp b/libcorpus2_whole/io/documentreader.cpp
index 4fba578d24e019da34d39b129e6c521400859a18..4d35ffee38e76aec35cdef23d27a9dc86fb7a5e8 100644
--- a/libcorpus2_whole/io/documentreader.cpp
+++ b/libcorpus2_whole/io/documentreader.cpp
@@ -15,9 +15,10 @@ or FITNESS FOR A PARTICULAR PURPOSE.
 */
 
 #include <boost/make_shared.hpp>
-#include <libcorpus2_whole/io/docreader.h>
+#include <libcorpus2_whole/io/documentreader.h>
 
 namespace Corpus2 {
+namespace whole {
 	DocumentReader::DocumentReader(const Tagset& tagset,
 		const std::string &annot_path, const std::string &rela_path)
 			: DocumentReaderI("document")
@@ -77,4 +78,5 @@ namespace Corpus2 {
 		return "";
 	}
 
-} /* end ns Corpus2 */
+} // whole ns
+} // Corpus2 ns
diff --git a/libcorpus2_whole/io/documentreader.h b/libcorpus2_whole/io/documentreader.h
index acbb595f84ab0d872c8345ea3b82aaf106aea677..0373c34da36b4ebc8a370ee0e5f7b30e0b554807 100644
--- a/libcorpus2_whole/io/documentreader.h
+++ b/libcorpus2_whole/io/documentreader.h
@@ -26,6 +26,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
 #include <boost/shared_ptr.hpp>
 
 namespace Corpus2 {
+namespace whole {
 
 /**
  * A reader for whole documents. Note that a whole document is read into memory
@@ -84,6 +85,8 @@ private:
 	/// Pointer to RelationReader
 	boost::shared_ptr<RelationReader> rel_reader_;
 };
-} /* end ns Corpus2 */
+
+} // whole ns
+} // Corpus2 ns
 
 #endif // LIBCORPUS2_WHOLE_DOCREADER_H
diff --git a/libcorpus2_whole/io/relreader.cpp b/libcorpus2_whole/io/relreader.cpp
index f683046072c16d4ea15c52d03f7fe6450cfa9f87..c94ac6eea32d1bb7a5a07825ea7d6cb0cae706dc 100644
--- a/libcorpus2_whole/io/relreader.cpp
+++ b/libcorpus2_whole/io/relreader.cpp
@@ -22,6 +22,8 @@ or FITNESS FOR A PARTICULAR PURPOSE.
 #include <boost/make_shared.hpp>
 
 namespace Corpus2 {
+namespace whole {
+
 RelationReader::RelationReader(const std::string &rela_path)
 	: rela_path_(rela_path)
 {
@@ -197,4 +199,5 @@ std::string RelationReader::get_attribute_value(
 	return "";
 }
 
-} /* end ns Corpus2 */
+} // whole ns
+} // Corpus2 ns
diff --git a/libcorpus2_whole/io/relreader.h b/libcorpus2_whole/io/relreader.h
index 225c0b40ae9011621af704957ab47aa111040abf..bb01e19dab5c9fce7e4eeb68b1b1cfe78a29e1f7 100644
--- a/libcorpus2_whole/io/relreader.h
+++ b/libcorpus2_whole/io/relreader.h
@@ -27,6 +27,8 @@ or FITNESS FOR A PARTICULAR PURPOSE.
 #include <iostream>
 
 namespace Corpus2 {
+namespace whole {
+
 	const static std::string RELATION_TAG = "rel";
 	const static std::string RELATIONS_TAG = "relations";
 	const static std::string RELATION_DIRECT_FROM = "from";
@@ -118,6 +120,8 @@ private:
 	boost::shared_ptr<DirectionPoint> rel_from_;
 	boost::shared_ptr<DirectionPoint> rel_to_;
 };
-} /* end ns Corpus2 */
+
+} // whole ns
+} // Corpus2 ns
 
 #endif // LIBCORPUS2_WHOLE_RELREADER_H
diff --git a/libcorpus2_whole/relation.cpp b/libcorpus2_whole/relation.cpp
index 163a1a6f5338c3025701470e5ee69c108c4624ca..d1df54f9f529ece1a6bd4446d23f64bec7785c47 100644
--- a/libcorpus2_whole/relation.cpp
+++ b/libcorpus2_whole/relation.cpp
@@ -18,6 +18,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
 #include <libcorpus2_whole/relation.h>
 
 namespace Corpus2 {
+namespace whole {
 
 Relation::Relation(const std::string& name,
 				   const boost::shared_ptr<const DirectionPoint> from,
@@ -39,4 +40,5 @@ Relation::~Relation()
 {
 }
 
-} /* end ns Corpus2 */
+} // whole ns
+} // Corpus2 ns
diff --git a/libcorpus2_whole/relation.h b/libcorpus2_whole/relation.h
index aea36809f85fd17ccf41bc7116aedb0c10ee7e80..8e8ed1d0d49baaa3d1c97312cf8711e912587691 100644
--- a/libcorpus2_whole/relation.h
+++ b/libcorpus2_whole/relation.h
@@ -21,6 +21,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
 #include <boost/shared_ptr.hpp>
 
 namespace Corpus2 {
+namespace whole {
 
 /**
  * Helper class to represent one of two point of direction in any relation.
@@ -117,6 +118,7 @@ private:
 	const boost::shared_ptr<const DirectionPoint> to_;
 };
 
-} /* end ns Corpus2 */
+} // whole ns
+} // Corpus2 ns
 
 #endif // LIBCORPUS2_RELATIONT_H