diff --git a/BaseLib/DateTools.cpp b/BaseLib/DateTools.cpp
index 275696f798f22218d2993a07b09569f820d64e2b..d2850d556848069e842d6081c4b97a19c5119ca6 100644
--- a/BaseLib/DateTools.cpp
+++ b/BaseLib/DateTools.cpp
@@ -71,13 +71,13 @@ std::string date2string(double ddate)
 	if (d < 1 || d > 31)
 		std::cout << "Warning: date2String() -- day not in [1:31]" << std::endl;
 
-	std::string day = number2str(d);
+	std::string day = BaseLib::number2str(d);
 	if (d < 10)
 		day = "0" + day;
-	std::string month = number2str(m);
+	std::string month = BaseLib::number2str(m);
 	if (m < 10)
 		month = "0" + month;
-	std::string s =  number2str(y) + "-" + month + "-" + day;
+	std::string s =  BaseLib::number2str(y) + "-" + month + "-" + day;
 	return s;
 }
 
diff --git a/BaseLib/StringTools.cpp b/BaseLib/StringTools.cpp
index 709b1645c3591e3f7b75c9f4473946a69bf4a727..63b2d79a49535ef766843a7993ef0cb9e364db1a 100644
--- a/BaseLib/StringTools.cpp
+++ b/BaseLib/StringTools.cpp
@@ -12,6 +12,8 @@
 
 #include "StringTools.h"
 
+namespace BaseLib {
+
 std::list<std::string> splitString(const std::string &str, char delim)
 {
 	std::list<std::string> strList;
@@ -47,8 +49,6 @@ void trim(std::string &str, char ch)
   else str.erase(str.begin(), str.end());
 }
 
-namespace BaseLib {
-
 std::string getFileNameFromPath(const std::string &str, bool with_extension)
 {
 	std::string::size_type beg1 = str.find_last_of('/');
diff --git a/BaseLib/StringTools.h b/BaseLib/StringTools.h
index 3f11c0fbbf224cfd5139d7651de5dfc253a98dce..89af747bba5b114e2aa7eb2d767c4ca35d86e908 100644
--- a/BaseLib/StringTools.h
+++ b/BaseLib/StringTools.h
@@ -20,6 +20,7 @@
 #include <iostream>
 #include <ctype.h>
 
+namespace BaseLib {
 
 /**
  *   Splits a string into a list of strings.
@@ -69,8 +70,6 @@ template<typename T> T str2number (const std::string &str)
  */
 void trim(std::string &str, char ch=' ');
 
-namespace BaseLib {
-
 /**
  * Extract the filename from a path
  */
diff --git a/FileIO/GMSInterface.cpp b/FileIO/GMSInterface.cpp
index 727d12feb06ab06cb8f2e4d0ba166ff83bd125b0..47178575c90620d4528df94162d32c44d4f12baf 100644
--- a/FileIO/GMSInterface.cpp
+++ b/FileIO/GMSInterface.cpp
@@ -42,7 +42,7 @@ int GMSInterface::readBoreholesFromGMS(std::vector<GeoLib::Point*>* boreholes,
 	/* read all stations */
 	while ( getline(in, line) )
 	{
-		std::list<std::string> fields = splitString(line, '\t');
+		std::list<std::string> fields = BaseLib::splitString(line, '\t');
 
 		if (fields.size() >= 5)
 		{
@@ -222,7 +222,7 @@ std::vector<std::string> GMSInterface::readSoilIDfromFile(const std::string &fil
 	if (in.is_open())
 		while ( getline(in, line) )
 		{
-			trim(line);
+			BaseLib::trim(line);
 			soilID.push_back(line);
 		}
 	in.close();
diff --git a/FileIO/Gmsh2GeoIO.cpp b/FileIO/Gmsh2GeoIO.cpp
index 1e72c76dbe301e289bb8b861c4a340799f10682f..0f00fccbad2d622392df9a988659582606c9cf6f 100644
--- a/FileIO/Gmsh2GeoIO.cpp
+++ b/FileIO/Gmsh2GeoIO.cpp
@@ -40,7 +40,7 @@ void Gmsh2GeoIO::loadMeshAsGeometry (std::string & fname, GeoLib::GEOObjects* ge
 	getline (ins, line);
 	// read number of nodes
 	getline (ins, line);
-	const size_t n_pnts (str2number<size_t>(line));
+	const size_t n_pnts (BaseLib::str2number<size_t>(line));
 	std::vector<GeoLib::Point*>* pnts (new std::vector<GeoLib::Point*>);
 	for (size_t k(0); k < n_pnts; k++)
 	{
@@ -52,15 +52,15 @@ void Gmsh2GeoIO::loadMeshAsGeometry (std::string & fname, GeoLib::GEOObjects* ge
 		// parse x coordinate
 		pos_beg = pos_end + 1;
 		pos_end = line.find(" ", pos_beg);
-		double x (str2number<double>(line.substr(pos_beg, pos_end - pos_beg)));
+		double x (BaseLib::str2number<double>(line.substr(pos_beg, pos_end - pos_beg)));
 		// parse y coordinate
 		pos_beg = pos_end + 1;
 		pos_end = line.find(" ", pos_beg);
-		double y (str2number<double>(line.substr(pos_beg, pos_end - pos_beg)));
+		double y (BaseLib::str2number<double>(line.substr(pos_beg, pos_end - pos_beg)));
 		// parse z coordinate
 		pos_beg = pos_end + 1;
 		pos_end = line.find("\n", pos_beg);
-		double z (str2number<double>(line.substr(pos_beg, pos_end - pos_beg)));
+		double z (BaseLib::str2number<double>(line.substr(pos_beg, pos_end - pos_beg)));
 
 		pnts->push_back (new GeoLib::Point (x,y,z));
 	}
@@ -74,7 +74,7 @@ void Gmsh2GeoIO::loadMeshAsGeometry (std::string & fname, GeoLib::GEOObjects* ge
 	getline (ins, line);
 	// read number of elements
 	getline (ins, line);
-	const size_t n_elements (str2number<size_t>(line));
+	const size_t n_elements (BaseLib::str2number<size_t>(line));
 	GeoLib::Surface* sfc (new GeoLib::Surface (*pnts));
 	for (size_t k(0); k < n_elements; k++)
 	{
@@ -86,12 +86,12 @@ void Gmsh2GeoIO::loadMeshAsGeometry (std::string & fname, GeoLib::GEOObjects* ge
 		// parse element type
 		pos_beg = pos_end + 1;
 		pos_end = line.find(" ", pos_beg);
-		size_t ele_type (str2number<size_t>(line.substr(pos_beg, pos_end - pos_beg)));
+		size_t ele_type (BaseLib::str2number<size_t>(line.substr(pos_beg, pos_end - pos_beg)));
 		if (ele_type == 2) // read 3 node triangle
 		{ // parse number of tags
 			pos_beg = pos_end + 1;
 			pos_end = line.find(" ", pos_beg);
-			const size_t n_tags (str2number<size_t>(line.substr(pos_beg,
+			const size_t n_tags (BaseLib::str2number<size_t>(line.substr(pos_beg,
 			                                                    pos_end - pos_beg)));
 			// (over) read tags
 			for (size_t j(0); j < n_tags; j++)
@@ -102,17 +102,17 @@ void Gmsh2GeoIO::loadMeshAsGeometry (std::string & fname, GeoLib::GEOObjects* ge
 			// parse first id of triangle
 			pos_beg = pos_end + 1;
 			pos_end = line.find(" ", pos_beg);
-			const size_t id0 (str2number<size_t>(line.substr(pos_beg,
+			const size_t id0 (BaseLib::str2number<size_t>(line.substr(pos_beg,
 			                                                 pos_end - pos_beg)) - 1); // shift -1!
 			// parse second id of triangle
 			pos_beg = pos_end + 1;
 			pos_end = line.find(" ", pos_beg);
-			const size_t id1 (str2number<size_t>(line.substr(pos_beg,
+			const size_t id1 (BaseLib::str2number<size_t>(line.substr(pos_beg,
 			                                                 pos_end - pos_beg)) - 1); // shift -1!
 			// parse third id of triangle
 			pos_beg = pos_end + 1;
 			pos_end = line.find(" ", pos_beg);
-			const size_t id2 (str2number<size_t>(line.substr(pos_beg,
+			const size_t id2 (BaseLib::str2number<size_t>(line.substr(pos_beg,
 			                                                 pos_end - pos_beg)) - 1); // shift -1!
 			sfc->addTriangle (pnt_id_map[id0], pnt_id_map[id1], pnt_id_map[id2]);
 		}
diff --git a/FileIO/Legacy/MeshIO.cpp b/FileIO/Legacy/MeshIO.cpp
index 2a1c6b420cd3e1e16313884b02de27b2ffa4bf33..55a93e851cc6d1283bc2d460c520d7ae36119926 100644
--- a/FileIO/Legacy/MeshIO.cpp
+++ b/FileIO/Legacy/MeshIO.cpp
@@ -66,7 +66,7 @@ MeshLib::Mesh* MeshIO::loadMeshFromFile(const std::string& file_name)
 				double x, y, z, double_dummy;
 				unsigned idx;
 				getline(in, line_string);
-				trim(line_string);
+				BaseLib::trim(line_string);
 				unsigned nNodes = atoi(line_string.c_str());
 				std::string s;
 				for (unsigned i = 0; i < nNodes; i++)
@@ -84,7 +84,7 @@ MeshLib::Mesh* MeshIO::loadMeshFromFile(const std::string& file_name)
 			else if (line_string.find("$ELEMENTS") != std::string::npos)
 			{
 				getline(in, line_string);
-				trim(line_string);
+				BaseLib::trim(line_string);
 				unsigned nElements = atoi(line_string.c_str());
 				for (unsigned i = 0; i < nElements; i++)
 				{
diff --git a/FileIO/Legacy/OGSIOVer4.cpp b/FileIO/Legacy/OGSIOVer4.cpp
index 85191ba7f200022f4e1ff4a0c4846bbfc3514fca..47e65d3f293496cd002544f2b266b901e593406c 100644
--- a/FileIO/Legacy/OGSIOVer4.cpp
+++ b/FileIO/Legacy/OGSIOVer4.cpp
@@ -193,7 +193,7 @@ std::string readPolyline(std::istream &in,
 				        ==
 				        std::string::npos))
 				{
-					size_t pnt_id(str2number<size_t> (line));
+					size_t pnt_id(BaseLib::str2number<size_t> (line));
 					if (!zero_based_indexing)
 						pnt_id--;  // one based indexing
 					size_t ply_size (ply->getNumberOfPoints());
@@ -757,7 +757,7 @@ void writeAllDataToGLIFileV4 (const std::string& fname, const GeoLib::GEOObjects
 						os << "\t$NAME " << std::endl << "\t\t" << sfc_name << std::endl;
 					} else {
 						os << "\t$NAME " << std::endl << "\t\t" << sfcs_cnt << std::endl;
-						sfc_name += number2str (sfcs_cnt);
+						sfc_name += BaseLib::number2str (sfcs_cnt);
 					}
 					sfc_name += ".tin";
 					os << "\t$TIN" << std::endl;
diff --git a/FileIO/MeshIO/TetGenInterface.cpp b/FileIO/MeshIO/TetGenInterface.cpp
index 585cc74cc9c6132e7f109bffb5a87a6baa7c8e21..d3104df588ee1e1c0b65e929016d60b02f32921b 100644
--- a/FileIO/MeshIO/TetGenInterface.cpp
+++ b/FileIO/MeshIO/TetGenInterface.cpp
@@ -122,7 +122,7 @@ bool TetGenInterface::parseNodesFileHeader(std::string &line,
 	pos_beg = line.find_first_not_of (" ");
 	pos_end = line.find_first_of(" ", pos_beg);
 	if (pos_beg != std::string::npos && pos_end != std::string::npos)
-		n_nodes = str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
+		n_nodes = BaseLib::str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
 	else
 	{
 		ERR("TetGenInterface::parseNodesFileHeader(): could not correct read TetGen mesh header - number of nodes");
@@ -131,11 +131,11 @@ bool TetGenInterface::parseNodesFileHeader(std::string &line,
 	// dimension
 	pos_beg = line.find_first_not_of (" ", pos_end);
 	pos_end = line.find_first_of(" ", pos_beg);
-	dim = str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
+	dim = BaseLib::str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
 	// number of attributes
 	pos_beg = line.find_first_not_of (" ", pos_end);
 	pos_end = line.find_first_of(" ", pos_beg);
-	n_attributes = str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
+	n_attributes = BaseLib::str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
 	// boundary marker at nodes?
 	pos_beg = line.find_first_not_of (" ", pos_end);
 	pos_end = line.find_first_of(" ", pos_beg);
@@ -165,7 +165,7 @@ bool TetGenInterface::parseNodes(std::ifstream& ins, size_t n_nodes, size_t dim)
 				pos_beg = line.find_first_not_of(" ", pos_end);
 				pos_end = line.find_first_of(" \n", pos_beg);
 				if (pos_beg != std::string::npos && pos_end != std::string::npos) {
-					id = str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
+					id = BaseLib::str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
 					if (k == 0 && id == 0)
 						_zero_based_idx = true;
 				} else {
@@ -178,7 +178,7 @@ bool TetGenInterface::parseNodes(std::ifstream& ins, size_t n_nodes, size_t dim)
 					pos_end = line.find_first_of(" \n", pos_beg);
 					if (pos_end == std::string::npos) pos_end = line.size();
 					if (pos_beg != std::string::npos)
-						coordinates[i] = str2number<double> (
+						coordinates[i] = BaseLib::str2number<double> (
 										line.substr(pos_beg, pos_end - pos_beg));
 					else {
 						ERR("TetGenInterface::parseNodes(): error reading coordinate %d of node %d", i, k);
@@ -243,7 +243,7 @@ bool TetGenInterface::parseElementsFileHeader(std::string &line,
 	pos_beg = line.find_first_not_of (" ");
 	pos_end = line.find_first_of(" ", pos_beg);
 	if (pos_beg != std::string::npos && pos_end != std::string::npos)
-		n_tets = str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
+		n_tets = BaseLib::str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
 	else {
 		ERR("TetGenInterface::parseElementsFileHeader(): could not correct read TetGen mesh header - number of tetrahedras");
 		return false;
@@ -251,7 +251,7 @@ bool TetGenInterface::parseElementsFileHeader(std::string &line,
 	// nodes per tet - either 4 or 10
 	pos_beg = line.find_first_not_of (" \t", pos_end);
 	pos_end = line.find_first_of(" \t", pos_beg);
-	n_nodes_per_tet = str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
+	n_nodes_per_tet = BaseLib::str2number<size_t> (line.substr(pos_beg, pos_end - pos_beg));
 	// region attribute at tetrahedra?
 	pos_beg = line.find_first_not_of (" \t", pos_end);
 	pos_end = line.find_first_of(" \t\n", pos_beg);
@@ -285,7 +285,7 @@ bool TetGenInterface::parseElements(std::ifstream& ins, size_t n_tets, size_t n_
 				pos_beg = line.find_first_not_of(" ", pos_end);
 				pos_end = line.find_first_of(" \n", pos_beg);
 				if (pos_beg != std::string::npos && pos_end != std::string::npos)
-					id = str2number<size_t>(line.substr(pos_beg, pos_end - pos_beg));
+					id = BaseLib::str2number<size_t>(line.substr(pos_beg, pos_end - pos_beg));
 				else {
 					ERR("TetGenInterface::parseElements(): error reading id of tetrahedra %d", k);
 					return false;
@@ -299,7 +299,7 @@ bool TetGenInterface::parseElements(std::ifstream& ins, size_t n_tets, size_t n_
 						pos_end = line.size();
 					if (pos_beg != std::string::npos && pos_end !=
 					    std::string::npos)
-						ids[i] = str2number<std::size_t>(line.substr(pos_beg, pos_end - pos_beg));
+						ids[i] = BaseLib::str2number<std::size_t>(line.substr(pos_beg, pos_end - pos_beg));
 					else
 					{
 						ERR("TetGenInterface::parseElements(): error reading node %d of tetrahedra %d", i, k);
@@ -319,7 +319,7 @@ bool TetGenInterface::parseElements(std::ifstream& ins, size_t n_tets, size_t n_
 					pos_end = line.find_first_of(" ", pos_beg);
 					if (pos_end == std::string::npos) pos_end = line.size();
 					if (pos_beg != std::string::npos && pos_end != std::string::npos)
-						region = str2number<unsigned> (line.substr(pos_beg, pos_end - pos_beg));
+						region = BaseLib::str2number<unsigned> (line.substr(pos_beg, pos_end - pos_beg));
 					else {
 						ERR("TetGenInterface::parseElements(): error reading region attribute of tetrahedra %d", k);
 						return false;
diff --git a/FileIO/PetrelInterface.cpp b/FileIO/PetrelInterface.cpp
index f5f41d5a3197ee47974fec4f348e22625a136c6c..fe1ca2431592d75c7298839bb3635889ec6e37ba 100644
--- a/FileIO/PetrelInterface.cpp
+++ b/FileIO/PetrelInterface.cpp
@@ -118,7 +118,7 @@ void PetrelInterface::readPetrelWellTrace(std::istream &in)
 		// read well name
 		in.getline(buffer, MAX_COLS_PER_ROW);
 		line = buffer;
-		std::list<std::string> str_list(splitString(line, ' '));
+		std::list<std::string> str_list(BaseLib::splitString(line, ' '));
 		std::list<std::string>::const_iterator it(str_list.begin());
 		while (it != str_list.end())
 			std::cout << *it++ << " " << std::flush;
@@ -127,7 +127,7 @@ void PetrelInterface::readPetrelWellTrace(std::istream &in)
 		// read well head x coordinate
 		in.getline(buffer, MAX_COLS_PER_ROW);
 		line = buffer;
-		str_list = splitString(line, ' ');
+		str_list = BaseLib::splitString(line, ' ');
 		it = str_list.begin();
 		while (it != str_list.end())
 			std::cout << *it++ << " " << std::flush;
@@ -140,7 +140,7 @@ void PetrelInterface::readPetrelWellTrace(std::istream &in)
 		// read well head y coordinate
 		in.getline(buffer, MAX_COLS_PER_ROW);
 		line = buffer;
-		str_list = splitString(line, ' ');
+		str_list = BaseLib::splitString(line, ' ');
 		it = str_list.begin();
 		while (it != str_list.end())
 			std::cout << *it++ << " " << std::flush;
@@ -152,7 +152,7 @@ void PetrelInterface::readPetrelWellTrace(std::istream &in)
 		// read well KB
 		in.getline(buffer, MAX_COLS_PER_ROW);
 		line = buffer;
-		str_list = splitString(line, ' ');
+		str_list = BaseLib::splitString(line, ' ');
 		it = str_list.begin();
 		while (it != str_list.end())
 			std::cout << *it++ << " " << std::flush;
@@ -171,7 +171,7 @@ void PetrelInterface::readPetrelWellTrace(std::istream &in)
 		// read well type
 		in.getline(buffer, MAX_COLS_PER_ROW);
 		line = buffer;
-		str_list = splitString(line, ' ');
+		str_list = BaseLib::splitString(line, ' ');
 		it = str_list.begin();
 		while (it != str_list.end())
 			std::cout << *it++ << " " << std::flush;
@@ -200,7 +200,7 @@ void PetrelInterface::readPetrelWellTraceData(std::istream &in)
 	}
 
 	// read column information
-	str_list = splitString(line, ' ');
+	str_list = BaseLib::splitString(line, ' ');
 	it = str_list.begin();
 	while (it != str_list.end())
 		std::cout << *it++ << " " << std::flush;
diff --git a/FileIO/RapidXmlIO/RapidVtuInterface.cpp b/FileIO/RapidXmlIO/RapidVtuInterface.cpp
index f7c257d6da8b3e0c29aac6f5299ada1ce648ba4a..83a05b7f58d95137515d30f4e0bdcf4b0965ab8a 100644
--- a/FileIO/RapidXmlIO/RapidVtuInterface.cpp
+++ b/FileIO/RapidXmlIO/RapidVtuInterface.cpp
@@ -355,9 +355,9 @@ int RapidVtuInterface::write(std::ostream& stream)
 	root_node->append_node(grid_node);
 	xml_node<> *piece_node (_doc->allocate_node(node_element, "Piece"));
 	grid_node->append_node(piece_node);
-	const std::string str_nNodes (number2str(nNodes));
+	const std::string str_nNodes (BaseLib::number2str(nNodes));
 	piece_node->append_attribute (_doc->allocate_attribute("NumberOfPoints", str_nNodes.c_str()));
-	const std::string str_nElems (number2str(nElems));
+	const std::string str_nElems (BaseLib::number2str(nElems));
 	piece_node->append_attribute(_doc->allocate_attribute("NumberOfCells", str_nElems.c_str()));
 
 	// scalar arrays for point- and cell-data
@@ -457,7 +457,7 @@ xml_node<>* RapidVtuInterface::addDataArray(const std::string &name, const std::
 	dataarray_node->append_attribute(attr);
 	if (nComponents > 1)
 	{
-		attr = _doc->allocate_attribute(_doc->allocate_string("NumberOfComponents"), _doc->allocate_string(number2str(nComponents).c_str()));
+		attr = _doc->allocate_attribute(_doc->allocate_string("NumberOfComponents"), _doc->allocate_string(BaseLib::number2str(nComponents).c_str()));
 		dataarray_node->append_attribute(attr);
 	}
 	std::string comp_type = (_use_compressor) ? "appended" : "ascii";
diff --git a/FileIO/SHPInterface.cpp b/FileIO/SHPInterface.cpp
index 8fd5d0db272b49ba469b7fa2676aa477e8b55690..d8799c2a7e46dc588ca9f18b2542363c54a933e8 100644
--- a/FileIO/SHPInterface.cpp
+++ b/FileIO/SHPInterface.cpp
@@ -79,7 +79,7 @@ void SHPInterface::readStations(const SHPHandle &hSHP, int numberOfElements, std
 		{
 			hSHPObject = SHPReadObject(hSHP,i);
 			GeoLib::Station* stn =
-			        GeoLib::Station::createStation( number2str(i), *(hSHPObject->padfX),
+			        GeoLib::Station::createStation( BaseLib::number2str(i), *(hSHPObject->padfX),
 			                                        *(hSHPObject->padfY),
 			                                        *(hSHPObject->padfZ) );
 			stations->push_back(stn);
diff --git a/GeoLib/Color.cpp b/GeoLib/Color.cpp
index 7a4e92a821deaa9bc96bcbdce4b1909f902a197f..0564dca9ac134c8002444c9c3f0d70fcf52bdc14 100644
--- a/GeoLib/Color.cpp
+++ b/GeoLib/Color.cpp
@@ -37,7 +37,7 @@ int readColorLookupTable(std::map<std::string, Color*> &colors, const std::strin
 
 	while ( getline(in, line) )
 	{
-		std::list<std::string> fields = splitString(line, '\t');
+		std::list<std::string> fields = BaseLib::splitString(line, '\t');
 		Color *c = new Color();
 
 		if (fields.size()>=4)
diff --git a/GeoLib/GEOObjects.cpp b/GeoLib/GEOObjects.cpp
index 10ab4ba9785278b0e6496580e3d06b94aa8f0281..b4b32df6ed4d66df679a8a1c8a307faf2c2a6707 100644
--- a/GeoLib/GEOObjects.cpp
+++ b/GeoLib/GEOObjects.cpp
@@ -341,7 +341,7 @@ bool GEOObjects::isUniquePointVecName(std::string &name)
 		// If the original name already exists we start to add numbers to name for
 		// as long as it takes to make the name unique.
 		if (count > 1)
-			cpName = cpName + "-" + number2str(count);
+			cpName = cpName + "-" + BaseLib::number2str(count);
 
 		for (size_t i = 0; i < _pnt_vecs.size(); i++)
 			if ( cpName.compare(_pnt_vecs[i]->getName()) == 0 )
diff --git a/GeoLib/Grid.h b/GeoLib/Grid.h
index 96c452b395fb3bfc6720f26dc157d8ddcc2afe5d..c3d98bacc89539539da34d7ab8e5f97c998102d8 100644
--- a/GeoLib/Grid.h
+++ b/GeoLib/Grid.h
@@ -386,11 +386,11 @@ void Grid<POINT>::createGridGeometry(GeoLib::GEOObjects* geo_obj) const
 			for (std::size_t k(0); k<_n_steps[2]; k++) {
 
 				std::string name("Grid-");
-				name += number2str<std::size_t>(i);
+				name += BaseLib::number2str<std::size_t>(i);
 				name +="-";
-				name += number2str<std::size_t>(j);
+				name += BaseLib::number2str<std::size_t>(j);
 				name += "-";
-				name += number2str<std::size_t> (k);
+				name += BaseLib::number2str<std::size_t> (k);
 				grid_names.push_back(name);
 
 				std::vector<GeoLib::Point*>* points (new std::vector<GeoLib::Point*>);
diff --git a/GeoLib/SensorData.cpp b/GeoLib/SensorData.cpp
index ecbb0080375fc51abd8d56ba786d26686f2e5735..6e3992c36ca77405dc4a418b21a66109c608b27d 100644
--- a/GeoLib/SensorData.cpp
+++ b/GeoLib/SensorData.cpp
@@ -102,7 +102,7 @@ int SensorData::readDataFromFile(const std::string &file_name)
 
 	/* first line contains field names */
 	getline(in, line);
-	std::list<std::string> fields = splitString(line, '\t');
+	std::list<std::string> fields = BaseLib::splitString(line, '\t');
 	std::list<std::string>::const_iterator it (fields.begin());
 	size_t nFields = fields.size();
 
@@ -122,7 +122,7 @@ int SensorData::readDataFromFile(const std::string &file_name)
 
 	while ( getline(in, line) )
 	{
-		fields = splitString(line, '\t');
+		fields = BaseLib::splitString(line, '\t');
 
 		if (nFields == fields.size())
 		{
diff --git a/GeoLib/Station.cpp b/GeoLib/Station.cpp
index 1c730e5769d87c80c13860abccc986935353302f..b672ee203b16fae1003e643a894602d7a8508797 100644
--- a/GeoLib/Station.cpp
+++ b/GeoLib/Station.cpp
@@ -66,16 +66,16 @@ Station* Station::createStation(const std::string & line)
 {
 	std::list<std::string>::const_iterator it;
 	Station* station = new Station();
-	std::list<std::string> fields = splitString(line, '\t');
+	std::list<std::string> fields = BaseLib::splitString(line, '\t');
 
 	if (fields.size() >= 3)
 	{
 		it = fields.begin();
 		station->_name  = *it;
-		(*station)[0]     = strtod((replaceString(",", ".", *(++it))).c_str(), NULL);
-		(*station)[1]     = strtod((replaceString(",", ".", *(++it))).c_str(), NULL);
+		(*station)[0]     = strtod((BaseLib::replaceString(",", ".", *(++it))).c_str(), NULL);
+		(*station)[1]     = strtod((BaseLib::replaceString(",", ".", *(++it))).c_str(), NULL);
 		if (++it != fields.end())
-			(*station)[2] = strtod((replaceString(",", ".", *it)).c_str(), NULL);
+			(*station)[2] = strtod((BaseLib::replaceString(",", ".", *it)).c_str(), NULL);
 	}
 	else
 	{
@@ -175,7 +175,7 @@ int StationBorehole::readStratigraphyFile(const std::string &path,
 
 	while ( getline(in, line) )
 	{
-		std::list<std::string> fields = splitString(line, '\t');
+		std::list<std::string> fields = BaseLib::splitString(line, '\t');
 		data.push_back(fields);
 	}
 
@@ -228,7 +228,7 @@ int StationBorehole::addLayer(std::list<std::string> fields, StationBorehole* bo
 
 			std::cerr << "StationBorehole::addLayer - assuming correct order" <<
 			std::endl;
-			double thickness(strtod(replaceString(",", ".", fields.front()).c_str(), 0));
+			double thickness(strtod(BaseLib::replaceString(",", ".", fields.front()).c_str(), 0));
 			fields.pop_front();
 			borehole->addSoilLayer(thickness, fields.front());
 		}
@@ -285,7 +285,7 @@ int StationBorehole::addStratigraphies(const std::string &path, std::vector<Poin
 				fields.pop_front();
 				//the method just assumes that layers are read in correct order
 				fields.pop_front();
-				double thickness (strtod(replaceString(",", ".",
+				double thickness (strtod(BaseLib::replaceString(",", ".",
 				                                       fields.front()).c_str(), 0));
 				fields.pop_front();
 				std::string soil_name (fields.front());
@@ -310,19 +310,19 @@ int StationBorehole::addStratigraphies(const std::string &path, std::vector<Poin
 StationBorehole* StationBorehole::createStation(const std::string &line)
 {
 	StationBorehole* borehole = new StationBorehole();
-	std::list<std::string> fields = splitString(line, '\t');
+	std::list<std::string> fields = BaseLib::splitString(line, '\t');
 
 	if (fields.size()      >= 5)
 	{
 		borehole->_name     = fields.front();
 		fields.pop_front();
-		(*borehole)[0]      = strtod((replaceString(",", ".", fields.front())).c_str(), NULL);
+		(*borehole)[0]      = strtod((BaseLib::replaceString(",", ".", fields.front())).c_str(), NULL);
 		fields.pop_front();
-		(*borehole)[1]      = strtod((replaceString(",", ".", fields.front())).c_str(), NULL);
+		(*borehole)[1]      = strtod((BaseLib::replaceString(",", ".", fields.front())).c_str(), NULL);
 		fields.pop_front();
-		(*borehole)[2]      = strtod((replaceString(",", ".", fields.front())).c_str(), NULL);
+		(*borehole)[2]      = strtod((BaseLib::replaceString(",", ".", fields.front())).c_str(), NULL);
 		fields.pop_front();
-		borehole->_depth    = strtod((replaceString(",", ".", fields.front())).c_str(), NULL);
+		borehole->_depth    = strtod((BaseLib::replaceString(",", ".", fields.front())).c_str(), NULL);
 		fields.pop_front();
 		if (fields.empty())
 			borehole->_date = 0;
diff --git a/Gui/DataView/DiagramView/DiagramList.cpp b/Gui/DataView/DiagramView/DiagramList.cpp
index b2b2056707647075e05d7f681e336483a7c95956..ffaffd99b937402cce208c19a256596345283f6b 100644
--- a/Gui/DataView/DiagramView/DiagramList.cpp
+++ b/Gui/DataView/DiagramView/DiagramList.cpp
@@ -160,7 +160,7 @@ int DiagramList::readList(const QString &path, std::vector<DiagramList*> &lists)
 		{
 			DiagramList* l = new DiagramList;
 			l->setName(fields.takeFirst());
-			//value = strtod(replaceString(",", ".", fields.takeFirst().toStdString()).c_str(),0);
+			//value = strtod(BaseLib::replaceStringreplaceString(",", ".", fields.takeFirst().toStdString()).c_str(),0);
 			//l->setStartDate(startDate);
 			//l->addNextPoint(0,value);
 			lists.push_back(l);
@@ -192,7 +192,7 @@ int DiagramList::readList(const QString &path, std::vector<DiagramList*> &lists)
 
 				for (int i = 0; i < nLists; i++)
 				{
-					value = strtod(replaceString(",", ".",fields.takeFirst().toStdString()).c_str(),0);
+					value = strtod(BaseLib::replaceString(",", ".",fields.takeFirst().toStdString()).c_str(),0);
 					lists[i]->addNextPoint(numberOfSecs,value);
 				}
 			}
diff --git a/Gui/DataView/FEMConditionSetupDialog.cpp b/Gui/DataView/FEMConditionSetupDialog.cpp
index 9fe94ee023002c5b5d595e6de1e90716b8fc1a2c..fbd10102f52f121ea21e067e1ed3e10f1d89d29b 100644
--- a/Gui/DataView/FEMConditionSetupDialog.cpp
+++ b/Gui/DataView/FEMConditionSetupDialog.cpp
@@ -307,7 +307,7 @@ void FEMConditionSetupDialog::copyCondOnPoints()
 			FEMCondition* cond = new FEMCondition(_cond);
 			cond->setGeoObj(NULL);
 			cond->setGeoType(GeoLib::POINT);
-			cond->setGeoName(_cond.getAssociatedGeometryName() + "_Point" + number2str(ply->getPointID(i)));
+			cond->setGeoName(_cond.getAssociatedGeometryName() + "_Point" + BaseLib::number2str(ply->getPointID(i)));
 			cond->clearDisValues();
 			cond->setConstantDisValue((*ply->getPoint(i))[2]);
 			conditions.push_back(this->typeCast(*cond));
@@ -326,7 +326,7 @@ void FEMConditionSetupDialog::copyCondOnPoints()
 				FEMCondition* cond = new FEMCondition(_cond);
 				cond->setGeoObj(NULL);
 				cond->setGeoType(GeoLib::POINT);
-				cond->setGeoName(_cond.getAssociatedGeometryName() + "_Point" + number2str((*tri)[j]));
+				cond->setGeoName(_cond.getAssociatedGeometryName() + "_Point" + BaseLib::number2str((*tri)[j]));
 				cond->clearDisValues();
 				cond->setConstantDisValue((*tri->getPoint(j))[2]);
 				conditions.push_back(this->typeCast(*cond));
diff --git a/Gui/DataView/GEOModels.cpp b/Gui/DataView/GEOModels.cpp
index 7ffb6a263e216783bdfc90ec76ff5a1ca3d400c7..db05fa64d0facb803131897851b384734bd85af2 100644
--- a/Gui/DataView/GEOModels.cpp
+++ b/Gui/DataView/GEOModels.cpp
@@ -44,7 +44,7 @@ void GEOModels::updateGeometry(const std::string &geo_name)
 		this->_geoModel->removeGeoList(geo_name, GeoLib::POINT);
 		_geoModel->addPointList(QString::fromStdString(geo_name), points);
 		emit geoDataAdded(_geoModel, geo_name, GeoLib::POINT);
-	
+
 		if (lines)
 		{
 			emit geoDataRemoved(_geoModel, geo_name, GeoLib::POLYLINE);
@@ -52,7 +52,7 @@ void GEOModels::updateGeometry(const std::string &geo_name)
 			_geoModel->addPolylineList(QString::fromStdString(geo_name), lines);
 			emit geoDataAdded(_geoModel, geo_name, GeoLib::POLYLINE);
 		}
-	
+
 		if (surfaces)
 		{
 			emit geoDataRemoved(_geoModel, geo_name, GeoLib::SURFACE);
@@ -268,7 +268,7 @@ void GEOModels::addNameForObjectPoints(const std::string &geometry_name, const G
 		const GeoLib::Polyline* ply = dynamic_cast<const GeoLib::Polyline*>(obj);
 		size_t nPoints = ply->getNumberOfPoints();
 		for (size_t i=0; i<nPoints; i++)
-			pnt_vec->setNameForElement(ply->getPointID(i), new_name + "_Point" + number2str(ply->getPointID(i)));
+			pnt_vec->setNameForElement(ply->getPointID(i), new_name + "_Point" + BaseLib::number2str(ply->getPointID(i)));
 	}
 	else if (object_type == GeoLib::SURFACE)
 	{
@@ -277,9 +277,9 @@ void GEOModels::addNameForObjectPoints(const std::string &geometry_name, const G
 		for (size_t i=0; i<nTriangles; i++)
 		{
 			const GeoLib::Triangle* tri = (*sfc)[i];
-			pnt_vec->setNameForElement((*tri)[0], new_name + "_Point" + number2str((*tri)[0]));
-			pnt_vec->setNameForElement((*tri)[1], new_name + "_Point" + number2str((*tri)[1]));
-			pnt_vec->setNameForElement((*tri)[2], new_name + "_Point" + number2str((*tri)[2]));
+			pnt_vec->setNameForElement((*tri)[0], new_name + "_Point" + BaseLib::number2str((*tri)[0]));
+			pnt_vec->setNameForElement((*tri)[1], new_name + "_Point" + BaseLib::number2str((*tri)[1]));
+			pnt_vec->setNameForElement((*tri)[2], new_name + "_Point" + BaseLib::number2str((*tri)[2]));
 		}
 	}
 	else
diff --git a/Gui/DataView/GMSHPrefsDialog.cpp b/Gui/DataView/GMSHPrefsDialog.cpp
index c7e85c0a055a4adb884574380b5cf4d47443bb5c..abfe017dcf75a5f7880c4857b9d3fa312052a1bf 100644
--- a/Gui/DataView/GMSHPrefsDialog.cpp
+++ b/Gui/DataView/GMSHPrefsDialog.cpp
@@ -153,7 +153,7 @@ void GMSHPrefsDialog::accept()
 
 	if (this->radioAdaptive->isChecked())
 	{
-		max_number_of_points_in_quadtree_leaf = str2number<unsigned> (
+		max_number_of_points_in_quadtree_leaf = BaseLib::str2number<unsigned> (
 		        param1->text().toStdString().c_str());
 		if (max_number_of_points_in_quadtree_leaf == 0)
 			max_number_of_points_in_quadtree_leaf = 10;
diff --git a/Gui/DataView/ListPropertiesDialog.cpp b/Gui/DataView/ListPropertiesDialog.cpp
index a4c6e82ecad51d31c8949fcf4c7afeb24b646796..dd4153e0062cada31a5deb857b63d17c86770077 100644
--- a/Gui/DataView/ListPropertiesDialog.cpp
+++ b/Gui/DataView/ListPropertiesDialog.cpp
@@ -136,11 +136,10 @@ void ListPropertiesDialog::accept()
 		}
 		else
 		{
-			minVal = strtod(replaceString(",", ".",
+			minVal = strtod(BaseLib::replaceString(",", ".",
 			                              _minValue[i]->text().toStdString()).c_str(),0);
-			maxVal = strtod(replaceString(",", ".",
-			                              _maxValue[i]->text().toStdString()).c_str(),
-			                0);
+			maxVal = strtod(BaseLib::replaceString(",", ".",
+			                              _maxValue[i]->text().toStdString()).c_str(),0);
 		}
 		PropertyBounds b(_propLabel[i]->text().toStdString(), minVal, maxVal);
 		bounds.push_back(b);
diff --git a/Gui/VtkVis/VtkRaster.cpp b/Gui/VtkVis/VtkRaster.cpp
index e54b9597ac922c9215329e427054b2f95b961e46..593a51c9d32694ecfd8119b04db9043160bb45b8 100644
--- a/Gui/VtkVis/VtkRaster.cpp
+++ b/Gui/VtkVis/VtkRaster.cpp
@@ -139,7 +139,7 @@ bool VtkRaster::readASCHeader(ascHeader &header, std::ifstream &in)
 	if (tag.compare("xllcorner") == 0)
 	{
 		in >> value;
-		header.x = strtod(replaceString(",", ".", value).c_str(),0);
+		header.x = strtod(BaseLib::replaceString(",", ".", value).c_str(),0);
 	}
 	else
 		return false;
@@ -147,7 +147,7 @@ bool VtkRaster::readASCHeader(ascHeader &header, std::ifstream &in)
 	if (tag.compare("yllcorner") == 0)
 	{
 		in >> value;
-		header.y = strtod(replaceString(",", ".", value).c_str(),0);
+		header.y = strtod(BaseLib::replaceString(",", ".", value).c_str(),0);
 	}
 	else
 		return false;
@@ -155,7 +155,7 @@ bool VtkRaster::readASCHeader(ascHeader &header, std::ifstream &in)
 	if (tag.compare("cellsize") == 0)
 	{
 		in >> value;
-		header.cellsize = strtod(replaceString(",", ".", value).c_str(),0);
+		header.cellsize = strtod(BaseLib::replaceString(",", ".", value).c_str(),0);
 	}
 	else
 		return false;
@@ -215,7 +215,7 @@ float* VtkRaster::loadDataFromASC(const std::string &fileName,
 			{
 				in >> s;
 				unsigned index = 2*(col_index+i);
-				values[index] = static_cast<float>(strtod(replaceString(",", ".", s).c_str(),0));
+				values[index] = static_cast<float>(strtod(BaseLib::replaceString(",", ".", s).c_str(),0));
 				if (values[index] > max_val)
 					max_val = values[index];
 			}
@@ -318,7 +318,7 @@ float* VtkRaster::loadDataFromSurfer(const std::string &fileName,
 				if (s.compare(header.noData) == 0)
 					s = "-9999";
 				unsigned index = 2*(col_index+i);
-				values[index] = static_cast<float>(strtod(replaceString(",", ".", s).c_str(),0));
+				values[index] = static_cast<float>(strtod(BaseLib::replaceString(",", ".", s).c_str(),0));
 				if (values[index] > max_val)
 					max_val = values[index];
 			}
diff --git a/Gui/mainwindow.cpp b/Gui/mainwindow.cpp
index f3b39a758f004702224ec247920614169f8699ec..a1a45b4a6e9e1bfa6af9cc35b638e362b1044c59 100644
--- a/Gui/mainwindow.cpp
+++ b/Gui/mainwindow.cpp
@@ -1237,7 +1237,7 @@ void MainWindow::on_actionExportVTK_triggered(bool checked /*= false*/)
 		{
 			count++;
 			static_cast<VtkVisPipelineItem*> (*it)->writeToFile(basename
-			                                                    + number2str(count));
+			                                                    + BaseLib::number2str(count));
 			++it;
 		}
 	}
diff --git a/OGS/ProjectData.cpp b/OGS/ProjectData.cpp
index 318f207f1a64761ed7c44265c4e9379080920f09..22ab8ea8b7d985e20a62aaa31661b7038dabbc81 100644
--- a/OGS/ProjectData.cpp
+++ b/OGS/ProjectData.cpp
@@ -210,7 +210,7 @@ bool ProjectData::isUniqueMeshName(std::string &name)
 		// If the original name already exists we start to add numbers to name for
 		// as long as it takes to make the name unique.
 		if (count > 1)
-			cpName = cpName + "-" + number2str(count);
+			cpName = cpName + "-" + BaseLib::number2str(count);
 
 		for (std::vector<MeshLib::Mesh*>::iterator it = _msh_vec.begin(); it != _msh_vec.end(); ++it)
 			if ( cpName.compare((*it)->getName()) == 0 )
diff --git a/Utils/FileConverter/ConvertSHPToGLI.cpp b/Utils/FileConverter/ConvertSHPToGLI.cpp
index 954bbcb45ee27cdaf88f8635bb2bec1da552af76..7276ec255b002f6b98740e20074d45bedb8e7719 100644
--- a/Utils/FileConverter/ConvertSHPToGLI.cpp
+++ b/Utils/FileConverter/ConvertSHPToGLI.cpp
@@ -87,7 +87,7 @@ void convertPoints (DBFHandle dbf_handle,
 					name += DBFReadStringAttribute(dbf_handle, k, name_component_ids[j]);
 					name += " ";
 				}
-		} else name = number2str(k);
+		} else name = BaseLib::number2str(k);
 
 		if (station) {
 			GeoLib::Station* pnt(GeoLib::Station::createStation(name, x, y, z));