Index: osgVisual/trunk/bin/osgVisualConfig.xml
===================================================================
--- osgVisual/trunk/bin/osgVisualConfig.xml	(revision 218)
+++ osgVisual/trunk/bin/osgVisualConfig.xml	(revision 219)
@@ -76,24 +76,24 @@
     <visibility range="50000" turbidity="2.2" ></visibility>
     <clouds>
-      <!--<cloudlayer slot="0" type="CUMULONIMBUS_CAPPILATUS" enabled="true" fadetime="15">
+      <!--<cloudlayer slot="0" type="CUMULONIMBUS_CAPPILATUS" enabled="yes" fadetime="15">
         <geometry baselength="20000" basewidth="20000" thickness="600" baseHeight="1000" density="0.5"></geometry>
       </cloudlayer>-->
-      <cloudlayer slot="1" type="CUMULUS_CONGESTUS" enabled="true" fadetime="15">
+      <cloudlayer slot="1" type="CUMULUS_CONGESTUS" enabled="yes" fadetime="15">
         <geometry baselength="50000" basewidth="50000" thickness="1600" baseHeight="1000" density="0.07"></geometry>
         <precipitation rate_mmPerHour_rain="5.0" rate_mmPerHour_drySnow="7.0" rate_mmPerHour_wetSnow="10.0" rate_mmPerHour_sleet="0.0"></precipitation>
       </cloudlayer>
-      <cloudlayer slot="2" type="CUMULUS_MEDIOCRIS" enabled="true" fadetime="15">
+      <cloudlayer slot="2" type="CUMULUS_MEDIOCRIS" enabled="yes" fadetime="15">
         <geometry baselength="50000" basewidth="50000" thickness="1600" baseHeight="1000" density="0.07"></geometry>
       </cloudlayer>
-      <!--<cloudlayer slot="3" type="CIRRUS_FIBRATUS" enabled="true" fadetime="15">
+      <!--<cloudlayer slot="3" type="CIRRUS_FIBRATUS" enabled="yes" fadetime="15">
         <geometry baselength="5000000" basewidth="5000000" thickness="600" baseHeight="7351" density="0.2"></geometry>
       </cloudlayer>-->
-      <!--<cloudlayer slot="4" type="CIRROCUMULUS" enabled="true" fadetime="15">
+      <!--<cloudlayer slot="4" type="CIRROCUMULUS" enabled="yes" fadetime="15">
         <geometry baselength="50000" basewidth="50000" thickness="600" baseHeight="7351" density="0.2"></geometry>
       </cloudlayer>-->
-      <!--<cloudlayer slot="5" type="STRATOCUMULUS" enabled="true" fadetime="15">
+      <!--<cloudlayer slot="5" type="STRATOCUMULUS" enabled="yes" fadetime="15">
         <geometry baselength="100000" basewidth="100000" thickness="2500" baseHeight="2000" density="0.3"></geometry>
       </cloudlayer>-->
-      <!--<cloudlayer slot="6" type="STRATUS" enabled="true" fadetime="15">
+      <!--<cloudlayer slot="6" type="STRATUS" enabled="yes" fadetime="15">
         <geometry baselength="50000" basewidth="50000" thickness="1500" baseHeight="1500" density="0.3"></geometry>
       </cloudlayer>-->
Index: osgVisual/trunk/include/util/visual_util.h
===================================================================
--- osgVisual/trunk/include/util/visual_util.h	(revision 218)
+++ osgVisual/trunk/include/util/visual_util.h	(revision 219)
@@ -270,6 +270,26 @@
 	static std::string getAnimationPathFromXMLConfig(std::string configFilename);
 
+	/**
+	 * \brief This function converts a string into a double.
+	 * 
+	 * @param s : String to convert.
+	 * @return : double representation of the string.
+	 */ 
 	static int strToDouble(std::string s);
+
+	/**
+	 * \brief This function converts a string into an Integer.
+	 * 
+	 * @param s : String to convert.
+	 * @return : Integer representation of the string.
+	 */ 
 	static double strToInt(std::string s);
+
+	/**
+	 * \brief This function converts a string into a bool.
+	 * 
+	 * @param s : String to convert.
+	 * @return : Bool representation of the string. Returns 'false' on error.
+	 */ 
 	static bool strToBool(std::string s);
 
Index: osgVisual/trunk/src/core/visual_core.cpp
===================================================================
--- osgVisual/trunk/src/core/visual_core.cpp	(revision 218)
+++ osgVisual/trunk/src/core/visual_core.cpp	(revision 219)
@@ -300,29 +300,10 @@
 				std::string attr_name=reinterpret_cast<const char*>(attr->name);
 				std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
-				if( attr_name == "day" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> day;
-				}
-				if( attr_name == "month" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> month;
-				}
-				if( attr_name == "year" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> year;
-				}
-				if( attr_name == "hour" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> hour;
-				}
-				if( attr_name == "minute" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> minute;
-				}
+				if( attr_name == "day" ) day = util::strToInt(attr_value);
+				if( attr_name == "month" ) month = util::strToInt(attr_value);
+				if( attr_name == "year" ) year = util::strToInt(attr_value);
+				if( attr_name == "hour" ) hour = util::strToInt(attr_value);
+				if( attr_name == "minute" ) minute = util::strToInt(attr_value);
+
 				attr = attr->next; 
 			}
@@ -343,14 +324,7 @@
 				std::string attr_name=reinterpret_cast<const char*>(attr->name);
 				std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
-				if( attr_name == "range" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> range;
-				}
-				if( attr_name == "turbidity" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> turbidity;
-				}
+				if( attr_name == "range" ) range = util::strToDouble(attr_value);
+				if( attr_name == "turbidity" ) turbidity = util::strToDouble(attr_value);
+
 				attr = attr->next; 
 			}
@@ -377,24 +351,9 @@
 				std::string attr_name=reinterpret_cast<const char*>(attr->name);
 				std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
-				if( attr_name == "bottom" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> bottom;
-				}
-				if( attr_name == "top" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> top;
-				}
-				if( attr_name == "speed" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> speed;
-				}
-				if( attr_name == "direction" )
-				{
-					std::stringstream sstr(attr_value);
-					sstr >> direction;
-				}
+				if( attr_name == "bottom" ) bottom = util::strToDouble(attr_value);
+				if( attr_name == "top" ) top = util::strToDouble(attr_value);
+				if( attr_name == "speed" ) speed = util::strToDouble(attr_value);
+				if( attr_name == "direction" ) direction = util::strToDouble(attr_value);
+
 				attr = attr->next; 
 			}
Index: osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp
===================================================================
--- osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp	(revision 218)
+++ osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp	(revision 219)
@@ -764,21 +764,7 @@
 					std::string attr_name=reinterpret_cast<const char*>(attr->name);
 					std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
-					if( attr_name == "slot" )
-					{
-						std::stringstream sstr(attr_value);
-						sstr >> slot;
-					}
-					if( attr_name == "enabled" )
-					{
-						if(attr_value=="yes")
-							enabled = true;
-						else
-							enabled = false;
-					}
-					if( attr_name == "fadetime" )
-					{
-						std::stringstream sstr(attr_value);
-						sstr >> fadetime;
-					}
+					if( attr_name == "slot" ) slot = util::strToInt(attr_value);
+					if( attr_name == "enabled" ) enabled = util::strToBool(attr_value);
+					if( attr_name == "fadetime" ) fadetime = util::strToInt(attr_value);
 					if( attr_name == "type" )
 					{
@@ -817,29 +803,10 @@
 							std::string attr_name=reinterpret_cast<const char*>(attr->name);
 							std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
-							if( attr_name == "baselength" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> baselength;
-							}
-							if( attr_name == "basewidth" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> basewidth;
-							}
-							if( attr_name == "thickness" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> thickness;
-							}
-							if( attr_name == "baseHeight" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> baseHeight;
-							}
-							if( attr_name == "density" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> density;
-							}
+							if( attr_name == "baselength" )	baselength = util::strToInt(attr_value);
+							if( attr_name == "basewidth" )	basewidth = util::strToInt(attr_value);
+							if( attr_name == "thickness" )	thickness = util::strToInt(attr_value);
+							if( attr_name == "baseHeight" )	baseHeight = util::strToInt(attr_value);
+							if( attr_name == "density" ) density = util::strToDouble(attr_value);
+
 							attr = attr->next; 
 						}
@@ -853,24 +820,9 @@
 							std::string attr_name=reinterpret_cast<const char*>(attr->name);
 							std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
-							if( attr_name == "rate_mmPerHour_rain" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> rate_mmPerHour_rain;
-							}
-							if( attr_name == "rate_mmPerHour_drySnow" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> rate_mmPerHour_drySnow;
-							}
-							if( attr_name == "rate_mmPerHour_wetSnow" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> rate_mmPerHour_wetSnow;
-							}
-							if( attr_name == "rate_mmPerHour_sleet" )
-							{
-								std::stringstream sstr(attr_value);
-								sstr >> rate_mmPerHour_sleet;
-							}
+							if( attr_name == "rate_mmPerHour_rain" ) rate_mmPerHour_rain = util::strToDouble(attr_value);
+							if( attr_name == "rate_mmPerHour_drySnow" ) rate_mmPerHour_drySnow = util::strToDouble(attr_value);
+							if( attr_name == "rate_mmPerHour_wetSnow" ) rate_mmPerHour_wetSnow = util::strToDouble(attr_value);
+							if( attr_name == "rate_mmPerHour_sleet" ) rate_mmPerHour_sleet = util::strToDouble(attr_value);
+
 							attr = attr->next; 
 						}
