Index: osgVisual/CMakeLists.txt
===================================================================
--- osgVisual/CMakeLists.txt	(revision 150)
+++ osgVisual/CMakeLists.txt	(revision 151)
@@ -387,5 +387,5 @@
 	SET(USERFILE_COMMAND_DEBUG "$(TargetPath)" CACHE STRING "Command to execute on debugging (VS Project settings)" )
 	SET(USERFILE_WORKING_DIRECTORY_DEBUG "bin" CACHE STRING "Working directory on debugging (VS Project settings)" )
-	SET(USERFILE_COMMAND_ARGUMENTS_DEBUG "-C center --window 100 100 800 600 -m D:/OpenSceneGraph/VPB-Testdatensatz/DB_Small/database.ive -p salzburg.path --config osgVisualConfig.xml" CACHE STRING "Command arguments (VS Project settings)" )
+	SET(USERFILE_COMMAND_ARGUMENTS_DEBUG " --window 100 100 800 600 -m D:/OpenSceneGraph/VPB-Testdatensatz/DB_Small/database.ive -p salzburg.path --config osgVisualConfig.xml" CACHE STRING "Command arguments (VS Project settings)" )
 	SET(USERFILE_REMOTE_MACHINE_DEBUG ${USER_NAME} CACHE STRING "Remote Debugging Machine (VS Project settings)")
 	IF (DESTINATION_ARCH STREQUAL "x64")
Index: osgVisual/bin/osgVisualConfig.xml
===================================================================
--- osgVisual/bin/osgVisualConfig.xml	(revision 150)
+++ osgVisual/bin/osgVisualConfig.xml	(revision 151)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <osgvisualconfiguration>
-  <module name="distortion" enabled="yes">
+  <module name="distortion" enabled="no">
     <!-- XML configuration of the module "distortion"
       channelname = name of he channel, used to load the distortion- and blendmaps
@@ -17,4 +17,7 @@
   </module>
   <module name="sky_silverlining" enabled="yes"></module>
+  <module name="vista2d" enabled="yes">
+    <vista2d filename="hud.view"></vista2d>
+  </module>
   
   <scenery>
Index: osgVisual/include/distortion/visual_distortion.h
===================================================================
--- osgVisual/include/distortion/visual_distortion.h	(revision 150)
+++ osgVisual/include/distortion/visual_distortion.h	(revision 151)
@@ -87,5 +87,5 @@
 	 * @param subgraph : Undistorted scene graph.
 	 * @param clearColor : Clear color for distortion.
-	 * @return : Group node which contains the distortion and the undistorted scene graph.
+	 * @return : Group node which contains the distortion and the undistorted scene graph ( distortedGraph ).
 	 */ 
 	osg::Group* initialize(osg::Group* subgraph, const osg::Vec4& clearColor );
Index: osgVisual/include/util/visual_util.h
===================================================================
--- osgVisual/include/util/visual_util.h	(revision 150)
+++ osgVisual/include/util/visual_util.h	(revision 151)
@@ -231,5 +231,5 @@
 	 *  xmlNode* yourNode = util::getModuleXMLConfig( configFilename, "core", tmpDoc );
 	 *  // use yourNode
-	 *  if(tmpDoc)
+	 *  if(yourNode)
 	 *  {
 	 *     xmlFreeDoc(tmpDoc); xmlCleanupParser();
Index: osgVisual/src/core/visual_core.cpp
===================================================================
--- osgVisual/src/core/visual_core.cpp	(revision 150)
+++ osgVisual/src/core/visual_core.cpp	(revision 151)
@@ -43,12 +43,4 @@
 	}
 
-xmlDoc* tmpDoc;
-util::getModuleXMLConfig( configFilename, "core", tmpDoc );
-if(tmpDoc)
-{
-	xmlFreeDoc(tmpDoc); xmlCleanupParser();
-}
-
-
 	// Configure osg to use KdTrees
 	osgDB::Registry::instance()->setBuildKdTreesHint(osgDB::ReaderWriter::Options::BUILD_KDTREES);
@@ -79,8 +71,6 @@
 #ifdef USE_DISTORTION
 	// Initialize distortion
-	OSG_NOTIFY( osg::ALWAYS ) << "Using distortion." << std::endl;
 	distortion = new visual_distortion( viewer, arguments, configFilename );
-	distortion->initialize( rootNode, viewer->getCamera()->getClearColor() );
-	distortedSceneGraph = distortion->getDistortedSceneGraph();
+	distortedSceneGraph = distortion->initialize( rootNode, viewer->getCamera()->getClearColor() );
 #endif
 
Index: osgVisual/src/distortion/visual_distortion.cpp
===================================================================
--- osgVisual/src/distortion/visual_distortion.cpp	(revision 150)
+++ osgVisual/src/distortion/visual_distortion.cpp	(revision 151)
@@ -49,5 +49,6 @@
 	if(config)
 	{
-	
+		OSG_NOTIFY( osg::ALWAYS ) << "Using distortion." << std::endl;
+
 		xmlNode* a_node = config->children;
 
@@ -55,5 +56,5 @@
 		{
 			std::string node_name=reinterpret_cast<const char*>(cur_node->name);
-			OSG_ALWAYS << "----visual_distortion::processXMLConfiguration() - node type="<< cur_node->type <<", name=" << cur_node->name << std::endl;
+			//OSG_ALWAYS << "----visual_distortion::processXMLConfiguration() - node type="<< cur_node->type <<", name=" << cur_node->name << std::endl;
 
 			// Check for distortion node
@@ -68,5 +69,5 @@
 					{
 						std::string  channelname = attr_value;
-						OSG_NOTIFY(osg::ALWAYS) << "channelname:" << channelname << std::endl;
+						OSG_NOTIFY(osg::ALWAYS) << "visual_distortion: Channelname:" << channelname << std::endl;
 
 						std::string pre_cfg("..\\resources\\distortion\\view_");
@@ -136,5 +137,4 @@
 						distortMapFileName = attr_value;
 					}
-
 					attr = attr->next; 
 				}
@@ -153,5 +153,4 @@
 						blendMapFileName = attr_value;
 					}
-
 					attr = attr->next; 
 				}
@@ -159,17 +158,15 @@
 		}	// FOR all nodes END
 
-
+		// clean up
+		xmlFreeDoc(tmpDoc); xmlCleanupParser();
+		return true;
 	}	// IF Config valid END
 	else
-		OSG_WARN << "ERROR: visual_distortion::processXMLConfiguration() - Invalid module configuration!" << std::endl;
-
-
-
-	// clean up
-	if(tmpDoc)
-	{
-		xmlFreeDoc(tmpDoc); xmlCleanupParser();
-		return true;
+	{
+		OSG_WARN << "WARNING: visual_distortion::processXMLConfiguration() - Module configuration not found or module disabled!" << std::endl;
+		return false;
 	}
+
+
 
 	return true;
@@ -191,5 +188,6 @@
 
 	// Process XML configuration
-	processXMLConfiguration();
+	if(!processXMLConfiguration())
+		return NULL;	// Abort distortion initialization.
 
 	// Add this node to the scenegraph to get updated during update traversal.
Index: osgVisual/src/util/visual_util.cpp
===================================================================
--- osgVisual/src/util/visual_util.cpp	(revision 150)
+++ osgVisual/src/util/visual_util.cpp	(revision 151)
@@ -146,9 +146,38 @@
 		if (cur_node->type == XML_ELEMENT_NODE)
 		{
-			std::string node_name=reinterpret_cast<const char*>(cur_node->name);
-			if (node_name == "module")
+			// Extract Node Name and the first attribute: "module name"
+			std::string node_name = reinterpret_cast<const char*>(cur_node->name);
+			std::string modName = "";
+			xmlAttr  *attr = cur_node->properties;
+			while ( attr ) 
+			{ 
+				std::string attr_name=reinterpret_cast<const char*>(attr->name);
+				std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
+				if( attr_name == "name" )
+					modName = attr_value;
+				attr = attr->next;
+			}
+			
+			// Check each node for the searched module
+			if (node_name == "module" && modName == moduleName)
 			{
-				OSG_DEBUG << "XML node module found" << std::endl;
-				return cur_node;
+				// Check if the module is active
+				xmlAttr  *attr = cur_node->properties;
+				while ( attr ) 
+				{ 
+					std::string attr_name=reinterpret_cast<const char*>(attr->name);
+					std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
+					if( attr_name == "enabled" && attr_value == "yes" )
+					{
+						OSG_ALWAYS << "Found XML module configuration for " << moduleName << std::endl;
+						return cur_node;
+					}
+					if( attr_name == "enabled" && attr_value == "no" )
+					{
+						OSG_ALWAYS << "Found XML module configuration for " << moduleName << ", but it is DISABLED." << std::endl;
+						return NULL;
+					}
+					attr = attr->next;
+				}
 			}
 			else	// Otherwise: check its children..
