diff --git a/.gitignore b/.gitignore
index d0eb9d2454..0df154bf00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,7 @@
 global.inc.php
+nsConverter/conf/config.inc.php
+nsConverter/conf/constants.inc.php
+nsConverter/build_meta.sh
 test/config.inc.php
 test/meta/Auto/
 test/meta/Business/
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000000..733ce68807
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,25 @@
+{
+    "name": "onphp/onphp",
+    "description": "onPHP is the mature GPL'ed multi-purpose object-oriented PHP framework.",
+    "keywords": ["framework"],
+    "homepage": "https://github.com/onPHP/onphp-framework",
+    "type": "library",
+    "license": "GPL-3.0",
+    "authors": [
+        {
+            "name": "Konstantin Arkhipov"
+        },
+        {
+            "name": "Anton Lebedevich"
+        }
+    ],
+    "require": {
+        "php": ">=5.3.0"
+    },
+    "conflict": {
+        "ext-http": "*"
+    },
+    "autoload": {
+        "classmap": ["core/", "main/", "meta/"]
+    }
+}
diff --git a/core/Base/Aliased.class.php b/core/Base/Aliased.class.php
index 04b2cc3e4c..fd3285d602 100644
--- a/core/Base/Aliased.class.php
+++ b/core/Base/Aliased.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface Aliased
 	{
 		public function getAlias();
diff --git a/core/Base/Assert.class.php b/core/Base/Assert.class.php
index 1c41da0ffc..7005609a3e 100644
--- a/core/Base/Assert.class.php
+++ b/core/Base/Assert.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Base
 	**/
+	namespace Onphp;
+
 	final class Assert extends StaticFactory
 	{
 		public static function isTrue($boolean, $message = null)
diff --git a/core/Base/Date.class.php b/core/Base/Date.class.php
index 4d6cd33b9a..d26b1b3778 100644
--- a/core/Base/Date.class.php
+++ b/core/Base/Date.class.php
@@ -18,6 +18,8 @@
 	 * 
 	 * @ingroup Base
 	**/
+	namespace Onphp;
+
 	class Date implements Stringable, DialectString
 	{
 		const WEEKDAY_MONDAY 	= 1;
@@ -29,12 +31,12 @@ class Date implements Stringable, DialectString
 		const WEEKDAY_SUNDAY	= 0; // because strftime('%w') is 0 on Sunday
 
 		/**
-		 * @var DateTime
+		 * @var \DateTime
 		 */
 		protected $dateTime = null;
 
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public static function create($date)
 		{
@@ -47,7 +49,7 @@ public static function today($delimiter = '-')
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public static function makeToday()
 		{
@@ -55,7 +57,7 @@ public static function makeToday()
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		 * @see http://www.faqs.org/rfcs/rfc3339.html
 		 * @see http://www.cl.cam.ac.uk/~mgk25/iso-time.html
 		**/
@@ -181,7 +183,7 @@ public function getWeekDay()
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public function spawn($modification = null)
 		{
@@ -195,14 +197,14 @@ public function spawn($modification = null)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return Date
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\Date
 		**/
 		public function modify($string)
 		{
 			try {
 				$this->dateTime->modify($string);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				throw new WrongArgumentException(
 					"wrong time string '{$string}'"
 				);
@@ -234,7 +236,7 @@ public function getDayEndStamp()
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public function getFirstDayOfWeek($weekStart = Date::WEEKDAY_MONDAY)
 		{
@@ -244,7 +246,7 @@ public function getFirstDayOfWeek($weekStart = Date::WEEKDAY_MONDAY)
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public function getLastDayOfWeek($weekStart = Date::WEEKDAY_MONDAY)
 		{
@@ -278,7 +280,7 @@ public function toIsoString()
 		}
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public function toTimestamp()
 		{
@@ -286,7 +288,7 @@ public function toTimestamp()
 		}
 
 		/**
-		 * @return DateTime|null
+		 * @return \DateTime|null
 		 */
 		public function getDateTime()
 		{
@@ -303,7 +305,7 @@ protected function import($date)
 		{
 			try{
 				if (is_int($date) || is_numeric($date)) { // unix timestamp
-					$this->dateTime = new DateTime(date(static::getFormat(), $date));
+					$this->dateTime = new \DateTime(date(static::getFormat(), $date));
 
 				} elseif ($date && is_string($date)) {
 
@@ -321,11 +323,11 @@ protected function import($date)
 						);
 					}
 
-					$this->dateTime = new DateTime($date);
+					$this->dateTime = new \DateTime($date);
 				}
 
 
-			} catch(Exception $e) {
+			} catch(\Exception $e) {
 				throw new WrongArgumentException(
 					"strange input given - '{$date}'"
 				);
diff --git a/core/Base/Enum.class.php b/core/Base/Enum.class.php
index 8d492aac13..978d04fd58 100644
--- a/core/Base/Enum.class.php
+++ b/core/Base/Enum.class.php
@@ -17,15 +17,17 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class Enum extends NamedObject
 		implements
-			Serializable
+			\Serializable
 	{
 		protected static $names = array(/* override me */);
 
 		/**
 		 * @param integer $id
-		 * @return Enum
+		 * @return \Onphp\Enum
 		 */
 		public static function create($id)
 		{
@@ -39,8 +41,8 @@ public function __construct($id)
 
 		/**
 		 * @param $id
-		 * @return Enum
-		 * @throws MissingElementException
+		 * @return \Onphp\Enum
+		 * @throws \Onphp\MissingElementException
 		 */
 		protected function setInternalId($id)
 		{
@@ -134,7 +136,7 @@ public static function getNameList()
 		}
 
 		/**
-		 * @return Enum
+		 * @return \Onphp\Enum
 		**/
 		public function setId($id)
 		{
diff --git a/core/Base/Enumeration.class.php b/core/Base/Enumeration.class.php
index 4957d28a8d..51c6be89b5 100644
--- a/core/Base/Enumeration.class.php
+++ b/core/Base/Enumeration.class.php
@@ -17,7 +17,9 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
-	abstract class Enumeration extends NamedObject implements Serializable
+	namespace Onphp;
+
+	abstract class Enumeration extends NamedObject implements \Serializable
 	{
 		protected $names = array(/* override me */);
 		
@@ -81,7 +83,7 @@ public function getNameList()
 		}
 		
 		/**
-		 * @return Enumeration
+		 * @return \Onphp\Enumeration
 		**/
 		public function setId($id)
 		{
diff --git a/core/Base/Identifiable.class.php b/core/Base/Identifiable.class.php
index e4f50b2487..6fcc567aa9 100644
--- a/core/Base/Identifiable.class.php
+++ b/core/Base/Identifiable.class.php
@@ -17,6 +17,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface Identifiable
 	{
 		public function getId();
diff --git a/core/Base/IdentifiableObject.class.php b/core/Base/IdentifiableObject.class.php
index cd3d055f61..2888ea6970 100644
--- a/core/Base/IdentifiableObject.class.php
+++ b/core/Base/IdentifiableObject.class.php
@@ -17,12 +17,14 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class /* spirit of */ IdentifiableObject implements Identifiable, DialectString
 	{
 		protected $id = null;
 		
 		/**
-		 * @return IdentifiableObject
+		 * @return \Onphp\IdentifiableObject
 		**/
 		public static function wrap($id)
 		{
@@ -43,7 +45,7 @@ public function getId()
 		}
 		
 		/**
-		 * @return IdentifiableObject
+		 * @return \Onphp\IdentifiableObject
 		**/
 		public function setId($id)
 		{
diff --git a/core/Base/Identifier.class.php b/core/Base/Identifier.class.php
index ae63db9ecb..3907734078 100644
--- a/core/Base/Identifier.class.php
+++ b/core/Base/Identifier.class.php
@@ -15,13 +15,15 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class Identifier implements Identifiable
 	{
 		private $id		= null;
 		private $final	= false;
 		
 		/**
-		 * @return Identifier
+		 * @return \Onphp\Identifier
 		**/
 		public static function create()
 		{
@@ -29,7 +31,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return Identifier
+		 * @return \Onphp\Identifier
 		**/
 		public static function wrap($id)
 		{
@@ -42,7 +44,7 @@ public function getId()
 		}
 		
 		/**
-		 * @return Identifier
+		 * @return \Onphp\Identifier
 		**/
 		public function setId($id)
 		{
@@ -52,7 +54,7 @@ public function setId($id)
 		}
 		
 		/**
-		 * @return Identifier
+		 * @return \Onphp\Identifier
 		**/
 		public function finalize()
 		{
diff --git a/core/Base/Instantiatable.class.php b/core/Base/Instantiatable.class.php
index 401c407b93..16a7e5fd4b 100644
--- a/core/Base/Instantiatable.class.php
+++ b/core/Base/Instantiatable.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface Instantiatable
 	{
 		public static function me();
diff --git a/core/Base/IntervalUnit.class.php b/core/Base/IntervalUnit.class.php
index 212887bbde..d7e35184e8 100644
--- a/core/Base/IntervalUnit.class.php
+++ b/core/Base/IntervalUnit.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Base
 	**/
+	namespace Onphp;
+
 	final class IntervalUnit
 	{
 		private $name		= null;
@@ -31,7 +33,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		 * 
 		 * Emulates PostgreSQL's date_trunc() function
 		 * 
diff --git a/core/Base/Listable.class.php b/core/Base/Listable.class.php
index a2b153434d..242e2dfb7e 100644
--- a/core/Base/Listable.class.php
+++ b/core/Base/Listable.class.php
@@ -9,33 +9,35 @@
 	*                                                                         *
 	***************************************************************************/
 	
-	interface Listable extends Iterator, ArrayAccess, Countable, SeekableIterator
+	namespace Onphp;
+
+	interface Listable extends \Iterator, \ArrayAccess, \Countable, \SeekableIterator
 	{
 		/**
 		 * Push new list item to the tail of list
 		 *
-		 * @return Listable
+		 * @return \Onphp\Listable
 		 */
 		public function append($value);
 		
 		/**
 		 * Push new list item to the head of list
 		 *
-		 * @return Listable
+		 * @return \Onphp\Listable
 		 */
 		public function prepend($value);
 		
 		/**
 		 * Trims $length items starting from @start
 		 *
-		 * @return Listable
+		 * @return \Onphp\Listable
 		 */
 		public function trim($start, $length);
 		
 		/**
 		 * Truncates list
 		 *
-		 * @return Listable
+		 * @return \Onphp\Listable
 		 */
 		public function clear();
 		
@@ -52,7 +54,7 @@ public function get($index);
 		public function pop();
 		
 		/**
-		 * @return Listable
+		 * @return \Onphp\Listable
 		 */
 		public function set($index, $value);
 		
diff --git a/core/Base/Named.class.php b/core/Base/Named.class.php
index 0af5c16119..3d70b74a4d 100644
--- a/core/Base/Named.class.php
+++ b/core/Base/Named.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface Named extends Identifiable
 	{
 		public function getName();
diff --git a/core/Base/NamedObject.class.php b/core/Base/NamedObject.class.php
index 7f5628c3a4..5ba65f0dea 100644
--- a/core/Base/NamedObject.class.php
+++ b/core/Base/NamedObject.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class NamedObject
 		extends IdentifiableObject
 		implements Named, Stringable
@@ -34,7 +36,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return NamedObject
+		 * @return \Onphp\NamedObject
 		**/
 		public function setName($name)
 		{
diff --git a/core/Base/PriorityQueue.class.php b/core/Base/PriorityQueue.class.php
index 18a4d9f714..b0743e2c09 100644
--- a/core/Base/PriorityQueue.class.php
+++ b/core/Base/PriorityQueue.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class PriorityQueue
 	{
 		private $heap 			= array(0);
diff --git a/core/Base/Prototyped.class.php b/core/Base/Prototyped.class.php
index e76706dea4..b6fff536c0 100644
--- a/core/Base/Prototyped.class.php
+++ b/core/Base/Prototyped.class.php
@@ -13,10 +13,12 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface Prototyped
 	{
 		/**
-		 * @return AbstractProtoClass
+		 * @return \Onphp\AbstractProtoClass
 		**/
 		public static function proto();
 	}
diff --git a/core/Base/Session.class.php b/core/Base/Session.class.php
index 0eb329d404..7e045807e2 100644
--- a/core/Base/Session.class.php
+++ b/core/Base/Session.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Base
 	**/
+	namespace Onphp;
+
 	final class SessionNotStartedException extends BaseException
 	{
 		public function __construct()
@@ -41,7 +43,7 @@ public static function start()
 		}
 		
 		/**
-		 * @throws SessionNotStartedException
+		 * @throws \Onphp\SessionNotStartedException
 		**/
 		/* void */ public static function destroy()
 		{
@@ -65,7 +67,7 @@ public static function flush()
 		}
 		
 		/**
-		 * @throws SessionNotStartedException
+		 * @throws \Onphp\SessionNotStartedException
 		**/
 		/* void */ public static function assign($var, $val)
 		{
@@ -76,8 +78,8 @@ public static function flush()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @throws SessionNotStartedException
+		 * @throws \Onphp\WrongArgumentException
+		 * @throws \Onphp\SessionNotStartedException
 		**/
 		public static function exist(/* ... */)
 		{
@@ -96,7 +98,7 @@ public static function exist(/* ... */)
 		}
 		
 		/**
-		 * @throws SessionNotStartedException
+		 * @throws \Onphp\SessionNotStartedException
 		**/
 		public static function get($var)
 		{
@@ -112,8 +114,8 @@ public static function &getAll()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @throws SessionNotStartedException
+		 * @throws \Onphp\WrongArgumentException
+		 * @throws \Onphp\SessionNotStartedException
 		**/
 		/* void */ public static function drop(/* ... */)
 		{
@@ -128,7 +130,7 @@ public static function &getAll()
 		}
 		
 		/**
-		 * @throws SessionNotStartedException
+		 * @throws \Onphp\SessionNotStartedException
 		**/
 		/* void */ public static function dropAll()
 		{
@@ -162,7 +164,7 @@ public static function isStarted()
 		}
 		
 		/**
-		 * @throws SessionNotStartedException
+		 * @throws \Onphp\SessionNotStartedException
 		**/
 		public static function getName()
 		{
@@ -173,7 +175,7 @@ public static function getName()
 		}
 		
 		/**
-		 * @throws SessionNotStartedException
+		 * @throws \Onphp\SessionNotStartedException
 		**/
 		public static function getId()
 		{
diff --git a/core/Base/Singleton.class.php b/core/Base/Singleton.class.php
index 4c2720c2c3..eb50d3584f 100644
--- a/core/Base/Singleton.class.php
+++ b/core/Base/Singleton.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class Singleton
 	{
 		private static $instances = array();
@@ -26,18 +28,24 @@ final public static function getInstance(
 			$class, $args = null /* , ... */
 		)
 		{
+			$class = ClassUtils::normalClassName($class);
+			
 			if (!isset(self::$instances[$class])) {
 				// for Singleton::getInstance('class_name', $arg1, ...) calling
 				if (2 < func_num_args()) {
 					$args = func_get_args();
 					array_shift($args);
-					
-					// can't call protected constructor through reflection
-					eval(
-						'$object = new '.$class
-						.'($args['.implode('],$args[', array_keys($args)).']);'
+
+					// emulation of ReflectionClass->newInstanceWithoutConstructor
+					$object =
+						unserialize(
+							sprintf('O:%d:"%s":0:{}', strlen($class), $class)
+						);
+
+					call_user_func_array(
+						array($object, '__construct'),
+						$args
 					);
-				
 				} else {
 					$object =
 						$args
@@ -63,6 +71,8 @@ final public static function getAllInstances()
 		
 		/* void */ final public static function dropInstance($class)
 		{
+			$class = ClassUtils::normalClassName($class);
+			
 			if (!isset(self::$instances[$class]))
 				throw new MissingElementException('knows nothing about '.$class);
 			
diff --git a/core/Base/StaticFactory.class.php b/core/Base/StaticFactory.class.php
index 7a29385b5c..5319963a2a 100644
--- a/core/Base/StaticFactory.class.php
+++ b/core/Base/StaticFactory.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class StaticFactory
 	{
 		final private function __construct() {/*_*/}
diff --git a/core/Base/Stringable.class.php b/core/Base/Stringable.class.php
index 1736f1868b..46bedf83e9 100644
--- a/core/Base/Stringable.class.php
+++ b/core/Base/Stringable.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface Stringable
 	{
 		public function toString();
diff --git a/core/Base/Ternary.class.php b/core/Base/Ternary.class.php
index cd099e70c0..1b0f07b950 100644
--- a/core/Base/Ternary.class.php
+++ b/core/Base/Ternary.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Base
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class Ternary implements Stringable
 	{
 		private $trinity = null;	// ;-)
@@ -25,7 +27,7 @@ public function __construct($boolean = null)
 		}
 		
 		/**
-		 * @return Ternary
+		 * @return \Onphp\Ternary
 		**/
 		public static function create($boolean = null)
 		{
@@ -33,7 +35,7 @@ public static function create($boolean = null)
 		}
 		
 		/**
-		 * @return Ternary
+		 * @return \Onphp\Ternary
 		**/
 		public static function spawn($value, $true, $false, $null = null)
 		{
@@ -66,7 +68,7 @@ public function isFalse()
 		}
 		
 		/**
-		 * @return Ternary
+		 * @return \Onphp\Ternary
 		**/
 		public function setNull()
 		{
@@ -76,7 +78,7 @@ public function setNull()
 		}
 		
 		/**
-		 * @return Ternary
+		 * @return \Onphp\Ternary
 		**/
 		public function setTrue()
 		{
@@ -86,7 +88,7 @@ public function setTrue()
 		}
 		
 		/**
-		 * @return Ternary
+		 * @return \Onphp\Ternary
 		**/
 		public function setFalse()
 		{
@@ -101,7 +103,7 @@ public function getValue()
 		}
 		
 		/**
-		 * @return Ternary
+		 * @return \Onphp\Ternary
 		**/
 		public function setValue($boolean = null)
 		{
diff --git a/core/Base/Time.class.php b/core/Base/Time.class.php
index 5dbd9a0421..5f2d998ede 100644
--- a/core/Base/Time.class.php
+++ b/core/Base/Time.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Base
 	**/
+	namespace Onphp;
+
 	final class Time implements Stringable
 	{
 		private $hour	= 0;
@@ -23,7 +25,7 @@ final class Time implements Stringable
 		private $string	= null;
 		
 		/**
-		 * @return Time
+		 * @return \Onphp\Time
 		**/
 		public static function create($input)
 		{
@@ -97,7 +99,7 @@ public function getHour()
 		}
 		
 		/**
-		 * @return Time
+		 * @return \Onphp\Time
 		**/
 		public function setHour($hour)
 		{
@@ -121,7 +123,7 @@ public function getMinute()
 		}
 		
 		/**
-		 * @return Time
+		 * @return \Onphp\Time
 		**/
 		public function setMinute($minute)
 		{
@@ -146,7 +148,7 @@ public function getSecond()
 		}
 		
 		/**
-		 * @return Time
+		 * @return \Onphp\Time
 		**/
 		public function setSecond($second)
 		{
diff --git a/core/Base/Timestamp.class.php b/core/Base/Timestamp.class.php
index 85f3f2c1a7..f96f38f913 100644
--- a/core/Base/Timestamp.class.php
+++ b/core/Base/Timestamp.class.php
@@ -18,12 +18,14 @@
 	 *
 	 * @ingroup Base
 	**/
+	namespace Onphp;
+
 	class Timestamp extends Date
 	{
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
-		public static function create($timestamp, DateTimeZone $zone=null)
+		public static function create($timestamp, \DateTimeZone $zone=null)
 		{
 			return new static($timestamp, $zone);
 		}
@@ -34,7 +36,7 @@ public static function now()
 		}
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public static function makeNow()
 		{
@@ -42,14 +44,14 @@ public static function makeNow()
 		}
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public static function makeToday()
 		{
 			return new static(static::today());
 		}
 
-		public function __construct($dateTime, DateTimeZone $zone=null)
+		public function __construct($dateTime, \DateTimeZone $zone=null)
 		{
 			parent::__construct($dateTime);
 
@@ -63,8 +65,8 @@ private function getDefaultTimeZone()
 		{
 			try {
 				$defaultTimeZoneName = date_default_timezone_get();
-				return new DateTimeZone($defaultTimeZoneName);
-			} catch(Exception $e) {
+				return new \DateTimeZone($defaultTimeZoneName);
+			} catch(\Exception $e) {
 				throw new WrongStateException(
 					"strange default time zone given - '{$defaultTimeZoneName}'!".
 					'Use date_default_timezone_set() for set valid default time zone.'
@@ -149,7 +151,7 @@ public function toIsoString($convertToUtc = true)
 		}
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public function toTimestamp()
 		{
diff --git a/core/Base/TimestampTZ.class.php b/core/Base/TimestampTZ.class.php
index 47234e984c..dd086e562a 100644
--- a/core/Base/TimestampTZ.class.php
+++ b/core/Base/TimestampTZ.class.php
@@ -11,6 +11,8 @@
 	/**
 	 * Timestamp with time zone
 	 */
+	namespace Onphp;
+
 	class TimestampTZ extends Timestamp
 	{
 		/**
@@ -23,20 +25,20 @@ protected static function getFormat()
 		}
 
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public function toTimestamp($zone=null)
 		{
 			if($zone) {
 
 				if(
-					!($zone instanceof DateTimeZone)
+					!($zone instanceof \DateTimeZone)
 					&& is_scalar($zone)
 				) {
-					$zone = new DateTimeZone($zone);
+					$zone = new \DateTimeZone($zone);
 				}
 
-				return new static($this->toStamp(), $zone);
+				return new Timestamp($this->toStamp(), $zone);
 			}
 
 			return  parent::toTimestamp();
diff --git a/core/Cache/AggregateCache.class.php b/core/Cache/AggregateCache.class.php
index 0fdd030a34..4915fa9786 100644
--- a/core/Cache/AggregateCache.class.php
+++ b/core/Cache/AggregateCache.class.php
@@ -15,6 +15,8 @@
 	 * 
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	class AggregateCache extends BaseAggregateCache
 	{
 		const LEVEL_ULTRAHIGH	= 0xFFFF;
@@ -26,7 +28,7 @@ class AggregateCache extends BaseAggregateCache
 		private $levels		= array();
 
 		/**
-		 * @return AggregateCache
+		 * @return \Onphp\AggregateCache
 		**/
 		public static function create()
 		{
@@ -34,7 +36,7 @@ public static function create()
 		}
 
 		/**
-		 * @return AggregateCache
+		 * @return \Onphp\AggregateCache
 		**/
 		public function addPeer(
 			$label, CachePeer $peer, $level = self::LEVEL_NORMAL
@@ -48,7 +50,7 @@ public function addPeer(
 		}
 		
 		/**
-		 * @return AggregateCache
+		 * @return \Onphp\AggregateCache
 		**/
 		public function setClassLevel($class, $level)
 		{
diff --git a/core/Cache/BaseAggregateCache.class.php b/core/Cache/BaseAggregateCache.class.php
index 50ea2d956c..8989659d5b 100644
--- a/core/Cache/BaseAggregateCache.class.php
+++ b/core/Cache/BaseAggregateCache.class.php
@@ -14,12 +14,14 @@
 	 *
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	abstract class BaseAggregateCache extends SelectivePeer
 	{
 		protected $peers	= array();
 		
 		/**
-		 * @return BaseAggregateCache
+		 * @return \Onphp\BaseAggregateCache
 		**/
 		public function dropPeer($label)
 		{
@@ -34,7 +36,7 @@ public function dropPeer($label)
 		}
 
 		/**
-		 * @return BaseAggregateCache
+		 * @return \Onphp\BaseAggregateCache
 		**/
 		public function checkAlive()
 		{
@@ -52,7 +54,7 @@ public function checkAlive()
 		abstract protected function guessLabel($key);
 
 		/**
-		 * @return BaseAggregateCache
+		 * @return \Onphp\BaseAggregateCache
 		**/
 		protected function doAddPeer($label, CachePeer $peer)
 		{
@@ -141,7 +143,7 @@ public function delete($key)
 		}
 
 		/**
-		 * @return AggregateCache
+		 * @return \Onphp\AggregateCache
 		**/
 		public function clean()
 		{
diff --git a/core/Cache/BaseLocker.class.php b/core/Cache/BaseLocker.class.php
index 55a626d4f1..e723fc3291 100644
--- a/core/Cache/BaseLocker.class.php
+++ b/core/Cache/BaseLocker.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Lockers
 	**/
+	namespace Onphp;
+
 	abstract class BaseLocker extends Singleton
 	{
 		protected $pool = array();
diff --git a/core/Cache/Cache.class.php b/core/Cache/Cache.class.php
index a863d19b1d..8c12104d6b 100644
--- a/core/Cache/Cache.class.php
+++ b/core/Cache/Cache.class.php
@@ -19,6 +19,8 @@
 	 * 
 	 * @example cacheSettings.php
 	**/
+	namespace Onphp;
+
 	final class Cache extends StaticFactory implements Instantiatable
 	{
 		const NOT_FOUND			= 'nil';
@@ -43,7 +45,7 @@ final class Cache extends StaticFactory implements Instantiatable
 		private static $instances = array();
 		
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public static function me()
 		{
@@ -82,7 +84,7 @@ public static function appendDaoMap($map)
 		}
 		
 		/**
-		 * @return BaseDaoWorker
+		 * @return \Onphp\BaseDaoWorker
 		**/
 		public static function worker($dao)
 		{
diff --git a/core/Cache/CachePeer.class.php b/core/Cache/CachePeer.class.php
index f6c41e1b80..853faa31b0 100644
--- a/core/Cache/CachePeer.class.php
+++ b/core/Cache/CachePeer.class.php
@@ -112,6 +112,8 @@ public function __construct(
 	 * 
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	abstract class CachePeer
 	{
 		const TIME_SWITCH		= 2592000; // 60 * 60 * 24 * 30
@@ -132,7 +134,7 @@ abstract protected function store(
 		abstract public function append($key, $data);
 		
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public function clean()
 		{
@@ -176,7 +178,7 @@ public function isAlive()
 		}
 		
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public function mark($className)
 		{
@@ -184,7 +186,7 @@ public function mark($className)
 		}
 		
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public function enableCompression()
 		{
@@ -193,7 +195,7 @@ public function enableCompression()
 		}
 
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public function disableCompression()
 		{
@@ -201,6 +203,14 @@ public function disableCompression()
 			return $this;
 		}
 
+		/**
+		 * @return CachePeer
+		 */
+		public function getRuntimeCopy()
+		{
+			return new RuntimeMemory();
+		}
+
 		protected function prepareData($value)
 		{
 			if ($this->compress)
diff --git a/core/Cache/CyclicAggregateCache.class.php b/core/Cache/CyclicAggregateCache.class.php
index cc0c1f0749..0982a3eb23 100644
--- a/core/Cache/CyclicAggregateCache.class.php
+++ b/core/Cache/CyclicAggregateCache.class.php
@@ -13,6 +13,8 @@
 	 *
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	final class CyclicAggregateCache extends BaseAggregateCache
 	{
 		const DEFAULT_SUMMARY_WEIGHT = 1000;
@@ -21,7 +23,7 @@ final class CyclicAggregateCache extends BaseAggregateCache
 		private $sorted = false;
 
 		/**
-		 * @return CyclicAggregateCache
+		 * @return \Onphp\CyclicAggregateCache
 		**/
 		public static function create()
 		{
diff --git a/core/Cache/DebugCachePeer.class.php b/core/Cache/DebugCachePeer.class.php
index 0d3ddfefb8..af3d1eeb8c 100644
--- a/core/Cache/DebugCachePeer.class.php
+++ b/core/Cache/DebugCachePeer.class.php
@@ -14,6 +14,8 @@
 	 *
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	final class DebugCachePeer extends SelectivePeer
 	{
 		private $peer				= null;
@@ -25,7 +27,7 @@ final class DebugCachePeer extends SelectivePeer
 		
 		
 		/**
-		 * @return DebugCachePeer
+		 * @return \Onphp\DebugCachePeer
 		**/
 		public static function create(
 			CachePeer $peer, $logfile, $isWeb = true, $appendFile = true
@@ -88,7 +90,7 @@ public function dropWhiteListActions()
 		}
 		
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public function mark($className)
 		{
@@ -151,7 +153,7 @@ public function delete($key)
 		}
 		
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public function clean()
 		{
diff --git a/core/Cache/DirectoryLocker.class.php b/core/Cache/DirectoryLocker.class.php
index 5f4c38a17c..b39fb4023e 100644
--- a/core/Cache/DirectoryLocker.class.php
+++ b/core/Cache/DirectoryLocker.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Lockers
 	**/
+	namespace Onphp;
+
 	final class DirectoryLocker extends BaseLocker
 	{
 		private $directory = null;
diff --git a/core/Cache/FileLocker.class.php b/core/Cache/FileLocker.class.php
index e234ab5f0c..93cd72ace9 100644
--- a/core/Cache/FileLocker.class.php
+++ b/core/Cache/FileLocker.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Lockers
 	**/
+	namespace Onphp;
+
 	final class FileLocker extends BaseLocker
 	{
 		private $directory = null;
diff --git a/core/Cache/ListGenerator.class.php b/core/Cache/ListGenerator.class.php
index 6e20f24f72..5491cfeada 100644
--- a/core/Cache/ListGenerator.class.php
+++ b/core/Cache/ListGenerator.class.php
@@ -12,9 +12,11 @@
 	/**
 	 * @param string $key 
 	 * 
-	 * @return Listable
+	 * @return \Onphp\Listable
 	 */
 	 
+	namespace Onphp;
+
 	interface ListGenerator
 	{
 		public function fetchList($key);
diff --git a/core/Cache/MemcachedLocker.class.php b/core/Cache/MemcachedLocker.class.php
index c6d12653fd..e39aa34650 100644
--- a/core/Cache/MemcachedLocker.class.php
+++ b/core/Cache/MemcachedLocker.class.php
@@ -15,6 +15,8 @@
 	 *
 	 * @ingroup Lockers
 	**/
+	namespace Onphp;
+
 	final class MemcachedLocker extends BaseLocker implements Instantiatable
 	{
 		const VALUE = 0x1;
diff --git a/core/Cache/PeclMemcache.class.php b/core/Cache/PeclMemcache.class.php
index 1695e8b93d..03bbae45e6 100644
--- a/core/Cache/PeclMemcache.class.php
+++ b/core/Cache/PeclMemcache.class.php
@@ -17,6 +17,8 @@
 	 *
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	class PeclMemcache extends CachePeer
 	{
 		const DEFAULT_PORT		= 11211;
@@ -25,7 +27,7 @@ class PeclMemcache extends CachePeer
 		private $instance = null;
 		
 		/**
-		 * @return PeclMemcache
+		 * @return \Onphp\PeclMemcache
 		**/
 		public static function create(
 			$host = self::DEFAULT_HOST,
@@ -40,7 +42,7 @@ public function __construct(
 			$port = self::DEFAULT_PORT
 		)
 		{
-			$this->instance = new Memcache();
+			$this->instance = new \Memcache();
 			
 			try {
 				try {
@@ -67,7 +69,7 @@ public function __destruct()
 		}
 		
 		/**
-		 * @return PeclMemcached
+		 * @return \Onphp\PeclMemcached
 		**/
 		public function clean()
 		{
diff --git a/core/Cache/PeclMemcached.class.php b/core/Cache/PeclMemcached.class.php
index 651e38e07e..3c8fef9eca 100644
--- a/core/Cache/PeclMemcached.class.php
+++ b/core/Cache/PeclMemcached.class.php
@@ -17,6 +17,8 @@
 	 *
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	class PeclMemcached extends CachePeer
 	{
 		const DEFAULT_PORT		= 11211;
@@ -31,7 +33,7 @@ class PeclMemcached extends CachePeer
 		private $triedConnect	= false;
 		
 		/**
-		 * @return PeclMemcached
+		 * @return \Onphp\PeclMemcached
 		**/
 		public static function create(
 			$host = self::DEFAULT_HOST,
@@ -72,7 +74,7 @@ public function isAlive()
 		}
 		
 		/**
-		 * @return PeclMemcached
+		 * @return \Onphp\PeclMemcached
 		**/
 		public function clean()
 		{
@@ -168,7 +170,7 @@ public function append($key, $data)
 		
 		/**
 		 * @param float $requestTimeout time in seconds
-		 * @return PeclMemcached
+		 * @return \Onphp\PeclMemcached
 		 */
 		public function setTimeout($requestTimeout)
 		{
@@ -224,7 +226,7 @@ protected function store(
 		
 		protected function connect()
 		{
-			$this->instance = new Memcache();
+			$this->instance = new \Memcache();
 			
 			try {
 				
diff --git a/core/Cache/ReadOnlyPeer.class.php b/core/Cache/ReadOnlyPeer.class.php
index 90cbc148fe..71a30cbfdb 100644
--- a/core/Cache/ReadOnlyPeer.class.php
+++ b/core/Cache/ReadOnlyPeer.class.php
@@ -14,15 +14,17 @@
 	 *
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	final class ReadOnlyPeer extends CachePeer
 	{
 		/**
-		 * @var CachePeer
+		 * @var \Onphp\CachePeer
 		 */
 		private $innerPeer = null;
 
 		/**
-		 * @return ReadOnlyPeer
+		 * @return \Onphp\ReadOnlyPeer
 		 */
 		public static function create(CachePeer $peer)
 		{
diff --git a/core/Cache/RubberFileSystem.class.php b/core/Cache/RubberFileSystem.class.php
index ffaa5da89b..a1b2b5a122 100644
--- a/core/Cache/RubberFileSystem.class.php
+++ b/core/Cache/RubberFileSystem.class.php
@@ -14,12 +14,14 @@
 	 * 
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	final class RubberFileSystem extends CachePeer
 	{
 		private $directory	= null;
 		
 		/**
-		 * @return RubberFileSystem
+		 * @return \Onphp\RubberFileSystem
 		**/
 		public static function create($directory = 'cache/')
 		{
@@ -53,7 +55,7 @@ public function isAlive()
 		}
 		
 		/**
-		 * @return RubberFileSystem
+		 * @return \Onphp\RubberFileSystem
 		**/
 		public function clean()
 		{
diff --git a/core/Cache/RuntimeMemory.class.php b/core/Cache/RuntimeMemory.class.php
index afd273773a..a1c0581601 100644
--- a/core/Cache/RuntimeMemory.class.php
+++ b/core/Cache/RuntimeMemory.class.php
@@ -14,12 +14,14 @@
 	 * 
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	final class RuntimeMemory extends CachePeer
 	{
 		private $cache = array();
 		
 		/**
-		 * @return RuntimeMemory
+		 * @return \Onphp\RuntimeMemory
 		**/
 		public static function create()
 		{
@@ -66,7 +68,7 @@ public function delete($key)
 		}
 		
 		/**
-		 * @return RuntimeMemory
+		 * @return \Onphp\RuntimeMemory
 		**/
 		public function clean()
 		{
diff --git a/core/Cache/SelectivePeer.class.php b/core/Cache/SelectivePeer.class.php
index 2b8ae08294..e98ccd3786 100644
--- a/core/Cache/SelectivePeer.class.php
+++ b/core/Cache/SelectivePeer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	abstract class SelectivePeer extends CachePeer
 	{
 		const MARGINAL_VALUE = 'i_am_declassed_element'; // Yanka R.I.P.
@@ -19,7 +21,7 @@ abstract class SelectivePeer extends CachePeer
 		protected $className	= null;
 		
 		/**
-		 * @return SelectivePeer
+		 * @return \Onphp\SelectivePeer
 		**/
 		public function mark($className)
 		{
diff --git a/core/Cache/SemaphorePool.class.php b/core/Cache/SemaphorePool.class.php
index 51c7060274..938092c074 100644
--- a/core/Cache/SemaphorePool.class.php
+++ b/core/Cache/SemaphorePool.class.php
@@ -19,9 +19,11 @@
 	 * 
 	 * @ingroup Lockers
 	**/
+	namespace Onphp;
+
 	final class SemaphorePool extends BaseLocker implements Instantiatable
 	{
-		private static $lockerName	= 'DirectoryLocker';
+		private static $lockerName	= '\Onphp\DirectoryLocker';
 		private static $locker		= null;
 		
 		protected function __construct()
@@ -38,7 +40,7 @@ public static function setDefaultLocker($name)
 		}
 		
 		/**
-		 * @return SemaphorePool
+		 * @return \Onphp\SemaphorePool
 		**/
 		public static function me()
 		{
diff --git a/core/Cache/SequentialCache.class.php b/core/Cache/SequentialCache.class.php
index 9a58c5e0e5..d067704482 100644
--- a/core/Cache/SequentialCache.class.php
+++ b/core/Cache/SequentialCache.class.php
@@ -9,6 +9,8 @@
  *                                                                          *
  ****************************************************************************/
 
+	namespace Onphp;
+
 	final class SequentialCache extends CachePeer
 	{
 		/**
@@ -24,14 +26,14 @@ final class SequentialCache extends CachePeer
 		private $slaves	= array();
 		
 		/**
-		 * @var CachePeer
+		 * @var \Onphp\CachePeer
 		 */
 		private $master	= null;
 
 		/**
-		 * @param CachePeer $master
+		 * @param \Onphp\CachePeer $master
 		 * @param array $slaves or CachePeer
-		 * @return SequentialCache 
+		 * @return \Onphp\SequentialCache 
 		 */
 		public static function create(CachePeer $master, array $slaves = array())
 		{
@@ -39,7 +41,7 @@ public static function create(CachePeer $master, array $slaves = array())
 		}
 		
 		/**
-		 * @param CachePeer $master
+		 * @param \Onphp\CachePeer $master
 		 * @param array $slaves or CachePeer
 		 */
 		public function __construct(CachePeer $master, array $slaves = array())
@@ -52,8 +54,8 @@ public function __construct(CachePeer $master, array $slaves = array())
 		}
 		
 		/**
-		 * @param CachePeer $master
-		 * @return \SequentialCache 
+		 * @param \Onphp\CachePeer $master
+		 * @return \Onphp\SequentialCache 
 		 */
 		public function setMaster(CachePeer $master)
 		{
@@ -65,8 +67,8 @@ public function setMaster(CachePeer $master)
 		}
 		
 		/**
-		 * @param CachePeer $master
-		 * @return \SequentialCache 
+		 * @param \Onphp\CachePeer $master
+		 * @return \Onphp\SequentialCache 
 		 */
 		public function addPeer(CachePeer $peer)
 		{
@@ -79,7 +81,7 @@ public function addPeer(CachePeer $peer)
 		public function get($key)
 		{
 			foreach ($this->list as $val) {
-				/* @var $val CachePeer */
+				/* @var $val \Onphp\CachePeer */
 				$result = $val->get($key);
 				
 				if (
@@ -90,7 +92,7 @@ public function get($key)
 				}
 			}
 			
-			throw new RuntimeException('All peers are dead');
+			throw new \RuntimeException('All peers are dead');
 		}
 
 		public function append($key, $data)
@@ -123,7 +125,7 @@ private function foreachItem($method, array $args)
 			$result = true;
 			
 			foreach ($this->list as $peer) {
-				/* @var $peer CachePeer */
+				/* @var $peer \Onphp\CachePeer */
 				$result = call_user_func_array(array($peer, $method), $args) && $result;
 			}
 			
diff --git a/core/Cache/SharedMemory.class.php b/core/Cache/SharedMemory.class.php
index e7a49feb66..a079d65e53 100644
--- a/core/Cache/SharedMemory.class.php
+++ b/core/Cache/SharedMemory.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	final class SharedMemory extends SelectivePeer
 	{
 		const INDEX_SEGMENT			= 12345678;
@@ -26,7 +28,7 @@ final class SharedMemory extends SelectivePeer
 		private static $attached = array();
 		
 		/**
-		 * @return SharedMemory
+		 * @return \Onphp\SharedMemory
 		**/
 		public static function create(
 			$defaultSize = self::DEFAULT_SEGMENT_SIZE,
@@ -37,7 +39,7 @@ public static function create(
 		}
 		
 		/**
-		 * @return SharedMemory
+		 * @return \Onphp\SharedMemory
 		**/
 		public function __construct(
 			$defaultSize = self::DEFAULT_SEGMENT_SIZE,
@@ -145,7 +147,7 @@ public function isAlive()
 		}
 		
 		/**
-		 * @return SharedMemory
+		 * @return \Onphp\SharedMemory
 		**/
 		public function clean()
 		{
diff --git a/core/Cache/SimpleAggregateCache.class.php b/core/Cache/SimpleAggregateCache.class.php
index 42a35dc3e2..f68af09488 100644
--- a/core/Cache/SimpleAggregateCache.class.php
+++ b/core/Cache/SimpleAggregateCache.class.php
@@ -15,13 +15,15 @@
 	 * 
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	final class SimpleAggregateCache extends AggregateCache
 	{
 		private $peerAmount	= null;
 		private $labels		= null;
 		
 		/**
-		 * @return SimpleAggregateCache
+		 * @return \Onphp\SimpleAggregateCache
 		**/
 		public static function create()
 		{
diff --git a/core/Cache/SocketMemcached.class.php b/core/Cache/SocketMemcached.class.php
index 8a34f7c3f0..d42ea3bd47 100644
--- a/core/Cache/SocketMemcached.class.php
+++ b/core/Cache/SocketMemcached.class.php
@@ -19,6 +19,8 @@
 	 *
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	class SocketMemcached extends CachePeer
 	{
 		const DEFAULT_PORT		= 11211;
@@ -32,7 +34,7 @@ class SocketMemcached extends CachePeer
 		private $buffer		= self::DEFAULT_BUFFER;
 		
 		/**
-		 * @return SocketMemcached
+		 * @return \Onphp\SocketMemcached
 		**/
 		public static function create(
 			$host = self::DEFAULT_HOST,
@@ -70,7 +72,7 @@ public function __destruct()
 		}
 
 		/**
-		 * @return SocketMemcached
+		 * @return \Onphp\SocketMemcached
 		 */
 		public function setTimeout($microseconds)
 		{
@@ -90,7 +92,7 @@ public function setTimeout($microseconds)
 
 
 		/**
-		 * @return SocketMemcached
+		 * @return \Onphp\SocketMemcached
 		**/
 		public function clean()
 		{
diff --git a/core/Cache/SystemFiveLocker.class.php b/core/Cache/SystemFiveLocker.class.php
index 37c0ec3dea..1c61299d33 100644
--- a/core/Cache/SystemFiveLocker.class.php
+++ b/core/Cache/SystemFiveLocker.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Lockers
 	**/
+	namespace Onphp;
+
 	final class SystemFiveLocker extends BaseLocker
 	{
 		public function get($key)
diff --git a/core/Cache/WatermarkedPeer.class.php b/core/Cache/WatermarkedPeer.class.php
index 3319db692d..15fd1fe9a0 100644
--- a/core/Cache/WatermarkedPeer.class.php
+++ b/core/Cache/WatermarkedPeer.class.php
@@ -14,16 +14,19 @@
 	 * 
 	 * @ingroup Cache
 	**/
+	namespace Onphp;
+
 	final class WatermarkedPeer extends SelectivePeer
 	{
 		private $peer		= null;
+		private $originalWatermark = null;
 		private $watermark	= null;
 		
 		/// map class -> watermark
 		private $map		= null;
 		
 		/**
-		 * @return WatermarkedPeer
+		 * @return \Onphp\WatermarkedPeer
 		**/
 		public static function create(
 			CachePeer $peer,
@@ -44,6 +47,7 @@ public function __construct(
 		
 		public function setWatermark($watermark)
 		{
+			$this->originalWatermark = $watermark;
 			$this->watermark = md5($watermark.' ['.ONPHP_VERSION.']::');
 			
 			return $this;
@@ -68,7 +72,7 @@ public function getActualWatermark()
 		/**
 		 * associative array, className -> watermark
 		 * 
-		 * @return WatermarkedPeer
+		 * @return \Onphp\WatermarkedPeer
 		**/
 		public function setClassMap($map)
 		{
@@ -81,7 +85,7 @@ public function setClassMap($map)
 		}
 		
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public function mark($className)
 		{
@@ -140,7 +144,7 @@ public function delete($key)
 		}
 		
 		/**
-		 * @return CachePeer
+		 * @return \Onphp\CachePeer
 		**/
 		public function clean()
 		{
@@ -158,6 +162,19 @@ public function append($key, $data)
 		{
 			return $this->peer->append($this->getActualWatermark().$key, $data);
 		}
+
+		/**
+		 * @return CachePeer
+		 */
+		public function getRuntimeCopy()
+		{
+			$newWm = new WatermarkedPeer(
+				$this->peer->getRuntimeCopy(),
+				$this->originalWatermark
+			);
+			$newWm->map = $this->map;
+			return $newWm;
+		}
 		
 		protected function store(
 			$action, $key, $value, $expires = Cache::EXPIRES_MEDIUM
diff --git a/core/Cache/eAcceleratorLocker.class.php b/core/Cache/eAcceleratorLocker.class.php
index 7c3e0f7101..db3e62787d 100644
--- a/core/Cache/eAcceleratorLocker.class.php
+++ b/core/Cache/eAcceleratorLocker.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Lockers
 	**/
+	namespace Onphp;
+
 	final class eAcceleratorLocker extends BaseLocker
 	{
 		public function get($key)
diff --git a/core/DB/DB.class.php b/core/DB/DB.class.php
index ce170d2f0a..014107af6d 100644
--- a/core/DB/DB.class.php
+++ b/core/DB/DB.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	abstract class DB
 	{
 		const FULL_TEXT_AND		= 1;
@@ -44,7 +46,7 @@ abstract class DB
 		private $queue			= array();
 		private $toQueue		= false;
 		/**
-		 * @var UncachersPool
+		 * @var \Onphp\UncachersPool
 		 */
 		private $uncacher		= null;
 		private $outOfTransactionCachePeer = null;
@@ -65,7 +67,7 @@ abstract public function queryCount(Query $query);
 		abstract public function setDbEncoding();
 		
 		/**
-		 * @return Dialect
+		 * @return \Onphp\Dialect
 		 */
 		abstract protected function spawnDialect();
 
@@ -89,7 +91,7 @@ public function getDialect()
 		/**
 		 * Shortcut.
 		 * 
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public static function spawn(
 			$connector, $user, $pass, $host,
@@ -120,7 +122,7 @@ public function getLink()
 		**/
 		//@{
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function begin(
 			/* IsolationLevel */ $level = null,
@@ -143,13 +145,13 @@ public function begin(
 			$this->transaction = true;
 			
 			$this->outOfTransactionCachePeer = Cache::me();
-			Cache::setPeer(new RuntimeMemory());
+			Cache::setPeer(Cache::me()->getRuntimeCopy());
 			
 			return $this;
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function commit()
 		{
@@ -168,7 +170,7 @@ public function commit()
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function rollback()
 		{
@@ -198,7 +200,7 @@ public function inTransaction()
 		**/
 		//@{
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function queueStart()
 		{
@@ -209,7 +211,7 @@ public function queueStart()
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function queueStop()
 		{
@@ -219,7 +221,7 @@ public function queueStop()
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function queueDrop()
 		{
@@ -229,7 +231,7 @@ public function queueDrop()
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function queueFlush()
 		{
@@ -251,7 +253,7 @@ public function isQueueActive()
 		
 		/**
 		 * @param string $savepointName
-		 * @return DB 
+		 * @return \Onphp\DB 
 		 */
 		public function savepointBegin($savepointName)
 		{
@@ -270,7 +272,7 @@ public function savepointBegin($savepointName)
 		
 		/**
 		 * @param string $savepointName
-		 * @return DB 
+		 * @return \Onphp\DB 
 		 */
 		public function savepointRelease($savepointName)
 		{
@@ -292,7 +294,7 @@ public function savepointRelease($savepointName)
 		
 		/**
 		 * @param string $savepointName
-		 * @return DB 
+		 * @return \Onphp\DB 
 		 */
 		public function savepointRollback($savepointName)
 		{
@@ -357,7 +359,7 @@ public function isPersistent()
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function setPersistent($really = false)
 		{
@@ -367,7 +369,7 @@ public function setPersistent($really = false)
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function setUsername($name)
 		{
@@ -377,7 +379,7 @@ public function setUsername($name)
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function setPassword($password)
 		{
@@ -387,7 +389,7 @@ public function setPassword($password)
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function setHostname($host)
 		{
@@ -403,7 +405,7 @@ public function setHostname($host)
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function setBasename($base)
 		{
@@ -413,7 +415,7 @@ public function setBasename($base)
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function setEncoding($encoding)
 		{
@@ -422,17 +424,9 @@ public function setEncoding($encoding)
 			return $this;
 		}
 		
-		public function registerUncacher(UncacherBase $uncacher)
-		{
-			$uncacher->uncache();
-			if ($this->inTransaction()) {
-				$this->getUncacher()->merge($uncacher);
-			}
-		}
-		
 		/**
 		 * @param string $savepointName 
-		 * @return DB
+		 * @return \Onphp\DB
 		 */
 		private function addSavepoint($savepointName)
 		{
@@ -441,11 +435,11 @@ private function addSavepoint($savepointName)
 				
 			$this->savepointList[$savepointName] = true;
 			return $this;
-		}
+			}
 		
 		/**
 		 * @param string $savepointName 
-		 * @return DB
+		 * @return \Onphp\DB
 		 */
 		private function dropSavepoint($savepointName)
 		{
@@ -459,15 +453,23 @@ private function dropSavepoint($savepointName)
 		private function checkSavepointExist($savepointName)
 		{
 			return isset($this->savepointList[$savepointName]);
-		}
+			}
 		
 		private function assertSavePointName($savepointName)
 		{
 			Assert::isEqual(1, preg_match('~^[A-Za-z][A-Za-z0-9]*$~iu', $savepointName));
 		}
 		
+		public function registerUncacher(UncacherBase $uncacher)
+		{
+			$uncacher->uncache();
+			if ($this->inTransaction()) {
+				$this->getUncacher()->merge($uncacher);
+			}
+		}
+		
 		/**
-		 * @return UncachersPool
+		 * @return \Onphp\UncachersPool
 		 */
 		private function getUncacher()
 		{
@@ -477,8 +479,9 @@ private function getUncacher()
 		private function triggerUncacher()
 		{
 			if ($this->uncacher) {
-				$this->uncacher->uncache();
+				$uncacher = $this->uncacher;
 				$this->uncacher = null;
+				$uncacher->uncache();
 			}
 		}
 	}
diff --git a/core/DB/DBPool.class.php b/core/DB/DBPool.class.php
index bb1b85a08a..4fe44e12e3 100644
--- a/core/DB/DBPool.class.php
+++ b/core/DB/DBPool.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	final class DBPool extends Singleton implements Instantiatable
 	{
 		private $default = null;
@@ -21,7 +23,7 @@ final class DBPool extends Singleton implements Instantiatable
 		private $pool = array();
 		
 		/**
-		 * @return DBPool
+		 * @return \Onphp\DBPool
 		**/
 		public static function me()
 		{
@@ -29,7 +31,7 @@ public static function me()
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public static function getByDao(GenericDAO $dao)
 		{
@@ -37,7 +39,7 @@ public static function getByDao(GenericDAO $dao)
 		}
 		
 		/**
-		 * @return DBPool
+		 * @return \Onphp\DBPool
 		**/
 		public function setDefault(DB $db)
 		{
@@ -47,7 +49,7 @@ public function setDefault(DB $db)
 		}
 		
 		/**
-		 * @return DBPool
+		 * @return \Onphp\DBPool
 		**/
 		public function dropDefault()
 		{
@@ -57,8 +59,8 @@ public function dropDefault()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DBPool
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DBPool
 		**/
 		public function addLink($name, DB $db)
 		{
@@ -73,8 +75,8 @@ public function addLink($name, DB $db)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return DBPool
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\DBPool
 		**/
 		public function dropLink($name)
 		{
@@ -89,8 +91,8 @@ public function dropLink($name)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return DB
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\DB
 		**/
 		public function getLink($name = null)
 		{
@@ -120,7 +122,7 @@ public function getLink($name = null)
 		}
 		
 		/**
-		 * @return DBPool
+		 * @return \Onphp\DBPool
 		**/
 		public function shutdown()
 		{
@@ -133,7 +135,7 @@ public function shutdown()
 		}
 		
 		/**
-		 * @return DBPool
+		 * @return \Onphp\DBPool
 		**/
 		public function disconnect()
 		{
diff --git a/core/DB/Dialect.class.php b/core/DB/Dialect.class.php
index 77e1934fb3..c0c8e95106 100644
--- a/core/DB/Dialect.class.php
+++ b/core/DB/Dialect.class.php
@@ -15,13 +15,15 @@
 	 * @ingroup DB
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class /* ANSI's */ Dialect {
 		const LITERAL_NULL = 'NULL';
 		const LITERAL_TRUE = 'TRUE';
 		const LITERAL_FALSE = 'FALSE';
 		
 		/**
-		 * @var DB
+		 * @var \Onphp\DB
 		 */
 		protected $db = null;
 		
@@ -36,7 +38,7 @@ abstract public function quoteValue($value);
 		
 		/**
 		 * @deprecated remove after onPHP 1.2+
-		 * @return LiteDialect
+		 * @return \Onphp\LiteDialect
 		**/
 		public static function me()
 		{
@@ -75,8 +77,8 @@ public static function dropTableMode($cascade = false)
 		}
 		
 		/**
-		 * @param DB $db
-		 * @return Dialect
+		 * @param \Onphp\DB $\Onphp\DB
+		 * @return \Onphp\Dialect
 		 */
 		public function setDB(DB $db)
 		{
diff --git a/core/DB/ImaginaryDialect.class.php b/core/DB/ImaginaryDialect.class.php
index 4bf55a6a9c..0195884a06 100644
--- a/core/DB/ImaginaryDialect.class.php
+++ b/core/DB/ImaginaryDialect.class.php
@@ -15,12 +15,14 @@
 	 * @ingroup DB
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class ImaginaryDialect extends Dialect
 	{
 		private static $self = null;
 		
 		/**
-		 * @return ImaginaryDialect
+		 * @return \Onphp\ImaginaryDialect
 		**/
 		public static function me()
 		{
diff --git a/core/DB/LiteDialect.class.php b/core/DB/LiteDialect.class.php
index 21e7054667..c9ff002eca 100644
--- a/core/DB/LiteDialect.class.php
+++ b/core/DB/LiteDialect.class.php
@@ -16,6 +16,8 @@
 	 *
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	class LiteDialect extends Dialect implements Instantiatable
 	{
 		public function quoteValue($value)
diff --git a/core/DB/LitePDODialect.class.php b/core/DB/LitePDODialect.class.php
index 07021d2d44..e767e723cc 100644
--- a/core/DB/LitePDODialect.class.php
+++ b/core/DB/LitePDODialect.class.php
@@ -16,6 +16,8 @@
 	 *
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	class LitePDODialect extends LiteDialect
 	{
 		public function quoteValue($value)
@@ -34,20 +36,20 @@ public function quoteValue($value)
 		public function quoteBinary($data)
 		{
 			//here must be PDO::PARAM_LOB, but i couldn't get success result, so used base64_encode/decode
-			return $this->getLink()->quote(base64_encode($data), PDO::PARAM_STR);
+			return $this->getLink()->quote(base64_encode($data), \PDO::PARAM_STR);
 		}
 		
 		public function unquoteBinary($data)
 		{
 			try {
 				return base64_decode($data);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				throw new UnimplementedFeatureException('Wrong encoding, if you get it, throw correct exception');
 			}
 		}
 		
 		/**
-		 * @return PDO
+		 * @return \PDO
 		 */
 		protected function getLink() {
 			return parent::getLink();
diff --git a/core/DB/MyDialect.class.php b/core/DB/MyDialect.class.php
index bfc4bd9386..e9b7aebe96 100644
--- a/core/DB/MyDialect.class.php
+++ b/core/DB/MyDialect.class.php
@@ -17,6 +17,8 @@
 	 *
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	class MyDialect extends Dialect
 	{
 		const IN_BOOLEAN_MODE = 1;
diff --git a/core/DB/MyImprovedDialect.class.php b/core/DB/MyImprovedDialect.class.php
index 6b3f0c616c..d5ac25951c 100644
--- a/core/DB/MyImprovedDialect.class.php
+++ b/core/DB/MyImprovedDialect.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	final class MyImprovedDialect extends MyDialect
 	{
 		public function quoteValue($value)
diff --git a/core/DB/MySQL.class.php b/core/DB/MySQL.class.php
index 86e1bdd670..8dd9fba00d 100644
--- a/core/DB/MySQL.class.php
+++ b/core/DB/MySQL.class.php
@@ -16,11 +16,14 @@
 	 * @see http://www.php.net/mysql
 	 * 
 	 * @ingroup DB
+	 * @deprecated use MySQLim
 	**/
+	namespace Onphp;
+
 	final class MySQL extends Sequenceless
 	{
 		/**
-		 * @return MySQL
+		 * @return \Onphp\MySQL
 		**/
 		public function setDbEncoding()
 		{
@@ -30,7 +33,7 @@ public function setDbEncoding()
 		}
 
 		/**
-		 * @return MySQL
+		 * @return \Onphp\MySQL
 		**/
 		public function connect()
 		{
@@ -78,7 +81,7 @@ public function connect()
 		}
 		
 		/**
-		 * @return MySQL
+		 * @return \Onphp\MySQL
 		**/
 		public function disconnect()
 		{
@@ -88,6 +91,11 @@ public function disconnect()
 			return $this;
 		}
 		
+		public function isConnected()
+		{
+			return parent::isConnected() && mysql_ping($this->link);
+		}
+		
 		/**
 		 * Same as query, but returns number of
 		 * affected rows in insert/update queries
@@ -146,9 +154,9 @@ public function queryRaw($queryString)
 				$code = mysql_errno($this->link);
 				
 				if ($code == 1062)
-					$e = 'DuplicateObjectException';
+					$e = '\Onphp\DuplicateObjectException';
 				else
-					$e = 'DatabaseException';
+					$e = '\Onphp\DatabaseException';
 
 				throw new $e(
 					mysql_error($this->link).' - '.$queryString,
@@ -258,7 +266,7 @@ protected function getInsertId()
 		}
 		
 		/**
-		 * @return MyDialect
+		 * @return \Onphp\MyDialect
 		**/
 		protected function spawnDialect()
 		{
diff --git a/core/DB/MySQLim.class.php b/core/DB/MySQLim.class.php
index a1f4987cbd..322b3b98c0 100644
--- a/core/DB/MySQLim.class.php
+++ b/core/DB/MySQLim.class.php
@@ -17,10 +17,14 @@
 	 * 
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	final class MySQLim extends Sequenceless
 	{
+		private $needAutoCommit = false;
+
 		/**
-		 * @return MySQLim
+		 * @return \Onphp\MySQLim
 		**/
 		public function setDbEncoding()
 		{
@@ -30,8 +34,21 @@ public function setDbEncoding()
 		}
 
 		/**
-		 * @return MySQLim
+		 * @param $flag
+		 * @return \Onphp\MySQLim
 		**/
+		public function setNeedAutoCommit($flag)
+		{
+			$this->needAutoCommit = $flag == true;
+			$this->setupAutoCommit();
+			return $this;
+		}
+
+		/**
+		 * @return $this
+		 * @throws \Onphp\DatabaseException
+		 * @throws \Onphp\UnsupportedMethodException
+		 */
 		public function connect()
 		{
 			if ($this->persistent)
@@ -58,12 +75,14 @@ public function connect()
 			
 			if ($this->encoding)
 				$this->setDbEncoding();
+
+			$this->setupAutoCommit();
 			
 			return $this;
 		}
 		
 		/**
-		 * @return MySQLim
+		 * @return \Onphp\MySQLim
 		**/
 		public function disconnect()
 		{
@@ -73,6 +92,11 @@ public function disconnect()
 			return $this;
 		}
 		
+		public function isConnected()
+		{
+			return parent::isConnected() && mysqli_ping($this->link);
+		}
+		
 		/**
 		 * Same as query, but returns number of
 		 * affected rows in insert/update queries
@@ -131,9 +155,9 @@ public function queryRaw($queryString)
 				$code = mysqli_errno($this->link);
 				
 				if ($code == 1062)
-					$e = 'DuplicateObjectException';
+					$e = '\Onphp\DuplicateObjectException';
 				else
-					$e = 'DatabaseException';
+					$e = '\Onphp\DatabaseException';
 				
 				throw new $e(
 					mysqli_error($this->link).' - '.$queryString,
@@ -160,7 +184,7 @@ protected function getInsertId()
 		}
 		
 		/**
-		 * @return MyImprovedDialect
+		 * @return \Onphp\MyImprovedDialect
 		**/
 		protected function spawnDialect()
 		{
@@ -176,5 +200,12 @@ private function checkSingle($result)
 			
 			return $result;
 		}
+
+		private function setupAutoCommit()
+		{
+			if ($this->isConnected()) {
+				mysqli_autocommit($this->link, $this->needAutoCommit);
+			}
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/core/DB/NoSQL/RedisNoSQL.class.php b/core/DB/NoSQL/RedisNoSQL.class.php
index b06c2dc1fa..dee34cfe61 100644
--- a/core/DB/NoSQL/RedisNoSQL.class.php
+++ b/core/DB/NoSQL/RedisNoSQL.class.php
@@ -9,6 +9,8 @@
 	*                                                                         *
 	***************************************************************************/
 
+	namespace Onphp;
+
 	final class RedisNoSQL extends CachePeer implements ListGenerator
 	{
 		const DEFAULT_HOST = 'localhost';
@@ -25,7 +27,7 @@ final class RedisNoSQL extends CachePeer implements ListGenerator
 		 * @param type $host
 		 * @param type $port
 		 * @param type $timeout
-		 * @return RedisNoSQL
+		 * @return \Onphp\RedisNoSQL
 		 */
 		public static function create(
 			$host = self::DEFAULT_HOST,
@@ -52,7 +54,7 @@ public function __destruct()
 			if ($this->alive) {
 				try {
 					$this->redis->close();		//if pconnect - it will be ignored
-				} catch (RedisException $e) {
+				} catch (\RedisException $e) {
 					// shhhh.
 				}
 			}
@@ -64,7 +66,7 @@ public function clean()
 			
 			try {
 				$this->redis->flushDB();
-			} catch (RedisException $e) {
+			} catch (\RedisException $e) {
 				$this->alive = false;
 			}
 			
@@ -77,7 +79,7 @@ public function isAlive()
 			
 			try {
 				$this->alive = $this->redis->ping() == '+PONG';
-			} catch (RedisException $e) {
+			} catch (\RedisException $e) {
 				$this->alive = false;
 			}
 			
@@ -90,7 +92,7 @@ public function append($key, $data)
 			
 			try {
 				return $this->redis->append($key, $data);
-			} catch (RedisException $e) {
+			} catch (\RedisException $e) {
 				return $this->alive = false;
 			}
 		}
@@ -101,7 +103,7 @@ public function decrement($key, $value)
 			
 			try {
 				return $this->redis->decrBy($key, $value);
-			} catch (RedisException $e) {
+			} catch (\RedisException $e) {
 				return null;
 			}
 		}
@@ -112,7 +114,7 @@ public function delete($key)
 			
 			try {
 				return $this->redis->delete($key);
-			} catch (RedisException $e) {
+			} catch (\RedisException $e) {
 				return $this->alive = false;
 			}
 		}
@@ -123,7 +125,7 @@ public function get($key)
 			
 			try {
 				return $this->redis->get($key);
-			} catch (RedisException $e) {
+			} catch (\RedisException $e) {
 				$this->alive = false;
 				
 				return null;
@@ -136,7 +138,7 @@ public function increment($key, $value)
 			
 			try {
 				return $this->redis->incrBy($key, $value);
-			} catch (RedisException $e) {
+			} catch (\RedisException $e) {
 				return null;
 			}
 		}
@@ -144,7 +146,7 @@ public function increment($key, $value)
 		/**
 		 * @param string $key
 		 *
-		 * @return RedisNoSQLList
+		 * @return \Onphp\RedisNoSQLList
 		 */
 		public function fetchList($key, $timeout = null)
 		{
@@ -185,7 +187,7 @@ protected function store($action, $key, $value, $expires = Cache::EXPIRES_MEDIUM
 						$result = $this->redis->set($key, $value);
 						$this->redis->expire($key, $expires);
 						return $result;
-					} catch (RedisException $e) {
+					} catch (\RedisException $e) {
 						return $this->alive = false;
 					}
 					
@@ -201,12 +203,12 @@ protected function ensureTriedToConnect()
 			
 			$this->triedConnect = true;
 			
-			$this->redis = new Redis();
+			$this->redis = new \Redis();
 			
 			try {
 				$this->redis->pconnect($this->host, $this->port, $this->timeout);
 				$this->isAlive();
-			} catch (RedisException $e) {
+			} catch (\RedisException $e) {
 				$this->alive = false;
 			}
 			
diff --git a/core/DB/NoSQL/RedisNoSQLList.class.php b/core/DB/NoSQL/RedisNoSQLList.class.php
index 63865549ba..cf7f8c1ca0 100644
--- a/core/DB/NoSQL/RedisNoSQLList.class.php
+++ b/core/DB/NoSQL/RedisNoSQLList.class.php
@@ -9,6 +9,8 @@
 	*                                                                         *
 	***************************************************************************/
 
+	namespace Onphp;
+
 	final class RedisNoSQLList implements Listable
 	{
 		private $redis		= null;
@@ -16,7 +18,7 @@ final class RedisNoSQLList implements Listable
 		private $position	= null;
 		private $timeout	= null;
 		
-		public function __construct(Redis $redis, $key, $timeout = null)
+		public function __construct(\Redis $redis, $key, $timeout = null)
 		{
 			$this->redis	= $redis;
 			$this->key		= $key;
diff --git a/core/DB/PgSQL.class.php b/core/DB/PgSQL.class.php
index 380aefcd51..a39c734c0b 100644
--- a/core/DB/PgSQL.class.php
+++ b/core/DB/PgSQL.class.php
@@ -16,10 +16,12 @@
 	 *
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	class PgSQL extends DB
 	{
 		/**
-		 * @return PgSQL
+		 * @return \Onphp\PgSQL
 		**/
 		public function connect()
 		{
@@ -34,7 +36,7 @@ public function connect()
 					$this->link = pg_pconnect($conn);
 				else
 					$this->link = pg_connect($conn);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				throw new DatabaseException(
 					'can not connect to PostgreSQL server: '.$e->getMessage(),
 					$e->getCode(),
@@ -51,7 +53,7 @@ public function connect()
 		}
 		
 		/**
-		 * @return PgSQL
+		 * @return \Onphp\PgSQL
 		**/
 		public function disconnect()
 		{
@@ -79,7 +81,7 @@ public function obtainSequence($sequence)
 		}
 		
 		/**
-		 * @return PgSQL
+		 * @return \Onphp\PgSQL
 		**/
 		public function setDbEncoding()
 		{
@@ -103,10 +105,10 @@ public function queryRaw($queryString)
 				$code = substr($error, 8, 5);
 				
 				if ($code == PostgresError::UNIQUE_VIOLATION) {
-					$e = 'DuplicateObjectException';
+					$e = '\Onphp\DuplicateObjectException';
 					$code = null;
 				} else
-					$e = 'PostgresDatabaseException';
+					$e = '\Onphp\PostgresDatabaseException';
 				
 				throw new $e($error.' - '.$queryString, $code);
 			}
@@ -171,8 +173,8 @@ public function hasSequences()
 		}
 		
 		/**
-		 * @throws ObjectNotFoundException
-		 * @return DBTable
+		 * @throws \Onphp\ObjectNotFoundException
+		 * @return \Onphp\DBTable
 		**/
 		public function getTableInfo($table)
 		{
@@ -210,6 +212,7 @@ public function getTableInfo($table)
 				
 				'ltree'			=> null,
 				'hstore'		=> null,
+				'uuid'			=> DataType::VARCHAR,
 			);
 			
 			try {
@@ -250,7 +253,7 @@ public function getTableInfo($table)
 		}
 		
 		/**
-		 * @return PostgresDialect
+		 * @return \Onphp\PostgresDialect
 		**/
 		protected function spawnDialect()
 		{
diff --git a/core/DB/PostgresDialect.class.php b/core/DB/PostgresDialect.class.php
index fc790fed86..81ef55c3c5 100644
--- a/core/DB/PostgresDialect.class.php
+++ b/core/DB/PostgresDialect.class.php
@@ -16,6 +16,8 @@
 	 *
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	final class PostgresDialect extends Dialect
 	{
 		private static $tsConfiguration = 'utf8_russian';
diff --git a/core/DB/PostgresError.class.php b/core/DB/PostgresError.class.php
index 55eb1ef6e7..7bb32cb4f4 100644
--- a/core/DB/PostgresError.class.php
+++ b/core/DB/PostgresError.class.php
@@ -16,6 +16,8 @@
 	 * 
 	 * @see http://www.postgresql.org/docs/current/interactive/errcodes-appendix.html
 	**/
+	namespace Onphp;
+
 	final class PostgresError extends Enumeration
 	{
 		// Class 00 - Successful Completion
diff --git a/core/DB/Queue.class.php b/core/DB/Queue.class.php
index 174d12c283..c12f292112 100644
--- a/core/DB/Queue.class.php
+++ b/core/DB/Queue.class.php
@@ -18,12 +18,14 @@
 	 * 
 	 * @todo introduce DBs without multi-query support handling
 	**/
+	namespace Onphp;
+
 	final class Queue implements Query
 	{
 		private $queue = array();
 		
 		/**
-		 * @return Queue
+		 * @return \Onphp\Queue
 		**/
 		public static function create()
 		{
@@ -46,7 +48,7 @@ public function getQueue()
 		}
 
 		/**
-		 * @return Queue
+		 * @return \Onphp\Queue
 		**/
 		public function add(Query $query)
 		{
@@ -56,7 +58,7 @@ public function add(Query $query)
 		}
 		
 		/**
-		 * @return Queue
+		 * @return \Onphp\Queue
 		**/
 		public function remove(Query $query)
 		{
@@ -69,7 +71,7 @@ public function remove(Query $query)
 		}
 		
 		/**
-		 * @return Queue
+		 * @return \Onphp\Queue
 		**/
 		public function drop()
 		{
@@ -79,7 +81,7 @@ public function drop()
 		}
 		
 		/**
-		 * @return Queue
+		 * @return \Onphp\Queue
 		**/
 		public function run(DB $db)
 		{
@@ -89,7 +91,7 @@ public function run(DB $db)
 		}
 		
 		/**
-		 * @return Queue
+		 * @return \Onphp\Queue
 		**/
 		public function flush(DB $db)
 		{
diff --git a/core/DB/SQLite.class.php b/core/DB/SQLite.class.php
index a3ff11cc31..3eeb61405b 100644
--- a/core/DB/SQLite.class.php
+++ b/core/DB/SQLite.class.php
@@ -18,10 +18,12 @@
 	 * 
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	final class SQLite extends Sequenceless
 	{
 		/**
-		 * @return SQLite
+		 * @return \Onphp\SQLite
 		**/
 		public function connect()
 		{
@@ -40,7 +42,7 @@ public function connect()
 		}
 		
 		/**
-		 * @return SQLite
+		 * @return \Onphp\SQLite
 		**/
 		public function disconnect()
 		{
@@ -76,9 +78,9 @@ public function queryRaw($queryString)
 				$code = sqlite_last_error($this->link);
 				
 				if ($code == 19)
-					$e = 'DuplicateObjectException';
+					$e = '\Onphp\DuplicateObjectException';
 				else
-					$e = 'DatabaseException';
+					$e = '\Onphp\DatabaseException';
 				
 				throw new $e(
 					sqlite_error_string($code).' - '.$queryString,
@@ -172,7 +174,7 @@ protected function getInsertId()
 		}
 		
 		/**
-		 * @return LiteDialect
+		 * @return \Onphp\LiteDialect
 		**/
 		protected function spawnDialect()
 		{
diff --git a/core/DB/SQLitePDO.class.php b/core/DB/SQLitePDO.class.php
index fb42ae8e27..b86baef4e2 100644
--- a/core/DB/SQLitePDO.class.php
+++ b/core/DB/SQLitePDO.class.php
@@ -17,40 +17,42 @@
 	 * 
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	final class SQLitePDO extends Sequenceless
 	{
 		
 		const ERROR_CONSTRAINT = 19;
 		/**
-		 * @var PDO 
+		 * @var \PDO 
 		 */
 		protected $link = null;
 		
 		/**
-		 * @return SQLitePDO
+		 * @return \Onphp\SQLitePDO
 		**/
 		public function connect()
 		{
 			try {
-				$this->link = new PDO(
+				$this->link = new \PDO(
 					"sqlite:{$this->basename}",
 					'',
 					'',
-					array(PDO::ATTR_PERSISTENT => $this->persistent)
+					array(\PDO::ATTR_PERSISTENT => $this->persistent)
 				);
-			} catch (PDOException $e) {
+			} catch (\PDOException $e) {
 				throw new DatabaseException(
 					'can not open SQLitePDO base: '
 					.$e->getMessage()
 				);
 			}
-			$this->link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+			$this->link->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
 			
 			return $this;
 		}
 		
 		/**
-		 * @return SQLitePDO
+		 * @return \Onphp\SQLitePDO
 		**/
 		public function disconnect()
 		{
@@ -81,13 +83,13 @@ public function queryRaw($queryString)
 		{
 			try {
 				return $this->link->query($queryString);
-			} catch (PDOException $e) {
+			} catch (\PDOException $e) {
 				$code = $e->getCode();
 				
 				if ($code == self::ERROR_CONSTRAINT)
-					$exc = 'DuplicateObjectException';
+					$exc = '\Onphp\DuplicateObjectException';
 				else
-					$exc = 'DatabaseException';
+					$exc = '\Onphp\DatabaseException';
 				
 				throw new $exc($e->getMessage().': '.$queryString);
 			}
@@ -100,7 +102,7 @@ public function queryRaw($queryString)
 		public function queryCount(Query $query)
 		{
 			$res = $this->queryNull($query);
-			/* @var $res PDOStatement */
+			/* @var $res \PDOStatement */
 			
 			return $res->rowCount();
 		}
@@ -108,9 +110,9 @@ public function queryCount(Query $query)
 		public function queryRow(Query $query)
 		{
 			$res = $this->query($query);
-			/* @var $res PDOStatement */
+			/* @var $res \PDOStatement */
 			
-			$array = $res->fetchAll(PDO::FETCH_ASSOC);
+			$array = $res->fetchAll(\PDO::FETCH_ASSOC);
 			if (count($array) > 1)
 				throw new TooManyRowsException(
 					'query returned too many rows (we need only one)'
@@ -124,9 +126,9 @@ public function queryRow(Query $query)
 		public function queryColumn(Query $query)
 		{
 			$res = $this->query($query);
-			/* @var $res PDOStatement */
+			/* @var $res \PDOStatement */
 			
-			$resArray = $res->fetchAll(PDO::FETCH_ASSOC);
+			$resArray = $res->fetchAll(\PDO::FETCH_ASSOC);
 			if ($resArray) {
 				$array = array();
 				foreach ($resArray as $row) {
@@ -141,9 +143,9 @@ public function queryColumn(Query $query)
 		public function querySet(Query $query)
 		{
 			$res = $this->query($query);
-			/* @var $res PDOStatement */
+			/* @var $res \PDOStatement */
 			
-			return $res->fetchAll(PDO::FETCH_ASSOC) ?: null;
+			return $res->fetchAll(\PDO::FETCH_ASSOC) ?: null;
 		}
 		
 		public function hasQueue()
@@ -162,7 +164,7 @@ protected function getInsertId()
 		}
 		
 		/**
-		 * @return LitePDODialect
+		 * @return \Onphp\LitePDODialect
 		**/
 		protected function spawnDialect()
 		{
diff --git a/core/DB/Sequenceless.class.php b/core/DB/Sequenceless.class.php
index 36500c8d53..778a82f7f7 100644
--- a/core/DB/Sequenceless.class.php
+++ b/core/DB/Sequenceless.class.php
@@ -24,6 +24,8 @@
 	 * 
 	 * @ingroup DB
 	**/
+	namespace Onphp;
+
 	abstract class Sequenceless extends DB
 	{
 		protected $sequencePool = array();
@@ -31,7 +33,7 @@ abstract class Sequenceless extends DB
 		abstract protected function getInsertId();
 
 		/**
-		 * @return Identifier
+		 * @return \Onphp\Identifier
 		**/
 		final public function obtainSequence($sequence)
 		{
diff --git a/core/DB/Transaction/AccessMode.class.php b/core/DB/Transaction/AccessMode.class.php
index 6bed5fcadc..df1df23560 100644
--- a/core/DB/Transaction/AccessMode.class.php
+++ b/core/DB/Transaction/AccessMode.class.php
@@ -16,6 +16,8 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	final class AccessMode extends Enumeration
 	{
 		const READ_ONLY		= 0x01;
diff --git a/core/DB/Transaction/BaseTransaction.class.php b/core/DB/Transaction/BaseTransaction.class.php
index 227bbb124d..c1c2809d1f 100644
--- a/core/DB/Transaction/BaseTransaction.class.php
+++ b/core/DB/Transaction/BaseTransaction.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	abstract class BaseTransaction
 	{
 		protected $db		= null;
@@ -29,7 +31,7 @@ public function __construct(DB $db)
 		}
 		
 		/**
-		 * @return BaseTransaction
+		 * @return \Onphp\BaseTransaction
 		**/
 		public function setDB(DB $db)
 		{
@@ -39,7 +41,7 @@ public function setDB(DB $db)
 		}
 		
 		/**
-		 * @return DB
+		 * @return \Onphp\DB
 		**/
 		public function getDB()
 		{
@@ -47,7 +49,7 @@ public function getDB()
 		}
 		
 		/**
-		 * @return BaseTransaction
+		 * @return \Onphp\BaseTransaction
 		**/
 		public function setIsolationLevel(IsolationLevel $level)
 		{
@@ -57,7 +59,7 @@ public function setIsolationLevel(IsolationLevel $level)
 		}
 		
 		/**
-		 * @return BaseTransaction
+		 * @return \Onphp\BaseTransaction
 		**/
 		public function setAccessMode(AccessMode $mode)
 		{
diff --git a/core/DB/Transaction/DBTransaction.class.php b/core/DB/Transaction/DBTransaction.class.php
index 9d91e69e37..1c668cec03 100644
--- a/core/DB/Transaction/DBTransaction.class.php
+++ b/core/DB/Transaction/DBTransaction.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	final class DBTransaction extends BaseTransaction
 	{
 		private $started	= false;
@@ -25,7 +27,7 @@ public function __destruct()
 		}
 		
 		/**
-		 * @return DBTransaction
+		 * @return \Onphp\DBTransaction
 		**/
 		public function setDB(DB $db)
 		{
@@ -43,7 +45,7 @@ public function isStarted()
 		}
 		
 		/**
-		 * @return DBTransaction
+		 * @return \Onphp\DBTransaction
 		**/
 		public function add(Query $query)
 		{
@@ -58,7 +60,7 @@ public function add(Query $query)
 		}
 		
 		/**
-		 * @return DBTransaction
+		 * @return \Onphp\DBTransaction
 		**/
 		public function flush()
 		{
diff --git a/core/DB/Transaction/FakeTransaction.class.php b/core/DB/Transaction/FakeTransaction.class.php
index c591ad2978..b6cc42f38b 100644
--- a/core/DB/Transaction/FakeTransaction.class.php
+++ b/core/DB/Transaction/FakeTransaction.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	final class FakeTransaction extends BaseTransaction
 	{
 		/**
-		 * @return FakeTransaction
+		 * @return \Onphp\FakeTransaction
 		**/
 		public function add(Query $query)
 		{
@@ -27,7 +29,7 @@ public function add(Query $query)
 		}
 		
 		/**
-		 * @return FakeTransaction
+		 * @return \Onphp\FakeTransaction
 		**/
 		public function flush()
 		{
diff --git a/core/DB/Transaction/InnerTransaction.class.php b/core/DB/Transaction/InnerTransaction.class.php
index 9b38811a6f..797dcdb4b6 100644
--- a/core/DB/Transaction/InnerTransaction.class.php
+++ b/core/DB/Transaction/InnerTransaction.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	final class InnerTransaction
 	{
 		/**
-		 * @var DB
+		 * @var \Onphp\DB
 		**/
 		private $db = null;
 		private $savepointName = null;
@@ -25,9 +27,9 @@ final class InnerTransaction
 		
 		/**
 		 * @param DB|GenericDAO $database
-		 * @param IsolationLevel $level
-		 * @param AccessMode $mode
-		 * @return InnerTransaction
+		 * @param \Onphp\IsolationLevel $level
+		 * @param \Onphp\AccessMode $mode
+		 * @return \Onphp\InnerTransaction
 		**/
 		public static function begin(
 			$database,
@@ -40,8 +42,8 @@ public static function begin(
 		
 		/**
 		 * @param DB|GenericDAO $database
-		 * @param IsolationLevel $level
-		 * @param AccessMode $mode
+		 * @param \Onphp\IsolationLevel $level
+		 * @param \Onphp\AccessMode $mode
 		**/
 		public function __construct(
 			$database,
diff --git a/core/DB/Transaction/InnerTransactionWrapper.class.php b/core/DB/Transaction/InnerTransactionWrapper.class.php
index c9574d1ba8..240260115b 100644
--- a/core/DB/Transaction/InnerTransactionWrapper.class.php
+++ b/core/DB/Transaction/InnerTransactionWrapper.class.php
@@ -14,29 +14,31 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	final class InnerTransactionWrapper
 	{
 		/**
-		 * @var DB
+		 * @var \Onphp\DB
 		 */
 		private $db = null;
 		/**
-		 * @var StorableDAO
+		 * @var \Onphp\StorableDAO
 		 */
 		private $dao = null;
 		private $function = null;
 		private $exceptionFunction = null;
 		/**
-		 * @var IsolationLevel
+		 * @var \Onphp\IsolationLevel
 		 */
 		private $level = null;
 		/**
-		 * @var AccessMode
+		 * @var \Onphp\AccessMode
 		 */
 		private $mode = null;
 		
 		/**
-		 * @return InnerTransactionWrapper
+		 * @return \Onphp\InnerTransactionWrapper
 		 */
 		public static function create()
 		{
@@ -44,8 +46,8 @@ public static function create()
 		}
 		
 		/**
-		 * @param DB $db
-		 * @return InnerTransactionWrapper
+		 * @param \Onphp\DB $\Onphp\DB
+		 * @return \Onphp\InnerTransactionWrapper
 		 */
 		public function setDB(DB $db)
 		{
@@ -54,8 +56,8 @@ public function setDB(DB $db)
 		}
 		
 		/**
-		 * @param StorableDAO $dao
-		 * @return InnerTransactionWrapper
+		 * @param \Onphp\StorableDAO $dao
+		 * @return \Onphp\InnerTransactionWrapper
 		 */
 		public function setDao(StorableDAO $dao)
 		{
@@ -64,8 +66,8 @@ public function setDao(StorableDAO $dao)
 		}
 		
 		/**
-		 * @param collable $function
-		 * @return InnerTransactionWrapper
+		 * @param callable $function
+		 * @return \Onphp\InnerTransactionWrapper
 		 */
 		public function setFunction($function)
 		{
@@ -75,8 +77,8 @@ public function setFunction($function)
 		}
 		
 		/**
-		 * @param collable $function
-		 * @return InnerTransactionWrapper
+		 * @param callable $function
+		 * @return \Onphp\InnerTransactionWrapper
 		 */
 		public function setExceptionFunction($function)
 		{
@@ -86,8 +88,8 @@ public function setExceptionFunction($function)
 		}
 
 		/**
-		 * @param IsolationLevel $level
-		 * @return InnerTransactionWrapper
+		 * @param \Onphp\IsolationLevel $level
+		 * @return \Onphp\InnerTransactionWrapper
 		 */
 		public function setLevel(IsolationLevel $level)
 		{
@@ -96,8 +98,8 @@ public function setLevel(IsolationLevel $level)
 		}
 
 		/**
-		 * @param AccessMode $mode
-		 * @return InnerTransactionWrapper
+		 * @param \Onphp\AccessMode $mode
+		 * @return \Onphp\InnerTransactionWrapper
 		 */
 		public function setMode(AccessMode $mode)
 		{
@@ -120,7 +122,7 @@ public function run()
 				$result = call_user_func_array($this->function, func_get_args());
 				$transaction->commit();
 				return $result;
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$transaction->rollback();
 				if ($this->exceptionFunction) {
 					$args = func_get_args();
@@ -130,5 +132,4 @@ public function run()
 				throw $e;
 			}
 		}
-	}
-?>
\ No newline at end of file
+	}
\ No newline at end of file
diff --git a/core/DB/Transaction/IsolationLevel.class.php b/core/DB/Transaction/IsolationLevel.class.php
index 87d86f35d5..9cfc963df5 100644
--- a/core/DB/Transaction/IsolationLevel.class.php
+++ b/core/DB/Transaction/IsolationLevel.class.php
@@ -16,6 +16,8 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	final class IsolationLevel extends Enumeration
 	{
 		const READ_COMMITTED	= 0x01;
diff --git a/core/DB/Transaction/Transaction.class.php b/core/DB/Transaction/Transaction.class.php
index 16fed41fae..4d1dd7e5f5 100644
--- a/core/DB/Transaction/Transaction.class.php
+++ b/core/DB/Transaction/Transaction.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	final class Transaction extends StaticFactory
 	{
 		/**
-		 * @return DBTransaction
+		 * @return \Onphp\DBTransaction
 		**/
 		public static function immediate(DB $db)
 		{
@@ -25,7 +27,7 @@ public static function immediate(DB $db)
 		}
 		
 		/**
-		 * @return TransactionQueue
+		 * @return \Onphp\TransactionQueue
 		**/
 		public static function deferred(DB $db)
 		{
@@ -33,7 +35,7 @@ public static function deferred(DB $db)
 		}
 		
 		/**
-		 * @return FakeTransaction
+		 * @return \Onphp\FakeTransaction
 		**/
 		public static function fake(DB $db)
 		{
diff --git a/core/DB/Transaction/TransactionQueue.class.php b/core/DB/Transaction/TransactionQueue.class.php
index de5366e6f5..a9cdd90570 100644
--- a/core/DB/Transaction/TransactionQueue.class.php
+++ b/core/DB/Transaction/TransactionQueue.class.php
@@ -16,6 +16,8 @@
 	 * 
 	 * @ingroup Transaction
 	**/
+	namespace Onphp;
+
 	final class TransactionQueue extends BaseTransaction implements Query
 	{
 		private $queue = null;
@@ -37,7 +39,7 @@ public function setId($id)
 		}
 		
 		/**
-		 * @return TransactionQueue
+		 * @return \Onphp\TransactionQueue
 		**/
 		public function add(Query $query)
 		{
@@ -47,8 +49,8 @@ public function add(Query $query)
 		}
 		
 		/**
-		 * @throws DatabaseException
-		 * @return TransactionQueue
+		 * @throws \Onphp\DatabaseException
+		 * @return \Onphp\TransactionQueue
 		**/
 		public function flush()
 		{
diff --git a/core/Exceptions/BadRequestException.class.php b/core/Exceptions/BadRequestException.class.php
index 53b97fc170..c82dcd92e2 100644
--- a/core/Exceptions/BadRequestException.class.php
+++ b/core/Exceptions/BadRequestException.class.php
@@ -19,5 +19,7 @@
 	 * 
 	 * Use this exception instead of View('error')
 	**/
+	namespace Onphp;
+
 	class BadRequestException extends BaseException {/* nop */}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/BaseException.class.php b/core/Exceptions/BaseException.class.php
index 416bb34b8d..d9dfeb8d23 100644
--- a/core/Exceptions/BaseException.class.php
+++ b/core/Exceptions/BaseException.class.php
@@ -13,7 +13,9 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
-	class BaseException extends Exception
+	namespace Onphp;
+
+	class BaseException extends \Exception
 	{
 		public function __toString()
 		{
diff --git a/core/Exceptions/BusinessLogicException.class.php b/core/Exceptions/BusinessLogicException.class.php
index 1a0f37ff91..daac646d7f 100644
--- a/core/Exceptions/BusinessLogicException.class.php
+++ b/core/Exceptions/BusinessLogicException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
-	class BusinessLogicException extends Exception {/*_*/}
+	namespace Onphp;
+
+	class BusinessLogicException extends \Exception {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/CachedObjectNotFoundException.class.php b/core/Exceptions/CachedObjectNotFoundException.class.php
index 775bf2111b..935e6e0da0 100644
--- a/core/Exceptions/CachedObjectNotFoundException.class.php
+++ b/core/Exceptions/CachedObjectNotFoundException.class.php
@@ -12,5 +12,7 @@
 	/**
 	 * @ingroup Exceptions
 	**/
+	namespace Onphp;
+
 	class CachedObjectNotFoundException extends ObjectNotFoundException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/ClassNotFoundException.class.php b/core/Exceptions/ClassNotFoundException.class.php
index 6690310f60..a62147556b 100644
--- a/core/Exceptions/ClassNotFoundException.class.php
+++ b/core/Exceptions/ClassNotFoundException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class ClassNotFoundException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/DatabaseException.class.php b/core/Exceptions/DatabaseException.class.php
index 6562d894d4..c481c81310 100644
--- a/core/Exceptions/DatabaseException.class.php
+++ b/core/Exceptions/DatabaseException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class DatabaseException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/DeadlockException.class.php b/core/Exceptions/DeadlockException.class.php
new file mode 100644
index 0000000000..3836236fd0
--- /dev/null
+++ b/core/Exceptions/DeadlockException.class.php
@@ -0,0 +1,20 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2009 by Solomatin Alexandr                              *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	/**
+	 * @ingroup Exceptions
+	 * @ingroup Module
+	**/
+	namespace Onphp;
+
+	class DeadLockException extends \Exception {/*_*/}
+
+?>
\ No newline at end of file
diff --git a/core/Exceptions/DuplicateObjectException.class.php b/core/Exceptions/DuplicateObjectException.class.php
index 366581ad0f..4a7be57c18 100644
--- a/core/Exceptions/DuplicateObjectException.class.php
+++ b/core/Exceptions/DuplicateObjectException.class.php
@@ -16,5 +16,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class DuplicateObjectException extends DatabaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/FileNotFoundException.class.php b/core/Exceptions/FileNotFoundException.class.php
index 9fc7b21ac4..d2ac22c0ab 100644
--- a/core/Exceptions/FileNotFoundException.class.php
+++ b/core/Exceptions/FileNotFoundException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class FileNotFoundException extends IOException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/IOException.class.php b/core/Exceptions/IOException.class.php
index f7093d3788..6495fb9d83 100644
--- a/core/Exceptions/IOException.class.php
+++ b/core/Exceptions/IOException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class IOException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/IOTimedOutException.class.php b/core/Exceptions/IOTimedOutException.class.php
index ba83096d8f..c6fb863b32 100644
--- a/core/Exceptions/IOTimedOutException.class.php
+++ b/core/Exceptions/IOTimedOutException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class IOTimedOutException extends IOException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/MissingElementException.class.php b/core/Exceptions/MissingElementException.class.php
index dc08f5ccd9..35fc4ddd6e 100644
--- a/core/Exceptions/MissingElementException.class.php
+++ b/core/Exceptions/MissingElementException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class MissingElementException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/NetworkException.class.php b/core/Exceptions/NetworkException.class.php
index c4fbacd3eb..094a8947e3 100644
--- a/core/Exceptions/NetworkException.class.php
+++ b/core/Exceptions/NetworkException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class NetworkException extends IOException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/ObjectNotFoundException.class.php b/core/Exceptions/ObjectNotFoundException.class.php
index 613d8be7d0..2eb8cc792d 100644
--- a/core/Exceptions/ObjectNotFoundException.class.php
+++ b/core/Exceptions/ObjectNotFoundException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class ObjectNotFoundException extends DatabaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/PostgresDatabaseException.class.php b/core/Exceptions/PostgresDatabaseException.class.php
index b9b2502ea9..7fb3fcb508 100644
--- a/core/Exceptions/PostgresDatabaseException.class.php
+++ b/core/Exceptions/PostgresDatabaseException.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Exceptions
 	**/
+	namespace Onphp;
+
 	class PostgresDatabaseException extends DatabaseException
 	{
 		public function __construct($message = null, $code = null)
diff --git a/core/Exceptions/SecurityException.class.php b/core/Exceptions/SecurityException.class.php
index c8d7fcb821..7c7d202909 100644
--- a/core/Exceptions/SecurityException.class.php
+++ b/core/Exceptions/SecurityException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
-	class SecurityException extends Exception {/*_*/}
+	namespace Onphp;
+
+	class SecurityException extends \Exception {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/SoapFault.class.php b/core/Exceptions/SoapFault.class.php
index ea1bc5a994..d994149a4d 100644
--- a/core/Exceptions/SoapFault.class.php
+++ b/core/Exceptions/SoapFault.class.php
@@ -14,5 +14,7 @@
 	 * 
 	 * @ingroup Exceptions
 	**/
-	class SoapFault extends Exception {/*_*/}
+	namespace Onphp;
+
+	class SoapFault extends \Exception {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/SyntaxErrorException.class.php b/core/Exceptions/SyntaxErrorException.class.php
index 470746675f..fa3831321c 100644
--- a/core/Exceptions/SyntaxErrorException.class.php
+++ b/core/Exceptions/SyntaxErrorException.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Exceptions
 	**/
+	namespace Onphp;
+
 	final class SyntaxErrorException extends BaseException
 	{
 		private $errorLine		= null;
diff --git a/core/Exceptions/TooManyRowsException.class.php b/core/Exceptions/TooManyRowsException.class.php
index 7ecf316ca1..294ebcc6a9 100644
--- a/core/Exceptions/TooManyRowsException.class.php
+++ b/core/Exceptions/TooManyRowsException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class TooManyRowsException extends DatabaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/UnimplementedFeatureException.class.php b/core/Exceptions/UnimplementedFeatureException.class.php
index c07711585a..cbf235b2b4 100644
--- a/core/Exceptions/UnimplementedFeatureException.class.php
+++ b/core/Exceptions/UnimplementedFeatureException.class.php
@@ -16,5 +16,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
-	class UnimplementedFeatureException extends Exception {/*_*/}
+	namespace Onphp;
+
+	class UnimplementedFeatureException extends \Exception {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/UnsupportedMethodException.class.php b/core/Exceptions/UnsupportedMethodException.class.php
index 29a824bd7c..15e449fb51 100644
--- a/core/Exceptions/UnsupportedMethodException.class.php
+++ b/core/Exceptions/UnsupportedMethodException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class UnsupportedMethodException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/WrongArgumentException.class.php b/core/Exceptions/WrongArgumentException.class.php
index 2373ad3c88..4cce77401f 100644
--- a/core/Exceptions/WrongArgumentException.class.php
+++ b/core/Exceptions/WrongArgumentException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class WrongArgumentException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Exceptions/WrongStateException.class.php b/core/Exceptions/WrongStateException.class.php
index 9e52d67336..0e75a9ffb7 100644
--- a/core/Exceptions/WrongStateException.class.php
+++ b/core/Exceptions/WrongStateException.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup Exceptions
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class WrongStateException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/Form/Filter.class.php b/core/Form/Filter.class.php
index 1e79235141..8d822d84aa 100644
--- a/core/Form/Filter.class.php
+++ b/core/Form/Filter.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Form
 	**/
+	namespace Onphp;
+
 	final class Filter extends StaticFactory
 	{
 		/**
-		 * @return FilterChain
+		 * @return \Onphp\FilterChain
 		**/
 		public static function textImport()
 		{
@@ -28,7 +30,7 @@ public static function textImport()
 		}
 		
 		/**
-		 * @return FilterChain
+		 * @return \Onphp\FilterChain
 		**/
 		public static function chain()
 		{
@@ -36,7 +38,7 @@ public static function chain()
 		}
 		
 		/**
-		 * @return HashFilter
+		 * @return \Onphp\HashFilter
 		**/
 		public static function hash($binary = false)
 		{
@@ -44,7 +46,7 @@ public static function hash($binary = false)
 		}
 		
 		/**
-		 * @return PCREFilter
+		 * @return \Onphp\PCREFilter
 		**/
 		public static function pcre()
 		{
@@ -52,7 +54,7 @@ public static function pcre()
 		}
 		
 		/**
-		 * @return TrimFilter
+		 * @return \Onphp\TrimFilter
 		**/
 		public static function trim()
 		{
@@ -60,7 +62,7 @@ public static function trim()
 		}
 		
 		/**
-		 * @return CropFilter
+		 * @return \Onphp\CropFilter
 		**/
 		public static function crop()
 		{
@@ -68,7 +70,7 @@ public static function crop()
 		}
 		
 		/**
-		 * @return StripTagsFilter
+		 * @return \Onphp\StripTagsFilter
 		**/
 		public static function stripTags()
 		{
@@ -76,71 +78,71 @@ public static function stripTags()
 		}
 		
 		/**
-		 * @return LowerCaseFilter
+		 * @return \Onphp\LowerCaseFilter
 		**/
 		public static function lowerCase()
 		{
-			return Singleton::getInstance('LowerCaseFilter');
+			return Singleton::getInstance('\Onphp\LowerCaseFilter');
 		}
 		
 		/**
-		 * @return UpperCaseFilter
+		 * @return \Onphp\UpperCaseFilter
 		**/
 		public static function upperCase()
 		{
-			return Singleton::getInstance('UpperCaseFilter');
+			return Singleton::getInstance('\Onphp\UpperCaseFilter');
 		}
 		
 		/**
-		 * @return HtmlSpecialCharsFilter
+		 * @return \Onphp\HtmlSpecialCharsFilter
 		**/
 		public static function htmlSpecialChars()
 		{
-			return Singleton::getInstance('HtmlSpecialCharsFilter');
+			return Singleton::getInstance('\Onphp\HtmlSpecialCharsFilter');
 		}
 		
 		/**
-		 * @return NewLinesToBreaks
+		 * @return \Onphp\NewLinesToBreaks
 		**/
 		public static function nl2br()
 		{
-			return Singleton::getInstance('NewLinesToBreaks');
+			return Singleton::getInstance('\Onphp\NewLinesToBreaks');
 		}
 		
 		/**
-		 * @return UrlEncodeFilter
+		 * @return \Onphp\UrlEncodeFilter
 		**/
 		public static function urlencode()
 		{
-			return Singleton::getInstance('UrlEncodeFilter');
+			return Singleton::getInstance('\Onphp\UrlEncodeFilter');
 		}
 		
 		/**
-		 * @return UrlDecodeFilter
+		 * @return \Onphp\UrlDecodeFilter
 		**/
 		public static function urldecode()
 		{
-			return Singleton::getInstance('UrlDecodeFilter');
+			return Singleton::getInstance('\Onphp\UrlDecodeFilter');
 		}
 		
 		/**
-		 * @return UnixToUnixDecode
+		 * @return \Onphp\UnixToUnixDecode
 		**/
 		public static function uudecode()
 		{
-			return Singleton::getInstance('UnixToUnixDecode');
+			return Singleton::getInstance('\Onphp\UnixToUnixDecode');
 		}
 		
 		/**
-		 * @return UnixToUnixEncode
+		 * @return \Onphp\UnixToUnixEncode
 		**/
 		public static function uuencode()
 		{
-			return Singleton::getInstance('UnixToUnixEncode');
+			return Singleton::getInstance('\Onphp\UnixToUnixEncode');
 		}
 		
 		/**
-		 * @return StringReplaceFilter
+		 * @return \Onphp\StringReplaceFilter
 		**/
 		public static function replaceSymbols($search = null, $replace = null)
 		{
@@ -148,11 +150,11 @@ public static function replaceSymbols($search = null, $replace = null)
 		}
 		
 		/**
-		 * @return SafeUtf8Filter
+		 * @return \Onphp\SafeUtf8Filter
 		**/
 		public static function safeUtf8()
 		{
-			return Singleton::getInstance('SafeUtf8Filter');
+			return Singleton::getInstance('\Onphp\SafeUtf8Filter');
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/core/Form/Filters/BaseFilter.class.php b/core/Form/Filters/BaseFilter.class.php
index 393003d97e..ee3062c9bf 100644
--- a/core/Form/Filters/BaseFilter.class.php
+++ b/core/Form/Filters/BaseFilter.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Filters
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class BaseFilter
 		extends Singleton
 		implements Filtrator, Instantiatable {/*_*/}
diff --git a/core/Form/Filters/CallbackFilter.class.php b/core/Form/Filters/CallbackFilter.class.php
index 5c4fa5b3a3..6377e711d4 100644
--- a/core/Form/Filters/CallbackFilter.class.php
+++ b/core/Form/Filters/CallbackFilter.class.php
@@ -12,22 +12,24 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class CallbackFilter implements Filtrator
 	{
 		/**
-		 * @var Closure
+		 * @var \Closure
 		 */
 		private $callback = null;
 		
 		/**
-		 * @return CallbackFilter
+		 * @return \Onphp\CallbackFilter
 		**/
-		public static function create(Closure $callback)
+		public static function create(\Closure $callback)
 		{
 			return new self($callback);
 		}
 		
-		public function __construct(Closure $callback)
+		public function __construct(\Closure $callback)
 		{
 			$this->callback = $callback;
 		}
diff --git a/core/Form/Filters/CompressWhitespaceFilter.class.php b/core/Form/Filters/CompressWhitespaceFilter.class.php
index 8353dbcd8a..6ff7d59b2d 100644
--- a/core/Form/Filters/CompressWhitespaceFilter.class.php
+++ b/core/Form/Filters/CompressWhitespaceFilter.class.php
@@ -16,10 +16,12 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class CompressWhitespaceFilter extends BaseFilter
 	{
 		/**
-		 * @return CompressWhitespaceFilter
+		 * @return \Onphp\CompressWhitespaceFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/CropFilter.class.php b/core/Form/Filters/CropFilter.class.php
index 7d286253f6..4159542137 100644
--- a/core/Form/Filters/CropFilter.class.php
+++ b/core/Form/Filters/CropFilter.class.php
@@ -14,13 +14,15 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class CropFilter implements Filtrator
 	{
 		private $start	= 0;
 		private $length	= 0;
 		
 		/**
-		 * @return CropFilter
+		 * @return \Onphp\CropFilter
 		**/
 		public static function create()
 		{
@@ -28,7 +30,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return CropFilter
+		 * @return \Onphp\CropFilter
 		**/
 		public function setStart($start)
 		{
@@ -40,7 +42,7 @@ public function setStart($start)
 		}
 		
 		/**
-		 * @return CropFilter
+		 * @return \Onphp\CropFilter
 		**/
 		public function setLength($length)
 		{
diff --git a/core/Form/Filters/DateRangeDisplayFilter.class.php b/core/Form/Filters/DateRangeDisplayFilter.class.php
index f507f5f532..79affd9093 100644
--- a/core/Form/Filters/DateRangeDisplayFilter.class.php
+++ b/core/Form/Filters/DateRangeDisplayFilter.class.php
@@ -12,14 +12,16 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class DateRangeDisplayFilter extends BaseFilter
 	{
 		/**
-		 * @return DateRangeDisplayFilter
+		 * @return \Onphp\DateRangeDisplayFilter
 		**/
 		public static function me()
 		{
-			return Singleton::getInstance('DateRangeDisplayFilter');
+			return Singleton::getInstance('\Onphp\DateRangeDisplayFilter');
 		}
 		
 		public function apply($value)
diff --git a/core/Form/Filters/FilterChain.class.php b/core/Form/Filters/FilterChain.class.php
index 5f084367b7..277885f5b0 100644
--- a/core/Form/Filters/FilterChain.class.php
+++ b/core/Form/Filters/FilterChain.class.php
@@ -14,12 +14,14 @@
 	 * 
 	 * @ingroup Form
 	**/
+	namespace Onphp;
+
 	final class FilterChain implements Filtrator
 	{
 		private $chain = array();
 
 		/**
-		 * @return FilterChain
+		 * @return \Onphp\FilterChain
 		**/
 		public static function create()
 		{
@@ -27,7 +29,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return FilterChain
+		 * @return \Onphp\FilterChain
 		**/
 		public function add(Filtrator $filter)
 		{
@@ -36,7 +38,7 @@ public function add(Filtrator $filter)
 		}
 
 		/**
-		 * @return FilterChain
+		 * @return \Onphp\FilterChain
 		**/
 		public function dropAll()
 		{
diff --git a/core/Form/Filters/Filtrator.class.php b/core/Form/Filters/Filtrator.class.php
index 3b6ddf3810..18ae5e544f 100644
--- a/core/Form/Filters/Filtrator.class.php
+++ b/core/Form/Filters/Filtrator.class.php
@@ -17,6 +17,8 @@
 	 * @ingroup Filters
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface Filtrator
 	{
 		public function apply($value);
diff --git a/core/Form/Filters/HashFilter.class.php b/core/Form/Filters/HashFilter.class.php
index 561c9244a0..878915bf8b 100644
--- a/core/Form/Filters/HashFilter.class.php
+++ b/core/Form/Filters/HashFilter.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class HashFilter implements Filtrator
 	{
 		private $binary = false;
@@ -24,7 +26,7 @@ public function __construct($binary = false)
 		}
 		
 		/**
-		 * @return HashFilter
+		 * @return \Onphp\HashFilter
 		**/
 		public static function create($binary = false)
 		{
diff --git a/core/Form/Filters/HtmlSpecialCharsFilter.class.php b/core/Form/Filters/HtmlSpecialCharsFilter.class.php
index b2f0d9fcd2..33971e1c9d 100644
--- a/core/Form/Filters/HtmlSpecialCharsFilter.class.php
+++ b/core/Form/Filters/HtmlSpecialCharsFilter.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class HtmlSpecialCharsFilter extends BaseFilter
 	{
 		/**
-		 * @return HtmlSpecialCharsFilter
+		 * @return \Onphp\HtmlSpecialCharsFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/JsonDecoderFilter.class.php b/core/Form/Filters/JsonDecoderFilter.class.php
index 2e55de4daf..2a5a4ffb23 100644
--- a/core/Form/Filters/JsonDecoderFilter.class.php
+++ b/core/Form/Filters/JsonDecoderFilter.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class JsonDecoderFilter extends BaseFilter
 	{
 		private $assoc = false;
diff --git a/core/Form/Filters/JsonEncoderFilter.class.php b/core/Form/Filters/JsonEncoderFilter.class.php
index d835a53575..3f3f1d1e33 100644
--- a/core/Form/Filters/JsonEncoderFilter.class.php
+++ b/core/Form/Filters/JsonEncoderFilter.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class JsonEncoderFilter extends BaseFilter
 	{
 		/**
-		 * @return JsonEncoderFilter
+		 * @return \Onphp\JsonEncoderFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/LowerCaseFilter.class.php b/core/Form/Filters/LowerCaseFilter.class.php
index b68c9d10d1..7270cd883c 100644
--- a/core/Form/Filters/LowerCaseFilter.class.php
+++ b/core/Form/Filters/LowerCaseFilter.class.php
@@ -12,10 +12,12 @@
 	/**
 	  * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class LowerCaseFilter extends BaseFilter
 	{
 		/**
-		 * @return LowerCaseFilter
+		 * @return \Onphp\LowerCaseFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/NewLinesToBreaks.class.php b/core/Form/Filters/NewLinesToBreaks.class.php
index 27079ad51b..e76498313a 100644
--- a/core/Form/Filters/NewLinesToBreaks.class.php
+++ b/core/Form/Filters/NewLinesToBreaks.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class NewLinesToBreaks extends BaseFilter
 	{
 		/**
-		 * @return NewLinesToBreaks
+		 * @return \Onphp\NewLinesToBreaks
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/NormalizeUrlFilter.class.php b/core/Form/Filters/NormalizeUrlFilter.class.php
index 3facac6fd6..9fc257643d 100644
--- a/core/Form/Filters/NormalizeUrlFilter.class.php
+++ b/core/Form/Filters/NormalizeUrlFilter.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class NormalizeUrlFilter implements Filtrator
 	{
 		/**
-		 * @return NormalizeUrlFilter
+		 * @return \Onphp\NormalizeUrlFilter
 		**/
 		public static function create()
 		{
diff --git a/core/Form/Filters/PCREFilter.class.php b/core/Form/Filters/PCREFilter.class.php
index a2f057161a..0c3b4dfc26 100644
--- a/core/Form/Filters/PCREFilter.class.php
+++ b/core/Form/Filters/PCREFilter.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class PCREFilter implements Filtrator
 	{
 		private $search 	= null;
@@ -19,7 +21,7 @@ final class PCREFilter implements Filtrator
 		private $limit		= -1;
 		
 		/**
-		 * @return PCREFilter
+		 * @return \Onphp\PCREFilter
 		**/
 		public static function create()
 		{
@@ -27,7 +29,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return PCREFilter
+		 * @return \Onphp\PCREFilter
 		**/
 		public function setExpression($search, $replace)
 		{
@@ -49,7 +51,7 @@ public function apply($value)
 		}
 		
 		/**
-		 * @return PCREFilter
+		 * @return \Onphp\PCREFilter
 		**/
 		public function setLimit($limit)
 		{
diff --git a/core/Form/Filters/Paragraphizer.class.php b/core/Form/Filters/Paragraphizer.class.php
index 7efdaa7dec..12b80c750a 100644
--- a/core/Form/Filters/Paragraphizer.class.php
+++ b/core/Form/Filters/Paragraphizer.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class Paragraphizer extends BaseFilter
 	{
 		/**
-		 * @return Paragraphizer
+		 * @return \Onphp\Paragraphizer
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/RemoveNewlineFilter.class.php b/core/Form/Filters/RemoveNewlineFilter.class.php
index db35ccd4a6..9240924776 100644
--- a/core/Form/Filters/RemoveNewlineFilter.class.php
+++ b/core/Form/Filters/RemoveNewlineFilter.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class RemoveNewlineFilter extends BaseFilter
 	{
 		/**
diff --git a/core/Form/Filters/RussianTypograph.class.php b/core/Form/Filters/RussianTypograph.class.php
index 6d96d692fd..4c6c2b44d4 100644
--- a/core/Form/Filters/RussianTypograph.class.php
+++ b/core/Form/Filters/RussianTypograph.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @see http://www.artlebedev.ru/tools/typograf/
 	**/
+	namespace Onphp;
+
 	final class RussianTypograph extends BaseFilter
 	{
 		const MAGIC_DELIMITER = '<>'; // brilliant!
@@ -82,7 +84,7 @@ final class RussianTypograph extends BaseFilter
 		);
 		
 		/**
-		 * @return RussianTypograph
+		 * @return \Onphp\RussianTypograph
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/SafeUtf8Filter.class.php b/core/Form/Filters/SafeUtf8Filter.class.php
index 24363b8283..05d4bd7ed1 100644
--- a/core/Form/Filters/SafeUtf8Filter.class.php
+++ b/core/Form/Filters/SafeUtf8Filter.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class SafeUtf8Filter extends BaseFilter
 	{
 		/**
-		 * @return SafeUtf8Filter
+		 * @return \Onphp\SafeUtf8Filter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/StringReplaceFilter.class.php b/core/Form/Filters/StringReplaceFilter.class.php
index 9e17bc93e9..bbf0336358 100644
--- a/core/Form/Filters/StringReplaceFilter.class.php
+++ b/core/Form/Filters/StringReplaceFilter.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class StringReplaceFilter implements Filtrator
 	{
 		private $search		= null;
@@ -20,7 +22,7 @@ final class StringReplaceFilter implements Filtrator
 		private $count		= null;
 		
 		/**
-		 * @return StringReplaceFilter
+		 * @return \Onphp\StringReplaceFilter
 		**/
 		public static function create($search = null, $replace = null)
 		{
@@ -34,7 +36,7 @@ public function __construct($search = null, $replace = null)
 		}
 		
 		/**
-		 * @return StringReplaceFilter
+		 * @return \Onphp\StringReplaceFilter
 		**/
 		public function setSearch($search)
 		{
@@ -49,7 +51,7 @@ public function getSearch()
 		}
 		
 		/**
-		 * @return StringReplaceFilter
+		 * @return \Onphp\StringReplaceFilter
 		**/
 		public function setReplace($replace)
 		{
diff --git a/core/Form/Filters/StripTagsFilter.class.php b/core/Form/Filters/StripTagsFilter.class.php
index 2de4733227..6c168d719b 100644
--- a/core/Form/Filters/StripTagsFilter.class.php
+++ b/core/Form/Filters/StripTagsFilter.class.php
@@ -14,12 +14,14 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class StripTagsFilter implements Filtrator
 	{
 		private $exclude = null;
 		
 		/**
-		 * @return StripTagsFilter
+		 * @return \Onphp\StripTagsFilter
 		**/
 		public static function create()
 		{
@@ -27,7 +29,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return StripTagsFilter
+		 * @return \Onphp\StripTagsFilter
 		**/
 		public function setAllowableTags($exclude)
 		{
diff --git a/core/Form/Filters/TrimFilter.class.php b/core/Form/Filters/TrimFilter.class.php
index e7888c38c4..4c31e2ce5e 100644
--- a/core/Form/Filters/TrimFilter.class.php
+++ b/core/Form/Filters/TrimFilter.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class TrimFilter implements Filtrator
 	{
 		const LEFT	= 'l';
@@ -22,7 +24,7 @@ final class TrimFilter implements Filtrator
 		private $direction	= self::BOTH;
 		
 		/**
-		 * @return TrimFilter
+		 * @return \Onphp\TrimFilter
 		**/
 		public static function create()
 		{
@@ -30,7 +32,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return TrimFilter
+		 * @return \Onphp\TrimFilter
 		**/
 		public function setLeft()
 		{
@@ -40,7 +42,7 @@ public function setLeft()
 		}
 		
 		/**
-		 * @return TrimFilter
+		 * @return \Onphp\TrimFilter
 		**/
 		public function setRight()
 		{
@@ -50,7 +52,7 @@ public function setRight()
 		}
 		
 		/**
-		 * @return TrimFilter
+		 * @return \Onphp\TrimFilter
 		**/
 		public function setBoth()
 		{
@@ -71,7 +73,7 @@ public function apply($value)
 		}
 		
 		/**
-		 * @return TrimFilter
+		 * @return \Onphp\TrimFilter
 		**/
 		public function setCharlist($charlist)
 		{
diff --git a/core/Form/Filters/UnTypographizer.class.php b/core/Form/Filters/UnTypographizer.class.php
index 2f5531c115..0b3ee47682 100644
--- a/core/Form/Filters/UnTypographizer.class.php
+++ b/core/Form/Filters/UnTypographizer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class UnTypographizer extends BaseFilter
 	{
 		private static $symbols =
@@ -36,7 +38,7 @@ final class UnTypographizer extends BaseFilter
 			);
 		
 		/**
-		 * @return UnTypographizer
+		 * @return \Onphp\UnTypographizer
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/UnixToUnixDecode.class.php b/core/Form/Filters/UnixToUnixDecode.class.php
index 2fdbe652d4..11a15fda70 100644
--- a/core/Form/Filters/UnixToUnixDecode.class.php
+++ b/core/Form/Filters/UnixToUnixDecode.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class UnixToUnixDecode extends BaseFilter
 	{
 		/**
-		 * @return UnixToUnixDecode
+		 * @return \Onphp\UnixToUnixDecode
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/UnixToUnixEncode.class.php b/core/Form/Filters/UnixToUnixEncode.class.php
index 7a74a8cd67..cbbaeccb50 100644
--- a/core/Form/Filters/UnixToUnixEncode.class.php
+++ b/core/Form/Filters/UnixToUnixEncode.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class UnixToUnixEncode extends BaseFilter
 	{
 		/**
-		 * @return UnixToUnixEncode
+		 * @return \Onphp\UnixToUnixEncode
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/UnserializeFilter.class.php b/core/Form/Filters/UnserializeFilter.class.php
index 9e1a033a7c..044b3794e0 100644
--- a/core/Form/Filters/UnserializeFilter.class.php
+++ b/core/Form/Filters/UnserializeFilter.class.php
@@ -13,11 +13,14 @@
 	 * Unserialize string
 	 * 
 	 * @ingroup Filters
+	 * @deprecated Because of the potential security problem.
 	**/
+	namespace Onphp;
+
 	final class UnserializeFilter extends BaseFilter
 	{
 		/**
-		 * @return UnserializeFilter
+		 * @return \Onphp\UnserializeFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/UpperCaseFilter.class.php b/core/Form/Filters/UpperCaseFilter.class.php
index e788f0a9d8..f61f5b3391 100644
--- a/core/Form/Filters/UpperCaseFilter.class.php
+++ b/core/Form/Filters/UpperCaseFilter.class.php
@@ -12,10 +12,12 @@
 	/**
 	  * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class UpperCaseFilter extends BaseFilter
 	{
 		/**
-		 * @return LowerCaseFilter
+		 * @return \Onphp\LowerCaseFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/UrlDecodeFilter.class.php b/core/Form/Filters/UrlDecodeFilter.class.php
index bf2d013790..0bc864791e 100644
--- a/core/Form/Filters/UrlDecodeFilter.class.php
+++ b/core/Form/Filters/UrlDecodeFilter.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class UrlDecodeFilter extends BaseFilter
 	{
 		/**
-		 * @return UrlDecodeFilter
+		 * @return \Onphp\UrlDecodeFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/UrlEncodeFilter.class.php b/core/Form/Filters/UrlEncodeFilter.class.php
index 213cac53d9..097753e480 100644
--- a/core/Form/Filters/UrlEncodeFilter.class.php
+++ b/core/Form/Filters/UrlEncodeFilter.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class UrlEncodeFilter extends BaseFilter
 	{
 		/**
-		 * @return UrlEncodeFilter
+		 * @return \Onphp\UrlEncodeFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/Utf16ConverterFilter.class.php b/core/Form/Filters/Utf16ConverterFilter.class.php
index a57fbc4e2f..30479623b3 100644
--- a/core/Form/Filters/Utf16ConverterFilter.class.php
+++ b/core/Form/Filters/Utf16ConverterFilter.class.php
@@ -20,10 +20,12 @@
 	 *
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class Utf16ConverterFilter extends BaseFilter
 	{
 		/**
-		 * @return Utf16ConverterFilter
+		 * @return \Onphp\Utf16ConverterFilter
 		**/
 		public static function me()
 		{
diff --git a/core/Form/Filters/WordSplitterFilter.class.php b/core/Form/Filters/WordSplitterFilter.class.php
index 7fdeb89eda..2fac2ba369 100644
--- a/core/Form/Filters/WordSplitterFilter.class.php
+++ b/core/Form/Filters/WordSplitterFilter.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Filters
 	**/
+	namespace Onphp;
+
 	final class WordSplitterFilter implements Filtrator
 	{
 		private $maxWordLength 	= 25;
 		private $delimer 		= '&#x200B;';
 		
 		/**
-		 * @return WordSplitterFilter
+		 * @return \Onphp\WordSplitterFilter
 		**/
 		public static function create()
 		{
@@ -26,7 +28,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return WordSplitterFilter
+		 * @return \Onphp\WordSplitterFilter
 		**/
 		public function setMaxWordLength($length)
 		{
@@ -40,7 +42,7 @@ public function getMaxWordLength()
 		}
 		
 		/**
-		 * @return WordSplitterFilter
+		 * @return \Onphp\WordSplitterFilter
 		**/
 		public function setDelimer($delimer)
 		{
diff --git a/core/Form/Form.class.php b/core/Form/Form.class.php
index f94abc892e..b45c0ba417 100644
--- a/core/Form/Form.class.php
+++ b/core/Form/Form.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @see http://onphp.org/examples.Form.en.html
 	**/
+	namespace Onphp;
+
 	final class Form extends RegulatedForm
 	{
 		const WRONG			= 0x0001;
@@ -31,7 +33,7 @@ final class Form extends RegulatedForm
 		private $importFiltering	= true;
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public static function create()
 		{
@@ -83,7 +85,7 @@ public function getInnerErrors()
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function dropAllErrors()
 		{
@@ -94,7 +96,7 @@ public function dropAllErrors()
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function enableImportFiltering()
 		{
@@ -104,7 +106,7 @@ public function enableImportFiltering()
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function disableImportFiltering()
 		{
@@ -118,7 +120,7 @@ public function disableImportFiltering()
 		**/
 		//@{
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function markMissing($primitiveName, $label = null)
 		{
@@ -128,7 +130,7 @@ public function markMissing($primitiveName, $label = null)
 		/**
 		 * rule or primitive
 		 * 
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function markWrong($name, $label = null)
 		{
@@ -148,7 +150,7 @@ public function markWrong($name, $label = null)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function markGood($primitiveName)
 		{
@@ -167,7 +169,7 @@ public function markGood($primitiveName)
 		/**
 		 * Set's custom error mark for primitive.
 		 * 
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function markCustom($primitiveName, $customMark, $label = null)
 		{
@@ -238,7 +240,7 @@ public function getErrorDescriptionFor($name)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function addErrorDescription($name, $errorType, $description)
 		{
@@ -257,7 +259,7 @@ public function addErrorDescription($name, $errorType, $description)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function addWrongLabel($primitiveName, $label)
 		{
@@ -265,7 +267,7 @@ public function addWrongLabel($primitiveName, $label)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function addMissingLabel($primitiveName, $label)
 		{
@@ -273,7 +275,7 @@ public function addMissingLabel($primitiveName, $label)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function addCustomLabel($primitiveName, $customMark, $label)
 		{
@@ -291,7 +293,7 @@ public function getMissingLabel($primitiveName)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function import($scope)
 		{
@@ -302,7 +304,7 @@ public function import($scope)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function importMore($scope)
 		{
@@ -315,7 +317,7 @@ public function importMore($scope)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function importOne($primitiveName, $scope)
 		{
@@ -323,7 +325,7 @@ public function importOne($primitiveName, $scope)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function importValue($primitiveName, $value)
 		{
@@ -333,7 +335,7 @@ public function importValue($primitiveName, $value)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function importOneMore($primitiveName, $scope)
 		{
@@ -373,7 +375,7 @@ public function toFormValue($value)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function setProto(EntityProto $proto)
 		{
@@ -383,15 +385,22 @@ public function setProto(EntityProto $proto)
 		}
 		
 		/**
-		 * @return EntityProto
+		 * @return \Onphp\EntityProto
 		**/
 		public function getProto()
 		{
 			return $this->proto;
 		}
 		
+		public function __clone()
+		{
+			foreach ($this->primitives as $name => $primitive) {
+				$this->primitives[$name] = clone $primitive;
+			}
+		}
+		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		private function importPrimitive($scope, BasePrimitive $prm)
 		{
@@ -423,7 +432,7 @@ private function importPrimitive($scope, BasePrimitive $prm)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		private function checkImportResult(BasePrimitive $prm, $result)
 		{
@@ -459,8 +468,8 @@ private function checkImportResult(BasePrimitive $prm, $result)
 		 * @param	$name		string	primitive or rule name
 		 * @param	$errorType	enum	Form::(WRONG|MISSING)
 		 * @param	$label		string	YDFB WTF is this :-) (c) /.
-		 * @throws	MissingElementException
-		 * @return	Form
+		 * @throws	\Onphp\MissingElementException
+		 * @return	\Onphp\Form
 		**/
 		private function addErrorLabel($name, $errorType, $label)
 		{
diff --git a/core/Form/FormCollection.class.php b/core/Form/FormCollection.class.php
new file mode 100644
index 0000000000..7d8ec78ae3
--- /dev/null
+++ b/core/Form/FormCollection.class.php
@@ -0,0 +1,111 @@
+<?php
+/****************************************************************************
+ *   Copyright (C) 2013 by Evgeny V. Kokovikhin                             *
+ *                                                                          *
+ *   This program is free software; you can redistribute it and/or modify   *
+ *   it under the terms of the GNU Lesser General Public License as         *
+ *   published by the Free Software Foundation; either version 3 of the     *
+ *   License, or (at your option) any later version.                        *
+ *                                                                          *
+ ****************************************************************************/
+
+	namespace Onphp;
+
+	final class FormCollection implements \Iterator
+	{
+		/**
+		 * @var Form
+		 */
+		private $sampleForm = null;
+		
+		private $primitiveNames = array();
+		
+		private $imported = false;
+
+		/**
+		 * @var Form[]
+		 */
+		private $formList = array();
+		
+		/**
+		 * 
+		 * @param Form $sample
+		 * @return FormCollection
+		 */
+		public static function create(Form $sample)
+		{
+			return new self($sample);
+		}
+
+
+		public function __construct(Form $sample)
+		{
+			$this->sampleForm = $sample;
+		}
+		
+		/**
+		 * 
+		 * @param array $scope 
+		 * from http request
+		 * looks like foo[1]=42&bar[1]=test&foo[2]=44&bar[2]=anothertest
+		 */
+		public function import(array $scope)
+		{
+			$this->imported = true;
+			
+			foreach ($scope as $name => $paramList) {
+				
+				/**
+				 *@var array $paramList
+				 * looks like array(1 => 42, 2 => 44)
+				 */
+				Assert::isArray($paramList);
+				
+				foreach ($paramList as $key => $value) {
+					if (!isset($this->formList[$key])) {
+						$this->formList[$key] = clone $this->sampleForm;
+					}
+						$this->formList[$key]->importMore(array($name => $value));
+				}
+			}
+			
+			reset($this->formList);
+			
+			return $this;
+		}
+		
+		public function current()
+		{
+			Assert::isTrue($this->imported, "Import scope in me before try to iterate");
+			
+			return current($this->formList);
+		}
+		
+		public function key()
+		{
+			Assert::isTrue($this->imported, "Import scope in me before try to iterate");
+			
+			return key($this->formList);
+		}
+
+		public function next()
+		{
+			Assert::isTrue($this->imported, "Import scope in me before try to iterate");
+			
+			return next($this->formList);
+		}
+		
+		public function rewind()
+		{
+			Assert::isTrue($this->imported, "Import scope in me before try to iterate");
+			
+			return reset($this->formList);
+		}
+		
+		public function valid()
+		{
+			Assert::isTrue($this->imported, "Import scope in me before try to iterate");
+			
+			return (key($this->formList) !== null);
+		}
+	}
\ No newline at end of file
diff --git a/core/Form/FormField.class.php b/core/Form/FormField.class.php
index f472d2c6ce..48fefd8315 100644
--- a/core/Form/FormField.class.php
+++ b/core/Form/FormField.class.php
@@ -16,6 +16,8 @@
 	 * 
 	 * @ingroup Form
 	**/
+	namespace Onphp;
+
 	final class FormField
 	{
 		private $primitiveName	= null;
@@ -26,7 +28,7 @@ public function __construct($name)
 		}
 		
 		/**
-		 * @return FormField
+		 * @return \Onphp\FormField
 		**/
 		public static function create($name)
 		{
diff --git a/core/Form/FormUtils.class.php b/core/Form/FormUtils.class.php
index d877b6dcdc..e1eb16b5a9 100644
--- a/core/Form/FormUtils.class.php
+++ b/core/Form/FormUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Form
 	**/
+	namespace Onphp;
+
 	final class FormUtils extends StaticFactory
 	{
 		/* void */ public static function object2form(
@@ -26,7 +28,7 @@ final class FormUtils extends StaticFactory
 				$proto = $object->proto();
 				
 				foreach (array_keys($proto->getExpandedPropertyList()) as $name) {
-					if ($form->primitiveExists($name)) {
+					if ($form->exists($name)) {
 						$proto->importPrimitive(
 							$name,
 							$form,
@@ -37,7 +39,7 @@ final class FormUtils extends StaticFactory
 					}
 				}
 			} else {
-				$class = new ReflectionClass($object);
+				$class = new \ReflectionClass($object);
 				
 				foreach ($class->getProperties() as $property) {
 					$name = $property->getName();
@@ -71,7 +73,7 @@ final class FormUtils extends StaticFactory
 					}
 				}
 			} else {
-				$class = new ReflectionClass($object);
+				$class = new \ReflectionClass($object);
 				
 				foreach ($form->getPrimitiveList() as $name => $prm) {
 					$setter = 'set'.ucfirst($name);
@@ -117,5 +119,26 @@ public static function checkPrototyped(Prototyped $object)
 			
 			return $form->getErrors();
 		}
+		
+		/**
+		 * @return Form
+		 */
+		public static function removePrefix(Form $form, $prefix)
+		{
+			$newForm = Form::create();
+
+			foreach ($form->getPrimitiveList() as $primitive) {
+				$primitive->setName(
+					strtr(
+						$primitive->getName(),
+						array($prefix => '')
+					)
+				);
+
+				$newForm->add($primitive);
+			}
+			
+			return $newForm;
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/core/Form/MappedForm.class.php b/core/Form/MappedForm.class.php
index f48be8a8c3..9fd9ccbeb3 100644
--- a/core/Form/MappedForm.class.php
+++ b/core/Form/MappedForm.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Form
 	**/
+	namespace Onphp;
+
 	final class MappedForm
 	{
 		private $form = null;
@@ -20,7 +22,7 @@ final class MappedForm
 		private $map = array();
 		
 		/**
-		 * @return MappedForm
+		 * @return \Onphp\MappedForm
 		**/
 		public static function create(Form $form)
 		{
@@ -33,7 +35,7 @@ public function __construct(Form $form)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function getForm()
 		{
@@ -41,7 +43,7 @@ public function getForm()
 		}
 		
 		/**
-		 * @return MappedForm
+		 * @return \Onphp\MappedForm
 		**/
 		public function setDefaultType(RequestType $type)
 		{
@@ -51,7 +53,7 @@ public function setDefaultType(RequestType $type)
 		}
 		
 		/**
-		 * @return MappedForm
+		 * @return \Onphp\MappedForm
 		**/
 		public function addSource($primitiveName, RequestType $type)
 		{
@@ -63,7 +65,7 @@ public function addSource($primitiveName, RequestType $type)
 		}
 		
 		/**
-		 * @return MappedForm
+		 * @return \Onphp\MappedForm
 		**/
 		public function importOne($name, HttpRequest $request)
 		{
@@ -92,7 +94,7 @@ public function importOne($name, HttpRequest $request)
 		}
 		
 		/**
-		 * @return MappedForm
+		 * @return \Onphp\MappedForm
 		**/
 		public function import(HttpRequest $request)
 		{
@@ -106,7 +108,7 @@ public function import(HttpRequest $request)
 		}
 		
 		/**
-		 * @return MappedForm
+		 * @return \Onphp\MappedForm
 		**/
 		public function export(RequestType $type)
 		{
@@ -134,7 +136,7 @@ public function export(RequestType $type)
 		}
 		
 		/**
-		 * @return MappedForm
+		 * @return \Onphp\MappedForm
 		**/
 		private function checkExistence($name)
 		{
diff --git a/core/Form/PlainForm.class.php b/core/Form/PlainForm.class.php
index 303ec94c9d..92673cc2dc 100644
--- a/core/Form/PlainForm.class.php
+++ b/core/Form/PlainForm.class.php
@@ -15,12 +15,17 @@
 	 * @ingroup Form
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class PlainForm
 	{
+		/**
+		 * @var BasePrimitive[]
+		 */
 		protected $primitives = array();
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function clean()
 		{
@@ -44,8 +49,8 @@ public function primitiveExists($name)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return Form
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\Form
 		**/
 		public function add(BasePrimitive $prm)
 		{
@@ -62,7 +67,7 @@ public function add(BasePrimitive $prm)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function set(BasePrimitive $prm)
 		{
@@ -72,8 +77,8 @@ public function set(BasePrimitive $prm)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return Form
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\Form
 		**/
 		public function drop($name)
 		{
@@ -88,8 +93,8 @@ public function drop($name)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return BasePrimitive
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function get($name)
 		{
@@ -116,6 +121,15 @@ public function getRawValue($name)
 			return $this->get($name)->getRawValue();
 		}
 		
+		public function getValueOrDefault($name)
+		{
+			return $this->get($name)->getValueOrDefault();
+		}
+		
+		/**
+		 * @deprecated since version 1.0
+		 * @see getValueOrDefault
+		 */
 		public function getActualValue($name)
 		{
 			return $this->get($name)->getActualValue();
@@ -154,10 +168,13 @@ public function getPrimitiveNames()
 		{
 			return array_keys($this->primitives);
 		}
-		
+
+		/**
+		 * @return BasePrimitive[]
+		 */
 		public function getPrimitiveList()
 		{
 			return $this->primitives;
 		}
 	}
-?>
\ No newline at end of file
+	
diff --git a/core/Form/Primitive.class.php b/core/Form/Primitive.class.php
index 41f6fab878..5a348c8dfb 100644
--- a/core/Form/Primitive.class.php
+++ b/core/Form/Primitive.class.php
@@ -14,10 +14,12 @@
 	 *
 	 * @ingroup Form
 	**/
+	namespace Onphp;
+
 	final class Primitive extends StaticFactory
 	{
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public static function spawn($primitive, $name)
 		{
@@ -27,7 +29,7 @@ public static function spawn($primitive, $name)
 		}
 		
 		/**
-		 * @return Primitive
+		 * @return \Onphp\Primitive
 		**/
 		public static function alias($name, BasePrimitive $prm)
 		{
@@ -35,7 +37,7 @@ public static function alias($name, BasePrimitive $prm)
 		}
 		
 		/**
-		 * @return PrimitiveAnyType
+		 * @return \Onphp\PrimitiveAnyType
 		**/
 		public static function anyType($name)
 		{
@@ -43,7 +45,7 @@ public static function anyType($name)
 		}
 		
 		/**
-		 * @return PrimitiveInteger
+		 * @return \Onphp\PrimitiveInteger
 		**/
 		public static function integer($name)
 		{
@@ -51,7 +53,7 @@ public static function integer($name)
 		}
 		
 		/**
-		 * @return PrimitiveFloat
+		 * @return \Onphp\PrimitiveFloat
 		**/
 		public static function float($name)
 		{
@@ -59,7 +61,7 @@ public static function float($name)
 		}
 		
 		/**
-		 * @return PrimitiveIdentifier
+		 * @return \Onphp\PrimitiveIdentifier
 		 * @obsoleted by integerIdentifier and scalarIdentifier
 		**/
 		public static function identifier($name)
@@ -68,7 +70,7 @@ public static function identifier($name)
 		}
 		
 		/**
-		 * @return PrimitiveIntegerIdentifier
+		 * @return \Onphp\PrimitiveIntegerIdentifier
 		**/
 		public static function integerIdentifier($name)
 		{
@@ -76,7 +78,7 @@ public static function integerIdentifier($name)
 		}
 		
 		/**
-		 * @return PrimitiveScalarIdentifier
+		 * @return \Onphp\PrimitiveScalarIdentifier
 		**/
 		public static function scalarIdentifier($name)
 		{
@@ -84,7 +86,7 @@ public static function scalarIdentifier($name)
 		}
 		
 		/**
-		 * @return PrimitivePolymorphicIdentifier
+		 * @return \Onphp\PrimitivePolymorphicIdentifier
 		**/
 		public static function polymorphicIdentifier($name)
 		{
@@ -92,7 +94,7 @@ public static function polymorphicIdentifier($name)
 		}
 		
 		/**
-		 * @return PrimitiveIdentifierList
+		 * @return \Onphp\PrimitiveIdentifierList
 		**/
 		public static function identifierlist($name)
 		{
@@ -100,7 +102,7 @@ public static function identifierlist($name)
 		}
 		
 		/**
-		 * @return PrimitiveClass
+		 * @return \Onphp\PrimitiveClass
 		**/
 		public static function clazz($name)
 		{
@@ -108,7 +110,7 @@ public static function clazz($name)
 		}
 		
 		/**
-		 * @return PrimitiveEnumeration
+		 * @return \Onphp\PrimitiveEnumeration
 		**/
 		public static function enumeration($name)
 		{
@@ -116,7 +118,7 @@ public static function enumeration($name)
 		}
 		
 		/**
-		 * @return PrimitiveEnumerationByValue
+		 * @return \Onphp\PrimitiveEnumerationByValue
 		**/
 		public static function enumerationByValue($name)
 		{
@@ -124,7 +126,7 @@ public static function enumerationByValue($name)
 		}
 		
 		/**
-		 * @return PrimitiveEnumerationList
+		 * @return \Onphp\PrimitiveEnumerationList
 		**/
 		public static function enumerationList($name)
 		{
@@ -132,7 +134,7 @@ public static function enumerationList($name)
 		}
 		
 		/**
-		 * @return PrimitiveDate
+		 * @return \Onphp\PrimitiveDate
 		**/
 		public static function date($name)
 		{
@@ -140,7 +142,7 @@ public static function date($name)
 		}
 		
 		/**
-		 * @return PrimitiveTimestamp
+		 * @return \Onphp\PrimitiveTimestamp
 		**/
 		public static function timestamp($name)
 		{
@@ -148,7 +150,7 @@ public static function timestamp($name)
 		}
 
 		/**
-		 * @return PrimitiveTimestampTZ
+		 * @return \Onphp\PrimitiveTimestampTZ
 		**/
 		public static function timestampTZ($name)
 		{
@@ -156,7 +158,7 @@ public static function timestampTZ($name)
 		}
 		
 		/**
-		 * @return PrimitiveTime
+		 * @return \Onphp\PrimitiveTime
 		**/
 		public static function time($name)
 		{
@@ -164,7 +166,7 @@ public static function time($name)
 		}
 		
 		/**
-		 * @return PrimitiveString
+		 * @return \Onphp\PrimitiveString
 		**/
 		public static function string($name)
 		{
@@ -172,7 +174,7 @@ public static function string($name)
 		}
 		
 		/**
-		 * @return PrimitiveBinary
+		 * @return \Onphp\PrimitiveBinary
 		**/
 		public static function binary($name)
 		{
@@ -180,7 +182,7 @@ public static function binary($name)
 		}
 		
 		/**
-		 * @return PrimitiveRange
+		 * @return \Onphp\PrimitiveRange
 		**/
 		public static function range($name)
 		{
@@ -188,7 +190,7 @@ public static function range($name)
 		}
 		
 		/**
-		 * @return PrimitiveDateRange
+		 * @return \Onphp\PrimitiveDateRange
 		**/
 		public static function dateRange($name)
 		{
@@ -196,7 +198,7 @@ public static function dateRange($name)
 		}
 		
 		/**
-		 * @return PrimitiveTimestampRange
+		 * @return \Onphp\PrimitiveTimestampRange
 		**/
 		public static function timestampRange($name)
 		{
@@ -204,7 +206,7 @@ public static function timestampRange($name)
 		}
 		
 		/**
-		 * @return PrimitiveList
+		 * @return \Onphp\PrimitiveList
 		**/
 		public static function choice($name)
 		{
@@ -212,7 +214,7 @@ public static function choice($name)
 		}
 		
 		/**
-		 * @return PrimitiveArray
+		 * @return \Onphp\PrimitiveArray
 		**/
 		public static function set($name)
 		{
@@ -220,7 +222,7 @@ public static function set($name)
 		}
 		
 		/**
-		 * @return PrimitiveHstore
+		 * @return \Onphp\PrimitiveHstore
 		**/
 		public static function hstore($name)
 		{
@@ -228,7 +230,7 @@ public static function hstore($name)
 		}
 		
 		/**
-		 * @return PrimitiveMultiList
+		 * @return \Onphp\PrimitiveMultiList
 		**/
 		public static function multiChoice($name)
 		{
@@ -236,7 +238,7 @@ public static function multiChoice($name)
 		}
 		
 		/**
-		 * @return PrimitivePlainList
+		 * @return \Onphp\PrimitivePlainList
 		**/
 		public static function plainChoice($name)
 		{
@@ -244,7 +246,7 @@ public static function plainChoice($name)
 		}
 		
 		/**
-		 * @return PrimitiveBoolean
+		 * @return \Onphp\PrimitiveBoolean
 		**/
 		public static function boolean($name)
 		{
@@ -252,7 +254,7 @@ public static function boolean($name)
 		}
 		
 		/**
-		 * @return PrimitiveTernary
+		 * @return \Onphp\PrimitiveTernary
 		**/
 		public static function ternary($name)
 		{
@@ -260,7 +262,7 @@ public static function ternary($name)
 		}
 		
 		/**
-		 * @return PrimitiveFile
+		 * @return \Onphp\PrimitiveFile
 		**/
 		public static function file($name)
 		{
@@ -268,7 +270,7 @@ public static function file($name)
 		}
 		
 		/**
-		 * @return PrimitiveImage
+		 * @return \Onphp\PrimitiveImage
 		**/
 		public static function image($name)
 		{
@@ -276,7 +278,7 @@ public static function image($name)
 		}
 		
 		/**
-		 * @return ExplodedPrimitive
+		 * @return \Onphp\ExplodedPrimitive
 		**/
 		public static function exploded($name)
 		{
@@ -284,7 +286,7 @@ public static function exploded($name)
 		}
 		
 		/**
-		 * @return PrimitiveInet
+		 * @return \Onphp\PrimitiveInet
 		**/
 		public static function inet($name)
 		{
@@ -292,7 +294,7 @@ public static function inet($name)
 		}
 		
 		/**
-		 * @return PrimitiveForm
+		 * @return \Onphp\PrimitiveForm
 		**/
 		public static function form($name)
 		{
@@ -300,7 +302,7 @@ public static function form($name)
 		}
 		
 		/**
-		 * @return PrimitiveFormsList
+		 * @return \Onphp\PrimitiveFormsList
 		**/
 		public static function formsList($name)
 		{
@@ -308,7 +310,7 @@ public static function formsList($name)
 		}
 		
 		/**
-		 * @return PrimitiveNoValue
+		 * @return \Onphp\PrimitiveNoValue
 		**/
 		public static function noValue($name)
 		{
@@ -316,7 +318,7 @@ public static function noValue($name)
 		}
 		
 		/**
-		 * @return PrimitiveHttpUrl
+		 * @return \Onphp\PrimitiveHttpUrl
 		**/
 		public static function httpUrl($name)
 		{
@@ -324,11 +326,11 @@ public static function httpUrl($name)
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public static function prototyped($class, $propertyName, $name = null)
 		{
-			Assert::isInstance($class, 'Prototyped');
+			Assert::isInstance($class, '\Onphp\Prototyped');
 			
 			$proto = is_string($class)
 				? call_user_func(array($class, 'proto'))
@@ -342,11 +344,11 @@ public static function prototyped($class, $propertyName, $name = null)
 		}
 		
 		/**
-		 * @return PrimitiveIdentifier
+		 * @return \Onphp\PrimitiveIdentifier
 		**/
 		public static function prototypedIdentifier($class, $name = null)
 		{
-			Assert::isInstance($class, 'DAOConnected');
+			Assert::isInstance($class, '\Onphp\DAOConnected');
 			
 			$dao = is_string($class)
 				? call_user_func(array($class, 'dao'))
@@ -356,7 +358,7 @@ public static function prototypedIdentifier($class, $name = null)
 		}
 		
 		/**
-		 * @return PrimitiveIpAddress
+		 * @return \Onphp\PrimitiveIpAddress
 		**/
 		public static function ipAddress($name)
 		{
@@ -364,7 +366,7 @@ public static function ipAddress($name)
 		}
 		
 		/**
-		 * @return PrimitiveIpRange
+		 * @return \Onphp\PrimitiveIpRange
 		 */
 		public static function ipRange($name)
 		{
@@ -372,7 +374,7 @@ public static function ipRange($name)
 		}
 
 		/**
-		 * @return PrimitiveEnum
+		 * @return \Onphp\PrimitiveEnum
 		**/
 		public static function enum($name)
 		{
@@ -380,7 +382,7 @@ public static function enum($name)
 		}
 
 		/**
-		 * @return PrimitiveEnumByValue
+		 * @return \Onphp\PrimitiveEnumByValue
 		**/
 		public static function enumByValue($name)
 		{
@@ -388,7 +390,7 @@ public static function enumByValue($name)
 		}
 
 		/**
-		 * @return PrimitiveEnumList
+		 * @return \Onphp\PrimitiveEnumList
 		**/
 		public static function enumList($name)
 		{
diff --git a/core/Form/Primitives/BaseObjectPrimitive.class.php b/core/Form/Primitives/BaseObjectPrimitive.class.php
index 9df980e5ee..3236aa6c5e 100644
--- a/core/Form/Primitives/BaseObjectPrimitive.class.php
+++ b/core/Form/Primitives/BaseObjectPrimitive.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	abstract class BaseObjectPrimitive extends BasePrimitive
 	{
 		protected $className = null;
diff --git a/core/Form/Primitives/BasePrimitive.class.php b/core/Form/Primitives/BasePrimitive.class.php
index d7cbe2f8b3..3f1e7c93f4 100644
--- a/core/Form/Primitives/BasePrimitive.class.php
+++ b/core/Form/Primitives/BasePrimitive.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Primitives
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class BasePrimitive
 	{
 		protected $name		= null;
@@ -39,7 +41,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function setName($name)
 		{
@@ -54,7 +56,7 @@ public function getDefault()
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function setDefault($default)
 		{
@@ -72,27 +74,39 @@ public function getRawValue()
 		{
 			return $this->raw;
 		}
+
+		public function getValueOrDefault()
+		{
+			if ($this->value !== null)
+				return $this->value;
+
+			return $this->default;
+		}
 		
+		/**
+		 * @deprecated since version 1.0
+		 * @see getSafeValue, getValueOrDefault
+		 */
 		public function getActualValue()
 		{
-			if (null !== $this->value)
+			if ($this->value !== null)
 				return $this->value;
 			elseif ($this->imported)
 				return $this->raw;
 			
 			return $this->default;
 		}
-		
+
 		public function getSafeValue()
 		{
 			if ($this->imported)
 				return $this->value;
-			
+
 			return $this->default;
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function setValue($value)
 		{
@@ -102,7 +116,7 @@ public function setValue($value)
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function dropValue()
 		{
@@ -112,7 +126,7 @@ public function dropValue()
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		 * 
 		 * usually, you should not use this method
 		**/
@@ -129,7 +143,7 @@ public function isRequired()
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function setRequired($really = false)
 		{
@@ -139,7 +153,7 @@ public function setRequired($really = false)
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function required()
 		{
@@ -149,7 +163,7 @@ public function required()
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function optional()
 		{
@@ -164,7 +178,7 @@ public function isImported()
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function clean()
 		{
diff --git a/core/Form/Primitives/ComplexPrimitive.class.php b/core/Form/Primitives/ComplexPrimitive.class.php
index aa739efb39..755aacdbe1 100644
--- a/core/Form/Primitives/ComplexPrimitive.class.php
+++ b/core/Form/Primitives/ComplexPrimitive.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Primitives
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class ComplexPrimitive extends RangedPrimitive
 	{
 		private $single = null;	// single, not single or fsck it
@@ -26,7 +28,7 @@ public function __construct($name)
 		}
 
 		/**
-		 * @return Ternary
+		 * @return \Onphp\Ternary
 		**/
 		public function getState()
 		{
@@ -34,7 +36,7 @@ public function getState()
 		}
 
 		/**
-		 * @return ComplexPrimitive
+		 * @return \Onphp\ComplexPrimitive
 		**/
 		public function setState(Ternary $ternary)
 		{
@@ -44,7 +46,7 @@ public function setState(Ternary $ternary)
 		}
 
 		/**
-		 * @return ComplexPrimitive
+		 * @return \Onphp\ComplexPrimitive
 		**/
 		public function setSingle()
 		{
@@ -54,7 +56,7 @@ public function setSingle()
 		}
 
 		/**
-		 * @return ComplexPrimitive
+		 * @return \Onphp\ComplexPrimitive
 		**/
 		public function setComplex()
 		{
@@ -64,7 +66,7 @@ public function setComplex()
 		}
 
 		/**
-		 * @return ComplexPrimitive
+		 * @return \Onphp\ComplexPrimitive
 		**/
 		public function setAnyState()
 		{
diff --git a/core/Form/Primitives/DateRangeList.class.php b/core/Form/Primitives/DateRangeList.class.php
index 4a455720ec..80a511d7cd 100644
--- a/core/Form/Primitives/DateRangeList.class.php
+++ b/core/Form/Primitives/DateRangeList.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class DateRangeList extends BasePrimitive implements Stringable
 	{
 		protected $value = array();
 		
 		/**
-		 * @return DateRangeList
+		 * @return \Onphp\DateRangeList
 		**/
 		public function clean()
 		{
@@ -94,8 +96,8 @@ public static function stringToDateRangeList($string)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DateRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DateRange
 		**/
 		public static function makeRange($string)
 		{
@@ -137,8 +139,8 @@ public static function makeRange($string)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return Date
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\Date
 		**/
 		private static function toDate($date)
 		{
diff --git a/core/Form/Primitives/ExplodedPrimitive.class.php b/core/Form/Primitives/ExplodedPrimitive.class.php
index 2919dcc0a8..2043d81f4a 100644
--- a/core/Form/Primitives/ExplodedPrimitive.class.php
+++ b/core/Form/Primitives/ExplodedPrimitive.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class ExplodedPrimitive extends PrimitiveString
 	{
 		protected $separator 		= ' ';
 		protected $splitByRegexp	= false;
 		
 		/**
-		 * @return ExplodedPrimitive
+		 * @return \Onphp\ExplodedPrimitive
 		**/
 		public function setSeparator($separator)
 		{
diff --git a/core/Form/Primitives/FiltrablePrimitive.class.php b/core/Form/Primitives/FiltrablePrimitive.class.php
index 88fcd95f25..241b8af0e9 100644
--- a/core/Form/Primitives/FiltrablePrimitive.class.php
+++ b/core/Form/Primitives/FiltrablePrimitive.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup Primitives
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class FiltrablePrimitive extends RangedPrimitive
 	{
 		private $importFilter	= null;
@@ -29,7 +31,7 @@ public function __construct($name)
 		}
 
 		/**
-		 * @return FiltrablePrimitive
+		 * @return \Onphp\FiltrablePrimitive
 		**/
 		public function setDisplayFilter(FilterChain $chain)
 		{
@@ -39,7 +41,7 @@ public function setDisplayFilter(FilterChain $chain)
 		}
 		
 		/**
-		 * @return FiltrablePrimitive
+		 * @return \Onphp\FiltrablePrimitive
 		**/
 		public function addDisplayFilter(Filtrator $filter)
 		{
@@ -49,7 +51,7 @@ public function addDisplayFilter(Filtrator $filter)
 		}
 
 		/**
-		 * @return FiltrablePrimitive
+		 * @return \Onphp\FiltrablePrimitive
 		**/
 		public function dropDisplayFilters()
 		{
@@ -71,7 +73,7 @@ public function getDisplayValue()
 		}
 		
 		/**
-		 * @return FiltrablePrimitive
+		 * @return \Onphp\FiltrablePrimitive
 		**/
 		public function setImportFilter(FilterChain $chain)
 		{
@@ -81,7 +83,7 @@ public function setImportFilter(FilterChain $chain)
 		}
 		
 		/**
-		 * @return FiltrablePrimitive
+		 * @return \Onphp\FiltrablePrimitive
 		**/
 		public function addImportFilter(Filtrator $filter)
 		{
@@ -91,7 +93,7 @@ public function addImportFilter(Filtrator $filter)
 		}
 
 		/**
-		 * @return FiltrablePrimitive
+		 * @return \Onphp\FiltrablePrimitive
 		**/
 		public function dropImportFilters()
 		{
@@ -101,7 +103,7 @@ public function dropImportFilters()
 		}
 		
 		/**
-		 * @return FilterChain
+		 * @return \Onphp\FilterChain
 		**/
 		public function getImportFilter()
 		{
@@ -109,7 +111,7 @@ public function getImportFilter()
 		}
 
 		/**
-		 * @return FilterChain
+		 * @return \Onphp\FilterChain
 		**/
 		public function getDisplayFilter()
 		{
@@ -117,7 +119,7 @@ public function getDisplayFilter()
 		}
 
 		/**
-		 * @return FiltrablePrimitive
+		 * @return \Onphp\FiltrablePrimitive
 		**/
 		protected function selfFilter()
 		{
diff --git a/core/Form/Primitives/IdentifiablePrimitive.class.php b/core/Form/Primitives/IdentifiablePrimitive.class.php
index 8015fbd3d1..3610b53111 100644
--- a/core/Form/Primitives/IdentifiablePrimitive.class.php
+++ b/core/Form/Primitives/IdentifiablePrimitive.class.php
@@ -12,10 +12,13 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	abstract class IdentifiablePrimitive
 		extends PrimitiveInteger // parent class doesn't really matter here
 	{
 		protected $className = null;
+		private $extractMethod = 'getId';
 		
 		/**
 		 * due to historical reasons, by default we're dealing only with
@@ -25,6 +28,29 @@ abstract class IdentifiablePrimitive
 		
 		abstract public function of($className);
 		
+		/**
+		 * @param mixed $extractMethod
+		 * @return IdentifiablePrimitive
+		 */
+		public function setExtractMethod($extractMethod)
+		{
+			if (is_callable($extractMethod)) {
+				/* all ok, call what you want */
+			} elseif (strpos($extractMethod, '::') === false) {
+				Assert::isTrue(
+					method_exists($this->className, $extractMethod),
+					"knows nothing about '".$this->className
+					."::{$extractMethod}' method"
+				);
+			} else {
+				ClassUtils::checkStaticMethod($extractMethod);
+			}
+			
+			$this->extractMethod = $extractMethod;
+			
+			return $this;
+		}
+		
 		/**
 		 * @return string
 		**/
@@ -34,7 +60,7 @@ public function getClassName()
 		}
 		
 		/**
-		 * @return IdentifiablePrimitive
+		 * @return \Onphp\IdentifiablePrimitive
 		**/
 		public function setScalar($orly = false)
 		{
@@ -43,9 +69,14 @@ public function setScalar($orly = false)
 			return $this;
 		}
 		
+		public function isScalar()
+		{
+			return $this->scalar;
+		}
+
 		/**
-		 * @throws WrongArgumentException
-		 * @return IdentifiablePrimitive
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\IdentifiablePrimitive
 		**/
 		public function setValue($value)
 		{
@@ -77,7 +108,7 @@ public function exportValue()
 			if (!$this->value)
 				return null;
 			
-			return $this->value->getId();
+			return $this->actualExportValue($this->value);
 		}
 		
 		/* void */ protected function checkNumber($number)
@@ -95,5 +126,20 @@ protected function castNumber($number)
 			
 			return $number;
 		}
+		
+		protected function actualExportValue($value)
+		{
+			if (!ClassUtils::isInstanceOf($value, $this->className)) {
+				return null;
+			}
+			
+			if (is_callable($this->extractMethod)) {
+				return call_user_func($this->extractMethod, $value);
+			} elseif (strpos($this->extractMethod, '::') === false) {
+				return $value->{$this->extractMethod}($value);
+			} else {
+				ClassUtils::callStaticMethod($this->extractMethod, $value);
+			}
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/core/Form/Primitives/ListedPrimitive.class.php b/core/Form/Primitives/ListedPrimitive.class.php
index 76cf25bdfa..71c06d92cd 100644
--- a/core/Form/Primitives/ListedPrimitive.class.php
+++ b/core/Form/Primitives/ListedPrimitive.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Primitives
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface ListedPrimitive
 	{
 		/// @return plain array of possible primitive choices
diff --git a/core/Form/Primitives/PrimitiveAlias.class.php b/core/Form/Primitives/PrimitiveAlias.class.php
index 33fe5cfbe2..66ea0b81bd 100644
--- a/core/Form/Primitives/PrimitiveAlias.class.php
+++ b/core/Form/Primitives/PrimitiveAlias.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveAlias extends BasePrimitive
 	{
 		private $primitive = null;
@@ -38,7 +40,7 @@ public function getDefault()
 		}
 		
 		/**
-		 * @return PrimitiveAlias
+		 * @return \Onphp\PrimitiveAlias
 		**/
 		public function setDefault($default)
 		{
@@ -57,25 +59,23 @@ public function getRawValue()
 			return $this->primitive->getRawValue();
 		}
 		
+		public function getValueOrDefault()
+		{
+			return $this->primitive->getValueOrDefault();
+		}
+
 		/**
 		 * @deprecated by getFormValue
+		 * since version 1.0 by getValueOrDefault
 		**/
 		public function getActualValue()
 		{
-			if (null !== $this->primitive->getValue())
-				return $this->primitive->getValue();
-			elseif ($this->primitive->isImported())
-				return $this->primitive->getRawValue();
-			
-			return $this->primitive->getDefault();
+			return $this->primitive->getActualValue();
 		}
 		
 		public function getSafeValue()
 		{
-			if ($this->primitive->isImported())
-				return $this->primitive->getValue();
-			
-			return $this->primitive->getDefault();
+			return $this->primitive->getSafeValue();
 		}
 		
 		public function getFormValue()
@@ -91,7 +91,7 @@ public function getFormValue()
 		}
 		
 		/**
-		 * @return PrimitiveAlias
+		 * @return \Onphp\PrimitiveAlias
 		**/
 		public function setValue($value)
 		{
@@ -101,7 +101,7 @@ public function setValue($value)
 		}
 		
 		/**
-		 * @return PrimitiveAlias
+		 * @return \Onphp\PrimitiveAlias
 		**/
 		public function dropValue()
 		{
@@ -111,7 +111,7 @@ public function dropValue()
 		}
 		
 		/**
-		 * @return PrimitiveAlias
+		 * @return \Onphp\PrimitiveAlias
 		**/
 		public function setRawValue($raw)
 		{
@@ -126,7 +126,7 @@ public function isImported()
 		}
 		
 		/**
-		 * @return PrimitiveAlias
+		 * @return \Onphp\PrimitiveAlias
 		**/
 		public function clean()
 		{
diff --git a/core/Form/Primitives/PrimitiveAnyType.class.php b/core/Form/Primitives/PrimitiveAnyType.class.php
index 6ff8a770b8..699f0d1e91 100644
--- a/core/Form/Primitives/PrimitiveAnyType.class.php
+++ b/core/Form/Primitives/PrimitiveAnyType.class.php
@@ -12,5 +12,7 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveAnyType extends BasePrimitive {/* nop */}
 ?>
\ No newline at end of file
diff --git a/core/Form/Primitives/PrimitiveArray.class.php b/core/Form/Primitives/PrimitiveArray.class.php
index 32b985d8b6..9448c9448e 100644
--- a/core/Form/Primitives/PrimitiveArray.class.php
+++ b/core/Form/Primitives/PrimitiveArray.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveArray extends FiltrablePrimitive
 	{
 		/**
@@ -24,7 +26,7 @@ final class PrimitiveArray extends FiltrablePrimitive
 		private $fetchMode = null;
 		
 		/**
-		 * @return PrimitiveArray
+		 * @return \Onphp\PrimitiveArray
 		**/
 		public function setFetchMode($ternary)
 		{
diff --git a/core/Form/Primitives/PrimitiveBinary.class.php b/core/Form/Primitives/PrimitiveBinary.class.php
index b78913967b..367438282c 100644
--- a/core/Form/Primitives/PrimitiveBinary.class.php
+++ b/core/Form/Primitives/PrimitiveBinary.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveBinary extends FiltrablePrimitive
 	{
 		public function import($scope)
diff --git a/core/Form/Primitives/PrimitiveBoolean.class.php b/core/Form/Primitives/PrimitiveBoolean.class.php
index d8c57d0272..7bd5ba5485 100644
--- a/core/Form/Primitives/PrimitiveBoolean.class.php
+++ b/core/Form/Primitives/PrimitiveBoolean.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveBoolean extends BasePrimitive
 	{
 		public function import($scope)
diff --git a/core/Form/Primitives/PrimitiveClass.class.php b/core/Form/Primitives/PrimitiveClass.class.php
index 409c1ffbbd..5360242108 100644
--- a/core/Form/Primitives/PrimitiveClass.class.php
+++ b/core/Form/Primitives/PrimitiveClass.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveClass extends PrimitiveString
 	{
 		private $ofClassName = null;
@@ -41,8 +43,8 @@ public function import($scope)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveIdentifier
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveIdentifier
 		**/
 		public function of($class)
 		{
diff --git a/core/Form/Primitives/PrimitiveDate.class.php b/core/Form/Primitives/PrimitiveDate.class.php
index d1b17aa241..f7c73141d3 100644
--- a/core/Form/Primitives/PrimitiveDate.class.php
+++ b/core/Form/Primitives/PrimitiveDate.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveDate extends ComplexPrimitive
 	{
 		const DAY		= 'day';
@@ -19,8 +21,8 @@ class PrimitiveDate extends ComplexPrimitive
 		const YEAR		= 'year';
 
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveDate
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveDate
 		**/
 		public function setValue(/* Date */ $object)
 		{
@@ -32,8 +34,8 @@ public function setValue(/* Date */ $object)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveDate
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveDate
 		**/
 		public function setMin(/* Date */ $object)
 		{
@@ -45,8 +47,8 @@ public function setMin(/* Date */ $object)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveDate
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveDate
 		**/
 		public function setMax(/* Date */ $object)
 		{
@@ -58,8 +60,8 @@ public function setMax(/* Date */ $object)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveDate
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveDate
 		**/
 		public function setDefault(/* Date */ $object)
 		{
@@ -216,7 +218,7 @@ protected function checkRanges(Date $date)
 		
 		protected function getObjectName()
 		{
-			return 'Date';
+			return '\Onphp\Date';
 		}
 		
 		/* void */ protected function checkType($object)
diff --git a/core/Form/Primitives/PrimitiveDateRange.class.php b/core/Form/Primitives/PrimitiveDateRange.class.php
index 6f31165e65..71f81322cf 100644
--- a/core/Form/Primitives/PrimitiveDateRange.class.php
+++ b/core/Form/Primitives/PrimitiveDateRange.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveDateRange extends FiltrablePrimitive
 	{
 		private $className = null;
 		
 		/**
-		 * @return PrimitiveDateRange
+		 * @return \Onphp\PrimitiveDateRange
 		**/
 		public static function create($name)
 		{
@@ -25,8 +27,8 @@ public static function create($name)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveDateRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveDateRange
 		**/
 		public function of($class)
 		{
@@ -40,8 +42,8 @@ public function of($class)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveDateRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveDateRange
 		**/
 		public function setDefault(/* DateRange */ $object)
 		{
@@ -109,7 +111,7 @@ public function import($scope)
 		
 		protected function getObjectName()
 		{
-			return 'DateRange';
+			return '\Onphp\DateRange';
 		}
 		
 		protected function checkRanges(DateRange $range)
diff --git a/core/Form/Primitives/PrimitiveEnum.class.php b/core/Form/Primitives/PrimitiveEnum.class.php
index 3fdecb9118..e71bc9835b 100644
--- a/core/Form/Primitives/PrimitiveEnum.class.php
+++ b/core/Form/Primitives/PrimitiveEnum.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveEnum extends IdentifiablePrimitive implements ListedPrimitive
 	{
 		public function getList()
@@ -32,8 +34,8 @@ public function getList()
 		}
 
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveEnum
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveEnum
 		**/
 		public function of($class)
 		{
@@ -41,7 +43,7 @@ public function of($class)
 			
 			Assert::classExists($className);
 			
-			Assert::isInstance($className, 'Enum');
+			Assert::isInstance($className, '\Onphp\Enum');
 			
 			$this->className = $className;
 			
@@ -51,7 +53,10 @@ public function of($class)
 		public function importValue(/* Identifiable */ $value)
 		{
 			if ($value)
-				Assert::isEqual(get_class($value), $this->className);
+				Assert::isEqual(
+					ClassUtils::normalClassName($value),
+					$this->className
+				);
 			else
 				return parent::importValue(null);
 			
@@ -79,7 +84,7 @@ public function import($scope)
 
 		/**
 		 * @param $list
-		 * @throws UnsupportedMethodException
+		 * @throws \Onphp\UnsupportedMethodException
 		 */
 		public function setList($list)
 		{
@@ -102,7 +107,7 @@ public function getChoiceValue()
 
 
 		/**
-		 * @return Enum|mixed|null
+		 * @return \Onphp\Enum|mixed|null
 		 */
 		public function getActualChoiceValue()
 		{
@@ -117,7 +122,7 @@ public function getActualChoiceValue()
 
 		/**
 		 * @param $id
-		 * @return Enum|mixed
+		 * @return \Onphp\Enum|mixed
 		 */
 		protected function makeEnumById($id)
 		{
diff --git a/core/Form/Primitives/PrimitiveEnumByValue.class.php b/core/Form/Primitives/PrimitiveEnumByValue.class.php
index ac85b6537d..adc8a4aa8e 100644
--- a/core/Form/Primitives/PrimitiveEnumByValue.class.php
+++ b/core/Form/Primitives/PrimitiveEnumByValue.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveEnumByValue extends PrimitiveEnum
 	{
 		public function import($scope)
diff --git a/core/Form/Primitives/PrimitiveEnumList.class.php b/core/Form/Primitives/PrimitiveEnumList.class.php
index 26180b5727..fe4962c483 100644
--- a/core/Form/Primitives/PrimitiveEnumList.class.php
+++ b/core/Form/Primitives/PrimitiveEnumList.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveEnumList extends PrimitiveEnum
 	{
 		protected $value = array();
 		
 		/**
-		 * @return PrimitiveEnumList
+		 * @return \Onphp\PrimitiveEnumList
 		**/
 		public function clean()
 		{
@@ -30,13 +32,13 @@ public function clean()
 		}
 		
 		/**
-		 * @return PrimitiveEnumList
+		 * @return \Onphp\PrimitiveEnumList
 		**/
 		public function setValue(/* Enum */ $value)
 		{
 			if ($value) {
 				Assert::isArray($value);
-				Assert::isInstance(current($value), 'Enum');
+				Assert::isInstance(current($value), '\Onphp\Enum');
 			}
 			
 			$this->value = $value;
diff --git a/core/Form/Primitives/PrimitiveEnumeration.class.php b/core/Form/Primitives/PrimitiveEnumeration.class.php
index 59e6d0d256..e1fba57d5a 100644
--- a/core/Form/Primitives/PrimitiveEnumeration.class.php
+++ b/core/Form/Primitives/PrimitiveEnumeration.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveEnumeration extends IdentifiablePrimitive
 	{
 		public function getList()
@@ -32,8 +34,8 @@ public function getList()
 		}
 
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveEnumeration
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveEnumeration
 		**/
 		public function of($class)
 		{
@@ -41,7 +43,7 @@ public function of($class)
 			
 			Assert::classExists($className);
 			
-			Assert::isInstance($className, 'Enumeration');
+			Assert::isInstance($className, '\Onphp\Enumeration');
 			
 			$this->className = $className;
 			
@@ -51,7 +53,10 @@ public function of($class)
 		public function importValue(/* Identifiable */ $value)
 		{
 			if ($value)
-				Assert::isEqual(get_class($value), $this->className);
+				Assert::isEqual(
+					ClassUtils::normalClassName($value),
+					$this->className
+				);
 			else
 				return parent::importValue(null);
 			
diff --git a/core/Form/Primitives/PrimitiveEnumerationByValue.class.php b/core/Form/Primitives/PrimitiveEnumerationByValue.class.php
index 928cc4078e..5b20c334e4 100644
--- a/core/Form/Primitives/PrimitiveEnumerationByValue.class.php
+++ b/core/Form/Primitives/PrimitiveEnumerationByValue.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveEnumerationByValue extends PrimitiveEnumeration
 	{
 		public function import($scope)
diff --git a/core/Form/Primitives/PrimitiveEnumerationList.class.php b/core/Form/Primitives/PrimitiveEnumerationList.class.php
index 9fc8419bf4..48b6891e5b 100644
--- a/core/Form/Primitives/PrimitiveEnumerationList.class.php
+++ b/core/Form/Primitives/PrimitiveEnumerationList.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveEnumerationList extends PrimitiveEnumeration
 	{
 		protected $value = array();
 		
 		/**
-		 * @return PrimitiveEnumerationList
+		 * @return \Onphp\PrimitiveEnumerationList
 		**/
 		public function clean()
 		{
@@ -30,13 +32,13 @@ public function clean()
 		}
 		
 		/**
-		 * @return PrimitiveEnumerationList
+		 * @return \Onphp\PrimitiveEnumerationList
 		**/
 		public function setValue(/* Enumeration */ $value)
 		{
 			if ($value) {
 				Assert::isArray($value);
-				Assert::isInstance(current($value), 'Enumeration');
+				Assert::isInstance(current($value), '\Onphp\Enumeration');
 			}
 			
 			$this->value = $value;
diff --git a/core/Form/Primitives/PrimitiveFile.class.php b/core/Form/Primitives/PrimitiveFile.class.php
index 87697db2db..153cdd34a6 100644
--- a/core/Form/Primitives/PrimitiveFile.class.php
+++ b/core/Form/Primitives/PrimitiveFile.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveFile extends RangedPrimitive
 	{
 		private $originalName		= null;
@@ -33,7 +35,7 @@ public function getMimeType()
 		}
 		
 		/**
-		 * @return PrimitiveFile
+		 * @return \Onphp\PrimitiveFile
 		**/
 		public function clean()
 		{
@@ -44,8 +46,8 @@ public function clean()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveFile
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveFile
 		**/
 		public function setAllowedMimeTypes($mimes)
 		{
@@ -57,8 +59,8 @@ public function setAllowedMimeTypes($mimes)
 		}
 
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveFile
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveFile
 		**/
 		public function addAllowedMimeType($mime)
 		{
@@ -148,7 +150,7 @@ public function exportValue()
 		}
 		
 		/**
-		 * @return PrimitiveFile
+		 * @return \Onphp\PrimitiveFile
 		**/
 		public function enableCheckUploaded()
 		{
@@ -158,7 +160,7 @@ public function enableCheckUploaded()
 		}
 		
 		/**
-		 * @return PrimitiveFile
+		 * @return \Onphp\PrimitiveFile
 		**/
 		public function disableCheckUploaded()
 		{
diff --git a/core/Form/Primitives/PrimitiveFloat.class.php b/core/Form/Primitives/PrimitiveFloat.class.php
index 2421240707..accb32785a 100644
--- a/core/Form/Primitives/PrimitiveFloat.class.php
+++ b/core/Form/Primitives/PrimitiveFloat.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveFloat extends PrimitiveNumber
 	{
 		protected function checkNumber($number)
diff --git a/core/Form/Primitives/PrimitiveForm.class.php b/core/Form/Primitives/PrimitiveForm.class.php
index 988f540271..ed14edeada 100644
--- a/core/Form/Primitives/PrimitiveForm.class.php
+++ b/core/Form/Primitives/PrimitiveForm.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveForm extends BasePrimitive
 	{
 		protected $proto = null;
@@ -19,16 +21,19 @@ class PrimitiveForm extends BasePrimitive
 		private $composite = false;
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveForm
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveForm
 		 * 
 		 * @deprecated You should use ofProto() instead
 		**/
 		public function of($className)
 		{
 			Assert::classExists($className);
-			
-			$protoClass = EntityProto::PROTO_CLASS_PREFIX.$className;
+
+			$parts = explode('\\', $className);
+			$className = array_pop($parts);
+			$parts[] = EntityProto::PROTO_CLASS_PREFIX.$className;
+			$protoClass = implode('\\', $parts);
 			
 			Assert::classExists($protoClass);
 			
@@ -36,8 +41,8 @@ public function of($className)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveForm
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveForm
 		**/
 		public function ofProto(EntityProto $proto)
 		{
@@ -54,7 +59,7 @@ public function ofAutoProto(AbstractProtoClass $proto)
 		}
 		
 		/**
-		 * @return PrimitiveForm
+		 * @return \Onphp\PrimitiveForm
 		 * 
 		 * Either composition or aggregation, it is very important on import.
 		**/
@@ -81,8 +86,8 @@ public function getProto()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveForm
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveForm
 		**/
 		public function setValue($value)
 		{
@@ -92,8 +97,8 @@ public function setValue($value)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveForm
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveForm
 		**/
 		public function importValue($value)
 		{
diff --git a/core/Form/Primitives/PrimitiveFormsList.class.php b/core/Form/Primitives/PrimitiveFormsList.class.php
index a8c5f90787..10c3ee8b7c 100644
--- a/core/Form/Primitives/PrimitiveFormsList.class.php
+++ b/core/Form/Primitives/PrimitiveFormsList.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveFormsList extends PrimitiveForm
 	{
 		protected $value = array();
 		
 		/**
-		 * @return PrimitiveFormsList
+		 * @return \Onphp\PrimitiveFormsList
 		**/
 		public function clean()
 		{
@@ -88,7 +90,7 @@ public function importValue($value)
 			$resultValue = array();
 			
 			foreach ($value as $id => $form) {
-				Assert::isInstance($form, 'Form');
+				Assert::isInstance($form, '\Onphp\Form');
 				
 				$resultValue[$id] = $form;
 				
diff --git a/core/Form/Primitives/PrimitiveHstore.class.php b/core/Form/Primitives/PrimitiveHstore.class.php
index 47744a5f5d..023fbaff47 100644
--- a/core/Form/Primitives/PrimitiveHstore.class.php
+++ b/core/Form/Primitives/PrimitiveHstore.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveHstore extends BasePrimitive
 	{
 		protected $formMapping	= array();
 		
 		/**
-		 * @return PrimitiveHstore
+		 * @return \Onphp\PrimitiveHstore
 		**/
 		public function setFormMapping($array)
 		{
@@ -40,7 +42,7 @@ public function getInnerErrors()
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function getInnerForm()
 		{
@@ -56,7 +58,7 @@ public function getValue()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
+		 * @throws \Onphp\WrongArgumentException
 		 * @return boolean
 		**/
 		public function importValue($value)
@@ -99,7 +101,7 @@ public function import($scope)
 		}
 		
 		/**
-		 * @return Hstore
+		 * @return \Onphp\Hstore
 		**/
 		public function exportValue()
 		{
@@ -112,7 +114,7 @@ public function exportValue()
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		protected function makeForm()
 		{
diff --git a/core/Form/Primitives/PrimitiveHttpUrl.class.php b/core/Form/Primitives/PrimitiveHttpUrl.class.php
index 39565d872f..ca57203103 100644
--- a/core/Form/Primitives/PrimitiveHttpUrl.class.php
+++ b/core/Form/Primitives/PrimitiveHttpUrl.class.php
@@ -12,15 +12,29 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveHttpUrl extends PrimitiveString
 	{
+		private $checkPrivilegedPorts = false;
+		
+		public function setCheckPrivilegedPorts($check = true)
+		{
+			$this->checkPrivilegedPorts = $check ? true : false;
+			
+			return $this;
+		}
+		
 		public function import($scope)
 		{
 			if (!$result = parent::import($scope))
 				return $result;
 			
 			try {
-				$this->value = HttpUrl::create()->parse($this->value);
+				$this->value =
+					HttpUrl::create()->
+						parse($this->value)->
+						setCheckPrivilegedPorts($this->checkPrivilegedPorts);
 			} catch (WrongArgumentException $e) {
 				$this->value = null;
 				
diff --git a/core/Form/Primitives/PrimitiveIdentifier.class.php b/core/Form/Primitives/PrimitiveIdentifier.class.php
index 3aa8be9f62..f9dd7896a2 100644
--- a/core/Form/Primitives/PrimitiveIdentifier.class.php
+++ b/core/Form/Primitives/PrimitiveIdentifier.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveIdentifier extends IdentifiablePrimitive
 	{
 		private $methodName	= 'getById';
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveIdentifier
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveIdentifier
 		**/
 		public function of($class)
 		{
@@ -28,7 +30,7 @@ public function of($class)
 			
 			Assert::isInstance(
 				$className,
-				'DAOConnected',
+				'\Onphp\DAOConnected',
 				"class '{$className}' must implement DAOConnected interface"
 			);
 			
@@ -38,7 +40,7 @@ public function of($class)
 		}
 		
 		/**
-		 * @return GenericDAO
+		 * @return \Onphp\GenericDAO
 		**/
 		public function dao()
 		{
@@ -51,11 +53,13 @@ public function dao()
 		}
 		
 		/**
-		 * @return PrimitiveIdentifier
+		 * @return \Onphp\PrimitiveIdentifier
 		**/
 		public function setMethodName($methodName)
 		{
-			if (strpos($methodName, '::') === false) {
+			if (is_callable($methodName)) {
+				/* all ok, call what you want */
+			} elseif (strpos($methodName, '::') === false) {
 				$dao = $this->dao();
 				
 				Assert::isTrue(
@@ -63,8 +67,9 @@ public function setMethodName($methodName)
 					"knows nothing about '".get_class($dao)
 					."::{$methodName}' method"
 				);
-			} else
+			} else {
 				ClassUtils::checkStaticMethod($methodName);
+			}
 			
 			$this->methodName = $methodName;
 			
@@ -79,7 +84,7 @@ public function importValue($value)
 					
 					return
 						$this->import(
-							array($this->getName() => $value->getId())
+							array($this->getName() => $this->actualExportValue($value))
 						);
 				
 				} catch (WrongArgumentException $e) {
@@ -105,7 +110,7 @@ public function import($scope)
 			) {
 				$value = $scope[$this->name];
 				
-				$this->raw = $value->getId();
+				$this->raw = $this->actualExportValue($value);
 				$this->setValue($value);
 				
 				return $this->imported = true;
@@ -139,12 +144,13 @@ public function import($scope)
 		
 		protected function actualImportValue($value)
 		{
-			return
-				(strpos($this->methodName, '::') === false)
-					? $this->dao()->{$this->methodName}($value)
-					: ClassUtils::callStaticMethod(
-						$this->methodName, $value
-					);
+			if (is_callable($this->methodName)) {
+				return call_user_func($this->methodName, $value);
+			} elseif (strpos($this->methodName, '::') === false) {
+				return $this->dao()->{$this->methodName}($value);
+			} else {
+				return ClassUtils::callStaticMethod($this->methodName, $value);
+			}
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/core/Form/Primitives/PrimitiveIdentifierList.class.php b/core/Form/Primitives/PrimitiveIdentifierList.class.php
index 726349fc31..4feff6d5c3 100644
--- a/core/Form/Primitives/PrimitiveIdentifierList.class.php
+++ b/core/Form/Primitives/PrimitiveIdentifierList.class.php
@@ -12,13 +12,16 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveIdentifierList extends PrimitiveIdentifier
 	{
 		protected $value = array();
 		private $ignoreEmpty = false;
+		private $ignoreWrong = false;
 		
 		/**
-		 * @return PrimitiveIdentifierList
+		 * @return \Onphp\PrimitiveIdentifierList
 		**/
 		public function clean()
 		{
@@ -31,7 +34,7 @@ public function clean()
 		}
 		
 		/**
-		 * @return PrimitiveIdentifierList
+		 * @return \Onphp\PrimitiveIdentifierList
 		**/
 		public function setValue($value)
 		{
@@ -108,8 +111,12 @@ public function import($scope)
 				if (
 					($this->scalar && !Assert::checkScalar($id))
 					|| (!$this->scalar && !Assert::checkInteger($id))
-				)
-					return false;
+				) {
+					if (!$this->isIgnoreWrong())
+						return false;
+					else
+						continue; //just skip it
+				}
 				
 				$values[] = $id;
 			}
@@ -117,7 +124,10 @@ public function import($scope)
 			$objectList = $this->dao()->getListByIds($values);
 			
 			if (
-				count($objectList) == count($values)
+				(
+					(count($objectList) == count($values))
+					|| $this->isIgnoreWrong()
+				)
 				&& !($this->min && count($values) < $this->min)
 				&& !($this->max && count($values) > $this->max)
 			) {
@@ -147,5 +157,17 @@ public function isIgnoreEmpty()
 		{
 			return $this->ignoreEmpty;
 		}
+		
+		public function setIgnoreWrong($orly = true)
+		{
+			$this->ignoreWrong = ($orly === true);
+			
+			return $this;
+		}
+		
+		public function isIgnoreWrong()
+		{
+			return $this->ignoreWrong;
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/core/Form/Primitives/PrimitiveImage.class.php b/core/Form/Primitives/PrimitiveImage.class.php
index 60287a10ec..056ae51d71 100644
--- a/core/Form/Primitives/PrimitiveImage.class.php
+++ b/core/Form/Primitives/PrimitiveImage.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveImage extends PrimitiveFile
 	{
 		private $width		= null;
@@ -28,7 +30,7 @@ final class PrimitiveImage extends PrimitiveFile
 		private $type		= null;
 		
 		/**
-		 * @return PrimitiveImage
+		 * @return \Onphp\PrimitiveImage
 		**/
 		public function clean()
 		{
@@ -55,7 +57,7 @@ public function getType()
 		}
 
 		/**
-		 * @return PrimitiveImage
+		 * @return \Onphp\PrimitiveImage
 		**/
 		public function setMaxWidth($max)
 		{
@@ -70,7 +72,7 @@ public function getMaxWidth()
 		}
 		
 		/**
-		 * @return PrimitiveImage
+		 * @return \Onphp\PrimitiveImage
 		**/
 		public function setMinWidth($min)
 		{
@@ -85,7 +87,7 @@ public function getMinWidth()
 		}
 		
 		/**
-		 * @return PrimitiveImage
+		 * @return \Onphp\PrimitiveImage
 		**/
 		public function setMaxHeight($max)
 		{
@@ -100,7 +102,7 @@ public function getMaxHeight()
 		}
 		
 		/**
-		 * @return PrimitiveImage
+		 * @return \Onphp\PrimitiveImage
 		**/
 		public function setMinHeight($min)
 		{
diff --git a/core/Form/Primitives/PrimitiveInet.class.php b/core/Form/Primitives/PrimitiveInet.class.php
index 0089b9ad04..3a38291e7c 100644
--- a/core/Form/Primitives/PrimitiveInet.class.php
+++ b/core/Form/Primitives/PrimitiveInet.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveInet extends BasePrimitive
 	{
 		public function import($scope)
diff --git a/core/Form/Primitives/PrimitiveInteger.class.php b/core/Form/Primitives/PrimitiveInteger.class.php
index e24f59323d..515969712f 100644
--- a/core/Form/Primitives/PrimitiveInteger.class.php
+++ b/core/Form/Primitives/PrimitiveInteger.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveInteger extends PrimitiveNumber
 	{
 		const SIGNED_SMALL_MIN = -32768;
diff --git a/core/Form/Primitives/PrimitiveIntegerIdentifier.class.php b/core/Form/Primitives/PrimitiveIntegerIdentifier.class.php
index 01d8dbf2c2..2ac0927056 100644
--- a/core/Form/Primitives/PrimitiveIntegerIdentifier.class.php
+++ b/core/Form/Primitives/PrimitiveIntegerIdentifier.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveIntegerIdentifier extends PrimitiveIdentifier
 	{
 		protected $scalar = false;
diff --git a/core/Form/Primitives/PrimitiveIpAddress.class.php b/core/Form/Primitives/PrimitiveIpAddress.class.php
index 87f1b2ec32..61f104f034 100644
--- a/core/Form/Primitives/PrimitiveIpAddress.class.php
+++ b/core/Form/Primitives/PrimitiveIpAddress.class.php
@@ -12,8 +12,10 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveIpAddress extends BaseObjectPrimitive
 	{
-		protected $className = 'IpAddress';
+		protected $className = '\Onphp\IpAddress';
 	}
 ?>
diff --git a/core/Form/Primitives/PrimitiveIpRange.class.php b/core/Form/Primitives/PrimitiveIpRange.class.php
index cfba373880..41438fbd91 100644
--- a/core/Form/Primitives/PrimitiveIpRange.class.php
+++ b/core/Form/Primitives/PrimitiveIpRange.class.php
@@ -12,8 +12,10 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveIpRange extends BaseObjectPrimitive
 	{
-		protected $className = 'IpRange';
+		protected $className = '\Onphp\IpRange';
 	}
 ?>
diff --git a/core/Form/Primitives/PrimitiveList.class.php b/core/Form/Primitives/PrimitiveList.class.php
index d9ee43e3c4..89cd9d90f7 100644
--- a/core/Form/Primitives/PrimitiveList.class.php
+++ b/core/Form/Primitives/PrimitiveList.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveList extends BasePrimitive implements ListedPrimitive
 	{
 		protected $list = array();
@@ -33,7 +35,7 @@ public function getActualChoiceValue()
 		}
 		
 		/**
-		 * @return PrimitiveList
+		 * @return \Onphp\PrimitiveList
 		**/
 		public function setDefault($default)
 		{
@@ -56,7 +58,7 @@ public function getList()
 		}
 		
 		/**
-		 * @return PrimitiveList
+		 * @return \Onphp\PrimitiveList
 		**/
 		public function setList($list)
 		{
diff --git a/core/Form/Primitives/PrimitiveMultiList.class.php b/core/Form/Primitives/PrimitiveMultiList.class.php
index a8844a25c3..d566df5107 100644
--- a/core/Form/Primitives/PrimitiveMultiList.class.php
+++ b/core/Form/Primitives/PrimitiveMultiList.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveMultiList extends PrimitiveList
 	{
 		private $selected = array();
@@ -38,7 +40,7 @@ public function getActualChoiceValue()
 		}
 		
 		/**
-		 * @return PrimitiveMultiList
+		 * @return \Onphp\PrimitiveMultiList
 		**/
 		public function setDefault($default)
 		{
@@ -86,7 +88,7 @@ public function import($scope)
 		}
 		
 		/**
-		 * @return PrimitiveMultiList
+		 * @return \Onphp\PrimitiveMultiList
 		**/
 		public function clean()
 		{
diff --git a/core/Form/Primitives/PrimitiveNoValue.class.php b/core/Form/Primitives/PrimitiveNoValue.class.php
index ffbbf528de..6fcbb143ec 100644
--- a/core/Form/Primitives/PrimitiveNoValue.class.php
+++ b/core/Form/Primitives/PrimitiveNoValue.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveNoValue extends BasePrimitive
 	{
 		/**
-		 * @return PrimitiveNoValue
+		 * @return \Onphp\PrimitiveNoValue
 		**/
 		public function setValue($value)
 		{
@@ -48,7 +50,7 @@ public function importValue($value)
 		public function import($scope)
 		{
 			if (
-				key_exists($this->name, $scope)
+				array_key_exists($this->name, $scope)
 				&& $scope[$this->name] == null
 			)
 				return $this->imported = true;
diff --git a/core/Form/Primitives/PrimitiveNumber.class.php b/core/Form/Primitives/PrimitiveNumber.class.php
index dd2518c245..4d6ffc9364 100644
--- a/core/Form/Primitives/PrimitiveNumber.class.php
+++ b/core/Form/Primitives/PrimitiveNumber.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Primitives
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class PrimitiveNumber extends FiltrablePrimitive
 	{
 		abstract protected function checkNumber($number);
diff --git a/core/Form/Primitives/PrimitivePlainList.class.php b/core/Form/Primitives/PrimitivePlainList.class.php
index a493ddb4d0..5451342fb3 100644
--- a/core/Form/Primitives/PrimitivePlainList.class.php
+++ b/core/Form/Primitives/PrimitivePlainList.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitivePlainList extends PrimitiveList
 	{
 		/**
-		 * @return PrimitivePlainList
+		 * @return \Onphp\PrimitivePlainList
 		**/
 		public function setList($list)
 		{
diff --git a/core/Form/Primitives/PrimitivePolymorphicIdentifier.class.php b/core/Form/Primitives/PrimitivePolymorphicIdentifier.class.php
index 04db53ea5e..b6c0fb0ee2 100644
--- a/core/Form/Primitives/PrimitivePolymorphicIdentifier.class.php
+++ b/core/Form/Primitives/PrimitivePolymorphicIdentifier.class.php
@@ -13,6 +13,8 @@
 	 * Hint: use raw values like 'City.42' or 'Country.42' where City and
 	 * Country are childrens of base class GeoLocation, for example.
 	**/
+	namespace Onphp;
+
 	final class PrimitivePolymorphicIdentifier extends PrimitiveIdentifier
 	{
 		const WRONG_CID_FORMAT	= 201;
@@ -27,13 +29,13 @@ public static function export($value)
 			if ($value === null)
 				return null;
 			
-			Assert::isInstance($value, 'Identifiable');
+			Assert::isInstance($value, '\Onphp\Identifiable');
 			
 			return get_class($value).self::DELIMITER.$value->getId();
 		}
 		
 		/**
-		 * @throws WrongStateException
+		 * @throws \Onphp\WrongStateException
 		**/
 		public function of($class)
 		{
@@ -43,8 +45,8 @@ public function of($class)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitivePolymorphicIdentifier
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitivePolymorphicIdentifier
 		**/
 		public function ofBase($className)
 		{
@@ -52,7 +54,7 @@ public function ofBase($className)
 			
 			Assert::isInstance(
 				$className,
-				'DAOConnected',
+				'\Onphp\DAOConnected',
 				"class '{$className}' must implement DAOConnected interface"
 			);
 			
@@ -67,7 +69,7 @@ public function getBaseClassName()
 		}
 		
 		/**
-		 * @return PrimitivePolymorphicIdentifier
+		 * @return \Onphp\PrimitivePolymorphicIdentifier
 		**/
 		public function setValue($value)
 		{
diff --git a/core/Form/Primitives/PrimitiveRange.class.php b/core/Form/Primitives/PrimitiveRange.class.php
index 8432396030..14c5913ad6 100644
--- a/core/Form/Primitives/PrimitiveRange.class.php
+++ b/core/Form/Primitives/PrimitiveRange.class.php
@@ -12,14 +12,16 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveRange extends ComplexPrimitive
 	{
 		const MIN	= 'min';
 		const MAX	= 'max';
 
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveRange
 		**/
 		public function setValue(/* BaseRange */ $range)
 		{
diff --git a/core/Form/Primitives/PrimitiveScalarIdentifier.class.php b/core/Form/Primitives/PrimitiveScalarIdentifier.class.php
index 40d8d1b478..e01cc10a53 100644
--- a/core/Form/Primitives/PrimitiveScalarIdentifier.class.php
+++ b/core/Form/Primitives/PrimitiveScalarIdentifier.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveScalarIdentifier extends PrimitiveIdentifier
 	{
 		protected $scalar = true;
diff --git a/core/Form/Primitives/PrimitiveString.class.php b/core/Form/Primitives/PrimitiveString.class.php
index 6e5d31b66d..a12752df03 100644
--- a/core/Form/Primitives/PrimitiveString.class.php
+++ b/core/Form/Primitives/PrimitiveString.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveString extends FiltrablePrimitive
 	{
 		// TODO: consider making a primitive based on main::Net::Mail::MailAddress
@@ -31,7 +33,7 @@ public function getAllowedPattern()
 		}
 		
 		/**
-		 * @return PrimitiveString
+		 * @return \Onphp\PrimitiveString
 		**/
 		public function setAllowedPattern($pattern)
 		{
diff --git a/core/Form/Primitives/PrimitiveTernary.class.php b/core/Form/Primitives/PrimitiveTernary.class.php
index 35ecfaf8d2..a193d603c0 100644
--- a/core/Form/Primitives/PrimitiveTernary.class.php
+++ b/core/Form/Primitives/PrimitiveTernary.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveTernary extends BasePrimitive
 	{
 		private $falseValue		= 0;
 		private $trueValue		= 1;
 		
 		/**
-		 * @return PrimitiveTernary
+		 * @return \Onphp\PrimitiveTernary
 		**/
 		public function setTrueValue($trueValue)
 		{
@@ -28,7 +30,7 @@ public function setTrueValue($trueValue)
 		}
 		
 		/**
-		 * @return PrimitiveTernary
+		 * @return \Onphp\PrimitiveTernary
 		**/
 		public function setFalseValue($falseValue)
 		{
diff --git a/core/Form/Primitives/PrimitiveTime.class.php b/core/Form/Primitives/PrimitiveTime.class.php
index 99d6fcf637..9c32c3ea5f 100644
--- a/core/Form/Primitives/PrimitiveTime.class.php
+++ b/core/Form/Primitives/PrimitiveTime.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveTime extends ComplexPrimitive
 	{
 		const HOURS		= PrimitiveTimestamp::HOURS;
@@ -19,8 +21,8 @@ final class PrimitiveTime extends ComplexPrimitive
 		const SECONDS	= PrimitiveTimestamp::SECONDS;
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveTime
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveTime
 		**/
 		public function setValue(/* Time */ $time)
 		{
@@ -32,8 +34,8 @@ public function setValue(/* Time */ $time)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveTime
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveTime
 		**/
 		public function setMin(/* Time */ $time)
 		{
@@ -45,8 +47,8 @@ public function setMin(/* Time */ $time)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveTime
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveTime
 		**/
 		public function setMax(/* Time */ $time)
 		{
@@ -58,8 +60,8 @@ public function setMax(/* Time */ $time)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return PrimitiveTime
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\PrimitiveTime
 		**/
 		public function setDefault(/* Time */ $time)
 		{
diff --git a/core/Form/Primitives/PrimitiveTimestamp.class.php b/core/Form/Primitives/PrimitiveTimestamp.class.php
index 23413801db..9a092a1f84 100644
--- a/core/Form/Primitives/PrimitiveTimestamp.class.php
+++ b/core/Form/Primitives/PrimitiveTimestamp.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	class PrimitiveTimestamp extends PrimitiveDate
 	{
 		const HOURS		= 'hrs';
@@ -71,7 +73,7 @@ public function importMarried($scope)
 		
 		protected function getObjectName()
 		{
-			return 'Timestamp';
+			return '\Onphp\Timestamp';
 		}
 
 		public function exportValue()
diff --git a/core/Form/Primitives/PrimitiveTimestampRange.class.php b/core/Form/Primitives/PrimitiveTimestampRange.class.php
index 7c89e837c1..8854be2966 100644
--- a/core/Form/Primitives/PrimitiveTimestampRange.class.php
+++ b/core/Form/Primitives/PrimitiveTimestampRange.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveTimestampRange extends PrimitiveDateRange
 	{
 		private $className = null;
 		
 		/**
-		 * @return PrimitiveTimestampRange
+		 * @return \Onphp\PrimitiveTimestampRange
 		**/
 		public static function create($name)
 		{
@@ -26,7 +28,7 @@ public static function create($name)
 		
 		protected function getObjectName()
 		{
-			return 'TimestampRange';
+			return '\Onphp\TimestampRange';
 		}
 		
 		protected function makeRange($string)
diff --git a/core/Form/Primitives/PrimitiveTimestampTZ.class.php b/core/Form/Primitives/PrimitiveTimestampTZ.class.php
index f5ade79792..d457457615 100644
--- a/core/Form/Primitives/PrimitiveTimestampTZ.class.php
+++ b/core/Form/Primitives/PrimitiveTimestampTZ.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class PrimitiveTimestampTZ extends PrimitiveTimestamp
 	{
 		const ZONE = 'zone';
@@ -68,7 +70,7 @@ public function importMarried($scope)
 
 		protected function getObjectName()
 		{
-			return 'TimestampTZ';
+			return '\Onphp\TimestampTZ';
 		}
 
 		public function exportValue()
diff --git a/core/Form/Primitives/RangedPrimitive.class.php b/core/Form/Primitives/RangedPrimitive.class.php
index a5c866dadd..5e9a74e008 100644
--- a/core/Form/Primitives/RangedPrimitive.class.php
+++ b/core/Form/Primitives/RangedPrimitive.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Primitives
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class RangedPrimitive extends BasePrimitive
 	{
 		protected $min = null;
@@ -24,7 +26,7 @@ public function getMin()
 		}
 		
 		/**
-		 * @return RangedPrimitive
+		 * @return \Onphp\RangedPrimitive
 		**/
 		public function setMin($min)
 		{
@@ -39,7 +41,7 @@ public function getMax()
 		}
 		
 		/**
-		 * @return RangedPrimitive
+		 * @return \Onphp\RangedPrimitive
 		**/
 		public function setMax($max)
 		{
diff --git a/core/Form/Primitives/TimeList.class.php b/core/Form/Primitives/TimeList.class.php
index 405f382f78..d1348601ee 100644
--- a/core/Form/Primitives/TimeList.class.php
+++ b/core/Form/Primitives/TimeList.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Primitives
 	**/
+	namespace Onphp;
+
 	final class TimeList extends BasePrimitive
 	{
 		protected $value = array();
 		
 		/**
-		 * @return TimeList
+		 * @return \Onphp\TimeList
 		**/
 		public function clean()
 		{
@@ -53,17 +55,30 @@ public function import($scope)
 			
 			return ($this->value !== array());
 		}
-		
+
+		public function getValueOrDefault()
+		{
+			if (is_array($this->value) && $this->value[0])
+				return $this->value;
+
+			return array($this->default);
+		}
+
+		/**
+		 * @deprecated deprecated since version 1.0
+		 * @see getSafeValue, getValueOrDefault
+		 * @return type
+		 */
 		public function getActualValue()
 		{
 			if (is_array($this->value) && $this->value[0])
 				return $this->value;
 			elseif (is_array($this->raw) && $this->raw[0])
 				return $this->raw;
-			
+
 			return array($this->default);
 		}
-		
+
 		public static function stringToTimeList($string)
 		{
 			$list = array();
@@ -86,4 +101,4 @@ public function exportValue()
 			throw new UnimplementedFeatureException();
 		}
 	}
-?>
\ No newline at end of file
+?>
diff --git a/core/Form/RegulatedForm.class.php b/core/Form/RegulatedForm.class.php
index dcf3ac9052..6e4f3f7a53 100644
--- a/core/Form/RegulatedForm.class.php
+++ b/core/Form/RegulatedForm.class.php
@@ -15,14 +15,16 @@
 	 * @ingroup Form
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class RegulatedForm extends PlainForm
 	{
 		protected $rules		= array(); // forever
 		protected $violated		= array(); // rules
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return Form
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\Form
 		**/
 		public function addRule($name, LogicalObject $rule)
 		{
@@ -34,8 +36,8 @@ public function addRule($name, LogicalObject $rule)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return Form
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\Form
 		**/
 		public function dropRuleByName($name)
 		{
@@ -55,7 +57,7 @@ public function ruleExists($name)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function checkRules()
 		{
diff --git a/core/Logic/BinaryExpression.class.php b/core/Logic/BinaryExpression.class.php
index 10f2c8e11a..5e90107602 100644
--- a/core/Logic/BinaryExpression.class.php
+++ b/core/Logic/BinaryExpression.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class BinaryExpression implements LogicalObject, MappableObject
 	{
 		const EQUALS			= '=';
@@ -46,7 +48,7 @@ final class BinaryExpression implements LogicalObject, MappableObject
 		private $brackets = true;
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		 */
 		public static function create($left, $right, $logic)
 		{
@@ -77,7 +79,7 @@ public function getLogic()
 		
 		/**
 		 * @param boolean $noBrackets
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		 */
 		public function noBrackets($noBrackets = true)
 		{
@@ -94,7 +96,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/Logic/CallbackLogicalObject.class.php b/core/Logic/CallbackLogicalObject.class.php
index 969d419630..bb14e9650d 100644
--- a/core/Logic/CallbackLogicalObject.class.php
+++ b/core/Logic/CallbackLogicalObject.class.php
@@ -11,46 +11,49 @@
 
 	/**
 	 * Wrapper around given childs of LogicalObject with custom logic-glue's.
-	 * 
+	 *
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	class CallbackLogicalObject implements LogicalObject
 	{
 		/**
-		 * @var Closure
+		 * @var \Closure
 		 */
 		private $callback = null;
 
 		/**
 		 * @static
-		 * @param Closure $callback
-		 * @return CallbackLogicalObject
+		 * @param \Closure $callback
+		 * @return \Onphp\CallbackLogicalObject
 		 */
-		static public function create(Closure $callback)
+		static public function create($callback)
 		{
-			return new self($callback);
+			return new static($callback);
 		}
 
 		/**
-		 * @param Closure $callback
+		 * @param \Closure $callback
 		 */
-		public function __construct(Closure $callback)
+		public function __construct($callback)
 		{
+			Assert::isTrue(is_callable($callback, true), 'callback must be callable');
 			$this->callback = $callback;
 		}
 
 		/**
-		 * @param Form $form
+		 * @param \Onphp\Form $\Onphp\Form
 		 * @return bool
 		 */
 		public function toBoolean(Form $form)
 		{
-			return (bool)$this->callback->__invoke($form);
+			return call_user_func($this->callback, $form);
 		}
 
 		/**
-		 * @param Dialect $dialect
-		 * @throws UnimplementedFeatureException 
+		 * @param \Onphp\Dialect $\Onphp\Dialect
+		 * @throws \Onphp\UnimplementedFeatureException
 		 */
 		public function toDialectString(Dialect $dialect)
 		{
diff --git a/core/Logic/EqualsLowerExpression.class.php b/core/Logic/EqualsLowerExpression.class.php
index d00d7efffa..d79f195178 100644
--- a/core/Logic/EqualsLowerExpression.class.php
+++ b/core/Logic/EqualsLowerExpression.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class EqualsLowerExpression implements LogicalObject, MappableObject
 	{
 		private $left	= null;
@@ -39,7 +41,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return EqualsLowerExpression
+		 * @return \Onphp\EqualsLowerExpression
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/Logic/Expression.class.php b/core/Logic/Expression.class.php
index 1f85332d72..71f2956c48 100644
--- a/core/Logic/Expression.class.php
+++ b/core/Logic/Expression.class.php
@@ -14,10 +14,12 @@
 	 *
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class Expression extends StaticFactory
 	{
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function expAnd($left, $right)
 		{
@@ -27,7 +29,7 @@ public static function expAnd($left, $right)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function expOr($left, $right)
 		{
@@ -37,7 +39,7 @@ public static function expOr($left, $right)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function eq($field, $value)
 		{
@@ -45,7 +47,7 @@ public static function eq($field, $value)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function eqId($field, Identifiable $object)
 		{
@@ -53,7 +55,7 @@ public static function eqId($field, Identifiable $object)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function notEq($field, $value)
 		{
@@ -65,7 +67,7 @@ public static function notEq($field, $value)
 		/**
 		 * greater than
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function gt($field, $value)
 		{
@@ -77,7 +79,7 @@ public static function gt($field, $value)
 		/**
 		 * greater than or equals
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function gtEq($field, $value)
 		{
@@ -89,7 +91,7 @@ public static function gtEq($field, $value)
 		/**
 		 * lower than
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function lt($field, $value)
 		{
@@ -101,7 +103,7 @@ public static function lt($field, $value)
 		/**
 		 * lower than or equals
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function ltEq($field, $value)
 		{
@@ -111,7 +113,7 @@ public static function ltEq($field, $value)
 		}
 		
 		/**
-		 * @return PostfixUnaryExpression
+		 * @return \Onphp\PostfixUnaryExpression
 		**/
 		public static function notNull($field)
 		{
@@ -119,7 +121,7 @@ public static function notNull($field)
 		}
 		
 		/**
-		 * @return PostfixUnaryExpression
+		 * @return \Onphp\PostfixUnaryExpression
 		**/
 		public static function isNull($field)
 		{
@@ -127,7 +129,7 @@ public static function isNull($field)
 		}
 		
 		/**
-		 * @return PostfixUnaryExpression
+		 * @return \Onphp\PostfixUnaryExpression
 		**/
 		public static function isTrue($field)
 		{
@@ -135,7 +137,7 @@ public static function isTrue($field)
 		}
 		
 		/**
-		 * @return PostfixUnaryExpression
+		 * @return \Onphp\PostfixUnaryExpression
 		**/
 		public static function isFalse($field)
 		{
@@ -143,7 +145,7 @@ public static function isFalse($field)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function like($field, $value)
 		{
@@ -151,7 +153,7 @@ public static function like($field, $value)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function notLike($field, $value)
 		{
@@ -159,7 +161,7 @@ public static function notLike($field, $value)
 		}
 
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function ilike($field, $value)
 		{
@@ -167,7 +169,7 @@ public static function ilike($field, $value)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function notIlike($field, $value)
 		{
@@ -175,7 +177,7 @@ public static function notIlike($field, $value)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function similar($field, $value)
 		{
@@ -183,7 +185,7 @@ public static function similar($field, $value)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function notSimilar($field, $value)
 		{
@@ -191,7 +193,7 @@ public static function notSimilar($field, $value)
 		}
 		
 		/**
-		 * @return EqualsLowerExpression
+		 * @return \Onphp\EqualsLowerExpression
 		**/
 		public static function eqLower($field, $value)
 		{
@@ -199,7 +201,7 @@ public static function eqLower($field, $value)
 		}
 		
 		/**
-		 * @return LogicalBetween
+		 * @return \Onphp\LogicalBetween
 		**/
 		public static function between($field, $left, $right)
 		{
@@ -209,7 +211,7 @@ public static function between($field, $left, $right)
 		/**
 		 * {,not}in handles strings, arrays and SelectQueries
 		 *
-		 * @return LogicalObject
+		 * @return \Onphp\LogicalObject
 		**/
 		public static function in($field, $value)
 		{
@@ -225,7 +227,7 @@ public static function in($field, $value)
 		}
 		
 		/**
-		 * @return LogicalObject
+		 * @return \Onphp\LogicalObject
 		**/
 		public static function notIn($field, $value)
 		{
@@ -243,7 +245,7 @@ public static function notIn($field, $value)
 		/**
 		 * +
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function add($field, $value)
 		{
@@ -253,7 +255,7 @@ public static function add($field, $value)
 		/**
 		 * -
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function sub($field, $value)
 		{
@@ -263,7 +265,7 @@ public static function sub($field, $value)
 		/**
 		 * *
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function mul($field, $value)
 		{
@@ -273,7 +275,7 @@ public static function mul($field, $value)
 		/**
 		 * /
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function div($field, $value)
 		{
@@ -283,7 +285,7 @@ public static function div($field, $value)
 		/**
 		 * %
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function mod($field, $value)
 		{
@@ -291,7 +293,7 @@ public static function mod($field, $value)
 		}
 		
 		/**
-		 * @return FullTextSearch
+		 * @return \Onphp\FullTextSearch
 		**/
 		public static function fullTextAnd($field, $wordsList)
 		{
@@ -299,7 +301,7 @@ public static function fullTextAnd($field, $wordsList)
 		}
 		
 		/**
-		 * @return FullTextSearch
+		 * @return \Onphp\FullTextSearch
 		**/
 		public static function fullTextOr($field, $wordsList)
 		{
@@ -307,7 +309,7 @@ public static function fullTextOr($field, $wordsList)
 		}
 		
 		/**
-		 * @return FullTextRank
+		 * @return \Onphp\FullTextRank
 		**/
 		public static function fullTextRankOr($field, $wordsList)
 		{
@@ -315,7 +317,7 @@ public static function fullTextRankOr($field, $wordsList)
 		}
 		
 		/**
-		 * @return FullTextRank
+		 * @return \Onphp\FullTextRank
 		**/
 		public static function fullTextRankAnd($field, $wordsList)
 		{
@@ -323,7 +325,7 @@ public static function fullTextRankAnd($field, $wordsList)
 		}
 		
 		/**
-		 * @return LogicalChain
+		 * @return \Onphp\LogicalChain
 		**/
 		public static function orBlock(/* ... */)
 		{
@@ -334,7 +336,7 @@ public static function orBlock(/* ... */)
 		}
 
 		/**
-		 * @return LogicalChain
+		 * @return \Onphp\LogicalChain
 		**/
 		public static function andBlock(/* ... */)
 		{
@@ -345,7 +347,7 @@ public static function andBlock(/* ... */)
 		}
 		
 		/**
-		 * @return LogicalChain
+		 * @return \Onphp\LogicalChain
 		**/
 		public static function chain()
 		{
@@ -353,7 +355,7 @@ public static function chain()
 		}
 		
 		/**
-		 * @return PrefixUnaryExpression
+		 * @return \Onphp\PrefixUnaryExpression
 		**/
 		public static function not($field)
 		{
@@ -361,7 +363,7 @@ public static function not($field)
 		}
 
 		/**
-		 * @return PrefixUnaryExpression
+		 * @return \Onphp\PrefixUnaryExpression
 		**/
 		public static function minus($field)
 		{
@@ -369,7 +371,7 @@ public static function minus($field)
 		}
 		
 		/**
-		 * @return Ip4ContainsExpression 
+		 * @return \Onphp\Ip4ContainsExpression 
 		**/
 		public static function containsIp($range, $ip)
 		{
@@ -377,7 +379,7 @@ public static function containsIp($range, $ip)
 		}
 		
 		/**
-		 * @return LogicalChain
+		 * @return \Onphp\LogicalChain
 		**/
 		private static function block($args, $logic)
 		{
diff --git a/core/Logic/HstoreExpression.class.php b/core/Logic/HstoreExpression.class.php
index 465d1a5743..91127e7373 100644
--- a/core/Logic/HstoreExpression.class.php
+++ b/core/Logic/HstoreExpression.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Logic
 	 * @see http://www.postgresql.org/docs/8.3/interactive/hstore.html
 	**/
+	namespace Onphp;
+
 	final class HstoreExpression extends StaticFactory
 	{
 		const CONTAIN 		= '?';
@@ -21,7 +23,7 @@ final class HstoreExpression extends StaticFactory
 		const CONCAT		= '||';
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function containKey($field, $key)
 		{
@@ -29,7 +31,7 @@ public static function containKey($field, $key)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function getValueByKey($field, $key)
 		{
@@ -37,7 +39,7 @@ public static function getValueByKey($field, $key)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function containValue($field, $key, $value)
 		{
@@ -45,7 +47,7 @@ public static function containValue($field, $key, $value)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function concat($field, $value)
 		{
@@ -53,7 +55,7 @@ public static function concat($field, $value)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function containHstore($field, Hstore $hstore)
 		{
diff --git a/core/Logic/InExpression.class.php b/core/Logic/InExpression.class.php
index fcd1379bfd..a5b79641a2 100644
--- a/core/Logic/InExpression.class.php
+++ b/core/Logic/InExpression.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class InExpression implements LogicalObject, MappableObject
 	{
 		const IN		= 'IN';
@@ -41,9 +43,24 @@ public function __construct($left, $right, $logic)
 			$this->right	= $right;
 			$this->logic	= $logic;
 		}
+
+		public function getLeft()
+		{
+			return $this->left;
+		}
+
+		public function getRight()
+		{
+			return $this->right;
+		}
+
+		public function getLogic()
+		{
+			return $this->logic;
+		}
 		
 		/**
-		 * @return InExpression
+		 * @return \Onphp\InExpression
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/Logic/Ip4ContainsExpression.class.php b/core/Logic/Ip4ContainsExpression.class.php
index 56394428a3..4680542393 100644
--- a/core/Logic/Ip4ContainsExpression.class.php
+++ b/core/Logic/Ip4ContainsExpression.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class Ip4ContainsExpression implements LogicalObject, MappableObject
 	{
 		private $range = null;
diff --git a/core/Logic/LTreeExpression.class.php b/core/Logic/LTreeExpression.class.php
index 7002da886c..e178289d4f 100644
--- a/core/Logic/LTreeExpression.class.php
+++ b/core/Logic/LTreeExpression.class.php
@@ -15,6 +15,8 @@
 	 * @see http://www.postgresql.org/docs/current/interactive/ltree.html
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class LTreeExpression extends StaticFactory
 	{
 		const ANCESTOR 		= '@>';
@@ -25,7 +27,7 @@ final class LTreeExpression extends StaticFactory
 		/**
 		 * Is left argument an ancestor of right (or equal)?
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function ancestor($left, $right)
 		{
@@ -35,7 +37,7 @@ public static function ancestor($left, $right)
 		/**
 		 * Is left argument a descendant of right (or equal)?
 		 *
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function descendant($left, $right)
 		{
@@ -43,7 +45,7 @@ public static function descendant($left, $right)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function match($ltree, $lquery)
 		{
@@ -51,7 +53,7 @@ public static function match($ltree, $lquery)
 		}
 		
 		/**
-		 * @return BinaryExpression
+		 * @return \Onphp\BinaryExpression
 		**/
 		public static function search($ltree, $ltxtquery)
 		{
diff --git a/core/Logic/LogicalBetween.class.php b/core/Logic/LogicalBetween.class.php
index b71cf8c94d..be2da81efe 100644
--- a/core/Logic/LogicalBetween.class.php
+++ b/core/Logic/LogicalBetween.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class LogicalBetween implements LogicalObject, MappableObject
 	{
 		private $field  = null;
@@ -40,7 +42,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return LogicalBetween
+		 * @return \Onphp\LogicalBetween
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/Logic/LogicalChain.class.php b/core/Logic/LogicalChain.class.php
index 035b0f3b10..25c169b005 100644
--- a/core/Logic/LogicalChain.class.php
+++ b/core/Logic/LogicalChain.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class LogicalChain extends SQLChain
 	{
 		/**
-		 * @return LogicalChain
+		 * @return \Onphp\LogicalChain
 		**/
 		public static function block($args, $logic)
 		{
@@ -46,7 +48,7 @@ public static function block($args, $logic)
 		}
 		
 		/**
-		 * @return LogicalChain
+		 * @return \Onphp\LogicalChain
 		**/
 		public function expAnd(LogicalObject $exp)
 		{
@@ -54,7 +56,7 @@ public function expAnd(LogicalObject $exp)
 		}
 		
 		/**
-		 * @return LogicalChain
+		 * @return \Onphp\LogicalChain
 		**/
 		public function expOr(LogicalObject $exp)
 		{
diff --git a/core/Logic/LogicalObject.class.php b/core/Logic/LogicalObject.class.php
index 82664f794e..255f5edb7f 100644
--- a/core/Logic/LogicalObject.class.php
+++ b/core/Logic/LogicalObject.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	interface LogicalObject extends DialectString
 	{
 		public function toBoolean(Form $form);
diff --git a/core/Logic/MappableObject.class.php b/core/Logic/MappableObject.class.php
index 55aa41fdfc..53a2f5e9a2 100644
--- a/core/Logic/MappableObject.class.php
+++ b/core/Logic/MappableObject.class.php
@@ -13,10 +13,12 @@
 	 * @ingroup Logic
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface MappableObject extends DialectString
 	{
 		/**
-		 * @return MappableObject
+		 * @return \Onphp\MappableObject
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query);
 	}
diff --git a/core/Logic/PostfixUnaryExpression.class.php b/core/Logic/PostfixUnaryExpression.class.php
index cc553f2fa1..8ca0540dd8 100644
--- a/core/Logic/PostfixUnaryExpression.class.php
+++ b/core/Logic/PostfixUnaryExpression.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class PostfixUnaryExpression implements LogicalObject, MappableObject
 	{
 		const IS_NULL			= 'IS NULL';
@@ -25,7 +27,7 @@ final class PostfixUnaryExpression implements LogicalObject, MappableObject
 		private $brackets   = true;
 		
 		/**
-		 * @return PostfixUnaryExpression
+		 * @return \Onphp\PostfixUnaryExpression
 		 */
 		public static function create($subject, $logic)
 		{
@@ -40,7 +42,7 @@ public function __construct($subject, $logic)
 		
 		/**
 		 * @param boolean $noBrackets
-		 * @return PostfixUnaryExpression
+		 * @return \Onphp\PostfixUnaryExpression
 		 */
 		public function noBrackets($noBrackets = true)
 		{
@@ -56,7 +58,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return PostfixUnaryExpression
+		 * @return \Onphp\PostfixUnaryExpression
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/Logic/PrefixUnaryExpression.class.php b/core/Logic/PrefixUnaryExpression.class.php
index 73445296d3..fbbbaf8ccd 100644
--- a/core/Logic/PrefixUnaryExpression.class.php
+++ b/core/Logic/PrefixUnaryExpression.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Logic
 	**/
+	namespace Onphp;
+
 	final class PrefixUnaryExpression implements LogicalObject, MappableObject
 	{
 		const NOT	= 'NOT';
@@ -22,7 +24,7 @@ final class PrefixUnaryExpression implements LogicalObject, MappableObject
 		private $brackets   = true;
 		
 		/**
-		 * @return PrefixUnaryExpression
+		 * @return \Onphp\PrefixUnaryExpression
 		 */
 		public static function create($subject, $logic)
 		{
@@ -37,7 +39,7 @@ public function __construct($logic, $subject)
 		
 		/**
 		 * @param boolean $noBrackets
-		 * @return PrefixUnaryExpression
+		 * @return \Onphp\PrefixUnaryExpression
 		 */
 		public function noBrackets($noBrackets = true)
 		{
@@ -54,7 +56,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return PrefixUnaryExpression
+		 * @return \Onphp\PrefixUnaryExpression
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/OSQL/Castable.class.php b/core/OSQL/Castable.class.php
index be313542c2..158aa16b15 100644
--- a/core/OSQL/Castable.class.php
+++ b/core/OSQL/Castable.class.php
@@ -15,12 +15,14 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class Castable implements DialectString
 	{
 		protected $cast	= null;
 		
 		/**
-		 * @return Castable
+		 * @return \Onphp\Castable
 		**/
 		public function castTo($cast)
 		{
diff --git a/core/OSQL/CombineQuery.class.php b/core/OSQL/CombineQuery.class.php
index e8cc13b6ba..2b75544ab9 100644
--- a/core/OSQL/CombineQuery.class.php
+++ b/core/OSQL/CombineQuery.class.php
@@ -21,6 +21,8 @@
 	 * 
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class CombineQuery extends StaticFactory
 	{
 		const UNION				= 'UNION';
@@ -33,7 +35,7 @@ final class CombineQuery extends StaticFactory
 		const EXCEPT_ALL		= 'EXCEPT ALL';
 		
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public static function union($left, $right)
 		{
@@ -41,7 +43,7 @@ public static function union($left, $right)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public static function unionBlock()
 		{
@@ -51,7 +53,7 @@ public static function unionBlock()
 		}
 		
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public static function unionAll($left, $right)
 		{
@@ -59,7 +61,7 @@ public static function unionAll($left, $right)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public static function unionAllBlock()
 		{
@@ -69,7 +71,7 @@ public static function unionAllBlock()
 		}
 		
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public static function intersect($left, $right)
 		{
@@ -77,7 +79,7 @@ public static function intersect($left, $right)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public static function intersectBlock()
 		{
@@ -87,7 +89,7 @@ public static function intersectBlock()
 		}
 		
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public static function intersectAll($left, $right)
 		{
@@ -95,7 +97,7 @@ public static function intersectAll($left, $right)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public static function intersectAllBlock()
 		{
@@ -105,7 +107,7 @@ public static function intersectAllBlock()
 		}
 		
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public static function except($left, $right)
 		{
@@ -113,7 +115,7 @@ public static function except($left, $right)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public static function exceptBlock()
 		{
@@ -123,7 +125,7 @@ public static function exceptBlock()
 		}
 	
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public static function exceptAll($left, $right)
 		{
@@ -131,7 +133,7 @@ public static function exceptAll($left, $right)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public static function exceptAllBlock()
 		{
diff --git a/core/OSQL/CreateTableQuery.class.php b/core/OSQL/CreateTableQuery.class.php
index 0af49d9388..35381610c8 100644
--- a/core/OSQL/CreateTableQuery.class.php
+++ b/core/OSQL/CreateTableQuery.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class CreateTableQuery extends QueryIdentification
 	{
 		private $table = null;
diff --git a/core/OSQL/DBBinary.class.php b/core/OSQL/DBBinary.class.php
index 237d8ff5ce..34184eb32f 100644
--- a/core/OSQL/DBBinary.class.php
+++ b/core/OSQL/DBBinary.class.php
@@ -15,10 +15,12 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class DBBinary extends DBValue
 	{
 		/**
-		 * @return DBBinary
+		 * @return \Onphp\DBBinary
 		**/
 		public static function create($value)
 		{
diff --git a/core/OSQL/DBColumn.class.php b/core/OSQL/DBColumn.class.php
index 3f0a29d5f7..e582e88c22 100644
--- a/core/OSQL/DBColumn.class.php
+++ b/core/OSQL/DBColumn.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class DBColumn implements SQLTableName
 	{
 		private $type		= null;
@@ -29,7 +31,7 @@ final class DBColumn implements SQLTableName
 		private $sequenced	= null;
 		
 		/**
-		 * @return DBColumn
+		 * @return \Onphp\DBColumn
 		**/
 		public static function create(DataType $type, $name)
 		{
@@ -43,7 +45,7 @@ public function __construct(DataType $type, $name)
 		}
 		
 		/**
-		 * @return DataType
+		 * @return \Onphp\DataType
 		**/
 		public function getType()
 		{
@@ -51,7 +53,7 @@ public function getType()
 		}
 		
 		/**
-		 * @return DBColumn
+		 * @return \Onphp\DBColumn
 		**/
 		public function setTable(DBTable $table)
 		{
@@ -66,7 +68,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return DBTable
+		 * @return \Onphp\DBTable
 		**/
 		public function getTable()
 		{
@@ -79,7 +81,7 @@ public function isPrimaryKey()
 		}
 		
 		/**
-		 * @return DBColumn
+		 * @return \Onphp\DBColumn
 		**/
 		public function setPrimaryKey($primary = false)
 		{
@@ -89,7 +91,7 @@ public function setPrimaryKey($primary = false)
 		}
 		
 		/**
-		 * @return DBColumn
+		 * @return \Onphp\DBColumn
 		**/
 		public function setDefault($default)
 		{
@@ -104,8 +106,8 @@ public function getDefault()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DBColumn
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DBColumn
 		**/
 		public function setReference(
 			DBColumn $column,
@@ -132,7 +134,7 @@ public function setReference(
 		}
 		
 		/**
-		 * @return DBColumn
+		 * @return \Onphp\DBColumn
 		**/
 		public function dropReference()
 		{
@@ -149,7 +151,7 @@ public function hasReference()
 		}
 		
 		/**
-		 * @return DBColumn
+		 * @return \Onphp\DBColumn
 		**/
 		public function setAutoincrement($auto = false)
 		{
diff --git a/core/OSQL/DBField.class.php b/core/OSQL/DBField.class.php
index 4c8c26bf8f..0457f7ee35 100644
--- a/core/OSQL/DBField.class.php
+++ b/core/OSQL/DBField.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class DBField extends Castable implements SQLTableName
 	{
 		private $field	= null;
@@ -29,7 +31,7 @@ public function __construct($field, $table = null)
 		}
 		
 		/**
-		 * @return DBField
+		 * @return \Onphp\DBField
 		**/
 		public static function create($field, $table = null)
 		{
@@ -58,7 +60,7 @@ public function getField()
 		}
 		
 		/**
-		 * @return DialectString
+		 * @return \Onphp\DialectString
 		**/
 		public function getTable()
 		{
@@ -66,8 +68,8 @@ public function getTable()
 		}
 		
 		/**
-		 * @throws WrongStateException
-		 * @return DBField
+		 * @throws \Onphp\WrongStateException
+		 * @return \Onphp\DBField
 		**/
 		public function setTable($table)
 		{
diff --git a/core/OSQL/DBRaw.class.php b/core/OSQL/DBRaw.class.php
index 3bd7b6c232..53e46dadfe 100644
--- a/core/OSQL/DBRaw.class.php
+++ b/core/OSQL/DBRaw.class.php
@@ -16,6 +16,8 @@
 	 * 
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class DBRaw implements LogicalObject
 	{
 		private $string = null;
diff --git a/core/OSQL/DBSchema.class.php b/core/OSQL/DBSchema.class.php
index 6d4d4cb8e9..6422cfc126 100644
--- a/core/OSQL/DBSchema.class.php
+++ b/core/OSQL/DBSchema.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class DBSchema extends QueryIdentification
 	{
 		private $tables	= array();
@@ -28,8 +30,8 @@ public function getTableNames()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DBSchema
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DBSchema
 		**/
 		public function addTable(DBTable $table)
 		{
@@ -47,8 +49,8 @@ public function addTable(DBTable $table)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return DBTable
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\DBTable
 		**/
 		public function getTableByName($name)
 		{
diff --git a/core/OSQL/DBTable.class.php b/core/OSQL/DBTable.class.php
index 2f176b034d..e572206a32 100644
--- a/core/OSQL/DBTable.class.php
+++ b/core/OSQL/DBTable.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class DBTable implements DialectString
 	{
 		private $name		= null;
@@ -22,7 +24,7 @@ final class DBTable implements DialectString
 		private $uniques	= array();
 		
 		/**
-		 * @return DBTable
+		 * @return \Onphp\DBTable
 		**/
 		public static function create($name)
 		{
@@ -40,7 +42,7 @@ public function getColumns()
 		}
 		
 		/**
-		 * @return DBTable
+		 * @return \Onphp\DBTable
 		**/
 		public function addUniques(/* ... */)
 		{
@@ -66,8 +68,8 @@ public function getUniques()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DBTable
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DBTable
 		**/
 		public function addColumn(DBColumn $column)
 		{
@@ -86,8 +88,8 @@ public function addColumn(DBColumn $column)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return DBColumn
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\DBColumn
 		**/
 		public function getColumnByName($name)
 		{
@@ -100,7 +102,7 @@ public function getColumnByName($name)
 		}
 		
 		/**
-		 * @return DBTable
+		 * @return \Onphp\DBTable
 		**/
 		public function dropColumnByName($name)
 		{
@@ -116,7 +118,7 @@ public function dropColumnByName($name)
 		}
 		
 		/**
-		 * @return DBTable
+		 * @return \Onphp\DBTable
 		**/
 		public function setName($name)
 		{
diff --git a/core/OSQL/DBValue.class.php b/core/OSQL/DBValue.class.php
index a9ae3a3dc5..4000609af6 100644
--- a/core/OSQL/DBValue.class.php
+++ b/core/OSQL/DBValue.class.php
@@ -15,12 +15,14 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class DBValue extends Castable
 	{
 		private $value = null;
 		
 		/**
-		 * @return DBValue
+		 * @return \Onphp\DBValue
 		**/
 		public static function create($value)
 		{
diff --git a/core/OSQL/DataType.class.php b/core/OSQL/DataType.class.php
index 87e57dc832..e880a3d086 100644
--- a/core/OSQL/DataType.class.php
+++ b/core/OSQL/DataType.class.php
@@ -14,6 +14,8 @@
 	 *
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class DataType extends Enumeration implements DialectString
 	{
 		const SMALLINT			= 0x001001;
@@ -84,7 +86,7 @@ final class DataType extends Enumeration implements DialectString
 		);
 		
 		/**
-		 * @return DataType
+		 * @return \Onphp\DataType
 		**/
 		public static function create($id)
 		{
@@ -102,8 +104,8 @@ public function getSize()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DataType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DataType
 		**/
 		public function setSize($size)
 		{
@@ -126,8 +128,8 @@ public function getPrecision()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DataType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DataType
 		**/
 		public function setPrecision($precision)
 		{
@@ -150,8 +152,8 @@ public function getScale()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DataType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DataType
 		**/
 		public function setScale($scale)
 		{
@@ -164,8 +166,8 @@ public function setScale($scale)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DataType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DataType
 		**/
 		public function setTimezoned($zoned = false)
 		{
@@ -182,7 +184,7 @@ public function isTimezoned()
 		}
 		
 		/**
-		 * @return DataType
+		 * @return \Onphp\DataType
 		**/
 		public function setNull($isNull = false)
 		{
@@ -197,8 +199,8 @@ public function isNull()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DataType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DataType
 		**/
 		public function setUnsigned($unsigned = false)
 		{
diff --git a/core/OSQL/DatePart.class.php b/core/OSQL/DatePart.class.php
index 1d4c2f73b0..08230ce60f 100644
--- a/core/OSQL/DatePart.class.php
+++ b/core/OSQL/DatePart.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class DatePart extends Enumeration
 	{
 		const CENTURY			= 1;
diff --git a/core/OSQL/DeleteQuery.class.php b/core/OSQL/DeleteQuery.class.php
index f6ad4a4a8c..1cf969a847 100644
--- a/core/OSQL/DeleteQuery.class.php
+++ b/core/OSQL/DeleteQuery.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class DeleteQuery extends QuerySkeleton implements SQLTableName
 	{
 		protected $table	= null;
@@ -22,7 +24,7 @@ public function getId()
 		}
 		
 		/**
-		 * @return DeleteQuery
+		 * @return \Onphp\DeleteQuery
 		**/
 		public function from($table)
 		{
diff --git a/core/OSQL/DialectString.class.php b/core/OSQL/DialectString.class.php
index f7fde7e4c4..967e091df3 100644
--- a/core/OSQL/DialectString.class.php
+++ b/core/OSQL/DialectString.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface DialectString
 	{
 		public function toDialectString(Dialect $dialect);
diff --git a/core/OSQL/DropTableQuery.class.php b/core/OSQL/DropTableQuery.class.php
index df4394b990..ec7b21fd54 100644
--- a/core/OSQL/DropTableQuery.class.php
+++ b/core/OSQL/DropTableQuery.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class DropTableQuery extends QueryIdentification
 	{
 		private $name		= null;
diff --git a/core/OSQL/ExtractPart.class.php b/core/OSQL/ExtractPart.class.php
index 34039abc62..730ccb5f39 100644
--- a/core/OSQL/ExtractPart.class.php
+++ b/core/OSQL/ExtractPart.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class ExtractPart implements DialectString, MappableObject
 	{
 		private $what = null;
@@ -47,7 +49,7 @@ public function __construct(
 		}
 		
 		/**
-		 * @return ExtractPart
+		 * @return \Onphp\ExtractPart
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/OSQL/FieldGroup.class.php b/core/OSQL/FieldGroup.class.php
index 983e0c37df..a91ef719fe 100644
--- a/core/OSQL/FieldGroup.class.php
+++ b/core/OSQL/FieldGroup.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class FieldGroup implements DialectString
 	{
 		private $list = array();
 		
 		/**
-		 * @return FieldGroup
+		 * @return \Onphp\FieldGroup
 		**/
 		public function add(Castable $field)
 		{
diff --git a/core/OSQL/FieldTable.class.php b/core/OSQL/FieldTable.class.php
index 39761e94bd..3167dbf420 100644
--- a/core/OSQL/FieldTable.class.php
+++ b/core/OSQL/FieldTable.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class FieldTable extends Castable
 	{
 		protected $field = null;
diff --git a/core/OSQL/ForeignChangeAction.class.php b/core/OSQL/ForeignChangeAction.class.php
index 673f099fd8..eee5c290e7 100644
--- a/core/OSQL/ForeignChangeAction.class.php
+++ b/core/OSQL/ForeignChangeAction.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class ForeignChangeAction extends Enumeration
 	{
 		const NO_ACTION		= 0x01;
@@ -29,7 +31,7 @@ final class ForeignChangeAction extends Enumeration
 		);
 		
 		/**
-		 * @return ForeignChangeAction
+		 * @return \Onphp\ForeignChangeAction
 		**/
 		public static function noAction()
 		{
@@ -37,7 +39,7 @@ public static function noAction()
 		}
 		
 		/**
-		 * @return ForeignChangeAction
+		 * @return \Onphp\ForeignChangeAction
 		**/
 		public static function restrict()
 		{
@@ -45,7 +47,7 @@ public static function restrict()
 		}
 		
 		/**
-		 * @return ForeignChangeAction
+		 * @return \Onphp\ForeignChangeAction
 		**/
 		public static function cascade()
 		{
@@ -53,7 +55,7 @@ public static function cascade()
 		}
 		
 		/**
-		 * @return ForeignChangeAction
+		 * @return \Onphp\ForeignChangeAction
 		**/
 		public static function setNull()
 		{
@@ -61,7 +63,7 @@ public static function setNull()
 		}
 		
 		/**
-		 * @return ForeignChangeAction
+		 * @return \Onphp\ForeignChangeAction
 		**/
 		public static function setDefault()
 		{
diff --git a/core/OSQL/FromTable.class.php b/core/OSQL/FromTable.class.php
index fe5fee2566..545c7fc579 100644
--- a/core/OSQL/FromTable.class.php
+++ b/core/OSQL/FromTable.class.php
@@ -15,7 +15,9 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
-	final class FromTable implements Aliased, SQLTableName
+	namespace Onphp;
+
+	final class FromTable implements Aliased, SQLTableName, SQLRealTableName
 	{
 		private $table	= null;
 		private $alias	= null;
@@ -85,5 +87,10 @@ public function getTable()
 		{
 			return $this->alias ? $this->alias : $this->table;
 		}
+		
+		public function getRealTable()
+		{
+			return $this->table;
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/core/OSQL/FullText.class.php b/core/OSQL/FullText.class.php
index 03d26e97c2..043515e5df 100644
--- a/core/OSQL/FullText.class.php
+++ b/core/OSQL/FullText.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class FullText
 		implements DialectString, MappableObject, LogicalObject
 	{
@@ -35,7 +37,7 @@ public function __construct($field, $words, $logic)
 		}
 		
 		/**
-		 * @return FullText
+		 * @return \Onphp\FullText
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/OSQL/FullTextRank.class.php b/core/OSQL/FullTextRank.class.php
index f4ff4fd744..f5a5c232b2 100644
--- a/core/OSQL/FullTextRank.class.php
+++ b/core/OSQL/FullTextRank.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class FullTextRank extends FullText
 	{
 		public function toDialectString(Dialect $dialect)
diff --git a/core/OSQL/FullTextSearch.class.php b/core/OSQL/FullTextSearch.class.php
index ba5f1dac7a..78d4d65aae 100644
--- a/core/OSQL/FullTextSearch.class.php
+++ b/core/OSQL/FullTextSearch.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class FullTextSearch extends FullText
 	{
 		public function toDialectString(Dialect $dialect)
diff --git a/core/OSQL/GroupBy.class.php b/core/OSQL/GroupBy.class.php
index 226c7be970..a61e9c7761 100644
--- a/core/OSQL/GroupBy.class.php
+++ b/core/OSQL/GroupBy.class.php
@@ -13,10 +13,12 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class GroupBy extends FieldTable implements MappableObject
 	{
 		/**
-		 * @return GroupBy
+		 * @return \Onphp\GroupBy
 		**/
 		public static function create($field)
 		{
@@ -24,7 +26,7 @@ public static function create($field)
 		}
 		
 		/**
-		 * @return GroupBy
+		 * @return \Onphp\GroupBy
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/OSQL/InsertOrUpdateQuery.class.php b/core/OSQL/InsertOrUpdateQuery.class.php
index 89cd142588..5a2263a318 100644
--- a/core/OSQL/InsertOrUpdateQuery.class.php
+++ b/core/OSQL/InsertOrUpdateQuery.class.php
@@ -14,6 +14,8 @@
 	 *
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	abstract class InsertOrUpdateQuery
 		extends QuerySkeleton
 		implements SQLTableName
@@ -34,7 +36,7 @@ public function getFieldsCount()
 		}
 		
 		/**
-		 * @return InsertOrUpdateQuery
+		 * @return \Onphp\InsertOrUpdateQuery
 		**/
 		public function set($field, $value = null)
 		{
@@ -44,8 +46,8 @@ public function set($field, $value = null)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return InsertOrUpdateQuery
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\InsertOrUpdateQuery
 		**/
 		public function drop($field)
 		{
@@ -58,7 +60,7 @@ public function drop($field)
 		}
 		
 		/**
-		 * @return InsertOrUpdateQuery
+		 * @return \Onphp\InsertOrUpdateQuery
 		**/
 		public function lazySet($field, /* Identifiable */ $object = null)
 		{
@@ -85,7 +87,7 @@ public function lazySet($field, /* Identifiable */ $object = null)
 		}
 		
 		/**
-		 * @return InsertOrUpdateQuery
+		 * @return \Onphp\InsertOrUpdateQuery
 		**/
 		public function setBoolean($field, $value = false)
 		{
@@ -100,7 +102,7 @@ public function setBoolean($field, $value = false)
 		/**
 		 * Adds values from associative array.
 		 *
-		 * @return InsertOrUpdateQuery
+		 * @return \Onphp\InsertOrUpdateQuery
 		**/
 		public function arraySet($fields)
 		{
diff --git a/core/OSQL/InsertQuery.class.php b/core/OSQL/InsertQuery.class.php
index e37b2ba217..f0a819b2a7 100644
--- a/core/OSQL/InsertQuery.class.php
+++ b/core/OSQL/InsertQuery.class.php
@@ -12,15 +12,17 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class InsertQuery extends InsertOrUpdateQuery
 	{
 		/**
-		 * @var SelectQuery
+		 * @var \Onphp\SelectQuery
 		**/
 		protected $select = null;
 		
 		/**
-		 * @return InsertQuery
+		 * @return \Onphp\InsertQuery
 		**/
 		public function into($table)
 		{
@@ -32,7 +34,7 @@ public function into($table)
 		/**
 		 * Just an alias to behave like UpdateQuery.
 		 *
-		 * @return InsertQuery
+		 * @return \Onphp\InsertQuery
 		**/
 		public function setTable($table)
 		{
@@ -40,7 +42,7 @@ public function setTable($table)
 		}
 		
 		/**
-		 * @return InsertQuery
+		 * @return \Onphp\InsertQuery
 		**/
 		public function setSelect(SelectQuery $select)
 		{
diff --git a/core/OSQL/JoinCapableQuery.class.php b/core/OSQL/JoinCapableQuery.class.php
index 39406864b6..2728b103ab 100644
--- a/core/OSQL/JoinCapableQuery.class.php
+++ b/core/OSQL/JoinCapableQuery.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	interface JoinCapableQuery
 	{
 		public function from($table, $alias = null);
diff --git a/core/OSQL/Joiner.class.php b/core/OSQL/Joiner.class.php
index 2df9c56a21..cfe42ed3b2 100644
--- a/core/OSQL/Joiner.class.php
+++ b/core/OSQL/Joiner.class.php
@@ -13,13 +13,15 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class Joiner implements DialectString
 	{
 		private $from	= array();
 		private $tables	= array();
 		
 		/**
-		 * @return Joiner
+		 * @return \Onphp\Joiner
 		**/
 		public function from(FromTable $from)
 		{
@@ -39,7 +41,7 @@ public function getTablesCount()
 		}
 		
 		/**
-		 * @return Joiner
+		 * @return \Onphp\Joiner
 		**/
 		public function join(SQLJoin $join)
 		{
@@ -50,7 +52,7 @@ public function join(SQLJoin $join)
 		}
 		
 		/**
-		 * @return Joiner
+		 * @return \Onphp\Joiner
 		**/
 		public function leftJoin(SQLLeftJoin $join)
 		{
@@ -61,7 +63,7 @@ public function leftJoin(SQLLeftJoin $join)
 		}
 		
 		/**
-		 * @return Joiner
+		 * @return \Onphp\Joiner
 		**/
 		public function rightJoin(SQLRightJoin $join)
 		{
@@ -72,8 +74,8 @@ public function rightJoin(SQLRightJoin $join)
 		}
 
 		/**
-		 * @param SQLFullOuterJoin $join
-		 * @return Joiner
+		 * @param \Onphp\SQLFullOuterJoin $join
+		 * @return \Onphp\Joiner
 		 */
 		public function fullOuterJoin(SQLFullOuterJoin $join)
 		{
@@ -99,6 +101,10 @@ public function getLastTable()
 			return null;
 		}
 		
+		public function getTables() {
+			return $this->from ?: array();
+		}
+		
 		public function toDialectString(Dialect $dialect)
 		{
 			$fromString = null;
diff --git a/core/OSQL/OSQL.class.php b/core/OSQL/OSQL.class.php
index fe82d97b61..53b1290646 100644
--- a/core/OSQL/OSQL.class.php
+++ b/core/OSQL/OSQL.class.php
@@ -16,10 +16,12 @@
 	 * 
 	 * @see http://onphp.org/examples.OSQL.en.html
 	**/
+	namespace Onphp;
+
 	final class OSQL extends StaticFactory
 	{
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public static function select()
 		{
@@ -27,7 +29,7 @@ public static function select()
 		}
 		
 		/**
-		 * @return InsertQuery
+		 * @return \Onphp\InsertQuery
 		**/
 		public static function insert()
 		{
@@ -35,7 +37,7 @@ public static function insert()
 		}
 		
 		/**
-		 * @return UpdateQuery
+		 * @return \Onphp\UpdateQuery
 		**/
 		public static function update($table = null)
 		{
@@ -43,7 +45,7 @@ public static function update($table = null)
 		}
 		
 		/**
-		 * @return DeleteQuery
+		 * @return \Onphp\DeleteQuery
 		**/
 		public static function delete()
 		{
@@ -51,7 +53,7 @@ public static function delete()
 		}
 		
 		/**
-		 * @return TruncateQuery
+		 * @return \Onphp\TruncateQuery
 		**/
 		public static function truncate($whom = null)
 		{
@@ -59,7 +61,7 @@ public static function truncate($whom = null)
 		}
 		
 		/**
-		 * @return CreateTableQuery
+		 * @return \Onphp\CreateTableQuery
 		**/
 		public static function createTable(DBTable $table)
 		{
@@ -67,7 +69,7 @@ public static function createTable(DBTable $table)
 		}
 		
 		/**
-		 * @return DropTableQuery
+		 * @return \Onphp\DropTableQuery
 		**/
 		public static function dropTable($name, $cascade = false)
 		{
diff --git a/core/OSQL/OrderBy.class.php b/core/OSQL/OrderBy.class.php
index 00976b4ae9..37ddfc9e47 100644
--- a/core/OSQL/OrderBy.class.php
+++ b/core/OSQL/OrderBy.class.php
@@ -13,13 +13,15 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class OrderBy extends FieldTable implements MappableObject
 	{
 		private $direction	= null;
 		private $nulls		= null;
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public static function create($field)
 		{
@@ -41,7 +43,7 @@ public function __clone()
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function setDirection($direction)
 		{
@@ -50,7 +52,7 @@ public function setDirection($direction)
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function desc()
 		{
@@ -59,7 +61,7 @@ public function desc()
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function asc()
 		{
@@ -73,7 +75,7 @@ public function isAsc()
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function nullsFirst()
 		{
@@ -82,7 +84,7 @@ public function nullsFirst()
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function nullsLast()
 		{
@@ -96,7 +98,7 @@ public function isNullsFirst()
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function setNullsFirst($nullsFirst)
 		{
@@ -105,7 +107,7 @@ public function setNullsFirst($nullsFirst)
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function invert()
 		{
@@ -116,7 +118,7 @@ public function invert()
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/OSQL/OrderChain.class.php b/core/OSQL/OrderChain.class.php
index 5eab7e2ee7..774179f6ec 100644
--- a/core/OSQL/OrderChain.class.php
+++ b/core/OSQL/OrderChain.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class OrderChain implements DialectString, MappableObject
 	{
 		private $chain = array();
 		
 		/**
-		 * @return OrderChain
+		 * @return \Onphp\OrderChain
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OrderChain
+		 * @return \Onphp\OrderChain
 		**/
 		public function add($order)
 		{
@@ -35,7 +37,7 @@ public function add($order)
 		}
 		
 		/**
-		 * @return OrderChain
+		 * @return \Onphp\OrderChain
 		**/
 		public function prepend($order)
 		{
@@ -48,7 +50,7 @@ public function prepend($order)
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function getLast()
 		{
@@ -66,7 +68,7 @@ public function getCount()
 		}
 		
 		/**
-		 * @return OrderChain
+		 * @return \Onphp\OrderChain
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
@@ -92,7 +94,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		private function makeOrder($object)
 		{
diff --git a/core/OSQL/Query.class.php b/core/OSQL/Query.class.php
index baef1557b9..7ba541c478 100644
--- a/core/OSQL/Query.class.php
+++ b/core/OSQL/Query.class.php
@@ -13,5 +13,7 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface Query extends DialectString, Identifiable, Stringable {/*_*/}
 ?>
\ No newline at end of file
diff --git a/core/OSQL/QueryChain.class.php b/core/OSQL/QueryChain.class.php
index d320ecf4c5..637b731eb7 100644
--- a/core/OSQL/QueryChain.class.php
+++ b/core/OSQL/QueryChain.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class QueryChain extends SQLChain
 	{
 		public function toBoolean(Form $form)
@@ -20,7 +22,7 @@ public function toBoolean(Form $form)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public static function block($args, $logic)
 		{
@@ -39,7 +41,7 @@ public static function block($args, $logic)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public function union(SelectQuery $query)
 		{
@@ -47,7 +49,7 @@ public function union(SelectQuery $query)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public function unionAll(SelectQuery $query)
 		{
@@ -55,7 +57,7 @@ public function unionAll(SelectQuery $query)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public function intersect(SelectQuery $query)
 		{
@@ -63,7 +65,7 @@ public function intersect(SelectQuery $query)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public function intersectAll(SelectQuery $query)
 		{
@@ -71,7 +73,7 @@ public function intersectAll(SelectQuery $query)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public function except(SelectQuery $query)
 		{
@@ -79,7 +81,7 @@ public function except(SelectQuery $query)
 		}
 		
 		/**
-		 * @return QueryChain
+		 * @return \Onphp\QueryChain
 		**/
 		public function exceptAll(SelectQuery $query)
 		{
diff --git a/core/OSQL/QueryCombination.class.php b/core/OSQL/QueryCombination.class.php
index cf3e6f5e58..bc2c4ede13 100644
--- a/core/OSQL/QueryCombination.class.php
+++ b/core/OSQL/QueryCombination.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class QueryCombination
 		extends QueryIdentification
 		implements DialectString
@@ -55,8 +57,8 @@ public function getOffset()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return QueryCombination
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\QueryCombination
 		**/
 		public function limit($limit = null, $offset = null)
 		{
@@ -73,7 +75,7 @@ public function limit($limit = null, $offset = null)
 		}
 		
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public function dropOrder()
 		{
@@ -83,7 +85,7 @@ public function dropOrder()
 		}
 		
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public function setOrderChain(OrderChain $chain)
 		{
@@ -93,7 +95,7 @@ public function setOrderChain(OrderChain $chain)
 		}
 		
 		/**
-		 * @return QueryCombination
+		 * @return \Onphp\QueryCombination
 		**/
 		public function orderBy($field)
 		{
diff --git a/core/OSQL/QueryIdentification.class.php b/core/OSQL/QueryIdentification.class.php
index 15802c59d5..9c48858a33 100644
--- a/core/OSQL/QueryIdentification.class.php
+++ b/core/OSQL/QueryIdentification.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class QueryIdentification implements Query
 	{
 		public function getId()
diff --git a/core/OSQL/QueryResult.class.php b/core/OSQL/QueryResult.class.php
index dfd94d6b17..d04a14b585 100644
--- a/core/OSQL/QueryResult.class.php
+++ b/core/OSQL/QueryResult.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class QueryResult implements Identifiable
 	{
 		private $list		= array();
@@ -24,7 +26,7 @@ final class QueryResult implements Identifiable
 		private $query		= null;
 		
 		/**
-		 * @return QueryResult
+		 * @return \Onphp\QueryResult
 		**/
 		public static function create()
 		{
@@ -42,7 +44,7 @@ public function setId($id)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function getQuery()
 		{
@@ -50,7 +52,7 @@ public function getQuery()
 		}
 		
 		/**
-		 * @return QueryResult
+		 * @return \Onphp\QueryResult
 		**/
 		public function setQuery(SelectQuery $query)
 		{
@@ -65,7 +67,7 @@ public function getList()
 		}
 		
 		/**
-		 * @return QueryResult
+		 * @return \Onphp\QueryResult
 		**/
 		public function setList($list)
 		{
@@ -80,7 +82,7 @@ public function getCount()
 		}
 		
 		/**
-		 * @return QueryResult
+		 * @return \Onphp\QueryResult
 		**/
 		public function setCount($count)
 		{
@@ -95,7 +97,7 @@ public function getAffected()
 		}
 		
 		/**
-		 * @return QueryResult
+		 * @return \Onphp\QueryResult
 		**/
 		public function setAffected($affected)
 		{
diff --git a/core/OSQL/QuerySkeleton.class.php b/core/OSQL/QuerySkeleton.class.php
index 61c7857b61..822273686a 100644
--- a/core/OSQL/QuerySkeleton.class.php
+++ b/core/OSQL/QuerySkeleton.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	abstract class QuerySkeleton extends QueryIdentification
 	{
 		protected $where		= array();	// where clauses
@@ -30,8 +32,8 @@ public function getWhereLogic()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return QuerySkeleton
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\QuerySkeleton
 		**/
 		public function where(LogicalObject $exp, $logic = null)
 		{
@@ -51,7 +53,7 @@ public function where(LogicalObject $exp, $logic = null)
 		}
 		
 		/**
-		 * @return QuerySkeleton
+		 * @return \Onphp\QuerySkeleton
 		**/
 		public function andWhere(LogicalObject $exp)
 		{
@@ -59,7 +61,7 @@ public function andWhere(LogicalObject $exp)
 		}
 		
 		/**
-		 * @return QuerySkeleton
+		 * @return \Onphp\QuerySkeleton
 		**/
 		public function orWhere(LogicalObject $exp)
 		{
@@ -67,7 +69,7 @@ public function orWhere(LogicalObject $exp)
 		}
 		
 		/**
-		 * @return QuerySkeleton
+		 * @return \Onphp\QuerySkeleton
 		**/
 		public function returning($field, $alias = null)
 		{
@@ -86,7 +88,7 @@ public function returning($field, $alias = null)
 		}
 		
 		/**
-		 * @return QuerySkeleton
+		 * @return \Onphp\QuerySkeleton
 		**/
 		public function dropReturning()
 		{
@@ -119,6 +121,14 @@ public function toDialectString(Dialect $dialect)
 			return null;
 		}
 		
+		/**
+		 * @return QuerySkeleton
+		 */
+		public function spawn()
+		{
+			return clone $this;
+		}
+		
 		protected function resolveSelectField($field, $alias, $table)
 		{
 			if (is_object($field)) {
@@ -178,7 +188,7 @@ protected function resolveAliasByField($field, $alias)
 		}
 		
 		/**
-		 * @return QuerySkeleton
+		 * @return \Onphp\QuerySkeleton
 		**/
 		protected function checkReturning(Dialect $dialect)
 		{
diff --git a/core/OSQL/SQLArray.class.php b/core/OSQL/SQLArray.class.php
index 5660dc508b..ff54f43453 100644
--- a/core/OSQL/SQLArray.class.php
+++ b/core/OSQL/SQLArray.class.php
@@ -14,12 +14,14 @@
 	 * 
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class SQLArray implements DialectString
 	{
 		private $array = array();
 		
 		/**
-		 * @return SQLArray
+		 * @return \Onphp\SQLArray
 		**/
 		public static function create($array)
 		{
diff --git a/core/OSQL/SQLBaseJoin.class.php b/core/OSQL/SQLBaseJoin.class.php
index 00468053b6..8852dd8e35 100644
--- a/core/OSQL/SQLBaseJoin.class.php
+++ b/core/OSQL/SQLBaseJoin.class.php
@@ -12,7 +12,9 @@
 	/**
 	 * @ingroup OSQL
 	**/
-	abstract class SQLBaseJoin implements SQLTableName, Aliased
+	namespace Onphp;
+
+	abstract class SQLBaseJoin implements SQLTableName, SQLRealTableName, Aliased
 	{
 		protected $subject	= null;
 		protected $alias	= null;
@@ -35,6 +37,11 @@ public function getTable()
 			return $this->alias ? $this->alias : $this->subject;
 		}
 		
+		public function getRealTable()
+		{
+			return $this->subject;
+		}
+		
 		protected function baseToString(Dialect $dialect, $logic = null)
 		{
 			return
diff --git a/core/OSQL/SQLChain.class.php b/core/OSQL/SQLChain.class.php
index 6d08b88e0c..2bc697b7e3 100644
--- a/core/OSQL/SQLChain.class.php
+++ b/core/OSQL/SQLChain.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	abstract class SQLChain implements LogicalObject, MappableObject
 	{
 		protected $chain = array();
 		protected $logic = array();
 		
 		/**
-		 * @return SQLChain
+		 * @return \Onphp\SQLChain
 		**/
 		protected function exp(DialectString $exp, $logic)
 		{
@@ -44,7 +46,7 @@ public function getLogic()
 		}
 		
 		/**
-		 * @return SQLChain
+		 * @return \Onphp\SQLChain
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/OSQL/SQLFullOuterJoin.class.php b/core/OSQL/SQLFullOuterJoin.class.php
index 5854fe15ff..0133c72a51 100644
--- a/core/OSQL/SQLFullOuterJoin.class.php
+++ b/core/OSQL/SQLFullOuterJoin.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class SQLFullOuterJoin extends SQLBaseJoin
 	{
 		/**
-		 * @param Dialect $dialect
+		 * @param \Onphp\Dialect $\Onphp\Dialect
 		 * @return string
 		 */
 		public function toDialectString(Dialect $dialect)
diff --git a/core/OSQL/SQLFunction.class.php b/core/OSQL/SQLFunction.class.php
index bd21d94b8c..fead004783 100644
--- a/core/OSQL/SQLFunction.class.php
+++ b/core/OSQL/SQLFunction.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class SQLFunction extends Castable implements MappableObject, Aliased
 	{
 		const AGGREGATE_ALL			= 1;
@@ -26,7 +28,7 @@ final class SQLFunction extends Castable implements MappableObject, Aliased
 		private $args	= array();
 		
 		/**
-		 * @return SQLFunction
+		 * @return \Onphp\SQLFunction
 		**/
 		public static function create($name /* , ... */)
 		{
@@ -65,7 +67,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return SQLFunction
+		 * @return \Onphp\SQLFunction
 		**/
 		public function setAlias($alias)
 		{
@@ -75,7 +77,7 @@ public function setAlias($alias)
 		}
 		
 		/**
-		 * @return SQLFunction
+		 * @return \Onphp\SQLFunction
 		**/
 		public function setAggregateAll()
 		{
@@ -85,7 +87,7 @@ public function setAggregateAll()
 		}
 		
 		/**
-		 * @return SQLFunction
+		 * @return \Onphp\SQLFunction
 		**/
 		public function setAggregateDistinct()
 		{
@@ -95,7 +97,7 @@ public function setAggregateDistinct()
 		}
 		
 		/**
-		 * @return SQLFunction
+		 * @return \Onphp\SQLFunction
 		**/
 		public function toMapped(ProtoDAO $dao, JoinCapableQuery $query)
 		{
diff --git a/core/OSQL/SQLJoin.class.php b/core/OSQL/SQLJoin.class.php
index 0c54d09e41..7f4f77809c 100644
--- a/core/OSQL/SQLJoin.class.php
+++ b/core/OSQL/SQLJoin.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class SQLJoin extends SQLBaseJoin
 	{
 		public function toDialectString(Dialect $dialect)
diff --git a/core/OSQL/SQLLeftJoin.class.php b/core/OSQL/SQLLeftJoin.class.php
index b76602e82a..66657611eb 100644
--- a/core/OSQL/SQLLeftJoin.class.php
+++ b/core/OSQL/SQLLeftJoin.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class SQLLeftJoin extends SQLBaseJoin
 	{
 		public function toDialectString(Dialect $dialect)
diff --git a/core/OSQL/SQLRealTableName.class.php b/core/OSQL/SQLRealTableName.class.php
new file mode 100644
index 0000000000..297a739c54
--- /dev/null
+++ b/core/OSQL/SQLRealTableName.class.php
@@ -0,0 +1,22 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2012 by Aleksey S. Denisov                              *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	/**
+	 * @ingroup OSQL
+	 * @ingroup Module
+	**/
+	namespace Onphp;
+
+	interface SQLRealTableName
+	{
+		public function getRealTable();
+	}
+?>
\ No newline at end of file
diff --git a/core/OSQL/SQLRightJoin.class.php b/core/OSQL/SQLRightJoin.class.php
index fd001a719a..8d50d3cf0f 100644
--- a/core/OSQL/SQLRightJoin.class.php
+++ b/core/OSQL/SQLRightJoin.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class SQLRightJoin extends SQLBaseJoin
 	{
 		public function toDialectString(Dialect $dialect)
diff --git a/core/OSQL/SQLTableName.class.php b/core/OSQL/SQLTableName.class.php
index 1fcdf07767..f776f0563c 100644
--- a/core/OSQL/SQLTableName.class.php
+++ b/core/OSQL/SQLTableName.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface SQLTableName extends DialectString
 	{
 		public function getTable();
diff --git a/core/OSQL/SelectField.class.php b/core/OSQL/SelectField.class.php
index 62fff40280..73a44aea8b 100644
--- a/core/OSQL/SelectField.class.php
+++ b/core/OSQL/SelectField.class.php
@@ -15,12 +15,14 @@
 	 * @ingroup OSQL
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class SelectField extends FieldTable implements Aliased
 	{
 		private $alias = null;
 		
 		/**
-		 * @return SelectField
+		 * @return \Onphp\SelectField
 		**/
 		public static function create(DialectString $field, $alias)
 		{
diff --git a/core/OSQL/SelectQuery.class.php b/core/OSQL/SelectQuery.class.php
index c72300b568..287d7b7643 100644
--- a/core/OSQL/SelectQuery.class.php
+++ b/core/OSQL/SelectQuery.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class SelectQuery
 		extends QuerySkeleton
 		implements Named, JoinCapableQuery, Aliased
@@ -61,7 +63,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function setName($name)
 		{
@@ -72,7 +74,7 @@ public function setName($name)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function distinct()
 		{
@@ -86,7 +88,7 @@ public function isDistinct()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function unDistinct()
 		{
@@ -99,8 +101,13 @@ public function hasJoinedTable($table)
 			return $this->joiner->hasJoinedTable($table);
 		}
 		
+		public function getJoinedTables()
+		{
+			return $this->joiner->getTables();
+		}
+		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function join($table, LogicalObject $logic, $alias = null)
 		{
@@ -111,7 +118,7 @@ public function join($table, LogicalObject $logic, $alias = null)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function leftJoin($table, LogicalObject $logic, $alias = null)
 		{
@@ -122,7 +129,7 @@ public function leftJoin($table, LogicalObject $logic, $alias = null)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function rightJoin($table, LogicalObject $logic, $alias = null)
 		{
@@ -134,9 +141,9 @@ public function rightJoin($table, LogicalObject $logic, $alias = null)
 
 		/**
 		 * @param $table
-		 * @param LogicalObject $logic
+		 * @param \Onphp\LogicalObject $logic
 		 * @param null $alias
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		 */
 		public function fullOuterJoin($table, LogicalObject $logic, $alias = null)
 		{
@@ -150,7 +157,7 @@ public function fullOuterJoin($table, LogicalObject $logic, $alias = null)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function setOrderChain(OrderChain $chain)
 		{
@@ -160,7 +167,7 @@ public function setOrderChain(OrderChain $chain)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function orderBy($field, $table = null)
 		{
@@ -170,7 +177,7 @@ public function orderBy($field, $table = null)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function prependOrderBy($field, $table = null)
 		{
@@ -180,8 +187,8 @@ public function prependOrderBy($field, $table = null)
 		}
 		
 		/**
-		 * @throws WrongStateException
-		 * @return SelectQuery
+		 * @throws \Onphp\WrongStateException
+		 * @return \Onphp\SelectQuery
 		**/
 		public function desc()
 		{
@@ -194,8 +201,8 @@ public function desc()
 		}
 		
 		/**
-		 * @throws WrongStateException
-		 * @return SelectQuery
+		 * @throws \Onphp\WrongStateException
+		 * @return \Onphp\SelectQuery
 		**/
 		public function asc()
 		{
@@ -208,7 +215,7 @@ public function asc()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function groupBy($field, $table = null)
 		{
@@ -222,7 +229,7 @@ public function groupBy($field, $table = null)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function dropGroupBy()
 		{
@@ -231,7 +238,7 @@ public function dropGroupBy()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function having(LogicalObject $exp)
 		{
@@ -251,8 +258,8 @@ public function getOffset()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return SelectQuery
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\SelectQuery
 		**/
 		public function limit($limit = null, $offset = null)
 		{
@@ -269,7 +276,7 @@ public function limit($limit = null, $offset = null)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function from($table, $alias = null)
 		{
@@ -286,8 +293,8 @@ public function getFirstTable()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return SelectQuery
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\SelectQuery
 		**/
 		public function get($field, $alias = null)
 		{
@@ -306,7 +313,7 @@ public function get($field, $alias = null)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function multiGet(/* ... */)
 		{
@@ -320,7 +327,7 @@ public function multiGet(/* ... */)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function arrayGet($array, $prefix = null)
 		{
@@ -437,7 +444,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function dropFields()
 		{
@@ -446,7 +453,7 @@ public function dropFields()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function dropOrder()
 		{
@@ -455,7 +462,7 @@ public function dropOrder()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function dropLimit()
 		{
@@ -472,7 +479,7 @@ private function getLastTable($table = null)
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		private function makeOrder($field, $table = null)
 		{
diff --git a/core/OSQL/TimeIntervalsGenerator.class.php b/core/OSQL/TimeIntervalsGenerator.class.php
index d00e996193..9f63238fbf 100644
--- a/core/OSQL/TimeIntervalsGenerator.class.php
+++ b/core/OSQL/TimeIntervalsGenerator.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class TimeIntervalsGenerator extends QueryIdentification
 	{
 		const ITERATOR_ALIAS	= 'iterator';
@@ -36,7 +38,7 @@ public function setRange(DateRange $range)
 		}
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function getRange()
 		{
@@ -77,7 +79,7 @@ public function setField($field)
 		}
 		
 		/**
-		 * @return IntervalUnit
+		 * @return \Onphp\IntervalUnit
 		**/
 		public function getInterval()
 		{
@@ -140,7 +142,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return DialectString
+		 * @return \Onphp\DialectString
 		 * 
 		 * FIXME: DBI-result, method works only for PostgreSQL.
 		 * Research how to generate series of values in MySQL and implement
diff --git a/core/OSQL/TruncateQuery.class.php b/core/OSQL/TruncateQuery.class.php
index a1761c8da3..c49979fe38 100644
--- a/core/OSQL/TruncateQuery.class.php
+++ b/core/OSQL/TruncateQuery.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class TruncateQuery extends QueryIdentification
 	{
 		private $targets = array();
@@ -32,7 +34,7 @@ public function getId()
 		}
 		
 		/**
-		 * @return TruncateQuery
+		 * @return \Onphp\TruncateQuery
 		**/
 		public function table($table)
 		{
diff --git a/core/OSQL/UpdateQuery.class.php b/core/OSQL/UpdateQuery.class.php
index 4dd2f1ac62..3b1b4aaa8b 100644
--- a/core/OSQL/UpdateQuery.class.php
+++ b/core/OSQL/UpdateQuery.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OSQL
 	**/
+	namespace Onphp;
+
 	final class UpdateQuery
 		extends InsertOrUpdateQuery
 		implements JoinCapableQuery
@@ -30,7 +32,7 @@ public function __clone()
 		}
 		
 		/**
-		 * @return UpdateQuery
+		 * @return \Onphp\UpdateQuery
 		**/
 		public function from($table, $alias = null)
 		{
@@ -45,7 +47,7 @@ public function hasJoinedTable($table)
 		}
 		
 		/**
-		 * @return UpdateQuery
+		 * @return \Onphp\UpdateQuery
 		**/
 		public function join($table, LogicalObject $logic, $alias = null)
 		{
@@ -54,7 +56,7 @@ public function join($table, LogicalObject $logic, $alias = null)
 		}
 		
 		/**
-		 * @return UpdateQuery
+		 * @return \Onphp\UpdateQuery
 		**/
 		public function leftJoin($table, LogicalObject $logic, $alias = null)
 		{
@@ -63,7 +65,7 @@ public function leftJoin($table, LogicalObject $logic, $alias = null)
 		}
 		
 		/**
-		 * @return UpdateQuery
+		 * @return \Onphp\UpdateQuery
 		**/
 		public function rightJoin($table, LogicalObject $logic, $alias = null)
 		{
@@ -72,7 +74,7 @@ public function rightJoin($table, LogicalObject $logic, $alias = null)
 		}
 		
 		/**
-		 * @return UpdateQuery
+		 * @return \Onphp\UpdateQuery
 		**/
 		public function setTable($table)
 		{
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 893da219ef..5ffd8056c9 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,9 +1,128 @@
-2012-24-10  Alexey S. Denisov
+2013-12-06 Evgeny V. Kokovikhin
+	
+	* core/Form/FormUtils.class.php core/OSQL/QuerySkeleton.class.php
+	main/Flow/ModelAndView.class.php main/Utils/ArrayUtils.class.php
+	test/main/Utils/ArrayUtilsTest.class.php: cosmetics and sugar
+
+2013-11-19 Evgeny V. Kokovikhin
+
+	* core/Form/Form.class.php core/Form/FormCollection.class.php 
+	test/core/FormTest.class.php: FormCollection introduced. See usage examples in tests.§ 
+
+2013-11-01 Evgeny V. Kokovikhin
+	
+	* core/Form/Primitives/PrimitiveIdentifierList.class.php: added ability 
+	to ignore wrong values in list of identifier
+
+2013-10-28 Evgeny V. Kokovikhin
+	
+	*  main/Flow/SimpleFrontController.class.php: added SimpleFrontController
+	this is one of the possible way to use FrontController in your application 
+
+2013-10-21 Evgeny V. Kokovikhin
+	
+	* meta/bin/build.php meta/classes/MetaClassPUMLGenerator.class.php
+	meta/classes/MetaConfiguration.class.php:  added schema generator for PlantUML
+	see http://plantuml.sourceforge.net/classes.html
+
+2013-10-17 Nikita V. Konstantinov
+
+	* main/Flow/HttpRequest.class.php
+	* main/Net/Http/HttpHeaderCollection.class.php
+	* test/AllTests.php
+	* test/main/Net/Http/HttpHeaderCollectionTest.class.php:
+		added HttpHeaderCollection
+
+2013-10-15 Nikita V. Konstantinov
+
+	* main/Flow/HttpRequest.class.php:
+		added HttpRequest::createFromGlobals()
+
+2013-09-03 Vasily M. Stashko
+
+	* core/DB/MySQL.class.php
+	core/DB/MySQLim.class.php:
+		added (mysqli?_ping) check to isConnected() methods
+
+2013-04-19  Aleksey S. Denisov
+
+	* core/Cache/CachePeer.class.php
+	core/Cache/WatermarkedPeer.class.php
+	core/DB/DB.class.php:
+        fixed deferent uncache keys with watermark while in db transaction
+
+2013-04-08  Artem V. Titarenko
+
+	* main/DAOs/Workers/SmartDaoWorker.class.php: SmartDaoWorker race condition bug fix
+
+2013-03-31  Viatcheslav Y. Tsyrulnik
+
+	* core/Form/Primitives/PrimitiveHttpUrl.class.php
+		main/Net/HttpUrl.class.php
+		test/core/PrimitiveHttpUrlTest.class.php
+		test/main/HttpUrlTest.class.php:
+			HttpUrl::isValid skips privileged ports validation by default
+
+2013-03-31  Nikita V. Konstantinov
+
+	* core/Base/Singleton.class.php:
+		Singleton 2+ constructor arguments now without eval
+
+2013-01-23  Dmitriy V. Snezhinskiy
+
+	* main/Math/MathUtils.class.php 
+		test/main/MathUtilsTest.class.php:
+			fix matrix multiplication, add test
+
+2012-12-23  Vasily A. Surikov
+
+	* meta/bin/build.php
+		meta/classes/ColoredTextOutput.class.php
+		meta/classes/MetaOutput.class.php
+		meta/classes/TextOutput.class.php:
+			do not forward stderr > stdout
+
+2012-12-23  Vasily A. Surikov
+
+	* core/Form/Primitives/BasePrimitive.class.php
+		core/Form/Primitives/PrimitiveAlias.class.php
+		core/Form/Primitives/TimeList.class.php:
+			getActualValue marked deprecated and not secure,
+				added instead it method getValueOrDefault
+
+2012-12-23  Alexey S. Denisov
+
+	* main/Base/AbstractProtoClass.class.php
+		main/Base/InnerMetaProperty.class.php:
+			InnerMetaProperty (ValueObject) unquoting binary field fix
+
+2012-12-06  Evgeny V. Kokovikhin
+
+	* main/DAOs/GenericDAO.class.php 
+		meta/builders/AutoDaoBuilder.class.php 
+		meta/builders/BaseBuilder.class.php:
+			dbLink became a property
+
+2012-11-25  Alexey S. Denisov
+
+	* core/Form/Primitives/PrimitiveIdentifier.class.php
+		core/Form/Primitives/PrimitiveIdentifier.class.php:
+			PrimitiveIdentifier now can export/import objects by custom methods
+
+2012-11-18  Nikita V. Konstantinov
+
+	* meta/types/ObjectType.class.php:
+		update for Business objects - now you can setSomeProperty(null)
+		for Objects properties if it's not required
+
+2012-10-24  Alexey S. Denisov
+
 	* main/Flow/CarefulDatabaseRunner.class.php
 		main/UnifiedContainer/UnifiedContainer.class.php:
 			CarefulDatabaseRunner and UnifiedContainer will use InnerTransaction
 
-2012-24-10  Alexey S. Denisov
+2012-10-24  Alexey S. Denisov
+
 	* global.inc.php.tpl
 		main/Autoloader/Autoloader.class.php
 		main/Autoloader/AutoloaderClassNotFound.class.php
@@ -174,7 +293,7 @@
 
 	Introducing Uncachers
 
-2012-06-29	Nikita Konstantinov
+2012-06-29	Nikita V. Konstantinov
 
 	* core/DB/PgSQL.class.php
 		test/core/DbConnectionTest.class.php:
diff --git a/global.inc.php.tpl b/global.inc.php.tpl
index 6b41db5178..429f171362 100644
--- a/global.inc.php.tpl
+++ b/global.inc.php.tpl
@@ -10,138 +10,145 @@
  ***************************************************************************/
 
 	// sample system-wide configuration file
-	
+
+	namespace Onphp;
+
 	function error2Exception($code, $string, $file, $line, $context)
 	{
 		throw new BaseException($string, $code);
 	}
-	
+
 	// file extensions
 	define('EXT_CLASS', '.class.php');
 	define('EXT_TPL', '.tpl.html');
 	define('EXT_MOD', '.inc.php');
 	define('EXT_HTML', '.html');
 	define('EXT_UNIT', '.unit.php');
-	
+
 	// overridable constant, don't forget for trailing slash
 	// also you may consider using /dev/shm/ for cache purposes
-	if (!defined('ONPHP_TEMP_PATH'))
+	if (!defined('ONPHP_TEMP_PATH')) {
+		$tempSuffix = 'onPHP';
+		if (isset($_SERVER['USER'])) {
+			$tempSuffix .= '-'.$_SERVER['USER'];
+		}
 		define(
 			'ONPHP_TEMP_PATH',
-			sys_get_temp_dir().DIRECTORY_SEPARATOR.'onPHP'.DIRECTORY_SEPARATOR
+			sys_get_temp_dir().DIRECTORY_SEPARATOR.$tempSuffix.DIRECTORY_SEPARATOR
 		);
-	
+	}
+
 	// system settings
 	error_reporting(E_ALL | E_STRICT);
-	set_error_handler('error2Exception', E_ALL | E_STRICT);
+	set_error_handler('\Onphp\error2Exception', E_ALL | E_STRICT);
 	ignore_user_abort(true);
-	define('ONPHP_VERSION', '1.1.master');
-	
+	define('ONPHP_VERSION', '1.2.master');
+
 	if (!defined('ONPHP_IPC_PERMS'))
 		define('ONPHP_IPC_PERMS', 0660);
-	
+
 	// paths
 	define('ONPHP_ROOT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
 	define('ONPHP_CORE_PATH', ONPHP_ROOT_PATH.'core'.DIRECTORY_SEPARATOR);
 	define('ONPHP_MAIN_PATH', ONPHP_ROOT_PATH.'main'.DIRECTORY_SEPARATOR);
 	define('ONPHP_META_PATH', ONPHP_ROOT_PATH.'meta'.DIRECTORY_SEPARATOR);
 	define('ONPHP_UI_PATH', ONPHP_ROOT_PATH.'UI'.DIRECTORY_SEPARATOR);
-	
+
 	if (!defined('ONPHP_META_PATH'))
 		define(
 			'ONPHP_META_PATH',
 			ONPHP_ROOT_PATH.'meta'.DIRECTORY_SEPARATOR
 		);
-	
+
 	/**
-	 * @deprecated 
+	 * @deprecated
 	 */
 	if (!defined('ONPHP_CURL_CLIENT_OLD_TO_STRING'))
 		define('ONPHP_CURL_CLIENT_OLD_TO_STRING', false);
-	
+
 	define('ONPHP_META_CLASSES', ONPHP_META_PATH.'classes'.DIRECTORY_SEPARATOR);
-	
+
 	define(
 		'ONPHP_INCUBATOR_PATH',
 		ONPHP_ROOT_PATH.'incubator'.DIRECTORY_SEPARATOR
 	);
-	
+
 	if (!defined('ONPHP_CLASS_CACHE'))
 		define('ONPHP_CLASS_CACHE', ONPHP_TEMP_PATH);
-	
+
 	// classes autoload magic
 	if (!defined('ONPHP_CLASS_CACHE_TYPE'))
-		define('ONPHP_CLASS_CACHE_TYPE', 'AutoloaderClassPathCache');
-	
+		define('ONPHP_CLASS_CACHE_TYPE', '\Onphp\AutoloaderClassPathCache');
+
 	require ONPHP_MAIN_PATH.'Autoloader'.DIRECTORY_SEPARATOR.'require'.EXT_MOD;
-	
+
 	$autoloader = ONPHP_CLASS_CACHE_TYPE;
 	AutoloaderPool::set('onPHP', $autoloader = new $autoloader());
 	/* @var $autoloader AutoloaderClassPathCache */
 	$autoloader->setNamespaceResolver(NamespaceResolverOnPHP::create())->register();
-	
+
 	$autoloader->addPaths(array(
 		// core classes
 		ONPHP_CORE_PATH.'Base'			,
 		ONPHP_CORE_PATH.'Cache'		,
-		
+
 		ONPHP_CORE_PATH.'DB'			,
 		ONPHP_CORE_PATH.'DB'.DIRECTORY_SEPARATOR.'Transaction',
 		ONPHP_CORE_PATH.'DB'.DIRECTORY_SEPARATOR.'NoSQL',
-		
+
 		ONPHP_CORE_PATH.'Exceptions'	,
-		
+
 		ONPHP_CORE_PATH.'Form'			,
 		ONPHP_CORE_PATH.'Form'.DIRECTORY_SEPARATOR.'Filters',
 		ONPHP_CORE_PATH.'Form'.DIRECTORY_SEPARATOR.'Primitives',
-		
+
 		ONPHP_CORE_PATH.'Logic'		,
 		ONPHP_CORE_PATH.'OSQL'			,
-		
+
 		// main framework
 		ONPHP_MAIN_PATH.'Base'			,
-		
+
 		ONPHP_MAIN_PATH.'Criteria'		,
 		ONPHP_MAIN_PATH.'Criteria'.DIRECTORY_SEPARATOR.'Projections',
-		
+
 		ONPHP_MAIN_PATH.'Crypto'		,
-		
+
 		ONPHP_MAIN_PATH.'DAOs'			,
 		ONPHP_MAIN_PATH.'DAOs'.DIRECTORY_SEPARATOR.'Handlers',
 		ONPHP_MAIN_PATH.'DAOs'.DIRECTORY_SEPARATOR.'Workers',
 		ONPHP_MAIN_PATH.'DAOs'.DIRECTORY_SEPARATOR.'Uncachers',
-		
+
 		ONPHP_MAIN_PATH.'Flow'			,
 		ONPHP_MAIN_PATH.'SPL'			,
-		
+
 		ONPHP_MAIN_PATH.'Net'			,
 		ONPHP_MAIN_PATH.'Net'.DIRECTORY_SEPARATOR.'Http',
 		ONPHP_MAIN_PATH.'Net'.DIRECTORY_SEPARATOR.'Mail',
 		ONPHP_MAIN_PATH.'Net'.DIRECTORY_SEPARATOR.'Ip',
 		ONPHP_MAIN_PATH.'Net'.DIRECTORY_SEPARATOR.'Soap',
-		
+
 		ONPHP_MAIN_PATH.'Math'			,
-		
+
 		ONPHP_MAIN_PATH.'Markup'		,
 		ONPHP_MAIN_PATH.'Markup'.DIRECTORY_SEPARATOR.'Feed',
 		ONPHP_MAIN_PATH.'Markup'.DIRECTORY_SEPARATOR.'Html',
-		
+
 		ONPHP_MAIN_PATH.'OQL'			,
 		ONPHP_MAIN_PATH.'OQL'.DIRECTORY_SEPARATOR.'Expressions',
 		ONPHP_MAIN_PATH.'OQL'.DIRECTORY_SEPARATOR.'Parsers',
 		ONPHP_MAIN_PATH.'OQL'.DIRECTORY_SEPARATOR.'Statements',
-		
+
 		ONPHP_MAIN_PATH.'OpenId'		,
-		
+
 		ONPHP_MAIN_PATH.'EntityProto',
 		ONPHP_MAIN_PATH.'EntityProto'.DIRECTORY_SEPARATOR.'Builders',
 		ONPHP_MAIN_PATH.'EntityProto'.DIRECTORY_SEPARATOR.'Accessors',
-		
+
 		ONPHP_MAIN_PATH.'UnifiedContainer',
 
 		ONPHP_MAIN_PATH.'UI',
 		ONPHP_MAIN_PATH.'UI'.DIRECTORY_SEPARATOR.'View',
-		
+
 		ONPHP_MAIN_PATH.'Utils'		,
 		ONPHP_MAIN_PATH.'Utils'.DIRECTORY_SEPARATOR.'TuringTest',
 		ONPHP_MAIN_PATH.'Utils'.DIRECTORY_SEPARATOR.'Archivers',
@@ -161,31 +168,31 @@
 		ONPHP_MAIN_PATH.'Messages'.DIRECTORY_SEPARATOR.'Interface',
 
 		ONPHP_MAIN_PATH.'Application'	,
-		
+
 		ONPHP_MAIN_PATH.'Charts',
 		ONPHP_MAIN_PATH.'Charts'.DIRECTORY_SEPARATOR.'Google',
 		ONPHP_MAIN_PATH.'Monitoring',
-		
+
 		ONPHP_META_CLASSES,
-		
+
 	/*
 		ONPHP_INCUBATOR_PATH
 			.'classes'.DIRECTORY_SEPARATOR
 			.'Application'.DIRECTORY_SEPARATOR,
-			
+
 		ONPHP_INCUBATOR_PATH
 			.'classes'.DIRECTORY_SEPARATOR
 			.'Application'.DIRECTORY_SEPARATOR
 			.'Markups'.DIRECTORY_SEPARATOR,
-		
+
 		ONPHP_INCUBATOR_PATH
 			.'classes'.DIRECTORY_SEPARATOR
 			.'Application'.DIRECTORY_SEPARATOR
 			.'Markups'.DIRECTORY_SEPARATOR
 			.'Documents'.DIRECTORY_SEPARATOR,
 	*/
-	));
-	
+	), 'Onphp');
+
 	//NOTE: disable by default
 	//see http://pgfoundry.org/docman/view.php/1000079/117/README.txt
 	//define('POSTGRES_IP4_ENABLED', true);
diff --git a/main/Application/ApplicationUrl.class.php b/main/Application/ApplicationUrl.class.php
index 4160eb5cda..b245b96ffb 100644
--- a/main/Application/ApplicationUrl.class.php
+++ b/main/Application/ApplicationUrl.class.php
@@ -14,6 +14,8 @@
 	 * not only path/query - subdomains may be involved too,
 	 * ex: username.example.com
 	**/
+	namespace Onphp;
+
 	class ApplicationUrl
 	{
 		protected $base				= null;
@@ -29,7 +31,7 @@ class ApplicationUrl
 		protected $absolute			= false;
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public static function create()
 		{
@@ -37,7 +39,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function setBase(HttpUrl $base)
 		{
@@ -47,7 +49,7 @@ public function setBase(HttpUrl $base)
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public function getBase()
 		{
@@ -55,7 +57,7 @@ public function getBase()
 		}
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function setAbsolute($absolute)
 		{
@@ -70,7 +72,7 @@ public function isAbsolute()
 		}
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function setNavigationSchema(ScopeNavigationSchema $schema)
 		{
@@ -80,7 +82,7 @@ public function setNavigationSchema(ScopeNavigationSchema $schema)
 		}
 		
 		/**
-		 * @return ScopeNavigationSchema
+		 * @return \Onphp\ScopeNavigationSchema
 		**/
 		public function getNavigationSchema()
 		{
@@ -88,7 +90,7 @@ public function getNavigationSchema()
 		}
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function addApplicationScope($scope)
 		{
@@ -102,7 +104,7 @@ public function addApplicationScope($scope)
 		}
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function addUserScope($userScope)
 		{
@@ -116,7 +118,7 @@ public function addUserScope($userScope)
 		}
 
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function dropFromUserScope($key)
 		{
@@ -132,7 +134,7 @@ public function getUserScope()
 		}
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function setPath($path)
 		{
@@ -155,7 +157,7 @@ public function setPath($path)
 		}
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function setPathByRequestUri($requestUri, $normalize = true)
 		{
@@ -206,7 +208,7 @@ public function getArgSeparator()
 		}
 		
 		/**
-		 * @return ApplicationUrl
+		 * @return \Onphp\ApplicationUrl
 		**/
 		public function setArgSeparator($argSeparator)
 		{
diff --git a/main/Application/ScopeNavigationSchema.class.php b/main/Application/ScopeNavigationSchema.class.php
index 2c85744e4a..91360bd013 100644
--- a/main/Application/ScopeNavigationSchema.class.php
+++ b/main/Application/ScopeNavigationSchema.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class ScopeNavigationSchema extends Singleton
 	{
 		abstract public function extractPath(&$scope);
diff --git a/main/Application/SimpleApplicationUrl.class.php b/main/Application/SimpleApplicationUrl.class.php
index b80aad7822..30b4c7f92c 100644
--- a/main/Application/SimpleApplicationUrl.class.php
+++ b/main/Application/SimpleApplicationUrl.class.php
@@ -1,8 +1,10 @@
 <?php
+	namespace Onphp;
+
 	final class SimpleApplicationUrl extends ApplicationUrl
 	{
 		/**
-		 * @return SimpleApplicationUrl
+		 * @return \Onphp\SimpleApplicationUrl
 		**/
 		public static function create()
 		{
@@ -10,7 +12,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return SimpleApplicationUrl
+		 * @return \Onphp\SimpleApplicationUrl
 		**/
 		public function setPathByRequestUri($requestUri, $normalize = true)
 		{
diff --git a/main/Autoloader/Autoloader.class.php b/main/Autoloader/Autoloader.class.php
index 9bd7dec976..fcc3843fd0 100644
--- a/main/Autoloader/Autoloader.class.php
+++ b/main/Autoloader/Autoloader.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	interface Autoloader
 	{
 		public function autoload($className);
diff --git a/main/Autoloader/AutoloaderClassNotFound.class.php b/main/Autoloader/AutoloaderClassNotFound.class.php
index 997ad2c6e2..0214cba629 100644
--- a/main/Autoloader/AutoloaderClassNotFound.class.php
+++ b/main/Autoloader/AutoloaderClassNotFound.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	class AutoloaderClassNotFound implements Autoloader
 	{
 		private static $i = null;
@@ -18,7 +20,7 @@ protected function __construct() {
 		}
 		
 		/**
-		 * @return AutoloaderClassNotFound
+		 * @return \Onphp\AutoloaderClassNotFound
 		 */
 		public static function me()
 		{
diff --git a/main/Autoloader/AutoloaderClassPathCache.class.php b/main/Autoloader/AutoloaderClassPathCache.class.php
index aa497ca484..46a26b9dd0 100644
--- a/main/Autoloader/AutoloaderClassPathCache.class.php
+++ b/main/Autoloader/AutoloaderClassPathCache.class.php
@@ -10,12 +10,14 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	class AutoloaderClassPathCache implements AutoloaderRecachable, AutoloaderWithNamespace
 	{
 		const ONPHP_CLASS_CACHE_CHECKSUM = '__occc';
 		
 		/**
-		 * @var NamespaceResolver
+		 * @var \Onphp\NamespaceResolver
 		 */
 		private $namespaceResolver = null;
 		
@@ -26,7 +28,7 @@ class AutoloaderClassPathCache implements AutoloaderRecachable, AutoloaderWithNa
 		private $classCachePath = ONPHP_CLASS_CACHE;
 		
 		/**
-		 * @return AutoloaderClassPathCache
+		 * @return \Onphp\AutoloaderClassPathCache
 		 */
 		public static function create()
 		{
@@ -34,8 +36,8 @@ public static function create()
 		}
 		
 		/**
-		 * @param NamespaceResolver $namespaceResolver
-		 * @return AutoloaderClassPathCache
+		 * @param \Onphp\NamespaceResolver $\Onphp\NamespaceResolver
+		 * @return \Onphp\AutoloaderClassPathCache
 		 */
 		public function setNamespaceResolver(NamespaceResolver $namespaceResolver)
 		{
@@ -44,7 +46,7 @@ public function setNamespaceResolver(NamespaceResolver $namespaceResolver)
 		}
 		
 		/**
-		 * @return NamespaceResolver
+		 * @return \Onphp\NamespaceResolver
 		 */
 		public function getNamespaceResolver()
 		{
@@ -53,7 +55,7 @@ public function getNamespaceResolver()
 		
 		/**
 		 * @param string $path
-		 * @return AutoloaderClassPathCache
+		 * @return \Onphp\AutoloaderClassPathCache
 		 */
 		public function addPath($path, $namespace = null)
 		{
@@ -64,7 +66,7 @@ public function addPath($path, $namespace = null)
 		
 		/**
 		 * @param array $paths
-		 * @return AutoloaderClassPathCache
+		 * @return \Onphp\AutoloaderClassPathCache
 		 */
 		public function addPaths(array $paths, $namespace = null)
 		{
@@ -75,7 +77,7 @@ public function addPaths(array $paths, $namespace = null)
 		
 		/**
 		 * @param string $path
-		 * @return AutoloaderClassPathCache
+		 * @return \Onphp\AutoloaderClassPathCache
 		 */
 		public function setClassCachePath($path)
 		{
diff --git a/main/Autoloader/AutoloaderNoCache.class.php b/main/Autoloader/AutoloaderNoCache.class.php
index 25ff4c1f8e..7438ba43df 100644
--- a/main/Autoloader/AutoloaderNoCache.class.php
+++ b/main/Autoloader/AutoloaderNoCache.class.php
@@ -10,16 +10,18 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	class AutoloaderNoCache implements AutoloaderWithNamespace
 	{
 		/**
-		 * @var NamespaceResolver
+		 * @var \Onphp\NamespaceResolver
 		 */
 		private $namespaceResolver = null;
 		
 		/**
-		 * @param NamespaceResolver $namespaceResolver
-		 * @return AutoloaderClassPathCache
+		 * @param \Onphp\NamespaceResolver $\Onphp\NamespaceResolver
+		 * @return \Onphp\AutoloaderClassPathCache
 		 */
 		public function setNamespaceResolver(NamespaceResolver $namespaceResolver)
 		{
@@ -28,7 +30,7 @@ public function setNamespaceResolver(NamespaceResolver $namespaceResolver)
 		}
 		
 		/**
-		 * @return NamespaceResolver
+		 * @return \Onphp\NamespaceResolver
 		 */
 		public function getNamespaceResolver()
 		{
@@ -37,7 +39,7 @@ public function getNamespaceResolver()
 		
 		/**
 		 * @param string $path
-		 * @return AutoloaderNoCache
+		 * @return \Onphp\AutoloaderNoCache
 		 */
 		public function addPath($path, $namespace = null)
 		{
diff --git a/main/Autoloader/AutoloaderPool.class.php b/main/Autoloader/AutoloaderPool.class.php
index 2fc3398499..7dcb70d661 100644
--- a/main/Autoloader/AutoloaderPool.class.php
+++ b/main/Autoloader/AutoloaderPool.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	class AutoloaderPool
 	{
 		private static $map = array();
@@ -21,7 +23,7 @@ public static function set($name, Autoloader $autoloader)
 		
 		/**
 		 * @param string $name
-		 * @return Autoloader
+		 * @return \Onphp\Autoloader
 		 */
 		public static function get($name)
 		{
@@ -49,7 +51,7 @@ public static function unregisterRecache(AutoloaderRecachable $autoloader)
 		public static function autoloadWithRecache($className)
 		{
 			foreach (self::$recacheMap as $autoloader) {
-				/* @var $autoloader AutoloaderRecachable */
+				/* @var $autoloader \Onphp\AutoloaderRecachable */
 				$autoloader->autoloadWithRecache($className);
 				
 				if (class_exists($className, false))
diff --git a/main/Autoloader/AutoloaderRecachable.class.php b/main/Autoloader/AutoloaderRecachable.class.php
index 8a4447c375..f8f3b86243 100644
--- a/main/Autoloader/AutoloaderRecachable.class.php
+++ b/main/Autoloader/AutoloaderRecachable.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	interface AutoloaderRecachable extends Autoloader
 	{
 		public function autoloadWithRecache($className);
diff --git a/main/Autoloader/AutoloaderWithNamespace.class.php b/main/Autoloader/AutoloaderWithNamespace.class.php
index 2163f3e762..58bdf38162 100644
--- a/main/Autoloader/AutoloaderWithNamespace.class.php
+++ b/main/Autoloader/AutoloaderWithNamespace.class.php
@@ -9,28 +9,30 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	interface AutoloaderWithNamespace extends Autoloader
 	{
 		/**
-		 * @param NamespaceResolver $namespaceResolver
-		 * @return Autoloader
+		 * @param \Onphp\NamespaceResolver $\Onphp\NamespaceResolver
+		 * @return \Onphp\Autoloader
 		 */
 		public function setNamespaceResolver(NamespaceResolver $namespaceResolver);
 		
 		/**
-		 * @return Autoloader
+		 * @return \Onphp\Autoloader
 		 */
 		public function getNamespaceResolver();
 		
 		/**
 		 * @param string $path
-		 * @return Autoloader
+		 * @return \Onphp\Autoloader
 		 */
 		public function addPath($path, $namespace = null);
 		
 		/**
 		 * @param array $pathes
-		 * @return Autoloader
+		 * @return \Onphp\Autoloader
 		 */
 		public function addPaths(array $paths, $namespace = null);
 	}
diff --git a/main/Autoloader/NamespaceDirScaner.class.php b/main/Autoloader/NamespaceDirScaner.class.php
index 9b314f4780..fc585e1a7e 100644
--- a/main/Autoloader/NamespaceDirScaner.class.php
+++ b/main/Autoloader/NamespaceDirScaner.class.php
@@ -13,6 +13,8 @@
 	 * Abstract class to scan directories,
 	 *    see NamespaceDirScanerPSR0 and NamespaceDirScanerOnPHP
 	 */
+	namespace Onphp;
+
 	abstract class NamespaceDirScaner
 	{
 		protected $classExtension = EXT_CLASS;
@@ -27,7 +29,7 @@ abstract public function scan($directory, $namespace = '');
 		
 		/**
 		 * @param string $classExtension
-		 * @return NamespaceDirScaner
+		 * @return \Onphp\NamespaceDirScaner
 		 */
 		public function setClassExtension($classExtension)
 		{
diff --git a/main/Autoloader/NamespaceDirScanerOnPHP.class.php b/main/Autoloader/NamespaceDirScanerOnPHP.class.php
index 08a86e3045..688ca19366 100644
--- a/main/Autoloader/NamespaceDirScanerOnPHP.class.php
+++ b/main/Autoloader/NamespaceDirScanerOnPHP.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * NamespaceDirScanerOnPHP class to scan directories and save which class where
 	 */
+	namespace Onphp;
+
 	class NamespaceDirScanerOnPHP extends NamespaceDirScaner
 	{
 		public function scan($directory, $namespace = '')
diff --git a/main/Autoloader/NamespaceDirScanerPSR0.class.php b/main/Autoloader/NamespaceDirScanerPSR0.class.php
index 295e5eb691..e6e2f73b4e 100644
--- a/main/Autoloader/NamespaceDirScanerPSR0.class.php
+++ b/main/Autoloader/NamespaceDirScanerPSR0.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * NamespaceDirScanerPSR0 class to scan directories and save which class where
 	 */
+	namespace Onphp;
+
 	class NamespaceDirScanerPSR0 extends NamespaceDirScaner
 	{
 		private $allowedUnderline = false;
 		
 		/**
 		 * @param boolean $allowedUnderline
-		 * @return NamespaceResolverPSR0
+		 * @return \Onphp\NamespaceResolverPSR0
 		 */
 		public function setAllowedUnderline($allowedUnderline) {
 			$this->allowedUnderline = ($allowedUnderline === true);
diff --git a/main/Autoloader/NamespaceResolver.class.php b/main/Autoloader/NamespaceResolver.class.php
index 046b4447d9..00852ad468 100644
--- a/main/Autoloader/NamespaceResolver.class.php
+++ b/main/Autoloader/NamespaceResolver.class.php
@@ -9,19 +9,21 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	interface NamespaceResolver
 	{
 		const DS = DIRECTORY_SEPARATOR;
 		
 		/**
 		 * @param string $path
-		 * @return NamespaceResolverOnPHP
+		 * @return \Onphp\NamespaceResolverOnPHP
 		 */
 		public function addPath($path, $namespace = null);
 		
 		/**
 		 * @param array $path
-		 * @return NamespaceResolverOnPHP
+		 * @return \Onphp\NamespaceResolverOnPHP
 		 */
 		public function addPaths(array $pathList, $namespace = null);
 		
@@ -32,7 +34,7 @@ public function getPaths();
 		
 		/**
 		 * @param string $classExtension
-		 * @return NamespaceResolverOnPHP
+		 * @return \Onphp\NamespaceResolverOnPHP
 		 */
 		public function setClassExtension($classExtension);
 		
diff --git a/main/Autoloader/NamespaceResolverOnPHP.class.php b/main/Autoloader/NamespaceResolverOnPHP.class.php
index bf5bb0da2b..f456675ab3 100644
--- a/main/Autoloader/NamespaceResolverOnPHP.class.php
+++ b/main/Autoloader/NamespaceResolverOnPHP.class.php
@@ -10,13 +10,15 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	class NamespaceResolverOnPHP implements NamespaceResolver
 	{
 		private $paths = array();
 		private $classExtension = EXT_CLASS;
 		
 		/**
-		 * @return NamespaceResolverOnPHP
+		 * @return \Onphp\NamespaceResolverOnPHP
 		 */
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		
 		/**
 		 * @param string $path
-		 * @return NamespaceResolverOnPHP
+		 * @return \Onphp\NamespaceResolverOnPHP
 		 */
 		public function addPath($path, $namespace = null)
 		{
@@ -41,7 +43,7 @@ public function addPath($path, $namespace = null)
 		
 		/**
 		 * @param string $path
-		 * @return NamespaceResolverOnPHP
+		 * @return \Onphp\NamespaceResolverOnPHP
 		 */
 		public function addPaths(array $pathList, $namespace = null)
 		{
@@ -58,7 +60,7 @@ public function getPaths()
 		
 		/**
 		 * @param string $classExtension
-		 * @return NamespaceResolverOnPHP
+		 * @return \Onphp\NamespaceResolverOnPHP
 		 */
 		public function setClassExtension($classExtension)
 		{
@@ -125,7 +127,7 @@ protected function searchClass($className, $namespace, $paths)
 		}
 		
 		/**
-		 * @return NamespaceDirScaner
+		 * @return \Onphp\NamespaceDirScaner
 		 */
 		protected function getDirScaner() {
 			return new NamespaceDirScanerOnPHP();
diff --git a/main/Autoloader/NamespaceResolverPSR0.class.php b/main/Autoloader/NamespaceResolverPSR0.class.php
index 13b14cb823..193a8f4550 100644
--- a/main/Autoloader/NamespaceResolverPSR0.class.php
+++ b/main/Autoloader/NamespaceResolverPSR0.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * Not for onPHP but if you want to use it in your project
 	 */
+	namespace Onphp;
+
 	class NamespaceResolverPSR0 extends NamespaceResolverOnPHP
 	{
 		private $allowedUnderline = false;
 		
 		/**
-		 * @return NamespaceResolverPSR0
+		 * @return \Onphp\NamespaceResolverPSR0
 		 */
 		public static function create()
 		{
@@ -26,7 +28,7 @@ public static function create()
 		
 		/**
 		 * @param boolean $allowedUnderline
-		 * @return NamespaceResolverPSR0
+		 * @return \Onphp\NamespaceResolverPSR0
 		 */
 		public function setAllowedUnderline($allowedUnderline) {
 			$this->allowedUnderline = ($allowedUnderline === true);
@@ -62,7 +64,7 @@ protected function searchClass($className, $namespace, $paths)
 		}
 		
 		/**
-		 * @return NamespaceDirScaner
+		 * @return \Onphp\NamespaceDirScaner
 		 */
 		protected function getDirScaner() {
 			$dirScaner = new NamespaceDirScanerPSR0();
diff --git a/main/Base/AbstractCollection.class.php b/main/Base/AbstractCollection.class.php
index ebd988cd8a..4ff4e04c8c 100644
--- a/main/Base/AbstractCollection.class.php
+++ b/main/Base/AbstractCollection.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class AbstractCollection implements Collection
 	{
 		protected $items  = array();
@@ -83,7 +85,7 @@ public function getList()
 		}
 		
 		/**
-		 * @return CollectionItem
+		 * @return \Onphp\CollectionItem
 		**/
 		public function getByName($name)
 		{
diff --git a/main/Base/AbstractProtoClass.class.php b/main/Base/AbstractProtoClass.class.php
index 6b229e1a13..eb7d3544c0 100644
--- a/main/Base/AbstractProtoClass.class.php
+++ b/main/Base/AbstractProtoClass.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	abstract class AbstractProtoClass extends Singleton
 	{
 		private $depth = 0;
@@ -21,7 +23,7 @@ abstract class AbstractProtoClass extends Singleton
 		abstract protected function makePropertyList();
 		
 		/**
-		 * @return AbstractProtoClass
+		 * @return \Onphp\AbstractProtoClass
 		**/
 		public function beginPrefetch()
 		{
@@ -32,7 +34,7 @@ public function beginPrefetch()
 		}
 		
 		/**
-		 * @return AbstractProtoClass
+		 * @return \Onphp\AbstractProtoClass
 		**/
 		public function skipObjectPrefetching(Identifiable $object)
 		{
@@ -121,9 +123,9 @@ public function endPrefetch(array $objectList)
 			return $objectList;
 		}
 		
-		public static function makeOnlyObject($className, $array, $prefix = null)
+		public static function makeOnlyObject($className, $array, $prefix = null, ProtoDAO $parentDao = null)
 		{
-			return self::assemblyObject(new $className, $array, $prefix);
+			return self::assemblyObject(new $className, $array, $prefix, $parentDao);
 		}
 		
 		public static function completeObject(Prototyped $object)
@@ -175,8 +177,8 @@ final public function getExpandedPropertyList($prefix = null)
 		}
 		
 		/**
-		 * @return LightMetaProperty
-		 * @throws MissingElementException
+		 * @return \Onphp\LightMetaProperty
+		 * @throws \Onphp\MissingElementException
 		**/
 		public function getPropertyByName($name)
 		{
@@ -194,7 +196,7 @@ public function isPropertyExists($name)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function makeForm($prefix = null)
 		{
@@ -208,7 +210,7 @@ public function makeForm($prefix = null)
 		}
 		
 		/**
-		 * @return InsertOrUpdateQuery
+		 * @return \Onphp\InsertOrUpdateQuery
 		**/
 		public function fillQuery(
 			InsertOrUpdateQuery $query,
@@ -267,6 +269,11 @@ public function importPrimitive(
 				$property = $this->getPropertyByName($path);
 				$getter = $property->getGetter();
 				
+				if ($path == 'id' && $prm instanceof PrimitiveIdentifier) {
+					$form->importValue($prm->getName(), $object);
+					return $object;
+				}
+
 				if (
 					!$property->isFormless()
 					&& ($property->getFetchStrategyId() == FetchStrategy::LAZY)
@@ -383,13 +390,13 @@ private static function fetchEncapsulants(Prototyped $object)
 		}
 		
 		private static function assemblyObject(
-			Prototyped $object, $array, $prefix = null
+			Prototyped $object, $array, $prefix = null, ProtoDAO $parentDao = null
 		)
 		{
 			if ($object instanceof DAOConnected)
 				$dao = $object->dao();
 			else
-				$dao = null;
+				$dao = $parentDao ?: null;
 			
 			$proto = $object->proto();
 			
diff --git a/main/Base/BaseRange.class.php b/main/Base/BaseRange.class.php
index c03f35366c..c34e418f1f 100644
--- a/main/Base/BaseRange.class.php
+++ b/main/Base/BaseRange.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	class BaseRange implements Stringable
 	{
 		protected $min = null;
@@ -26,7 +28,7 @@ public function __construct($min = null, $max = null)
 		}
 		
 		/**
-		 * @return BaseRange
+		 * @return \Onphp\BaseRange
 		**/
 		public static function lazyCreate($min = null, $max = null)
 		{
@@ -42,8 +44,8 @@ public function getMin()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return BaseRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\BaseRange
 		**/
 		public function setMin($min = null)
 		{
@@ -63,8 +65,8 @@ public function getMax()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return BaseRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\BaseRange
 		**/
 		public function setMax($max = null)
 		{
@@ -93,7 +95,7 @@ public function toString($from = 'от', $to = 'до')
 		}
 		
 		/**
-		 * @return BaseRange
+		 * @return \Onphp\BaseRange
 		**/
 		public function divide($factor, $precision = null)
 		{
@@ -107,7 +109,7 @@ public function divide($factor, $precision = null)
 		}
 		
 		/**
-		 * @return BaseRange
+		 * @return \Onphp\BaseRange
 		**/
 		public function multiply($multiplier)
 		{
diff --git a/main/Base/CalendarDay.class.php b/main/Base/CalendarDay.class.php
index 6923975ab3..0f7d5ef269 100644
--- a/main/Base/CalendarDay.class.php
+++ b/main/Base/CalendarDay.class.php
@@ -14,13 +14,15 @@
 	 * 
 	 * @ingroup Calendar
 	**/
+	namespace Onphp;
+
 	final class CalendarDay extends Date
 	{
 		private $selected	= null;
 		private $outside	= null;
 		
 		/**
-		 * @return CalendarDay
+		 * @return \Onphp\CalendarDay
 		**/
 		public static function create($timestamp)
 		{
@@ -41,7 +43,7 @@ public function isSelected()
 		}
 		
 		/**
-		 * @return CalendarDay
+		 * @return \Onphp\CalendarDay
 		**/
 		public function setSelected($selected)
 		{
@@ -56,7 +58,7 @@ public function isOutside()
 		}
 		
 		/**
-		 * @return CalendarDay
+		 * @return \Onphp\CalendarDay
 		**/
 		public function setOutside($outside)
 		{
diff --git a/main/Base/CalendarMonthWeekly.class.php b/main/Base/CalendarMonthWeekly.class.php
index d281c388f2..f3a017d651 100644
--- a/main/Base/CalendarMonthWeekly.class.php
+++ b/main/Base/CalendarMonthWeekly.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Calendar
 	**/
+	namespace Onphp;
+
 	final class CalendarMonthWeekly
 	{
 		private $monthRange	= null;
@@ -73,7 +75,7 @@ public function __construct(
 		}
 		
 		/**
-		 * @return CalendarMonthWeekly
+		 * @return \Onphp\CalendarMonthWeekly
 		**/
 		public static function create(
 			Date $base, $weekStart = Timestamp::WEEKDAY_MONDAY
@@ -93,7 +95,7 @@ public function getDays()
 		}
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function getFullRange()
 		{
@@ -106,7 +108,7 @@ public function getFullLength()
 		}
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function getMonthRange()
 		{
@@ -114,8 +116,8 @@ public function getMonthRange()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return CalendarMonthWeekly
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\CalendarMonthWeekly
 		**/
 		public function setSelected(Date $day)
 		{
@@ -128,7 +130,7 @@ public function setSelected(Date $day)
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public function getNextMonthBase()
 		{
@@ -136,7 +138,7 @@ public function getNextMonthBase()
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public function getPrevMonthBase()
 		{
@@ -144,7 +146,7 @@ public function getPrevMonthBase()
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public function getBase()
 		{
diff --git a/main/Base/CalendarWeek.class.php b/main/Base/CalendarWeek.class.php
index 57041d716e..1fa2c8b1f9 100644
--- a/main/Base/CalendarWeek.class.php
+++ b/main/Base/CalendarWeek.class.php
@@ -14,12 +14,14 @@
 	 * 
 	 * @ingroup Calendar
 	**/
+	namespace Onphp;
+
 	final class CalendarWeek
 	{
 		private $days = array();
 		
 		/**
-		 * @return CalendarWeek
+		 * @return \Onphp\CalendarWeek
 		**/
 		public static function create()
 		{
@@ -32,7 +34,7 @@ public function getDays()
 		}
 		
 		/**
-		 * @return CalendarWeek
+		 * @return \Onphp\CalendarWeek
 		**/
 		public function addDay(CalendarDay $day)
 		{
diff --git a/main/Base/CallChain.class.php b/main/Base/CallChain.class.php
index 62c0434480..03b56471d3 100644
--- a/main/Base/CallChain.class.php
+++ b/main/Base/CallChain.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	final class CallChain
 	{
 		private $chain = array();
 		
 		/**
-		 * @return CallChain
+		 * @return \Onphp\CallChain
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return CallChain
+		 * @return \Onphp\CallChain
 		**/
 		public function add($object)
 		{
diff --git a/main/Base/Collection.class.php b/main/Base/Collection.class.php
index 22311c1c57..50c265768a 100644
--- a/main/Base/Collection.class.php
+++ b/main/Base/Collection.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface Collection
 	{
 		public function add(CollectionItem $item);
diff --git a/main/Base/CollectionItem.class.php b/main/Base/CollectionItem.class.php
index 17d7ae3b80..54cc7091d1 100644
--- a/main/Base/CollectionItem.class.php
+++ b/main/Base/CollectionItem.class.php
@@ -9,5 +9,7 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	class CollectionItem extends IdentifiableObject {/*_*/}
 ?>
\ No newline at end of file
diff --git a/main/Base/Comparator.class.php b/main/Base/Comparator.class.php
index d6d2dc3b7e..76dfddec31 100644
--- a/main/Base/Comparator.class.php
+++ b/main/Base/Comparator.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface Comparator
 	{
 		public function compare($one, $two);
diff --git a/main/Base/DateObjectComparator.class.php b/main/Base/DateObjectComparator.class.php
index 52f6670a74..0cedde6f5a 100644
--- a/main/Base/DateObjectComparator.class.php
+++ b/main/Base/DateObjectComparator.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DateObjectComparator extends Singleton
 		implements Comparator, Instantiatable
 	{
@@ -19,8 +21,8 @@ public static function me()
 
 		public function compare(/*Date*/ $one,/*Date*/ $two)
 		{
-			Assert::isInstance($one, 'Date');
-			Assert::isInstance($two, 'Date');
+			Assert::isInstance($one, '\Onphp\Date');
+			Assert::isInstance($two, '\Onphp\Date');
 
 			$stamp1 = $one->toStamp();
 			$stamp2 = $two->toStamp();
diff --git a/main/Base/DateRange.class.php b/main/Base/DateRange.class.php
index 3441195a3d..6ecf7331f4 100644
--- a/main/Base/DateRange.class.php
+++ b/main/Base/DateRange.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	class DateRange implements Stringable, SingleRange
 	{
 		private $start	= null;
@@ -26,7 +28,7 @@ class DateRange implements Stringable, SingleRange
 		private $dayEndStamp	= null;
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public static function create($start = null, $end = null)
 		{
@@ -52,8 +54,8 @@ public function __clone()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DateRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DateRange
 		**/
 		public function setStart(/* Date */ $start)
 		{
@@ -71,7 +73,7 @@ public function setStart(/* Date */ $start)
 		}
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function safeSetStart(/* Date */ $start)
 		{
@@ -90,7 +92,7 @@ public function safeSetStart(/* Date */ $start)
 		}
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function safeSetEnd(/* Date */ $end)
 		{
@@ -109,8 +111,8 @@ public function safeSetEnd(/* Date */ $end)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return DateRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\DateRange
 		**/
 		public function setEnd(/* Date */ $end)
 		{
@@ -127,7 +129,7 @@ public function setEnd(/* Date */ $end)
 		}
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function lazySet($start = null, $end = null)
 		{
@@ -151,7 +153,7 @@ public function lazySet($start = null, $end = null)
 		}
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function dropStart()
 		{
@@ -161,7 +163,7 @@ public function dropStart()
 		}
 		
 		/**
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function dropEnd()
 		{
@@ -178,7 +180,7 @@ public function isEmpty()
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public function getStart()
 		{
@@ -186,7 +188,7 @@ public function getStart()
 		}
 		
 		/**
-		 * @return Date
+		 * @return \Onphp\Date
 		**/
 		public function getEnd()
 		{
@@ -370,7 +372,7 @@ public function isOpen()
 		/**
 		 * enlarges $this by given $range, if last one is wider
 		 * 
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function enlarge(DateRange $range)
 		{
@@ -396,7 +398,7 @@ public function enlarge(DateRange $range)
 		/**
 		 * intersection of $this and given $range
 		 * 
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function clip(DateRange $range)
 		{
@@ -428,7 +430,7 @@ public function clip(DateRange $range)
 		/**
 		 * result is read-only, no error checking
 		 * 
-		 * @return DateRange
+		 * @return \Onphp\DateRange
 		**/
 		public function lightCopyOnClip(DateRange $range)
 		{
@@ -536,7 +538,7 @@ public function isOneDay()
 		}
 		
 		/**
-		 * @return TimestampRange
+		 * @return \Onphp\TimestampRange
 		**/
 		public function toTimestampRange()
 		{
@@ -556,7 +558,7 @@ protected function checkType($value)
 		
 		protected function getObjectName()
 		{
-			return 'Date';
+			return '\Onphp\Date';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/main/Base/FloatRange.class.php b/main/Base/FloatRange.class.php
index ee3f5a7213..3c76e79d5b 100644
--- a/main/Base/FloatRange.class.php
+++ b/main/Base/FloatRange.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FloatRange extends BaseRange
 	{
 		public function __construct($min = null, $max = null)
@@ -23,7 +25,7 @@ public function __construct($min = null, $max = null)
 		}
 		
 		/**
-		 * @return FloatRange
+		 * @return \Onphp\FloatRange
 		**/
 		public static function create($min = null, $max = null)
 		{
@@ -31,8 +33,8 @@ public static function create($min = null, $max = null)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return FloatRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\FloatRange
 		**/
 		public function setMin($min = null)
 		{
@@ -45,8 +47,8 @@ public function setMin($min = null)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return FloatRange
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\FloatRange
 		**/
 		public function setMax($max = null)
 		{
diff --git a/main/Base/Hstore.class.php b/main/Base/Hstore.class.php
index f49440cf3e..635f3dc884 100644
--- a/main/Base/Hstore.class.php
+++ b/main/Base/Hstore.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	final class Hstore implements Stringable
 	{
 		protected $properties = array();
@@ -19,7 +21,7 @@ final class Hstore implements Stringable
 		/**
 		 * Create Hstore by raw string.
 		 *
-		 * @return Hstore
+		 * @return \Onphp\Hstore
 		**/
 		public static function create($string)
 		{
@@ -31,7 +33,7 @@ public static function create($string)
 		/**
 		 * Create Hstore by array.
 		 *
-		 * @return Hstore
+		 * @return \Onphp\Hstore
 		**/
 		public static function make($array)
 		{
@@ -41,7 +43,7 @@ public static function make($array)
 		}
 		
 		/**
-		 * @return Hstore
+		 * @return \Onphp\Hstore
 		**/
 		public function setList($array)
 		{
@@ -64,7 +66,7 @@ public function get($key)
 		}
 		
 		/**
-		 * @return Hstore
+		 * @return \Onphp\Hstore
 		**/
 		public function set($key, $value)
 		{
@@ -74,7 +76,7 @@ public function set($key, $value)
 		}
 		
 		/**
-		 * @return Hstore
+		 * @return \Onphp\Hstore
 		**/
 		public function drop($key)
 		{
@@ -89,7 +91,7 @@ public function isExists($key)
 		}
 		
 		/**
-		 * @return Hstore
+		 * @return \Onphp\Hstore
 		**/
 		public function toValue($raw)
 		{
diff --git a/main/Base/IdentifiableTree.class.php b/main/Base/IdentifiableTree.class.php
index 552f2517b4..d8e3145485 100644
--- a/main/Base/IdentifiableTree.class.php
+++ b/main/Base/IdentifiableTree.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	abstract class IdentifiableTree
 		extends IdentifiableObject
 		implements Stringable
@@ -21,7 +23,7 @@ abstract class IdentifiableTree
 		private $parent	= null;
 		
 		/**
-		 * @return IdentifiableTree
+		 * @return \Onphp\IdentifiableTree
 		**/
 		public function getParent()
 		{
@@ -29,7 +31,7 @@ public function getParent()
 		}
 		
 		/**
-		 * @return IdentifiableTree
+		 * @return \Onphp\IdentifiableTree
 		**/
 		public function setParent(IdentifiableTree $parent)
 		{
@@ -41,7 +43,7 @@ public function setParent(IdentifiableTree $parent)
 		}
 		
 		/**
-		 * @return IdentifiableTree
+		 * @return \Onphp\IdentifiableTree
 		**/
 		public function dropParent()
 		{
@@ -51,7 +53,7 @@ public function dropParent()
 		}
 		
 		/**
-		 * @return IdentifiableTree
+		 * @return \Onphp\IdentifiableTree
 		**/
 		public function getRoot()
 		{
diff --git a/main/Base/ImageType.class.php b/main/Base/ImageType.class.php
index 9565e9aec0..94864407ce 100644
--- a/main/Base/ImageType.class.php
+++ b/main/Base/ImageType.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	final class ImageType extends Enumeration
 	{
 		const IMAGETYPE_PJPEG	= 100;
diff --git a/main/Base/ImmutableObjectComparator.class.php b/main/Base/ImmutableObjectComparator.class.php
index b898ba8c95..42f4b4425b 100644
--- a/main/Base/ImmutableObjectComparator.class.php
+++ b/main/Base/ImmutableObjectComparator.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ImmutableObjectComparator extends Singleton
 		implements Comparator, Instantiatable
 	{
@@ -19,8 +21,8 @@ public static function me()
 
 		public function compare($one, $two)
 		{
-			Assert::isInstance($one, 'Identifiable');
-			Assert::isInstance($two, 'Identifiable');
+			Assert::isInstance($one, '\Onphp\Identifiable');
+			Assert::isInstance($two, '\Onphp\Identifiable');
 
 			$oneId = $one->getId();
 			$twoId = $two->getId();
diff --git a/main/Base/InnerMetaProperty.class.php b/main/Base/InnerMetaProperty.class.php
index 0c8a776b86..a2e1aa190d 100644
--- a/main/Base/InnerMetaProperty.class.php
+++ b/main/Base/InnerMetaProperty.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	final class InnerMetaProperty extends LightMetaProperty
 	{
 		/**
-		 * @return InnerMetaProperty
+		 * @return \Onphp\InnerMetaProperty
 		**/
 		public static function create()
 		{
@@ -39,7 +41,7 @@ public function fillMapping(array $mapping)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function fillForm(Form $form, $prefix = null)
 		{
@@ -75,7 +77,7 @@ public function toValue(ProtoDAO $dao = null, $array, $prefix = null)
 			
 			return $proto->completeObject(
 				$proto->makeOnlyObject(
-					$this->getClassName(), $array, $prefix
+					$this->getClassName(), $array, $prefix, $dao
 				),
 				$array,
 				$prefix
@@ -83,7 +85,7 @@ public function toValue(ProtoDAO $dao = null, $array, $prefix = null)
 		}
 		
 		/**
-		 * @return AbstractProtoClass
+		 * @return \Onphp\AbstractProtoClass
 		**/
 		public function getProto()
 		{
diff --git a/main/Base/IntegerSet.class.php b/main/Base/IntegerSet.class.php
index 76a8907344..9e9020636f 100644
--- a/main/Base/IntegerSet.class.php
+++ b/main/Base/IntegerSet.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	final class IntegerSet extends Range
 	{
 		public static function create(
diff --git a/main/Base/IsoCurrency.class.php b/main/Base/IsoCurrency.class.php
index 14d5e44314..e79a3db6e9 100644
--- a/main/Base/IsoCurrency.class.php
+++ b/main/Base/IsoCurrency.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class IsoCurrency extends Enumeration
 	{
 		const RUB	= 643;
diff --git a/main/Base/LightMetaProperty.class.php b/main/Base/LightMetaProperty.class.php
index e7f5b06998..fd2e89d2d6 100644
--- a/main/Base/LightMetaProperty.class.php
+++ b/main/Base/LightMetaProperty.class.php
@@ -15,6 +15,8 @@
 	 *
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	class LightMetaProperty implements Stringable
 	{
 		const UNSIGNED_FLAG = 0x1000;
@@ -74,7 +76,7 @@ class LightMetaProperty implements Stringable
 		private $identifier	= null;
 		
 		/**
-		 * @return LightMetaProperty
+		 * @return \Onphp\LightMetaProperty
 		**/
 		public static function create()
 		{
@@ -84,7 +86,7 @@ public static function create()
 		/**
 		 * must by in sync with InnerMetaProperty::make()
 		 *
-		 * @return LightMetaProperty
+		 * @return \Onphp\LightMetaProperty
 		**/
 		public static function fill(
 			LightMetaProperty $property,
@@ -169,7 +171,7 @@ public function getDropper()
 		}
 		
 		/**
-		 * @return LightMetaProperty
+		 * @return \Onphp\LightMetaProperty
 		**/
 		public function setColumnName($name)
 		{
@@ -204,7 +206,7 @@ public function isRequired()
 		}
 		
 		/**
-		 * @return LightMetaProperty
+		 * @return \Onphp\LightMetaProperty
 		**/
 		public function setRequired($yrly)
 		{
@@ -234,7 +236,7 @@ public function getFetchStrategyId()
 		}
 		
 		/**
-		 * @return LightMetaProperty
+		 * @return \Onphp\LightMetaProperty
 		**/
 		public function setFetchStrategy(FetchStrategy $strategy)
 		{
@@ -244,7 +246,7 @@ public function setFetchStrategy(FetchStrategy $strategy)
 		}
 		
 		/**
-		 * @return LightMetaProperty
+		 * @return \Onphp\LightMetaProperty
 		**/
 		public function dropFetchStrategy()
 		{
@@ -288,13 +290,13 @@ public function isBuildable($array, $prefix = null)
 		}
 		
 		/**
-		 * @return BasePrimitive
+		 * @return \Onphp\BasePrimitive
 		**/
 		public function makePrimitive($name)
 		{
 			$prm =
 				call_user_func(
-					array('Primitive', $this->type),
+					array('\Onphp\Primitive', $this->type),
 					$name
 				);
 			
@@ -332,7 +334,7 @@ public function fillMapping(array $mapping)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function fillForm(Form $form, $prefix = null)
 		{
@@ -342,7 +344,7 @@ public function fillForm(Form $form, $prefix = null)
 		}
 		
 		/**
-		 * @return InsertOrUpdateQuery
+		 * @return \Onphp\InsertOrUpdateQuery
 		**/
 		public function fillQuery(
 			InsertOrUpdateQuery $query,
@@ -410,7 +412,7 @@ public function toValue(ProtoDAO $dao = null, $array, $prefix = null)
 				return DBPool::getByDao($dao)->getDialect()->unquoteBinary($raw);
 			}
 			
-			if ($this->className == 'HttpUrl') {
+			if ($this->className == '\Onphp\HttpUrl') {
 				return HttpUrl::create()->parse($raw);
 			}
 			
@@ -428,8 +430,8 @@ public function toValue(ProtoDAO $dao = null, $array, $prefix = null)
 				Assert::classExists($this->className);
 				
 				if (
-					!is_subclass_of($this->className, 'Enumeration')
-					&& !is_subclass_of($this->className, 'Enum')
+					!is_subclass_of($this->className, '\Onphp\Enumeration')
+					&& !is_subclass_of($this->className, '\Onphp\Enum')
 				) {
 					$remoteDao = call_user_func(array($this->className, 'dao'));
 					
@@ -474,9 +476,11 @@ public function isIdentifier()
 		
 		final public function toString()
 		{
+			$class = ClassUtils::normalClassName($this);
+			
 			return
-				get_class($this).'::fill('
-				.'new '.get_class($this).'(), '
+				$class.'::fill('
+				.'new '.$class.'(), '
 				."'{$this->name}', "
 				.(
 					($this->columnName <> $this->name)
diff --git a/main/Base/MimeType.class.php b/main/Base/MimeType.class.php
index 52cfb20448..fd27def3e7 100644
--- a/main/Base/MimeType.class.php
+++ b/main/Base/MimeType.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	final class MimeType extends Enum
 	{
 		/*
@@ -779,7 +781,7 @@ final class MimeType extends Enum
 		);
 
 		/**
-		 * @return MimeType
+		 * @return \Onphp\MimeType
 		 */
 		public static function wrap($id)
 		{
@@ -790,8 +792,8 @@ public static function wrap($id)
 		/**
 		 * Return MimeType object by mime-type string
 		 * @param string $value
-		 * @throws MissingElementException
-		 * @return MimeType
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\MimeType
 		 */
 		public static function getByMimeType($value)
 		{
@@ -807,8 +809,8 @@ public static function getByMimeType($value)
 		/**
 		 * Return MimeType object by extension without [dot] prefix
 		 * @param string $value
-		 * @throws MissingElementException
-		 * @return MimeType
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\MimeType
 		 */
 		public static function getByExtension($value)
 		{
@@ -833,7 +835,7 @@ public static function getExtensionList()
 
 		/**
 		 * Return extension without [dot] prefix.
-		 * @throws MissingElementException
+		 * @throws \Onphp\MissingElementException
 		 * @return string
 		 */
 		public function getExtension()
diff --git a/main/Base/NamedTree.class.php b/main/Base/NamedTree.class.php
index e80e0272d9..5e91c7e66d 100644
--- a/main/Base/NamedTree.class.php
+++ b/main/Base/NamedTree.class.php
@@ -14,12 +14,14 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	abstract class NamedTree extends NamedObject
 	{
 		private $parent	= null;
 		
 		/**
-		 * @return NamedTree
+		 * @return \Onphp\NamedTree
 		**/
 		public function getParent()
 		{
@@ -27,7 +29,7 @@ public function getParent()
 		}
 		
 		/**
-		 * @return NamedTree
+		 * @return \Onphp\NamedTree
 		**/
 		public function setParent(NamedTree $parent)
 		{
@@ -39,7 +41,7 @@ public function setParent(NamedTree $parent)
 		}
 		
 		/**
-		 * @return NamedTree
+		 * @return \Onphp\NamedTree
 		**/
 		public function dropParent()
 		{
@@ -49,7 +51,7 @@ public function dropParent()
 		}
 		
 		/**
-		 * @return NamedTree
+		 * @return \Onphp\NamedTree
 		**/
 		public function getRoot()
 		{
diff --git a/main/Base/Range.class.php b/main/Base/Range.class.php
index 7998061729..e8cf4566a0 100644
--- a/main/Base/Range.class.php
+++ b/main/Base/Range.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	class Range extends BaseRange
 	{
 		public function __construct($min = null, $max = null)
@@ -28,7 +30,7 @@ public function __construct($min = null, $max = null)
 		}
 		
 		/**
-		 * @return Range
+		 * @return \Onphp\Range
 		**/
 		public static function create($min = null, $max = null)
 		{
@@ -36,8 +38,8 @@ public static function create($min = null, $max = null)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return Range
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\Range
 		**/
 		public function setMin($min = null)
 		{
@@ -50,8 +52,8 @@ public function setMin($min = null)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return Range
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\Range
 		**/
 		public function setMax($max = null)
 		{
diff --git a/main/Base/RequestType.class.php b/main/Base/RequestType.class.php
index 3cda4007d2..73469be768 100644
--- a/main/Base/RequestType.class.php
+++ b/main/Base/RequestType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	final class RequestType extends Enumeration
 	{
 		const GET		= 1;
@@ -33,7 +35,7 @@ final class RequestType extends Enumeration
 		);
 		
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		public function setId($id)
 		{
@@ -43,7 +45,7 @@ public function setId($id)
 		}
 		
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		public static function get()
 		{
@@ -51,7 +53,7 @@ public static function get()
 		}
 		
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		public static function post()
 		{
@@ -59,7 +61,7 @@ public static function post()
 		}
 		
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		public static function files()
 		{
@@ -67,7 +69,7 @@ public static function files()
 		}
 		
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		public static function cookie()
 		{
@@ -75,7 +77,7 @@ public static function cookie()
 		}
 		
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		public static function session()
 		{
@@ -83,7 +85,7 @@ public static function session()
 		}
 
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		public static function attached()
 		{
@@ -91,7 +93,7 @@ public static function attached()
 		}
 		
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		public static function server()
 		{
@@ -99,7 +101,7 @@ public static function server()
 		}
 		
 		/**
-		 * @return RequestType
+		 * @return \Onphp\RequestType
 		**/
 		private static function getInstance($id)
 		{
diff --git a/main/Base/SerializedObjectComparator.class.php b/main/Base/SerializedObjectComparator.class.php
index e7dba2681f..e869db2412 100644
--- a/main/Base/SerializedObjectComparator.class.php
+++ b/main/Base/SerializedObjectComparator.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class SerializedObjectComparator extends Singleton
 		implements Comparator, Instantiatable
 	{
diff --git a/main/Base/SingleRange.class.php b/main/Base/SingleRange.class.php
index 1d5fba6de4..ff86231d91 100644
--- a/main/Base/SingleRange.class.php
+++ b/main/Base/SingleRange.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	interface SingleRange
 	{
 		public function getStart();
diff --git a/main/Base/StandardComparator.class.php b/main/Base/StandardComparator.class.php
index e596764a96..39c9efbf55 100644
--- a/main/Base/StandardComparator.class.php
+++ b/main/Base/StandardComparator.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class StandardComparator extends Singleton
 		implements Comparator, Instantiatable
 	{
diff --git a/main/Base/TempDirectory.class.php b/main/Base/TempDirectory.class.php
index 2a427932b7..23b026757e 100644
--- a/main/Base/TempDirectory.class.php
+++ b/main/Base/TempDirectory.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class TempDirectory
 	{
 		private $path = null;
diff --git a/main/Base/TempFile.class.php b/main/Base/TempFile.class.php
index 414dab8332..6363ee9ee3 100644
--- a/main/Base/TempFile.class.php
+++ b/main/Base/TempFile.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class TempFile
 	{
 		private $path = null;
diff --git a/main/Base/TimestampRange.class.php b/main/Base/TimestampRange.class.php
index 2d1466df25..c06bf88e2a 100644
--- a/main/Base/TimestampRange.class.php
+++ b/main/Base/TimestampRange.class.php
@@ -15,10 +15,12 @@
 	 * 
 	 * @ingroup Helpers
 	**/
+	namespace Onphp;
+
 	class TimestampRange extends DateRange
 	{
 		/**
-		 * @return TimestampRange
+		 * @return \Onphp\TimestampRange
 		**/
 		public static function create($start = null, $end = null)
 		{
@@ -44,7 +46,7 @@ public function getEndStamp() // null if end is null
 		}
 		
 		/**
-		 * @return TimestampRange
+		 * @return \Onphp\TimestampRange
 		**/
 		public function toTimestampRange()
 		{
@@ -53,7 +55,7 @@ public function toTimestampRange()
 		
 		protected function getObjectName()
 		{
-			return 'Timestamp';
+			return '\Onphp\Timestamp';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/main/Base/TransparentFile.class.php b/main/Base/TransparentFile.class.php
index 32710cdc1d..54d6c2f1b2 100644
--- a/main/Base/TransparentFile.class.php
+++ b/main/Base/TransparentFile.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class TransparentFile
 	{
 		private $path		= null;
@@ -17,7 +19,7 @@ final class TransparentFile
 		private $tempFile	= null;
 		
 		/**
-		 * @return TransparentFile
+		 * @return \Onphp\TransparentFile
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return TransparentFile
+		 * @return \Onphp\TransparentFile
 		**/
 		public function setPath($path)
 		{
@@ -56,7 +58,7 @@ public function getPath()
 		}
 		
 		/**
-		 * @return TransparentFile
+		 * @return \Onphp\TransparentFile
 		**/
 		public function setRawData($rawData)
 		{
diff --git a/main/Charts/Google/BaseGoogleChartData.class.php b/main/Charts/Google/BaseGoogleChartData.class.php
index c1fe60197b..dc81b044a5 100644
--- a/main/Charts/Google/BaseGoogleChartData.class.php
+++ b/main/Charts/Google/BaseGoogleChartData.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	abstract class BaseGoogleChartData extends BaseGoogleChartParameter
 	{
 		protected $encoding = null;
 		
 		/**
-		 * @return BaseGoogleChartData
+		 * @return \Onphp\BaseGoogleChartData
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return BaseGoogleChartData
+		 * @return \Onphp\BaseGoogleChartData
 		**/
 		public function setEncoding(GoogleChartDataEncoding $encoding)
 		{
diff --git a/main/Charts/Google/BaseGoogleChartDataEncoding.class.php b/main/Charts/Google/BaseGoogleChartDataEncoding.class.php
index a920848408..92b2b9ddfc 100644
--- a/main/Charts/Google/BaseGoogleChartDataEncoding.class.php
+++ b/main/Charts/Google/BaseGoogleChartDataEncoding.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	abstract class BaseGoogleChartDataEncoding
 		extends BaseGoogleChartParameter
 		implements GoogleChartDataEncoding
@@ -20,7 +22,7 @@ abstract class BaseGoogleChartDataEncoding
 		protected $delimiter = null;
 		
 		/**
-		 * @return BaseGoogleChartDataEncoding
+		 * @return \Onphp\BaseGoogleChartDataEncoding
 		**/
 		public function setMaxValue($maxValue)
 		{
diff --git a/main/Charts/Google/BaseGoogleChartLabelStyleType.class.php b/main/Charts/Google/BaseGoogleChartLabelStyleType.class.php
index b55d19d112..56a825ee36 100644
--- a/main/Charts/Google/BaseGoogleChartLabelStyleType.class.php
+++ b/main/Charts/Google/BaseGoogleChartLabelStyleType.class.php
@@ -14,6 +14,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	abstract class BaseGoogleChartLabelStyleType
 	{
 		protected $name = null;
diff --git a/main/Charts/Google/BaseGoogleChartParameter.class.php b/main/Charts/Google/BaseGoogleChartParameter.class.php
index f7f4afd263..6a39a2c050 100644
--- a/main/Charts/Google/BaseGoogleChartParameter.class.php
+++ b/main/Charts/Google/BaseGoogleChartParameter.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	abstract class BaseGoogleChartParameter implements Stringable
 	{
 		protected $name = null;
 		
 		/**
-		 * @return BaseGoogleChartParameter
+		 * @return \Onphp\BaseGoogleChartParameter
 		**/
 		public function setName($name)
 		{
diff --git a/main/Charts/Google/BaseGoogleChartStyle.class.php b/main/Charts/Google/BaseGoogleChartStyle.class.php
index 866bcb9635..f0023e41b4 100644
--- a/main/Charts/Google/BaseGoogleChartStyle.class.php
+++ b/main/Charts/Google/BaseGoogleChartStyle.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	abstract class BaseGoogleChartStyle extends BaseGoogleChartParameter
 	{
 		protected $styles = array();
 		
 		/**
-		 * @return BaseGoogleChartStyle
+		 * @return \Onphp\BaseGoogleChartStyle
 		**/
 		public function addStyle($style)
 		{
diff --git a/main/Charts/Google/ChartLabelStyle.class.php b/main/Charts/Google/ChartLabelStyle.class.php
index f6f0c3a47b..fc6e85d17f 100644
--- a/main/Charts/Google/ChartLabelStyle.class.php
+++ b/main/Charts/Google/ChartLabelStyle.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class ChartLabelStyle
 	{
 		private $type			= null;
@@ -21,7 +23,7 @@ final class ChartLabelStyle
 		private $dataPoint		= null;
 		
 		/**
-		 * @return ChartLabelStyle
+		 * @return \Onphp\ChartLabelStyle
 		**/
 		public static function create()
 		{
@@ -37,7 +39,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return ChartLabelStyle
+		 * @return \Onphp\ChartLabelStyle
 		**/
 		public function setType(BaseGoogleChartLabelStyleType $type)
 		{
@@ -47,7 +49,7 @@ public function setType(BaseGoogleChartLabelStyleType $type)
 		}
 		
 		/**
-		 * @return BaseGoogleChartLabelStyleType
+		 * @return \Onphp\BaseGoogleChartLabelStyleType
 		**/
 		public function getType()
 		{
@@ -55,7 +57,7 @@ public function getType()
 		}
 		
 		/**
-		 * @return ChartLabelStyle
+		 * @return \Onphp\ChartLabelStyle
 		**/
 		public function setColor(Color $color)
 		{
@@ -65,7 +67,7 @@ public function setColor(Color $color)
 		}
 		
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public function getColor()
 		{
diff --git a/main/Charts/Google/ChartLineStyle.class.php b/main/Charts/Google/ChartLineStyle.class.php
index 300170272f..14ba92fb45 100644
--- a/main/Charts/Google/ChartLineStyle.class.php
+++ b/main/Charts/Google/ChartLineStyle.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class ChartLineStyle
 	{
 		private $thickness 			= 1;
@@ -19,7 +21,7 @@ final class ChartLineStyle
 		private $blankSegmentLength = 0;
 		
 		/**
-		 * @return ChartLineStyle
+		 * @return \Onphp\ChartLineStyle
 		**/
 		public static function create()
 		{
@@ -27,7 +29,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return ChartLineStyle
+		 * @return \Onphp\ChartLineStyle
 		**/
 		public function setThickness($size)
 		{
@@ -42,7 +44,7 @@ public function getThickness()
 		}
 		
 		/**
-		 * @return ChartLineStyle
+		 * @return \Onphp\ChartLineStyle
 		**/
 		public function setLineSegmentLength($length)
 		{
@@ -57,7 +59,7 @@ public function getLineSegmentLength()
 		}
 		
 		/**
-		 * @return ChartLineStyle
+		 * @return \Onphp\ChartLineStyle
 		**/
 		public function setBlankSegmentLength($length)
 		{
diff --git a/main/Charts/Google/GoogleChart.class.php b/main/Charts/Google/GoogleChart.class.php
index 9c507a967f..e71e1a117f 100644
--- a/main/Charts/Google/GoogleChart.class.php
+++ b/main/Charts/Google/GoogleChart.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	class GoogleChart implements Stringable
 	{
 		const BASE_URL = 'http://chart.apis.google.com/chart?';
@@ -26,7 +28,7 @@ class GoogleChart implements Stringable
 		protected $fillers	= null;
 		
 		/**
-		 * @return GoogleChart
+		 * @return \Onphp\GoogleChart
 		**/
 		public static function create()
 		{
@@ -39,7 +41,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return GoogleChart
+		 * @return \Onphp\GoogleChart
 		**/
 		public function setColor(GoogleChartColor $color)
 		{
@@ -49,7 +51,7 @@ public function setColor(GoogleChartColor $color)
 		}
 		
 		/**
-		 * @return GoogleChart
+		 * @return \Onphp\GoogleChart
 		**/
 		public function setSize(GoogleChartSize $size)
 		{
@@ -59,7 +61,7 @@ public function setSize(GoogleChartSize $size)
 		}
 		
 		/**
-		 * @return GoogleChart
+		 * @return \Onphp\GoogleChart
 		**/
 		public function setType(GoogleChartType $type)
 		{
@@ -69,7 +71,7 @@ public function setType(GoogleChartType $type)
 		}
 		
 		/**
-		 * @return GoogleChart
+		 * @return \Onphp\GoogleChart
 		**/
 		public function setLabel(GoogleChartLabel $label)
 		{
@@ -79,7 +81,7 @@ public function setLabel(GoogleChartLabel $label)
 		}
 		
 		/**
-		 * @return GoogleChart
+		 * @return \Onphp\GoogleChart
 		**/
 		public function setData(GoogleChartData $data)
 		{
@@ -94,7 +96,7 @@ public function getData()
 		}
 		
 		/**
-		 * @return GoogleChart
+		 * @return \Onphp\GoogleChart
 		**/
 		public function setLegend(GoogleChartLegend $legend)
 		{
@@ -104,7 +106,7 @@ public function setLegend(GoogleChartLegend $legend)
 		}
 		
 		/**
-		 * @return GoogleChart
+		 * @return \Onphp\GoogleChart
 		**/
 		public function setTitle($title)
 		{
diff --git a/main/Charts/Google/GoogleChartAxis.class.php b/main/Charts/Google/GoogleChartAxis.class.php
index 45c8742520..a1cefb8920 100644
--- a/main/Charts/Google/GoogleChartAxis.class.php
+++ b/main/Charts/Google/GoogleChartAxis.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartAxis
 	{
 		private $type = null;
@@ -23,7 +25,7 @@ final class GoogleChartAxis
 		private $interval = null;
 		
 		/**
-		 * @return GoogleChartAxis
+		 * @return \Onphp\GoogleChartAxis
 		**/
 		public static function create(GoogleChartAxisType $type)
 		{
@@ -36,7 +38,7 @@ public function __construct(GoogleChartAxisType $type)
 		}
 		
 		/**
-		 * @return GoogleChartAxisType
+		 * @return \Onphp\GoogleChartAxisType
 		**/
 		public function getType()
 		{
@@ -44,7 +46,7 @@ public function getType()
 		}
 		
 		/**
-		 * @return GoogleChartAxis
+		 * @return \Onphp\GoogleChartAxis
 		**/
 		public function setRange(BaseRange $range)
 		{
@@ -59,7 +61,7 @@ public function hasRange()
 		}
 		
 		/**
-		 * @return IntegerSet
+		 * @return \Onphp\IntegerSet
 		**/
 		public function getRange()
 		{
@@ -67,7 +69,7 @@ public function getRange()
 		}
 		
 		/**
-		 * @return GoogleChartAxis
+		 * @return \Onphp\GoogleChartAxis
 		**/
 		public function setLabel(GoogleChartAxisLabel $label)
 		{
@@ -77,7 +79,7 @@ public function setLabel(GoogleChartAxisLabel $label)
 		}
 		
 		/**
-		 * @return GoogleChartAxisLabel
+		 * @return \Onphp\GoogleChartAxisLabel
 		**/
 		public function getLabel()
 		{
@@ -85,7 +87,7 @@ public function getLabel()
 		}
 		
 		/**
-		 * @return GoogleChartAxis
+		 * @return \Onphp\GoogleChartAxis
 		**/
 		public function setInterval($interval)
 		{
diff --git a/main/Charts/Google/GoogleChartAxisCollection.class.php b/main/Charts/Google/GoogleChartAxisCollection.class.php
index 66186ca8e9..4ebf127704 100644
--- a/main/Charts/Google/GoogleChartAxisCollection.class.php
+++ b/main/Charts/Google/GoogleChartAxisCollection.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartAxisCollection
 	{
 		private $axes = array();
 		
 		/**
-		 * @return GoogleChartAxisCollection
+		 * @return \Onphp\GoogleChartAxisCollection
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartAxisCollection
+		 * @return \Onphp\GoogleChartAxisCollection
 		**/
 		public function addAxis(GoogleChartAxis $axis)
 		{
@@ -40,7 +42,7 @@ public function addAxis(GoogleChartAxis $axis)
 		}
 		
 		/**
-		 * @return GoogleChartAxis
+		 * @return \Onphp\GoogleChartAxis
 		**/
 		public function getAxisByTypeId($typeId)
 		{
diff --git a/main/Charts/Google/GoogleChartAxisLabel.class.php b/main/Charts/Google/GoogleChartAxisLabel.class.php
index 1f5fb7174b..a1ca893814 100644
--- a/main/Charts/Google/GoogleChartAxisLabel.class.php
+++ b/main/Charts/Google/GoogleChartAxisLabel.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartAxisLabel extends GoogleChartLabel
 	{
 		protected static $paramName = 'chxl';
 		
 		/**
-		 * @return GoogleChartLabel
+		 * @return \Onphp\GoogleChartLabel
 		**/
 		public static function create()
 		{
diff --git a/main/Charts/Google/GoogleChartAxisType.class.php b/main/Charts/Google/GoogleChartAxisType.class.php
index b3c9402d68..37af8aae03 100644
--- a/main/Charts/Google/GoogleChartAxisType.class.php
+++ b/main/Charts/Google/GoogleChartAxisType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartAxisType extends Enumeration
 	{
 		const X	= 0x1;
diff --git a/main/Charts/Google/GoogleChartColor.class.php b/main/Charts/Google/GoogleChartColor.class.php
index 4d9cca9119..c60ff982f2 100644
--- a/main/Charts/Google/GoogleChartColor.class.php
+++ b/main/Charts/Google/GoogleChartColor.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartColor extends BaseGoogleChartParameter
 	{
 		protected $name = 'chco';
@@ -19,7 +21,7 @@ final class GoogleChartColor extends BaseGoogleChartParameter
 		private $colors = array();
 		
 		/**
-		 * @return GoogleChartColor
+		 * @return \Onphp\GoogleChartColor
 		**/
 		public static function create()
 		{
@@ -27,7 +29,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartColor
+		 * @return \Onphp\GoogleChartColor
 		**/
 		public function addColor(Color $color)
 		{
diff --git a/main/Charts/Google/GoogleChartData.class.php b/main/Charts/Google/GoogleChartData.class.php
index f2a8b8f87e..827502ccc2 100644
--- a/main/Charts/Google/GoogleChartData.class.php
+++ b/main/Charts/Google/GoogleChartData.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartData extends BaseGoogleChartData
 	{
 		protected $name = 'chd';
@@ -23,7 +25,7 @@ final class GoogleChartData extends BaseGoogleChartData
 		private $normalize = false;
 		
 		/**
-		 * @return GoogleChartData
+		 * @return \Onphp\GoogleChartData
 		**/
 		public static function create()
 		{
@@ -31,7 +33,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartData
+		 * @return \Onphp\GoogleChartData
 		**/
 		public function setDataScaling($scale = true)
 		{
@@ -46,7 +48,7 @@ public function withDataScaling()
 		}
 		
 		/**
-		 * @return GoogleChartData
+		 * @return \Onphp\GoogleChartData
 		**/
 		public function setNormalize($orly = true)
 		{
@@ -61,7 +63,7 @@ public function isNormalized()
 		}
 		
 		/**
-		 * @return GoogleChartData
+		 * @return \Onphp\GoogleChartData
 		**/
 		public function addDataSet(GoogleChartDataSet $set)
 		{
@@ -130,7 +132,7 @@ public function getMaxSteps()
 		}
 		
 		/**
-		 * @return GoogleChartData
+		 * @return \Onphp\GoogleChartData
 		**/
 		private function normalize()
 		{
diff --git a/main/Charts/Google/GoogleChartDataEncoding.class.php b/main/Charts/Google/GoogleChartDataEncoding.class.php
index 9da6910567..fa45e065a8 100644
--- a/main/Charts/Google/GoogleChartDataEncoding.class.php
+++ b/main/Charts/Google/GoogleChartDataEncoding.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	interface GoogleChartDataEncoding
 	{
 		public function encode(GoogleChartDataSet $set);
diff --git a/main/Charts/Google/GoogleChartDataRange.class.php b/main/Charts/Google/GoogleChartDataRange.class.php
index 6d2bc8bd45..9f00ad9ee4 100644
--- a/main/Charts/Google/GoogleChartDataRange.class.php
+++ b/main/Charts/Google/GoogleChartDataRange.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartDataRange
 	{
 		private static $paramName = 'chxr';
diff --git a/main/Charts/Google/GoogleChartDataScaling.class.php b/main/Charts/Google/GoogleChartDataScaling.class.php
index 723c3eb2f2..c9c77c7d20 100644
--- a/main/Charts/Google/GoogleChartDataScaling.class.php
+++ b/main/Charts/Google/GoogleChartDataScaling.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartDataScaling
 	{
 		private static $paramName = 'chds';
diff --git a/main/Charts/Google/GoogleChartDataSet.class.php b/main/Charts/Google/GoogleChartDataSet.class.php
index e1e2d16b6a..286b58edc6 100644
--- a/main/Charts/Google/GoogleChartDataSet.class.php
+++ b/main/Charts/Google/GoogleChartDataSet.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartDataSet
 	{
 		private $data = array();
@@ -21,7 +23,7 @@ final class GoogleChartDataSet
 		private $base = null;
 		
 		/**
-		 * @return GoogleChartDataSet
+		 * @return \Onphp\GoogleChartDataSet
 		**/
 		public static function create()
 		{
@@ -34,7 +36,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return GoogleChartDataSet
+		 * @return \Onphp\GoogleChartDataSet
 		**/
 		public function setData(array $data)
 		{
@@ -49,7 +51,7 @@ public function getData()
 		}
 		
 		/**
-		 * @return GoogleChartDataSet
+		 * @return \Onphp\GoogleChartDataSet
 		**/
 		public function addElement($element)
 		{
@@ -59,7 +61,7 @@ public function addElement($element)
 		}
 		
 		/**
-		 * @return GoogleChartDataSet
+		 * @return \Onphp\GoogleChartDataSet
 		**/
 		public function setBase($base)
 		{
@@ -117,7 +119,7 @@ public function getStepSize()
 		}
 		
 		/**
-		 * @return GoogleChartDataSet
+		 * @return \Onphp\GoogleChartDataSet
 		**/
 		private function calculateMax()
 		{
diff --git a/main/Charts/Google/GoogleChartDataSimpleEncoding.class.php b/main/Charts/Google/GoogleChartDataSimpleEncoding.class.php
index 71f65c3722..9472426522 100644
--- a/main/Charts/Google/GoogleChartDataSimpleEncoding.class.php
+++ b/main/Charts/Google/GoogleChartDataSimpleEncoding.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartDataSimpleEncoding
 		extends BaseGoogleChartDataEncoding
 	{
@@ -21,7 +23,7 @@ final class GoogleChartDataSimpleEncoding
 		private $length = null;
 		
 		/**
-		 * @return GoogleChartDataSimpleEncoding
+		 * @return \Onphp\GoogleChartDataSimpleEncoding
 		**/
 		public static function create()
 		{
diff --git a/main/Charts/Google/GoogleChartDataTextEncoding.class.php b/main/Charts/Google/GoogleChartDataTextEncoding.class.php
index 91798455c9..965036466f 100644
--- a/main/Charts/Google/GoogleChartDataTextEncoding.class.php
+++ b/main/Charts/Google/GoogleChartDataTextEncoding.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartDataTextEncoding
 		extends BaseGoogleChartDataEncoding
 		implements GoogleChartDataEncoding
@@ -20,7 +22,7 @@ final class GoogleChartDataTextEncoding
 		protected $delimiter = ',';
 		
 		/**
-		 * @return GoogleChartDataTextEncoding
+		 * @return \Onphp\GoogleChartDataTextEncoding
 		**/
 		public static function create()
 		{
diff --git a/main/Charts/Google/GoogleChartGrid.class.php b/main/Charts/Google/GoogleChartGrid.class.php
index 875a549b09..8dc763cb4d 100644
--- a/main/Charts/Google/GoogleChartGrid.class.php
+++ b/main/Charts/Google/GoogleChartGrid.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartGrid extends BaseGoogleChartParameter
 	{
 		protected $name = 'chg';
@@ -21,7 +23,7 @@ final class GoogleChartGrid extends BaseGoogleChartParameter
 		private $lineSegmentLength 	= 0;
 		
 		/**
-		 * @return GoogleChartGrid
+		 * @return \Onphp\GoogleChartGrid
 		**/
 		public static function create()
 		{
@@ -29,7 +31,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartGrid
+		 * @return \Onphp\GoogleChartGrid
 		**/
 		public function setHorizontalStepSize($size)
 		{
@@ -44,7 +46,7 @@ public function getHorizontalStepSize()
 		}
 		
 		/**
-		 * @return GoogleChartGrid
+		 * @return \Onphp\GoogleChartGrid
 		**/
 		public function setVerticalStepSize($size)
 		{
@@ -59,7 +61,7 @@ public function getVerticalStepSize()
 		}
 		
 		/**
-		 * @return GoogleChartGrid
+		 * @return \Onphp\GoogleChartGrid
 		**/
 		public function setLineSegmentLength($length)
 		{
diff --git a/main/Charts/Google/GoogleChartLabel.class.php b/main/Charts/Google/GoogleChartLabel.class.php
index 901220e9cc..0d33049df2 100644
--- a/main/Charts/Google/GoogleChartLabel.class.php
+++ b/main/Charts/Google/GoogleChartLabel.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	class GoogleChartLabel extends BaseGoogleChartParameter
 	{
 		protected $name = 'chl';
@@ -19,7 +21,7 @@ class GoogleChartLabel extends BaseGoogleChartParameter
 		protected $labels = array();
 		
 		/**
-		 * @return GoogleChartLabel
+		 * @return \Onphp\GoogleChartLabel
 		**/
 		public static function create()
 		{
@@ -27,7 +29,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartLabel
+		 * @return \Onphp\GoogleChartLabel
 		**/
 		public function addLabel($label)
 		{
@@ -37,7 +39,7 @@ public function addLabel($label)
 		}
 		
 		/**
-		 * @return GoogleChartLabel
+		 * @return \Onphp\GoogleChartLabel
 		**/
 		public function setLabels($labels)
 		{
diff --git a/main/Charts/Google/GoogleChartLabelStyle.class.php b/main/Charts/Google/GoogleChartLabelStyle.class.php
index 9d934555fd..2691b8e68d 100644
--- a/main/Charts/Google/GoogleChartLabelStyle.class.php
+++ b/main/Charts/Google/GoogleChartLabelStyle.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartLabelStyle extends BaseGoogleChartStyle
 	{
 		protected $name = 'chm';
 		
 		/**
-		 * @return GoogleChartLabelStyle
+		 * @return \Onphp\GoogleChartLabelStyle
 		**/
 		public static function create()
 		{
@@ -25,11 +27,11 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartLineStyle
+		 * @return \Onphp\GoogleChartLineStyle
 		**/
 		public function addStyle($style)
 		{
-			Assert::isInstance($style, 'ChartLabelStyle');
+			Assert::isInstance($style, '\Onphp\ChartLabelStyle');
 			
 			return parent::addStyle($style);
 		}
diff --git a/main/Charts/Google/GoogleChartLabelStyleNumberType.class.php b/main/Charts/Google/GoogleChartLabelStyleNumberType.class.php
index 82d2abe9e3..73a578543d 100644
--- a/main/Charts/Google/GoogleChartLabelStyleNumberType.class.php
+++ b/main/Charts/Google/GoogleChartLabelStyleNumberType.class.php
@@ -14,6 +14,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartLabelStyleNumberType
 		extends BaseGoogleChartLabelStyleType
 	{
@@ -25,7 +27,7 @@ final class GoogleChartLabelStyleNumberType
 		
 		
 		/**
-		 * @return GoogleChartLabelStyleNumberType
+		 * @return \Onphp\GoogleChartLabelStyleNumberType
 		**/
 		public static function create()
 		{
@@ -38,7 +40,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return GoogleChartLabelStyleNumberType
+		 * @return \Onphp\GoogleChartLabelStyleNumberType
 		**/
 		public function setPrecisionLevel($level)
 		{
@@ -53,7 +55,7 @@ public function getPrecisionLevel()
 		}
 		
 		/**
-		 * @return GoogleChartLabelStyleNumberType
+		 * @return \Onphp\GoogleChartLabelStyleNumberType
 		**/
 		public function setType(LabelStyleType $type)
 		{
@@ -63,7 +65,7 @@ public function setType(LabelStyleType $type)
 		}
 		
 		/**
-		 * @return LabelStyleType
+		 * @return \Onphp\LabelStyleType
 		**/
 		public function getType()
 		{
@@ -71,7 +73,7 @@ public function getType()
 		}
 		
 		/**
-		 * @return GoogleChartLabelStyleNumberType
+		 * @return \Onphp\GoogleChartLabelStyleNumberType
 		**/
 		public function setWithTrailingZero($orly = true)
 		{
diff --git a/main/Charts/Google/GoogleChartLegend.class.php b/main/Charts/Google/GoogleChartLegend.class.php
index 5a03869da2..7071e8668d 100644
--- a/main/Charts/Google/GoogleChartLegend.class.php
+++ b/main/Charts/Google/GoogleChartLegend.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartLegend extends BaseGoogleChartParameter
 	{
 		protected $name = 'chdl';
@@ -20,7 +22,7 @@ final class GoogleChartLegend extends BaseGoogleChartParameter
 		private $position = null;
 		
 		/**
-		 * @return GoogleChartLegend
+		 * @return \Onphp\GoogleChartLegend
 		**/
 		public static function create()
 		{
@@ -36,7 +38,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return GoogleChartLegend
+		 * @return \Onphp\GoogleChartLegend
 		**/
 		public function setPosition(GoogleChartLegendPositionType $type)
 		{
@@ -46,7 +48,7 @@ public function setPosition(GoogleChartLegendPositionType $type)
 		}
 		
 		/**
-		 * @return GoogleChartLegend
+		 * @return \Onphp\GoogleChartLegend
 		**/
 		public function addItem($item)
 		{
diff --git a/main/Charts/Google/GoogleChartLegendPositionType.class.php b/main/Charts/Google/GoogleChartLegendPositionType.class.php
index c6b459a549..4d167f3f16 100644
--- a/main/Charts/Google/GoogleChartLegendPositionType.class.php
+++ b/main/Charts/Google/GoogleChartLegendPositionType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartLegendPositionType extends Enumeration
 	{
 		const BOTTOM	= 0x1;
@@ -29,7 +31,7 @@ final class GoogleChartLegendPositionType extends Enumeration
 		private $paramName = 'chdlp';
 		
 		/**
-		 * @return GoogleChartLegendPositionType
+		 * @return \Onphp\GoogleChartLegendPositionType
 		**/
 		public static function create($id)
 		{
diff --git a/main/Charts/Google/GoogleChartLine.class.php b/main/Charts/Google/GoogleChartLine.class.php
index d8b2733a1f..803bca277f 100644
--- a/main/Charts/Google/GoogleChartLine.class.php
+++ b/main/Charts/Google/GoogleChartLine.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartLine extends GoogleChartPiece
 	{
 		private $style 		= null;
 		private $labelStyle = null;
 		
 		/**
-		 * @return GoogleChartLine
+		 * @return \Onphp\GoogleChartLine
 		**/
 		public static function create()
 		{
@@ -26,7 +28,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartLine
+		 * @return \Onphp\GoogleChartLine
 		**/
 		public function setValue(/* GoogleChartDataSet */ $value)
 		{
@@ -34,7 +36,7 @@ public function setValue(/* GoogleChartDataSet */ $value)
 		}
 		
 		/**
-		 * @return GoogleChartLine
+		 * @return \Onphp\GoogleChartLine
 		**/
 		public function setStyle(ChartLineStyle $style)
 		{
@@ -44,7 +46,7 @@ public function setStyle(ChartLineStyle $style)
 		}
 		
 		/**
-		 * @return ChartLineStyle
+		 * @return \Onphp\ChartLineStyle
 		**/
 		public function getStyle()
 		{
@@ -52,7 +54,7 @@ public function getStyle()
 		}
 		
 		/**
-		 * @return GoogleChartLine
+		 * @return \Onphp\GoogleChartLine
 		**/
 		public function setLabelStyle(ChartLabelStyle $style)
 		{
@@ -62,7 +64,7 @@ public function setLabelStyle(ChartLabelStyle $style)
 		}
 		
 		/**
-		 * @return GoogleChartLabelStyle
+		 * @return \Onphp\GoogleChartLabelStyle
 		**/
 		public function getLabelStyle()
 		{
diff --git a/main/Charts/Google/GoogleChartLineStyle.class.php b/main/Charts/Google/GoogleChartLineStyle.class.php
index 97f714070b..958afab7fb 100644
--- a/main/Charts/Google/GoogleChartLineStyle.class.php
+++ b/main/Charts/Google/GoogleChartLineStyle.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartLineStyle extends BaseGoogleChartStyle
 	{
 		protected $name = 'chls';
 		
 		/**
-		 * @return GoogleChartLineStyle
+		 * @return \Onphp\GoogleChartLineStyle
 		**/
 		public static function create()
 		{
@@ -25,11 +27,11 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartLineStyle
+		 * @return \Onphp\GoogleChartLineStyle
 		**/
 		public function addStyle($style)
 		{
-			Assert::isInstance($style, 'ChartLineStyle');
+			Assert::isInstance($style, '\Onphp\ChartLineStyle');
 			
 			return parent::addStyle($style);
 		}
diff --git a/main/Charts/Google/GoogleChartPiece.class.php b/main/Charts/Google/GoogleChartPiece.class.php
index 046045c1d1..6670326189 100644
--- a/main/Charts/Google/GoogleChartPiece.class.php
+++ b/main/Charts/Google/GoogleChartPiece.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	class GoogleChartPiece
 	{
 		private $title	= null;
@@ -19,7 +21,7 @@ class GoogleChartPiece
 		private $value	= null;
 		
 		/**
-		 * @return GoogleChartPiece
+		 * @return \Onphp\GoogleChartPiece
 		**/
 		public static function create()
 		{
@@ -27,7 +29,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartPiece
+		 * @return \Onphp\GoogleChartPiece
 		**/
 		public function setTitle($title)
 		{
@@ -42,7 +44,7 @@ public function getTitle()
 		}
 		
 		/**
-		 * @return GoogleChartPiece
+		 * @return \Onphp\GoogleChartPiece
 		**/
 		public function setColor(Color $color)
 		{
@@ -52,7 +54,7 @@ public function setColor(Color $color)
 		}
 		
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public function getColor()
 		{
@@ -60,7 +62,7 @@ public function getColor()
 		}
 		
 		/**
-		 * @return GoogleChartPiece
+		 * @return \Onphp\GoogleChartPiece
 		**/
 		public function setValue($value)
 		{
diff --git a/main/Charts/Google/GoogleChartSize.class.php b/main/Charts/Google/GoogleChartSize.class.php
index 8e78a75023..2358e89846 100644
--- a/main/Charts/Google/GoogleChartSize.class.php
+++ b/main/Charts/Google/GoogleChartSize.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartSize extends BaseGoogleChartParameter
 	{
 		protected $name = 'chs';
@@ -20,7 +22,7 @@ final class GoogleChartSize extends BaseGoogleChartParameter
 		private $height = null;
 		
 		/**
-		 * @return GoogleChartSize
+		 * @return \Onphp\GoogleChartSize
 		**/
 		public static function create()
 		{
@@ -28,7 +30,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleChartSize
+		 * @return \Onphp\GoogleChartSize
 		**/
 		public function setWidth($width)
 		{
@@ -45,7 +47,7 @@ public function getWidth()
 		}
 		
 		/**
-		 * @return GoogleChartSize
+		 * @return \Onphp\GoogleChartSize
 		**/
 		public function setHeight($height)
 		{
diff --git a/main/Charts/Google/GoogleChartSolidFill.class.php b/main/Charts/Google/GoogleChartSolidFill.class.php
index 75a79ee59f..70fe9538f5 100644
--- a/main/Charts/Google/GoogleChartSolidFill.class.php
+++ b/main/Charts/Google/GoogleChartSolidFill.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartSolidFill extends BaseGoogleChartParameter
 	{
 		protected static $paramName = 'chf';
@@ -20,7 +22,7 @@ final class GoogleChartSolidFill extends BaseGoogleChartParameter
 		private $color 	= null;
 		
 		/**
-		 * @return GoogleChartSolidFill
+		 * @return \Onphp\GoogleChartSolidFill
 		**/
 		public static function create(GoogleChartSolidFillType $type)
 		{
@@ -33,7 +35,7 @@ public function __construct(GoogleChartSolidFillType $type)
 		}
 		
 		/**
-		 * @return GoogleChartSolidFill
+		 * @return \Onphp\GoogleChartSolidFill
 		**/
 		public function setColor(Color $color)
 		{
@@ -43,7 +45,7 @@ public function setColor(Color $color)
 		}
 		
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public function getColor()
 		{
diff --git a/main/Charts/Google/GoogleChartSolidFillCollection.class.php b/main/Charts/Google/GoogleChartSolidFillCollection.class.php
index fe94b4de02..07193a840b 100644
--- a/main/Charts/Google/GoogleChartSolidFillCollection.class.php
+++ b/main/Charts/Google/GoogleChartSolidFillCollection.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartSolidFillCollection extends BaseGoogleChartParameter
 	{
 		private $fillers = array();
 		
 		/**
-		 * @return GoogleChartSolidFillCollection
+		 * @return \Onphp\GoogleChartSolidFillCollection
 		**/
 		public static function create()
 		{
diff --git a/main/Charts/Google/GoogleChartSolidFillType.class.php b/main/Charts/Google/GoogleChartSolidFillType.class.php
index 342cd2e4fc..6a27432912 100644
--- a/main/Charts/Google/GoogleChartSolidFillType.class.php
+++ b/main/Charts/Google/GoogleChartSolidFillType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartSolidFillType extends Enumeration
 	{
 		const CHART_AREA		= 0x1;
@@ -25,7 +27,7 @@ final class GoogleChartSolidFillType extends Enumeration
 		);
 		
 		/**
-		 * @return GoogleChartSolidFillType
+		 * @return \Onphp\GoogleChartSolidFillType
 		**/
 		public static function create($id)
 		{
diff --git a/main/Charts/Google/GoogleChartTitle.class.php b/main/Charts/Google/GoogleChartTitle.class.php
index e494784ee7..303b475181 100644
--- a/main/Charts/Google/GoogleChartTitle.class.php
+++ b/main/Charts/Google/GoogleChartTitle.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartTitle extends BaseGoogleChartParameter
 	{
 		protected static $paramName = 'chtt';
@@ -19,7 +21,7 @@ final class GoogleChartTitle extends BaseGoogleChartParameter
 		private $title = null;
 		
 		/**
-		 * @return GoogleChartTitle
+		 * @return \Onphp\GoogleChartTitle
 		**/
 		public static function create($title)
 		{
diff --git a/main/Charts/Google/GoogleChartType.class.php b/main/Charts/Google/GoogleChartType.class.php
index a439f066a3..6ade0d686c 100644
--- a/main/Charts/Google/GoogleChartType.class.php
+++ b/main/Charts/Google/GoogleChartType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleChartType extends Enumeration
 	{
 		const LINE					= 0x1;
diff --git a/main/Charts/Google/GoogleGridedLineChart.class.php b/main/Charts/Google/GoogleGridedLineChart.class.php
index 834d5504be..394adbfd5f 100644
--- a/main/Charts/Google/GoogleGridedLineChart.class.php
+++ b/main/Charts/Google/GoogleGridedLineChart.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GoogleGridedLineChart extends GoogleNormalizedLineChart
 	{
 		private $grid = null;
 		
 		/**
-		 * @return GoogleGridedLineChart
+		 * @return \Onphp\GoogleGridedLineChart
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GoogleGridedLineChart
+		 * @return \Onphp\GoogleGridedLineChart
 		**/
 		public function setGrid(GoogleChartGrid $grid)
 		{
@@ -35,7 +37,7 @@ public function setGrid(GoogleChartGrid $grid)
 		}
 		
 		/**
-		 * @return GoogleChartGrid
+		 * @return \Onphp\GoogleChartGrid
 		**/
 		public function getGrid()
 		{
@@ -55,7 +57,7 @@ public function toString()
 		}
 		
 		/**
-		 * @return GoogleGridedLineChart
+		 * @return \Onphp\GoogleGridedLineChart
 		**/
 		private function createDefault()
 		{
diff --git a/main/Charts/Google/GoogleLineChart.class.php b/main/Charts/Google/GoogleLineChart.class.php
index 3aaeb98282..9f4d35163f 100644
--- a/main/Charts/Google/GoogleLineChart.class.php
+++ b/main/Charts/Google/GoogleLineChart.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	class GoogleLineChart extends GoogleChart
 	{
 		protected $axesCollection 	= null;
@@ -19,7 +21,7 @@ class GoogleLineChart extends GoogleChart
 		protected $labelStyle 		= null;
 		
 		/**
-		 * @return GoogleLineChart
+		 * @return \Onphp\GoogleLineChart
 		**/
 		public static function create()
 		{
@@ -56,7 +58,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return GoogleLineChart
+		 * @return \Onphp\GoogleLineChart
 		**/
 		public function addLine(GoogleChartLine $line)
 		{
@@ -76,7 +78,7 @@ public function addLine(GoogleChartLine $line)
 		}
 		
 		/**
-		 * @return GoogleLineChart
+		 * @return \Onphp\GoogleLineChart
 		**/
 		public function setLegendPosition(GoogleChartLegendPositionType $type)
 		{
@@ -86,7 +88,7 @@ public function setLegendPosition(GoogleChartLegendPositionType $type)
 		}
 		
 		/**
-		 * @return GoogleLineChart
+		 * @return \Onphp\GoogleLineChart
 		**/
 		public function addAxis(GoogleChartAxis $axis)
 		{
diff --git a/main/Charts/Google/GoogleNormalizedLineChart.class.php b/main/Charts/Google/GoogleNormalizedLineChart.class.php
index 4ea2521ac7..0c00a735b8 100644
--- a/main/Charts/Google/GoogleNormalizedLineChart.class.php
+++ b/main/Charts/Google/GoogleNormalizedLineChart.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	class GoogleNormalizedLineChart extends GoogleLineChart
 	{
 		/**
-		 * @return GoogleNormalizedLineChart
+		 * @return \Onphp\GoogleNormalizedLineChart
 		**/
 		public static function create()
 		{
diff --git a/main/Charts/Google/GooglePieChart.class.php b/main/Charts/Google/GooglePieChart.class.php
index 63f851a754..b1503db63f 100644
--- a/main/Charts/Google/GooglePieChart.class.php
+++ b/main/Charts/Google/GooglePieChart.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class GooglePieChart extends GoogleChart
 	{
 		/**
-		 * @return GooglePieChart
+		 * @return \Onphp\GooglePieChart
 		**/
 		public static function create()
 		{
@@ -40,7 +42,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return GooglePieChart
+		 * @return \Onphp\GooglePieChart
 		**/
 		public function addPiece(GoogleChartPiece $piece)
 		{
diff --git a/main/Charts/Google/LabelStyleType.class.php b/main/Charts/Google/LabelStyleType.class.php
index d61b716801..d7e3dba87a 100644
--- a/main/Charts/Google/LabelStyleType.class.php
+++ b/main/Charts/Google/LabelStyleType.class.php
@@ -14,6 +14,8 @@
 	/**
 	 * @ingroup GoogleChart
 	**/
+	namespace Onphp;
+
 	final class LabelStyleType extends Enumeration
 	{
 		const FLOAT				= 0x1;
@@ -27,7 +29,7 @@ final class LabelStyleType extends Enumeration
 		);
 		
 		/**
-		 * @return LabelStyleType
+		 * @return \Onphp\LabelStyleType
 		**/
 		public static function create($id)
 		{
diff --git a/main/Criteria/Criteria.class.php b/main/Criteria/Criteria.class.php
index faf16837fb..dbfa2074a8 100644
--- a/main/Criteria/Criteria.class.php
+++ b/main/Criteria/Criteria.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Criteria
 	**/
+	namespace Onphp;
+
 	final class Criteria extends QueryIdentification
 	{
 		private $dao		= null;
@@ -34,7 +36,7 @@ final class Criteria extends QueryIdentification
 		private $silent = true;
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public static function create(/* ProtoDAO */ $dao = null)
 		{
@@ -80,7 +82,7 @@ public function __wakeup()
 		}
 		
 		/**
-		 * @return ProtoDAO
+		 * @return \Onphp\ProtoDAO
 		**/
 		public function getDao()
 		{
@@ -88,7 +90,7 @@ public function getDao()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function setDao(ProtoDAO $dao)
 		{
@@ -106,7 +108,7 @@ public function checkAndGetDao()
 		}
 		
 		/**
-		 * @return LogicalChain
+		 * @return \Onphp\LogicalChain
 		**/
 		public function getLogic()
 		{
@@ -114,7 +116,7 @@ public function getLogic()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function add(LogicalObject $logic)
 		{
@@ -124,7 +126,7 @@ public function add(LogicalObject $logic)
 		}
 		
 		/**
-		 * @return OrderChain
+		 * @return \Onphp\OrderChain
 		**/
 		public function getOrder()
 		{
@@ -132,7 +134,7 @@ public function getOrder()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function addOrder(/* MapableObject */ $order)
 		{
@@ -145,7 +147,7 @@ public function addOrder(/* MapableObject */ $order)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function prependOrder(/* MapableObject */ $order)
 		{
@@ -158,7 +160,7 @@ public function prependOrder(/* MapableObject */ $order)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function dropOrder()
 		{
@@ -173,7 +175,7 @@ public function getLimit()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function setLimit($limit)
 		{
@@ -188,7 +190,7 @@ public function getOffset()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function setOffset($offset)
 		{
@@ -198,7 +200,7 @@ public function setOffset($offset)
 		}
 		
 		/**
-		 * @return FetchStrategy
+		 * @return \Onphp\FetchStrategy
 		**/
 		public function getFetchStrategy()
 		{
@@ -206,7 +208,7 @@ public function getFetchStrategy()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function setFetchStrategy(FetchStrategy $strategy)
 		{
@@ -216,7 +218,7 @@ public function setFetchStrategy(FetchStrategy $strategy)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function setProjection(ObjectProjection $chain)
 		{
@@ -229,7 +231,7 @@ public function setProjection(ObjectProjection $chain)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function addProjection(ObjectProjection $projection)
 		{
@@ -243,7 +245,7 @@ public function addProjection(ObjectProjection $projection)
 		}
 		
 		/**
-		 * @return ProjectionChain
+		 * @return \Onphp\ProjectionChain
 		**/
 		public function getProjection()
 		{
@@ -251,7 +253,7 @@ public function getProjection()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function dropProjection()
 		{
@@ -261,7 +263,7 @@ public function dropProjection()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function setDistinct($orly = true)
 		{
@@ -281,7 +283,7 @@ public function isSilent()
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function setSilent($silent)
 		{
@@ -293,7 +295,7 @@ public function setSilent($silent)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function fetchCollection(
 			$path, // to collection
@@ -365,7 +367,7 @@ public function getList()
 		}
 		
 		/**
-		 * @return QueryResult
+		 * @return \Onphp\QueryResult
 		**/
 		public function getResult()
 		{
@@ -453,7 +455,7 @@ public function toDialectString(Dialect $dialect)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function toSelectQuery()
 		{
@@ -474,7 +476,7 @@ public function toSelectQuery()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function fillSelectQuery(SelectQuery $query)
 		{
@@ -515,11 +517,11 @@ public function fillSelectQuery(SelectQuery $query)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function dropProjectionByType(/* array */ $dropTypes)
 		{
-			Assert::isInstance($this->projection, 'ProjectionChain');
+			Assert::isInstance($this->projection, '\Onphp\ProjectionChain');
 			
 			$this->projection->dropByType($dropTypes);
 			
@@ -557,11 +559,11 @@ private function joinProperties(
 					if (
 						is_subclass_of(
 							$property->getClassName(),
-							'Enumeration'
+							'\Onphp\Enumeration'
 						) ||
 						is_subclass_of(
 							$property->getClassName(),
-							'Enum'
+							'\Onphp\Enum'
 						)
 					) {
 						// field already added by makeSelectHead
@@ -637,7 +639,7 @@ private function joinProperties(
 		}
 		
 		/**
-		 * @return AbstractProtoClass
+		 * @return \Onphp\AbstractProtoClass
 		**/
 		private function getProto()
 		{
diff --git a/main/Criteria/FetchStrategy.class.php b/main/Criteria/FetchStrategy.class.php
index afd5a5e20b..b8c8489140 100644
--- a/main/Criteria/FetchStrategy.class.php
+++ b/main/Criteria/FetchStrategy.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Criteria
 	**/
+	namespace Onphp;
+
 	final class FetchStrategy extends Enumeration
 	{
 		const JOIN		= 1;
@@ -25,7 +27,7 @@ final class FetchStrategy extends Enumeration
 		);
 		
 		/**
-		 * @return FetchStrategy
+		 * @return \Onphp\FetchStrategy
 		**/
 		public function setId($id)
 		{
@@ -35,7 +37,7 @@ public function setId($id)
 		}
 		
 		/**
-		 * @return FetchStrategy
+		 * @return \Onphp\FetchStrategy
 		**/
 		public static function join()
 		{
@@ -43,7 +45,7 @@ public static function join()
 		}
 		
 		/**
-		 * @return FetchStrategy
+		 * @return \Onphp\FetchStrategy
 		**/
 		public static function cascade()
 		{
@@ -51,7 +53,7 @@ public static function cascade()
 		}
 		
 		/**
-		 * @return FetchStrategy
+		 * @return \Onphp\FetchStrategy
 		**/
 		public static function lazy()
 		{
@@ -59,7 +61,7 @@ public static function lazy()
 		}
 		
 		/**
-		 * @return FetchStrategy
+		 * @return \Onphp\FetchStrategy
 		**/
 		private static function getInstance($id)
 		{
diff --git a/main/Criteria/Projection.class.php b/main/Criteria/Projection.class.php
index eeff26453f..6bbd45d0af 100644
--- a/main/Criteria/Projection.class.php
+++ b/main/Criteria/Projection.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Criteria
 	**/
+	namespace Onphp;
+
 	final class Projection extends StaticFactory
 	{
 		/**
-		 * @return SumProjection
+		 * @return \Onphp\SumProjection
 		**/
 		public static function sum($property, $alias = null)
 		{
@@ -25,7 +27,7 @@ public static function sum($property, $alias = null)
 		}
 		
 		/**
-		 * @return AverageNumberProjection
+		 * @return \Onphp\AverageNumberProjection
 		**/
 		public static function avg($property, $alias = null)
 		{
@@ -33,7 +35,7 @@ public static function avg($property, $alias = null)
 		}
 		
 		/**
-		 * @return MappableObjectProjection
+		 * @return \Onphp\MappableObjectProjection
 		**/
 		public static function mappable(MappableObject $object, $alias = null)
 		{
@@ -41,7 +43,7 @@ public static function mappable(MappableObject $object, $alias = null)
 		}
 		
 		/**
-		 * @return MinimalNumberProjection
+		 * @return \Onphp\MinimalNumberProjection
 		**/
 		public static function min($property, $alias = null)
 		{
@@ -49,7 +51,7 @@ public static function min($property, $alias = null)
 		}
 		
 		/**
-		 * @return MaximalNumberProjection
+		 * @return \Onphp\MaximalNumberProjection
 		**/
 		public static function max($property, $alias = null)
 		{
@@ -57,7 +59,7 @@ public static function max($property, $alias = null)
 		}
 		
 		/**
-		 * @return PropertyProjection
+		 * @return \Onphp\PropertyProjection
 		**/
 		public static function property($property, $alias = null)
 		{
@@ -65,7 +67,7 @@ public static function property($property, $alias = null)
 		}
 		
 		/**
-		 * @return RowCountProjection
+		 * @return \Onphp\RowCountProjection
 		**/
 		public static function count($property = null, $alias = null)
 		{
@@ -73,7 +75,7 @@ public static function count($property = null, $alias = null)
 		}
 		
 		/**
-		 * @return DistinctCountProjection
+		 * @return \Onphp\DistinctCountProjection
 		**/
 		public static function distinctCount($property = null, $alias = null)
 		{
@@ -81,7 +83,7 @@ public static function distinctCount($property = null, $alias = null)
 		}
 		
 		/**
-		 * @return ProjectionChain
+		 * @return \Onphp\ProjectionChain
 		**/
 		public static function chain()
 		{
@@ -89,7 +91,7 @@ public static function chain()
 		}
 		
 		/**
-		 * @return GroupByPropertyProjection
+		 * @return \Onphp\GroupByPropertyProjection
 		**/
 		public static function group($property)
 		{
@@ -97,7 +99,7 @@ public static function group($property)
 		}
 		
 		/**
-		 * @return GroupByClassProjection
+		 * @return \Onphp\GroupByClassProjection
 		**/
 		public static function groupByClass($class)
 		{
@@ -105,7 +107,7 @@ public static function groupByClass($class)
 		}
 		
 		/**
-		 * @return HavingProjection
+		 * @return \Onphp\HavingProjection
 		**/
 		public static function having(LogicalObject $logic)
 		{
@@ -113,7 +115,7 @@ public static function having(LogicalObject $logic)
 		}
 		
 		/**
-		 * @return ClassProjection
+		 * @return \Onphp\ClassProjection
 		**/
 		public static function clazz($className)
 		{
diff --git a/main/Criteria/Projections/AggregateProjection.class.php b/main/Criteria/Projections/AggregateProjection.class.php
index 61d4254fcf..fd94c18d8f 100644
--- a/main/Criteria/Projections/AggregateProjection.class.php
+++ b/main/Criteria/Projections/AggregateProjection.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	abstract class AggregateProjection extends BaseProjection
 	{
 		abstract public function getFunctionName();
 		
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query)
 		{
diff --git a/main/Criteria/Projections/AverageNumberProjection.class.php b/main/Criteria/Projections/AverageNumberProjection.class.php
index 8ceb34fb30..45a0ed2843 100644
--- a/main/Criteria/Projections/AverageNumberProjection.class.php
+++ b/main/Criteria/Projections/AverageNumberProjection.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class AverageNumberProjection extends AggregateProjection
 	{
 		public function getFunctionName()
diff --git a/main/Criteria/Projections/BaseProjection.class.php b/main/Criteria/Projections/BaseProjection.class.php
index dd3025f3a9..356351294f 100644
--- a/main/Criteria/Projections/BaseProjection.class.php
+++ b/main/Criteria/Projections/BaseProjection.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	abstract class BaseProjection implements ObjectProjection, Aliased
 	{
 		protected $property	= null;
diff --git a/main/Criteria/Projections/ClassProjection.class.php b/main/Criteria/Projections/ClassProjection.class.php
index 24eac60308..a72f606c8b 100644
--- a/main/Criteria/Projections/ClassProjection.class.php
+++ b/main/Criteria/Projections/ClassProjection.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	class ClassProjection implements ObjectProjection
 	{
 		protected $className	= null;
 		
 		/**
-		 * @return ClassProjection
+		 * @return \Onphp\ClassProjection
 		**/
 		public static function create($class)
 		{
@@ -27,7 +29,7 @@ public static function create($class)
 		public function __construct($class)
 		{
 			Assert::isTrue(
-				ClassUtils::isInstanceOf($class, 'Prototyped')
+				ClassUtils::isInstanceOf($class, '\Onphp\Prototyped')
 			);
 			
 			if (is_object($class))
@@ -37,7 +39,7 @@ public function __construct($class)
 		}
 		
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query)
 		{
diff --git a/main/Criteria/Projections/CountProjection.class.php b/main/Criteria/Projections/CountProjection.class.php
index eee4c8e7ff..ce6f3422e1 100644
--- a/main/Criteria/Projections/CountProjection.class.php
+++ b/main/Criteria/Projections/CountProjection.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	abstract class CountProjection extends BaseProjection
 	{
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query)
 		{
@@ -27,7 +29,7 @@ public function process(Criteria $criteria, JoinCapableQuery $query)
 		}
 		
 		/**
-		 * @return SQLFunction
+		 * @return \Onphp\SQLFunction
 		**/
 		protected function getFunction(
 			Criteria $criteria,
diff --git a/main/Criteria/Projections/DistinctCountProjection.class.php b/main/Criteria/Projections/DistinctCountProjection.class.php
index cfc720582a..2d1e004f5e 100644
--- a/main/Criteria/Projections/DistinctCountProjection.class.php
+++ b/main/Criteria/Projections/DistinctCountProjection.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class DistinctCountProjection extends CountProjection
 	{
 		/**
-		 * @return SQLFunction
+		 * @return \Onphp\SQLFunction
 		**/
 		protected function getFunction(
 			Criteria $criteria,
diff --git a/main/Criteria/Projections/GroupByClassProjection.class.php b/main/Criteria/Projections/GroupByClassProjection.class.php
index 67728a702b..9a4cbc33d7 100644
--- a/main/Criteria/Projections/GroupByClassProjection.class.php
+++ b/main/Criteria/Projections/GroupByClassProjection.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class GroupByClassProjection extends ClassProjection
 	{
 		/**
-		 * @return GroupByClassProjection
+		 * @return \Onphp\GroupByClassProjection
 		**/
 		public static function create($class)
 		{
diff --git a/main/Criteria/Projections/GroupByPropertyProjection.class.php b/main/Criteria/Projections/GroupByPropertyProjection.class.php
index e5ef2e635a..8dc1b6a57f 100644
--- a/main/Criteria/Projections/GroupByPropertyProjection.class.php
+++ b/main/Criteria/Projections/GroupByPropertyProjection.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class GroupByPropertyProjection extends BaseProjection
 	{
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query)
 		{
diff --git a/main/Criteria/Projections/HavingProjection.class.php b/main/Criteria/Projections/HavingProjection.class.php
index 26bf6818d5..79d576d5c0 100644
--- a/main/Criteria/Projections/HavingProjection.class.php
+++ b/main/Criteria/Projections/HavingProjection.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class HavingProjection implements ObjectProjection
 	{
 		private $logic = null;
@@ -22,7 +24,7 @@ public function __construct(LogicalObject $logic)
 		}
 		
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query)
 		{
diff --git a/main/Criteria/Projections/MappableObjectProjection.class.php b/main/Criteria/Projections/MappableObjectProjection.class.php
index 386bfe8d94..e433c19929 100644
--- a/main/Criteria/Projections/MappableObjectProjection.class.php
+++ b/main/Criteria/Projections/MappableObjectProjection.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class MappableObjectProjection implements ObjectProjection
 	{
 		private $mappable	= null;
@@ -24,7 +26,7 @@ public function __construct(MappableObject $mappable, $alias = null)
 		}
 		
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query)
 		{
diff --git a/main/Criteria/Projections/MaximalNumberProjection.class.php b/main/Criteria/Projections/MaximalNumberProjection.class.php
index 2b13c44de4..1af03498ef 100644
--- a/main/Criteria/Projections/MaximalNumberProjection.class.php
+++ b/main/Criteria/Projections/MaximalNumberProjection.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class MaximalNumberProjection extends AggregateProjection
 	{
 		public function getFunctionName()
diff --git a/main/Criteria/Projections/MinimalNumberProjection.class.php b/main/Criteria/Projections/MinimalNumberProjection.class.php
index 3d1225d257..c16038b778 100644
--- a/main/Criteria/Projections/MinimalNumberProjection.class.php
+++ b/main/Criteria/Projections/MinimalNumberProjection.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class MinimalNumberProjection extends AggregateProjection
 	{
 		public function getFunctionName()
diff --git a/main/Criteria/Projections/ObjectProjection.class.php b/main/Criteria/Projections/ObjectProjection.class.php
index dc9abed6ff..a86f4bb56c 100644
--- a/main/Criteria/Projections/ObjectProjection.class.php
+++ b/main/Criteria/Projections/ObjectProjection.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	interface ObjectProjection
 	{
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query);
 	}
diff --git a/main/Criteria/Projections/ProjectionChain.class.php b/main/Criteria/Projections/ProjectionChain.class.php
index b9c0c8e4c3..b0ec5e24c0 100644
--- a/main/Criteria/Projections/ProjectionChain.class.php
+++ b/main/Criteria/Projections/ProjectionChain.class.php
@@ -12,62 +12,69 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class ProjectionChain implements ObjectProjection
 	{
 		private $list = array();
-		
+
+		public function getList()
+		{
+			return $this->list;
+		}
+
 		/**
-		 * @return ProjectionChain
+		 * @return \Onphp\ProjectionChain
 		**/
 		public function add(ObjectProjection $projection, $name = null)
 		{
 			if ($name) {
 				Assert::isFalse(isset($this->list[$name]));
-				
+
 				$this->list[$name] = $projection;
 			} else {
 				$this->list[] = $projection;
 			}
-			
+
 			return $this;
 		}
-		
+
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query)
 		{
 			foreach ($this->list as $projection)
 				$projection->process($criteria, $query);
-			
+
 			return $query;
 		}
-		
+
 		public function isEmpty()
 		{
 			return count($this->list) == 0;
 		}
-		
+
 		/**
-		 * @return ProjectionChain
+		 * @return \Onphp\ProjectionChain
 		**/
 		public function dropByType(/* array */ $dropTypes)
 		{
 			$newList = array();
-			
+
 			if (!is_array($dropTypes))
 				$dropTypes = array($dropTypes);
-			
+
 			foreach ($this->list as $name => &$projection) {
 				$class = get_class($projection);
-				
+
 				if (!in_array($class, $dropTypes))
 					$newList[$name] = $projection;
 			}
-			
+
 			// swap
 			$this->list = $newList;
-			
+
 			return $this;
 		}
 	}
diff --git a/main/Criteria/Projections/PropertyProjection.class.php b/main/Criteria/Projections/PropertyProjection.class.php
index c8cb076692..c5cddc6188 100644
--- a/main/Criteria/Projections/PropertyProjection.class.php
+++ b/main/Criteria/Projections/PropertyProjection.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class PropertyProjection extends BaseProjection
 	{
 		/**
-		 * @return JoinCapableQuery
+		 * @return \Onphp\JoinCapableQuery
 		**/
 		public function process(Criteria $criteria, JoinCapableQuery $query)
 		{
diff --git a/main/Criteria/Projections/RowCountProjection.class.php b/main/Criteria/Projections/RowCountProjection.class.php
index b5dfa6c694..73c2b22e99 100644
--- a/main/Criteria/Projections/RowCountProjection.class.php
+++ b/main/Criteria/Projections/RowCountProjection.class.php
@@ -12,5 +12,7 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class RowCountProjection extends CountProjection {/*_*/}
 ?>
\ No newline at end of file
diff --git a/main/Criteria/Projections/SumProjection.class.php b/main/Criteria/Projections/SumProjection.class.php
index e7cf3277de..1259c71f48 100644
--- a/main/Criteria/Projections/SumProjection.class.php
+++ b/main/Criteria/Projections/SumProjection.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Projections
 	**/
+	namespace Onphp;
+
 	final class SumProjection extends AggregateProjection
 	{
 		public function getFunctionName()
diff --git a/main/Criteria/PropertyPath.class.php b/main/Criteria/PropertyPath.class.php
index 31637511d9..9962584063 100644
--- a/main/Criteria/PropertyPath.class.php
+++ b/main/Criteria/PropertyPath.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Criteria
 	**/
+	namespace Onphp;
+
 	final class PropertyPath
 	{
 		private $root		= null;
@@ -70,7 +72,7 @@ public function getRoot()
 		}
 		
 		/**
-		 * @return AbstractProtoClass
+		 * @return \Onphp\AbstractProtoClass
 		**/
 		public function getFinalProto()
 		{
@@ -78,7 +80,7 @@ public function getFinalProto()
 		}
 		
 		/**
-		 * @return ProtoDAO
+		 * @return \Onphp\ProtoDAO
 		**/
 		public function getFinalDao()
 		{
@@ -86,7 +88,7 @@ public function getFinalDao()
 		}
 		
 		/**
-		 * @return LightMetaProperty
+		 * @return \Onphp\LightMetaProperty
 		**/
 		public function getFinalProperty()
 		{
@@ -100,7 +102,7 @@ public function getFinalProperty()
 			
 			self::$protos[$className] = call_user_func(array($className, 'proto'));
 			self::$daos[$className] =
-				ClassUtils::isInstanceOf($className, 'DAOConnected')
+				ClassUtils::isInstanceOf($className, '\Onphp\DAOConnected')
 					? call_user_func(array($className, 'dao'))
 					: null;
 			
diff --git a/main/Crypto/Base62Utils.class.php b/main/Crypto/Base62Utils.class.php
index d4769b2414..9d8fd8c67b 100644
--- a/main/Crypto/Base62Utils.class.php
+++ b/main/Crypto/Base62Utils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Crypto
 	**/
+	namespace Onphp;
+
 	class Base62Utils extends StaticFactory
 	{
 		protected static $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@@ -45,7 +47,7 @@ public static function encode($integer)
 		}
 
 		/**
-		 * @throws WrongArgumentException
+		 * @throws \Onphp\WrongArgumentException
 		 * @param string $string
 		 * @return int
 		**/
diff --git a/main/Crypto/Crypter.class.php b/main/Crypto/Crypter.class.php
index 9d7a133e20..a20e3a5577 100644
--- a/main/Crypto/Crypter.class.php
+++ b/main/Crypto/Crypter.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Crypto
 	**/
+	namespace Onphp;
+
 	final class Crypter
 	{
 		private $crResource = null;
diff --git a/main/Crypto/CryptoFunctions.class.php b/main/Crypto/CryptoFunctions.class.php
index d9b08a527b..df2008b8d3 100644
--- a/main/Crypto/CryptoFunctions.class.php
+++ b/main/Crypto/CryptoFunctions.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Crypto
 	**/
+	namespace Onphp;
+
 	final class CryptoFunctions extends StaticFactory
 	{
 		const SHA1_BLOCK_SIZE = 64;
diff --git a/main/Crypto/DiffieHellmanKeyPair.class.php b/main/Crypto/DiffieHellmanKeyPair.class.php
index 759dd77f4c..3c6ca586a9 100644
--- a/main/Crypto/DiffieHellmanKeyPair.class.php
+++ b/main/Crypto/DiffieHellmanKeyPair.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Crypto
 	**/
+	namespace Onphp;
+
 	final class DiffieHellmanKeyPair implements KeyPair
 	{
 		private $private	= null;
@@ -26,7 +28,7 @@ public function __construct(DiffieHellmanParameters $parameters)
 		}
 		
 		/**
-		 * @return DiffieHellmanKeyPair
+		 * @return \Onphp\DiffieHellmanKeyPair
 		**/
 		public static function create(DiffieHellmanParameters $parameters)
 		{
@@ -34,7 +36,7 @@ public static function create(DiffieHellmanParameters $parameters)
 		}
 		
 		/**
-		 * @return DiffieHellmanKeyPair
+		 * @return \Onphp\DiffieHellmanKeyPair
 		**/
 		public static function generate(
 			DiffieHellmanParameters $parameters,
@@ -59,7 +61,7 @@ public static function generate(
 		}
 		
 		/**
-		 * @return DiffieHellmanKeyPair
+		 * @return \Onphp\DiffieHellmanKeyPair
 		**/
 		public function setPrivate(BigInteger $private)
 		{
@@ -68,7 +70,7 @@ public function setPrivate(BigInteger $private)
 		}
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function getPrivate()
 		{
@@ -76,7 +78,7 @@ public function getPrivate()
 		}
 		
 		/**
-		 * @return DiffieHellmanKeyPair
+		 * @return \Onphp\DiffieHellmanKeyPair
 		**/
 		public function setPublic(BigInteger $public)
 		{
@@ -85,7 +87,7 @@ public function setPublic(BigInteger $public)
 		}
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function getPublic()
 		{
@@ -93,7 +95,7 @@ public function getPublic()
 		}
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function makeSharedKey(BigInteger $otherSitePublic)
 		{
diff --git a/main/Crypto/DiffieHellmanParameters.class.php b/main/Crypto/DiffieHellmanParameters.class.php
index 6082847d7d..f7d793e701 100644
--- a/main/Crypto/DiffieHellmanParameters.class.php
+++ b/main/Crypto/DiffieHellmanParameters.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Crypto
 	**/
+	namespace Onphp;
+
 	final class DiffieHellmanParameters
 	{
 		private $gen		= null;
@@ -28,7 +30,7 @@ public function __construct(BigInteger $gen, BigInteger $modulus)
 		}
 		
 		/**
-		 * @return DiffieHellmanParameters
+		 * @return \Onphp\DiffieHellmanParameters
 		**/
 		public static function create(BigInteger $gen, BigInteger $modulus)
 		{
@@ -36,7 +38,7 @@ public static function create(BigInteger $gen, BigInteger $modulus)
 		}
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function getGen()
 		{
@@ -44,7 +46,7 @@ public function getGen()
 		}
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function getModulus()
 		{
diff --git a/main/Crypto/KeyPair.class.php b/main/Crypto/KeyPair.class.php
index 28050f33e6..e8f0cc2234 100644
--- a/main/Crypto/KeyPair.class.php
+++ b/main/Crypto/KeyPair.class.php
@@ -12,15 +12,17 @@
 	/**
 	 * @ingroup Crypto
 	**/
+	namespace Onphp;
+
 	interface KeyPair
 	{
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function getPublic();
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function getPrivate();
 	}
diff --git a/main/DAOs/BaseDAO.class.php b/main/DAOs/BaseDAO.class.php
index 4770358622..55c0bd572f 100644
--- a/main/DAOs/BaseDAO.class.php
+++ b/main/DAOs/BaseDAO.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	interface BaseDAO
 	{
 		/// single object getters
@@ -52,7 +54,7 @@ public function dropByIds(array $ids);
 		//@{
 		public function uncacheById($id);
 		/**
-		 * @return UncacherBase
+		 * @return \Onphp\UncacherBase
 		 */
 		public function getUncacherById($id);
 		public function uncacheByIds($ids);
diff --git a/main/DAOs/DAOConnected.class.php b/main/DAOs/DAOConnected.class.php
index 8b520ad282..3318f305e8 100644
--- a/main/DAOs/DAOConnected.class.php
+++ b/main/DAOs/DAOConnected.class.php
@@ -15,8 +15,13 @@
 	 * @ingroup DAOs
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface DAOConnected extends Identifiable
 	{
+		/**
+		 * @return StorableDAO
+		 */
 		public static function dao();
 	}
 ?>
\ No newline at end of file
diff --git a/main/DAOs/FullTextDAO.class.php b/main/DAOs/FullTextDAO.class.php
index e6916553ca..b071ad4030 100644
--- a/main/DAOs/FullTextDAO.class.php
+++ b/main/DAOs/FullTextDAO.class.php
@@ -15,6 +15,8 @@
 	 * @ingroup DAOs
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface FullTextDAO extends BaseDAO
 	{
 		// index' field name
diff --git a/main/DAOs/GenericDAO.class.php b/main/DAOs/GenericDAO.class.php
index 569e7718c1..5dc7cc708b 100644
--- a/main/DAOs/GenericDAO.class.php
+++ b/main/DAOs/GenericDAO.class.php
@@ -14,10 +14,14 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	abstract class GenericDAO extends Singleton implements BaseDAO
 	{
 		private $identityMap	= array();
 		
+		protected $linkName		= null;
+		
 		abstract public function getTable();
 		abstract public function getObjectName();
 		
@@ -71,7 +75,7 @@ public function completeObject(Identifiable $object)
 		**/
 		public function getLinkName()
 		{
-			return null;
+			return $this->linkName;
 		}
 		
 		public function getIdName()
@@ -85,7 +89,7 @@ public function getSequence()
 		}
 		
 		/**
-		 * @return AbstractProtoClass
+		 * @return \Onphp\AbstractProtoClass
 		**/
 		public function getProtoClass()
 		{
@@ -116,7 +120,7 @@ public function getFields()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function makeSelectHead()
 		{
@@ -139,7 +143,7 @@ public function makeSelectHead()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function makeTotalCountQuery()
 		{
@@ -156,7 +160,9 @@ public function makeTotalCountQuery()
 		public function getById($id, $expires = Cache::EXPIRES_MEDIUM)
 		{
 			Assert::isScalar($id);
-			Assert::isNotEmpty($id);
+			if (mb_strlen($id) == 0) {
+				throw new WrongArgumentException("Empty id to getById");
+			}
 			
 			if (isset($this->identityMap[$id]))
 				return $this->identityMap[$id];
@@ -305,7 +311,7 @@ public function uncacheById($id)
 		}
 		
 		/**
-		 * @return UncachersPool
+		 * @return \Onphp\UncachersPool
 		 */
 		public function getUncacherById($id)
 		{
@@ -338,7 +344,7 @@ public function uncacheLists()
 		//@}
 		
 		/**
-		 * @return GenericDAO
+		 * @return \Onphp\GenericDAO
 		**/
 		public function dropIdentityMap()
 		{
@@ -382,7 +388,7 @@ protected function doInject(
 			$db = DBPool::getByDao($this);
 			
 			if (!$db->isQueueActive()) {
-				$preUncacher = is_scalar($object->getId())
+				$preUncacher = !($query instanceof InsertQuery )
 					? $this->getUncacherById($object->getId())
 					: null;
 				
@@ -400,7 +406,7 @@ protected function doInject(
 						.$query->toDialectString($db->getDialect())
 					);
 			} else {
-				$preUncacher = is_scalar($object->getId())
+				$preUncacher = !($query instanceof InsertQuery )
 					? $this->getUncacherById($object->getId())
 					: null;
 				
@@ -420,7 +426,7 @@ protected function doInject(
 		/* void */ protected function checkObjectType(Identifiable $object)
 		{
 			Assert::isSame(
-				get_class($object),
+				ClassUtils::normalClassName($object),
 				$this->getObjectName(),
 				'strange object given, i can not inject it'
 			);
diff --git a/main/DAOs/Handlers/ApcSegmentHandler.class.php b/main/DAOs/Handlers/ApcSegmentHandler.class.php
index fe5b1a0633..e67761503e 100644
--- a/main/DAOs/Handlers/ApcSegmentHandler.class.php
+++ b/main/DAOs/Handlers/ApcSegmentHandler.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class ApcSegmentHandler extends OptimizerSegmentHandler
 	{
 		public function __construct($segmentId)
diff --git a/main/DAOs/Handlers/CacheSegmentHandler.class.php b/main/DAOs/Handlers/CacheSegmentHandler.class.php
index b1772474ab..8b85dceb51 100644
--- a/main/DAOs/Handlers/CacheSegmentHandler.class.php
+++ b/main/DAOs/Handlers/CacheSegmentHandler.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class CacheSegmentHandler implements SegmentHandler
 	{
 		private $index = null;
diff --git a/main/DAOs/Handlers/FileSystemSegmentHandler.class.php b/main/DAOs/Handlers/FileSystemSegmentHandler.class.php
index d4b21b9970..c18f39afe4 100644
--- a/main/DAOs/Handlers/FileSystemSegmentHandler.class.php
+++ b/main/DAOs/Handlers/FileSystemSegmentHandler.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class FileSystemSegmentHandler implements SegmentHandler
 	{
 		private $path = null;
diff --git a/main/DAOs/Handlers/MessageSegmentHandler.class.php b/main/DAOs/Handlers/MessageSegmentHandler.class.php
index 3234c03910..949d440019 100644
--- a/main/DAOs/Handlers/MessageSegmentHandler.class.php
+++ b/main/DAOs/Handlers/MessageSegmentHandler.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class MessageSegmentHandler implements SegmentHandler
 	{
 		private $id = null;
diff --git a/main/DAOs/Handlers/OptimizerSegmentHandler.class.php b/main/DAOs/Handlers/OptimizerSegmentHandler.class.php
index 8efc219eb6..c0f8bf5ca4 100644
--- a/main/DAOs/Handlers/OptimizerSegmentHandler.class.php
+++ b/main/DAOs/Handlers/OptimizerSegmentHandler.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	abstract class OptimizerSegmentHandler implements SegmentHandler
 	{
 		protected $id		= null;
diff --git a/main/DAOs/Handlers/SegmentHandler.class.php b/main/DAOs/Handlers/SegmentHandler.class.php
index 3cdb010cc3..2b2baf992f 100644
--- a/main/DAOs/Handlers/SegmentHandler.class.php
+++ b/main/DAOs/Handlers/SegmentHandler.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup DAOs
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface SegmentHandler
 	{
 		public function __construct($segmentId);
diff --git a/main/DAOs/Handlers/SharedMemorySegmentHandler.class.php b/main/DAOs/Handlers/SharedMemorySegmentHandler.class.php
index 176db499d8..32ffa3cb21 100644
--- a/main/DAOs/Handlers/SharedMemorySegmentHandler.class.php
+++ b/main/DAOs/Handlers/SharedMemorySegmentHandler.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class SharedMemorySegmentHandler implements SegmentHandler
 	{
 		const SEGMENT_SIZE = 2097152; // 2 ^ 21
diff --git a/main/DAOs/Handlers/XCacheSegmentHandler.class.php b/main/DAOs/Handlers/XCacheSegmentHandler.class.php
index 46fd5772ca..9a6b7b677c 100644
--- a/main/DAOs/Handlers/XCacheSegmentHandler.class.php
+++ b/main/DAOs/Handlers/XCacheSegmentHandler.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class XCacheSegmentHandler extends OptimizerSegmentHandler
 	{
 		public function __construct($segmentId)
diff --git a/main/DAOs/Handlers/eAcceleratorSegmentHandler.class.php b/main/DAOs/Handlers/eAcceleratorSegmentHandler.class.php
index b5579857f4..0fba74da43 100644
--- a/main/DAOs/Handlers/eAcceleratorSegmentHandler.class.php
+++ b/main/DAOs/Handlers/eAcceleratorSegmentHandler.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class eAcceleratorSegmentHandler extends OptimizerSegmentHandler
 	{
 		public function __construct($segmentId)
diff --git a/main/DAOs/ProtoDAO.class.php b/main/DAOs/ProtoDAO.class.php
index f2f12d7c38..0b96a4f9a6 100644
--- a/main/DAOs/ProtoDAO.class.php
+++ b/main/DAOs/ProtoDAO.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	abstract class ProtoDAO extends GenericDAO
 	{
 		public function getJoinPrefix($field, $prefix = null)
diff --git a/main/DAOs/StorableDAO.class.php b/main/DAOs/StorableDAO.class.php
index 2c93cef240..2708c9326a 100644
--- a/main/DAOs/StorableDAO.class.php
+++ b/main/DAOs/StorableDAO.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	abstract class StorableDAO extends ProtoDAO
 	{
 		public function take(Identifiable $object)
@@ -90,7 +92,7 @@ public function unite(
 		}
 		
 		/**
-		 * @return UpdateQuery
+		 * @return \Onphp\UpdateQuery
 		**/
 		private function targetizeUpdateQuery(
 			UpdateQuery $query,
diff --git a/main/DAOs/Uncachers/UncacherBase.class.php b/main/DAOs/Uncachers/UncacherBase.class.php
index 9cc6df3270..83c867bfaa 100644
--- a/main/DAOs/Uncachers/UncacherBase.class.php
+++ b/main/DAOs/Uncachers/UncacherBase.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	interface UncacherBase
 	{
 		/**
-		 * @param $uncacher BaseUncacher same as self class
-		 * @return BaseUncacher (this)
+		 * @param $uncacher UncacherBase same as self class
+		 * @return UncacherBase (this)
 		 */
 		public function merge(UncacherBase $uncacher);
 		
diff --git a/main/DAOs/Uncachers/UncacherBaseDaoWorker.class.php b/main/DAOs/Uncachers/UncacherBaseDaoWorker.class.php
index 37f1e296d7..3f7930a826 100644
--- a/main/DAOs/Uncachers/UncacherBaseDaoWorker.class.php
+++ b/main/DAOs/Uncachers/UncacherBaseDaoWorker.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncacherBaseDaoWorker implements UncacherBase
 	{
 		private $classNameMap = array();
 		
 		/**
-		 * @return UncacherBaseDaoWorker
+		 * @return \Onphp\UncacherBaseDaoWorker
 		 */
 		public static function create($className, $idKey)
 		{
@@ -47,9 +49,7 @@ public function merge(UncacherBase $uncacher)
 		public function uncache()
 		{
 			foreach ($this->classNameMap as $className => $idKeys) {
-				foreach ($idKeys as $key) {
-					$this->uncacheClassName($className, $idKeys);
-				}
+				$this->uncacheClassName($className, $idKeys);
 			}
 		}
 		
@@ -59,8 +59,8 @@ protected function uncacheClassName($className, $idKeys) {
 		}
 		
 		/**
-		 * @param UncacherBaseDaoWorker $uncacher
-		 * @return UncacherBaseDaoWorker
+		 * @param \Onphp\UncacherBaseDaoWorker $uncacher
+		 * @return \Onphp\UncacherBaseDaoWorker
 		 */
 		private function mergeSelf(UncacherBaseDaoWorker $uncacher)
 		{
diff --git a/main/DAOs/Uncachers/UncacherCacheDaoWorkerLists.class.php b/main/DAOs/Uncachers/UncacherCacheDaoWorkerLists.class.php
index 53816600f2..ff377eb7bc 100644
--- a/main/DAOs/Uncachers/UncacherCacheDaoWorkerLists.class.php
+++ b/main/DAOs/Uncachers/UncacherCacheDaoWorkerLists.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncacherCacheDaoWorkerLists implements UncacherBase
 	{
 		private $classNameList = array();
 		
 		/**
-		 * @return UncacherBaseDaoWorker
+		 * @return \Onphp\UncacherBaseDaoWorker
 		 */
 		public static function create($className)
 		{
@@ -62,8 +64,8 @@ private function uncacheClassName($className)
 		}
 		
 		/**
-		 * @param UncacherCacheDaoWorkerLists $uncacher
-		 * @return UncacherCacheDaoWorkerLists
+		 * @param \Onphp\UncacherCacheDaoWorkerLists $uncacher
+		 * @return \Onphp\UncacherCacheDaoWorkerLists
 		 */
 		private function mergeSelf(UncacherCacheDaoWorkerLists $uncacher)
 		{
diff --git a/main/DAOs/Uncachers/UncacherCommonDaoWorker.class.php b/main/DAOs/Uncachers/UncacherCommonDaoWorker.class.php
index 193b1b80a4..0e0579b213 100644
--- a/main/DAOs/Uncachers/UncacherCommonDaoWorker.class.php
+++ b/main/DAOs/Uncachers/UncacherCommonDaoWorker.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncacherCommonDaoWorker extends UncacherBaseDaoWorker
 	{
 		/**
-		 * @return UncacherCommonDaoWorker
+		 * @return \Onphp\UncacherCommonDaoWorker
 		 */
 		public static function create($className, $idKey) {
 			return new self($className, $idKey);
diff --git a/main/DAOs/Uncachers/UncacherGenericDAO.class.php b/main/DAOs/Uncachers/UncacherGenericDAO.class.php
index 6b1bd7912a..0c9fb2fdb2 100644
--- a/main/DAOs/Uncachers/UncacherGenericDAO.class.php
+++ b/main/DAOs/Uncachers/UncacherGenericDAO.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncacherGenericDAO implements UncacherBase
 	{
 		private $daoMap = array();
@@ -33,11 +35,11 @@ public function getDaoMap()
 		
 		/**
 		 * @param $uncacher UncacherGenericDAO same as self class
-		 * @return UncacherBase (this)
+		 * @return \Onphp\UncacherBase (this)
 		 */
 		public function merge(UncacherBase $uncacher)
 		{
-			Assert::isInstance($uncacher, 'UncacherGenericDAO');
+			Assert::isInstance($uncacher, '\Onphp\UncacherGenericDAO');
 			return $this->mergeSelf($uncacher);
 		}
 		
@@ -45,9 +47,9 @@ public function uncache()
 		{
 			foreach ($this->daoMap as $daoClass => $uncacheData) {
 				$dao = GenericDAO::getInstance($daoClass);
-				/* @var $dao GenericDAO */
+				/* @var $dao \Onphp\GenericDAO */
 				list($dropIdentityIds, $workerUncacher) = $uncacheData;
-				/* @var $workerUncacher UncacherBase */
+				/* @var $workerUncacher \Onphp\UncacherBase */
 				
 				foreach ($dropIdentityIds as $id)
 					$dao->dropObjectIdentityMapById($id);
diff --git a/main/DAOs/Uncachers/UncacherNullDaoWorker.class.php b/main/DAOs/Uncachers/UncacherNullDaoWorker.class.php
index 344084bcd1..b4556dc374 100644
--- a/main/DAOs/Uncachers/UncacherNullDaoWorker.class.php
+++ b/main/DAOs/Uncachers/UncacherNullDaoWorker.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncacherNullDaoWorker implements UncacherBase
 	{
 		public static function create()
@@ -24,7 +26,7 @@ public static function create()
 		 */
 		public function merge(UncacherBase $uncacher)
 		{
-			Assert::isInstance($uncacher, 'UncacherNullDaoWorker');
+			Assert::isInstance($uncacher, '\Onphp\UncacherNullDaoWorker');
 			return $this;
 		}
 		
diff --git a/main/DAOs/Uncachers/UncacherSmartDaoWorkerLists.class.php b/main/DAOs/Uncachers/UncacherSmartDaoWorkerLists.class.php
index 94e5ff6a10..7e63422a10 100644
--- a/main/DAOs/Uncachers/UncacherSmartDaoWorkerLists.class.php
+++ b/main/DAOs/Uncachers/UncacherSmartDaoWorkerLists.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncacherSmartDaoWorkerLists implements UncacherBase
 	{
 		private $classNameMap = array();
 		
 		/**
-		 * @return UncacherSmartDaoWorkerLists
+		 * @return \Onphp\UncacherSmartDaoWorkerLists
 		 */
 		public static function create($className, $indexKey, $intKey)
 		{
@@ -76,8 +78,8 @@ protected function uncacheClassName($className, $indexKey, $intKey) {
 		}
 		
 		/**
-		 * @param UncacherBaseDaoWorker $uncacher
-		 * @return UncacherBaseDaoWorker
+		 * @param \Onphp\UncacherBaseDaoWorker $uncacher
+		 * @return \Onphp\UncacherBaseDaoWorker
 		 */
 		private function mergeSelf(UncacherSmartDaoWorkerLists $uncacher)
 		{
diff --git a/main/DAOs/Uncachers/UncacherTaggableDaoWorker.class.php b/main/DAOs/Uncachers/UncacherTaggableDaoWorker.class.php
index 1f32c95d49..3799dd9250 100644
--- a/main/DAOs/Uncachers/UncacherTaggableDaoWorker.class.php
+++ b/main/DAOs/Uncachers/UncacherTaggableDaoWorker.class.php
@@ -12,21 +12,24 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncacherTaggableDaoWorker implements UncacherBase
 	{
 		private $classNameMap = array();
 		
 		/**
-		 * @return UncacherTaggableDaoWorker
+		 * @return \Onphp\UncacherTaggableDaoWorker
 		 */
-		public static function create($className, $idKey, $tags, TaggableDaoWorker $worker)
+		public static function create($className, $idKey, array $tags = array())
 		{
-			return new self($className, $idKey, $tags, $worker);
+			return new self($className, $idKey, $tags);
 		}
 		
-		public function __construct($className, $idKey, $tags, TaggableDaoWorker $worker)
+		public function __construct($className, $idKey, array $tags = array())
 		{
-			$this->classNameMap[$className] = array(array($idKey), $tags, $worker);
+			$idKeyList = $idKey ? array($idKey) : array();
+			$this->classNameMap[$className] = array($idKeyList, $tags);
 		}
 		
 		/**
@@ -38,25 +41,30 @@ public function getClassNameMap()
 		}
 		/**
 		 * @param $uncacher UncacherNullDaoWorker same as self class
-		 * @return BaseUncacher (this)
+		 * @return UncacherBase (this)
 		 */
 		public function merge(UncacherBase $uncacher)
 		{
-			Assert::isInstance($uncacher, 'UncacherTaggableDaoWorker');
+			Assert::isInstance($uncacher, '\Onphp\UncacherTaggableDaoWorker');
 			return $this->mergeSelf($uncacher);
 		}
 		
 		public function uncache()
 		{
 			foreach ($this->classNameMap as $className => $uncaches) {
-				list($idKeys, $tags, $worker) = $uncaches;
-				/* @var $worker TaggableDaoWorker */
+				list($idKeys, $tags) = $uncaches;
+				$dao = ClassUtils::callStaticMethod("$className::dao");
+				/* @var $dao StorableDAO */
+				$worker = Cache::worker($dao);
+				Assert::isInstance($worker, '\Onphp\TaggableDaoWorker');
+				/* @var $worker \Onphp\TaggableDaoWorker */
+
 				$worker->expireTags($tags);
 				
 				foreach ($idKeys as $key)
-					Cache::me()->mark($className)->delete($idKey);
+					Cache::me()->mark($className)->delete($key);
 				
-				ClassUtils::callStaticMethod("$className::dao")->uncacheLists();
+				$dao->uncacheLists();
 			}
 		}
 		
diff --git a/main/DAOs/Uncachers/UncacherTaggableDaoWorkerTags.class.php b/main/DAOs/Uncachers/UncacherTaggableDaoWorkerTags.class.php
new file mode 100644
index 0000000000..fe785f3e28
--- /dev/null
+++ b/main/DAOs/Uncachers/UncacherTaggableDaoWorkerTags.class.php
@@ -0,0 +1,79 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2012 by Aleksey S. Denisov                              *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	/**
+	 * @ingroup Uncachers
+	**/
+	namespace Onphp;
+
+	class UncacherTaggableDaoWorkerTags implements UncacherBase
+	{
+		private $classNameMap = array();
+		
+		/**
+		 * @return UncacherTaggableDaoWorkerTags
+		 */
+		public static function create($className, array $tags = array())
+		{
+			return new self($className, $tags);
+		}
+		
+		public function __construct($className, array $tags = array())
+		{
+			$this->classNameMap[$className] = $tags;
+		}
+		
+		/**
+		 * @return array
+		 */
+		public function getClassNameMap()
+		{
+			return $this->classNameMap;
+		}
+		/**
+		 * @param $uncacher UncacherTaggableDaoWorkerTags same as self class
+		 * @return UncacherBase (this)
+		 */
+		public function merge(UncacherBase $uncacher)
+		{
+			Assert::isInstance($uncacher, '\Onphp\UncacherTaggableDaoWorkerTags');
+			return $this->mergeSelf($uncacher);
+		}
+		
+		public function uncache()
+		{
+			foreach ($this->classNameMap as $className => $tags) {
+				$dao = ClassUtils::callStaticMethod("$className::dao");
+				/* @var $dao StorableDAO */
+				$worker = Cache::worker($dao);
+				Assert::isInstance($worker, '\Onphp\TaggableDaoWorker');
+				/* @var $worker TaggableDaoWorker */
+				
+				$worker->expireTags($tags);
+			}
+		}
+		
+		private function mergeSelf(UncacherTaggableDaoWorkerTags $uncacher) {
+			foreach ($uncacher->getClassNameMap() as $className => $tags) {
+				if (!isset($this->classNameMap[$className])) {
+					$this->classNameMap[$className] = $tags;
+				} else {
+					//merging idkeys
+					$this->classNameMap[$className] = ArrayUtils::mergeUnique(
+						$this->classNameMap[$className],
+						$tags
+					);
+				}
+			}
+			return $this;
+		}
+	}
+?>
\ No newline at end of file
diff --git a/main/DAOs/Uncachers/UncacherVoodoDaoWorkerLists.class.php b/main/DAOs/Uncachers/UncacherVoodoDaoWorkerLists.class.php
index be484951e6..dae4252759 100644
--- a/main/DAOs/Uncachers/UncacherVoodoDaoWorkerLists.class.php
+++ b/main/DAOs/Uncachers/UncacherVoodoDaoWorkerLists.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncacherVoodoDaoWorkerLists implements UncacherBase
 	{
 		private $handlerList = array();
 		
 		/**
-		 * @return UncacherBaseDaoWorker
+		 * @return \Onphp\UncacherBaseDaoWorker
 		 */
 		public static function create($className, SegmentHandler $handler)
 		{
@@ -55,13 +57,13 @@ protected function uncacheClassName($className, SegmentHandler $handler) {
 			$handler->drop();
 			
 			$dao = ClassUtils::callStaticMethod($className.'::dao');
-			/* @var $dao StorableDAO */
+			/* @var $dao \Onphp\StorableDAO */
 			return Cache::worker($dao)->uncacheByQuery($dao->makeSelectHead());
 		}
 		
 		/**
-		 * @param UncacherVoodoDaoWorkerLists $uncacher
-		 * @return UncacherVoodoDaoWorkerLists
+		 * @param \Onphp\UncacherVoodoDaoWorkerLists $uncacher
+		 * @return \Onphp\UncacherVoodoDaoWorkerLists
 		 */
 		private function mergeSelf(UncacherVoodoDaoWorkerLists $uncacher)
 		{
diff --git a/main/DAOs/Uncachers/UncachersPool.class.php b/main/DAOs/Uncachers/UncachersPool.class.php
index dd07620800..0254c4572a 100644
--- a/main/DAOs/Uncachers/UncachersPool.class.php
+++ b/main/DAOs/Uncachers/UncachersPool.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Uncachers
 	**/
+	namespace Onphp;
+
 	class UncachersPool implements UncacherBase
 	{
 		private $uncachers = array();
 		
 		/**
-		 * @param UncacherBase $uncacher
-		 * @return UncachersPool
+		 * @param \Onphp\UncacherBase $uncacher
+		 * @return \Onphp\UncachersPool
 		 */
 		public static function create(UncacherBase $uncacher = null) {
 			return new self($uncacher);
@@ -46,7 +48,7 @@ public function merge(UncacherBase $uncacher) {
 		
 		public function uncache() {
 			foreach ($this->uncachers as $uncacher) {
-				/* @var $uncacher UncacherBase */
+				/* @var $uncacher \Onphp\UncacherBase */
 				$uncacher->uncache();
 			}
 		}
diff --git a/main/DAOs/Workers/BaseDaoWorker.class.php b/main/DAOs/Workers/BaseDaoWorker.class.php
index 3f83da4a0d..4f6fb15162 100644
--- a/main/DAOs/Workers/BaseDaoWorker.class.php
+++ b/main/DAOs/Workers/BaseDaoWorker.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	abstract class BaseDaoWorker implements BaseDAO
 	{
 		const SUFFIX_LIST	= '_list_';
@@ -37,7 +39,7 @@ public function __construct(GenericDAO $dao)
 		}
 		
 		/**
-		 * @return BaseDaoWorker
+		 * @return \Onphp\BaseDaoWorker
 		**/
 		public function setDao(GenericDAO $dao)
 		{
@@ -55,26 +57,38 @@ public function drop(Identifiable $object)
 		
 		public function dropById($id)
 		{
+			$uncacher = $this->dao->getUncacherById($id);
 			$result =
 				DBPool::getByDao($this->dao)->queryCount(
 					OSQL::delete()->from($this->dao->getTable())->
 					where(Expression::eq($this->dao->getIdName(), $id))
 				);
-			
-			$this->dao->uncacheById($id);
+
+			$uncacher->uncache();
 			
 			return $result;
 		}
 		
 		public function dropByIds(array $ids)
 		{
+			$uncacheIds = $ids;
+			$uncacher = null;
+			if (count($uncacheIds)) {
+				$uncacher = $this->dao->getUncacherById(array_shift($uncacheIds));
+				foreach ($uncacheIds as $id) {
+					$uncacher->merge($this->dao->getUncacherById($id));
+				}
+			}
+
 			$result =
 				DBPool::getByDao($this->dao)->queryCount(
 					OSQL::delete()->from($this->dao->getTable())->
 					where(Expression::in($this->dao->getIdName(), $ids))
 				);
-			
-			$this->dao->uncacheByIds($ids);
+
+			if ($uncacher) {
+				$uncacher->uncache();
+			}
 			
 			return $result;
 		}
@@ -88,7 +102,7 @@ public function uncacheById($id)
 		}
 		
 		/**
-		 * @return UncacherBase
+		 * @return \Onphp\UncacherBase
 		 */
 		public function getUncacherById($id)
 		{
diff --git a/main/DAOs/Workers/CacheDaoWorker.class.php b/main/DAOs/Workers/CacheDaoWorker.class.php
index 6aec991bc8..20fc6e1633 100644
--- a/main/DAOs/Workers/CacheDaoWorker.class.php
+++ b/main/DAOs/Workers/CacheDaoWorker.class.php
@@ -18,6 +18,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	class CacheDaoWorker extends TransparentDaoWorker
 	{
 		const MAX_RANDOM_ID = 134217728;
diff --git a/main/DAOs/Workers/CommonDaoWorker.class.php b/main/DAOs/Workers/CommonDaoWorker.class.php
index 3e3069fdba..275f75dbe9 100644
--- a/main/DAOs/Workers/CommonDaoWorker.class.php
+++ b/main/DAOs/Workers/CommonDaoWorker.class.php
@@ -16,6 +16,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	class CommonDaoWorker extends BaseDaoWorker
 	{
 		/// single object getters
@@ -481,7 +483,7 @@ public function dropById($id)
 		//@{
 		
 		/**
-		 * @return UncacherBase
+		 * @return \Onphp\UncacherBase
 		 */
 		public function getUncacherById($id)
 		{
diff --git a/main/DAOs/Workers/CustomDataScopedWorker.class.php b/main/DAOs/Workers/CustomDataScopedWorker.class.php
index 51c3acb1c2..b7b5564f4f 100644
--- a/main/DAOs/Workers/CustomDataScopedWorker.class.php
+++ b/main/DAOs/Workers/CustomDataScopedWorker.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class CustomDataScopedWorker extends CacheDaoWorker
 	{
 		public function __construct($dao)
diff --git a/main/DAOs/Workers/DalayedDropDaoWorker.class.php b/main/DAOs/Workers/DalayedDropDaoWorker.class.php
index 6f1296437d..bf74a6a04f 100644
--- a/main/DAOs/Workers/DalayedDropDaoWorker.class.php
+++ b/main/DAOs/Workers/DalayedDropDaoWorker.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class DalayedDropDaoWorker extends NullDaoWorker
 	{
 		private $modifiedIds = array();
@@ -32,7 +34,7 @@ public function uncacheById($id)
 		
 		/**
 		 * @param mixed $id
-		 * @return UncacherBase
+		 * @return \Onphp\UncacherBase
 		 */
 		public function getUncacherById($id) {
 			return UncacherNullDaoWorker::create();
diff --git a/main/DAOs/Workers/NullDaoWorker.class.php b/main/DAOs/Workers/NullDaoWorker.class.php
index 0bca425ec4..72b5a7ac35 100644
--- a/main/DAOs/Workers/NullDaoWorker.class.php
+++ b/main/DAOs/Workers/NullDaoWorker.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	class NullDaoWorker extends CommonDaoWorker
 	{
 		/// single object getters
@@ -127,7 +129,7 @@ public function uncacheById($id)
 		}
 		
 		/**
-		 * @return UncacherNullDaoWorker
+		 * @return \Onphp\UncacherNullDaoWorker
 		 */
 		public function getUncacherById($id) {
 			return UncacherNullDaoWorker::create();
diff --git a/main/DAOs/Workers/SmartDaoWorker.class.php b/main/DAOs/Workers/SmartDaoWorker.class.php
index 5782c9d0e3..2d391e6b50 100644
--- a/main/DAOs/Workers/SmartDaoWorker.class.php
+++ b/main/DAOs/Workers/SmartDaoWorker.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class SmartDaoWorker extends TransparentDaoWorker
 	{
 		private $indexKey	= null;
@@ -125,13 +127,21 @@ private function syncMap($objectKey)
 		{
 			$cache = Cache::me();
 			
-			if (!$map = $cache->mark($this->className)->get($this->indexKey))
+			$mapExists = true;
+			if (!$map = $cache->mark($this->className)->get($this->indexKey)) {
 				$map = array();
+				$mapExists = false;
+			}
 			
 			$map[$objectKey] = true;
-			
-			$cache->mark($this->className)->
-				set($this->indexKey, $map, Cache::EXPIRES_FOREVER);
+
+			if ($mapExists) {
+				$cache->mark($this->className)->
+					replace($this->indexKey, $map, Cache::EXPIRES_FOREVER);
+			} else {
+				$cache->mark($this->className)->
+					set($this->indexKey, $map, Cache::EXPIRES_FOREVER);
+			}
 			
 			return true;
 		}
@@ -161,4 +171,4 @@ private function checkMap($objectKey)
 		}
 		//@}
 	}
-?>
\ No newline at end of file
+?>
diff --git a/main/DAOs/Workers/TaggableDaoWorker.class.php b/main/DAOs/Workers/TaggableDaoWorker.class.php
new file mode 100644
index 0000000000..f0bdc3d67e
--- /dev/null
+++ b/main/DAOs/Workers/TaggableDaoWorker.class.php
@@ -0,0 +1,450 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2009 by Solomatin Alexandr                              *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	/**
+	 * For uncaching with more than one key
+	 * 
+	 * @ingroup DAOs
+	**/
+	namespace Onphp;
+
+	final class TaggableDaoWorker extends TransparentDaoWorker
+	{
+		const MAX_RANDOM_ID	= 134217728;
+		const TAG_VERSIONS	= 'tag_versions';
+		const KEY_POSTFIX	= 'taggable';
+		const LOCK_TIMEOUT	= 1600;		// msec
+		const LOCK_PREFIX	= 'lock_';
+
+		/**
+		 * @var TaggableHandler
+		 */
+		private static $handler = null;
+
+		private static $customTags = null;
+
+		public static function setHandler($handler)
+		{
+			Assert::classExists($handler);
+
+			self::$handler = new $handler();
+		}
+
+		public static function setCustomTags($tags)
+		{
+			Assert::isArray($tags);
+
+			self::$customTags = $tags;
+		}
+
+		public static function dropCustomTags()
+		{
+			self::$customTags = null;
+		}
+
+		public function expireTags($tags)
+		{
+			Assert::isArray($tags);
+
+			$this->updateTags($tags);
+
+			return $this;
+		}
+
+		/// cachers
+		//@{
+		protected function cacheByQuery(
+			SelectQuery $query,
+			/* Identifiable */ $object,
+			$expires = Cache::EXPIRES_FOREVER
+		)
+		{
+			$key = $this->makeQueryKey($query, self::SUFFIX_QUERY);
+
+			Cache::me()->
+				mark($this->className)->
+				set(
+					$key,
+					array(
+						'tags' => $this->getTagsForQuery($query),
+						'data' => $object,
+					),
+					$expires
+				);
+
+//			SemaphorePool::me()->free(self::LOCK_PREFIX.$key);
+
+			return $object;
+		}
+
+		protected function cacheById(
+			Identifiable $object, $expires = Cache::EXPIRES_FOREVER
+		)
+		{
+			if ($expires !== Cache::DO_NOT_CACHE) {
+
+				Cache::me()->
+					mark($this->className)->
+					set(
+						$this->makeIdKey($object->getId()),
+						array(
+							'tags' => $this->getTagsForObject($object),
+							'data' => $object,
+						),
+						$expires
+					);
+			}
+
+			return $object;
+		}
+
+		protected function cacheListByQuery(
+			SelectQuery $query,
+			/* array || Cache::NOT_FOUND */ $array,
+			$expires = Cache::EXPIRES_FOREVER
+		)
+		{
+			if ($array !== Cache::NOT_FOUND) {
+				Assert::isArray($array);
+				Assert::isTrue(current($array) instanceof Identifiable);
+			}
+
+			$key = $this->makeQueryKey($query, self::SUFFIX_LIST);
+
+			Cache::me()->
+				mark($this->className)->
+				set(
+					$key,
+					array(
+						'tags' => $this->getTagsForQuery($query),
+						'data' => $array,
+					),
+					$expires
+				);
+
+//			SemaphorePool::me()->free(self::LOCK_PREFIX.$key);
+
+			return $array;
+		}
+
+		protected function cacheNullById($id, $expires = Cache::EXPIRES_FOREVER)
+		{
+			return
+				Cache::me()->
+					mark($this->className)->
+					add(
+						$this->makeIdKey($id),
+						array(
+							'tags' => $this->getTagsForNullObject($id),
+							'data' => Cache::NOT_FOUND,
+						),
+						$expires
+					);
+		}
+		//@}
+
+		/// getters
+		//@{
+		public function getCachedById($id)
+		{
+			$result =
+				Cache::me()->
+					mark($this->className)->
+					get($this->makeIdKey($id));
+
+			if ($this->checkValid($result))
+				return $result['data'];
+
+			return null;
+		}
+
+		public function getListByIds(array $ids, $expires = Cache::EXPIRES_FOREVER)
+		{
+			$list = array();
+			$toFetch = array();
+			$prefixed = array();
+
+			$proto = $this->dao->getProtoClass();
+
+			$proto->beginPrefetch();
+
+			// dupes, if any, will be resolved later @ ArrayUtils::regularizeList
+			$ids = array_unique($ids);
+
+			foreach ($ids as $id)
+				$prefixed[$id] = $this->makeIdKey($id);
+
+			if (
+				$cachedList
+					= Cache::me()->mark($this->className)->getList($prefixed)
+			) {
+				foreach ($cachedList as $cached) {
+					if ($this->checkValid($cached)) {
+						$cached = $cached['data'];
+						if ($cached && ($cached !== Cache::NOT_FOUND)) {
+							$list[] = $this->dao->completeObject($cached);
+
+							unset($prefixed[$cached->getId()]);
+						}
+					}
+				}
+			}
+
+			$toFetch += array_keys($prefixed);
+
+			if ($toFetch) {
+				$remainList = array();
+				
+				foreach ($toFetch as $id) {
+					try {
+						$remainList[] = $this->getById($id);
+					} catch (ObjectNotFoundException $e) {/*_*/}
+				}
+				
+				$list = array_merge($list, $remainList);
+			}
+
+			$proto->endPrefetch($list);
+
+			return $list;
+		}
+		//@}
+
+		/// uncachers
+		//@{
+		public function uncacheById($id)
+		{
+			return $this->registerUncacher($this->getUncacherById($id));
+		}
+		
+		/**
+		 * @return UncacherBase
+		 */
+		public function getUncacherById($id)
+		{
+			$className = $this->className;
+			$idKey = $this->makeIdKey($id);
+			
+			try {
+				$object = $this->dao->getById($id);
+				$tags = self::$handler->getUncacheObjectTags($object, $className);
+			} catch (ObjectNotFoundException $e) {
+				$tags = array();
+			}
+			
+			return UncacherTaggableDaoWorker::create($className, $idKey, $tags);
+		}
+
+		public function uncacheByIds($ids)
+		{
+			if (empty($ids))
+				return;
+			
+			$uncacher = $this->getUncacherById(array_shift($ids));
+			
+			foreach ($ids as $id)
+				$uncacher->merge($this->getUncacherById($id));
+			
+			return $this->registerUncacher($uncacher);
+		}
+
+		public function uncacheLists()
+		{
+			$tags = self::$handler->getDefaultTags($this->className);
+			return $this->registerUncacher(
+				UncacherTaggableDaoWorkerTags::create($this->className, $tags)
+			);
+		}
+
+		//@}
+
+		/// internal helpers
+		//@{
+		protected function gentlyGetByKey($key)
+		{
+			$result =
+				Cache::me()->mark($this->className)->get($key);
+
+			if ($this->checkValid($result)) {
+				return $result['data'];
+			}
+
+//			$pool = SemaphorePool::me();
+//
+//			if (!$pool->get(self::LOCK_PREFIX.$key)) {
+//				if ($result && isset($result['data'])) {
+//					return $result['data'];
+//				} else {
+//					for ($msec = 0; $msec <= self::LOCK_TIMEOUT; $msec += 200) {
+//						usleep(200*1000);
+//						if ($pool->get(self::LOCK_PREFIX.$key)) {
+//							$result =
+//								Cache::me()->mark($this->className)->get($key);
+//
+//							$pool->free(self::LOCK_PREFIX.$key);
+//
+//							if ($this->checkValid($result)) {
+//								return $result['data'];
+//							} else {
+//								// лока уже нет, а кэш не перестроился
+//								continue;
+//							}
+//						}
+//					}
+//					// не дождались снятия лока
+//					throw new DeadLockException(
+//						"Cache deadlock. {$this->className} QueryKey={$key}"
+//					);
+//				}
+//			}
+
+			return null;
+		}
+
+		protected function checkValid($item)
+		{
+			return
+				$item
+				&& isset($item['data'])
+				&& isset($item['tags'])
+				&& $this->checkTagVersions($item['tags']);
+		}
+
+		/**
+		 * узнает список тегов которые используются в запросе,
+		 */
+		protected function getTagsForQuery(SelectQuery $query)
+		{
+			if (self::$customTags) {
+				$tags = self::$customTags;
+			} else {
+				$tags = self::$handler->getQueryTags($query, $this->className);
+			}
+
+			$tagList = array();
+			foreach ($tags as $tag) {
+				$tagList[$tag] = 0;
+			}
+
+			return $this->getTagVersions($tagList);
+		}
+
+		protected function getTagsForNullObject($id)
+		{
+			$tags = self::$handler->getNullObjectTags($id, $this->className);
+			$tagList = array();
+			foreach ($tags as $tag) {
+				$tagList[$tag] = 0;
+			}
+
+			return $this->getTagVersions($tagList);
+		}
+
+		protected function getTagVersions(/*array*/ $tags)
+		{
+			$time = microtime(true);
+			$tagsToFetch = array_keys($tags);
+
+			if (
+				!$result =
+					Cache::me()->
+						mark(self::TAG_VERSIONS)->
+						getList($tagsToFetch)
+			) {
+				$result = array();
+			}
+
+			$fetchedTags = array();
+			foreach ($tagsToFetch as $tag) {
+				$fetched = false;
+				foreach ($result as $key => $value) {
+					if (strpos($key, $tag) !== false) {
+						$fetched = true;
+						$fetchedTags[$tag] = $value;
+					}
+				}
+				if (!$fetched) {
+					Cache::me()->
+						mark(self::TAG_VERSIONS)->
+						set(
+							$tag,
+							$time,
+							Cache::EXPIRES_FOREVER
+						);
+
+					$fetchedTags[$tag] = $time;
+				}
+			}
+
+			return $fetchedTags;
+		}
+
+		/**
+		 * проверяет версии тегов
+		 */
+		protected function checkTagVersions(/*array*/ $tags)
+		{
+			$tagVersions = $this->getTagVersions($tags);
+			if ($tagVersions == $tags) {
+				return true;
+			}
+
+			return false;
+		}
+
+		protected function updateTagVersions(IdentifiableObject $object)
+		{
+			$tags = self::$handler->getUncacheObjectTags($object, $this->className);
+
+			$this->updateTags($tags);
+
+			return true;
+		}
+
+		protected function getTagsForObject(IdentifiableObject $object)
+		{
+			$tags = self::$handler->getCacheObjectTags($object, $this->className);
+			$tagList = array();
+			foreach ($tags as $tag) {
+				$tagList[$tag] = 0;
+			}
+
+			return $this->getTagVersions($tagList);
+		}
+
+		protected function updateTags($tags)
+		{
+			$time = microtime(true);
+			foreach ($tags as $tag) {
+				Cache::me()->
+					mark(self::TAG_VERSIONS)->
+					set(
+						$tag,
+						$time,
+						Cache::EXPIRES_FOREVER
+					);
+			}
+
+			return true;
+		}
+
+		protected function makeIdKey($id)
+		{
+			return parent::makeIdKey($id).self::KEY_POSTFIX;
+		}
+
+		protected function makeQueryKey(SelectQuery $query, $suffix)
+		{
+			return parent::makeQueryKey($query, $suffix).self::KEY_POSTFIX;
+		}
+		//@}
+	}
+?>
\ No newline at end of file
diff --git a/main/DAOs/Workers/TaggableHandler.class.php b/main/DAOs/Workers/TaggableHandler.class.php
new file mode 100644
index 0000000000..5d73cb8d1e
--- /dev/null
+++ b/main/DAOs/Workers/TaggableHandler.class.php
@@ -0,0 +1,32 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2009 by Solomatin Alexandr                              *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	namespace Onphp;
+
+	interface TaggableHandler
+	{
+		// get tag list for object
+		public function getCacheObjectTags(IdentifiableObject $object, $className);
+
+		// get tag list for object
+		public function getUncacheObjectTags(IdentifiableObject $object, $className);
+
+		// get tag list for query
+		public function getQueryTags(SelectQuery $query, $className);
+
+		// get tag list for null object
+		public function getNullObjectTags($id, $className);
+
+		// get default tag list
+		public function getDefaultTags($className);
+
+	}
+?>
\ No newline at end of file
diff --git a/main/DAOs/Workers/TaggableLayerHandler.class.php b/main/DAOs/Workers/TaggableLayerHandler.class.php
new file mode 100644
index 0000000000..11fe09e7a9
--- /dev/null
+++ b/main/DAOs/Workers/TaggableLayerHandler.class.php
@@ -0,0 +1,44 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2009 by Solomatin Alexandr                              *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	/**
+	 * Logic like in CacheDaoWorker
+	 */
+	namespace Onphp;
+
+	class TaggableLayerHandler implements TaggableHandler
+	{
+		public function getCacheObjectTags(IdentifiableObject $object, $className)
+		{
+			return array($className);
+		}
+
+		public function getUncacheObjectTags(IdentifiableObject $object, $className)
+		{
+			return array($className);
+		}
+
+		public function getQueryTags(SelectQuery $query, $className)
+		{
+			return array($className);
+		}
+
+		public function getNullObjectTags($id, $className)
+		{
+			return $this->getDefaultTags($className);
+		}
+
+		public function getDefaultTags($className)
+		{
+			return array($className);
+		}
+	}
+?>
\ No newline at end of file
diff --git a/main/DAOs/Workers/TaggableSmartHandler.class.php b/main/DAOs/Workers/TaggableSmartHandler.class.php
new file mode 100644
index 0000000000..6f2ec7e803
--- /dev/null
+++ b/main/DAOs/Workers/TaggableSmartHandler.class.php
@@ -0,0 +1,288 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	/**
+	 * Street magic logic
+	 */
+	namespace Onphp;
+
+	class TaggableSmartHandler implements TaggableHandler
+	{
+		const ID_POSTFIX = '|id|';
+
+		public function getCacheObjectTags(IdentifiableObject $object, $className)
+		{
+			return array($this->getTagByClassAndId($className, $object->getId()));
+		}
+
+		public function getUncacheObjectTags(IdentifiableObject $object, $className)
+		{
+			$tags = $this->getCacheObjectTags($object, $className);
+			$tags = array_merge($this->getDefaultTags($className), $tags);
+
+			foreach ($this->getLinkProperties($className) as $name => $property) {
+				/* @var $property LightMetaProperty */
+				if ($name == 'id') {
+					continue;
+				}
+				if ($property->getClassName()) {
+					if ($property->getRelationId() == MetaRelation::ONE_TO_ONE) {
+						if ($property->getFetchStrategyId() == FetchStrategy::LAZY) {
+							if ($linkedObjectId = $object->{$property->getGetter().'Id'}()) {
+								$tags[] = $this->getTagByClassAndId($property->getClassName(), $linkedObjectId);
+							}
+						} elseif ($property->getFetchStrategyId()) {
+							if (
+								($linkedObject = $object->{$property->getGetter()}())
+								&& $linkedObject instanceof IdentifiableObject
+								&& $linkedObjectId = $linkedObject->getId()
+							) {
+								$tags[] = $this->getTagByClassAndId($property->getClassName(), $linkedObjectId);
+							}
+						}
+					} elseif ($property->getRelationId() == MetaRelation::MANY_TO_MANY) {
+						$daoHelper = $object->{$property->getGetter()}();
+						/* @var $daoHelper ManyToManyLinked */
+						$tags[] = $daoHelper->getHelperTable();
+					}
+				}
+			}
+
+			return $tags;
+		}
+
+		public function getQueryTags(SelectQuery $query, $className)
+		{
+			$columns = $this->getLinkObjectColumnListByClass($className);
+
+			$tagList = array();
+			if ($query->getTablesCount() > 1 || !$this->isLazy($className)) {
+				foreach ($query->getJoinedTables() as $table) {
+					/* @var $table SQLRealTableName */
+					$tagList[] = $table->getRealTable();
+				}
+			} else {
+				foreach ($query->getWhere() as $whereObject) {
+					if ($whereObject instanceof BinaryExpression) {
+						if ($tag = $this->getTagByBinaryExpression($whereObject, $query, $className, $columns)) {
+							$tagList[] = $tag;
+						}
+					} elseif ($whereObject instanceof InExpression) {
+						foreach ($this->getTagsByInExpression($whereObject, $query, $className, $columns) as $tag) {
+							$tagList[] = $tag;
+						}
+					}
+					if ($whereObject instanceof LogicalChain) {
+						foreach ($whereObject->getChain() as $logic) {
+							if ($logic instanceof BinaryExpression) {
+								if ($tag = $this->getTagByBinaryExpression($logic, $query, $className, $columns)) {
+									$tagList[] = $tag;
+								}
+							} elseif ($logic instanceof InExpression) {
+								foreach ($this->getTagsByInExpression($logic, $query, $className, $columns) as $tag) {
+									$tagList[] = $tag;
+								}
+							}
+						}
+					}
+				}
+				
+				if (empty($tagList)) {
+					$tagList = $this->getDefaultTags($className);
+				}
+			}
+
+			return $tagList;
+		}
+
+		public function getNullObjectTags($id, $className)
+		{
+			$tags = $this->getDefaultTags($className);
+			$tags[] = $this->getTagByClassAndId($className, $id);
+
+			return $tags;
+		}
+
+		public function getDefaultTags($className)
+		{
+			return array($this->getTableByClassName($className));
+		}
+
+		protected function getTagByClassAndId($className, $id)
+		{
+			return $this->getTableByClassName($className).self::ID_POSTFIX.$id;
+		}
+
+		protected final function getTagsByInExpression(InExpression $expression, SelectQuery $query, &$className, &$columns)
+		{
+			$tags = [];
+			if ($expression->getLogic() == InExpression::IN) {
+				$first = $expression->getLeft();
+				$second = $expression->getRight();
+
+				$columnClassName = $this->getColumnClassName($first, $query, $className, $columns);
+				$idValues = $this->getIdValues($second);
+				if ($columnClassName) {
+					foreach ($idValues as $idValue) {
+						$tags[] = $this->getTagByClassAndId($columnClassName, $idValue);
+					}
+				}
+			}
+			return $tags;
+		}
+
+		protected final function getTagByBinaryExpression(BinaryExpression $expression, SelectQuery $query, &$className, &$columns)
+		{
+			$tag = null;
+
+			if ($expression->getLogic() == BinaryExpression::EQUALS) {
+				$first = $expression->getLeft();
+				$second = $expression->getRight();
+				if ($second instanceof DBField || $first instanceof DBValue) {
+					$first = $expression->getRight();
+					$second = $expression->getLeft();
+				}
+				
+				$columnClassName = $this->getColumnClassName($first, $query, $className, $columns);
+				$idValue = $this->getIdValue($second);
+
+				if ($columnClassName && $idValue) {
+					$tag = $this->getTagByClassAndId($columnClassName, $idValue);
+				}
+			}
+
+			return $tag;
+		}
+
+		protected function getColumnClassName($first, SelectQuery $query, &$className, &$columns)
+		{
+			if (
+				$first instanceof DBField
+				&& isset($columns[$first->getField()])
+			) {
+				if ($first->getTable() === null) {
+					$table = $query->getFirstTable();
+				} elseif ($first->getTable() instanceof FromTable) {
+					$table = $first->getTable();
+				}
+				if ($table instanceof FromTable) {
+					$table = $table->getTable();
+				}
+
+				if ($table !== null && $table == $this->getTableByClassName($className)) {
+					return $columns[$first->getField()];
+				}
+			} elseif (is_string($first) && $first && isset($columns[$first])) {
+				$table = $query->getFirstTable();
+				if ($table instanceof FromTable) {
+					$table = $table->getTable();
+				}
+				if ($table !== null && $table == $this->getTableByClassName($className)) {
+					return $columns[$first];
+				}
+			}
+		}
+
+		protected function getIdValue($second)
+		{
+			if ($second instanceof DBValue) {
+				return $second->getValue();
+			} elseif ((is_integer($second) || is_string($second)) && $second) {
+				return $second;
+			}
+		}
+
+		protected function getIdValues(array $second)
+		{
+			$results = [];
+			foreach ($second as $value) {
+				if ($result = $this->getIdValue($value)) {
+					$results[] = $result;
+				} else {
+					return [];
+				}
+			}
+			return $results;
+		}
+
+		protected function getLinkObjectColumnListByClass($className)
+		{
+			static $result = array();
+			if (!isset($result[$className])) {
+				$columnList = array();
+				foreach ($this->getLinkProperties($className) as $property) {
+					/* @var $property LightMetaProperty */
+					if ($property->getRelationId() == MetaRelation::ONE_TO_ONE || $property->getName() == 'id') {
+						$columnList[$property->getColumnName()] = $property->getClassName();
+					}
+				}
+				$result[$className] = $columnList;
+			}
+			return $result[$className];
+		}
+		
+		protected function getTableByClassName($className) {
+			if (ClassUtils::isInstanceOf($className, '\Onphp\DAOConnected')) {
+				return ClassUtils::callStaticMethod("{$className}::dao")->getTable();
+			} else {
+				return $className.'|className|';
+			}
+		}
+
+		protected function isLazy($className)
+		{
+			foreach ($this->getLinkProperties($className) as $property) {
+				if (
+					$property->getRelationId() == MetaRelation::ONE_TO_ONE
+					&& ($property->getFetchStrategyId() == FetchStrategy::CASCADE
+						|| $property->getFetchStrategyId() == FetchStrategy::JOIN)
+				) {
+					return false;
+				}
+			}
+
+			return true;
+		}
+		
+		protected function getLinkProperties($className) {
+			$propertyList = array();
+			foreach ($this->getPropertiesByClassName($className) as $name => $property) {
+				if ($property instanceof InnerMetaProperty) {
+					$propertyList = array_merge(
+						$propertyList,
+						$this->getLinkProperties($property->getClassName())
+					);
+				} elseif ($property instanceof LightMetaProperty) {
+					switch ($property->getType()) {
+						case 'identifier':
+						case 'identifierList':
+						case 'integerIdentifier':
+						case 'integerIdentifierList':
+						case 'scalarIdentifier':
+						case 'scalarIdentifierList':
+							if ($property->getClassName()) {
+								$propertyList[] = $property;
+							}
+							break;
+					}
+				}
+			}
+			return $propertyList;
+		}
+
+		protected function getPropertiesByClassName($className)
+		{
+			$proto = ClassUtils::callStaticMethod($className.'::proto');
+
+			return $proto->getPropertyList();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/main/DAOs/Workers/TransparentDaoWorker.class.php b/main/DAOs/Workers/TransparentDaoWorker.class.php
index 8fe06bf7ff..dfeb646850 100644
--- a/main/DAOs/Workers/TransparentDaoWorker.class.php
+++ b/main/DAOs/Workers/TransparentDaoWorker.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	abstract class TransparentDaoWorker extends CommonDaoWorker
 	{
 		abstract protected function gentlyGetByKey($key);
diff --git a/main/DAOs/Workers/VoodooDaoWorker.class.php b/main/DAOs/Workers/VoodooDaoWorker.class.php
index 9d700f63b3..cb75c5a260 100644
--- a/main/DAOs/Workers/VoodooDaoWorker.class.php
+++ b/main/DAOs/Workers/VoodooDaoWorker.class.php
@@ -26,11 +26,13 @@
 	 * 
 	 * @ingroup DAOs
 	**/
+	namespace Onphp;
+
 	final class VoodooDaoWorker extends TransparentDaoWorker
 	{
 		private $classKey = null;
 		/**
-		 * @var SegmentHandler
+		 * @var \Onphp\SegmentHandler
 		 */
 		private $handler = null;
 		
@@ -124,18 +126,18 @@ private function spawnHandler($classKey)
 		{
 			if (!self::$defaultHandler) {
 				if (extension_loaded('sysvshm')) {
-					$handlerName = 'SharedMemorySegmentHandler';
+					$handlerName = '\Onphp\SharedMemorySegmentHandler';
 				} elseif (extension_loaded('sysvmsg')) {
-					$handlerName = 'MessageSegmentHandler';
+					$handlerName = '\Onphp\MessageSegmentHandler';
 				} else {
 					if (extension_loaded('eaccelerator')) {
 						$handlerName = 'eAcceleratorSegmentHandler';
 					} elseif (extension_loaded('apc')) {
-						$handlerName = 'ApcSegmentHandler';
+						$handlerName = '\Onphp\ApcSegmentHandler';
 					} elseif (extension_loaded('xcache')) {
-						$handlerName = 'XCacheSegmentHandler';
+						$handlerName = '\Onphp\XCacheSegmentHandler';
 					} else {
-						$handlerName = 'CacheSegmentHandler';
+						$handlerName = '\Onphp\CacheSegmentHandler';
 					}
 				}
 			} else {
diff --git a/main/EntityProto/Accessors/DTOGetter.class.php b/main/EntityProto/Accessors/DTOGetter.class.php
index 75855a01f7..d0ff137930 100644
--- a/main/EntityProto/Accessors/DTOGetter.class.php
+++ b/main/EntityProto/Accessors/DTOGetter.class.php
@@ -9,19 +9,21 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DTOGetter extends PrototypedGetter
 	{
 		private $soapDto	= true;
 		
 		public function __construct(EntityProto $proto, $object)
 		{
-			Assert::isInstance($object, 'DTOClass');
+			Assert::isInstance($object, '\Onphp\DTOClass');
 			
 			return parent::__construct($proto, $object);
 		}
 		
 		/**
-		 * @return DTOGetter
+		 * @return \Onphp\DTOGetter
 		**/
 		public function setSoapDto($soapDto)
 		{
diff --git a/main/EntityProto/Accessors/DTOSetter.class.php b/main/EntityProto/Accessors/DTOSetter.class.php
index 187830c848..9ad649b0ca 100644
--- a/main/EntityProto/Accessors/DTOSetter.class.php
+++ b/main/EntityProto/Accessors/DTOSetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DTOSetter extends PrototypedSetter
 	{
 		private $getter = null;
@@ -97,7 +99,7 @@ private function dtoValue($value, BasePrimitive $primitive)
 		}
 		
 		/**
-		 * @return DTOGetter
+		 * @return \Onphp\DTOGetter
 		**/
 		public function getGetter()
 		{
diff --git a/main/EntityProto/Accessors/DirectoryGetter.class.php b/main/EntityProto/Accessors/DirectoryGetter.class.php
index d289c15ff0..50fc661d2f 100644
--- a/main/EntityProto/Accessors/DirectoryGetter.class.php
+++ b/main/EntityProto/Accessors/DirectoryGetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DirectoryGetter extends PrototypedGetter
 	{
 		public function get($name)
diff --git a/main/EntityProto/Accessors/DirectoryMutator.class.php b/main/EntityProto/Accessors/DirectoryMutator.class.php
index 7f85e03684..fa6a85e10c 100644
--- a/main/EntityProto/Accessors/DirectoryMutator.class.php
+++ b/main/EntityProto/Accessors/DirectoryMutator.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class DirectoryMutator extends PrototypedSetter
 	{
 		private $getter = null;
@@ -24,7 +26,7 @@ public function __construct(EntityProto $proto, &$object)
 		}
 		
 		/**
-		 * @return FormGetter
+		 * @return \Onphp\FormGetter
 		**/
 		public function getGetter()
 		{
diff --git a/main/EntityProto/Accessors/DirectorySetter.class.php b/main/EntityProto/Accessors/DirectorySetter.class.php
index 7f1e203a98..895fcae791 100644
--- a/main/EntityProto/Accessors/DirectorySetter.class.php
+++ b/main/EntityProto/Accessors/DirectorySetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DirectorySetter extends DirectoryMutator
 	{
 		public function set($name, $value)
diff --git a/main/EntityProto/Accessors/FormExporter.class.php b/main/EntityProto/Accessors/FormExporter.class.php
index edcd9a7b41..65de53a658 100644
--- a/main/EntityProto/Accessors/FormExporter.class.php
+++ b/main/EntityProto/Accessors/FormExporter.class.php
@@ -9,11 +9,13 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FormExporter extends PrototypedGetter
 	{
 		public function __construct(EntityProto $proto, $object)
 		{
-			Assert::isInstance($object, 'Form');
+			Assert::isInstance($object, '\Onphp\Form');
 			
 			return parent::__construct($proto, $object);
 		}
diff --git a/main/EntityProto/Accessors/FormGetter.class.php b/main/EntityProto/Accessors/FormGetter.class.php
index 572a007f24..3a13b35e08 100644
--- a/main/EntityProto/Accessors/FormGetter.class.php
+++ b/main/EntityProto/Accessors/FormGetter.class.php
@@ -9,11 +9,13 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FormGetter extends PrototypedGetter
 	{
 		public function __construct(EntityProto $proto, &$object)
 		{
-			Assert::isInstance($object, 'Form');
+			Assert::isInstance($object, '\Onphp\Form');
 			
 			return parent::__construct($proto, $object);
 		}
diff --git a/main/EntityProto/Accessors/FormHardenedSetter.class.php b/main/EntityProto/Accessors/FormHardenedSetter.class.php
index a05247c83c..020805a0d8 100644
--- a/main/EntityProto/Accessors/FormHardenedSetter.class.php
+++ b/main/EntityProto/Accessors/FormHardenedSetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FormHardenedSetter extends FormMutator
 	{
 		public function set($name, $value)
diff --git a/main/EntityProto/Accessors/FormImporter.class.php b/main/EntityProto/Accessors/FormImporter.class.php
index aa8f72212e..a6743c0b2d 100644
--- a/main/EntityProto/Accessors/FormImporter.class.php
+++ b/main/EntityProto/Accessors/FormImporter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FormImporter extends FormMutator
 	{
 		public function set($name, $value)
diff --git a/main/EntityProto/Accessors/FormMutator.class.php b/main/EntityProto/Accessors/FormMutator.class.php
index 6f5590e3bf..4b0391f387 100644
--- a/main/EntityProto/Accessors/FormMutator.class.php
+++ b/main/EntityProto/Accessors/FormMutator.class.php
@@ -9,19 +9,21 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class FormMutator extends PrototypedSetter
 	{
 		private $getter = null;
 		
 		public function __construct(EntityProto $proto, &$object)
 		{
-			Assert::isInstance($object, 'Form');
+			Assert::isInstance($object, '\Onphp\Form');
 			
 			return parent::__construct($proto, $object);
 		}
 		
 		/**
-		 * @return FormGetter
+		 * @return \Onphp\FormGetter
 		**/
 		public function getGetter()
 		{
diff --git a/main/EntityProto/Accessors/FormSetter.class.php b/main/EntityProto/Accessors/FormSetter.class.php
index 7e1ecf8f15..260c82d348 100644
--- a/main/EntityProto/Accessors/FormSetter.class.php
+++ b/main/EntityProto/Accessors/FormSetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FormSetter extends FormMutator
 	{
 		public function set($name, $value)
diff --git a/main/EntityProto/Accessors/ObjectGetter.class.php b/main/EntityProto/Accessors/ObjectGetter.class.php
index 712ecd1bca..5824da89e1 100644
--- a/main/EntityProto/Accessors/ObjectGetter.class.php
+++ b/main/EntityProto/Accessors/ObjectGetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ObjectGetter extends PrototypedGetter
 	{
 		public function get($name)
diff --git a/main/EntityProto/Accessors/ObjectSetter.class.php b/main/EntityProto/Accessors/ObjectSetter.class.php
index 17e8322a86..3bf93b346b 100644
--- a/main/EntityProto/Accessors/ObjectSetter.class.php
+++ b/main/EntityProto/Accessors/ObjectSetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ObjectSetter extends PrototypedSetter
 	{
 		private $getter = null;
@@ -35,7 +37,7 @@ public function set($name, $value)
 		}
 		
 		/**
-		 * @return ObjectGetter
+		 * @return \Onphp\ObjectGetter
 		**/
 		public function getGetter()
 		{
diff --git a/main/EntityProto/Accessors/ScopeGetter.class.php b/main/EntityProto/Accessors/ScopeGetter.class.php
index 3c22e175c8..7dfab62e40 100644
--- a/main/EntityProto/Accessors/ScopeGetter.class.php
+++ b/main/EntityProto/Accessors/ScopeGetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ScopeGetter extends PrototypedGetter
 	{
 		public function get($name)
diff --git a/main/EntityProto/Accessors/ScopeSetter.class.php b/main/EntityProto/Accessors/ScopeSetter.class.php
index b23aa8e010..496f43def9 100644
--- a/main/EntityProto/Accessors/ScopeSetter.class.php
+++ b/main/EntityProto/Accessors/ScopeSetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ScopeSetter extends PrototypedSetter
 	{
 		private $getter = null;
@@ -37,7 +39,7 @@ public function set($name, $value)
 		}
 		
 		/**
-		 * @return ScopeGetter
+		 * @return \Onphp\ScopeGetter
 		**/
 		public function getGetter()
 		{
diff --git a/main/EntityProto/Builders/DTOBuilder.class.php b/main/EntityProto/Builders/DTOBuilder.class.php
index 5971077f38..d4eca7f01e 100644
--- a/main/EntityProto/Builders/DTOBuilder.class.php
+++ b/main/EntityProto/Builders/DTOBuilder.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class DTOBuilder extends PrototypedBuilder
 	{
 		protected function createEmpty()
diff --git a/main/EntityProto/Builders/DTOToFormImporter.class.php b/main/EntityProto/Builders/DTOToFormImporter.class.php
index 6e4dfbc709..abf008268b 100644
--- a/main/EntityProto/Builders/DTOToFormImporter.class.php
+++ b/main/EntityProto/Builders/DTOToFormImporter.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DTOToFormImporter extends FormBuilder
 	{
 		/**
-		 * @return DTOToFormImporter
+		 * @return \Onphp\DTOToFormImporter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -20,7 +22,7 @@ public static function create(EntityProto $proto)
 		}
 		
 		/**
-		 * @return FormImporter
+		 * @return \Onphp\FormImporter
 		**/
 		protected function getGetter($object)
 		{
@@ -28,7 +30,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return FormImporter
+		 * @return \Onphp\FormImporter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/DTOToScopeConverter.class.php b/main/EntityProto/Builders/DTOToScopeConverter.class.php
index 481c2ca9a7..6f735e9c23 100644
--- a/main/EntityProto/Builders/DTOToScopeConverter.class.php
+++ b/main/EntityProto/Builders/DTOToScopeConverter.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DTOToScopeConverter extends PrototypedBuilder
 	{
 		/**
-		 * @return DTOToScopeConverter
+		 * @return \Onphp\DTOToScopeConverter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -25,7 +27,7 @@ protected function createEmpty()
 		}
 		
 		/**
-		 * @return DTOGetter
+		 * @return \Onphp\DTOGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -33,7 +35,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return ScopeSetter
+		 * @return \Onphp\ScopeSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/DirectoryBuilder.class.php b/main/EntityProto/Builders/DirectoryBuilder.class.php
index 9c041ff79a..e61710947b 100644
--- a/main/EntityProto/Builders/DirectoryBuilder.class.php
+++ b/main/EntityProto/Builders/DirectoryBuilder.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class DirectoryBuilder extends PrototypedBuilder
 	{
 		protected $directory	= null;
@@ -59,7 +61,7 @@ public function getIdentityMap()
 		}
 
 		/**
-		 * @return PrototypedBuilder
+		 * @return \Onphp\PrototypedBuilder
 		**/
 		public function cloneBuilder(EntityProto $proto)
 		{
diff --git a/main/EntityProto/Builders/DirectoryToObjectBinder.class.php b/main/EntityProto/Builders/DirectoryToObjectBinder.class.php
index 43b99374ab..33ba1d45c0 100644
--- a/main/EntityProto/Builders/DirectoryToObjectBinder.class.php
+++ b/main/EntityProto/Builders/DirectoryToObjectBinder.class.php
@@ -9,12 +9,14 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DirectoryToObjectBinder extends ObjectBuilder
 	{
 		private $identityMap = null;
 		
 		/**
-		 * @return FormToObjectConverter
+		 * @return \Onphp\FormToObjectConverter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -36,7 +38,7 @@ public function setIdentityMap(DirectoryContext $identityMap)
 		}
 		
 		/**
-		 * @return DirectoryContext
+		 * @return \Onphp\DirectoryContext
 		**/
 		public function getIdentityMap()
 		{
@@ -44,7 +46,7 @@ public function getIdentityMap()
 		}
 		
 		/**
-		 * @return PrototypedBuilder
+		 * @return \Onphp\PrototypedBuilder
 		**/
 		public function cloneBuilder(EntityProto $proto)
 		{
@@ -65,7 +67,7 @@ public function cloneInnerBuilder($property)
 		}
 		
 		/**
-		 * @return PrototypedBuilder
+		 * @return \Onphp\PrototypedBuilder
 		**/
 		public function makeReverseBuilder()
 		{
@@ -105,7 +107,7 @@ protected function initialize($object, &$result)
 		}
 		
 		/**
-		 * @return FormGetter
+		 * @return \Onphp\FormGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -113,7 +115,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return ObjectSetter
+		 * @return \Onphp\ObjectSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/FormBuilder.class.php b/main/EntityProto/Builders/FormBuilder.class.php
index 54fb7a81d7..70efeb43b2 100644
--- a/main/EntityProto/Builders/FormBuilder.class.php
+++ b/main/EntityProto/Builders/FormBuilder.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class FormBuilder extends PrototypedBuilder
 	{
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		protected function createEmpty()
 		{
@@ -20,11 +22,11 @@ protected function createEmpty()
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function fillOwn($object, &$result)
 		{
-			Assert::isInstance($result, 'Form');
+			Assert::isInstance($result, '\Onphp\Form');
 			
 			foreach ($this->getFormMapping() as $primitive) {
 				if (
diff --git a/main/EntityProto/Builders/FormToObjectConverter.class.php b/main/EntityProto/Builders/FormToObjectConverter.class.php
index 64ec5a41c6..c1ecfade4b 100644
--- a/main/EntityProto/Builders/FormToObjectConverter.class.php
+++ b/main/EntityProto/Builders/FormToObjectConverter.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FormToObjectConverter extends ObjectBuilder
 	{
 		/**
-		 * @return FormToObjectConverter
+		 * @return \Onphp\FormToObjectConverter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -20,7 +22,7 @@ public static function create(EntityProto $proto)
 		}
 		
 		/**
-		 * @return FormGetter
+		 * @return \Onphp\FormGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -28,7 +30,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return ObjectSetter
+		 * @return \Onphp\ObjectSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/FormToScopeExporter.class.php b/main/EntityProto/Builders/FormToScopeExporter.class.php
index 4e37048e9c..32b1819193 100644
--- a/main/EntityProto/Builders/FormToScopeExporter.class.php
+++ b/main/EntityProto/Builders/FormToScopeExporter.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FormToScopeExporter extends ObjectBuilder
 	{
 		/**
-		 * @return FormToObjectConverter
+		 * @return \Onphp\FormToObjectConverter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -25,7 +27,7 @@ protected function createEmpty()
 		}
 		
 		/**
-		 * @return FormGetter
+		 * @return \Onphp\FormGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -33,7 +35,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return ObjectSetter
+		 * @return \Onphp\ObjectSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/ObjectBuilder.class.php b/main/EntityProto/Builders/ObjectBuilder.class.php
index e0d722363d..8d92747808 100644
--- a/main/EntityProto/Builders/ObjectBuilder.class.php
+++ b/main/EntityProto/Builders/ObjectBuilder.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class ObjectBuilder extends PrototypedBuilder
 	{
 		protected function createEmpty()
diff --git a/main/EntityProto/Builders/ObjectToDTOConverter.class.php b/main/EntityProto/Builders/ObjectToDTOConverter.class.php
index e4c05f1230..03335fd45a 100644
--- a/main/EntityProto/Builders/ObjectToDTOConverter.class.php
+++ b/main/EntityProto/Builders/ObjectToDTOConverter.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ObjectToDTOConverter extends DTOBuilder
 	{
 		/**
-		 * @return ObjectToDTOConverter
+		 * @return \Onphp\ObjectToDTOConverter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -20,7 +22,7 @@ public static function create(EntityProto $proto)
 		}
 		
 		/**
-		 * @return ObjectGetter
+		 * @return \Onphp\ObjectGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -28,7 +30,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return DTOSetter
+		 * @return \Onphp\DTOSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/ObjectToDirectoryBinder.class.php b/main/EntityProto/Builders/ObjectToDirectoryBinder.class.php
index f5670b403d..16f77f55e6 100644
--- a/main/EntityProto/Builders/ObjectToDirectoryBinder.class.php
+++ b/main/EntityProto/Builders/ObjectToDirectoryBinder.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ObjectToDirectoryBinder extends DirectoryBuilder
 	{
 		/**
-		 * @return ObjectToFormConverter
+		 * @return \Onphp\ObjectToFormConverter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -100,7 +102,7 @@ public function make($object, $recursive = true)
 		}
 
 		/**
-		 * @return PrototypedBuilder
+		 * @return \Onphp\PrototypedBuilder
 		**/
 		public function makeReverseBuilder()
 		{
@@ -110,7 +112,7 @@ public function makeReverseBuilder()
 		}
 
 		/**
-		 * @return ObjectGetter
+		 * @return \Onphp\ObjectGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -118,7 +120,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return FormSetter
+		 * @return \Onphp\FormSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/ObjectToFormConverter.class.php b/main/EntityProto/Builders/ObjectToFormConverter.class.php
index c3a24267f4..195d3e2d11 100644
--- a/main/EntityProto/Builders/ObjectToFormConverter.class.php
+++ b/main/EntityProto/Builders/ObjectToFormConverter.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ObjectToFormConverter extends FormBuilder
 	{
 		/**
-		 * @return ObjectToFormConverter
+		 * @return \Onphp\ObjectToFormConverter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -20,7 +22,7 @@ public static function create(EntityProto $proto)
 		}
 		
 		/**
-		 * @return ObjectGetter
+		 * @return \Onphp\ObjectGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -28,7 +30,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return FormSetter
+		 * @return \Onphp\FormSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/ObjectToFormSetter.class.php b/main/EntityProto/Builders/ObjectToFormSetter.class.php
index 43e0e71784..8160a979da 100644
--- a/main/EntityProto/Builders/ObjectToFormSetter.class.php
+++ b/main/EntityProto/Builders/ObjectToFormSetter.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ObjectToFormSetter extends FormBuilder
 	{
 		/**
-		 * @return ObjectToFormSetter
+		 * @return \Onphp\ObjectToFormSetter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -20,7 +22,7 @@ public static function create(EntityProto $proto)
 		}
 		
 		/**
-		 * @return ObjectGetter
+		 * @return \Onphp\ObjectGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -28,7 +30,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return FormSetter
+		 * @return \Onphp\FormSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/ObjectToObjectCast.class.php b/main/EntityProto/Builders/ObjectToObjectCast.class.php
index a08118fb7b..9de3d3efb4 100644
--- a/main/EntityProto/Builders/ObjectToObjectCast.class.php
+++ b/main/EntityProto/Builders/ObjectToObjectCast.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ObjectToObjectCast extends ObjectBuilder
 	{
 		/**
-		 * @return ObjectToObjectCast
+		 * @return \Onphp\ObjectToObjectCast
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -20,7 +22,7 @@ public static function create(EntityProto $proto)
 		}
 		
 		/**
-		 * @return ObjectGetter
+		 * @return \Onphp\ObjectGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -28,7 +30,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return ObjectSetter
+		 * @return \Onphp\ObjectSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/Builders/ScopeToFormImporter.class.php b/main/EntityProto/Builders/ScopeToFormImporter.class.php
index 14c54539e4..2cc56c98d8 100644
--- a/main/EntityProto/Builders/ScopeToFormImporter.class.php
+++ b/main/EntityProto/Builders/ScopeToFormImporter.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ScopeToFormImporter extends FormBuilder
 	{
 		/**
-		 * @return ScopeToFormImporter
+		 * @return \Onphp\ScopeToFormImporter
 		**/
 		public static function create(EntityProto $proto)
 		{
@@ -20,7 +22,7 @@ public static function create(EntityProto $proto)
 		}
 		
 		/**
-		 * @return ObjectGetter
+		 * @return \Onphp\ObjectGetter
 		**/
 		protected function getGetter($object)
 		{
@@ -28,7 +30,7 @@ protected function getGetter($object)
 		}
 		
 		/**
-		 * @return FormSetter
+		 * @return \Onphp\FormSetter
 		**/
 		protected function getSetter(&$object)
 		{
diff --git a/main/EntityProto/DirectoryContext.class.php b/main/EntityProto/DirectoryContext.class.php
index e40bdd4cd6..e86ffe1759 100644
--- a/main/EntityProto/DirectoryContext.class.php
+++ b/main/EntityProto/DirectoryContext.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class DirectoryContext
 	{
 		private $map = array();
diff --git a/main/EntityProto/EntityProto.class.php b/main/EntityProto/EntityProto.class.php
index 776767926b..c628b179b5 100644
--- a/main/EntityProto/EntityProto.class.php
+++ b/main/EntityProto/EntityProto.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	class EntityProto extends Singleton
 	{
 		const PROTO_CLASS_PREFIX = 'EntityProto';
@@ -71,7 +73,7 @@ final public function validate(
 			}
 			
 			Assert::isInstance($object, $this->className());
-			Assert::isInstance($form, 'Form');
+			Assert::isInstance($form, '\Onphp\Form');
 			
 			if ($previousObject)
 				Assert::isInstance($previousObject, $this->className());
@@ -171,7 +173,7 @@ final public function createObject()
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		 * 
 		 * @deprecated you should use PrototypedBuilder to make forms
 		**/
@@ -187,7 +189,7 @@ final public function makeForm()
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		final public function attachPrimitives(Form $form)
 		{
diff --git a/main/EntityProto/PrototypedBuilder.class.php b/main/EntityProto/PrototypedBuilder.class.php
index f8ab13cebd..ac49cfe97b 100644
--- a/main/EntityProto/PrototypedBuilder.class.php
+++ b/main/EntityProto/PrototypedBuilder.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class PrototypedBuilder
 	{
 		protected $proto		= null;
@@ -18,12 +20,12 @@ abstract class PrototypedBuilder
 		abstract protected function createEmpty();
 		
 		/**
-		 * @return PrototypedGetter
+		 * @return \Onphp\PrototypedGetter
 		**/
 		abstract protected function getGetter($object);
 		
 		/**
-		 * @return PrototypedSetter
+		 * @return \Onphp\PrototypedSetter
 		**/
 		abstract protected function getSetter(&$object);
 		
@@ -48,7 +50,7 @@ public function setLimitedPropertiesList($list)
 		}
 		
 		/**
-		 * @return PrototypedBuilder
+		 * @return \Onphp\PrototypedBuilder
 		**/
 		public function cloneBuilder(EntityProto $proto)
 		{
@@ -74,7 +76,7 @@ public function cloneInnerBuilder($property)
 			
 			$primitive = $mapping[$property];
 			
-			Assert::isInstance($primitive, 'PrimitiveForm');
+			Assert::isInstance($primitive, '\Onphp\PrimitiveForm');
 			
 			$result = new $this($primitive->getProto());
 			
@@ -93,7 +95,7 @@ public function makeListItemBuilder($object)
 		}
 		
 		/**
-		 * @return PrototypedBuilder
+		 * @return \Onphp\PrototypedBuilder
 		**/
 		public function makeReverseBuilder()
 		{
diff --git a/main/EntityProto/PrototypedEntity.class.php b/main/EntityProto/PrototypedEntity.class.php
index 6909015a01..fc03762dcf 100644
--- a/main/EntityProto/PrototypedEntity.class.php
+++ b/main/EntityProto/PrototypedEntity.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Main
 	**/
+	namespace Onphp;
+
 	interface PrototypedEntity
 	{
 		public static function entityProto();
diff --git a/main/EntityProto/PrototypedGetter.class.php b/main/EntityProto/PrototypedGetter.class.php
index d79267fbe7..1f79da5f68 100644
--- a/main/EntityProto/PrototypedGetter.class.php
+++ b/main/EntityProto/PrototypedGetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class PrototypedGetter extends PrototypedMethodCaller
 	{
 		abstract public function get($name);
diff --git a/main/EntityProto/PrototypedMethodCaller.class.php b/main/EntityProto/PrototypedMethodCaller.class.php
index 7f58b27d2e..cbcb66ec38 100644
--- a/main/EntityProto/PrototypedMethodCaller.class.php
+++ b/main/EntityProto/PrototypedMethodCaller.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class PrototypedMethodCaller
 	{
 		protected $proto = null;
diff --git a/main/EntityProto/PrototypedSetter.class.php b/main/EntityProto/PrototypedSetter.class.php
index 8a287415a8..f68169bc65 100644
--- a/main/EntityProto/PrototypedSetter.class.php
+++ b/main/EntityProto/PrototypedSetter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class PrototypedSetter extends PrototypedMethodCaller
 	{
 		abstract public function set($name, $value);
diff --git a/main/Flow/AddCommand.class.php b/main/Flow/AddCommand.class.php
index 402b40b0eb..58852aee03 100644
--- a/main/Flow/AddCommand.class.php
+++ b/main/Flow/AddCommand.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class AddCommand extends MakeCommand
 	{
 		/**
-		 * @return AddCommand
+		 * @return \Onphp\AddCommand
 		**/
 		public static function create()
 		{
diff --git a/main/Flow/BaseEditor.class.php b/main/Flow/BaseEditor.class.php
index 2ecaa6455a..3a1a2c09dd 100644
--- a/main/Flow/BaseEditor.class.php
+++ b/main/Flow/BaseEditor.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	abstract class BaseEditor implements Controller
 	{
 		const COMMAND_SUCCEEDED	= 'success';
@@ -52,7 +54,7 @@ public function __construct(Prototyped $subject)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function postHandleRequest(ModelAndView $mav, HttpRequest $request)
 		{
@@ -80,7 +82,7 @@ public function postHandleRequest(ModelAndView $mav, HttpRequest $request)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function getForm()
 		{
diff --git a/main/Flow/CarefulCommand.class.php b/main/Flow/CarefulCommand.class.php
index 1a95242bb4..094cbfaec6 100644
--- a/main/Flow/CarefulCommand.class.php
+++ b/main/Flow/CarefulCommand.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	interface CarefulCommand extends EditorCommand
 	{
 		public function commit();
diff --git a/main/Flow/CarefulDatabaseRunner.class.php b/main/Flow/CarefulDatabaseRunner.class.php
index 94478eac33..d1ff08e698 100644
--- a/main/Flow/CarefulDatabaseRunner.class.php
+++ b/main/Flow/CarefulDatabaseRunner.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class CarefulDatabaseRunner implements CarefulCommand
 	{
 		private $command		= null;
 		/**
-		 * @var InnerTransaction
+		 * @var \Onphp\InnerTransaction
 		 */
 		private $transaction	= null;
 		
@@ -28,8 +30,8 @@ final public function __construct(EditorCommand $command)
 		}
 		
 		/**
-		 * @throws BaseException
-		 * @return ModelAndView
+		 * @throws \Onphp\BaseException
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		{
@@ -54,7 +56,7 @@ public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		}
 		
 		/**
-		 * @return CarefulDatabaseRunner
+		 * @return \Onphp\CarefulDatabaseRunner
 		**/
 		public function commit()
 		{
@@ -67,7 +69,7 @@ public function commit()
 		}
 		
 		/**
-		 * @return CarefulDatabaseRunner
+		 * @return \Onphp\CarefulDatabaseRunner
 		**/
 		public function rollback()
 		{
diff --git a/main/Flow/CommandChain.class.php b/main/Flow/CommandChain.class.php
index 5e2561df24..cf0a4de50d 100644
--- a/main/Flow/CommandChain.class.php
+++ b/main/Flow/CommandChain.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class CommandChain implements EditorCommand
 	{
 		private $chain = array();
 		
 		/**
-		 * @return CommandChain
+		 * @return \Onphp\CommandChain
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return CommandChain
+		 * @return \Onphp\CommandChain
 		**/
 		public function add(EditorCommand $command)
 		{
@@ -35,8 +37,8 @@ public function add(EditorCommand $command)
 		}
 		
 		/**
-		 * @throws BaseException
-		 * @return ModelAndView
+		 * @throws \Onphp\BaseException
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		{
@@ -66,7 +68,7 @@ public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		}
 		
 		/**
-		 * @return CommandChain
+		 * @return \Onphp\CommandChain
 		**/
 		private function rollback($position)
 		{
@@ -85,7 +87,7 @@ private function rollback($position)
 		}
 		
 		/**
-		 * @return CommandChain
+		 * @return \Onphp\CommandChain
 		**/
 		private function commit()
 		{
diff --git a/main/Flow/Controller.class.php b/main/Flow/Controller.class.php
index 33872701e8..50322bef12 100644
--- a/main/Flow/Controller.class.php
+++ b/main/Flow/Controller.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	interface Controller
 	{
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function handleRequest(HttpRequest $request);
 	}
diff --git a/main/Flow/ControllersCollection.class.php b/main/Flow/ControllersCollection.class.php
index aa9658e9bc..0834f8ccdb 100644
--- a/main/Flow/ControllersCollection.class.php
+++ b/main/Flow/ControllersCollection.class.php
@@ -9,6 +9,8 @@
  *                                                                          *
  ****************************************************************************/
 
+	namespace Onphp;
+
 	abstract class ControllersCollection implements Controller
 	{
 		private $innerControllers	= array();
@@ -26,7 +28,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function handleRequest(HttpRequest $request)
 		{
@@ -73,7 +75,7 @@ public function handleRequest(HttpRequest $request)
 		}
 		
 		/**
-		 * @return ControllersCollection
+		 * @return \Onphp\ControllersCollection
 		**/
 		public function setMav(ModelAndView $mav)
 		{
@@ -83,7 +85,7 @@ public function setMav(ModelAndView $mav)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function getMav()
 		{
@@ -91,7 +93,7 @@ public function getMav()
 		}
 		
 		/**
-		 * @return ControllersCollection
+		 * @return \Onphp\ControllersCollection
 		**/
 		public function add(
 			Controller $controller,
@@ -110,7 +112,7 @@ public function add(
 		}
 		
 		/**
-		 * @return ControllersCollection
+		 * @return \Onphp\ControllersCollection
 		**/
 		public function setDefaultRequestType(RequestType $requestType)
 		{
@@ -120,7 +122,7 @@ public function setDefaultRequestType(RequestType $requestType)
 		}
 		
 		/**
-		 * @return Controller
+		 * @return \Onphp\Controller
 		**/
 		private function getActiveController(HttpRequest $request)
 		{
diff --git a/main/Flow/DecoratorController.class.php b/main/Flow/DecoratorController.class.php
index 24a323c57a..c5ec1f7f18 100644
--- a/main/Flow/DecoratorController.class.php
+++ b/main/Flow/DecoratorController.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	abstract class DecoratorController implements Controller
 	{
 		protected $inner = null;
@@ -22,7 +24,7 @@ public function __construct(Controller $inner)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function handleRequest(HttpRequest $request)
 		{
diff --git a/main/Flow/DropCommand.class.php b/main/Flow/DropCommand.class.php
index 5681ec194e..867b55809f 100644
--- a/main/Flow/DropCommand.class.php
+++ b/main/Flow/DropCommand.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class DropCommand implements EditorCommand
 	{
 		/**
-		 * @return DropCommand
+		 * @return \Onphp\DropCommand
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		{
diff --git a/main/Flow/EditCommand.class.php b/main/Flow/EditCommand.class.php
index d73bb35840..a0454a2673 100644
--- a/main/Flow/EditCommand.class.php
+++ b/main/Flow/EditCommand.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class EditCommand implements EditorCommand
 	{
 		/**
-		 * @return EditCommand
+		 * @return \Onphp\EditCommand
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		{
diff --git a/main/Flow/EditorCommand.class.php b/main/Flow/EditorCommand.class.php
index e85bc2b200..329e04fb43 100644
--- a/main/Flow/EditorCommand.class.php
+++ b/main/Flow/EditorCommand.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	interface EditorCommand
 	{
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request);
 	}
diff --git a/main/Flow/EditorController.class.php b/main/Flow/EditorController.class.php
index 116b8a77c1..0372405a69 100644
--- a/main/Flow/EditorController.class.php
+++ b/main/Flow/EditorController.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	abstract class EditorController extends BaseEditor
 	{
 		public function __construct(Prototyped $subject)
@@ -26,7 +28,7 @@ public function __construct(Prototyped $subject)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function handleRequest(HttpRequest $request)
 		{
diff --git a/main/Flow/ForbiddenCommand.class.php b/main/Flow/ForbiddenCommand.class.php
index 0ed640ec37..e2d2a54644 100644
--- a/main/Flow/ForbiddenCommand.class.php
+++ b/main/Flow/ForbiddenCommand.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class ForbiddenCommand implements EditorCommand
 	{
 		/**
-		 * @return ForbiddenCommand
+		 * @return \Onphp\ForbiddenCommand
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		{
diff --git a/main/Flow/HandlerMapping.class.php b/main/Flow/HandlerMapping.class.php
index 5527410852..772cd4d964 100644
--- a/main/Flow/HandlerMapping.class.php
+++ b/main/Flow/HandlerMapping.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	interface HandlerMapping
 	{
 		/**
-		 * @return Controller
+		 * @return \Onphp\Controller
 		**/
 		public function getController(HttpRequest $request);
 	}
diff --git a/main/Flow/HttpRequest.class.php b/main/Flow/HttpRequest.class.php
index 44c044a6cb..c8760bea4d 100644
--- a/main/Flow/HttpRequest.class.php
+++ b/main/Flow/HttpRequest.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class HttpRequest
 	{
 		// contains all variables from $_GET
@@ -35,27 +37,67 @@ final class HttpRequest
 		// all other sh1t
 		private $attached	= array();
 		
-		private $headers	= array();
+		private $headers	= null;
 		
 		/**
-		 * @var HttpMethod
+		 * @var \Onphp\HttpMethod
 		 */
 		private $method		= null;
 		
 		/**
-		 * @var HttpUrl
+		 * @var \Onphp\HttpUrl
 		 */
 		private $url		= null;
-		
-		//for CurlHttpClient if you need to send raw CURLOPT_POSTFIELDS
+
 		private $body		= null;
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public static function create()
 		{
-			return new self;
+			return new static();
+		}
+
+		/**
+		 * @return HttpRequest
+		**/
+		public static function createFromGlobals()
+		{
+			$request =
+				static::create()->
+				setGet($_GET)->
+				setPost($_POST)->
+				setServer($_SERVER)->
+				setCookie($_COOKIE)->
+				setFiles($_FILES);
+
+			if (isset($_SESSION))
+				$request->setSession($_SESSION);
+
+			foreach ($_SERVER as $name => $value) {
+				if (strpos($name, 'HTTP_') === 0) {
+					$name = str_replace('_', '-', substr($name, 5));
+					$request->setHeaderVar($name, $value);
+				}
+			}
+
+			if (
+				$request->hasServerVar('CONTENT_TYPE')
+				&& $request->getServerVar('CONTENT_TYPE') !== 'application/x-www-form-urlencoded'
+			)
+				$request->setBody(file_get_contents('php://input'));
+			
+			$request->setMethod(
+				HttpMethod::createByName($request->getServerVar('REQUEST_METHOD'))
+			);
+
+			return $request;
+		}
+
+		public function __construct()
+		{
+			$this->headers = new HttpHeaderCollection();
 		}
 		
 		public function &getGet()
@@ -74,7 +116,7 @@ public function hasGetVar($name)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setGet(array $get)
 		{
@@ -84,7 +126,7 @@ public function setGet(array $get)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setGetVar($name, $value)
 		{
@@ -108,7 +150,7 @@ public function hasPostVar($name)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setPost(array $post)
 		{
@@ -118,7 +160,7 @@ public function setPost(array $post)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setPostVar($name, $value)
 		{
@@ -142,17 +184,17 @@ public function hasServerVar($name)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setServer(array $server)
 		{
 			$this->server = $server;
-			
+
 			return $this;
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setServerVar($name, $value)
 		{
@@ -176,7 +218,7 @@ public function hasCookieVar($name)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setCookie(array $cookie)
 		{
@@ -189,7 +231,11 @@ public function &getSession()
 		{
 			return $this->session;
 		}
-		
+
+		/**
+		 * @param string $name
+		 * @return mixed
+		 */
 		public function getSessionVar($name)
 		{
 			return $this->session[$name];
@@ -201,7 +247,7 @@ public function hasSessionVar($name)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setFiles(array $files)
 		{
@@ -226,7 +272,7 @@ public function hasFilesVar($name)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setSession(array &$session)
 		{
@@ -236,7 +282,7 @@ public function setSession(array &$session)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setAttachedVar($name, $var)
 		{
@@ -249,14 +295,18 @@ public function &getAttached()
 		{
 			return $this->attached;
 		}
-		
+
+		/**
+		 * @param string $name
+		 * @return mixed
+		 */
 		public function getAttachedVar($name)
 		{
 			return $this->attached[$name];
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function unsetAttachedVar($name)
 		{
@@ -277,7 +327,7 @@ public function getByType(RequestType $type)
 		
 		public function getHeaderList()
 		{
-			return $this->headers;
+			return $this->headers->getAll();
 		}
 		
 		public function hasHeaderVar($name)
@@ -287,11 +337,11 @@ public function hasHeaderVar($name)
 		
 		public function getHeaderVar($name)
 		{
-			return $this->headers[$name];
+			return $this->headers->get($name);
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function unsetHeaderVar($name)
 		{
@@ -300,25 +350,25 @@ public function unsetHeaderVar($name)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setHeaderVar($name, $var)
 		{
-			$this->headers[$name] = $var;
+			$this->headers->set($name, $var);
 			return $this;
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setHeaders(array $headers)
 		{
-			$this->headers = $headers;
+			$this->headers = new HttpHeaderCollection($headers);
 			return $this;
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setMethod(HttpMethod $method)
 		{
@@ -327,7 +377,7 @@ public function setMethod(HttpMethod $method)
 		}
 		
 		/**
-		 * @return HttpMethod
+		 * @return \Onphp\HttpMethod
 		**/
 		public function getMethod()
 		{
@@ -335,7 +385,7 @@ public function getMethod()
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function setUrl(HttpUrl $url)
 		{
@@ -344,7 +394,7 @@ public function setUrl(HttpUrl $url)
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public function getUrl()
 		{
@@ -363,7 +413,7 @@ public function getBody()
 		
 		/**
 		 * @param string $body
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		 */
 		public function setBody($body)
 		{
diff --git a/main/Flow/ImportCommand.class.php b/main/Flow/ImportCommand.class.php
index 7ab4e8a07d..0fc45e5153 100644
--- a/main/Flow/ImportCommand.class.php
+++ b/main/Flow/ImportCommand.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class ImportCommand extends MakeCommand
 	{
 		/**
-		 * @return ImportCommand
+		 * @return \Onphp\ImportCommand
 		**/
 		public static function create()
 		{
diff --git a/main/Flow/MakeCommand.class.php b/main/Flow/MakeCommand.class.php
index 5b2e23d7d8..b6c485aa5b 100644
--- a/main/Flow/MakeCommand.class.php
+++ b/main/Flow/MakeCommand.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	abstract class MakeCommand extends TakeCommand
 	{
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		{
diff --git a/main/Flow/MethodMappedController.class.php b/main/Flow/MethodMappedController.class.php
index 1ad7ddd4de..70a3ebc146 100644
--- a/main/Flow/MethodMappedController.class.php
+++ b/main/Flow/MethodMappedController.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	abstract class MethodMappedController implements Controller
 	{
 		private $methodMap		= array();
 		private $defaultAction	= null;
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function handleRequest(HttpRequest $request)
 		{
@@ -60,7 +62,7 @@ public function chooseAction(HttpRequest $request)
 		}
 		
 		/**
-		 * @return MethodMappedController
+		 * @return \Onphp\MethodMappedController
 		**/
 		public function setMethodMapping($action, $methodName)
 		{
@@ -69,7 +71,7 @@ public function setMethodMapping($action, $methodName)
 		}
 		
 		/**
-		 * @return MethodMappedController
+		 * @return \Onphp\MethodMappedController
 		**/
 		public function dropMethodMapping($action)
 		{
@@ -84,7 +86,7 @@ public function getMethodMapping()
 		}
 		
 		/**
-		 * @return MethodMappedController
+		 * @return \Onphp\MethodMappedController
 		**/
 		public function setDefaultAction($action)
 		{
@@ -94,7 +96,7 @@ public function setDefaultAction($action)
 		}
 		
 		/**
-		 * @return MethodMappedController
+		 * @return \Onphp\MethodMappedController
 		**/
 		public function setMethodMappingList($array)
 		{
diff --git a/main/Flow/Model.class.php b/main/Flow/Model.class.php
index 1cc503f044..9b17156d6d 100644
--- a/main/Flow/Model.class.php
+++ b/main/Flow/Model.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class Model implements SimplifiedArrayAccess
 	{
 		private $vars = array();
 		
 		/**
-		 * @return Model
+		 * @return \Onphp\Model
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return Model
+		 * @return \Onphp\Model
 		**/
 		public function clean()
 		{
@@ -45,7 +47,7 @@ public function getList()
 		}
 		
 		/**
-		 * @return Model
+		 * @return \Onphp\Model
 		**/
 		public function set($name, $var)
 		{
@@ -56,6 +58,9 @@ public function set($name, $var)
 		
 		public function get($name)
 		{
+			if (!$this->has($name))
+				throw new MissingElementException('Unknown var "'.$name.'"');
+
 			return $this->vars[$name];
 		}
 		
@@ -65,7 +70,7 @@ public function has($name)
 		}
 		
 		/**
-		 * @return Model
+		 * @return \Onphp\Model
 		**/
 		public function drop($name)
 		{
@@ -75,7 +80,7 @@ public function drop($name)
 		}
 		
 		/**
-		 * @return Model
+		 * @return \Onphp\Model
 		**/
 		public function merge(Model $model, $overwrite = false)
 		{
diff --git a/main/Flow/ModelAndView.class.php b/main/Flow/ModelAndView.class.php
index 615eaa78bb..ca191369c4 100644
--- a/main/Flow/ModelAndView.class.php
+++ b/main/Flow/ModelAndView.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class ModelAndView
 	{
 		private $model 	= null;
@@ -19,7 +21,7 @@ class ModelAndView
 		private $view	= null;
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public static function create()
 		{
@@ -32,7 +34,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return Model
+		 * @return \Onphp\Model
 		**/
 		public function getModel()
 		{
@@ -40,7 +42,7 @@ public function getModel()
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function setModel(Model $model)
 		{
@@ -55,7 +57,7 @@ public function getView()
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function setView($view)
 		{
@@ -68,7 +70,18 @@ public function setView($view)
 			
 			return $this;
 		}
-		
+
+		/**
+		 * @return ModelAndView
+		 */
+		public function dropView()
+		{
+			$this->view = null;
+			
+			return $this;
+		}
+
+
 		public function viewIsRedirect()
 		{
 			return
diff --git a/main/Flow/MonolithicController.class.php b/main/Flow/MonolithicController.class.php
index 723004d3b7..3e39690932 100644
--- a/main/Flow/MonolithicController.class.php
+++ b/main/Flow/MonolithicController.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	abstract class MonolithicController extends BaseEditor
 	{
 		public function __construct(Prototyped $subject)
@@ -26,7 +28,7 @@ public function __construct(Prototyped $subject)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function handleRequest(HttpRequest $request)
 		{
@@ -48,7 +50,7 @@ public function handleRequest(HttpRequest $request)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doImport(
 			Prototyped $subject, Form $form, HttpRequest $request
@@ -58,7 +60,7 @@ public function doImport(
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doDrop(
 			Prototyped $subject, Form $form, HttpRequest $request
@@ -68,7 +70,7 @@ public function doDrop(
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doSave(
 			Prototyped $subject, Form $form, HttpRequest $request
@@ -78,7 +80,7 @@ public function doSave(
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doEdit(
 			Prototyped $subject, Form $form, HttpRequest $request
@@ -88,7 +90,7 @@ public function doEdit(
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doAdd(
 			Prototyped $subject, Form $form, HttpRequest $request
diff --git a/main/Flow/NullController.class.php b/main/Flow/NullController.class.php
index 826ad35281..b0b6f1b8dd 100644
--- a/main/Flow/NullController.class.php
+++ b/main/Flow/NullController.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class NullController implements Controller
 	{
 		private $model = null;
 		
 		/**
-		 * @return NullController
+		 * @return \Onphp\NullController
 		**/
 		public static function create(Model $model = null)
 		{
@@ -30,7 +32,7 @@ public function __construct(Model $model = null)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function handleRequest(HttpRequest $request)
 		{
diff --git a/main/Flow/PrototypedEditor.class.php b/main/Flow/PrototypedEditor.class.php
index a32ce2e3e5..c0fc3c80cf 100644
--- a/main/Flow/PrototypedEditor.class.php
+++ b/main/Flow/PrototypedEditor.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	abstract class PrototypedEditor extends MethodMappedController
 	{
 		const COMMAND_SUCCEEDED	= 'success';
@@ -41,7 +43,7 @@ public function __construct(Prototyped $subject)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doDrop(HttpRequest $request)
 		{
@@ -86,7 +88,7 @@ protected function dropObject(HttpRequest $request, Form $form, Identifiable $ob
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doTake(HttpRequest $request)
 		{
@@ -139,7 +141,7 @@ public function doTake(HttpRequest $request)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doSave(HttpRequest $request)
 		{
@@ -187,7 +189,7 @@ protected function saveObject(HttpRequest $request, Form $form, Identifiable $ob
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doEdit(HttpRequest $request)
 		{
@@ -211,7 +213,7 @@ public function doEdit(HttpRequest $request)
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function doAdd(HttpRequest $request)
 		{
@@ -253,7 +255,7 @@ public function doAdd(HttpRequest $request)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function getForm()
 		{
diff --git a/main/Flow/ProxyController.class.php b/main/Flow/ProxyController.class.php
index 5e30a8d9de..e9c3229900 100644
--- a/main/Flow/ProxyController.class.php
+++ b/main/Flow/ProxyController.class.php
@@ -13,6 +13,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class ProxyController implements Controller
 	{
 		private $innerController	= null;
@@ -27,7 +29,7 @@ final class ProxyController implements Controller
 		);
 		
 		/**
-		 * @return ProxyController
+		 * @return \Onphp\ProxyController
 		**/
 		public static function create()
 		{
@@ -40,7 +42,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return ProxyController
+		 * @return \Onphp\ProxyController
 		**/
 		public function setInner(Controller $controller)
 		{
@@ -50,7 +52,7 @@ public function setInner(Controller $controller)
 		}
 		
 		/**
-		 * @return Controller
+		 * @return \Onphp\Controller
 		**/
 		public function getInner()
 		{
@@ -63,7 +65,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function handleRequest(HttpRequest $request)
 		{
@@ -71,7 +73,7 @@ public function handleRequest(HttpRequest $request)
 		}
 		
 		/**
-		 * @return ProxyController
+		 * @return \Onphp\ProxyController
 		**/
 		public function setRequestType(RequestType $requestType)
 		{
diff --git a/main/Flow/SaveCommand.class.php b/main/Flow/SaveCommand.class.php
index 2a4c8d1039..35eae2e7e6 100644
--- a/main/Flow/SaveCommand.class.php
+++ b/main/Flow/SaveCommand.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class SaveCommand extends TakeCommand
 	{
 		/**
-		 * @return SaveCommand
+		 * @return \Onphp\SaveCommand
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		{
diff --git a/main/Flow/SimpleFrontController.class.php b/main/Flow/SimpleFrontController.class.php
new file mode 100644
index 0000000000..87636eae8a
--- /dev/null
+++ b/main/Flow/SimpleFrontController.class.php
@@ -0,0 +1,169 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2013 by Alexander A. Klestoff                           *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	namespace Onphp;
+	/**
+	 * @ingroup Flow
+	**/
+	class SimpleFrontController implements Controller
+	{
+		const DEFAULT_CONTROLLER	= 'main';
+		const DEFAULT_TEMPLATE		= 'main';
+		const DEFAULT_ACTION		= 'show';
+									//LIKE /controller/42/action.html
+		const ROUTE_REGEXP			= '(\w+)?((/(\d+))?(/(\w+)))?(\.(.*))?';
+		
+		const DEFAULT_ROUTE_NAME	= '*';
+		
+		const DEFAULT_FORMAT		= 'html';
+		
+		
+		protected $allowedFormatList	= array(self::DEFAULT_FORMAT);
+		
+		/**
+		 * @var HttpRequest
+		 */
+		protected $request				= null;
+		private $controllerName			= null;
+		
+		private $templatesDirectory		= null;
+		
+		/**
+		 * @return SimpleFrontController
+		 */
+		public static function create($templatesDirectory)
+		{
+			return new static($templatesDirectory);
+		}
+		
+		public function __construct($templatesDirectory)
+		{
+			$this->templatesDirectory = $templatesDirectory;
+		}
+		
+		public function handleRequest(HttpRequest $request)
+		{
+			$this->request = $request;
+			
+			$this->getRouter()->route($request);
+
+			$this->prepareResponseFormat($request);
+
+			$this->handleMav(
+				$this->
+					makeControllerChain()->
+					handleRequest($request)
+			);
+		}
+		
+		/**
+		 * @return Router
+		 */
+		protected function getRouter()
+		{
+			return
+				RouterRewrite::me()->
+					addRoute(
+						self::DEFAULT_ROUTE_NAME,
+						RouterRegexpRule::create(self::ROUTE_REGEXP)->
+						setMap(
+							array(
+								1 => 'area',
+								4 => 'id',
+								6 => 'action',
+								8 => 'format',
+							)
+						)->
+						setDefaults(
+							array(
+								'area' => self::DEFAULT_CONTROLLER,
+								'action' => self::DEFAULT_ACTION,
+								'id' => 0,
+								'format' => self::DEFAULT_FORMAT
+							)
+						)
+					);
+		}
+		
+		protected function prepareResponseFormat()
+		{
+			if ($this->request->hasAttachedVar('format')) {
+				Assert::isNotFalse(
+					array_search(
+						$this->request->getAttachedVar('format'),
+						$this->allowedFormatList
+					)
+				);
+				
+			} else {
+				$this->request->setAttachedVar('format', self::DEFAULT_FORMAT);
+			}
+		}
+		
+		/**
+		 * @return Controller
+		 */
+		protected function makeControllerChain()
+		{
+			$this->controllerName = self::DEFAULT_CONTROLLER;
+			
+			if (
+				$this->request->hasAttachedVar('area')
+				&& $this->request->getAttachedVar('area')
+				&& ClassUtils::isClassName(
+					$this->request->getAttachedVar('area')
+				)
+			)
+				$this->controllerName = $this->request->getAttachedVar('area');
+
+			return new $this->controllerName;
+		}
+		
+		protected function handleMav(ModelAndView $mav)
+		{
+			$view = $mav->getView() ?: self::DEFAULT_TEMPLATE;
+			$model = $mav->getModel();
+
+			if (!$view instanceof RedirectView)
+				$model->set('area', $this->controllerName);
+
+			if (is_string($view)) {
+				if ($view == $this->controllerName)
+					$view = self::DEFAULT_TEMPLATE;
+
+				$viewResolver = $this->getViewResolver();
+				
+				foreach ($this->getTemplatePathList() as $templatePath) {
+					$viewResolver->addPrefix($templatePath);
+				}
+				
+				$view = $viewResolver->resolveViewName($view);
+			}
+
+			$view->render($model);
+		}
+		
+		protected function getTemplatePathList()
+		{
+			return
+				array(
+					$this->templatesDirectory.$this->request->getAttachedVar('format').'/'.$this->controllerName.'/',
+					$this->templatesDirectory.$this->request->getAttachedVar('format').'/'
+				);
+		}
+		
+		protected function getViewResolver()
+		{
+			return
+				MultiPrefixPhpViewResolver::create()->
+					setViewClassName('SimplePhpView');
+		}
+	}
\ No newline at end of file
diff --git a/main/Flow/TakeCommand.class.php b/main/Flow/TakeCommand.class.php
index c949827af5..31c7c9d64f 100644
--- a/main/Flow/TakeCommand.class.php
+++ b/main/Flow/TakeCommand.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	abstract class TakeCommand implements EditorCommand
 	{
 		abstract protected function daoMethod();
 		
 		/**
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function run(Prototyped $subject, Form $form, HttpRequest $request)
 		{
diff --git a/main/Markup/Csv.class.php b/main/Markup/Csv.class.php
index ce1883c1a5..5bf5e7a609 100644
--- a/main/Markup/Csv.class.php
+++ b/main/Markup/Csv.class.php
@@ -14,6 +14,8 @@
 	 * @see http://tools.ietf.org/html/rfc4180
 	 * @todo implement parse
 	**/
+	namespace Onphp;
+
 	final class Csv
 	{
 		const SEPARATOR					= "\x2C";
@@ -27,7 +29,7 @@ final class Csv
 		private $data	= array();
 		
 		/**
-		 * @return Csv
+		 * @return \Onphp\Csv
 		**/
 		public static function create($header = false)
 		{
@@ -45,7 +47,7 @@ public function getArray()
 		}
 		
 		/**
-		 * @return Csv
+		 * @return \Onphp\Csv
 		**/
 		public function setArray($array)
 		{
@@ -57,7 +59,7 @@ public function setArray($array)
 		}
 		
 		/**
-		 * @return Csv
+		 * @return \Onphp\Csv
 		**/
 		public function setSeparator($separator)
 		{
@@ -112,7 +114,7 @@ public function render($forceQuotes = false)
 		}
 		
 		/**
-		 * @return ContentTypeHeader
+		 * @return \Onphp\ContentTypeHeader
 		**/
 		public function getContentTypeHeader()
 		{
diff --git a/main/Markup/Feed/AtomChannelWorker.class.php b/main/Markup/Feed/AtomChannelWorker.class.php
index 34743fb4ed..cdc3b91afd 100644
--- a/main/Markup/Feed/AtomChannelWorker.class.php
+++ b/main/Markup/Feed/AtomChannelWorker.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class AtomChannelWorker extends Singleton implements FeedChannelWorker
 	{
 		/**
-		 * @return AtomChannelWorker
+		 * @return \Onphp\AtomChannelWorker
 		**/
 		public static function me()
 		{
@@ -23,9 +25,9 @@ public static function me()
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
-		public function makeChannel(SimpleXMLElement $xmlFeed)
+		public function makeChannel(\SimpleXMLElement $xmlFeed)
 		{
 			$feedChannel = FeedChannel::create((string) $xmlFeed->title);
 			
diff --git a/main/Markup/Feed/AtomFeedFormat.class.php b/main/Markup/Feed/AtomFeedFormat.class.php
index c7b048386b..3268a3bab9 100644
--- a/main/Markup/Feed/AtomFeedFormat.class.php
+++ b/main/Markup/Feed/AtomFeedFormat.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class AtomFeedFormat extends FeedFormat
 	{
 		/**
-		 * @return AtomFeedFormat
+		 * @return \Onphp\AtomFeedFormat
 		**/
 		public static function me()
 		{
@@ -23,7 +25,7 @@ public static function me()
 		}
 		
 		/**
-		 * @return AtomChannelWorker
+		 * @return \Onphp\AtomChannelWorker
 		**/
 		public function getChannelWorker()
 		{
@@ -31,14 +33,14 @@ public function getChannelWorker()
 		}
 		
 		/**
-		 * @return AtomItemWorker
+		 * @return \Onphp\AtomItemWorker
 		**/
 		public function getItemWorker()
 		{
 			return AtomItemWorker::me();
 		}
 		
-		public function isAcceptable(SimpleXMLElement $xmlFeed)
+		public function isAcceptable(\SimpleXMLElement $xmlFeed)
 		{
 			return ($xmlFeed->getName() == 'feed');
 		}
diff --git a/main/Markup/Feed/AtomItemWorker.class.php b/main/Markup/Feed/AtomItemWorker.class.php
index e8f87e2eca..6b2f7faca2 100644
--- a/main/Markup/Feed/AtomItemWorker.class.php
+++ b/main/Markup/Feed/AtomItemWorker.class.php
@@ -12,17 +12,19 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class AtomItemWorker extends Singleton implements FeedItemWorker
 	{
 		/**
-		 * @return AtomItemWorker
+		 * @return \Onphp\AtomItemWorker
 		**/
 		public static function me()
 		{
 			return Singleton::getInstance(__CLASS__);
 		}
 		
-		public function makeItems(SimpleXMLElement $xmlFeed)
+		public function makeItems(\SimpleXMLElement $xmlFeed)
 		{
 			$result = array();
 			
diff --git a/main/Markup/Feed/FeedChannel.class.php b/main/Markup/Feed/FeedChannel.class.php
index eed6462cd9..79362d1f46 100644
--- a/main/Markup/Feed/FeedChannel.class.php
+++ b/main/Markup/Feed/FeedChannel.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class FeedChannel
 	{
 		private $title			= null;
@@ -20,7 +22,7 @@ final class FeedChannel
 		private $feedItems		= array();
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
 		public static function create($title)
 		{
@@ -38,7 +40,7 @@ public function getTitle()
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
 		public function setTitle($title)
 		{
@@ -53,7 +55,7 @@ public function getDescription()
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
 		public function setDescription($description)
 		{
@@ -68,7 +70,7 @@ public function getLink()
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
 		public function setLink($link)
 		{
@@ -83,7 +85,7 @@ public function getFeedItems()
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
 		public function setFeedItems($feedItems)
 		{
@@ -93,7 +95,7 @@ public function setFeedItems($feedItems)
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
 		public function addFeedItem(FeedItem $feedItem)
 		{
diff --git a/main/Markup/Feed/FeedChannelWorker.class.php b/main/Markup/Feed/FeedChannelWorker.class.php
index 6ce9180b6f..ea46c20298 100644
--- a/main/Markup/Feed/FeedChannelWorker.class.php
+++ b/main/Markup/Feed/FeedChannelWorker.class.php
@@ -12,9 +12,11 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	interface FeedChannelWorker
 	{
-		public function makeChannel(SimpleXMLElement $xmlFeed);
+		public function makeChannel(\SimpleXMLElement $xmlFeed);
 		public function toXml(FeedChannel $channel, $itemsXml);
 	}
 ?>
\ No newline at end of file
diff --git a/main/Markup/Feed/FeedFormat.class.php b/main/Markup/Feed/FeedFormat.class.php
index ed238b235f..d9b304576e 100644
--- a/main/Markup/Feed/FeedFormat.class.php
+++ b/main/Markup/Feed/FeedFormat.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	abstract class FeedFormat extends Singleton
 	{
 		abstract public function getChannelWorker();
 		abstract public function getItemWorker();
-		abstract public function isAcceptable(SimpleXMLElement $xmlFeed);
+		abstract public function isAcceptable(\SimpleXMLElement $xmlFeed);
 		
-		public function parse(SimpleXMLElement $xmlFeed)
+		public function parse(\SimpleXMLElement $xmlFeed)
 		{
 			$this->checkWorkers();
 			
diff --git a/main/Markup/Feed/FeedItem.class.php b/main/Markup/Feed/FeedItem.class.php
index 66117910c2..78ffde07cb 100644
--- a/main/Markup/Feed/FeedItem.class.php
+++ b/main/Markup/Feed/FeedItem.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	class FeedItem
 	{
 		private $id			= null;
@@ -23,7 +25,7 @@ class FeedItem
 		private $category	= null;
 		
 		/**
-		 * @return FeedItem
+		 * @return \Onphp\FeedItem
 		**/
 		public static function create($title)
 		{
@@ -41,7 +43,7 @@ public function getId()
 		}
 		
 		/**
-		 * @return FeedItem
+		 * @return \Onphp\FeedItem
 		**/
 		public function setId($id)
 		{
@@ -56,7 +58,7 @@ public function getTitle()
 		}
 		
 		/**
-		 * @return FeedItem
+		 * @return \Onphp\FeedItem
 		**/
 		public function setTitle($title)
 		{
@@ -71,7 +73,7 @@ public function getContent()
 		}
 		
 		/**
-		 * @return FeedItem
+		 * @return \Onphp\FeedItem
 		**/
 		public function setContent($content)
 		{
@@ -86,7 +88,7 @@ public function getSummary()
 		}
 		
 		/**
-		 * @return FeedItem
+		 * @return \Onphp\FeedItem
 		**/
 		public function setSummary($summary)
 		{
@@ -96,7 +98,7 @@ public function setSummary($summary)
 		}
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public function getPublished()
 		{
@@ -104,7 +106,7 @@ public function getPublished()
 		}
 		
 		/**
-		 * @return FeedItem
+		 * @return \Onphp\FeedItem
 		**/
 		public function setPublished(Timestamp $published)
 		{
@@ -119,7 +121,7 @@ public function getLink()
 		}
 		
 		/**
-		 * @return FeedItem
+		 * @return \Onphp\FeedItem
 		**/
 		public function setLink($link)
 		{
@@ -134,7 +136,7 @@ public function getCategory()
 		}
 		
 		/**
-		 * @return FeedItem
+		 * @return \Onphp\FeedItem
 		**/
 		public function setCategory($category)
 		{
diff --git a/main/Markup/Feed/FeedItemContent.class.php b/main/Markup/Feed/FeedItemContent.class.php
index 96bcb42fb1..7b95e92b23 100644
--- a/main/Markup/Feed/FeedItemContent.class.php
+++ b/main/Markup/Feed/FeedItemContent.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class FeedItemContent
 	{
 		private $type = null;
 		private $body = null;
 		
 		/**
-		 * @return FeedItemContent
+		 * @return \Onphp\FeedItemContent
 		**/
 		public static function create()
 		{
@@ -26,7 +28,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return FeedItemContentType
+		 * @return \Onphp\FeedItemContentType
 		**/
 		public function getType()
 		{
@@ -34,7 +36,7 @@ public function getType()
 		}
 		
 		/**
-		 * @return FeedItemContent
+		 * @return \Onphp\FeedItemContent
 		**/
 		public function setType(FeedItemContentType $type)
 		{
@@ -49,7 +51,7 @@ public function getBody()
 		}
 		
 		/**
-		 * @return FeedItemContent
+		 * @return \Onphp\FeedItemContent
 		**/
 		public function setBody($body)
 		{
diff --git a/main/Markup/Feed/FeedItemContentType.class.php b/main/Markup/Feed/FeedItemContentType.class.php
index e02cef9299..0bbbd325cb 100644
--- a/main/Markup/Feed/FeedItemContentType.class.php
+++ b/main/Markup/Feed/FeedItemContentType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class FeedItemContentType extends Enumeration
 	{
 		const TEXT		= 1;
diff --git a/main/Markup/Feed/FeedItemWorker.class.php b/main/Markup/Feed/FeedItemWorker.class.php
index 5104b8f946..d7263330c5 100644
--- a/main/Markup/Feed/FeedItemWorker.class.php
+++ b/main/Markup/Feed/FeedItemWorker.class.php
@@ -12,9 +12,11 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	interface FeedItemWorker extends Instantiatable
 	{
-		public function makeItems(SimpleXMLElement $xmlFeed);
+		public function makeItems(\SimpleXMLElement $xmlFeed);
 		public function toXml(FeedItem $item);
 	}
 ?>
\ No newline at end of file
diff --git a/main/Markup/Feed/FeedReader.class.php b/main/Markup/Feed/FeedReader.class.php
index 422fdbac9b..525f2ddfd2 100644
--- a/main/Markup/Feed/FeedReader.class.php
+++ b/main/Markup/Feed/FeedReader.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class FeedReader
 	{
 		private $xml			= null;
 		private $formats		= array();
 		
 		/**
-		 * @return FeedReader
+		 * @return \Onphp\FeedReader
 		**/
 		public static function create()
 		{
@@ -33,7 +35,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return SimpleXMLElement
+		 * @return \SimpleXMLElement
 		**/
 		public function getXml()
 		{
@@ -41,7 +43,7 @@ public function getXml()
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
 		public function parseFile($file)
 		{
@@ -60,17 +62,17 @@ public function parseFile($file)
 		}
 		
 		/**
-		 * @return FeedReader
+		 * @return \Onphp\FeedReader
 		**/
 		public function parseXml($xml)
 		{
-			$this->xml = new SimpleXMLElement($xml);
+			$this->xml = new \SimpleXMLElement($xml);
 			
 			return $this->parse();
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
 		private function parse()
 		{
diff --git a/main/Markup/Feed/RssChannelWorker.class.php b/main/Markup/Feed/RssChannelWorker.class.php
index 579e0e98f3..995b9fb303 100644
--- a/main/Markup/Feed/RssChannelWorker.class.php
+++ b/main/Markup/Feed/RssChannelWorker.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class RssChannelWorker extends Singleton implements FeedChannelWorker
 	{
 		/**
-		 * @return RssChannelWorker
+		 * @return \Onphp\RssChannelWorker
 		**/
 		public static function me()
 		{
@@ -23,9 +25,9 @@ public static function me()
 		}
 		
 		/**
-		 * @return FeedChannel
+		 * @return \Onphp\FeedChannel
 		**/
-		public function makeChannel(SimpleXMLElement $xmlFeed)
+		public function makeChannel(\SimpleXMLElement $xmlFeed)
 		{
 			if (
 				(!isset($xmlFeed->channel))
diff --git a/main/Markup/Feed/RssFeedFormat.class.php b/main/Markup/Feed/RssFeedFormat.class.php
index ff86f282d8..5e633f5046 100644
--- a/main/Markup/Feed/RssFeedFormat.class.php
+++ b/main/Markup/Feed/RssFeedFormat.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class RssFeedFormat extends FeedFormat
 	{
 		const VERSION = '2.0';
 		
 		/**
-		 * @return RssFeedFormat
+		 * @return \Onphp\RssFeedFormat
 		**/
 		public static function me()
 		{
@@ -25,7 +27,7 @@ public static function me()
 		}
 		
 		/**
-		 * @return RssChannelWorker
+		 * @return \Onphp\RssChannelWorker
 		**/
 		public function getChannelWorker()
 		{
@@ -33,14 +35,14 @@ public function getChannelWorker()
 		}
 		
 		/**
-		 * @return RssItemWorker
+		 * @return \Onphp\RssItemWorker
 		**/
 		public function getItemWorker()
 		{
 			return RssItemWorker::me();
 		}
 		
-		public function isAcceptable(SimpleXMLElement $xmlFeed)
+		public function isAcceptable(\SimpleXMLElement $xmlFeed)
 		{
 			return (
 				($xmlFeed->getName() == 'rss')
diff --git a/main/Markup/Feed/RssItemWorker.class.php b/main/Markup/Feed/RssItemWorker.class.php
index fc94af43fa..b166da4db0 100644
--- a/main/Markup/Feed/RssItemWorker.class.php
+++ b/main/Markup/Feed/RssItemWorker.class.php
@@ -12,17 +12,19 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class RssItemWorker extends Singleton implements FeedItemWorker
 	{
 		/**
-		 * @return RssItemWorker
+		 * @return \Onphp\RssItemWorker
 		**/
 		public static function me()
 		{
 			return Singleton::getInstance(__CLASS__);
 		}
 		
-		public function makeItems(SimpleXMLElement $xmlFeed)
+		public function makeItems(\SimpleXMLElement $xmlFeed)
 		{
 			$result = array();
 			
diff --git a/main/Markup/Feed/YandexRssFeedFormat.class.php b/main/Markup/Feed/YandexRssFeedFormat.class.php
index 27b3faa755..b129897ad7 100644
--- a/main/Markup/Feed/YandexRssFeedFormat.class.php
+++ b/main/Markup/Feed/YandexRssFeedFormat.class.php
@@ -13,13 +13,15 @@
 	 * @ingroup Feed
 	 * @see http://partner.news.yandex.ru/tech.pdf
 	**/
+	namespace Onphp;
+
 	final class YandexRssFeedFormat extends FeedFormat
 	{
 		const  YANDEX_NAMESPACE_URI		= 'http://news.yandex.ru';
 		const  YANDEX_NAMESPACE_PREFIX	= 'yandex';
 		
 		/**
-		 * @return YandexRssFeedFormat
+		 * @return \Onphp\YandexRssFeedFormat
 		**/
 		public static function me()
 		{
@@ -27,7 +29,7 @@ public static function me()
 		}
 		
 		/**
-		 * @return RssChannelWorker
+		 * @return \Onphp\RssChannelWorker
 		**/
 		public function getChannelWorker()
 		{
@@ -35,14 +37,14 @@ public function getChannelWorker()
 		}
 		
 		/**
-		 * @return YandexRssItemWorker
+		 * @return \Onphp\YandexRssItemWorker
 		**/
 		public function getItemWorker()
 		{
 			return YandexRssItemWorker::me();
 		}
 		
-		public function isAcceptable(SimpleXMLElement $xmlFeed)
+		public function isAcceptable(\SimpleXMLElement $xmlFeed)
 		{
 			return (
 				($xmlFeed->getName() == 'rss')
diff --git a/main/Markup/Feed/YandexRssFeedItem.class.php b/main/Markup/Feed/YandexRssFeedItem.class.php
index 9b4b318ddd..50d595f6ff 100644
--- a/main/Markup/Feed/YandexRssFeedItem.class.php
+++ b/main/Markup/Feed/YandexRssFeedItem.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class YandexRssFeedItem extends FeedItem
 	{
 		private $fullText	= null;
 		
 		/**
-		 * @return YandexRssFeedItem
+		 * @return \Onphp\YandexRssFeedItem
 		**/
 		public static function create($title)
 		{
@@ -30,7 +32,7 @@ public function getFullText()
 		}
 		
 		/**
-		 * @return YandexRssFeedItem
+		 * @return \Onphp\YandexRssFeedItem
 		**/
 		public function setFullText($fullText)
 		{
diff --git a/main/Markup/Feed/YandexRssItemWorker.class.php b/main/Markup/Feed/YandexRssItemWorker.class.php
index cc0c14ecae..48fa076d0c 100644
--- a/main/Markup/Feed/YandexRssItemWorker.class.php
+++ b/main/Markup/Feed/YandexRssItemWorker.class.php
@@ -12,17 +12,19 @@
 	/**
 	 * @ingroup Feed
 	**/
+	namespace Onphp;
+
 	final class YandexRssItemWorker extends Singleton implements FeedItemWorker
 	{
 		/**
-		 * @return YandexRssItemWorker
+		 * @return \Onphp\YandexRssItemWorker
 		**/
 		public static function me()
 		{
 			return Singleton::getInstance(__CLASS__);
 		}
 		
-		public function makeItems(SimpleXMLElement $xmlFeed)
+		public function makeItems(\SimpleXMLElement $xmlFeed)
 		{
 			$xmlFeed->registerXPathNamespace(
 				YandexRssFeedFormat::YANDEX_NAMESPACE_PREFIX,
diff --git a/main/Markup/Html/Cdata.class.php b/main/Markup/Html/Cdata.class.php
index f068441b4b..e3dbd83b7b 100644
--- a/main/Markup/Html/Cdata.class.php
+++ b/main/Markup/Html/Cdata.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Html
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class Cdata extends SgmlToken
 	{
 		private $data	= null;
@@ -20,7 +22,7 @@ final class Cdata extends SgmlToken
 		private $strict	= false;
 		
 		/**
-		 * @return Cdata
+		 * @return \Onphp\Cdata
 		**/
 		public static function create()
 		{
@@ -28,7 +30,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return Cdata
+		 * @return \Onphp\Cdata
 		**/
 		public function setData($data)
 		{
@@ -51,7 +53,7 @@ public function getRawData()
 		}
 		
 		/**
-		 * @return Cdata
+		 * @return \Onphp\Cdata
 		**/
 		public function setStrict($isStrict)
 		{
diff --git a/main/Markup/Html/HtmlAssembler.class.php b/main/Markup/Html/HtmlAssembler.class.php
index fb2084f769..57de4108b4 100644
--- a/main/Markup/Html/HtmlAssembler.class.php
+++ b/main/Markup/Html/HtmlAssembler.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Html
 	**/
+	namespace Onphp;
+
 	final class HtmlAssembler
 	{
 		private $tags	= null;
@@ -55,11 +57,11 @@ public static function makeTag(SgmlToken $tag)
 			return $result;
 		}
 		
-		public static function makeDomNode(DOMNode $node)
+		public static function makeDomNode(\DOMNode $node)
 		{
 				$result = null;
 				
-				if ($node instanceof DOMElement) {
+				if ($node instanceof \DOMElement) {
 						
 						$result = '<'.$node->nodeName;
 						
@@ -84,7 +86,7 @@ public static function makeDomNode(DOMNode $node)
 						if ($node->firstChild)
 								$result .= '</'.$node->nodeName.'>';
 						
-				} elseif ($node instanceof DOMCharacterData) {
+				} elseif ($node instanceof \DOMCharacterData) {
 						
 						$result = $node->data;
 						
@@ -125,7 +127,7 @@ private static function getAttributes(SgmlOpenTag $tag)
 			return implode(' ', $attributes);
 		}
 		
-		private static function getDomAttributes(DOMNode $node)
+		private static function getDomAttributes(\DOMNode $node)
 		{
 			$result = null;
 			
diff --git a/main/Markup/Html/HtmlTokenizer.class.php b/main/Markup/Html/HtmlTokenizer.class.php
index 1f21ec8ccb..2dfdc9ab3e 100644
--- a/main/Markup/Html/HtmlTokenizer.class.php
+++ b/main/Markup/Html/HtmlTokenizer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Html
 	**/
+	namespace Onphp;
+
 	final class HtmlTokenizer
 	{
 		const INITIAL_STATE				= 1;
@@ -78,7 +80,7 @@ public function __construct(InputStream $stream)
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		public static function create(InputStream $stream)
 		{
@@ -86,7 +88,7 @@ public static function create(InputStream $stream)
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		public function suppressWhitespaces($isSuppressWhitespaces)
 		{
@@ -98,7 +100,7 @@ public function suppressWhitespaces($isSuppressWhitespaces)
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		public function lowercaseAttributes($isLowercaseAttributes)
 		{
@@ -110,7 +112,7 @@ public function lowercaseAttributes($isLowercaseAttributes)
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		public function lowercaseTags($isLowercaseTags)
 		{
@@ -122,7 +124,7 @@ public function lowercaseTags($isLowercaseTags)
 		}
 		
 		/**
-		 * @return SgmlToken
+		 * @return \Onphp\SgmlToken
 		**/
 		public function nextToken()
 		{
@@ -247,7 +249,7 @@ private function getChars($count)
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		private function mark()
 		{
@@ -262,7 +264,7 @@ private function mark()
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		private function reset()
 		{
@@ -279,7 +281,7 @@ private function reset()
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		private function skip($count)
 		{
@@ -323,7 +325,7 @@ private function skipString($string, $skipSpaces = false)
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		private function makeTag()
 		{
@@ -347,7 +349,7 @@ private function makeTag()
 		}
 		
 		/**
-		 * @return SgmlTag
+		 * @return \Onphp\SgmlTag
 		**/
 		private function setupTag(SgmlTag $tag)
 		{
@@ -409,7 +411,7 @@ private function handleState()
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		private function dumpBuffer()
 		{
@@ -518,7 +520,7 @@ private function outsideTagState()
 		}
 		
 		/**
-		 * @return SgmlOpenTag
+		 * @return \Onphp\SgmlOpenTag
 		**/
 		private function createOpenTag()
 		{
@@ -617,7 +619,7 @@ private function startTagState()
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		private function dumpEndTag()
 		{
@@ -773,7 +775,7 @@ private function insideTagState()
 		}
 		
 		/**
-		 * @return SgmlOpenTag
+		 * @return \Onphp\SgmlOpenTag
 		**/
 		private function dumpAttribute()
 		{
@@ -1310,7 +1312,7 @@ private function getTextualPosition()
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		private function warning($message)
 		{
@@ -1321,7 +1323,7 @@ private function warning($message)
 		}
 		
 		/**
-		 * @return HtmlTokenizer
+		 * @return \Onphp\HtmlTokenizer
 		**/
 		private function error($message)
 		{
diff --git a/main/Markup/Html/SgmlEndTag.class.php b/main/Markup/Html/SgmlEndTag.class.php
index ca6dd898cf..49b487a933 100644
--- a/main/Markup/Html/SgmlEndTag.class.php
+++ b/main/Markup/Html/SgmlEndTag.class.php
@@ -13,10 +13,12 @@
 	 * @ingroup Html
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	final class SgmlEndTag extends SgmlTag
 	{
 		/**
-		 * @return SgmlEndTag
+		 * @return \Onphp\SgmlEndTag
 		**/
 		public static function create()
 		{
diff --git a/main/Markup/Html/SgmlIgnoredTag.class.php b/main/Markup/Html/SgmlIgnoredTag.class.php
index fabefad94c..acabfb7762 100644
--- a/main/Markup/Html/SgmlIgnoredTag.class.php
+++ b/main/Markup/Html/SgmlIgnoredTag.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Html
 	**/
+	namespace Onphp;
+
 	final class SgmlIgnoredTag extends SgmlTag
 	{
 		private $cdata		= null;
 		private $endMark	= null;
 		
 		/**
-		 * @return SgmlIgnoredTag
+		 * @return \Onphp\SgmlIgnoredTag
 		**/
 		public static function create()
 		{
@@ -26,7 +28,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return SgmlIgnoredTag
+		 * @return \Onphp\SgmlIgnoredTag
 		**/
 		public static function comment()
 		{
@@ -34,7 +36,7 @@ public static function comment()
 		}
 		
 		/**
-		 * @return SgmlIgnoredTag
+		 * @return \Onphp\SgmlIgnoredTag
 		**/
 		public function setCdata(Cdata $cdata)
 		{
@@ -44,7 +46,7 @@ public function setCdata(Cdata $cdata)
 		}
 		
 		/**
-		 * @return Cdata
+		 * @return \Onphp\Cdata
 		**/
 		public function getCdata()
 		{
@@ -52,7 +54,7 @@ public function getCdata()
 		}
 		
 		/**
-		 * @return SgmlIgnoredTag
+		 * @return \Onphp\SgmlIgnoredTag
 		**/
 		public function setEndMark($endMark)
 		{
diff --git a/main/Markup/Html/SgmlOpenTag.class.php b/main/Markup/Html/SgmlOpenTag.class.php
index 82ff5c7e64..ce05475c42 100644
--- a/main/Markup/Html/SgmlOpenTag.class.php
+++ b/main/Markup/Html/SgmlOpenTag.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Html
 	**/
+	namespace Onphp;
+
 	final class SgmlOpenTag extends SgmlTag
 	{
 		private $attributes	= array();
 		private $empty		= false;
 		
 		/**
-		 * @return SgmlOpenTag
+		 * @return \Onphp\SgmlOpenTag
 		**/
 		public static function create()
 		{
@@ -26,7 +28,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return SgmlOpenTag
+		 * @return \Onphp\SgmlOpenTag
 		**/
 		public function setEmpty($isEmpty)
 		{
@@ -43,7 +45,7 @@ public function isEmpty()
 		}
 		
 		/**
-		 * @return SgmlOpenTag
+		 * @return \Onphp\SgmlOpenTag
 		**/
 		public function setAttribute($name, $value)
 		{
@@ -72,7 +74,7 @@ public function getAttribute($name)
 		}
 		
 		/**
-		 * @return SgmlOpenTag
+		 * @return \Onphp\SgmlOpenTag
 		**/
 		public function dropAttribute($name)
 		{
@@ -94,7 +96,7 @@ public function getAttributesList()
 		}
 		
 		/**
-		 * @return SgmlOpenTag
+		 * @return \Onphp\SgmlOpenTag
 		**/
 		public function dropAttributesList()
 		{
diff --git a/main/Markup/Html/SgmlTag.class.php b/main/Markup/Html/SgmlTag.class.php
index bb0eb664fb..3470a01cfe 100644
--- a/main/Markup/Html/SgmlTag.class.php
+++ b/main/Markup/Html/SgmlTag.class.php
@@ -13,12 +13,14 @@
 	 * @ingroup Html
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	abstract class SgmlTag extends SgmlToken
 	{
 		private $id = null;
 		
 		/**
-		 * @return SgmlTag
+		 * @return \Onphp\SgmlTag
 		**/
 		public function setId($id)
 		{
diff --git a/main/Markup/Html/SgmlToken.class.php b/main/Markup/Html/SgmlToken.class.php
index 44c6819c2c..cf4693e233 100644
--- a/main/Markup/Html/SgmlToken.class.php
+++ b/main/Markup/Html/SgmlToken.class.php
@@ -13,12 +13,14 @@
 	 * @ingroup Html
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	class SgmlToken
 	{
 		private $value	= null;
 		
 		/**
-		 * @return SgmlToken
+		 * @return \Onphp\SgmlToken
 		**/
 		public function setValue($value)
 		{
diff --git a/main/Math/BigInteger.class.php b/main/Math/BigInteger.class.php
index 7618b452b2..54679c6f84 100644
--- a/main/Math/BigInteger.class.php
+++ b/main/Math/BigInteger.class.php
@@ -12,47 +12,49 @@
 	/**
 	 * @ingroup Math
 	**/
+	namespace Onphp;
+
 	interface BigInteger extends Stringable
 	{
 		/**
-		 * @return BigNumberFactory
+		 * @return \Onphp\BigNumberFactory
 		**/
 		public static function getFactory();
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function add(BigInteger $x);
 		
 		public function compareTo(BigInteger $x);
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function mod(BigInteger $mod);
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function pow(BigInteger $exp);
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function modPow(BigInteger $exp, BigInteger $mod);
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function subtract(BigInteger $x);
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function mul(BigInteger $x);
 		
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		public function div(BigInteger $x);
 		
diff --git a/main/Math/BigNumberFactory.class.php b/main/Math/BigNumberFactory.class.php
index 5f58571889..f3d202607f 100644
--- a/main/Math/BigNumberFactory.class.php
+++ b/main/Math/BigNumberFactory.class.php
@@ -12,22 +12,24 @@
 	/**
 	 * @ingroup Math
 	**/
+	namespace Onphp;
+
 	abstract class BigNumberFactory extends Singleton
 	{
 		/**
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		abstract public function makeNumber($number, $base = 10);
 		
 		/**
 		 * make number from big-endian signed two's complement binary notation
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		abstract public function makeFromBinary($binary);
 		
 		/**
 		 * @param $stop maximum random number
-		 * @return BigInteger
+		 * @return \Onphp\BigInteger
 		**/
 		abstract public function makeRandom($stop, RandomSource $source);
 	}
diff --git a/main/Math/FileRandomSource.class.php b/main/Math/FileRandomSource.class.php
index 54668b4705..b32a24b62a 100644
--- a/main/Math/FileRandomSource.class.php
+++ b/main/Math/FileRandomSource.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Math
 	**/
+	namespace Onphp;
+
 	final class FileRandomSource implements RandomSource
 	{
 		private $handle = null;
diff --git a/main/Math/GmpBigInteger.class.php b/main/Math/GmpBigInteger.class.php
index b0fe9190c0..cd1d0caadb 100644
--- a/main/Math/GmpBigInteger.class.php
+++ b/main/Math/GmpBigInteger.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Math
 	**/
+	namespace Onphp;
+
 	final class GmpBigInteger implements BigInteger
 	{
 		private $resource = null;
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public static function make($number, $base = 10)
 		{
@@ -30,7 +32,7 @@ public static function make($number, $base = 10)
 		}
 		
 		/**
-		 * @return GmpBigIntegerFactory
+		 * @return \Onphp\GmpBigIntegerFactory
 		**/
 		public static function getFactory()
 		{
@@ -38,7 +40,7 @@ public static function getFactory()
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public static function makeFromBinary($binary)
 		{
@@ -65,7 +67,7 @@ public static function makeFromBinary($binary)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function add(BigInteger $x)
 		{
@@ -87,7 +89,7 @@ public function compareTo(BigInteger $x)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function mod(BigInteger $mod)
 		{
@@ -97,7 +99,7 @@ public function mod(BigInteger $mod)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function pow(BigInteger $exp)
 		{
@@ -107,7 +109,7 @@ public function pow(BigInteger $exp)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function modPow(BigInteger $exp, BigInteger $mod)
 		{
@@ -121,7 +123,7 @@ public function modPow(BigInteger $exp, BigInteger $mod)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function subtract(BigInteger $x)
 		{
@@ -131,7 +133,7 @@ public function subtract(BigInteger $x)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function mul(BigInteger $x)
 		{
@@ -141,7 +143,7 @@ public function mul(BigInteger $x)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function div(BigInteger $x)
 		{
diff --git a/main/Math/GmpBigIntegerFactory.class.php b/main/Math/GmpBigIntegerFactory.class.php
index 3b62c90c55..21046f9aad 100644
--- a/main/Math/GmpBigIntegerFactory.class.php
+++ b/main/Math/GmpBigIntegerFactory.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Math
 	**/
+	namespace Onphp;
+
 	final class GmpBigIntegerFactory extends BigNumberFactory
 	{
 		/**
-		 * @return GmpBigIntegerFactory
+		 * @return \Onphp\GmpBigIntegerFactory
 		**/
 		public static function me()
 		{
@@ -23,7 +25,7 @@ public static function me()
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function makeNumber($number, $base = 10)
 		{
@@ -31,7 +33,7 @@ public function makeNumber($number, $base = 10)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function makeFromBinary($binary)
 		{
@@ -39,7 +41,7 @@ public function makeFromBinary($binary)
 		}
 		
 		/**
-		 * @return GmpBigInteger
+		 * @return \Onphp\GmpBigInteger
 		**/
 		public function makeRandom($stop, RandomSource $source)
 		{
diff --git a/main/Math/MathUtils.class.php b/main/Math/MathUtils.class.php
index 3db0d44d93..c8263496c7 100644
--- a/main/Math/MathUtils.class.php
+++ b/main/Math/MathUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Math
 	**/
+	namespace Onphp;
+
 	final class MathUtils extends StaticFactory
 	{
 		const DEFAULT_PRECISION = 0.00001;
@@ -227,11 +229,16 @@ public static function getMmult(array $list1, array $list2)
 		{
 			$list1Size = count($list1);
 			$list2Size = count($list2);
+
+			Assert::isGreater($list1Size, 0, "Can't multiply empty matrix");
+			Assert::isGreater($list2Size, 0, "Can't multiply empty matrix");
+
+			$list2Width = count($list2[0]);
 			
 			$result = array();
 			
 			for ($i = 0; $i < $list1Size; $i++) {
-				for ($j = 0; $j < $list2Size; $j++) {
+				for ($j = 0; $j < $list2Width; $j++) {
 					$x = 0;
 					
 					for ($k = 0; $k < $list2Size; $k++) {
@@ -269,4 +276,4 @@ public static function compareFloat(
 				return $diff < 0 ? -1 : 1;
 		}
 	}
-?>
\ No newline at end of file
+?>
diff --git a/main/Math/MtRandomSource.class.php b/main/Math/MtRandomSource.class.php
index 150a40b321..b73da0f72f 100644
--- a/main/Math/MtRandomSource.class.php
+++ b/main/Math/MtRandomSource.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup Math
 	**/
+	namespace Onphp;
+
 	final class MtRandomSource extends Singleton implements RandomSource
 	{
 		/**
-		 * @return MtRandomSource
+		 * @return \Onphp\MtRandomSource
 		**/
 		public static function me()
 		{
diff --git a/main/Math/RandomSource.class.php b/main/Math/RandomSource.class.php
index cd8e259123..3fbb908813 100644
--- a/main/Math/RandomSource.class.php
+++ b/main/Math/RandomSource.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Math
 	**/
+	namespace Onphp;
+
 	interface RandomSource
 	{
 		public function getBytes($numberOfBytes);
diff --git a/main/Math/TupleFunctor.class.php b/main/Math/TupleFunctor.class.php
index 53b8eb4247..c147ce429d 100644
--- a/main/Math/TupleFunctor.class.php
+++ b/main/Math/TupleFunctor.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp;
+
 	interface TupleFunctor
 	{
 		public function apply($tuple);
diff --git a/main/Messages/Interface/Message.class.php b/main/Messages/Interface/Message.class.php
index aca3f6ad19..c8bda939b5 100644
--- a/main/Messages/Interface/Message.class.php
+++ b/main/Messages/Interface/Message.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface Message
 	{
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public function getTimestamp();
 	}
diff --git a/main/Messages/Interface/MessageQueue.class.php b/main/Messages/Interface/MessageQueue.class.php
index 9d5e2bf94b..6bfdc80c25 100644
--- a/main/Messages/Interface/MessageQueue.class.php
+++ b/main/Messages/Interface/MessageQueue.class.php
@@ -10,6 +10,8 @@
  ***************************************************************************/
 
 
+	namespace Onphp;
+
 	interface MessageQueue { /* nop */ }
 
 ?>
diff --git a/main/Messages/Interface/MessageQueueBrowser.class.php b/main/Messages/Interface/MessageQueueBrowser.class.php
index aacae421a7..302e339953 100644
--- a/main/Messages/Interface/MessageQueueBrowser.class.php
+++ b/main/Messages/Interface/MessageQueueBrowser.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface MessageQueueBrowser
 	{
 		/**
-		 * @return Message
+		 * @return \Onphp\Message
 		**/
 		public function getNextMessage();
 	}
diff --git a/main/Messages/Interface/MessageQueueReceiver.class.php b/main/Messages/Interface/MessageQueueReceiver.class.php
index 787a623e30..41e786d64b 100644
--- a/main/Messages/Interface/MessageQueueReceiver.class.php
+++ b/main/Messages/Interface/MessageQueueReceiver.class.php
@@ -9,15 +9,17 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface MessageQueueReceiver
 	{
 		/**
-		 * @return Message
+		 * @return \Onphp\Message
 		**/
 		public function receive($uTimeout = null);
 		
 		/**
-		 * @return MessageQueue
+		 * @return \Onphp\MessageQueue
 		**/
 		public function getQueue();
 	}
diff --git a/main/Messages/Interface/MessageQueueSender.class.php b/main/Messages/Interface/MessageQueueSender.class.php
index a7e6475ab6..f73b49376b 100644
--- a/main/Messages/Interface/MessageQueueSender.class.php
+++ b/main/Messages/Interface/MessageQueueSender.class.php
@@ -9,15 +9,17 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface MessageQueueSender
 	{
 		/**
-		 * @return MessageQueueReceiver
+		 * @return \Onphp\MessageQueueReceiver
 		**/
 		public function send(Message $message);
 		
 		/**
-		 * @return MessageQueue
+		 * @return \Onphp\MessageQueue
 		**/
 		public function getQueue();
 	}
diff --git a/main/Messages/TextFileQueue.class.php b/main/Messages/TextFileQueue.class.php
index 546486118b..7cc18f8ff5 100644
--- a/main/Messages/TextFileQueue.class.php
+++ b/main/Messages/TextFileQueue.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	class TextFileQueue implements MessageQueue
 	{
 		private $fileName	= null;
diff --git a/main/Messages/TextFileQueueBrowser.class.php b/main/Messages/TextFileQueueBrowser.class.php
index 2e085d4261..80ed183c0d 100644
--- a/main/Messages/TextFileQueueBrowser.class.php
+++ b/main/Messages/TextFileQueueBrowser.class.php
@@ -9,12 +9,14 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class TextFileQueueBrowser implements MessageQueueBrowser
 	{
 		private $queue = null;
 		
 		/**
-		 * @return TextFileQueueBrowser
+		 * @return \Onphp\TextFileQueueBrowser
 		**/
 		public static function create()
 		{
@@ -22,7 +24,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return TextFileQueueBrowser
+		 * @return \Onphp\TextFileQueueBrowser
 		**/
 		public function setQueue(MessageQueue $queue)
 		{
@@ -32,7 +34,7 @@ public function setQueue(MessageQueue $queue)
 		}
 		
 		/**
-		 * @return MessageQueue
+		 * @return \Onphp\MessageQueue
 		**/
 		public function getQueue()
 		{
diff --git a/main/Messages/TextFileReceiver.class.php b/main/Messages/TextFileReceiver.class.php
index 8a6b7e1d89..9f34172a95 100644
--- a/main/Messages/TextFileReceiver.class.php
+++ b/main/Messages/TextFileReceiver.class.php
@@ -9,13 +9,15 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class TextFileReceiver implements MessageQueueReceiver
 	{
 		private $queue	= null;
 		private $stream	= null;
 		
 		/**
-		 * @return TextFileReceiver
+		 * @return \Onphp\TextFileReceiver
 		**/
 		public static function create()
 		{
@@ -23,11 +25,11 @@ public static function create()
 		}
 		
 		/**
-		 * @return TextFileReceiver
+		 * @return \Onphp\TextFileReceiver
 		**/
 		public function setQueue(MessageQueue $queue)
 		{
-			Assert::isInstance($queue, 'TextFileQueue');
+			Assert::isInstance($queue, '\Onphp\TextFileQueue');
 			
 			$this->queue = $queue;
 			
@@ -35,7 +37,7 @@ public function setQueue(MessageQueue $queue)
 		}
 		
 		/**
-		 * @return MessageQueue
+		 * @return \Onphp\MessageQueue
 		**/
 		public function getQueue()
 		{
@@ -43,7 +45,7 @@ public function getQueue()
 		}
 		
 		/**
-		 * @return Message
+		 * @return \Onphp\Message
 		**/
 		public function receive($uTimeout = null)
 		{
@@ -76,7 +78,7 @@ public function receive($uTimeout = null)
 		}
 		
 		/**
-		 * @return FileInputStream
+		 * @return \Onphp\FileInputStream
 		**/
 		private function getStream()
 		{
diff --git a/main/Messages/TextFileSender.class.php b/main/Messages/TextFileSender.class.php
index 0dc9b8b7f7..a62c2fee3c 100644
--- a/main/Messages/TextFileSender.class.php
+++ b/main/Messages/TextFileSender.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class TextFileSender implements MessageQueueSender
 	{
 		private $queue	= null;
@@ -21,7 +23,7 @@ public static function create()
 		
 		public function setQueue(MessageQueue $queue)
 		{
-			Assert::isInstance($queue, 'TextFileQueue');
+			Assert::isInstance($queue, '\Onphp\TextFileQueue');
 			
 			$this->queue = $queue;
 			
@@ -29,7 +31,7 @@ public function setQueue(MessageQueue $queue)
 		}
 		
 		/**
-		 * @return MessageQueue
+		 * @return \Onphp\MessageQueue
 		**/
 		public function getQueue()
 		{
@@ -41,7 +43,7 @@ public function send(Message $message)
 			if (!$this->queue)
 				throw new WrongStateException('you must set the queue first');
 			
-			Assert::isInstance($message, 'TextMessage');
+			Assert::isInstance($message, '\Onphp\TextMessage');
 			
 			$this->getStream()->write(
 				$message->getTimestamp()->toString()."\t"
diff --git a/main/Messages/TextMessage.class.php b/main/Messages/TextMessage.class.php
index 4fba2aaf63..cfeac3bc40 100644
--- a/main/Messages/TextMessage.class.php
+++ b/main/Messages/TextMessage.class.php
@@ -10,6 +10,8 @@
  ***************************************************************************/
 
 
+	namespace Onphp;
+
 	final class TextMessage implements Message
 	{
 		private $timestamp	= null;
diff --git a/main/Monitoring/PinbaClient.class.php b/main/Monitoring/PinbaClient.class.php
index 7e9d3a651a..0bf7fbd759 100644
--- a/main/Monitoring/PinbaClient.class.php
+++ b/main/Monitoring/PinbaClient.class.php
@@ -13,6 +13,8 @@
 	 * Simple wrapper to pinba php extention
 	 * @see http://pinba.org/
 	 */
+	namespace Onphp;
+
 	final class PinbaClient extends Singleton
 	{
 		private static $enabled = null;
@@ -22,7 +24,7 @@ final class PinbaClient extends Singleton
 		
 		
 		/**
-		 * @return PinbaClient
+		 * @return \Onphp\PinbaClient
 		**/
 		public static function me()
 		{
diff --git a/main/Monitoring/PinbedMemcached.class.php b/main/Monitoring/PinbedMemcached.class.php
index 02a5026639..489271933b 100644
--- a/main/Monitoring/PinbedMemcached.class.php
+++ b/main/Monitoring/PinbedMemcached.class.php
@@ -12,10 +12,12 @@
 	/**
 	 *
 	**/
+	namespace Onphp;
+
 	final class PinbedMemcached extends SocketMemcached
 	{
 		/**
-		 * @return PinbedMemcached 
+		 * @return \Onphp\PinbedMemcached 
 		**/
 		public static function create(
 			$host = SocketMemcached::DEFAULT_HOST,
diff --git a/main/Monitoring/PinbedPeclMemcached.class.php b/main/Monitoring/PinbedPeclMemcached.class.php
index 8c1ea5040a..4a2565f555 100644
--- a/main/Monitoring/PinbedPeclMemcached.class.php
+++ b/main/Monitoring/PinbedPeclMemcached.class.php
@@ -12,14 +12,16 @@
 	/**
 	 *
 	**/
+	namespace Onphp;
+
 	final class PinbedPeclMemcached extends PeclMemcached
 	{
 		/**
-		 * @return PinbedPeclMemcached 
+		 * @return \Onphp\PinbedPeclMemcached 
 		**/
 		public static function create(
-			$host = Memcached::DEFAULT_HOST,
-			$port = Memcached::DEFAULT_PORT,
+			$host = \Memcached::DEFAULT_HOST,
+			$port = \Memcached::DEFAULT_PORT,
 			$connectTimeout = PeclMemcached::DEFAULT_TIMEOUT
 		)
 		{
diff --git a/main/Monitoring/PinbedPgSQL.class.php b/main/Monitoring/PinbedPgSQL.class.php
index 831e9a570a..fa187db6a9 100644
--- a/main/Monitoring/PinbedPgSQL.class.php
+++ b/main/Monitoring/PinbedPgSQL.class.php
@@ -12,6 +12,8 @@
 	/**
 	 *  @ingroup DB
 	**/
+	namespace Onphp;
+
 	final class PinbedPgSQL extends PgSQL
 	{
 		public function connect()
@@ -57,7 +59,7 @@ public function queryRaw($queryString)
 				
 				return $result;
 				
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				if (PinbaClient::isEnabled())
 					PinbaClient::me()->timerStop('pg_sql_query_'.$this->basename);
 				
diff --git a/main/Net/GenericUri.class.php b/main/Net/GenericUri.class.php
index 2b05d40ae6..feced20bb8 100644
--- a/main/Net/GenericUri.class.php
+++ b/main/Net/GenericUri.class.php
@@ -14,6 +14,8 @@
 	 * @see http://tools.ietf.org/html/rfc3986
 	 * @todo comparsion
 	**/
+	namespace Onphp;
+
 	class GenericUri implements Stringable
 	{
 		const CHARS_UNRESERVED		= 'a-z0-9-._~';
@@ -31,7 +33,7 @@ class GenericUri implements Stringable
 		protected $fragment	= null;
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public static function create()
 		{
@@ -39,7 +41,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		final public static function parse($uri, $guessClass = false)
 		{
@@ -99,7 +101,7 @@ final public static function parse($uri, $guessClass = false)
 		
 		/**
 		 * @see http://tools.ietf.org/html/rfc3986#section-5.2.2
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		final public function transform(GenericUri $reference, $strict = true)
 		{
@@ -178,7 +180,7 @@ public static function getKnownSubSchemes()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function setScheme($scheme)
 		{
@@ -193,7 +195,7 @@ public function getScheme()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function setUserInfo($userInfo)
 		{
@@ -208,7 +210,7 @@ public function getUserInfo()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function setHost($host)
 		{
@@ -223,7 +225,7 @@ public function getHost()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function setPort($port)
 		{
@@ -238,7 +240,7 @@ public function getPort()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function setPath($path)
 		{
@@ -253,7 +255,7 @@ public function getPath()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function setQuery($query)
 		{
@@ -263,7 +265,7 @@ public function setQuery($query)
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function appendQuery($string, $separator = '&')
 		{
@@ -285,7 +287,7 @@ public function getQuery()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function setFragment($fragment)
 		{
@@ -300,7 +302,7 @@ public function getFragment()
 		}
 		
 		/**
-		 * @return GenericUri
+		 * @return \Onphp\GenericUri
 		**/
 		public function setAuthority($authority)
 		{
@@ -754,7 +756,7 @@ final class PercentEncodingNormalizator
 		private $unreservedPartChars = null;
 		
 		/**
-		 * @return PercentEncodingNormalizator
+		 * @return \Onphp\PercentEncodingNormalizator
 		**/
 		public static function create()
 		{
@@ -762,7 +764,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return PercentEncodingNormalizator
+		 * @return \Onphp\PercentEncodingNormalizator
 		**/
 		public function setUnreservedPartChars($unreservedPartChars)
 		{
diff --git a/main/Net/Http/Cookie.class.php b/main/Net/Http/Cookie.class.php
index 53096f3001..0d023e55eb 100644
--- a/main/Net/Http/Cookie.class.php
+++ b/main/Net/Http/Cookie.class.php
@@ -13,6 +13,8 @@
 	/**
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	final class Cookie extends CollectionItem
 	{
 		private $name		= null;
@@ -24,7 +26,7 @@ final class Cookie extends CollectionItem
 		private $httpOnly	= false;
 		
 		/**
-		 * @return Cookie
+		 * @return \Onphp\Cookie
 		**/
 		public static function create($name)
 		{
diff --git a/main/Net/Http/CookieCollection.class.php b/main/Net/Http/CookieCollection.class.php
index 7526ef2710..44831826cf 100644
--- a/main/Net/Http/CookieCollection.class.php
+++ b/main/Net/Http/CookieCollection.class.php
@@ -16,10 +16,12 @@
 	 * 
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	final class CookieCollection extends AbstractCollection
 	{
 		/**
-		 * @return CookieCollection
+		 * @return \Onphp\CookieCollection
 		**/
 		public static function create()
 		{
diff --git a/main/Net/Http/CurlHttpClient.class.php b/main/Net/Http/CurlHttpClient.class.php
index 0c528dc848..3c532804f0 100644
--- a/main/Net/Http/CurlHttpClient.class.php
+++ b/main/Net/Http/CurlHttpClient.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	final class CurlHttpClient implements HttpClient
 	{
 		private $options		= array();
@@ -28,7 +30,7 @@ final class CurlHttpClient implements HttpClient
 		private $oldUrlConstructor = ONPHP_CURL_CLIENT_OLD_TO_STRING;
 		
 		/**
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public static function create()
 		{
@@ -36,7 +38,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public function setOption($key, $value)
 		{
@@ -46,7 +48,7 @@ public function setOption($key, $value)
 		}
 		
 		/**
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public function dropOption($key)
 		{
@@ -64,8 +66,8 @@ public function getOption($key)
 		}
 		
 		/**
-		 * @param $timeout in seconds
-		 * @return CurlHttpClient
+		 * @param $timeout int in seconds
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public function setTimeout($timeout)
 		{
@@ -89,7 +91,7 @@ public function getTimeout()
 		 * whether to follow header Location or not
 		 *
 		 * @param $really boolean
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public function setFollowLocation($really)
 		{
@@ -105,7 +107,7 @@ public function isFollowLocation()
 		
 		/**
 		 * @param $really boolean
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public function setNoBody($really)
 		{
@@ -120,7 +122,7 @@ public function hasNoBody()
 		}
 		
 		/**
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public function setMaxRedirects($maxRedirects)
 		{
@@ -138,7 +140,7 @@ public function getMaxRedirects()
 		}
 		
 		/**
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public function setMaxFileSize($maxFileSize)
 		{
@@ -154,7 +156,7 @@ public function getMaxFileSize()
 		/**
 		 * @deprecated in the future value always false and method will be  removed
 		 * @param bool $oldUrlConstructor
-		 * @return CurlHttpClient 
+		 * @return \Onphp\CurlHttpClient 
 		 */
 		public function setOldUrlConstructor($oldUrlConstructor = false)
 		{
@@ -172,7 +174,7 @@ public function isOldUrlConstructor()
 		}
 		
 		/**
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		public function addRequest(HttpRequest $request, $options = array())
 		{
@@ -192,7 +194,7 @@ public function addRequest(HttpRequest $request, $options = array())
 		}
 		
 		/**
-		 * @return CurlHttpResponse
+		 * @return \Onphp\CurlHttpResponse
 		**/
 		public function getResponse(HttpRequest $request)
 		{
@@ -205,7 +207,7 @@ public function getResponse(HttpRequest $request)
 		}
 		
 		/**
-		 * @return HttpResponse
+		 * @return \Onphp\HttpResponse
 		**/
 		public function send(HttpRequest $request)
 		{
@@ -345,7 +347,7 @@ protected function makeHandle(HttpRequest $request, CurlHttpResponse $response)
 		}
 		
 		/**
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		**/
 		protected function makeResponse($handle, CurlHttpResponse $response)
 		{
@@ -422,6 +424,9 @@ private function findAtParamInPost($postList)
 		 */
 		private function fileFilter($value)
 		{
+			if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
+				return new \CURLFile($value);
+			}
 			Assert::isTrue(
 				is_readable($value) && is_file($value),
 				'couldn\'t access to file with path: '.$value
diff --git a/main/Net/Http/CurlHttpResponse.class.php b/main/Net/Http/CurlHttpResponse.class.php
index 27d18a9f8b..ec0605e91d 100644
--- a/main/Net/Http/CurlHttpResponse.class.php
+++ b/main/Net/Http/CurlHttpResponse.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	final class CurlHttpResponse implements HttpResponse
 	{
 		private $headerParser		= null;
@@ -27,7 +29,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return CurlHttpResponse
+		 * @return \Onphp\CurlHttpResponse
 		**/
 		public static function create()
 		{
@@ -73,7 +75,7 @@ public function writeBody($resource, $body)
 		
 		/**
 		 * internal use only for curl client
-		 * @return CurlHttpResponse
+		 * @return \Onphp\CurlHttpResponse
 		**/
 		public function setMaxFileSize($maxFileSize)
 		{
@@ -82,7 +84,7 @@ public function setMaxFileSize($maxFileSize)
 		}
 		
 		/**
-		 * @return CurlHttpResponse
+		 * @return \Onphp\CurlHttpResponse
 		**/
 		public function setStatus(HttpStatus $status)
 		{
@@ -91,7 +93,7 @@ public function setStatus(HttpStatus $status)
 		}
 		
 		/**
-		 * @return HttpStatus
+		 * @return \Onphp\HttpStatus
 		**/
 		public function getStatus()
 		{
diff --git a/main/Net/Http/HeaderParser.class.php b/main/Net/Http/HeaderParser.class.php
index 02af344c40..dd6e6fd1d9 100644
--- a/main/Net/Http/HeaderParser.class.php
+++ b/main/Net/Http/HeaderParser.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	final class HeaderParser
 	{
 		private $headers		= array();
diff --git a/main/Net/Http/HeaderUtils.class.php b/main/Net/Http/HeaderUtils.class.php
index b6042a9ff7..753f3d4d0c 100644
--- a/main/Net/Http/HeaderUtils.class.php
+++ b/main/Net/Http/HeaderUtils.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	final class HeaderUtils extends StaticFactory
 	{
 		private static $headerSent		= false;
@@ -36,8 +38,9 @@ public static function redirectBack()
 				self::$headerSent = true;
 				self::$redirectSent = true;
 				return $_SERVER['HTTP_REFERER'];
-			} else
-				return false;
+			}
+
+			return false;
 		}
 
 		public static function getRequestHeaderList()
@@ -122,18 +125,16 @@ public static function sendNotCachedHeader()
 		public static function sendContentLength($length)
 		{
 			Assert::isInteger($length);
-			
-			header(
-				"Content-Length: {$length}"
-			);
-			
+
+			header("Content-Length: {$length}");
+
 			self::$headerSent = true;
 		}
 		
 		public static function sendHttpStatus(HttpStatus $status)
 		{
 			header($status->toString());
-			
+
 			self::$headerSent = true;
 		}
 
diff --git a/main/Net/Http/HttpClient.class.php b/main/Net/Http/HttpClient.class.php
index a7e2f4a549..919e399eda 100644
--- a/main/Net/Http/HttpClient.class.php
+++ b/main/Net/Http/HttpClient.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	interface HttpClient
 	{
 		/**
@@ -33,7 +35,7 @@ public function setMaxRedirects($maxRedirects);
 		public function getMaxRedirects();
 		
 		/**
-		 * @return HttpResponse
+		 * @return \Onphp\HttpResponse
 		**/
 		public function send(HttpRequest $request);
 	}
diff --git a/main/Net/Http/HttpHeaderCollection.class.php b/main/Net/Http/HttpHeaderCollection.class.php
new file mode 100644
index 0000000000..bb779b91cd
--- /dev/null
+++ b/main/Net/Http/HttpHeaderCollection.class.php
@@ -0,0 +1,124 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2013 by Nikita V. Konstantinov                          *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	namespace Onphp;
+	/**
+	 * @ingroup Http
+	**/
+	class HttpHeaderCollection implements \IteratorAggregate
+	{
+		private $headers = array();
+
+		public function __construct(array $headers = array())
+		{
+			foreach ($headers as $name => $value)
+				$this->set($name, $value);
+		}
+
+		public function set($name, $value)
+		{
+			$this->headers[$this->normalizeName($name)]=
+				array_values((array) $value);
+
+			return $this;
+		}
+
+		public function add($name, $value)
+		{
+			$name = $this->normalizeName($name);
+
+			if (array_key_exists($name, $this->headers))
+				$this->headers[$name][] = $value;
+			else
+				$this->set($name, $value);
+
+			return $this;
+		}
+
+		public function remove($name)
+		{
+			if (!$this->has($name)) {
+				throw new MissingElementException(
+					sprintf('Header "%s" does not exist', $name)
+				);
+			}
+
+			unset($this->headers[$this->normalizeName($name)]);
+
+			return $this;
+		}
+
+		public function get($name)
+		{
+			$valueList = $this->getRaw($name);
+			return end($valueList);
+		}
+
+		public function has($name)
+		{
+			return
+				array_key_exists(
+					$this->normalizeName($name),
+					$this->headers
+				);
+		}
+
+		public function getRaw($name)
+		{
+			if (!$this->has($name)) {
+				throw new MissingElementException(
+					sprintf('Header "%s" does not exist', $name)
+				);
+			}
+
+			return $this->headers[$this->normalizeName($name)];
+		}
+
+		public function getAll()
+		{
+			return
+				array_map(
+					function (array $value) {
+						return end($value);
+					},
+					$this->headers
+				);
+		}
+
+		public function getIterator()
+		{
+			$headerList = array();
+
+			foreach ($this->headers as $header => $valueList) {
+				foreach ($valueList as $value) {
+					$headerList[] = sprintf('%s: %s', $header, $value);
+				}
+			}
+
+			return new \ArrayIterator($headerList);
+		}
+
+		private function normalizeName($name)
+		{
+			return
+				preg_replace_callback(
+					'/(?<name>[^-]+)/',
+					function ($match) {
+						return
+							strtoupper(substr($match['name'], 0, 1))
+							.strtolower(substr($match['name'], 1))
+						;
+					},
+					$name
+				);
+		}
+	}
+?>
diff --git a/main/Net/Http/HttpMethod.class.php b/main/Net/Http/HttpMethod.class.php
index 736c720e3f..04e64edb74 100644
--- a/main/Net/Http/HttpMethod.class.php
+++ b/main/Net/Http/HttpMethod.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	final class HttpMethod extends Enumeration
 	{
 		const OPTIONS	= 1;
@@ -57,5 +59,23 @@ public static function post()
 		{
 			return new self(self::POST);
 		}
+		
+		/**
+		 * @return HttpMethod
+		 */
+		public static function any()
+		{
+			return self::get();
+		}
+		
+		public static function createByName($name)
+		{
+			$key = array_search($name, self::any()->getNameList());
+			
+			if ($key === false)
+				throw new WrongArgumentException();
+			
+			return new self($key);
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/main/Net/Http/HttpResponse.class.php b/main/Net/Http/HttpResponse.class.php
index 10178477e6..295717eaef 100644
--- a/main/Net/Http/HttpResponse.class.php
+++ b/main/Net/Http/HttpResponse.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Http
 	**/
+	namespace Onphp;
+
 	interface HttpResponse
 	{
 		/**
-		 * @return HttpStatus
+		 * @return \Onphp\HttpStatus
 		**/
 		public function getStatus();
 		public function getReasonPhrase();
diff --git a/main/Net/Http/HttpStatus.class.php b/main/Net/Http/HttpStatus.class.php
index 91f4bf0ed8..4c258eb6c2 100644
--- a/main/Net/Http/HttpStatus.class.php
+++ b/main/Net/Http/HttpStatus.class.php
@@ -14,7 +14,9 @@
 	 * 
 	 * @ingroup Http
 	**/	
-	final class HttpStatus extends Enumeration
+	namespace Onphp;
+
+	final class HttpStatus extends Enum
 	{
 		const CODE_100	= 100;
 		const CODE_101	= 101;
@@ -58,7 +60,7 @@ final class HttpStatus extends Enumeration
 		const CODE_507	= 507;
 		const CODE_510	= 510;
 		
-		protected $names = array(
+		protected static $names = array(
 			self::CODE_100 => 'Continue',
 			self::CODE_101 => 'Switching Protocols',
 			self::CODE_200 => 'OK',
diff --git a/main/Net/HttpUrl.class.php b/main/Net/HttpUrl.class.php
index 300cf42f23..a0a940cc33 100644
--- a/main/Net/HttpUrl.class.php
+++ b/main/Net/HttpUrl.class.php
@@ -12,12 +12,16 @@
 	/**
 	 * @ingroup Net
 	**/
+	namespace Onphp;
+
 	final class HttpUrl extends Url
 	{
 		protected static $knownSubSchemes	= array();
 		
+		private $checkPrivilegedPorts = false;
+		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public static function create()
 		{
@@ -25,7 +29,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		 * 
 		 * @see rfc2616, sec. 14.23.
 		 * 
@@ -85,36 +89,12 @@ public function isValidPort()
 			if (!parent::isValidPort())
 				return false;
 			
-			if (
-				$this->port
-				&& !in_array($this->port, array(80, 443))
-				&& $this->port < 1024
-			)
+			if ($this->checkPrivilegedPorts && $this->isPrivilegedPortUsed())
 				return false;
 			
 			return true;
 		}
 		
-		protected function isValidHostName()
-		{
-			if (!parent::isValidHostName())
-				return false;
-			
-			$charPattern = $this->charPattern(null);
-			
-			// using rfc 2396, in order to detect bad ip address ranges like
-			// 666.666.666.666 which are valid hostnames in generic uri syntax
-			
-			$topLabelPattern = '(([a-z])|([a-z]([a-z0-9-])*[a-z0-9]))\.?';
-			
-			return (
-				preg_match(
-					"/^($charPattern*\.)?{$topLabelPattern}$/i",
-					$this->host
-				) == 1
-			);
-		}
-		
 		public function normalize()
 		{
 			parent::normalize();
@@ -138,5 +118,50 @@ public function makeComparable()
 		{
 			return $this->ensureAbsolute()->normalize()->setFragment(null);
 		}
+		
+		public function setCheckPrivilegedPorts($check = true)
+		{
+			$this->checkPrivilegedPorts = $check ? true : false;
+			
+			return $this;
+		}
+		
+		public function isPrivilegedPortsCheckEnabled()
+		{
+			return $this->checkPrivilegedPorts;
+		}
+		
+		public function isPrivilegedPortUsed()
+		{
+			if (
+				$this->port
+				&& !in_array($this->port, array(80, 443))
+				&& ($this->port < 1024)
+			) {
+				return true;
+			}
+			
+			return false;
+		}
+		
+		protected function isValidHostName()
+		{
+			if (!parent::isValidHostName())
+				return false;
+				
+			$charPattern = $this->charPattern(null);
+				
+			// using rfc 2396, in order to detect bad ip address ranges like
+			// 666.666.666.666 which are valid hostnames in generic uri syntax
+				
+			$topLabelPattern = '(([a-z])|([a-z]([a-z0-9-])*[a-z0-9]))\.?';
+				
+			return (
+					preg_match(
+							"/^($charPattern*\.)?{$topLabelPattern}$/i",
+							$this->host
+			) == 1
+			);
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/main/Net/Ip/IpAddress.class.php b/main/Net/Ip/IpAddress.class.php
index c3fc7c6848..d929d15373 100644
--- a/main/Net/Ip/IpAddress.class.php
+++ b/main/Net/Ip/IpAddress.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Ip
 	**/
+	namespace Onphp;
+
 	class IpAddress implements Stringable, DialectString
 	{
 		private $longIp = null;
 		
 		/**
-		 * @return IpAddress
+		 * @return \Onphp\IpAddress
 		**/
 		public static function create($ip)
 		{
@@ -38,7 +40,7 @@ public function __construct($ip)
 		}
 		
 		/**
-		 * @return IpAddress
+		 * @return \Onphp\IpAddress
 		**/
 		public function setIp($ip)
 		{
diff --git a/main/Net/Ip/IpNetwork.class.php b/main/Net/Ip/IpNetwork.class.php
index e63ef4cf80..abc748c0a7 100644
--- a/main/Net/Ip/IpNetwork.class.php
+++ b/main/Net/Ip/IpNetwork.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Ip
 	 * @deprecated use IpRange instead
 	**/
+	namespace Onphp;
+
 	final class IpNetwork implements SingleRange
 	{
 		const MASK_MAX_SIZE = 31;
@@ -23,7 +25,7 @@ final class IpNetwork implements SingleRange
 		private $longMask 	= null;
 		
 		/**
-		 * @return IpNetwork
+		 * @return \Onphp\IpNetwork
 		**/
 		public static function create(IpAddress $ip, $mask)
 		{
@@ -53,7 +55,7 @@ public function getMask()
 		}
 		
 		/**
-		 * @return IpAddress
+		 * @return \Onphp\IpAddress
 		**/
 		public function getStart()
 		{
@@ -61,7 +63,7 @@ public function getStart()
 		}
 		
 		/**
-		 * @return IpAddress
+		 * @return \Onphp\IpAddress
 		**/
 		public function getEnd()
 		{
@@ -77,7 +79,7 @@ public function getEnd()
 		
 		public function contains(/* IpAddress */ $probe)
 		{
-			Assert::isInstance($probe, 'IpAddress');
+			Assert::isInstance($probe, '\Onphp\IpAddress');
 			
 			return
 				($probe->getLongIp() & $this->longMask)
diff --git a/main/Net/Ip/IpRange.class.php b/main/Net/Ip/IpRange.class.php
index 5a0bcd665c..9ae6dfbb29 100644
--- a/main/Net/Ip/IpRange.class.php
+++ b/main/Net/Ip/IpRange.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Ip
 	**/
+	namespace Onphp;
+
 	class IpRange implements SingleRange, DialectString, Stringable
 	{
 		const MASK_MAX_SIZE = 31;
@@ -24,7 +26,7 @@ class IpRange implements SingleRange, DialectString, Stringable
 		private $endIp		= null;
 		
 		/**
-		 * @return IpRange
+		 * @return \Onphp\IpRange
 		**/
 		public static function create(/**/)
 		{
@@ -53,7 +55,7 @@ public function __construct(/**/)
 		}
 		
 		/**
-		 * @return IpAddress
+		 * @return \Onphp\IpAddress
 		**/
 		public function getStart()
 		{
@@ -61,7 +63,7 @@ public function getStart()
 		}
 		
 		/**
-		 * @return IpRange
+		 * @return \Onphp\IpRange
 		**/
 		public function setStart(IpAddress $startIp)
 		{
@@ -71,7 +73,7 @@ public function setStart(IpAddress $startIp)
 		}
 		
 		/**
-		 * @return IpAddress
+		 * @return \Onphp\IpAddress
 		**/
 		public function getEnd()
 		{
@@ -79,7 +81,7 @@ public function getEnd()
 		}
 		
 		/**
-		 * @return IpRange
+		 * @return \Onphp\IpRange
 		**/
 		public function setEnd(IpAddress $endIp)
 		{
@@ -90,7 +92,7 @@ public function setEnd(IpAddress $endIp)
 		
 		public function contains(/* IpAddress */ $probe)
 		{
-			Assert::isInstance($probe, 'IpAddress');
+			Assert::isInstance($probe, '\Onphp\IpAddress');
 			
 			return (
 				($this->startIp->getLongIp() <= $probe->getLongIp())
@@ -131,7 +133,7 @@ private function createFromInterval($interval)
 					IpAddress::create(trim($parts[1]))
 				);
 
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				throw new WrongArgumentException('strange parameters received');
 			}
 			
diff --git a/main/Net/Ip/IpUtils.class.php b/main/Net/Ip/IpUtils.class.php
index 4a9d5d5cfe..5704d64dea 100644
--- a/main/Net/Ip/IpUtils.class.php
+++ b/main/Net/Ip/IpUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Ip
 	**/
+	namespace Onphp;
+
 	final class IpUtils extends StaticFactory
 	{
 		public static function makeRanges(array $ips)
diff --git a/main/Net/Mail/Mail.class.php b/main/Net/Mail/Mail.class.php
index a3530783bd..9df700c223 100644
--- a/main/Net/Mail/Mail.class.php
+++ b/main/Net/Mail/Mail.class.php
@@ -16,7 +16,9 @@
 	 * setSendmailAdditionalArgs('-f from.addr@example.com').
 	 * See 'man sendmail' for details.
 	**/
-	final class Mail
+	namespace Onphp;
+
+	class Mail
 	{
 		private $to				= null;
 		private $cc				= null;
@@ -30,7 +32,7 @@ final class Mail
 		private $sendmailAdditionalArgs	= null;
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public static function create()
 		{
@@ -38,7 +40,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function send()
 		{
@@ -127,7 +129,7 @@ public function send()
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setTo($to)
 		{
@@ -136,7 +138,7 @@ public function setTo($to)
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setCc($cc)
 		{
@@ -145,7 +147,7 @@ public function setCc($cc)
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setSubject($subject)
 		{
@@ -154,7 +156,7 @@ public function setSubject($subject)
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setText($text)
 		{
@@ -163,7 +165,7 @@ public function setText($text)
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setFrom($from)
 		{
@@ -172,7 +174,7 @@ public function setFrom($from)
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setEncoding($encoding)
 		{
@@ -186,7 +188,7 @@ public function getContentType()
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setContentType($contentType)
 		{
@@ -200,7 +202,7 @@ public function getSendmailAdditionalArgs()
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setSendmailAdditionalArgs($sendmailAdditionalArgs)
 		{
@@ -214,7 +216,7 @@ public function getReturnPath()
 		}
 		
 		/**
-		 * @return Mail
+		 * @return \Onphp\Mail
 		**/
 		public function setReturnPath($returnPath)
 		{
diff --git a/main/Net/Mail/MailAddress.class.php b/main/Net/Mail/MailAddress.class.php
index 5f25c646bc..e35e27cbc1 100644
--- a/main/Net/Mail/MailAddress.class.php
+++ b/main/Net/Mail/MailAddress.class.php
@@ -16,6 +16,8 @@
 	 *
 	 * @see javax.mail.internet.InternetAddress
 	**/
+	namespace Onphp;
+
 	final class MailAddress
 	{
 		const RFC_MAX_ENCODED_WORD_LENGTH = 75;
diff --git a/main/Net/Mail/MailBuilder.class.php b/main/Net/Mail/MailBuilder.class.php
index fd224e99ca..dbdb73eb6d 100644
--- a/main/Net/Mail/MailBuilder.class.php
+++ b/main/Net/Mail/MailBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Mail
 	**/
+	namespace Onphp;
+
 	interface MailBuilder
 	{
 		/// returns encoded body as string
diff --git a/main/Net/Mail/MailEncoding.class.php b/main/Net/Mail/MailEncoding.class.php
index 75bad8cb8f..13d535718d 100644
--- a/main/Net/Mail/MailEncoding.class.php
+++ b/main/Net/Mail/MailEncoding.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Mail
 	**/
+	namespace Onphp;
+
 	final class MailEncoding extends Enumeration
 	{
 		const SEVEN_BITS		= 0x01;
@@ -27,7 +29,7 @@ final class MailEncoding extends Enumeration
 		);
 		
 		/**
-		 * @return MailEncoding
+		 * @return \Onphp\MailEncoding
 		**/
 		public static function seven()
 		{
@@ -35,7 +37,7 @@ public static function seven()
 		}
 		
 		/**
-		 * @return MailEncoding
+		 * @return \Onphp\MailEncoding
 		**/
 		public static function eight()
 		{
@@ -43,7 +45,7 @@ public static function eight()
 		}
 		
 		/**
-		 * @return MailEncoding
+		 * @return \Onphp\MailEncoding
 		**/
 		public static function base64()
 		{
@@ -51,7 +53,7 @@ public static function base64()
 		}
 		
 		/**
-		 * @return MailEncoding
+		 * @return \Onphp\MailEncoding
 		**/
 		public static function quoted()
 		{
diff --git a/main/Net/Mail/MailException.class.php b/main/Net/Mail/MailException.class.php
index 4d406763e6..3356634184 100644
--- a/main/Net/Mail/MailException.class.php
+++ b/main/Net/Mail/MailException.class.php
@@ -12,5 +12,7 @@
 	/**
 	 * @ingroup Exceptions
 	**/
+	namespace Onphp;
+
 	class MailException extends BaseException {/*_*/};
 ?>
\ No newline at end of file
diff --git a/main/Net/Mail/MailNotSentException.class.php b/main/Net/Mail/MailNotSentException.class.php
index 6949b27f55..7095126590 100644
--- a/main/Net/Mail/MailNotSentException.class.php
+++ b/main/Net/Mail/MailNotSentException.class.php
@@ -12,5 +12,7 @@
 	/**
 	 * @ingroup Exceptions
 	**/
+	namespace Onphp;
+
 	class MailNotSentException extends MailException {/*_*/};
 ?>
\ No newline at end of file
diff --git a/main/Net/Mail/MimeMail.class.php b/main/Net/Mail/MimeMail.class.php
index bfeb2caf9f..90f5fca0bc 100644
--- a/main/Net/Mail/MimeMail.class.php
+++ b/main/Net/Mail/MimeMail.class.php
@@ -14,6 +14,8 @@
 	/**
 	 * @ingroup Mail
 	**/
+	namespace Onphp;
+
 	final class MimeMail implements MailBuilder
 	{
 		private $parts = array();
@@ -25,7 +27,7 @@ final class MimeMail implements MailBuilder
 		private $boundary	= null;
 		
 		/**
-		 * @return MimeMail
+		 * @return \Onphp\MimeMail
 		**/
 		public function addPart(MimePart $part)
 		{
@@ -80,7 +82,7 @@ public function getHeaders()
 		}
 		
 		/**
-		 * @return MimeMail
+		 * @return \Onphp\MimeMail
 		**/
 		public function setBoundary($boundary)
 		{
diff --git a/main/Net/Mail/MimePart.class.php b/main/Net/Mail/MimePart.class.php
index f0e808b0c2..e0b731aac1 100644
--- a/main/Net/Mail/MimePart.class.php
+++ b/main/Net/Mail/MimePart.class.php
@@ -14,6 +14,8 @@
 	/**
 	 * @ingroup Mail
 	**/
+	namespace Onphp;
+
 	final class MimePart implements MailBuilder
 	{
 		private $contentId		= null;
@@ -34,7 +36,7 @@ final class MimePart implements MailBuilder
 		private $parts			= array();
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public static function create()
 		{
@@ -50,7 +52,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setBoundary($boundary)
 		{
@@ -70,7 +72,7 @@ public function getContentId()
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setContentId($id)
 		{
@@ -85,7 +87,7 @@ public function getContentType()
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setContentType($type)
 		{
@@ -95,7 +97,7 @@ public function setContentType($type)
 		}
 		
 		/**
-		 * @return MailEncoding
+		 * @return \Onphp\MailEncoding
 		**/
 		public function getEncoding()
 		{
@@ -103,7 +105,7 @@ public function getEncoding()
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setEncoding(MailEncoding $encoding)
 		{
@@ -118,7 +120,7 @@ public function getCharset()
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setCharset($charset)
 		{
@@ -133,7 +135,7 @@ public function getFilename()
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setFilename($name)
 		{
@@ -148,7 +150,7 @@ public function getDescription()
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setDescription($description)
 		{
@@ -158,8 +160,8 @@ public function setDescription($description)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return MimePart
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\MimePart
 		**/
 		public function loadBodyFromFile($path)
 		{
@@ -171,7 +173,7 @@ public function loadBodyFromFile($path)
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setBody($body)
 		{
@@ -186,7 +188,7 @@ public function getBody()
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function addSubPart(MimePart $part)
 		{
@@ -196,7 +198,7 @@ public function addSubPart(MimePart $part)
 		}
 		
 		/**
-		 * @return MimePart
+		 * @return \Onphp\MimePart
 		**/
 		public function setInline($inline = true)
 		{
diff --git a/main/Net/Soap/DTOClass.class.php b/main/Net/Soap/DTOClass.class.php
index b55ee78e0c..5d0eb352de 100644
--- a/main/Net/Soap/DTOClass.class.php
+++ b/main/Net/Soap/DTOClass.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class DTOClass implements PrototypedEntity
 	{
 		final public function makeObject(Form $form)
@@ -19,7 +21,7 @@ final public function makeObject(Form $form)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		final public function toForm()
 		{
diff --git a/main/Net/Soap/DTOMessage.class.php b/main/Net/Soap/DTOMessage.class.php
index 6465f049e7..3163c5cb5d 100644
--- a/main/Net/Soap/DTOMessage.class.php
+++ b/main/Net/Soap/DTOMessage.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class DTOMessage implements PrototypedEntity
 	{
 		final public function makeDto()
diff --git a/main/Net/Soap/PrototypedSoapClient.class.php b/main/Net/Soap/PrototypedSoapClient.class.php
index ee9e26d24e..cd6f024120 100644
--- a/main/Net/Soap/PrototypedSoapClient.class.php
+++ b/main/Net/Soap/PrototypedSoapClient.class.php
@@ -38,6 +38,8 @@
 	 *	5. implement logCall(), if you need debugging output
 	 * 
 	**/
+	namespace Onphp;
+
 	abstract class PrototypedSoapClient
 	{
 		protected $wsdlUrl		= null;
@@ -47,20 +49,20 @@ abstract class PrototypedSoapClient
 		
 		final public static function convertSoapFault(SoapFault $e)
 		{
-			$r = new ReflectionObject($e);
+			$r = new \ReflectionObject($e);
 			
 			if (!$r->hasProperty('detail') || !($e->detail instanceof stdClass))
 				return $e;
 			
-			$r = new ReflectionObject($e->detail);
+			$r = new \ReflectionObject($e->detail);
 			
 			if (
 				$r->hasProperty('exception')
-				&& $e->detail->exception instanceof SoapVar
+				&& $e->detail->exception instanceof \SoapVar
 			) {
 				$exception = $e->detail->exception->enc_value;
 				
-				Assert::isInstance($exception, 'BaseException');
+				Assert::isInstance($exception, '\Onphp\BaseException');
 				
 				return $exception;
 			}
@@ -74,7 +76,7 @@ public function __construct()
 			
 			Assert::isNotNull($wsdlUrl);
 			
-			$this->soapClient = new SoapClient(
+			$this->soapClient = new \SoapClient(
 				$wsdlUrl,
 				array(
 					'soap_version'	=> SOAP_1_1,
@@ -106,7 +108,7 @@ protected function call($method, DTOMessage $request, $resultClass)
 		{
 			$requestDto = $request->makeDto();
 			
-			Assert::isInstance($requestDto, 'DTOClass');
+			Assert::isInstance($requestDto, '\Onphp\DTOClass');
 			
 			if (defined('__LOCAL_DEBUG__') && !defined('SIMPLE_TEST') ) {
 				// self-validation
@@ -130,7 +132,7 @@ protected function call($method, DTOMessage $request, $resultClass)
 					
 				} catch (BaseException $e) {
 					
-					if (get_class($e) == 'BaseException') {
+					if (get_class($e) == '\Onphp\BaseException') {
 						throw new SoapFault(
 							'Server',
 							get_class($e).': '.$e->getMessage()
@@ -155,7 +157,7 @@ protected function call($method, DTOMessage $request, $resultClass)
 				$result = null;
 				
 			} else {
-				Assert::isInstance($resultDto, 'DTOClass');
+				Assert::isInstance($resultDto, '\Onphp\DTOClass');
 				
 				Assert::isEqual(
 					$resultDto->entityProto()->className(),
@@ -173,7 +175,7 @@ protected function call($method, DTOMessage $request, $resultClass)
 				
 				$result = $resultDto->makeObject($form);
 				
-				Assert::isInstance($result, 'DTOMessage');
+				Assert::isInstance($result, '\Onphp\DTOMessage');
 				
 				Assert::isEqual(get_class($result), $resultClass);
 				
@@ -224,7 +226,7 @@ private function getXmlCdata($xml)
 		**/
 		
 		/**
-		 * @return SoapClient
+		 * @return \SoapClient
 		**/
 		public function getSoapClient()
 		{
diff --git a/main/Net/Url.class.php b/main/Net/Url.class.php
index 6cc44935b3..86e4ec12e9 100644
--- a/main/Net/Url.class.php
+++ b/main/Net/Url.class.php
@@ -15,22 +15,24 @@
 	 * 
 	 * @ingroup Net
 	**/
+	namespace Onphp;
+
 	class Url extends GenericUri
 	{
 		protected static $knownSubSchemes	= array(
-			'http'		=> 'HttpUrl',
-			'https'		=> 'HttpUrl',
-			'ftp'		=> 'Url',
-			'nntp'		=> 'Url',
-			'telnet'	=> 'Url',
-			'gopher'	=> 'Url',
-			'wais'		=> 'Url',
-			'file'		=> 'Url',
-			'prospero'	=> 'Url'
+			'http'		=> '\Onphp\HttpUrl',
+			'https'		=> '\Onphp\HttpUrl',
+			'ftp'		=> '\Onphp\Url',
+			'nntp'		=> '\Onphp\Url',
+			'telnet'	=> '\Onphp\Url',
+			'gopher'	=> '\Onphp\Url',
+			'wais'		=> '\Onphp\Url',
+			'file'		=> '\Onphp\Url',
+			'prospero'	=> '\Onphp\Url'
 		);
 		
 		/**
-		 * @return Url
+		 * @return \Onphp\Url
 		**/
 		public static function create()
 		{
diff --git a/main/Net/Urn.class.php b/main/Net/Urn.class.php
index a38bb3d19c..44670259dc 100644
--- a/main/Net/Urn.class.php
+++ b/main/Net/Urn.class.php
@@ -14,21 +14,23 @@
 	 * 
 	 * @ingroup Net
 	**/
+	namespace Onphp;
+
 	final class Urn extends GenericUri
 	{
 		protected $schemeSpecificPart	= null;
 		
 		protected static $knownSubSchemes	= array(
-			'urn'		=> 'Urn',
-			'mailto'	=> 'Urn',
-			'news'		=> 'Urn',
-			'isbn'		=> 'Urn',
-			'tel'		=> 'Urn',
-			'fax'		=> 'Urn',
+			'urn'		=> '\Onphp\Urn',
+			'mailto'	=> '\Onphp\Urn',
+			'news'		=> '\Onphp\Urn',
+			'isbn'		=> '\Onphp\Urn',
+			'tel'		=> '\Onphp\Urn',
+			'fax'		=> '\Onphp\Urn',
 		);
 		
 		/**
-		 * @return Urn
+		 * @ret\Onphp\Urn \Onphp\Urn
 		**/
 		public static function create()
 		{
diff --git a/main/OQL/Expressions/OqlInExpression.class.php b/main/OQL/Expressions/OqlInExpression.class.php
index 761aa11b9a..d81f30c0ad 100644
--- a/main/OQL/Expressions/OqlInExpression.class.php
+++ b/main/OQL/Expressions/OqlInExpression.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlInExpression extends OqlQueryExpression
 	{
 		private $logic = null;
@@ -28,7 +30,7 @@ public function __construct(
 		}
 		
 		/**
-		 * @return InExpression
+		 * @return \Onphp\InExpression
 		**/
 		public function evaluate($values)
 		{
diff --git a/main/OQL/Expressions/OqlOrderByExpression.class.php b/main/OQL/Expressions/OqlOrderByExpression.class.php
index b5c4c2a610..57e9dc2533 100644
--- a/main/OQL/Expressions/OqlOrderByExpression.class.php
+++ b/main/OQL/Expressions/OqlOrderByExpression.class.php
@@ -12,9 +12,11 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlOrderByExpression extends OqlQueryExpression
 	{
-		const CLASS_NAME = 'OrderBy';
+		const CLASS_NAME = '\Onphp\OrderBy';
 		
 		private $direction = null;
 		
@@ -28,7 +30,7 @@ public function __construct(OqlQueryParameter $parameter, $direction)
 		}
 		
 		/**
-		 * @return OrderBy
+		 * @return \Onphp\OrderBy
 		**/
 		public function evaluate($values)
 		{
diff --git a/main/OQL/Expressions/OqlPrefixMinusExpression.class.php b/main/OQL/Expressions/OqlPrefixMinusExpression.class.php
index 930c54620e..76edf917db 100644
--- a/main/OQL/Expressions/OqlPrefixMinusExpression.class.php
+++ b/main/OQL/Expressions/OqlPrefixMinusExpression.class.php
@@ -12,9 +12,11 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlPrefixMinusExpression extends OqlQueryExpression
 	{
-		const CLASS_NAME = 'PrefixUnaryExpression';
+		const CLASS_NAME = '\Onphp\PrefixUnaryExpression';
 		
 		public function __construct(OqlQueryParameter $subject)
 		{
diff --git a/main/OQL/Expressions/OqlQueryExpression.class.php b/main/OQL/Expressions/OqlQueryExpression.class.php
index 1678845c8c..561b89a8c4 100644
--- a/main/OQL/Expressions/OqlQueryExpression.class.php
+++ b/main/OQL/Expressions/OqlQueryExpression.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	class OqlQueryExpression extends OqlQueryParameter
 	{
 		private static $classes = array();
@@ -20,7 +22,7 @@ class OqlQueryExpression extends OqlQueryParameter
 		private $parameters	= array();
 		
 		/**
-		 * @return OqlQueryExpression
+		 * @return \Onphp\OqlQueryExpression
 		**/
 		public static function create()
 		{
@@ -33,7 +35,7 @@ public function getClassName()
 		}
 		
 		/**
-		 * @return OqlQueryExpression
+		 * @return \Onphp\OqlQueryExpression
 		**/
 		public function setClassName($className)
 		{
@@ -53,7 +55,7 @@ public function hasParameter($index)
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		public function getParameter($index)
 		{
@@ -61,7 +63,7 @@ public function getParameter($index)
 		}
 		
 		/**
-		 * @return OqlQueryExpression
+		 * @return \Onphp\OqlQueryExpression
 		**/
 		public function addParameter(OqlQueryParameter $parameter)
 		{
@@ -71,7 +73,7 @@ public function addParameter(OqlQueryParameter $parameter)
 		}
 		
 		/**
-		 * @return OqlQueryExpression
+		 * @return \Onphp\OqlQueryExpression
 		**/
 		public function setParameter($index, OqlQueryParameter $parameter)
 		{
@@ -85,7 +87,7 @@ public function evaluate($values)
 			$className = $this->getClassName();
 			
 			if (!isset(self::$classes[$className]))
-				self::$classes[$className] = new ReflectionClass($className);
+				self::$classes[$className] = new \ReflectionClass($className);
 			
 			$class = self::$classes[$className];
 			$parametersCount = count($class->getConstructor()->getParameters());
diff --git a/main/OQL/Expressions/OqlQueryParameter.class.php b/main/OQL/Expressions/OqlQueryParameter.class.php
index ace5f80d83..3e61eba2d1 100644
--- a/main/OQL/Expressions/OqlQueryParameter.class.php
+++ b/main/OQL/Expressions/OqlQueryParameter.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	class OqlQueryParameter
 	{
 		private $value		= null;
 		private $bindable	= false;
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		public static function create()
 		{
@@ -31,7 +33,7 @@ public function getValue()
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		public function setValue($value)
 		{
@@ -46,7 +48,7 @@ public function isBindable()
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		public function setBindable($orly = true)
 		{
diff --git a/main/OQL/OQL.class.php b/main/OQL/OQL.class.php
index 3acfacbac9..4adc73ead9 100644
--- a/main/OQL/OQL.class.php
+++ b/main/OQL/OQL.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OQL extends StaticFactory
 	{
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public static function select($query)
 		{
@@ -23,7 +25,7 @@ public static function select($query)
 		}
 		
 		/**
-		 * @return OqlSelectPropertiesClause
+		 * @return \Onphp\OqlSelectPropertiesClause
 		**/
 		public static function properties($clause)
 		{
@@ -31,7 +33,7 @@ public static function properties($clause)
 		}
 		
 		/**
-		 * @return OqlWhereClause
+		 * @return \Onphp\OqlWhereClause
 		**/
 		public static function where($clause)
 		{
@@ -39,7 +41,7 @@ public static function where($clause)
 		}
 		
 		/**
-		 * @return OqlProjectionClause
+		 * @return \Onphp\OqlProjectionClause
 		**/
 		public static function groupBy($clause)
 		{
@@ -47,7 +49,7 @@ public static function groupBy($clause)
 		}
 		
 		/**
-		 * @return OqlOrderByClause
+		 * @return \Onphp\OqlOrderByClause
 		**/
 		public static function orderBy($clause)
 		{
@@ -55,7 +57,7 @@ public static function orderBy($clause)
 		}
 		
 		/**
-		 * @return OqlHavingClause
+		 * @return \Onphp\OqlHavingClause
 		**/
 		public static function having($clause)
 		{
diff --git a/main/OQL/Parsers/OqlGroupByParser.class.php b/main/OQL/Parsers/OqlGroupByParser.class.php
index 75a06505f2..78030fffce 100644
--- a/main/OQL/Parsers/OqlGroupByParser.class.php
+++ b/main/OQL/Parsers/OqlGroupByParser.class.php
@@ -9,12 +9,14 @@
  *                                                                          *
  ****************************************************************************/
 
+	namespace Onphp;
+
 	final class OqlGroupByParser extends OqlParser
 	{
-		const CLASS_NAME = 'GroupByPropertyProjection';
+		const CLASS_NAME = '\Onphp\GroupByPropertyProjection';
 		
 		/**
-		 * @return OqlGroupByParser
+		 * @return \Onphp\OqlGroupByParser
 		**/
 		public static function create()
 		{
@@ -22,7 +24,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OqlProjectionClause
+		 * @return \Onphp\OqlProjectionClause
 		**/
 		protected function makeOqlObject()
 		{
diff --git a/main/OQL/Parsers/OqlHavingParser.class.php b/main/OQL/Parsers/OqlHavingParser.class.php
index 6c06d06dde..5bbb4b91e9 100644
--- a/main/OQL/Parsers/OqlHavingParser.class.php
+++ b/main/OQL/Parsers/OqlHavingParser.class.php
@@ -9,12 +9,14 @@
  *                                                                          *
  ****************************************************************************/
 
+	namespace Onphp;
+
 	final class OqlHavingParser extends OqlParser
 	{
-		const CLASS_NAME = 'HavingProjection';
+		const CLASS_NAME = '\Onphp\HavingProjection';
 		
 		/**
-		 * @return OqlHavingParser
+		 * @return \Onphp\OqlHavingParser
 		**/
 		public static function create()
 		{
@@ -22,7 +24,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OqlHavingClause
+		 * @return \Onphp\OqlHavingClause
 		**/
 		protected function makeOqlObject()
 		{
diff --git a/main/OQL/Parsers/OqlOrderByParser.class.php b/main/OQL/Parsers/OqlOrderByParser.class.php
index 26b8745ead..18f76fc89d 100644
--- a/main/OQL/Parsers/OqlOrderByParser.class.php
+++ b/main/OQL/Parsers/OqlOrderByParser.class.php
@@ -9,10 +9,12 @@
  *                                                                          *
  ****************************************************************************/
 
+	namespace Onphp;
+
 	final class OqlOrderByParser extends OqlParser
 	{
 		/**
-		 * @return OqlOrderByParser
+		 * @return \Onphp\OqlOrderByParser
 		**/
 		public static function create()
 		{
@@ -20,7 +22,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OqlOrderByClause
+		 * @return \Onphp\OqlOrderByClause
 		**/
 		protected function makeOqlObject()
 		{
@@ -43,7 +45,7 @@ protected function handleState()
 		}
 		
 		/**
-		 * @return OqlOrderByExpression
+		 * @return \Onphp\OqlOrderByExpression
 		**/
 		protected function getArgumentExpression()
 		{
diff --git a/main/OQL/Parsers/OqlParser.class.php b/main/OQL/Parsers/OqlParser.class.php
index 143f42e44c..f6677249ca 100644
--- a/main/OQL/Parsers/OqlParser.class.php
+++ b/main/OQL/Parsers/OqlParser.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	abstract class OqlParser
 	{
 		const INITIAL_STATE	= 254;
@@ -24,10 +26,10 @@ abstract class OqlParser
 		const BETWEEN_EXPRESSION		= 4;
 		
 		private static $classMap = array(
-			self::PREFIX_UNARY_EXPRESSION	=> 'PrefixUnaryExpression',
-			self::POSTFIX_UNARY_EXPRESSION	=> 'PostfixUnaryExpression',
-			self::BINARY_EXPRESSION			=> 'BinaryExpression',
-			self::BETWEEN_EXPRESSION		=> 'LogicalBetween'
+			self::PREFIX_UNARY_EXPRESSION	=> '\Onphp\PrefixUnaryExpression',
+			self::POSTFIX_UNARY_EXPRESSION	=> '\Onphp\PostfixUnaryExpression',
+			self::BINARY_EXPRESSION			=> '\Onphp\BinaryExpression',
+			self::BETWEEN_EXPRESSION		=> '\Onphp\LogicalBetween'
 		);
 		
 		// binary operator map
@@ -90,14 +92,14 @@ abstract class OqlParser
 		protected $parentheses	= null;
 		
 		/**
-		 * @return OqlQueryClause
+		 * @return \Onphp\OqlQueryClause
 		**/
 		abstract protected function makeOqlObject();
 		
 		abstract protected function handleState();
 		
 		/**
-		 * @return OqlQueryClause
+		 * @return \Onphp\OqlQueryClause
 		**/
 		public function parse($string = null)
 		{
@@ -122,7 +124,7 @@ public function parse($string = null)
 		}
 		
 		/**
-		 * @return OqlTokenizer
+		 * @return \Onphp\OqlTokenizer
 		**/
 		public function getTokenizer()
 		{
@@ -130,7 +132,7 @@ public function getTokenizer()
 		}
 		
 		/**
-		 * @return OqlParser
+		 * @return \Onphp\OqlParser
 		**/
 		public function setTokenizer(OqlTokenizer $tokenizer)
 		{
@@ -214,7 +216,7 @@ protected function checkUnaryMinus($token)
 		}
 		
 		/**
-		 * @throws SyntaxErrorException
+		 * @throws \Onphp\SyntaxErrorException
 		**/
 		protected function checkParentheses($message = null)
 		{
@@ -232,7 +234,7 @@ protected function checkParentheses($message = null)
 		}
 		
 		/**
-		 * @throws SyntaxErrorException
+		 * @throws \Onphp\SyntaxErrorException
 		**/
 		protected function openParentheses($required, $message = null)
 		{
@@ -252,7 +254,7 @@ protected function openParentheses($required, $message = null)
 		}
 		
 		/**
-		 * @throws SyntaxErrorException
+		 * @throws \Onphp\SyntaxErrorException
 		**/
 		protected function closeParentheses($required, $message = null)
 		{
@@ -274,7 +276,7 @@ protected function closeParentheses($required, $message = null)
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		protected function getIdentifierExpression()
 		{
@@ -293,7 +295,7 @@ protected function getIdentifierExpression()
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		protected function getConstantExpression()
 		{
@@ -327,7 +329,7 @@ protected function getConstantExpression()
 		}
 		
 		/**
-		 * @return OqlQueryExpression
+		 * @return \Onphp\OqlQueryExpression
 		**/
 		protected function getLogicExpression(
 			$priority = self::LOGIC_PRIORITY_LOWEST
@@ -585,7 +587,7 @@ protected function getLogicExpression(
 		}
 		
 		/**
-		 * @return OqlQueryExpression
+		 * @return \Onphp\OqlQueryExpression
 		**/
 		protected function getArithmeticExpression(
 			$priority = self::ARITHMETIC_PRIORITY_LOWEST
@@ -683,7 +685,7 @@ protected function getCommaSeparatedList($callback, $message)
 		}
 		
 		/**
-		 * @return OqlQueryExpression
+		 * @return \Onphp\OqlQueryExpression
 		**/
 		protected function makeQueryExpression($className /*, ... */)
 		{
@@ -706,7 +708,7 @@ protected function makeQueryExpression($className /*, ... */)
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		protected function makeQuerySignedExpression($argument, $isUnaryMinus)
 		{
@@ -718,7 +720,7 @@ protected function makeQuerySignedExpression($argument, $isUnaryMinus)
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		protected function makeQueryParameter($argument)
 		{
@@ -737,7 +739,7 @@ protected function makeQueryParameter($argument)
 		}
 		
 		/**
-		 * @throws SyntaxErrorException
+		 * @throws \Onphp\SyntaxErrorException
 		**/
 		protected function error($message, $extraMessage = null)
 		{
@@ -776,7 +778,7 @@ private function isArithmeticExpression()
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		private function getArithmeticArgumentExpression()
 		{
diff --git a/main/OQL/Parsers/OqlSelectParser.class.php b/main/OQL/Parsers/OqlSelectParser.class.php
index 8fdd35770b..08f2ad6ad9 100644
--- a/main/OQL/Parsers/OqlSelectParser.class.php
+++ b/main/OQL/Parsers/OqlSelectParser.class.php
@@ -29,6 +29,8 @@
 	 * 
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlSelectParser extends OqlParser
 	{
 		// states
@@ -42,7 +44,7 @@ final class OqlSelectParser extends OqlParser
 		const OFFSET_STATE		= 8;
 		
 		/**
-		 * @return OqlSelectParser
+		 * @return \Onphp\OqlSelectParser
 		**/
 		public static function create()
 		{
@@ -50,7 +52,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		protected function makeOqlObject()
 		{
@@ -116,7 +118,7 @@ private function fromState()
 				$this->tokenizer->next();
 				
 				$class = $this->tokenizer->next();
-				$className = $this->getTokenValue($class, true);
+				$className = ClassUtils::normalClassName($this->getTokenValue($class, true));
 				
 				if (
 					!$this->checkIdentifier($class)
@@ -128,8 +130,9 @@ private function fromState()
 				if (!class_exists($className, true))
 					$this->error('class does not exists:', $className);
 				
-				if (!ClassUtils::isInstanceOf($className, 'DAOConnected'))
+				if (!ClassUtils::isInstanceOf($className, '\Onphp\DAOConnected')) {
 					$this->error('class must implement DAOConnected interface:', $className);
+				}
 				
 				$this->oqlObject->setDao(
 					call_user_func(array($className, 'dao'))
diff --git a/main/OQL/Parsers/OqlSelectPropertiesParser.class.php b/main/OQL/Parsers/OqlSelectPropertiesParser.class.php
index 452234992e..8dfb036170 100644
--- a/main/OQL/Parsers/OqlSelectPropertiesParser.class.php
+++ b/main/OQL/Parsers/OqlSelectPropertiesParser.class.php
@@ -9,6 +9,8 @@
  *                                                                          *
  ****************************************************************************/
 
+	namespace Onphp;
+
 	final class OqlSelectPropertiesParser extends OqlParser
 	{
 		// class map
@@ -21,17 +23,17 @@ final class OqlSelectPropertiesParser extends OqlParser
 		const PROPERTY_PROJECTION		= 2;
 		
 		private static $classMap = array(
-			self::SUM_PROJECTION			=> 'SumProjection',
-			self::AVG_PROJECTION			=> 'AverageNumberProjection',
-			self::MIN_PROJECTION			=> 'MinimalNumberProjection',
-			self::MAX_PROJECTION			=> 'MaximalNumberProjection',
-			self::COUNT_PROJECTION			=> 'RowCountProjection',
-			self::DISTINCT_COUNT_PROJECTION	=> 'DistinctCountProjection',
-			self::PROPERTY_PROJECTION		=> 'PropertyProjection'
+			self::SUM_PROJECTION			=> '\Onphp\SumProjection',
+			self::AVG_PROJECTION			=> '\Onphp\AverageNumberProjection',
+			self::MIN_PROJECTION			=> '\Onphp\MinimalNumberProjection',
+			self::MAX_PROJECTION			=> '\Onphp\MaximalNumberProjection',
+			self::COUNT_PROJECTION			=> '\Onphp\RowCountProjection',
+			self::DISTINCT_COUNT_PROJECTION	=> '\Onphp\DistinctCountProjection',
+			self::PROPERTY_PROJECTION		=> '\Onphp\PropertyProjection'
 		);
 		
 		/**
-		 * @return OqlSelectPropertiesParser
+		 * @return \Onphp\OqlSelectPropertiesParser
 		**/
 		public static function create()
 		{
@@ -39,7 +41,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OqlSelectPropertiesClause
+		 * @return \Onphp\OqlSelectPropertiesClause
 		**/
 		protected function makeOqlObject()
 		{
@@ -62,7 +64,7 @@ protected function handleState()
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		protected function getArgumentExpression()
 		{
@@ -112,7 +114,7 @@ protected function getArgumentExpression()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		private function getAlias()
 		{
diff --git a/main/OQL/Parsers/OqlToken.class.php b/main/OQL/Parsers/OqlToken.class.php
index f47ebe2447..018c066d72 100644
--- a/main/OQL/Parsers/OqlToken.class.php
+++ b/main/OQL/Parsers/OqlToken.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlToken
 	{
 		const NEW_LINE				= 1;
@@ -35,7 +37,7 @@ final class OqlToken
 		private $position	= null;
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public static function create()
 		{
@@ -43,7 +45,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public static function make($value, $rawValue, $type, $line, $position)
 		{
@@ -57,7 +59,7 @@ public static function make($value, $rawValue, $type, $line, $position)
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function setValue($value)
 		{
@@ -72,7 +74,7 @@ public function getValue()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function setRawValue($rawValue)
 		{
@@ -87,7 +89,7 @@ public function getRawValue()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function setType($type)
 		{
@@ -102,7 +104,7 @@ public function getType()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function setLine($line)
 		{
@@ -117,7 +119,7 @@ public function getLine()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function setPosition($position)
 		{
diff --git a/main/OQL/Parsers/OqlTokenizer.class.php b/main/OQL/Parsers/OqlTokenizer.class.php
index 23318a92dd..1053668f71 100644
--- a/main/OQL/Parsers/OqlTokenizer.class.php
+++ b/main/OQL/Parsers/OqlTokenizer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlTokenizer
 	{
 		private $tokens			= array();
@@ -53,7 +55,7 @@ final class OqlTokenizer
 			
 			// property, class name
 			OqlToken::IDENTIFIER =>
-				'\b[a-zA-Z_][a-zA-Z\d_]*(?:\.[a-zA-Z_][a-zA-Z\d_]+)*\b',
+				'\b[\\\\a-zA-Z_][\\\\a-zA-Z\d_]*(?:\.[\\\\a-zA-Z_][\\\\a-zA-Z\d_]+)*\b',
 			
 			// parentheses
 			OqlToken::PARENTHESES =>
@@ -106,7 +108,7 @@ public function getIndex()
 		}
 		
 		/**
-		 * @return OqlTokenizer
+		 * @return \Onphp\OqlTokenizer
 		**/
 		public function setIndex($index)
 		{
@@ -125,7 +127,7 @@ public function setIndex($index)
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function get()
 		{
@@ -133,7 +135,7 @@ public function get()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function next()
 		{
@@ -143,7 +145,7 @@ public function next()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function back()
 		{
@@ -153,7 +155,7 @@ public function back()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		public function peek()
 		{
@@ -164,7 +166,7 @@ public function peek()
 		}
 		
 		/**
-		 * @return OqlToken
+		 * @return \Onphp\OqlToken
 		**/
 		private function getByIndex($index)
 		{
@@ -172,7 +174,7 @@ private function getByIndex($index)
 		}
 		
 		/**
-		 * @return OqlTokenizer
+		 * @return \Onphp\OqlTokenizer
 		**/
 		private function tokenize($string)
 		{
diff --git a/main/OQL/Parsers/OqlWhereParser.class.php b/main/OQL/Parsers/OqlWhereParser.class.php
index cefc58b087..b2285dc369 100644
--- a/main/OQL/Parsers/OqlWhereParser.class.php
+++ b/main/OQL/Parsers/OqlWhereParser.class.php
@@ -9,10 +9,12 @@
  *                                                                          *
  ****************************************************************************/
 
+	namespace Onphp;
+
 	final class OqlWhereParser extends OqlParser
 	{
 		/**
-		 * @return OqlWhereParser
+		 * @return \Onphp\OqlWhereParser
 		**/
 		public static function create()
 		{
@@ -20,7 +22,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OqlWhereClause
+		 * @return \Onphp\OqlWhereClause
 		**/
 		protected function makeOqlObject()
 		{
diff --git a/main/OQL/Statements/OqlHavingClause.class.php b/main/OQL/Statements/OqlHavingClause.class.php
index 8cd46707ac..dda51cb224 100644
--- a/main/OQL/Statements/OqlHavingClause.class.php
+++ b/main/OQL/Statements/OqlHavingClause.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlHavingClause extends OqlQueryExpressionClause
 	{
 		/**
-		 * @return OqlHavingClause
+		 * @return \Onphp\OqlHavingClause
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return HavingProjection
+		 * @return \Onphp\HavingProjection
 		**/
 		public function toProjection()
 		{
@@ -32,7 +34,7 @@ public function toProjection()
 		
 		protected static function checkExpression(OqlQueryExpression $expression)
 		{
-			Assert::isInstance($expression->getClassName(), 'HavingProjection');
+			Assert::isInstance($expression->getClassName(), '\Onphp\HavingProjection');
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/main/OQL/Statements/OqlOrderByClause.class.php b/main/OQL/Statements/OqlOrderByClause.class.php
index 1664d629e4..dd5fc00157 100644
--- a/main/OQL/Statements/OqlOrderByClause.class.php
+++ b/main/OQL/Statements/OqlOrderByClause.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlOrderByClause extends OqlQueryListedClause
 	{
 		/**
-		 * @return OqlOrderByClause
+		 * @return \Onphp\OqlOrderByClause
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OrderChain
+		 * @return \Onphp\OrderChain
 		**/
 		public function toOrder()
 		{
diff --git a/main/OQL/Statements/OqlProjectionClause.class.php b/main/OQL/Statements/OqlProjectionClause.class.php
index 010464bdc1..47d94e8ea6 100644
--- a/main/OQL/Statements/OqlProjectionClause.class.php
+++ b/main/OQL/Statements/OqlProjectionClause.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	class OqlProjectionClause extends OqlQueryListedClause
 	{
 		/**
-		 * @return OqlProjectionClause
+		 * @return \Onphp\OqlProjectionClause
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return ProjectionChain
+		 * @return \Onphp\ProjectionChain
 		**/
 		public function toProjection()
 		{
diff --git a/main/OQL/Statements/OqlQuery.class.php b/main/OQL/Statements/OqlQuery.class.php
index e4f4726ffe..30dc049496 100644
--- a/main/OQL/Statements/OqlQuery.class.php
+++ b/main/OQL/Statements/OqlQuery.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	abstract class OqlQuery extends OqlQueryClause
 	{
 		protected $dao = null;
 		
 		/**
-		 * @return ProtoDAO
+		 * @return \Onphp\ProtoDAO
 		**/
 		public function getDao()
 		{
@@ -25,7 +27,7 @@ public function getDao()
 		}
 		
 		/**
-		 * @return OqlQuery
+		 * @return \Onphp\OqlQuery
 		**/
 		public function setDao(ProtoDAO $dao)
 		{
diff --git a/main/OQL/Statements/OqlQueryClause.class.php b/main/OQL/Statements/OqlQueryClause.class.php
index 08ab0cb091..a121242e7a 100644
--- a/main/OQL/Statements/OqlQueryClause.class.php
+++ b/main/OQL/Statements/OqlQueryClause.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	abstract class OqlQueryClause
 	{
 		protected $parameters = array();
 		
 		/**
-		 * @return OqlQueryClause
+		 * @return \Onphp\OqlQueryClause
 		**/
 		public function bind($index, $value)
 		{
@@ -27,7 +29,7 @@ public function bind($index, $value)
 		}
 		
 		/**
-		 * @return OqlQueryClause
+		 * @return \Onphp\OqlQueryClause
 		**/
 		public function bindNext($value)
 		{
@@ -37,7 +39,7 @@ public function bindNext($value)
 		}
 		
 		/**
-		 * @return OqlQueryClause
+		 * @return \Onphp\OqlQueryClause
 		**/
 		public function bindAll(array $parameters)
 		{
diff --git a/main/OQL/Statements/OqlQueryExpressionClause.class.php b/main/OQL/Statements/OqlQueryExpressionClause.class.php
index 65084d4bbc..0e8b239469 100644
--- a/main/OQL/Statements/OqlQueryExpressionClause.class.php
+++ b/main/OQL/Statements/OqlQueryExpressionClause.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	abstract class OqlQueryExpressionClause extends OqlQueryClause
 	{
 		protected $expression = null;
 		
 		/**
-		 * @return OqlQueryExpression
+		 * @return \Onphp\OqlQueryExpression
 		**/
 		public function getExpression()
 		{
@@ -25,7 +27,7 @@ public function getExpression()
 		}
 		
 		/**
-		 * @return OqlQueryExpressionClause
+		 * @return \Onphp\OqlQueryExpressionClause
 		**/
 		public function setExpression(OqlQueryExpression $expression)
 		{
diff --git a/main/OQL/Statements/OqlQueryListedClause.class.php b/main/OQL/Statements/OqlQueryListedClause.class.php
index 0c68a17924..424281e75f 100644
--- a/main/OQL/Statements/OqlQueryListedClause.class.php
+++ b/main/OQL/Statements/OqlQueryListedClause.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	abstract class OqlQueryListedClause extends OqlQueryClause
 	{
 		protected $list = array();
 		
 		/**
-		 * @return OqlQueryListedClause
+		 * @return \Onphp\OqlQueryListedClause
 		**/
 		public function add(OqlQueryParameter $property)
 		{
@@ -32,7 +34,7 @@ public function getList()
 		}
 		
 		/**
-		 * @return OqlQueryListedClause
+		 * @return \Onphp\OqlQueryListedClause
 		**/
 		public function setList(array $list)
 		{
@@ -42,7 +44,7 @@ public function setList(array $list)
 		}
 		
 		/**
-		 * @return OqlQueryListedClause
+		 * @return \Onphp\OqlQueryListedClause
 		**/
 		public function dropList()
 		{
diff --git a/main/OQL/Statements/OqlSelectPropertiesClause.class.php b/main/OQL/Statements/OqlSelectPropertiesClause.class.php
index 48b79e524c..8f11c702c0 100644
--- a/main/OQL/Statements/OqlSelectPropertiesClause.class.php
+++ b/main/OQL/Statements/OqlSelectPropertiesClause.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlSelectPropertiesClause extends OqlProjectionClause
 	{
 		private $distinct = false;
 		
 		/**
-		 * @return OqlSelectPropertiesClause
+		 * @return \Onphp\OqlSelectPropertiesClause
 		**/
 		public static function create()
 		{
@@ -30,7 +32,7 @@ public function isDistinct()
 		}
 		
 		/**
-		 * @return OqlSelectPropertiesClause
+		 * @return \Onphp\OqlSelectPropertiesClause
 		**/
 		public function setDistinct($orly = true)
 		{
diff --git a/main/OQL/Statements/OqlSelectQuery.class.php b/main/OQL/Statements/OqlSelectQuery.class.php
index 906a91422e..f4b984c69d 100644
--- a/main/OQL/Statements/OqlSelectQuery.class.php
+++ b/main/OQL/Statements/OqlSelectQuery.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlSelectQuery extends OqlQuery
 	{
 		private $distinct		= false;
@@ -25,7 +27,7 @@ final class OqlSelectQuery extends OqlQuery
 		private $offset			= null;
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public static function create()
 		{
@@ -38,7 +40,7 @@ public function isDistinct()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function setDistinct($orly = true)
 		{
@@ -53,7 +55,7 @@ public function getProperties()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function addProperties(OqlSelectPropertiesClause $clause)
 		{
@@ -63,7 +65,7 @@ public function addProperties(OqlSelectPropertiesClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function setProperties(OqlSelectPropertiesClause $clause)
 		{
@@ -74,7 +76,7 @@ public function setProperties(OqlSelectPropertiesClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function dropProperties()
 		{
@@ -94,7 +96,7 @@ public function getWhereLogic()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function where(OqlWhereClause $clause, $logic = null)
 		{
@@ -115,7 +117,7 @@ public function where(OqlWhereClause $clause, $logic = null)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function andWhere(OqlWhereClause $clause)
 		{
@@ -125,7 +127,7 @@ public function andWhere(OqlWhereClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function orWhere(OqlWhereClause $clause)
 		{
@@ -135,7 +137,7 @@ public function orWhere(OqlWhereClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function setWhere(OqlWhereClause $clause)
 		{
@@ -147,7 +149,7 @@ public function setWhere(OqlWhereClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function dropWhere()
 		{
@@ -163,7 +165,7 @@ public function getGroupBy()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function addGroupBy(OqlProjectionClause $clause)
 		{
@@ -173,7 +175,7 @@ public function addGroupBy(OqlProjectionClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function setGroupBy(OqlProjectionClause $clause)
 		{
@@ -184,7 +186,7 @@ public function setGroupBy(OqlProjectionClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function dropGroupBy()
 		{
@@ -199,7 +201,7 @@ public function getOrderBy()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function addOrderBy(OqlOrderByClause $clause)
 		{
@@ -209,7 +211,7 @@ public function addOrderBy(OqlOrderByClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function setOrderBy(OqlOrderByClause $clause)
 		{
@@ -220,7 +222,7 @@ public function setOrderBy(OqlOrderByClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function dropOrderBy()
 		{
@@ -235,7 +237,7 @@ public function getHaving()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function addHaving(OqlHavingClause $clause)
 		{
@@ -245,7 +247,7 @@ public function addHaving(OqlHavingClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function setHaving(OqlHavingClause $clause)
 		{
@@ -256,7 +258,7 @@ public function setHaving(OqlHavingClause $clause)
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function dropHaving()
 		{
@@ -265,7 +267,7 @@ public function dropHaving()
 			return $this;
 		}
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		public function getLimit()
 		{
@@ -273,7 +275,7 @@ public function getLimit()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function setLimit(OqlQueryParameter $limit)
 		{
@@ -283,7 +285,7 @@ public function setLimit(OqlQueryParameter $limit)
 		}
 		
 		/**
-		 * @return OqlQueryParameter
+		 * @return \Onphp\OqlQueryParameter
 		**/
 		public function getOffset()
 		{
@@ -291,7 +293,7 @@ public function getOffset()
 		}
 		
 		/**
-		 * @return OqlSelectQuery
+		 * @return \Onphp\OqlSelectQuery
 		**/
 		public function setOffset(OqlQueryParameter $offset)
 		{
@@ -301,7 +303,7 @@ public function setOffset(OqlQueryParameter $offset)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function toCriteria()
 		{
diff --git a/main/OQL/Statements/OqlWhereClause.class.php b/main/OQL/Statements/OqlWhereClause.class.php
index 7105980a3e..3415f4564e 100644
--- a/main/OQL/Statements/OqlWhereClause.class.php
+++ b/main/OQL/Statements/OqlWhereClause.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup OQL
 	**/
+	namespace Onphp;
+
 	final class OqlWhereClause extends OqlQueryExpressionClause
 	{
 		/**
-		 * @return OqlWhereClause
+		 * @return \Onphp\OqlWhereClause
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		protected static function checkExpression(OqlQueryExpression $expression)
 		{
 			if (!$expression instanceof OqlInExpression)
-				Assert::isInstance($expression->getClassName(), 'LogicalObject');
+				Assert::isInstance($expression->getClassName(), '\Onphp\LogicalObject');
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/main/OpenId/OpenIdConsumer.class.php b/main/OpenId/OpenIdConsumer.class.php
index a918bd4d3f..e3314e32bc 100644
--- a/main/OpenId/OpenIdConsumer.class.php
+++ b/main/OpenId/OpenIdConsumer.class.php
@@ -17,6 +17,8 @@
 	 *
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	final class OpenIdConsumer
 	{
 		const DIFFIE_HELLMAN_P = '155172898181473697471232257763715539915724801966915404479707795314057629378541917580651227423698188993727816152646631438561595825688188889951272158842675419950341258706556549803580104870537681476726513255747040765857479291291572334510643245094715007229621094194349783925984760375594985848253359305585439638443';
@@ -30,7 +32,7 @@ final class OpenIdConsumer
 		private $numberFactory	= null;
 		
 		/**
-		 * @var HttpClient
+		 * @var \Onphp\HttpClient
 		**/
 		private $httpClient		= null;
 		
@@ -46,7 +48,7 @@ public function __construct(
 		}
 		
 		/**
-		 * @return OpenIdConsumer
+		 * @return \Onphp\OpenIdConsumer
 		**/
 		public static function create(
 			RandomSource $randomSource,
@@ -62,7 +64,7 @@ public static function create(
 		 *
 		 * @param $server to make association with (usually obtained from OpenIdCredentials)
 		 * @param $manager - dao-like association manager
-		 * @return OpenIdConsumerAssociation
+		 * @return \Onphp\OpenIdConsumerAssociation
 		**/
 		public function associate(
 			HttpUrl $server,
@@ -239,7 +241,7 @@ private function makeCheckIdRequest(
 		 * @param $returnTo - URL where the provider should return the User-Agent back to
 		 * @param $trustRoot - URL the Provider shall ask the End User to trust
 		 * @param $association - result of associate call in smart mode
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function checkIdImmediate(
 			OpenIdCredentials $credentials,
@@ -268,7 +270,7 @@ public function checkIdImmediate(
 		 * @param $returnTo - URL where the provider should return the User-Agent back to
 		 * @param $trustRoot - URL the Provider shall ask the End User to trust
 		 * @param $association - result of associate call in smart mode
-		 * @return ModelAndView
+		 * @return \Onphp\ModelAndView
 		**/
 		public function checkIdSetup(
 			OpenIdCredentials $credentials,
@@ -393,8 +395,8 @@ public function doContinue(HttpRequest $request, $manager = null)
 		}
 		
 		/**
-		 * @param OpenIdExtension $extension
-		 * @return OpenIdConsumer
+		 * @param \Onphp\OpenIdExtension $extension
+		 * @return \Onphp\OpenIdConsumer
 		**/
 		public function addExtension(OpenIdExtension $extension)
 		{
diff --git a/main/OpenId/OpenIdConsumerAssociation.class.php b/main/OpenId/OpenIdConsumerAssociation.class.php
index 5a8a5c2079..bd08930df1 100644
--- a/main/OpenId/OpenIdConsumerAssociation.class.php
+++ b/main/OpenId/OpenIdConsumerAssociation.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	interface OpenIdConsumerAssociation
 	{
 		public function getHandle();
@@ -21,12 +23,12 @@ public function getType();
 		public function getSecret();
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public function getExpires();
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public function getServer();
 	}
diff --git a/main/OpenId/OpenIdConsumerAssociationManager.class.php b/main/OpenId/OpenIdConsumerAssociationManager.class.php
index 5b8521860c..b1580a2897 100644
--- a/main/OpenId/OpenIdConsumerAssociationManager.class.php
+++ b/main/OpenId/OpenIdConsumerAssociationManager.class.php
@@ -12,20 +12,22 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	interface OpenIdConsumerAssociationManager
 	{
 		/**
-		 * @return OpenIdConsumerAssociation
+		 * @return \Onphp\OpenIdConsumerAssociation
 		**/
 		public function findByHandle($handle, $type);
 		
 		/**
-		 * @return OpenIdConsumerAssociation
+		 * @return \Onphp\OpenIdConsumerAssociation
 		**/
 		public function findByServer(HttpUrl $server);
 		
 		/**
-		 * @return OpenIdConsumerAssociation
+		 * @return \Onphp\OpenIdConsumerAssociation
 		**/
 		public function makeAndSave(
 			$handle,
@@ -36,12 +38,12 @@ public function makeAndSave(
 		);
 		
 		/**
-		 * @return OpenIdConsumerAssociationManager
+		 * @return \Onphp\OpenIdConsumerAssociationManager
 		**/
 		public function purgeExpired();
 		
 		/**
-		 * @return OpenIdConsumerAssociationManager
+		 * @return \Onphp\OpenIdConsumerAssociationManager
 		**/
 		public function purgeByHandle($handle);
 	}
diff --git a/main/OpenId/OpenIdConsumerCancel.class.php b/main/OpenId/OpenIdConsumerCancel.class.php
index b91b809118..b9e3391875 100644
--- a/main/OpenId/OpenIdConsumerCancel.class.php
+++ b/main/OpenId/OpenIdConsumerCancel.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	final class OpenIdConsumerCancel implements OpenIdConsumerResult
 	{
 		public function isOk()
diff --git a/main/OpenId/OpenIdConsumerFail.class.php b/main/OpenId/OpenIdConsumerFail.class.php
index d597f2d928..4e0eaf816e 100644
--- a/main/OpenId/OpenIdConsumerFail.class.php
+++ b/main/OpenId/OpenIdConsumerFail.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	final class OpenIdConsumerFail implements OpenIdConsumerResult
 	{
 		public function isOk()
diff --git a/main/OpenId/OpenIdConsumerPositive.class.php b/main/OpenId/OpenIdConsumerPositive.class.php
index 6da90fc56e..70e8cfc2bd 100644
--- a/main/OpenId/OpenIdConsumerPositive.class.php
+++ b/main/OpenId/OpenIdConsumerPositive.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	final class OpenIdConsumerPositive implements OpenIdConsumerResult
 	{
 		private $identity = null;
@@ -22,7 +24,7 @@ public function __construct(HttpUrl $identity)
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public function getIdentity()
 		{
diff --git a/main/OpenId/OpenIdConsumerResult.class.php b/main/OpenId/OpenIdConsumerResult.class.php
index a04a64d6c7..269d9a1511 100644
--- a/main/OpenId/OpenIdConsumerResult.class.php
+++ b/main/OpenId/OpenIdConsumerResult.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	interface OpenIdConsumerResult
 	{
 		/**
diff --git a/main/OpenId/OpenIdConsumerSetupRequired.class.php b/main/OpenId/OpenIdConsumerSetupRequired.class.php
index 5db5c7bee3..1834d85034 100644
--- a/main/OpenId/OpenIdConsumerSetupRequired.class.php
+++ b/main/OpenId/OpenIdConsumerSetupRequired.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	final class OpenIdConsumerSetupRequired implements OpenIdConsumerResult
 	{
 		private $url = null;
@@ -22,7 +24,7 @@ public function __construct(HttpUrl $url)
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public function getUrl()
 		{
diff --git a/main/OpenId/OpenIdCredentials.class.php b/main/OpenId/OpenIdCredentials.class.php
index cbb58c3d01..f8542cd3b9 100644
--- a/main/OpenId/OpenIdCredentials.class.php
+++ b/main/OpenId/OpenIdCredentials.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	final class OpenIdCredentials
 	{
 		const HEADER_CONT_TYPE = 'application/xrds+xml';
@@ -71,7 +73,7 @@ public function __construct(
 		}
 		
 		/**
-		 * @return OpenIdCredentials
+		 * @return \Onphp\OpenIdCredentials
 		**/
 		public static function create(
 			HttpUrl $claimedId,
@@ -82,7 +84,7 @@ public static function create(
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public function getRealId()
 		{
@@ -94,7 +96,7 @@ public function getRealId()
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public function getServer()
 		{
@@ -107,7 +109,7 @@ public function isIdentifierSelect()
 		}
 		
 		/**
-		 * @return OpenIdCredentials
+		 * @return \Onphp\OpenIdCredentials
 		**/
 		public function setIdentifierSelect($bool)
 		{
diff --git a/main/OpenId/OpenIdException.class.php b/main/OpenId/OpenIdException.class.php
index 39f9fb1804..6164d688dc 100644
--- a/main/OpenId/OpenIdException.class.php
+++ b/main/OpenId/OpenIdException.class.php
@@ -12,5 +12,7 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	class OpenIdException extends BaseException {}
 ?>
\ No newline at end of file
diff --git a/main/OpenId/OpenIdExtension.class.php b/main/OpenId/OpenIdExtension.class.php
index 8e1e18f156..0edf4bdf1e 100644
--- a/main/OpenId/OpenIdExtension.class.php
+++ b/main/OpenId/OpenIdExtension.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup OpenId
 	**/
+	namespace Onphp;
+
 	interface OpenIdExtension
 	{
 		public function addParamsToModel(Model $model);
diff --git a/main/OpenId/OpenIdExtensionAttributeExchange.class.php b/main/OpenId/OpenIdExtensionAttributeExchange.class.php
index 3ca8137924..4713367fcc 100644
--- a/main/OpenId/OpenIdExtensionAttributeExchange.class.php
+++ b/main/OpenId/OpenIdExtensionAttributeExchange.class.php
@@ -15,6 +15,8 @@
 	 * @see http://openid.net/specs/openid-attribute-exchange-1_0.html
 	 * @see http://code.google.com/intl/ru/apis/accounts/docs/OpenID.html
 	**/
+	namespace Onphp;
+
 	final class OpenIdExtensionAttributeExchange implements OpenIdExtension
 	{
 		const NAMESPACE_1_0		= 'http://openid.net/srv/ax/1.0';
@@ -32,7 +34,7 @@ final class OpenIdExtensionAttributeExchange implements OpenIdExtension
 		private $language		= null;
 		
 		/**
-		 * @return OpenIdExtensionAttributeExchange
+		 * @return \Onphp\OpenIdExtensionAttributeExchange
 		**/
 		public static function create()
 		{
@@ -40,7 +42,7 @@ public static function create()
 		}
 		
 		/**
-		 * @param Model $model
+		 * @param \Onphp\Model $\Onphp\Model
 		**/
 		public function addParamsToModel(Model $model)
 		{
@@ -71,7 +73,7 @@ public function addParamsToModel(Model $model)
 		}
 		
 		/**
-		 * @param HttpRequest $request
+		 * @param \Onphp\HttpRequest $request
 		 * @param array $params
 		**/
 		public function parseResponce(HttpRequest $request, array $params)
@@ -89,7 +91,7 @@ public function parseResponce(HttpRequest $request, array $params)
 		}
 		
 		/**
-		 * @return OpenIdExtensionAttributeExchange
+		 * @return \Onphp\OpenIdExtensionAttributeExchange
 		**/
 		public function addParam($paramName)
 		{
@@ -99,7 +101,7 @@ public function addParam($paramName)
 		}
 		
 		/**
-		 * @return OpenIdExtensionAttributeExchange
+		 * @return \Onphp\OpenIdExtensionAttributeExchange
 		**/
 		public function dropParams()
 		{
diff --git a/main/OpenId/OpenIdExtensionSreg.class.php b/main/OpenId/OpenIdExtensionSreg.class.php
index 66de6d93a5..27008b4370 100644
--- a/main/OpenId/OpenIdExtensionSreg.class.php
+++ b/main/OpenId/OpenIdExtensionSreg.class.php
@@ -15,6 +15,8 @@
 	 * @see http://openid.net/specs/openid-simple-registration-extension-1_0.html
 	 *
 	**/
+	namespace Onphp;
+
 	final class OpenIdExtensionSreg implements OpenIdExtension
 	{
 		const NAMESPACE_1_1 = "http://openid.net/extensions/sreg/1.1";
@@ -42,7 +44,7 @@ final class OpenIdExtensionSreg implements OpenIdExtension
 		private $timezone		= null;
 		
 		/**
-		 * @return OpenIdExtensionSreg
+		 * @return \Onphp\OpenIdExtensionSreg
 		**/
 		public static function create()
 		{
@@ -50,7 +52,7 @@ public static function create()
 		}
 		
 		/**
-		 * @param Model $model
+		 * @param \Onphp\Model $\Onphp\Model
 		**/
 		public function addParamsToModel(Model $model)
 		{
@@ -63,7 +65,7 @@ public function addParamsToModel(Model $model)
 		}
 		
 		/**
-		 * @param HttpRequest $request
+		 * @param \Onphp\HttpRequest $request
 		 * @param array $params
 		**/
 		public function parseResponce(HttpRequest $request, array $params)
@@ -83,7 +85,7 @@ public function getVersion()
 		
 		/**
 		 * @param string $paramName
-		 * @return OpenIdExtensionSreg
+		 * @return \Onphp\OpenIdExtensionSreg
 		**/
 		public function addParam($paramName)
 		{
@@ -93,7 +95,7 @@ public function addParam($paramName)
 		}
 		
 		/**
-		 * @return OpenIdExtensionSreg
+		 * @return \Onphp\OpenIdExtensionSreg
 		**/
 		public function dropParams()
 		{
@@ -104,7 +106,7 @@ public function dropParams()
 		
 		/**
 		 * @param string $version
-		 * @return OpenIdExtensionSreg
+		 * @return \Onphp\OpenIdExtensionSreg
 		**/
 		public function setVersion($version)
 		{
diff --git a/main/SPL/AbstractList.class.php b/main/SPL/AbstractList.class.php
index de80bf565e..ed90bdff01 100644
--- a/main/SPL/AbstractList.class.php
+++ b/main/SPL/AbstractList.class.php
@@ -14,7 +14,9 @@
 	 * 
 	 * @ingroup onSPL
 	**/
-	abstract class AbstractList implements ArrayAccess, SimplifiedArrayAccess
+	namespace Onphp;
+
+	abstract class AbstractList implements \ArrayAccess, SimplifiedArrayAccess
 	{
 		protected $list = array();
 		
@@ -29,7 +31,7 @@ public function offsetGet($offset)
 		}
 		
 		/**
-		 * @return AbstractList
+		 * @return \Onphp\AbstractList
 		**/
 		public function offsetUnset($offset)
 		{
@@ -46,7 +48,7 @@ public function offsetExists($offset)
 		// SAA goes here
 		
 		/**
-		 * @return AbstractList
+		 * @return \Onphp\AbstractList
 		**/
 		public function clean()
 		{
diff --git a/main/SPL/IndexedList.class.php b/main/SPL/IndexedList.class.php
index 75d3d254a2..ac52a6402f 100644
--- a/main/SPL/IndexedList.class.php
+++ b/main/SPL/IndexedList.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup onSPL
 	**/
+	namespace Onphp;
+
 	final class IndexedList extends AbstractList
 	{
 		/**
-		 * @return IndexedList
+		 * @return \Onphp\IndexedList
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return IndexedList
+		 * @return \Onphp\IndexedList
 		**/
 		public function offsetSet($offset, $value)
 		{
diff --git a/main/SPL/PlainList.class.php b/main/SPL/PlainList.class.php
index aed351d89d..b2b8ee7c75 100644
--- a/main/SPL/PlainList.class.php
+++ b/main/SPL/PlainList.class.php
@@ -14,10 +14,12 @@
 	 * 
 	 * @ingroup onSPL
 	**/
+	namespace Onphp;
+
 	final class PlainList extends AbstractList
 	{
 		/**
-		 * @return PlainList
+		 * @return \Onphp\PlainList
 		**/
 		public static function create()
 		{
@@ -25,7 +27,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return PlainList
+		 * @return \Onphp\PlainList
 		**/
 		public function offsetSet($offset, $value)
 		{
diff --git a/main/SPL/SimplifiedArrayAccess.class.php b/main/SPL/SimplifiedArrayAccess.class.php
index 9635a2809e..5f32721246 100644
--- a/main/SPL/SimplifiedArrayAccess.class.php
+++ b/main/SPL/SimplifiedArrayAccess.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup onSPL
 	**/
+	namespace Onphp;
+
 	interface SimplifiedArrayAccess
 	{
 		public function clean();
diff --git a/main/UI/View/CleanRedirectView.class.php b/main/UI/View/CleanRedirectView.class.php
index 1c0fc39a88..df371beb85 100644
--- a/main/UI/View/CleanRedirectView.class.php
+++ b/main/UI/View/CleanRedirectView.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class CleanRedirectView implements View
 	{
 		protected $url = null;
@@ -22,7 +24,7 @@ public function __construct($url)
 		}
 		
 		/**
-		 * @return CleanRedirectView
+		 * @return \Onphp\CleanRedirectView
 		**/
 		public static function create($url)
 		{
diff --git a/main/UI/View/DebugPhpView.class.php b/main/UI/View/DebugPhpView.class.php
index 5e80fbaa36..4d333175ba 100644
--- a/main/UI/View/DebugPhpView.class.php
+++ b/main/UI/View/DebugPhpView.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class DebugPhpView extends SimplePhpView
 	{
 		/**
-		 * @return DebugPhpView
+		 * @return \Onphp\DebugPhpView
 		**/
 		public function preRender()
 		{
@@ -33,7 +35,7 @@ public function preRender()
 		}
 		
 		/**
-		 * @return DebugPhpView
+		 * @return \Onphp\DebugPhpView
 		**/
 		protected function postRender()
 		{
diff --git a/main/UI/View/EmptyGifView.class.php b/main/UI/View/EmptyGifView.class.php
index 6a0ef8ad2b..1d4ced4598 100644
--- a/main/UI/View/EmptyGifView.class.php
+++ b/main/UI/View/EmptyGifView.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class EmptyGifView implements View
 	{
 		/**
-		 * @return EmptyGifView
+		 * @return \Onphp\EmptyGifView
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return EmptyGifView
+		 * @return \Onphp\EmptyGifView
 		**/
 		public function render(/* Model */ $model = null)
 		{
diff --git a/main/UI/View/EmptyView.class.php b/main/UI/View/EmptyView.class.php
index 80e5a64ea6..fb2f06f988 100644
--- a/main/UI/View/EmptyView.class.php
+++ b/main/UI/View/EmptyView.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class EmptyView implements View, Stringable
 	{
 		/**
-		 * @return EmptyView
+		 * @return \Onphp\EmptyView
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return EmptyView
+		 * @return \Onphp\EmptyView
 		**/
 		public function render(/* Model */ $model = null)
 		{
diff --git a/main/UI/View/HttpErrorView.class.php b/main/UI/View/HttpErrorView.class.php
index d5be70d174..c65904b611 100644
--- a/main/UI/View/HttpErrorView.class.php
+++ b/main/UI/View/HttpErrorView.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class HttpErrorView implements View
 	{
 		protected $status	= null;
diff --git a/main/UI/View/JsonPView.class.php b/main/UI/View/JsonPView.class.php
index c6144ccc04..49152f7cf0 100644
--- a/main/UI/View/JsonPView.class.php
+++ b/main/UI/View/JsonPView.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Flow
 	**/
 
+	namespace Onphp;
+
 	class JsonPView extends JsonView
 	{
 		/**
@@ -22,7 +24,7 @@ class JsonPView extends JsonView
 
 		/**
 		 * @static
-		 * @return JsonPView
+		 * @return \Onphp\JsonPView
 		 */
 		public static function create()
 		{
@@ -38,7 +40,7 @@ public static function create()
 
 		/**
 		 * @param mixed $callback
-		 * @return JsonPView
+		 * @return \Onphp\JsonPView
 		 */
 		public function setCallback($callback)
 		{
@@ -60,7 +62,7 @@ public function setCallback($callback)
 		}
 
 		/**
-		 * @param Model $model
+		 * @param \Onphp\Model $\Onphp\Model
 		 * @return string
 		 */
 		public function toString(/* Model */ $model = null)
diff --git a/main/UI/View/JsonView.class.php b/main/UI/View/JsonView.class.php
index 83a8d6f788..a46fc90a58 100644
--- a/main/UI/View/JsonView.class.php
+++ b/main/UI/View/JsonView.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class JsonView implements View, Stringable
 	{
 		protected $options = 0;
 
 		/**
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public static function create()
 		{
@@ -26,7 +28,7 @@ public static function create()
 
 		/**
 		 * @param bool $flag
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function setHexQuot($flag = false)
 		{
@@ -41,7 +43,7 @@ public function setHexQuot($flag = false)
 
 		/**
 		 * @param bool $flag
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function setHexTag($flag = false)
 		{
@@ -56,7 +58,7 @@ public function setHexTag($flag = false)
 
 		/**
 		 * @param bool $flag
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function setHexAmp($flag = false)
 		{
@@ -71,7 +73,7 @@ public function setHexAmp($flag = false)
 
 		/**
 		 * @param bool $flag
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function setHexApos($flag = false)
 		{
@@ -86,7 +88,7 @@ public function setHexApos($flag = false)
 
 		/**
 		 * @param bool $flag
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function setForceObject($flag = false)
 		{
@@ -101,7 +103,7 @@ public function setForceObject($flag = false)
 
 		/**
 		 * @param bool $flag
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function setNumericCheck($flag = false)
 		{
@@ -116,7 +118,7 @@ public function setNumericCheck($flag = false)
 
 		/**
 		 * @param bool $flag
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function setPrettyPrint($flag = false)
 		{
@@ -133,7 +135,7 @@ public function setPrettyPrint($flag = false)
 
 		/**
 		 * @param bool $flag
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function setUnescapedSlashes($flag = false)
 		{
@@ -149,7 +151,7 @@ public function setUnescapedSlashes($flag = false)
 		}
 		
 		/**
-		 * @return JsonView
+		 * @return \Onphp\JsonView
 		**/
 		public function render(/* Model */ $model = null)
 		{
@@ -159,7 +161,7 @@ public function render(/* Model */ $model = null)
 		}
 		
 		/**
-		 * @param Model $model
+		 * @param \Onphp\Model $\Onphp\Model
 		 * @return string
 		 */
 		public function toString(/* Model */ $model = null)
diff --git a/main/UI/View/JsonXssView.class.php b/main/UI/View/JsonXssView.class.php
index f0f7e59304..6706943161 100644
--- a/main/UI/View/JsonXssView.class.php
+++ b/main/UI/View/JsonXssView.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Flow
 	**/
 
+	namespace Onphp;
+
 	class JsonXssView extends JsonPView
 	{
 		/**
@@ -34,7 +36,7 @@ class JsonXssView extends JsonPView
 
 		/**
 		 * @static
-		 * @return JsonXssView
+		 * @return \Onphp\JsonXssView
 		 */
 		public static function create()
 		{
@@ -43,8 +45,8 @@ public static function create()
 
 		/**
 		 * @param $value
-		 * @return JsonXssView
-		 * @throws WrongArgumentException
+		 * @return \Onphp\JsonXssView
+		 * @throws \Onphp\WrongArgumentException
 		 */
 		public function setPrefix($value)
 		{
@@ -57,7 +59,7 @@ public function setPrefix($value)
 		}
 
 		/**
-		 * @param Model $model
+		 * @param \Onphp\Model $\Onphp\Model
 		 * @return string
 		 */
 		public function toString(/* Model */ $model = null)
diff --git a/main/UI/View/MultiPrefixPhpViewResolver.class.php b/main/UI/View/MultiPrefixPhpViewResolver.class.php
index e6d202e6cb..4528f8900f 100644
--- a/main/UI/View/MultiPrefixPhpViewResolver.class.php
+++ b/main/UI/View/MultiPrefixPhpViewResolver.class.php
@@ -17,6 +17,8 @@
 	 * 
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class MultiPrefixPhpViewResolver implements ViewResolver
 	{
 		private $prefixes	= array();
@@ -25,10 +27,11 @@ class MultiPrefixPhpViewResolver implements ViewResolver
 		private $disabled	= array();
 		
 		private $postfix	= EXT_TPL;
-		private $viewClassName	= 'SimplePhpView';
+		private $viewClassName	= '\Onphp\SimplePhpView';
+		private $nameAliases = array();
 		
 		/**
-		 * @return MultiPrefixPhpViewResolver
+		 * @return \Onphp\MultiPrefixPhpViewResolver
 		**/
 		public static function create()
 		{
@@ -36,7 +39,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return MultiPrefixPhpViewResolver
+		 * @return \Onphp\MultiPrefixPhpViewResolver
 		**/
 		public function addFirstPrefix($prefix)
 		{
@@ -46,7 +49,7 @@ public function addFirstPrefix($prefix)
 		}
 		
 		/**
-		 * @return MultiPrefixPhpViewResolver
+		 * @return \Onphp\MultiPrefixPhpViewResolver
 		**/
 		public function addPrefix($prefix, $alias = null)
 		{
@@ -71,7 +74,7 @@ public function getPrefixes()
 		}
 		
 		/**
-		 * @return MultiPrefixPhpViewResolver
+		 * @return \Onphp\MultiPrefixPhpViewResolver
 		**/
 		public function dropPrefixes()
 		{
@@ -91,7 +94,7 @@ public function isPrefixDisabled($alias)
 		}
 		
 		/**
-		 * @return MultiPrefixPhpViewResolver
+		 * @return \Onphp\MultiPrefixPhpViewResolver
 		**/
 		public function disablePrefix($alias = null, $disabled = true)
 		{
@@ -121,7 +124,7 @@ public function getPostfix()
 		}
 		
 		/**
-		 * @return MultiPrefixPhpViewResolver
+		 * @return \Onphp\MultiPrefixPhpViewResolver
 		**/
 		public function setPostfix($postfix)
 		{
@@ -130,7 +133,17 @@ public function setPostfix($postfix)
 		}
 		
 		/**
-		 * @return SimplePhpView
+		 * @param string $nameAlias
+		 * @return \Onphp\MultiPrefixPhpViewResolver
+		 */
+		public function addNameAlias($viewNameFrom, $viewNameTo)
+		{
+			$this->nameAliases[$viewNameFrom] = $viewNameTo;
+			return $this;
+		}
+
+		/**
+		 * @return \Onphp\SimplePhpView
 		**/
 		public function resolveViewName($viewName)
 		{
@@ -139,10 +152,10 @@ public function resolveViewName($viewName)
 				'specify at least one prefix'
 			);
 			
-			if ($prefix = $this->findPrefix($viewName))
-				return $this->makeView($prefix, $viewName);
+			if ($path = $this->findPath($viewName))
+				return $this->makeView($path);
 			
-			if (!$this->findPrefix($viewName, false))
+			if (!$this->findPath($viewName, false))
 				throw new WrongArgumentException(
 					'can not resolve view: '.$viewName
 				);
@@ -152,11 +165,11 @@ public function resolveViewName($viewName)
 		
 		public function viewExists($viewName)
 		{
-			return ($this->findPrefix($viewName) !== null);
+			return ($this->findPath($viewName) !== null);
 		}
 		
 		/**
-		 * @return MultiPrefixPhpViewResolver
+		 * @return \Onphp\MultiPrefixPhpViewResolver
 		**/
 		public function setViewClassName($viewClassName)
 		{
@@ -170,7 +183,7 @@ public function getViewClassName()
 			return $this->viewClassName;
 		}
 		
-		protected function findPrefix($viewName, $checkDisabled = true)
+		protected function findPath($viewName, $checkDisabled = true)
 		{
 			foreach ($this->prefixes as $alias => $prefix) {
 				if (
@@ -181,21 +194,25 @@ protected function findPrefix($viewName, $checkDisabled = true)
 					continue;
 				
 				if (file_exists($prefix.$viewName.$this->postfix))
-					return $prefix;
+					return $prefix.$viewName.$this->postfix;
+
+				$aliasedViewName = $viewName;
+				while (isset($this->nameAliases[$aliasedViewName])) {
+					$aliasedViewName = $this->nameAliases[$aliasedViewName];
+					if (file_exists($prefix.$aliasedViewName.$this->postfix))
+						return $prefix.$aliasedViewName.$this->postfix;
+				}
 			}
 			
 			return null;
 		}
 		
 		/**
-		 * @return View
+		 * @return \Onphp\View
 		**/
-		protected function makeView($prefix, $viewName)
+		protected function makeView($path)
 		{
-			return new $this->viewClassName(
-				$prefix.$viewName.$this->postfix,
-				$this
-			);
+			return new $this->viewClassName($path, $this);
 		}
 		
 		private function getAutoAlias($prefix)
diff --git a/main/UI/View/PartViewer.class.php b/main/UI/View/PartViewer.class.php
index ec221be9c7..5be127ae8b 100644
--- a/main/UI/View/PartViewer.class.php
+++ b/main/UI/View/PartViewer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class PartViewer
 	{
 		protected $viewResolver 	= null;
@@ -24,7 +26,7 @@ public function __construct(ViewResolver $resolver, $model = null)
 		}
 		
 		/**
-		 * @return PartViewer
+		 * @return \Onphp\PartViewer
 		**/
 		public function view($partName, $model = null)
 		{
@@ -63,7 +65,7 @@ public function toString($partName, $model = null)
 				ob_start();
 				$this->view($partName, $model);
 				return ob_get_clean();
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				ob_end_clean();
 				throw $e;
 			}
@@ -75,7 +77,7 @@ public function partExists($partName)
 		}
 		
 		/**
-		 * @return Model
+		 * @return \Onphp\Model
 		**/
 		public function getModel()
 		{
diff --git a/main/UI/View/PhpViewResolver.class.php b/main/UI/View/PhpViewResolver.class.php
index 4b75d29860..839c27367d 100644
--- a/main/UI/View/PhpViewResolver.class.php
+++ b/main/UI/View/PhpViewResolver.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class PhpViewResolver implements ViewResolver
 	{
 		private $prefix		= null;
@@ -24,7 +26,7 @@ public function __construct($prefix = null, $postfix = null)
 		}
 		
 		/**
-		 * @return PhpViewResolver
+		 * @return \Onphp\PhpViewResolver
 		**/
 		public static function create($prefix = null, $postfix = null)
 		{
@@ -32,7 +34,7 @@ public static function create($prefix = null, $postfix = null)
 		}
 		
 		/**
-		 * @return SimplePhpView
+		 * @return \Onphp\SimplePhpView
 		**/
 		public function resolveViewName($viewName)
 		{
@@ -54,7 +56,7 @@ public function getPrefix()
 		}
 		
 		/**
-		 * @return PhpViewResolver
+		 * @return \Onphp\PhpViewResolver
 		**/
 		public function setPrefix($prefix)
 		{
@@ -69,7 +71,7 @@ public function getPostfix()
 		}
 		
 		/**
-		 * @return PhpViewResolver
+		 * @return \Onphp\PhpViewResolver
 		**/
 		public function setPostfix($postfix)
 		{
diff --git a/main/UI/View/RedirectToView.class.php b/main/UI/View/RedirectToView.class.php
index e255e23010..9bca73f2e8 100644
--- a/main/UI/View/RedirectToView.class.php
+++ b/main/UI/View/RedirectToView.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	final class RedirectToView extends RedirectView
 	{
 		private $prefix = null;
 		private $suffix = null;
 		
 		/**
-		 * @return RedirectToView
+		 * @return \Onphp\RedirectToView
 		**/
 		public static function create($controllerName)
 		{
@@ -38,7 +40,7 @@ public function getPrefix()
 		}
 		
 		/**
-		 * @return RedirectToView
+		 * @return \Onphp\RedirectToView
 		**/
 		public function setPrefix($prefix)
 		{
@@ -53,7 +55,7 @@ public function getSuffix()
 		}
 		
 		/**
-		 * @return RedirectToView
+		 * @return \Onphp\RedirectToView
 		**/
 		public function setSuffix($suffix)
 		{
@@ -68,7 +70,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return RedirectToView
+		 * @return \Onphp\RedirectToView
 		**/
 		public function setName($name)
 		{
diff --git a/main/UI/View/RedirectView.class.php b/main/UI/View/RedirectView.class.php
index 6c4b70187f..8a144a7bc6 100644
--- a/main/UI/View/RedirectView.class.php
+++ b/main/UI/View/RedirectView.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class RedirectView extends CleanRedirectView
 	{
 		private $falseAsUnset = null;
 		private $buildArrays = null;
 		
 		/**
-		 * @return RedirectView
+		 * @return \Onphp\RedirectView
 		**/
 		public static function create($url)
 		{
@@ -31,7 +33,7 @@ public function isFalseAsUnset()
 		}
 		
 		/**
-		 * @return RedirectView
+		 * @return \Onphp\RedirectView
 		**/
 		public function setFalseAsUnset($really)
 		{
@@ -48,7 +50,7 @@ public function isBuildArrays()
 		}
 		
 		/**
-		 * @return RedirectView
+		 * @return \Onphp\RedirectView
 		**/
 		public function setBuildArrays($really)
 		{
diff --git a/main/UI/View/SimplePhpView.class.php b/main/UI/View/SimplePhpView.class.php
index af28fdd452..d283d9b6a6 100644
--- a/main/UI/View/SimplePhpView.class.php
+++ b/main/UI/View/SimplePhpView.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	class SimplePhpView extends EmptyView
 	{
 		protected $templatePath		= null;
@@ -24,7 +26,7 @@ public function __construct($templatePath, ViewResolver $partViewResolver)
 		}
 		
 		/**
-		 * @return SimplePhpView
+		 * @return \Onphp\SimplePhpView
 		**/
 		public function render(/* Model */ $model = null)
 		{
@@ -50,14 +52,14 @@ public function toString($model = null)
 				ob_start();
 				$this->render($model);
 				return ob_get_clean();
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				ob_end_clean();
 				throw $e;
 			}
 		}
 		
 		/**
-		 * @return SimplePhpView
+		 * @return \Onphp\SimplePhpView
 		**/
 		protected function preRender()
 		{
@@ -65,7 +67,7 @@ protected function preRender()
 		}
 		
 		/**
-		 * @return SimplePhpView
+		 * @return \Onphp\SimplePhpView
 		**/
 		protected function postRender()
 		{
diff --git a/main/UI/View/View.class.php b/main/UI/View/View.class.php
index c56486d0dd..e6c7b58c0d 100644
--- a/main/UI/View/View.class.php
+++ b/main/UI/View/View.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Flow
 	**/
+	namespace Onphp;
+
 	interface View
 	{
 		const ERROR_VIEW = 'error';
diff --git a/main/UI/View/ViewResolver.class.php b/main/UI/View/ViewResolver.class.php
index 9e27831769..2d3aa3dc39 100644
--- a/main/UI/View/ViewResolver.class.php
+++ b/main/UI/View/ViewResolver.class.php
@@ -13,11 +13,13 @@
 	 * @ingroup Flow
 	 * @ingroup Module
 	**/
+	namespace Onphp;
+
 	interface ViewResolver
 	{
 		/**
 		 * @param	$viewName	string
-		 * @return	View
+		 * @return	\Onphp\View
 		**/
 		public function resolveViewName($viewName);
 	}
diff --git a/main/UnifiedContainer/ManyToManyLinked.class.php b/main/UnifiedContainer/ManyToManyLinked.class.php
index 5dea1db709..c024042ff4 100644
--- a/main/UnifiedContainer/ManyToManyLinked.class.php
+++ b/main/UnifiedContainer/ManyToManyLinked.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	abstract class ManyToManyLinked extends UnifiedContainer
 	{
 		abstract public function getHelperTable();
@@ -29,8 +31,8 @@ public function __construct(
 			
 			$worker =
 				$lazy
-					? 'ManyToManyLinkedLazy'
-					: 'ManyToManyLinkedFull';
+					? '\Onphp\ManyToManyLinkedLazy'
+					: '\Onphp\ManyToManyLinkedFull';
 			
 			$this->worker = new $worker($this);
 		}
diff --git a/main/UnifiedContainer/ManyToManyLinkedFull.class.php b/main/UnifiedContainer/ManyToManyLinkedFull.class.php
index 602e4c3326..c8b1c2a9dd 100644
--- a/main/UnifiedContainer/ManyToManyLinkedFull.class.php
+++ b/main/UnifiedContainer/ManyToManyLinkedFull.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	final class ManyToManyLinkedFull extends ManyToManyLinkedWorker
 	{
 		/**
-		 * @return ManyToManyLinkedFull
+		 * @return \Onphp\ManyToManyLinkedFull
 		**/
 		public function sync($insert, $update = array(), $delete)
 		{
@@ -51,7 +53,7 @@ public function sync($insert, $update = array(), $delete)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function makeFetchQuery()
 		{
diff --git a/main/UnifiedContainer/ManyToManyLinkedLazy.class.php b/main/UnifiedContainer/ManyToManyLinkedLazy.class.php
index 9935efa51d..2027af3279 100644
--- a/main/UnifiedContainer/ManyToManyLinkedLazy.class.php
+++ b/main/UnifiedContainer/ManyToManyLinkedLazy.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	final class ManyToManyLinkedLazy extends ManyToManyLinkedWorker
 	{
 		/**
-		 * @throws WrongArgumentException
-		 * @return ManyToManyLinkedLazy
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\ManyToManyLinkedLazy
 		**/
 		public function sync($insert, $update = array(), $delete)
 		{
@@ -40,7 +42,7 @@ public function sync($insert, $update = array(), $delete)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function makeFetchQuery()
 		{
diff --git a/main/UnifiedContainer/ManyToManyLinkedWorker.class.php b/main/UnifiedContainer/ManyToManyLinkedWorker.class.php
index 6c4a8746a2..91ec541125 100644
--- a/main/UnifiedContainer/ManyToManyLinkedWorker.class.php
+++ b/main/UnifiedContainer/ManyToManyLinkedWorker.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	abstract class ManyToManyLinkedWorker extends UnifiedContainerWorker
 	{
 		/**
-		 * @return InsertQuery
+		 * @return \Onphp\InsertQuery
 		**/
 		protected function makeInsertQuery($childId)
 		{
@@ -33,7 +35,7 @@ protected function makeInsertQuery($childId)
 		/**
 		 * only unlinking, we don't want to drop original object
 		 * 
-		 * @return DeleteQuery
+		 * @return \Onphp\DeleteQuery
 		**/
 		protected function makeDeleteQuery($delete)
 		{
@@ -56,7 +58,7 @@ protected function makeDeleteQuery($delete)
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		protected function joinHelperTable(SelectQuery $query)
 		{
diff --git a/main/UnifiedContainer/OneToManyLinked.class.php b/main/UnifiedContainer/OneToManyLinked.class.php
index 97b707608c..0d565ba122 100644
--- a/main/UnifiedContainer/OneToManyLinked.class.php
+++ b/main/UnifiedContainer/OneToManyLinked.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	abstract class OneToManyLinked extends UnifiedContainer
 	{
 		public function __construct(
@@ -22,8 +24,8 @@ public function __construct(
 			
 			$worker =
 				$lazy
-					? 'OneToManyLinkedLazy'
-					: 'OneToManyLinkedFull';
+					? '\Onphp\OneToManyLinkedLazy'
+					: '\Onphp\OneToManyLinkedFull';
 			
 			$this->worker = new $worker($this);
 		}
diff --git a/main/UnifiedContainer/OneToManyLinkedFull.class.php b/main/UnifiedContainer/OneToManyLinkedFull.class.php
index 1ca724aca3..e38c97de81 100644
--- a/main/UnifiedContainer/OneToManyLinkedFull.class.php
+++ b/main/UnifiedContainer/OneToManyLinkedFull.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	final class OneToManyLinkedFull extends OneToManyLinkedWorker
 	{
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function makeFetchQuery()
 		{
@@ -23,7 +25,7 @@ public function makeFetchQuery()
 		}
 		
 		/**
-		 * @return OneToManyLinkedFull
+		 * @return \Onphp\OneToManyLinkedFull
 		**/
 		public function sync($insert, $update = array(), $delete)
 		{
diff --git a/main/UnifiedContainer/OneToManyLinkedLazy.class.php b/main/UnifiedContainer/OneToManyLinkedLazy.class.php
index 9c30f238c9..1784760491 100644
--- a/main/UnifiedContainer/OneToManyLinkedLazy.class.php
+++ b/main/UnifiedContainer/OneToManyLinkedLazy.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	final class OneToManyLinkedLazy extends OneToManyLinkedWorker
 	{
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function makeFetchQuery()
 		{
@@ -28,8 +30,8 @@ public function makeFetchQuery()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return OneToManyLinkedLazy
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\OneToManyLinkedLazy
 		**/
 		public function sync($insert, $update = array(), $delete)
 		{
@@ -66,7 +68,7 @@ public function sync($insert, $update = array(), $delete)
 		}
 		
 		/**
-		 * @return UpdateQuery
+		 * @return \Onphp\UpdateQuery
 		**/
 		private function makeMassUpdateQuery($ids)
 		{
diff --git a/main/UnifiedContainer/OneToManyLinkedWorker.class.php b/main/UnifiedContainer/OneToManyLinkedWorker.class.php
index 5e99029818..4931353e0b 100644
--- a/main/UnifiedContainer/OneToManyLinkedWorker.class.php
+++ b/main/UnifiedContainer/OneToManyLinkedWorker.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	abstract class OneToManyLinkedWorker extends UnifiedContainerWorker
 	{
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		protected function targetize(SelectQuery $query)
 		{
diff --git a/main/UnifiedContainer/UnifiedContainer.class.php b/main/UnifiedContainer/UnifiedContainer.class.php
index c8483b972b..384dd04ed1 100644
--- a/main/UnifiedContainer/UnifiedContainer.class.php
+++ b/main/UnifiedContainer/UnifiedContainer.class.php
@@ -57,6 +57,8 @@ protected function getParentTableIdField()
 	 * 
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	abstract class UnifiedContainer
 	{
 		protected $worker	= null;
@@ -89,7 +91,7 @@ public function __construct(
 			$this->lazy		= $lazy;
 			$this->dao		= $dao;
 			
-			Assert::isInstance($dao->getObjectName(), 'Identifiable');
+			Assert::isInstance($dao->getObjectName(), '\Onphp\Identifiable');
 
 			$this->comparator = SerializedObjectComparator::me();
 		}
@@ -113,7 +115,7 @@ public function getParentObject()
 		}
 		
 		/**
-		 * @return GenericDAO
+		 * @return \Onphp\GenericDAO
 		**/
 		public function getDao()
 		{
@@ -131,8 +133,8 @@ public function isFetched()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return UnifiedContainer
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\UnifiedContainer
 		**/
 		public function setCriteria(Criteria $criteria)
 		{
@@ -153,7 +155,7 @@ public function setCriteria(Criteria $criteria)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function getCriteria()
 		{
@@ -168,8 +170,8 @@ public function setObjectComparator(Comparator $comparator)
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return UnifiedContainer
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\UnifiedContainer
 		**/
 		public function setList($list)
 		{
@@ -181,7 +183,7 @@ public function setList($list)
 		}
 		
 		/**
-		 * @return UnifiedContainer
+		 * @return \Onphp\UnifiedContainer
 		**/
 		public function mergeList(array $list)
 		{
@@ -217,8 +219,8 @@ public function getCount()
 		}
 		
 		/**
-		 * @throws WrongStateException
-		 * @return UnifiedContainer
+		 * @throws \Onphp\WrongStateException
+		 * @return \Onphp\UnifiedContainer
 		**/
 		public function fetch()
 		{
@@ -239,8 +241,8 @@ public function fetch()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return UnifiedContainer
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\UnifiedContainer
 		**/
 		public function save()
 		{
@@ -306,13 +308,14 @@ public function save()
 			
 			$this->clones = array();
 			$this->syncClones();
+			$this->parent->dao()->uncacheById($this->getParentObject()->getId());
 			$this->dao->uncacheLists();
 
 			return $this;
 		}
 
 		/**
-		 * @return UnifiedContainer
+		 * @return \Onphp\UnifiedContainer
 		**/
 		public function clean()
 		{
@@ -324,7 +327,7 @@ public function clean()
 		}
 		
 		/**
-		 * @return UnifiedContainer
+		 * @return \Onphp\UnifiedContainer
 		**/
 		public function dropList()
 		{
@@ -368,7 +371,7 @@ protected function fetchList()
 		}
 		
 		/**
-		 * @return UnifiedContainer
+		 * @return \Onphp\UnifiedContainer
 		**/
 		private function importList(array $list)
 		{
@@ -380,7 +383,7 @@ private function importList(array $list)
 		}
 	
 		/**
-		 * @return UnifiedContainer
+		 * @return \Onphp\UnifiedContainer
 		**/
 		private function syncClones()
 		{
diff --git a/main/UnifiedContainer/UnifiedContainerWorker.class.php b/main/UnifiedContainer/UnifiedContainerWorker.class.php
index 2c72f16518..811b4d6a06 100644
--- a/main/UnifiedContainer/UnifiedContainerWorker.class.php
+++ b/main/UnifiedContainer/UnifiedContainerWorker.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Containers
 	**/
+	namespace Onphp;
+
 	abstract class UnifiedContainerWorker
 	{
 		protected $criteria		= null;
@@ -28,7 +30,7 @@ public function __construct(UnifiedContainer $uc)
 		}
 		
 		/**
-		 * @return UnifiedContainerWorker
+		 * @return \Onphp\UnifiedContainerWorker
 		**/
 		public function setCriteria(Criteria $criteria)
 		{
@@ -38,7 +40,7 @@ public function setCriteria(Criteria $criteria)
 		}
 		
 		/**
-		 * @return Criteria
+		 * @return \Onphp\Criteria
 		**/
 		public function getCriteria()
 		{
@@ -46,7 +48,7 @@ public function getCriteria()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		public function makeCountQuery()
 		{
@@ -98,7 +100,7 @@ public function dropList()
 		}
 		
 		/**
-		 * @return SelectQuery
+		 * @return \Onphp\SelectQuery
 		**/
 		protected function makeSelectQuery()
 		{
diff --git a/main/Utils/AMQP/AMQP.class.php b/main/Utils/AMQP/AMQP.class.php
index 643f9a0ea7..1bbf37728e 100644
--- a/main/Utils/AMQP/AMQP.class.php
+++ b/main/Utils/AMQP/AMQP.class.php
@@ -13,10 +13,12 @@
 	 * AMQP stands for Advanced Message Queue Protocol, which is
 	 * an open standard middleware layer for message routing and queuing.
 	**/
+	namespace Onphp;
+
 	abstract class AMQP implements AMQPInterface
 	{
 		/**
-		 * @var AMQPCredentials
+		 * @var \Onphp\AMQPCredentials
 		**/
 		protected $credentials = null;
 		protected $link	= null;
@@ -28,17 +30,17 @@ abstract class AMQP implements AMQPInterface
 		protected $channels	= array();
 
 		/**
-		 * @return AMQP
+		 * @return \Onphp\AMQP
 		**/
 		abstract public function connect();
 
 		/**
-		 * @return AMQP
+		 * @return \Onphp\AMQP
 		**/
 		abstract public function disconnect();
 		
 		/**
-		 * @return AMQP
+		 * @return \Onphp\AMQP
 		**/
 		abstract public function reconnect();
 
@@ -48,7 +50,7 @@ abstract public function reconnect();
 		abstract public function isConnected();
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		 */
 		abstract public function spawnChannel($id, AMQPInterface $transport);
 		
@@ -65,7 +67,7 @@ public function __destruct()
 		}
 
 		/**
-		 * @return AMQP
+		 * @return \Onphp\AMQP
 		**/
 		public static function spawn($class, AMQPCredentials $credentials)
 		{
@@ -73,7 +75,7 @@ public static function spawn($class, AMQPCredentials $credentials)
 		}
 
 		/**
-		 * @return AMQP
+		 * @return \Onphp\AMQP
 		**/
 		public function getLink()
 		{
@@ -82,8 +84,8 @@ public function getLink()
 
 		/**
 		 * @param integer $id
-		 * @throws WrongArgumentException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function createChannel($id)
 		{
@@ -105,8 +107,8 @@ public function createChannel($id)
 		}
 
 		/**
-		 * @throws MissingElementException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function getChannel($id)
 		{
@@ -128,8 +130,8 @@ public function getChannelList()
 
 		/**
 		 * @param integer $id
-		 * @throws MissingElementException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function dropChannel($id)
 		{
@@ -146,7 +148,7 @@ public function dropChannel($id)
 		}
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		 */
 		public function getCredentials()
 		{
@@ -163,7 +165,7 @@ public function isAlive()
 
 		/**
 		 * @param bool $alive
-		 * @return AMQP
+		 * @return \Onphp\AMQP
 		 */
 		public function setAlive($alive)
 		{
diff --git a/main/Utils/AMQP/AMQPBaseChannel.class.php b/main/Utils/AMQP/AMQPBaseChannel.class.php
index 40a297b117..e057102108 100644
--- a/main/Utils/AMQP/AMQPBaseChannel.class.php
+++ b/main/Utils/AMQP/AMQPBaseChannel.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * Base class modelling an AMQ channel
 	**/
+	namespace Onphp;
+
 	abstract class AMQPBaseChannel implements AMQPChannelInterface
 	{
 		protected $id = null;
 
 		/**
-		 * @var AMQPInterface
+		 * @var \Onphp\AMQPInterface
 		**/
 		protected $transport = null;
 
@@ -44,8 +46,8 @@ public function getId()
 		}
 
 		/**
-		 * @throws AMQPServerConnectionException
-		 * @return AMQPBaseChannel
+		 * @throws \Onphp\AMQPServerConnectionException
+		 * @return \Onphp\AMQPBaseChannel
 		**/
 		protected function checkConnection()
 		{
diff --git a/main/Utils/AMQP/AMQPBaseConfig.class.php b/main/Utils/AMQP/AMQPBaseConfig.class.php
index 6524c8d2c6..695c641a41 100644
--- a/main/Utils/AMQP/AMQPBaseConfig.class.php
+++ b/main/Utils/AMQP/AMQPBaseConfig.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class AMQPBaseConfig
 	{
 		protected $passive = false;
@@ -73,7 +75,7 @@ public function setArguments(array $assoc)
 		}
 
 		/**
-		 * @param AMQPBitmaskResolver $resolver
+		 * @param \Onphp\AMQPBitmaskResolver $resolver
 		 * @return integer - it's bitmask
 		**/
 		public function getBitmask(AMQPBitmaskResolver $resolver)
diff --git a/main/Utils/AMQP/AMQPBaseMessage.class.php b/main/Utils/AMQP/AMQPBaseMessage.class.php
index 447953a6a9..8dd478e94b 100644
--- a/main/Utils/AMQP/AMQPBaseMessage.class.php
+++ b/main/Utils/AMQP/AMQPBaseMessage.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * http://www.rabbitmq.com/amqp-0-9-1-reference.html#class.basic
 	**/
+	namespace Onphp;
+
 	abstract class AMQPBaseMessage
 	{
 		const CONTENT_TYPE = 'content_type';
@@ -58,7 +60,7 @@ public function getProperty($key)
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setProperties(array $assoc)
 		{
@@ -77,7 +79,7 @@ public function getProperties()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setContentType($string)
 		{
@@ -92,7 +94,7 @@ public function getContentType()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setContentEncoding($string)
 		{
@@ -107,7 +109,7 @@ public function getContentEncoding()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setMessageId($string)
 		{
@@ -122,7 +124,7 @@ public function getMessageId()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setUserId($string)
 		{
@@ -137,7 +139,7 @@ public function getUserId()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setAppId($string)
 		{
@@ -154,7 +156,7 @@ public function getAppId()
 		/**
 		 * Non-persistent (1) or persistent (2).
 		 *
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setDeliveryMode($int)
 		{
@@ -184,7 +186,7 @@ public function getDeliveryMode()
 		/**
 		 * Message priority from 0 to 9.
 		 *
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setPriority($int)
 		{
@@ -206,7 +208,7 @@ public function getPriority()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setCorrelationId($string)
 		{
@@ -221,7 +223,7 @@ public function getCorrelationId()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setTimestamp(Timestamp $datetime)
 		{
@@ -232,7 +234,7 @@ public function setTimestamp(Timestamp $datetime)
 		}
 
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public function getTimestamp()
 		{
@@ -240,7 +242,7 @@ public function getTimestamp()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setExpiration($string)
 		{
@@ -255,7 +257,7 @@ public function getExpiration()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setType($string)
 		{
@@ -270,7 +272,7 @@ public function getType()
 		}
 
 		/**
-		 * @return AMQPBaseMessage
+		 * @return \Onphp\AMQPBaseMessage
 		**/
 		public function setReplyTo($string)
 		{
diff --git a/main/Utils/AMQP/AMQPBitmaskResolver.class.php b/main/Utils/AMQP/AMQPBitmaskResolver.class.php
index 1769d79a58..111f777964 100644
--- a/main/Utils/AMQP/AMQPBitmaskResolver.class.php
+++ b/main/Utils/AMQP/AMQPBitmaskResolver.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface AMQPBitmaskResolver
 	{
 		public function getBitmask($config);
diff --git a/main/Utils/AMQP/AMQPChannelInterface.class.php b/main/Utils/AMQP/AMQPChannelInterface.class.php
index 758a07ce81..c79c772326 100644
--- a/main/Utils/AMQP/AMQPChannelInterface.class.php
+++ b/main/Utils/AMQP/AMQPChannelInterface.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface AMQPChannelInterface
 	{
 		/**
@@ -17,24 +19,24 @@ interface AMQPChannelInterface
 		public function isOpen();
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function open();
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function close();
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function exchangeDeclare(
 			$name, AMQPExchangeConfig $conf
 		);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function exchangeDelete(
 			$name, $ifUnused = false
@@ -42,12 +44,12 @@ public function exchangeDelete(
 
 		/**
 		 * @see http://www.rabbitmq.com/blog/2010/10/19/exchange-to-exchange-bindings/
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function exchangeBind($destinationName, $sourceName, $routingKey);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function exchangeUnbind($destinationName, $sourceName, $routingKey);
 
@@ -57,54 +59,54 @@ public function exchangeUnbind($destinationName, $sourceName, $routingKey);
 		public function queueDeclare($name, AMQPQueueConfig $conf);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueBind($name, $exchange, $routingKey);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueUnbind($name, $exchange, $routingKey);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queuePurge($name);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueDelete($name);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicPublish(
 			$exchange, $routingKey, AMQPOutgoingMessage $msg
 		);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicQos($prefetchSize, $prefetchCount);
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function basicGet($queue, $autoAck = true);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicAck($deliveryTag, $multiple = false);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicConsume($queue, $autoAck, AMQPConsumer $callback);
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicCancel($consumerTag);
 	}
diff --git a/main/Utils/AMQP/AMQPConsumer.class.php b/main/Utils/AMQP/AMQPConsumer.class.php
index 891c0ba99a..db9f08d261 100644
--- a/main/Utils/AMQP/AMQPConsumer.class.php
+++ b/main/Utils/AMQP/AMQPConsumer.class.php
@@ -9,16 +9,18 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface AMQPConsumer
 	{
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function getChannel();
 
 		/**
 		 * Called when a delivery appears for this consumer.
-		 * @param AMQPIncomingMessage $delivery
+		 * @param \Onphp\AMQPIncomingMessage $delivery
 		 * @return void
 		**/
 		public function handleDelivery(AMQPIncomingMessage $delivery);
@@ -51,7 +53,7 @@ public function handleCancelOk($consumerTag);
 		public function handleChangeConsumerTag($fromTag, $toTag);
 
 		/**
-		 * @return AMQPConsumer
+		 * @return \Onphp\AMQPConsumer
 		**/
 		public function setQueueName($name);
 
@@ -61,7 +63,7 @@ public function setQueueName($name);
 		public function getQueueName();
 
 		/**
-		 * @return AMQPConsumer
+		 * @return \Onphp\AMQPConsumer
 		**/
 		public function setAutoAcknowledge($boolean);
 
@@ -71,7 +73,7 @@ public function setAutoAcknowledge($boolean);
 		public function isAutoAcknowledge();
 
 		/**
-		 * @return AMQPConsumer
+		 * @return \Onphp\AMQPConsumer
 		**/
 		public function setConsumerTag($consumerTag);
 
@@ -81,7 +83,7 @@ public function setConsumerTag($consumerTag);
 		public function getConsumerTag();
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function getNextDelivery();
 	}
diff --git a/main/Utils/AMQP/AMQPCredentials.class.php b/main/Utils/AMQP/AMQPCredentials.class.php
index 3287ef9adb..e2e015a810 100644
--- a/main/Utils/AMQP/AMQPCredentials.class.php
+++ b/main/Utils/AMQP/AMQPCredentials.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class AMQPCredentials
 	{
 		const DEFAULT_HOST = 'localhost';
@@ -24,7 +26,7 @@ final class AMQPCredentials
 		protected $password = null;
 		
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		**/
 		public static function create()
 		{
@@ -32,7 +34,7 @@ public static function create()
 		}
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		**/
 		public static function createDefault()
 		{
@@ -51,7 +53,7 @@ public function getHost()
 		}
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		**/
 		public function setHost($host)
 		{
@@ -66,7 +68,7 @@ public function getPort()
 		}
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		**/
 		public function setPort($port)
 		{
@@ -81,7 +83,7 @@ public function getVirtualHost()
 		}
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		**/
 		public function setVirtualHost($virtualHost)
 		{
@@ -96,7 +98,7 @@ public function getLogin()
 		}
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		**/
 		public function setLogin($login)
 		{
@@ -111,7 +113,7 @@ public function getPassword()
 		}
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		**/
 		public function setPassword($password)
 		{
diff --git a/main/Utils/AMQP/AMQPDefaultConsumer.class.php b/main/Utils/AMQP/AMQPDefaultConsumer.class.php
index d47fd0cd1c..e6501900d1 100644
--- a/main/Utils/AMQP/AMQPDefaultConsumer.class.php
+++ b/main/Utils/AMQP/AMQPDefaultConsumer.class.php
@@ -9,10 +9,12 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class AMQPDefaultConsumer implements AMQPConsumer
 	{
 		/**
-		 * @var AMQPChannelInterface
+		 * @var \Onphp\AMQPChannelInterface
 		**/
 		protected $channel = null;
 		protected $consumerTag = null;
@@ -25,7 +27,7 @@ public function __construct(AMQPChannelInterface $channel)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function getChannel()
 		{
@@ -34,7 +36,7 @@ public function getChannel()
 
 		/**
 		 * @param $consumerTag
-		 * @return AMQPConsumer
+		 * @return \Onphp\AMQPConsumer
 		**/
 		public function setConsumerTag($consumerTag)
 		{
@@ -81,7 +83,7 @@ public function handleChangeConsumerTag($fromTag, $toTag)
 		}
 
 		/**
-		 * @return AMQPDefaultConsumer
+		 * @return \Onphp\AMQPDefaultConsumer
 		**/
 		public function setQueueName($name)
 		{
@@ -99,7 +101,7 @@ public function getQueueName()
 		}
 
 		/**
-		 * @return AMQPDefaultConsumer
+		 * @return \Onphp\AMQPDefaultConsumer
 		**/
 		public function setAutoAcknowledge($boolean)
 		{
@@ -114,7 +116,7 @@ public function isAutoAcknowledge()
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function getNextDelivery()
 		{
diff --git a/main/Utils/AMQP/AMQPExchangeConfig.class.php b/main/Utils/AMQP/AMQPExchangeConfig.class.php
index b8ed97e263..5ce6643741 100644
--- a/main/Utils/AMQP/AMQPExchangeConfig.class.php
+++ b/main/Utils/AMQP/AMQPExchangeConfig.class.php
@@ -12,17 +12,19 @@
 	/**
 	 * @see http://www.rabbitmq.com/amqp-0-9-1-quickref.html#exchange.declare
 	**/
+	namespace Onphp;
+
 	final class AMQPExchangeConfig extends AMQPBaseConfig
 	{
 		protected $internal = null;
 
 		/**
-		 * @var AMQPExchangeType
+		 * @var \Onphp\AMQPExchangeType
 		**/
 		protected $type = null;
 
 		/**
-		 * @return AMQPExchangeConfig
+		 * @return \Onphp\AMQPExchangeConfig
 		**/
 		public static function create()
 		{
@@ -30,8 +32,8 @@ public static function create()
 		}
 
 		/**
-		 * @param AMQPExchangeType $type
-		 * @return AMQPExchangeConfig
+		 * @param \Onphp\AMQPExchangeType $type
+		 * @return \Onphp\AMQPExchangeConfig
 		**/
 		public function setType(AMQPExchangeType $type)
 		{
@@ -41,7 +43,7 @@ public function setType(AMQPExchangeType $type)
 		}
 
 		/**
-		 * @return AMQPExchangeType
+		 * @return \Onphp\AMQPExchangeType
 		**/
 		public function getType()
 		{
@@ -55,7 +57,7 @@ public function getInternal()
 
 		/**
 		 * @param boolean $internal
-		 * @return AMQPExchangeConfig
+		 * @return \Onphp\AMQPExchangeConfig
 		**/
 		public function setInternal($internal)
 		{
diff --git a/main/Utils/AMQP/AMQPExchangeType.class.php b/main/Utils/AMQP/AMQPExchangeType.class.php
index 14410b4f6c..bfbec02d70 100644
--- a/main/Utils/AMQP/AMQPExchangeType.class.php
+++ b/main/Utils/AMQP/AMQPExchangeType.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class AMQPExchangeType extends Enumeration
 	{
 		const DIRECT = 1;
diff --git a/main/Utils/AMQP/AMQPIncomingMessage.class.php b/main/Utils/AMQP/AMQPIncomingMessage.class.php
index b327e8ff9e..41f62ccee5 100644
--- a/main/Utils/AMQP/AMQPIncomingMessage.class.php
+++ b/main/Utils/AMQP/AMQPIncomingMessage.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class AMQPIncomingMessage extends AMQPBaseMessage
 	{
 		const COUNT = 'count';
@@ -32,7 +34,7 @@ final class AMQPIncomingMessage extends AMQPBaseMessage
 		);
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public static function spawn(array $assoc)
 		{
@@ -40,7 +42,7 @@ public static function spawn(array $assoc)
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public static function create()
 		{
@@ -53,7 +55,7 @@ public function getRedelivered()
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function setRedelivered($redelivered)
 		{
@@ -68,7 +70,7 @@ public function getConsumerTag()
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function setConsumerTag($consumerTag)
 		{
@@ -83,7 +85,7 @@ public function getCount()
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function setCount($count)
 		{
@@ -98,7 +100,7 @@ public function getRoutingKey()
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function setRoutingKey($routingKey)
 		{
@@ -113,7 +115,7 @@ public function getExchange()
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function setExchange($exchange)
 		{
@@ -128,7 +130,7 @@ public function getDeliveryTag()
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function setDeliveryTag($deliveryTag)
 		{
@@ -143,7 +145,7 @@ public function isEmptyQueue()
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		protected function fill(array $assoc)
 		{
diff --git a/main/Utils/AMQP/AMQPInterface.class.php b/main/Utils/AMQP/AMQPInterface.class.php
index d247054e29..4b2397f24a 100644
--- a/main/Utils/AMQP/AMQPInterface.class.php
+++ b/main/Utils/AMQP/AMQPInterface.class.php
@@ -13,20 +13,22 @@
 	 * AMQP stands for Advanced Message Queue Protocol, which is
 	 * an open standard middleware layer for message routing and queuing.
 	**/
+	namespace Onphp;
+
 	interface AMQPInterface
 	{
 		/**
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		**/
 		public function connect();
 
 		/**
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		**/
 		public function disconnect();
 		
 		/**
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		**/
 		public function reconnect();
 
@@ -36,21 +38,21 @@ public function reconnect();
 		public function isConnected();
 
 		/**
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		**/
 		public function getLink();
 
 
 		/**
 		 * @param integer $id
-		 * @throws WrongArgumentException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function createChannel($id);
 
 		/**
-		 * @throws MissingElementException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function getChannel($id);
 
@@ -62,14 +64,14 @@ public function getChannelList();
 
 		/**
 		 * @param integer $id
-		 * @throws MissingElementException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function dropChannel($id);
 
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		 */
 		public function getCredentials();
 
@@ -82,7 +84,7 @@ public function isAlive();
 
 		/**
 		 * @param bool $alive
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		 */
 		//public function setAlive($alive);
 	}
diff --git a/main/Utils/AMQP/AMQPOutgoingMessage.class.php b/main/Utils/AMQP/AMQPOutgoingMessage.class.php
index f6b2efd500..86789386ff 100644
--- a/main/Utils/AMQP/AMQPOutgoingMessage.class.php
+++ b/main/Utils/AMQP/AMQPOutgoingMessage.class.php
@@ -9,13 +9,15 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class AMQPOutgoingMessage extends AMQPBaseMessage
 	{
 		protected $mandatory = false;
 		protected $immediate = false;
 
 		/**
-		 * @return AMQPOutgoingMessage
+		 * @return \Onphp\AMQPOutgoingMessage
 		**/
 		public static function create()
 		{
@@ -33,7 +35,7 @@ public function getMandatory()
 		}
 
 		/**		 
-		 * @return AMQPOutgoingMessage
+		 * @return \Onphp\AMQPOutgoingMessage
 		**/
 		public function setMandatory($mandatory)
 		{
@@ -48,7 +50,7 @@ public function getImmediate()
 		}
 
 		/**
-		 * @return AMQPOutgoingMessage
+		 * @return \Onphp\AMQPOutgoingMessage
 		**/
 		public function setImmediate($immediate)
 		{
diff --git a/main/Utils/AMQP/AMQPPool.class.php b/main/Utils/AMQP/AMQPPool.class.php
index 088c5558b3..13daea84fa 100644
--- a/main/Utils/AMQP/AMQPPool.class.php
+++ b/main/Utils/AMQP/AMQPPool.class.php
@@ -12,13 +12,15 @@
 	/**
 	 * @todo BasePool implementations
 	**/
+	namespace Onphp;
+
 	final class AMQPPool extends Singleton implements Instantiatable
 	{
 		private $default = null;
 		private $pool = array();
 
 		/**
-		 * @return AMQPPool
+		 * @return \Onphp\AMQPPool
 		**/
 		public static function me()
 		{
@@ -26,7 +28,7 @@ public static function me()
 		}
 		
 		/**
-		 * @return AMQPPool
+		 * @return \Onphp\AMQPPool
 		**/
 		public function setDefault(AMQP $amqp)
 		{
@@ -36,7 +38,7 @@ public function setDefault(AMQP $amqp)
 		}
 
 		/**
-		 * @return AMQPPool
+		 * @return \Onphp\AMQPPool
 		**/
 		public function dropDefault()
 		{
@@ -46,8 +48,8 @@ public function dropDefault()
 		}
 
 		/**
-		 * @throws WrongArgumentException
-		 * @return AMQPPool
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\AMQPPool
 		**/
 		public function addLink($name, AMQP $amqp)
 		{
@@ -62,8 +64,8 @@ public function addLink($name, AMQP $amqp)
 		}
 
 		/**
-		 * @throws MissingElementException
-		 * @return AMQPPool
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQPPool
 		**/
 		public function dropLink($name)
 		{
@@ -78,8 +80,8 @@ public function dropLink($name)
 		}
 
 		/**
-		 * @throws MissingElementException
-		 * @return AMQP
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQP
 		**/
 		public function getLink($name = null)
 		{
@@ -110,7 +112,7 @@ public function getLink($name = null)
 		}
 
 		/**
-		 * @return AMQPPool
+		 * @return \Onphp\AMQPPool
 		**/
 		public function shutdown()
 		{
@@ -123,7 +125,7 @@ public function shutdown()
 		}
 
 		/**
-		 * @return AMQPPool
+		 * @return \Onphp\AMQPPool
 		**/
 		public function disconnect()
 		{
diff --git a/main/Utils/AMQP/AMQPProxyChannel.class.php b/main/Utils/AMQP/AMQPProxyChannel.class.php
index 96ff813281..e3505f2fe9 100644
--- a/main/Utils/AMQP/AMQPProxyChannel.class.php
+++ b/main/Utils/AMQP/AMQPProxyChannel.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * Base class modelling an AMQ channel
 	**/
+	namespace Onphp;
+
 	class AMQPProxyChannel implements AMQPChannelInterface
 	{
 		/**
-		 * @var AMQPChannelInterface
+		 * @var \Onphp\AMQPChannelInterface
 		 */
 		protected $channel = null;
 
@@ -33,7 +35,7 @@ public function isOpen()
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function open()
 		{
@@ -41,7 +43,7 @@ public function open()
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function close()
 		{
@@ -49,7 +51,7 @@ public function close()
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function exchangeDeclare($name, AMQPExchangeConfig $conf)
 		{
@@ -63,7 +65,7 @@ public function exchangeDeclare($name, AMQPExchangeConfig $conf)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function exchangeDelete($name, $ifUnused = false)
 		{
@@ -96,7 +98,7 @@ public function exchangeBind($destinationName, $sourceName, $routingKey)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function exchangeUnbind($destinationName, $sourceName, $routingKey)
 		{
@@ -132,7 +134,7 @@ public function queueDeclare($name, AMQPQueueConfig $conf)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueBind($name, $exchange, $routingKey)
 		{
@@ -154,7 +156,7 @@ public function queueBind($name, $exchange, $routingKey)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueUnbind($name, $exchange, $routingKey)
 		{
@@ -176,7 +178,7 @@ public function queueUnbind($name, $exchange, $routingKey)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queuePurge($name)
 		{
@@ -190,7 +192,7 @@ public function queuePurge($name)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueDelete($name)
 		{
@@ -204,7 +206,7 @@ public function queueDelete($name)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicPublish($exchange, $routingKey, AMQPOutgoingMessage $msg)
 		{
@@ -222,7 +224,7 @@ public function basicPublish($exchange, $routingKey, AMQPOutgoingMessage $msg)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicQos($prefetchSize, $prefetchCount)
 		{
@@ -236,7 +238,7 @@ public function basicQos($prefetchSize, $prefetchCount)
 		}
 
 		/**
-		 * @return AMQPIncomingMessage
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function basicGet($queue, $autoAck = true)
 		{
@@ -251,7 +253,7 @@ public function basicGet($queue, $autoAck = true)
 
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicAck($deliveryTag, $multiple = false)
 		{
@@ -265,7 +267,7 @@ public function basicAck($deliveryTag, $multiple = false)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicConsume($queue, $autoAck, AMQPConsumer $callback)
 		{
@@ -279,7 +281,7 @@ public function basicConsume($queue, $autoAck, AMQPConsumer $callback)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicCancel($consumerTag)
 		{
@@ -293,11 +295,11 @@ public function basicCancel($consumerTag)
 		}
 
 		/**
-		 * @throws AMQPServerException
-		 * @param Exception $e
-		 * @return AMQPProxyChannel
+		 * @throws \Onphp\AMQPServerException
+		 * @param \Exception $e
+		 * @return \Onphp\AMQPProxyChannel
 		 */
-		protected function transportReconnect(Exception $e)
+		protected function transportReconnect(\Exception $e)
 		{
 			$this->markAlive(false);
 
@@ -317,10 +319,10 @@ private function markAlive($alive = false)
 		}
 
 		/**
-		 * @return AMQPProxyChannel
-		 * @throws AMQPServerException
+		 * @return \Onphp\AMQPProxyChannel
+		 * @throws \Onphp\AMQPServerException
 		 */
-		private function reconnect(Exception $amqpException)
+		private function reconnect(\Exception $amqpException)
 		{
 			try {
 				$this->channel->getTransport()->
diff --git a/main/Utils/AMQP/AMQPQueueConfig.class.php b/main/Utils/AMQP/AMQPQueueConfig.class.php
index 8104dad7be..20c163ba98 100644
--- a/main/Utils/AMQP/AMQPQueueConfig.class.php
+++ b/main/Utils/AMQP/AMQPQueueConfig.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @see http://www.rabbitmq.com/amqp-0-9-1-quickref.html#queue.declare
 	**/
+	namespace Onphp;
+
 	final class AMQPQueueConfig extends AMQPBaseConfig
 	{
 		protected $exclusive = false;
 
 		/**
-		 * @return AMQPQueueConfig
+		 * @return \Onphp\AMQPQueueConfig
 		**/
 		public static function create()
 		{
@@ -31,7 +33,7 @@ public function getExclusive()
 
 		/**
 		 * @param boolean $exclusive
-		 * @return AMQPQueueConfig
+		 * @return \Onphp\AMQPQueueConfig
 		**/
 		public function setExclusive($exclusive)
 		{
diff --git a/main/Utils/AMQP/AMQPQueueConsumer.class.php b/main/Utils/AMQP/AMQPQueueConsumer.class.php
index f30a311377..141a8d8974 100644
--- a/main/Utils/AMQP/AMQPQueueConsumer.class.php
+++ b/main/Utils/AMQP/AMQPQueueConsumer.class.php
@@ -9,5 +9,7 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	class AMQPQueueConsumer extends AMQPDefaultConsumer {/**/}
 ?>
\ No newline at end of file
diff --git a/main/Utils/AMQP/AMQPSelective.class.php b/main/Utils/AMQP/AMQPSelective.class.php
index ee44c1aa58..6b4bc1a175 100644
--- a/main/Utils/AMQP/AMQPSelective.class.php
+++ b/main/Utils/AMQP/AMQPSelective.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class AMQPSelective implements AMQPInterface
 	{
 		/**
@@ -19,7 +21,7 @@ final class AMQPSelective implements AMQPInterface
 		/**
 		 * @var string
 		 */
-		protected static $proxy = 'AMQPProxyChannel';
+		protected static $proxy = '\Onphp\AMQPProxyChannel';
 
 		/**
 		 * @var sting
@@ -44,8 +46,8 @@ public static function setProxy($proxy)
 		}
 
 		/**
-		 * @param AMQPPool $pool
-		 * @return AMQPSelective
+		 * @param \Onphp\AMQPPool $pool
+		 * @return \Onphp\AMQPSelective
 		 */
 		public function addPool(AMQPPool $pool)
 		{
@@ -60,8 +62,8 @@ public function addPool(AMQPPool $pool)
 		}
 
 		/**
-		 * @throws WrongArgumentException
-		 * @return AMQPPool
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\AMQPPool
 		**/
 		public function addLink($name, AMQP $amqp)
 		{
@@ -79,8 +81,8 @@ public function addLink($name, AMQP $amqp)
 		}
 
 		/**
-		 * @throws MissingElementException
-		 * @return AMQPPool
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQPPool
 		**/
 		public function dropLink($name)
 		{
@@ -98,8 +100,8 @@ public function dropLink($name)
 
 		/**
 		 * @param integer $id
-		 * @throws WrongArgumentException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function createChannel($id)
 		{
@@ -126,8 +128,8 @@ public function createChannel($id)
 		}
 
 		/**
-		 * @throws MissingElementException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function getChannel($id)
 		{
@@ -149,8 +151,8 @@ public function getChannelList()
 
 		/**
 		 * @param integer $id
-		 * @throws MissingElementException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function dropChannel($id)
 		{
@@ -167,8 +169,8 @@ public function dropChannel($id)
 		}
 
 		/**
-		 * @return AMQPInterface
-		 * @throws AMQPServerConnectionException
+		 * @return \Onphp\AMQPInterface
+		 * @throws \Onphp\AMQPServerConnectionException
 		 */
 		public function connect()
 		{
@@ -176,7 +178,7 @@ public function connect()
 		}
 
 		/**
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		**/
 		public function disconnect()
 		{
@@ -184,7 +186,7 @@ public function disconnect()
 		}
 
 		/**
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		**/
 		public function reconnect()
 		{
@@ -201,7 +203,7 @@ public function isConnected()
 
 
 		/**
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		**/
 		public function getLink()
 		{
@@ -209,7 +211,7 @@ public function getLink()
 		}
 
 		/**
-		 * @return AMQPCredentials
+		 * @return \Onphp\AMQPCredentials
 		 */
 		public function getCredentials()
 		{
@@ -227,7 +229,7 @@ public function isAlive()
 
 		/**
 		 * @param bool $alive
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		 */
 		public function setAlive($alive)
 		{
@@ -236,7 +238,7 @@ public function setAlive($alive)
 
 
 		/**
-		 * @throws WrongArgumentException
+		 * @throws \Onphp\WrongArgumentException
 		 * @param string $method
 		 * @return mixed
 		 */
@@ -260,7 +262,7 @@ protected function processMethod($method/*, $args*/)
 		}
 
 		/**
-		 * @throws WrongArgumentException
+		 * @throws \Onphp\WrongArgumentException
 		 * @return string
 		 */
 		public function getAlive()
@@ -275,7 +277,7 @@ public function getAlive()
 
 		/**
 		 * @param string $name
-		 * @return AMQPSelective
+		 * @return \Onphp\AMQPSelective
 		 */
 		public function setCurrent($name)
 		{
@@ -288,7 +290,7 @@ public function setCurrent($name)
 
 		/**
 		 * @thows WrongArgumentException
-		 * @return AMQPInterface
+		 * @return \Onphp\AMQPInterface
 		 */
 		protected function getCurrentItem()
 		{
diff --git a/main/Utils/AMQP/Exceptions/AMQPServerConnectionException.class.php b/main/Utils/AMQP/Exceptions/AMQPServerConnectionException.class.php
index 6dae88cf33..55c272076e 100644
--- a/main/Utils/AMQP/Exceptions/AMQPServerConnectionException.class.php
+++ b/main/Utils/AMQP/Exceptions/AMQPServerConnectionException.class.php
@@ -9,5 +9,7 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	class AMQPServerConnectionException extends AMQPServerException {/**/}
 ?>
\ No newline at end of file
diff --git a/main/Utils/AMQP/Exceptions/AMQPServerException.class.php b/main/Utils/AMQP/Exceptions/AMQPServerException.class.php
index 453cb231d2..1e29008573 100644
--- a/main/Utils/AMQP/Exceptions/AMQPServerException.class.php
+++ b/main/Utils/AMQP/Exceptions/AMQPServerException.class.php
@@ -9,5 +9,7 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	class AMQPServerException extends BaseException {/**/}
 ?>
\ No newline at end of file
diff --git a/main/Utils/AMQP/Pecl/AMQPPecl.class.php b/main/Utils/AMQP/Pecl/AMQPPecl.class.php
index 3ba4e64d2f..bb994e9ecc 100644
--- a/main/Utils/AMQP/Pecl/AMQPPecl.class.php
+++ b/main/Utils/AMQP/Pecl/AMQPPecl.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @see http://www.php.net/manual/en/book.amqp.php
 	**/
+	namespace Onphp;
+
 	final class AMQPPecl extends AMQP
 	{
 		public function __construct(AMQPCredentials $credentials)
@@ -28,14 +30,14 @@ public function isConnected()
 		{
 			try {
 				return $this->link->isConnected();
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				return false;
 			}
 		}
 
 		/**
-		 * @throws AMQPServerConnectionException
-		 * @return AMQP
+		 * @throws \Onphp\AMQPServerConnectionException
+		 * @return \Onphp\AMQP
 		**/
 		public function connect()
 		{
@@ -45,7 +47,7 @@ public function connect()
 
 				$this->link->connect();
 
-			} catch (AMQPConnectionException $e) {
+			} catch (\AMQPConnectionException $e) {
 				$this->alive = false;
 
 				throw new AMQPServerConnectionException(
@@ -59,15 +61,15 @@ public function connect()
 		}
 
 		/**
-		 * @throws AMQPServerConnectionException
-		 * @return AMQP
+		 * @throws \Onphp\AMQPServerConnectionException
+		 * @return \Onphp\AMQP
 		**/
 		public function reconnect()
 		{
 			try {
 				$this->link->reconnect();
 				return $this;
-			} catch (AMQPConnectionException $e) {
+			} catch (\AMQPConnectionException $e) {
 				$this->alive = false;
 
 				throw new AMQPServerConnectionException(
@@ -79,8 +81,8 @@ public function reconnect()
 		}
 		
 		/**
-		 * @throws AMQPServerConnectionException
-		 * @return AMQP
+		 * @throws \Onphp\AMQPServerConnectionException
+		 * @return \Onphp\AMQP
 		**/
 		public function disconnect()
 		{
@@ -89,7 +91,7 @@ public function disconnect()
 					$this->link->disconnect();
 					return $this;
 				}
-			} catch (AMQPConnectionException $e) {
+			} catch (\AMQPConnectionException $e) {
 				$this->alive = false;
 				
 				throw new AMQPServerConnectionException(
@@ -102,8 +104,8 @@ public function disconnect()
 
 		/**
 		 * @param mixed $id
-		 * @param AMQPInterface $transport
-		 * @return AMQPPeclChannel
+		 * @param \Onphp\AMQPInterface $transport
+		 * @return \Onphp\AMQPPeclChannel
 		**/
 		public function spawnChannel($id, AMQPInterface $transport)
 		{
@@ -111,11 +113,11 @@ public function spawnChannel($id, AMQPInterface $transport)
 		}
 
 		/**
-		 * @return AMQPPecl
+		 * @return \Onphp\AMQPPecl
 		**/
 		protected function fillCredentials()
 		{
-			$this->link = new AMQPConnection();
+			$this->link = new \AMQPConnection();
 			$this->link->setHost($this->credentials->getHost());
 			$this->link->setPort($this->credentials->getPort());
 			$this->link->setLogin($this->credentials->getLogin());
diff --git a/main/Utils/AMQP/Pecl/AMQPPeclBaseBitmask.class.php b/main/Utils/AMQP/Pecl/AMQPPeclBaseBitmask.class.php
index 4fb071bf9a..3b259d490a 100644
--- a/main/Utils/AMQP/Pecl/AMQPPeclBaseBitmask.class.php
+++ b/main/Utils/AMQP/Pecl/AMQPPeclBaseBitmask.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 	
+	namespace Onphp;
+
 	abstract class AMQPPeclBaseBitmask implements AMQPBitmaskResolver
 	{
 		public function getBitmask($config)
diff --git a/main/Utils/AMQP/Pecl/AMQPPeclChannel.class.php b/main/Utils/AMQP/Pecl/AMQPPeclChannel.class.php
index b99cc5e188..00a593fca9 100644
--- a/main/Utils/AMQP/Pecl/AMQPPeclChannel.class.php
+++ b/main/Utils/AMQP/Pecl/AMQPPeclChannel.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class AMQPPeclChannel extends AMQPBaseChannel
 	{
 		const NIL = 'nil';
@@ -20,12 +22,12 @@ final class AMQPPeclChannel extends AMQPBaseChannel
 
 
         /**
-         * @var AMQPChannel
+         * @var \AMQPChannel
          */
         protected $link = null;
 
 		/**
-		 * @var AMQPConsumer
+		 * @var \Onphp\AMQPConsumer
 		**/
 		protected $consumer = null;
 
@@ -40,7 +42,7 @@ public function isOpen()
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function open()
 		{
@@ -50,7 +52,7 @@ public function open()
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function close()
 		{
@@ -60,10 +62,10 @@ public function close()
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
 		 * @param sting $deliveryTag
 		 * @param bool $multiple
-		 * @return AMQPPeclChannel
+		 * @return \Onphp\AMQPPeclChannel
 		 */
 		public function basicAck($deliveryTag, $multiple = false)
 		{
@@ -75,7 +77,7 @@ public function basicAck($deliveryTag, $multiple = false)
 						? AMQP_MULTIPLE
 						: self::AMQP_NONE
 				);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -97,7 +99,7 @@ public function basicAck($deliveryTag, $multiple = false)
 		 * can't get $consumerTag
 		 * @throws AMQPServerQueueException|AMQPServerConnectionException|WrongStateException
 		 * @param string $consumerTag
-		 * @return AMQPPeclChannel
+		 * @return \Onphp\AMQPPeclChannel
 		 */
 		public function basicCancel($consumerTag)
 		{
@@ -109,7 +111,7 @@ public function basicCancel($consumerTag)
 
 				$result = $obj->cancel($consumerTag);
 
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 				
 				throw new AMQPServerException(
@@ -128,11 +130,11 @@ public function basicCancel($consumerTag)
 		}
 
 		/**
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function basicConsume($queue, $autoAck, AMQPConsumer $callback)
 		{
-			Assert::isInstance($callback, 'AMQPPeclQueueConsumer');
+			Assert::isInstance($callback, '\Onphp\AMQPPeclQueueConsumer');
 
 			try {
 				$this->consumer = $callback->
@@ -154,7 +156,7 @@ public function basicConsume($queue, $autoAck, AMQPConsumer $callback)
 						? AMQP_AUTOACK
 						: self::AMQP_NONE
 				);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -168,8 +170,8 @@ public function basicConsume($queue, $autoAck, AMQPConsumer $callback)
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException|ObjectNotFoundException
-		 * @return AMQPIncomingMessage
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException|ObjectNotFoundException
+		 * @return \Onphp\AMQPIncomingMessage
 		**/
 		public function basicGet($queue, $autoAck = true)
 		{
@@ -180,7 +182,7 @@ public function basicGet($queue, $autoAck = true)
 						? AMQP_AUTOACK
 						: self::AMQP_NONE
 				);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -202,8 +204,8 @@ public function basicGet($queue, $autoAck = true)
 		 * @throws AMQPServerExchangeException|AMQPServerConnectionException
 		 * @param string $exchange
 		 * @param string $routingKey
-		 * @param AMQPOutgoingMessage $msg
-		 * @return AMQPPeclChannel
+		 * @param \Onphp\AMQPOutgoingMessage $msg
+		 * @return \Onphp\AMQPPeclChannel
 		 */
 		public function basicPublish(
 			$exchange, $routingKey, AMQPOutgoingMessage $msg
@@ -217,7 +219,7 @@ public function basicPublish(
 					$msg->getBitmask(new AMQPPeclOutgoingMessageBitmask()),
 					$msg->getProperties()
 				);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -238,7 +240,7 @@ public function basicPublish(
 		/**
 		 * @param int $prefetchSize
 		 * @param int $prefetchCount
-		 * @return AMQPPeclChannel
+		 * @return \Onphp\AMQPPeclChannel
 		 */
 		public function basicQos($prefetchSize, $prefetchCount)
 		{
@@ -247,7 +249,7 @@ public function basicQos($prefetchSize, $prefetchCount)
 					$prefetchSize,
 					$prefetchCount
 				);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -266,11 +268,11 @@ public function basicQos($prefetchSize, $prefetchCount)
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
 		 * @param string $destinationName
 		 * @param string $sourceName
 		 * @param string $routingKey
-		 * @return AMQPPeclChannel
+		 * @return \Onphp\AMQPPeclChannel
 		 */
 		public function exchangeBind($destinationName, $sourceName, $routingKey)
 		{
@@ -281,7 +283,7 @@ public function exchangeBind($destinationName, $sourceName, $routingKey)
 					$sourceName,
 					$routingKey
 				);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -305,10 +307,10 @@ public function exchangeUnbind($destinationName, $sourceName, $routingKey)
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
 		 * @param string $name
-		 * @param AMQPExchangeConfig $conf
-		 * @return AMQPPeclChannel
+		 * @param \Onphp\AMQPExchangeConfig $conf
+		 * @return \Onphp\AMQPPeclChannel
 		 */
 		public function exchangeDeclare($name, AMQPExchangeConfig $conf)
 		{
@@ -321,7 +323,7 @@ public function exchangeDeclare($name, AMQPExchangeConfig $conf)
 
 			try {
 				$this->exchangeList[$name] =
-					new AMQPExchange($this->getChannelLink());
+					new \AMQPExchange($this->getChannelLink());
 
 				$obj = $this->exchangeList[$name];
 
@@ -333,7 +335,7 @@ public function exchangeDeclare($name, AMQPExchangeConfig $conf)
 				$obj->setArguments($conf->getArguments());
 
 				$result = $obj->declare();
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -352,8 +354,8 @@ public function exchangeDeclare($name, AMQPExchangeConfig $conf)
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function exchangeDelete(
 			$name, $ifUnused = false
@@ -366,7 +368,7 @@ public function exchangeDelete(
 			try {
 				$obj = $this->lookupExchange($name);
 				$result = $obj->delete($name, $bitmask);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -387,15 +389,15 @@ public function exchangeDelete(
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueBind($name, $exchange, $routingKey)
 		{
 			try {
 				$obj = $this->lookupQueue($name);
 				$result = $obj->bind($exchange, $routingKey);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -414,7 +416,7 @@ public function queueBind($name, $exchange, $routingKey)
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
 		 * @return integer - the message count in queue
 		**/
 		public function queueDeclare($name, AMQPQueueConfig $conf)
@@ -426,7 +428,7 @@ public function queueDeclare($name, AMQPQueueConfig $conf)
 					unset($this->queueList[$name]);
 				
 				$this->queueList[$name] =
-					new AMQPQueue($this->getChannelLink());
+					new \AMQPQueue($this->getChannelLink());
 
 				$obj = $this->queueList[$name];
 				$obj->setName($name);
@@ -436,7 +438,7 @@ public function queueDeclare($name, AMQPQueueConfig $conf)
 				$obj->setArguments($conf->getArguments());
 				
 				$result = $obj->declare();
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -455,15 +457,15 @@ public function queueDeclare($name, AMQPQueueConfig $conf)
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueDelete($name)
 		{
 			try {
 				$obj = $this->lookupQueue($name);
 				$result = $obj->delete();
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -484,15 +486,15 @@ public function queueDelete($name)
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queuePurge($name)
 		{
 			try {
 				$obj = $this->lookupQueue($name);
 				$result = $obj->purge();
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 
 				throw new AMQPServerException(
@@ -511,15 +513,15 @@ public function queuePurge($name)
 		}
 
 		/**
-		 * @throws AMQPServerException|AMQPServerConnectionException
-		 * @return AMQPChannelInterface
+		 * @throws \Onphp\AMQPServerException|AMQPServerConnectionException
+		 * @return \Onphp\AMQPChannelInterface
 		**/
 		public function queueUnbind($name, $exchange, $routingKey)
 		{
 			try {
 				$obj = $this->lookupQueue($name);
 				$result = $obj->unbind($exchange, $routingKey);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->clearConnection();
 				
 				throw new AMQPServerException(
@@ -538,8 +540,8 @@ public function queueUnbind($name, $exchange, $routingKey)
 		}
 
 		/**
-		 * @throws AMQPServerConnectionException
-		 * @return AMQPExchange
+		 * @throws \Onphp\AMQPServerConnectionException
+		 * @return \AMQPExchange
 		**/
 		protected function lookupExchange($name)
 		{
@@ -547,7 +549,7 @@ protected function lookupExchange($name)
 
 			if (!isset($this->exchangeList[$name])) {
 				$this->exchangeList[$name] =
-					new AMQPExchange($this->getChannelLink());
+					new \AMQPExchange($this->getChannelLink());
 				$this->exchangeList[$name]->setName($name);
 			}
 
@@ -555,7 +557,7 @@ protected function lookupExchange($name)
 		}
 
 		/**
-		 * @return AMQPPeclChannel
+		 * @return \Onphp\AMQPPeclChannel
 		**/
 		protected function unsetExchange($name)
 		{
@@ -566,15 +568,15 @@ protected function unsetExchange($name)
 		}
 
 		/**
-		 * @throws AMQPServerConnectionException
-		 * @return AMQPQueue
+		 * @throws \Onphp\AMQPServerConnectionException
+		 * @return \AMQPQueue
 		**/
 		protected function lookupQueue($name)
 		{
 			$this->checkConnection();
 
 			if (!isset($this->queueList[$name])) {
-				$this->queueList[$name] = new AMQPQueue($this->getChannelLink());
+				$this->queueList[$name] = new \AMQPQueue($this->getChannelLink());
 				if ($name != self::NIL)
 						$this->queueList[$name]->setName($name);
 			}
@@ -583,7 +585,7 @@ protected function lookupQueue($name)
 		}
 
 		/**
-		 * @return AMQPPeclChannel
+		 * @return \Onphp\AMQPPeclChannel
 		**/
 		protected function unsetQueue($name)
 		{
@@ -594,8 +596,8 @@ protected function unsetQueue($name)
 		}
 
 		/**
-		 * @throws AMQPServerConnectionException
-		 * @return AMQPPeclChannel
+		 * @throws \Onphp\AMQPServerConnectionException
+		 * @return \Onphp\AMQPPeclChannel
 		**/
 		protected function checkCommandResult($boolean, $message)
 		{
@@ -622,7 +624,7 @@ protected function clearConnection()
 		protected function getChannelLink()
 		{
 			if (!$this->link) {
-				$this->link = new AMQPChannel(
+				$this->link = new \AMQPChannel(
 					$this->getTransport()->getLink()
 				);
 			}
@@ -632,7 +634,7 @@ protected function getChannelLink()
 
 		/**
 		 * we dont know if connection is boken until request is made
-		 * @return AMQPPeclChannel
+		 * @return \Onphp\AMQPPeclChannel
 		 */
 		protected function checkConnection()
 		{
diff --git a/main/Utils/AMQP/Pecl/AMQPPeclExchangeBitmask.class.php b/main/Utils/AMQP/Pecl/AMQPPeclExchangeBitmask.class.php
index a1c092347a..e990e7ad40 100644
--- a/main/Utils/AMQP/Pecl/AMQPPeclExchangeBitmask.class.php
+++ b/main/Utils/AMQP/Pecl/AMQPPeclExchangeBitmask.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @see http://www.php.net/manual/en/amqp.constants.php
 	**/
+	namespace Onphp;
+
 	final class AMQPPeclExchangeBitmask extends AMQPPeclBaseBitmask
 	{
 		public function getBitmask($config)
 		{
-			Assert::isInstance($config, 'AMQPExchangeConfig');
+			Assert::isInstance($config, '\Onphp\AMQPExchangeConfig');
 
 			$bitmask = parent::getBitmask($config);
 
diff --git a/main/Utils/AMQP/Pecl/AMQPPeclIncomingMessageAdapter.class.php b/main/Utils/AMQP/Pecl/AMQPPeclIncomingMessageAdapter.class.php
index 7ad1991941..ac565515fd 100644
--- a/main/Utils/AMQP/Pecl/AMQPPeclIncomingMessageAdapter.class.php
+++ b/main/Utils/AMQP/Pecl/AMQPPeclIncomingMessageAdapter.class.php
@@ -9,13 +9,15 @@
  *                                                                         *
  ***************************************************************************/
 
+namespace Onphp;
+
 final class AMQPPeclIncomingMessageAdapter extends StaticFactory
 {
 	/**
-	 * @param AMQPEnvelope $incoming
-	 * @return AMQPIncomingMessage
+	 * @param \AMQPEnvelope $incoming
+	 * @return \Onphp\AMQPIncomingMessage
 	 */
-	public static function convert(AMQPEnvelope $incoming)
+	public static function convert(\AMQPEnvelope $incoming)
 	{
 		$data = array(
 			AMQPIncomingMessage::APP_ID => $incoming->getAppId(),
diff --git a/main/Utils/AMQP/Pecl/AMQPPeclOutgoingMessageBitmask.class.php b/main/Utils/AMQP/Pecl/AMQPPeclOutgoingMessageBitmask.class.php
index f42cbfdc9d..f7b6b2ad5e 100644
--- a/main/Utils/AMQP/Pecl/AMQPPeclOutgoingMessageBitmask.class.php
+++ b/main/Utils/AMQP/Pecl/AMQPPeclOutgoingMessageBitmask.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @see http://www.php.net/manual/en/amqp.constants.php
 	**/
+	namespace Onphp;
+
 	final class AMQPPeclOutgoingMessageBitmask implements AMQPBitmaskResolver
 	{
 		public function getBitmask($config)
 		{
-			Assert::isInstance($config, 'AMQPOutgoingMessage');
+			Assert::isInstance($config, '\Onphp\AMQPOutgoingMessage');
 
 			$bitmask = 0;
 
diff --git a/main/Utils/AMQP/Pecl/AMQPPeclQueueBitmask.class.php b/main/Utils/AMQP/Pecl/AMQPPeclQueueBitmask.class.php
index e41901d743..ca04afae2b 100644
--- a/main/Utils/AMQP/Pecl/AMQPPeclQueueBitmask.class.php
+++ b/main/Utils/AMQP/Pecl/AMQPPeclQueueBitmask.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @see http://www.php.net/manual/en/amqp.constants.php
 	**/
+	namespace Onphp;
+
 	final class AMQPPeclQueueBitmask extends AMQPPeclBaseBitmask
 	{
 		public function getBitmask($config)
 		{
-			Assert::isInstance($config, 'AMQPQueueConfig');
+			Assert::isInstance($config, '\Onphp\AMQPQueueConfig');
 
 			$bitmask = parent::getBitmask($config);
 
diff --git a/main/Utils/AMQP/Pecl/AMQPPeclQueueConsumer.class.php b/main/Utils/AMQP/Pecl/AMQPPeclQueueConsumer.class.php
index ab03fc3ef0..af1fff9427 100644
--- a/main/Utils/AMQP/Pecl/AMQPPeclQueueConsumer.class.php
+++ b/main/Utils/AMQP/Pecl/AMQPPeclQueueConsumer.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class AMQPPeclQueueConsumer extends AMQPDefaultConsumer
 	{
 		protected $cancel = false;
@@ -17,7 +19,7 @@ abstract class AMQPPeclQueueConsumer extends AMQPDefaultConsumer
 
 		/**
 		 * @param type $cancel
-		 * @return AMQPPeclQueueConsumer
+		 * @return \Onphp\AMQPPeclQueueConsumer
 		 */
 		public function setCancel($cancel)
 		{
@@ -27,7 +29,7 @@ public function setCancel($cancel)
 
 		/**
 		 * @param int $limit
-		 * @return AMQPPeclQueueConsumer
+		 * @return \Onphp\AMQPPeclQueueConsumer
 		 */
 		public function setLimit($limit)
 		{
@@ -43,7 +45,7 @@ public function getCount()
 			return $this->count;
 		}
 
-		public function handlePeclDelivery(AMQPEnvelope $delivery, AMQPQueue $queue = null)
+		public function handlePeclDelivery(\AMQPEnvelope $delivery, \AMQPQueue $queue = null)
 		{
 			$this->count++;
 
diff --git a/main/Utils/Archivers/ArchiverException.class.php b/main/Utils/Archivers/ArchiverException.class.php
index 0bbed0b90d..e97849c020 100644
--- a/main/Utils/Archivers/ArchiverException.class.php
+++ b/main/Utils/Archivers/ArchiverException.class.php
@@ -12,5 +12,7 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	class ArchiverException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/main/Utils/Archivers/FileArchive.class.php b/main/Utils/Archivers/FileArchive.class.php
index 34df1df319..87d4f2a64f 100644
--- a/main/Utils/Archivers/FileArchive.class.php
+++ b/main/Utils/Archivers/FileArchive.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	abstract class FileArchive
 	{
 		protected $cmdBinPath	= null;
@@ -32,7 +34,7 @@ public function __construct($cmdBinPath = null)
 		}
 		
 		/**
-		 * @return FileArchive
+		 * @return \Onphp\FileArchive
 		**/
 		public function open($sourceFile)
 		{
diff --git a/main/Utils/Archivers/InfoZipArchive.class.php b/main/Utils/Archivers/InfoZipArchive.class.php
index bd65b9c453..e25af3f77b 100644
--- a/main/Utils/Archivers/InfoZipArchive.class.php
+++ b/main/Utils/Archivers/InfoZipArchive.class.php
@@ -16,6 +16,8 @@
 	 *
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class InfoZipArchive extends FileArchive
 	{
 		private $zipArchive = null;
@@ -24,9 +26,9 @@ public function __construct($cmdBinPath = '/usr/bin/unzip')
 		{
 			$usingCmd = $cmdBinPath;
 			
-			if (class_exists('ZipArchive', false)) {
+			if (class_exists('\ZipArchive', false)) {
 				
-				$this->zipArchive = new ZipArchive();
+				$this->zipArchive = new \ZipArchive();
 				$usingCmd = null;
 				
 			} elseif ($usingCmd === null)
diff --git a/main/Utils/Archivers/TarArchive.class.php b/main/Utils/Archivers/TarArchive.class.php
index ec3f8835c9..aedbba4a4a 100644
--- a/main/Utils/Archivers/TarArchive.class.php
+++ b/main/Utils/Archivers/TarArchive.class.php
@@ -16,6 +16,8 @@
 	 *
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class TarArchive extends FileArchive
 	{
 		public function __construct($cmdBinPath = '/bin/tar')
diff --git a/main/Utils/ArrayUtils.class.php b/main/Utils/ArrayUtils.class.php
index 98a55839d5..a2acd1ab0c 100644
--- a/main/Utils/ArrayUtils.class.php
+++ b/main/Utils/ArrayUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class ArrayUtils extends StaticFactory
 	{
 		/// orders $objects list by $ids order
@@ -31,7 +33,7 @@ public static function regularizeList($ids, $objects)
 			return $result;
 		}
 		
-		public static function convertObjectList($list = null)
+		public static function convertObjectList($list = null, $getter = 'getId')
 		{
 			$out = array();
 			
@@ -39,7 +41,7 @@ public static function convertObjectList($list = null)
 				return $out;
 			
 			foreach ($list as $obj)
-				$out[$obj->getId()] = $obj;
+				$out[$obj->{$getter}()] = $obj;
 			
 			return $out;
 		}
@@ -52,7 +54,7 @@ public static function getIdsArray($objectsList)
 				return $out;
 			
 			Assert::isInstance(
-				current($objectsList), 'Identifiable',
+				current($objectsList), '\Onphp\Identifiable',
 				'only identifiable lists accepted'
 			);
 			
diff --git a/main/Utils/ClassUtils.class.php b/main/Utils/ClassUtils.class.php
index c290bd70bb..b3d06a0887 100644
--- a/main/Utils/ClassUtils.class.php
+++ b/main/Utils/ClassUtils.class.php
@@ -12,15 +12,17 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class ClassUtils extends StaticFactory
 	{
-		const CLASS_NAME_PATTERN = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*';
+		const CLASS_NAME_PATTERN = '[a-zA-Z_\x7f-\xff\\\\][a-zA-Z0-9_\x7f-\xff\\\\]*';
 		
 		/* void */ public static function copyProperties($source, $destination)
 		{
 			Assert::isEqual(get_class($source), get_class($destination));
 			
-			$class = new ReflectionClass($source);
+			$class = new \ReflectionClass($source);
 			
 			foreach ($class->getProperties() as $property) {
 				$name = ucfirst($property->getName());
@@ -54,7 +56,7 @@ final class ClassUtils extends StaticFactory
 		{
 			Assert::isTrue(get_class($source) == get_class($destination));
 			
-			$class = new ReflectionClass($source);
+			$class = new \ReflectionClass($source);
 			
 			foreach ($class->getProperties() as $property) {
 				$name = ucfirst($property->getName());
@@ -76,7 +78,7 @@ final class ClassUtils extends StaticFactory
 		{
 			Assert::isTrue(get_class($source) == get_class($destination));
 			
-			$class = new ReflectionClass($source);
+			$class = new \ReflectionClass($source);
 			
 			foreach ($class->getProperties() as $property) {
 				$name = ucfirst($property->getName());
@@ -133,9 +135,9 @@ public static function isClassImplements($what)
 		public static function isInstanceOf($object, $class)
 		{
 			if (is_object($class)) {
-				$className = get_class($class);
+				$className = self::normalClassName($class);
 			} elseif (is_string($class)) {
-				$className = $class;
+				$className = self::normalClassName($class);
 			} else {
 				throw new WrongArgumentException('strange class given');
 			}
@@ -144,6 +146,7 @@ public static function isInstanceOf($object, $class)
 				is_string($object)
 				&& self::isClassName($object)
 			) {
+				$object = self::normalClassName($object);
 				if ($object == $className)
 					return true;
 				elseif (is_subclass_of($object, $className))
@@ -181,10 +184,11 @@ public static function checkStaticMethod($methodSignature)
 				throw new WrongArgumentException('incorrect method signature');
 			
 			list($className, $methodName) = $nameParts;
+			$className = self::normalClassName($className);
 			
 			try {
-				$class = new ReflectionClass($className);
-			} catch (ReflectionException $e) {
+				$class = new \ReflectionClass($className);
+			} catch (\ReflectionException $e) {
 				throw new ClassNotFoundException($className);
 			}
 			
@@ -207,6 +211,24 @@ public static function checkStaticMethod($methodSignature)
 			
 			return $nameParts;
 		}
+
+		/**
+		 * @param mixed $className can be string or object
+		 * @return string
+		 * @throws WrongStateException
+		 */
+		public static function normalClassName($className)
+		{
+			if (is_object($className)) {
+				$className = get_class($className);
+			} elseif (!is_scalar($className)) {
+				throw new WrongStateException(
+					'Undefined argument passed - not scalar and not object'
+				);
+			}
+			
+			return '\\'.ltrim($className, '\\');
+		}
 		
 		/* void */ public static function preloadAllClasses()
 		{
diff --git a/main/Utils/CommandLine/ArgumentParser.class.php b/main/Utils/CommandLine/ArgumentParser.class.php
index dc651189ef..4fc1f6a8b8 100644
--- a/main/Utils/CommandLine/ArgumentParser.class.php
+++ b/main/Utils/CommandLine/ArgumentParser.class.php
@@ -9,13 +9,15 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class ArgumentParser extends Singleton
 	{
 		private $form = null;
 		private $result = null;
 		
 		/**
-		 * @return ArgumentParser
+		 * @return \Onphp\ArgumentParser
 		**/
 		public static function me()
 		{
@@ -23,7 +25,7 @@ public static function me()
 		}
 		
 		/**
-		 * @return ArgumentParser
+		 * @return \Onphp\ArgumentParser
 		**/
 		public function setForm(Form $form)
 		{
@@ -33,7 +35,7 @@ public function setForm(Form $form)
 		}
 		
 		/**
-		 * @return Form
+		 * @return \Onphp\Form
 		**/
 		public function getForm()
 		{
@@ -41,7 +43,7 @@ public function getForm()
 		}
 		
 		/**
-		 * @return ArgumentParser
+		 * @return \Onphp\ArgumentParser
 		**/
 		public function parse()
 		{
@@ -64,7 +66,7 @@ public function parse()
 		}
 		
 		/**
-		 * @return ArgumentParser
+		 * @return \Onphp\ArgumentParser
 		**/
 		public function validate()
 		{
diff --git a/main/Utils/CommandLine/FormToArgumentsConverter.class.php b/main/Utils/CommandLine/FormToArgumentsConverter.class.php
index d1fa83e78e..030660fac6 100644
--- a/main/Utils/CommandLine/FormToArgumentsConverter.class.php
+++ b/main/Utils/CommandLine/FormToArgumentsConverter.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class FormToArgumentsConverter extends StaticFactory
 	{
 		public static function getShort(Form $form)
diff --git a/main/Utils/CommonDoctypeDeclaration.class.php b/main/Utils/CommonDoctypeDeclaration.class.php
index 6cd51bf6a0..d6a3f377ff 100644
--- a/main/Utils/CommonDoctypeDeclaration.class.php
+++ b/main/Utils/CommonDoctypeDeclaration.class.php
@@ -20,6 +20,8 @@
 	 * 
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class CommonDoctypeDeclaration extends DoctypeDeclaration
 	{
 		private $organization	= null;
@@ -31,7 +33,7 @@ final class CommonDoctypeDeclaration extends DoctypeDeclaration
 		private $language		= null;
 		
 		/**
-		 * @return CommonDoctypeDeclaration
+		 * @return \Onphp\CommonDoctypeDeclaration
 		**/
 		public static function create()
 		{
@@ -39,7 +41,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return CommonDoctypeDeclaration
+		 * @return \Onphp\CommonDoctypeDeclaration
 		**/
 		public function setOrganization($organization)
 		{
@@ -54,7 +56,7 @@ public function getOrganization()
 		}
 		
 		/**
-		 * @return CommonDoctypeDeclaration
+		 * @return \Onphp\CommonDoctypeDeclaration
 		**/
 		public function setType($type)
 		{
@@ -69,7 +71,7 @@ public function getType()
 		}
 		
 		/**
-		 * @return CommonDoctypeDeclaration
+		 * @return \Onphp\CommonDoctypeDeclaration
 		**/
 		public function setSubtype($subtype)
 		{
@@ -84,7 +86,7 @@ public function getSubtype()
 		}
 		
 		/**
-		 * @return CommonDoctypeDeclaration
+		 * @return \Onphp\CommonDoctypeDeclaration
 		**/
 		public function setVersion($version)
 		{
@@ -99,7 +101,7 @@ public function getVersion()
 		}
 		
 		/**
-		 * @return CommonDoctypeDeclaration
+		 * @return \Onphp\CommonDoctypeDeclaration
 		**/
 		public function setVariant($variant)
 		{
@@ -114,7 +116,7 @@ public function getVariant()
 		}
 		
 		/**
-		 * @return CommonDoctypeDeclaration
+		 * @return \Onphp\CommonDoctypeDeclaration
 		**/
 		public function setLanguage($language)
 		{
@@ -129,7 +131,7 @@ public function getLanguage()
 		}
 		
 		/**
-		 * @return CommonDoctypeDeclaration
+		 * @return \Onphp\CommonDoctypeDeclaration
 		**/
 		public function setFpi($fpi)
 		{
diff --git a/main/Utils/ContentTypeHeader.class.php b/main/Utils/ContentTypeHeader.class.php
index cc4e443594..f8fb887416 100644
--- a/main/Utils/ContentTypeHeader.class.php
+++ b/main/Utils/ContentTypeHeader.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class ContentTypeHeader
 	{
 		private $mediaType	= null;
diff --git a/main/Utils/CustomizableDaoSynchronizer.class.php b/main/Utils/CustomizableDaoSynchronizer.class.php
index 5043a0ff24..a32f79e01e 100644
--- a/main/Utils/CustomizableDaoSynchronizer.class.php
+++ b/main/Utils/CustomizableDaoSynchronizer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	class CustomizableDaoSynchronizer
 	{
 		protected $dryRun			= false;
@@ -31,7 +33,7 @@ class CustomizableDaoSynchronizer
 		private $totalDeleted		= 0;
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public static function create()
 		{
@@ -39,7 +41,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function setDryRun($dryRun)
 		{
@@ -54,7 +56,7 @@ public function isDryRun()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function setReallyDelete($reallyDelete)
 		{
@@ -69,7 +71,7 @@ public function isReallyDelete()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function setMaster(GenericDAO $master)
 		{
@@ -79,7 +81,7 @@ public function setMaster(GenericDAO $master)
 		}
 		
 		/**
-		 * @return GenericDAO
+		 * @return \Onphp\GenericDAO
 		**/
 		public function getMaster()
 		{
@@ -87,7 +89,7 @@ public function getMaster()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function setSlave(GenericDAO $slave)
 		{
@@ -97,7 +99,7 @@ public function setSlave(GenericDAO $slave)
 		}
 		
 		/**
-		 * @return GenericDAO
+		 * @return \Onphp\GenericDAO
 		**/
 		public function getSlave()
 		{
@@ -105,7 +107,7 @@ public function getSlave()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function setMasterKeyProperty($masterKeyProperty)
 		{
@@ -120,7 +122,7 @@ public function getMasterKeyProperty()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function setSlaveKeyProperty($slaveKeyProperty)
 		{
@@ -135,7 +137,7 @@ public function getSlaveKeyProperty()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function setMasterProjection(ObjectProjection $masterProjection)
 		{
@@ -145,7 +147,7 @@ public function setMasterProjection(ObjectProjection $masterProjection)
 		}
 		
 		/**
-		 * @return ObjectProjection
+		 * @return \Onphp\ObjectProjection
 		**/
 		public function getMasterProjection()
 		{
@@ -153,7 +155,7 @@ public function getMasterProjection()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function setSlaveProjection(ObjectProjection $slaveProjection)
 		{
@@ -163,7 +165,7 @@ public function setSlaveProjection(ObjectProjection $slaveProjection)
 		}
 		
 		/**
-		 * @return ObjectProjection
+		 * @return \Onphp\ObjectProjection
 		**/
 		public function getSlaveProjection()
 		{
@@ -171,7 +173,7 @@ public function getSlaveProjection()
 		}
 		
 		/**
-		 * @return CustomizableDaoSynchronizer
+		 * @return \Onphp\CustomizableDaoSynchronizer
 		**/
 		public function run()
 		{
diff --git a/main/Utils/CyrillicPairs.class.php b/main/Utils/CyrillicPairs.class.php
index 938370f08e..8cd9125b7d 100644
--- a/main/Utils/CyrillicPairs.class.php
+++ b/main/Utils/CyrillicPairs.class.php
@@ -15,6 +15,8 @@
 	 * 
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class CyrillicPairs extends StaticFactory
 	{
 		private static $table = array(
diff --git a/main/Utils/DaoIterator.class.php b/main/Utils/DaoIterator.class.php
index 871e341d32..9f1e08af64 100644
--- a/main/Utils/DaoIterator.class.php
+++ b/main/Utils/DaoIterator.class.php
@@ -12,7 +12,9 @@
 	/**
 	 * @ingroup Utils
 	**/
-	final class DaoIterator implements Iterator
+	namespace Onphp;
+
+	final class DaoIterator implements \Iterator
 	{
 		private $dao			= null;
 		private $projection		= null;
@@ -23,7 +25,7 @@ final class DaoIterator implements Iterator
 		private $chunk			= null;
 		private $offset			= 0;
 		
-		public function setDao(ProtoDao $dao)
+		public function setDao(ProtoDAO $dao)
 		{
 			$this->dao = $dao;
 			
@@ -31,7 +33,7 @@ public function setDao(ProtoDao $dao)
 		}
 		
 		/**
-		 * @return ProtoDao
+		 * @return \Onphp\ProtoDAO
 		**/
 		public function getDao()
 		{
@@ -46,7 +48,7 @@ public function setProjection(ObjectProjection $projection)
 		}
 		
 		/**
-		 * @return ObjectProjection
+		 * @return \Onphp\ObjectProjection
 		**/
 		public function getProjection()
 		{
diff --git a/main/Utils/DaoMoveHelper.class.php b/main/Utils/DaoMoveHelper.class.php
index 31cc799f88..26c41b9abe 100644
--- a/main/Utils/DaoMoveHelper.class.php
+++ b/main/Utils/DaoMoveHelper.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class DaoMoveHelper extends StaticFactory
 	{
 		private static $nullValue	= 0;
diff --git a/main/Utils/DaoSynchronizer.class.php b/main/Utils/DaoSynchronizer.class.php
index 97f96f3327..4e8f3eda85 100644
--- a/main/Utils/DaoSynchronizer.class.php
+++ b/main/Utils/DaoSynchronizer.class.php
@@ -14,10 +14,12 @@
 	 *
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	class DaoSynchronizer extends CustomizableDaoSynchronizer
 	{
 		/**
-		 * @return DaoSynchronizer
+		 * @return \Onphp\DaoSynchronizer
 		**/
 		public static function create()
 		{
@@ -25,21 +27,21 @@ public static function create()
 		}
 		
 		/**
-		 * @return DaoSynchronizer
+		 * @return \Onphp\DaoSynchronizer
 		**/
 		public function setMaster(GenericDAO $master)
 		{
-			Assert::isInstance($master, 'ProtoDAO');
+			Assert::isInstance($master, '\Onphp\ProtoDAO');
 			
 			return parent::setMaster($master);
 		}
 		
 		/**
-		 * @return DaoSynchronizer
+		 * @return \Onphp\DaoSynchronizer
 		**/
 		public function setSlave(GenericDAO $slave)
 		{
-			Assert::isInstance($slave, 'ProtoDAO');
+			Assert::isInstance($slave, '\Onphp\ProtoDAO');
 			
 			return parent::setSlave($slave);
 		}
diff --git a/main/Utils/DaoUtils.class.php b/main/Utils/DaoUtils.class.php
index 639a4ee4a6..429a336b91 100644
--- a/main/Utils/DaoUtils.class.php
+++ b/main/Utils/DaoUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class DaoUtils extends StaticFactory
 	{
 		private static $nullValue	= 0;
diff --git a/main/Utils/DateUtils.class.php b/main/Utils/DateUtils.class.php
index dfde220598..9048a0bd7c 100644
--- a/main/Utils/DateUtils.class.php
+++ b/main/Utils/DateUtils.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class DateUtils extends StaticFactory
 	{
 		public static function getAgeByBirthDate(
@@ -21,7 +23,7 @@ public static function getAgeByBirthDate(
 		)
 		{
 			if ($actualDate)
-				Assert::isInstance($actualDate, 'Date');
+				Assert::isInstance($actualDate, '\Onphp\Date');
 			else
 				$actualDate = Date::makeToday();
 			
@@ -64,7 +66,7 @@ public static function makeDatesListByRange(
 		{
 			$date = $unit->truncate($range->getStart());
 			
-			if ('Date' == get_class($range->getStart()))
+			if ('\Onphp\Date' == get_class($range->getStart()))
 				$date = Date::create($date->toStamp());
 			
 			$dates = array();
@@ -84,7 +86,7 @@ public static function makeDatesListByRange(
 		}
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public static function alignToSeconds(Timestamp $stamp, $seconds)
 		{
diff --git a/main/Utils/DebugUtils.class.php b/main/Utils/DebugUtils.class.php
index 3d14c16f22..32280e6d17 100644
--- a/main/Utils/DebugUtils.class.php
+++ b/main/Utils/DebugUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class DebugUtils extends StaticFactory
 	{
 		private static $memoryAccumulator = 0;
diff --git a/main/Utils/DoctypeDeclaration.class.php b/main/Utils/DoctypeDeclaration.class.php
index 4699848b84..a42fda386a 100644
--- a/main/Utils/DoctypeDeclaration.class.php
+++ b/main/Utils/DoctypeDeclaration.class.php
@@ -26,6 +26,8 @@
 	 * 
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	class DoctypeDeclaration
 	{
 		const SPACER_MASK			= '[ \r\n\t]';
@@ -44,7 +46,7 @@ class DoctypeDeclaration
 		private $uri			= null;
 		
 		/**
-		 * @return DoctypeDeclaration
+		 * @return \Onphp\DoctypeDeclaration
 		**/
 		public static function create()
 		{
@@ -52,7 +54,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return DoctypeDeclaration
+		 * @return \Onphp\DoctypeDeclaration
 		**/
 		public function setRootElement($rootElement)
 		{
@@ -67,7 +69,7 @@ public function getRootElement()
 		}
 		
 		/**
-		 * @return DoctypeDeclaration
+		 * @return \Onphp\DoctypeDeclaration
 		**/
 		public function setInline($isInline)
 		{
@@ -85,7 +87,7 @@ public function isInline()
 		}
 		
 		/**
-		 * @return DoctypeDeclaration
+		 * @return \Onphp\DoctypeDeclaration
 		**/
 		public function setPublic($isPublic)
 		{
@@ -108,7 +110,7 @@ public function isSystem()
 		}
 		
 		/**
-		 * @return DoctypeDeclaration
+		 * @return \Onphp\DoctypeDeclaration
 		**/
 		public function setDeclarations($declarations)
 		{
@@ -123,7 +125,7 @@ public function getDeclarations()
 		}
 		
 		/**
-		 * @return DoctypeDeclaration
+		 * @return \Onphp\DoctypeDeclaration
 		**/
 		public function setFpi($fpi)
 		{
@@ -138,7 +140,7 @@ public function getFpi()
 		}
 		
 		/**
-		 * @return DoctypeDeclaration
+		 * @return \Onphp\DoctypeDeclaration
 		**/
 		public function setUri($uri)
 		{
@@ -153,7 +155,7 @@ public function getUri()
 		}
 		
 		/**
-		 * @return DoctypeDeclaration
+		 * @return \Onphp\DoctypeDeclaration
 		 * 
 		 * sample argument: html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 		**/
diff --git a/main/Utils/FileUtils.class.php b/main/Utils/FileUtils.class.php
index b8f02a3de5..caf936e67e 100644
--- a/main/Utils/FileUtils.class.php
+++ b/main/Utils/FileUtils.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class FileUtils extends StaticFactory
 	{
 		/**
@@ -153,7 +155,7 @@ public static function makeUniqueLatinName($originalName)
 					);
 				}
 
-				$directoryIterator = new DirectoryIterator($directory);
+				$directoryIterator = new \DirectoryIterator($directory);
 				
 				foreach ($directoryIterator as $file) {
 					if ($file->isDot())
diff --git a/main/Utils/FullTextUtils.class.php b/main/Utils/FullTextUtils.class.php
index 06067b843a..636b2cdf9a 100644
--- a/main/Utils/FullTextUtils.class.php
+++ b/main/Utils/FullTextUtils.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class FullTextUtils extends StaticFactory
 	{
 		public static function lookup(
@@ -39,8 +41,8 @@ public static function lookupList(
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return SelectQuery
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\SelectQuery
 		**/
 		public static function makeFullTextQuery(
 			FullTextDAO $dao, Criteria $criteria, $string
diff --git a/main/Utils/IO/BufferedInputStream.class.php b/main/Utils/IO/BufferedInputStream.class.php
index 6dfe14b78a..587a3e4e63 100644
--- a/main/Utils/IO/BufferedInputStream.class.php
+++ b/main/Utils/IO/BufferedInputStream.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class BufferedInputStream extends InputStream
 	{
 		private $runAheadBytes	= 0;
@@ -31,7 +33,7 @@ public function __construct(InputStream $in)
 		}
 		
 		/**
-		 * @return BufferedInputStream
+		 * @return \Onphp\BufferedInputStream
 		**/
 		public static function create(InputStream $in)
 		{
@@ -39,7 +41,7 @@ public static function create(InputStream $in)
 		}
 		
 		/**
-		 * @return BufferedInputStream
+		 * @return \Onphp\BufferedInputStream
 		**/
 		public function close()
 		{
@@ -59,7 +61,7 @@ public function markSupported()
 		}
 		
 		/**
-		 * @return BufferedInputStream
+		 * @return \Onphp\BufferedInputStream
 		**/
 		public function mark()
 		{
@@ -69,7 +71,7 @@ public function mark()
 		}
 		
 		/**
-		 * @return BufferedInputStream
+		 * @return \Onphp\BufferedInputStream
 		**/
 		public function reset()
 		{
@@ -87,7 +89,7 @@ public function available()
 		}
 		
 		/**
-		 * @return BufferedInputStream
+		 * @return \Onphp\BufferedInputStream
 		**/
 		public function setRunAheadBytes($runAheadBytes)
 		{
diff --git a/main/Utils/IO/BufferedReader.class.php b/main/Utils/IO/BufferedReader.class.php
index 979e082f1f..f716e224f3 100644
--- a/main/Utils/IO/BufferedReader.class.php
+++ b/main/Utils/IO/BufferedReader.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class BufferedReader extends Reader
 	{
 		private $in				= null;
@@ -29,7 +31,7 @@ public function __construct(Reader $in)
 		}
 		
 		/**
-		 * @return BufferedReader
+		 * @return \Onphp\BufferedReader
 		**/
 		public static function create(Reader $in)
 		{
@@ -37,7 +39,7 @@ public static function create(Reader $in)
 		}
 		
 		/**
-		 * @return BufferedReader
+		 * @return \Onphp\BufferedReader
 		**/
 		public function close()
 		{
@@ -57,7 +59,7 @@ public function markSupported()
 		}
 		
 		/**
-		 * @return BufferedReader
+		 * @return \Onphp\BufferedReader
 		**/
 		public function mark()
 		{
@@ -67,7 +69,7 @@ public function mark()
 		}
 		
 		/**
-		 * @return BufferedReader
+		 * @return \Onphp\BufferedReader
 		**/
 		public function reset()
 		{
diff --git a/main/Utils/IO/FileInputStream.class.php b/main/Utils/IO/FileInputStream.class.php
index 36c1534726..1def61edc8 100644
--- a/main/Utils/IO/FileInputStream.class.php
+++ b/main/Utils/IO/FileInputStream.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class FileInputStream extends InputStream
 	{
 		private $fd		= null;
@@ -45,7 +47,7 @@ public function __destruct()
 		}
 		
 		/**
-		 * @return FileInputStream
+		 * @return \Onphp\FileInputStream
 		**/
 		public static function create($nameOrFd)
 		{
@@ -58,7 +60,7 @@ public function isEof()
 		}
 		
 		/**
-		 * @return FileInputStream
+		 * @return \Onphp\FileInputStream
 		**/
 		public function mark()
 		{
@@ -78,7 +80,7 @@ public function markSupported()
 		}
 		
 		/**
-		 * @return FileInputStream
+		 * @return \Onphp\FileInputStream
 		**/
 		public function reset()
 		{
@@ -86,7 +88,7 @@ public function reset()
 		}
 		
 		/**
-		 * @return FileInputStream
+		 * @return \Onphp\FileInputStream
 		**/
 		public function seek($offset)
 		{
@@ -99,7 +101,7 @@ public function seek($offset)
 		}
 		
 		/**
-		 * @return FileInputStream
+		 * @return \Onphp\FileInputStream
 		**/
 		public function close()
 		{
diff --git a/main/Utils/IO/FileOutputStream.class.php b/main/Utils/IO/FileOutputStream.class.php
index 35445a1b50..b1fbacdae6 100644
--- a/main/Utils/IO/FileOutputStream.class.php
+++ b/main/Utils/IO/FileOutputStream.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class FileOutputStream extends OutputStream
 	{
 		private $fd		= null;
@@ -48,7 +50,7 @@ public function __destruct()
 		}
 		
 		/**
-		 * @return FileOutputStream
+		 * @return \Onphp\FileOutputStream
 		**/
 		public static function create($nameOrFd, $append = false)
 		{
@@ -56,7 +58,7 @@ public static function create($nameOrFd, $append = false)
 		}
 		
 		/**
-		 * @return FileOutputStream
+		 * @return \Onphp\FileOutputStream
 		**/
 		public function write($buffer)
 		{
@@ -76,7 +78,7 @@ public function write($buffer)
 		}
 		
 		/**
-		 * @return FileOutputStream
+		 * @return \Onphp\FileOutputStream
 		**/
 		public function close()
 		{
diff --git a/main/Utils/IO/FileReader.class.php b/main/Utils/IO/FileReader.class.php
index 6b3a15d58d..c1c364aae7 100644
--- a/main/Utils/IO/FileReader.class.php
+++ b/main/Utils/IO/FileReader.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class FileReader extends Reader
 	{
 		private $fd	= null;
 				
 		/**
-		 * @return FileReader
+		 * @return \Onphp\FileReader
 		**/
 		public static function create($fileName)
 		{
@@ -25,7 +27,7 @@ public static function create($fileName)
 		}
 		
 		/**
-		 * @return FileReader
+		 * @return \Onphp\FileReader
 		**/
 		public function __construct($fileName)
 		{
@@ -59,7 +61,7 @@ public function markSupported()
 		}
 		
 		/**
-		 * @return FileReader
+		 * @return \Onphp\FileReader
 		**/
 		public function mark()
 		{
@@ -69,7 +71,7 @@ public function mark()
 		}
 		
 		/**
-		* @return FileReader
+		* @return \Onphp\FileReader
 		**/
 		public function reset()
 		{
@@ -82,7 +84,7 @@ public function reset()
 		}
 		
 		/**
-		 * @return FileReader
+		 * @return \Onphp\FileReader
 		**/
 		public function close()
 		{
diff --git a/main/Utils/IO/InputStream.class.php b/main/Utils/IO/InputStream.class.php
index 8543392c53..721155633a 100644
--- a/main/Utils/IO/InputStream.class.php
+++ b/main/Utils/IO/InputStream.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	abstract class InputStream
 	{
 		/**
@@ -33,7 +35,7 @@ abstract public function read($length);
 		abstract public function isEof();
 		
 		/**
-		 * @return InputStream
+		 * @return \Onphp\InputStream
 		**/
 		public function mark()
 		{
@@ -65,7 +67,7 @@ public function available()
 		}
 		
 		/**
-		 * @return InputStream
+		 * @return \Onphp\InputStream
 		**/
 		public function close()
 		{
diff --git a/main/Utils/IO/OutputStream.class.php b/main/Utils/IO/OutputStream.class.php
index aa8a0734ca..8b1f35611b 100644
--- a/main/Utils/IO/OutputStream.class.php
+++ b/main/Utils/IO/OutputStream.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	abstract class OutputStream
 	{
 		/**
@@ -30,7 +32,7 @@ abstract class OutputStream
 		abstract public function write($buffer);
 		
 		/**
-		 * @return OutputStream
+		 * @return \Onphp\OutputStream
 		**/
 		public function flush()
 		{
@@ -40,7 +42,7 @@ public function flush()
 		}
 		
 		/**
-		 * @return OutputStream
+		 * @return \Onphp\OutputStream
 		**/
 		public function close()
 		{
diff --git a/main/Utils/IO/Reader.class.php b/main/Utils/IO/Reader.class.php
index 7ce891b6d0..52ed92e309 100644
--- a/main/Utils/IO/Reader.class.php
+++ b/main/Utils/IO/Reader.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	abstract class Reader
 	{
 		const BLOCK_SIZE = 16384;
diff --git a/main/Utils/IO/Socket.class.php b/main/Utils/IO/Socket.class.php
index e0ab68a896..790f16e68c 100644
--- a/main/Utils/IO/Socket.class.php
+++ b/main/Utils/IO/Socket.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class Socket
 	{
 		const DEFAULT_TIMEOUT	= 1000; // milliseconds
@@ -62,7 +64,7 @@ public function __destruct()
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public static function create()
 		{
@@ -70,7 +72,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function setHost($host)
 		{
@@ -87,7 +89,7 @@ public function getHost()
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function setPort($port)
 		{
@@ -109,7 +111,7 @@ public function isConnected()
 		}
 		
 		/**
-		 * @return SocketInputStream
+		 * @return \Onphp\SocketInputStream
 		**/
 		public function getInputStream()
 		{
@@ -119,7 +121,7 @@ public function getInputStream()
 		}
 		
 		/**
-		 * @return SocketOutputStream
+		 * @return \Onphp\SocketOutputStream
 		**/
 		public function getOutputStream()
 		{
@@ -129,7 +131,7 @@ public function getOutputStream()
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function connect($connectTimeout = self::DEFAULT_TIMEOUT)
 		{
@@ -191,7 +193,7 @@ public function connect($connectTimeout = self::DEFAULT_TIMEOUT)
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function setReadTimeout($timeout)
 		{
@@ -208,7 +210,7 @@ public function setReadTimeout($timeout)
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function setWriteTimeout($timeout)
 		{
@@ -225,7 +227,7 @@ public function setWriteTimeout($timeout)
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function setTimeout($timeout)
 		{
@@ -313,7 +315,7 @@ public function isTimedOut()
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function shutdownInput()
 		{
@@ -327,7 +329,7 @@ public function shutdownInput()
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function shutdownOutput()
 		{
@@ -341,7 +343,7 @@ public function shutdownOutput()
 		}
 		
 		/**
-		 * @return Socket
+		 * @return \Onphp\Socket
 		**/
 		public function close()
 		{
diff --git a/main/Utils/IO/SocketInputStream.class.php b/main/Utils/IO/SocketInputStream.class.php
index bd9ba69c31..4557bdd06f 100644
--- a/main/Utils/IO/SocketInputStream.class.php
+++ b/main/Utils/IO/SocketInputStream.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class SocketInputStream extends InputStream
 	{
 		/**
diff --git a/main/Utils/IO/SocketOutputStream.class.php b/main/Utils/IO/SocketOutputStream.class.php
index 0936c8f6d9..b97e0f5536 100644
--- a/main/Utils/IO/SocketOutputStream.class.php
+++ b/main/Utils/IO/SocketOutputStream.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class SocketOutputStream extends OutputStream
 	{
 		/**
@@ -33,7 +35,7 @@ public function __construct(Socket $socket)
 		}
 		
 		/**
-		 * @return SocketOutputStream
+		 * @return \Onphp\SocketOutputStream
 		**/
 		public function write($buffer)
 		{
diff --git a/main/Utils/IO/StringInputStream.class.php b/main/Utils/IO/StringInputStream.class.php
index 69e7c637be..f108f7d811 100644
--- a/main/Utils/IO/StringInputStream.class.php
+++ b/main/Utils/IO/StringInputStream.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class StringInputStream extends InputStream
 	{
 		private $string		= null;
@@ -29,7 +31,7 @@ public function __construct($string)
 		}
 		
 		/**
-		 * @return StringInputStream
+		 * @return \Onphp\StringInputStream
 		**/
 		public static function create($string)
 		{
@@ -42,7 +44,7 @@ public function isEof()
 		}
 		
 		/**
-		 * @return StringInputStream
+		 * @return \Onphp\StringInputStream
 		**/
 		public function mark()
 		{
@@ -57,7 +59,7 @@ public function markSupported()
 		}
 		
 		/**
-		 * @return StringInputStream
+		 * @return \Onphp\StringInputStream
 		**/
 		public function reset()
 		{
@@ -67,7 +69,7 @@ public function reset()
 		}
 		
 		/**
-		 * @return StringInputStream
+		 * @return \Onphp\StringInputStream
 		**/
 		public function close()
 		{
diff --git a/main/Utils/IO/StringReader.class.php b/main/Utils/IO/StringReader.class.php
index fb3a3512a4..484076c58f 100644
--- a/main/Utils/IO/StringReader.class.php
+++ b/main/Utils/IO/StringReader.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class StringReader extends Reader
 	{
 		private $string		= null;
@@ -21,7 +23,7 @@ final class StringReader extends Reader
 		private $mark		= 0;
 		
 		/**
-		 * @return StringReader
+		 * @return \Onphp\StringReader
 		**/
 		public static function create($string)
 		{
@@ -35,7 +37,7 @@ public function __construct($string)
 		}
 		
 		/**
-		 * @return StringReader
+		 * @return \Onphp\StringReader
 		**/
 		public function close()
 		{
@@ -59,7 +61,7 @@ public function read($count)
 		}
 		
 		/**
-		 * @return StringReader
+		 * @return \Onphp\StringReader
 		**/
 		public function mark()
 		{
@@ -76,7 +78,7 @@ public function markSupported()
 		}
 		
 		/**
-		 * @return StringReader
+		 * @return \Onphp\StringReader
 		**/
 		public function reset()
 		{
diff --git a/main/Utils/Logging/BaseLogger.class.php b/main/Utils/Logging/BaseLogger.class.php
index 918325512f..b15a9318c5 100644
--- a/main/Utils/Logging/BaseLogger.class.php
+++ b/main/Utils/Logging/BaseLogger.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	abstract class BaseLogger
 	{
 		private $level	= null;
@@ -32,7 +34,7 @@ public function setLevel(LogLevel $level)
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public function getLevel()
 		{
diff --git a/main/Utils/Logging/LogLevel.class.php b/main/Utils/Logging/LogLevel.class.php
index d7f6e0fbb4..e8f81fd202 100644
--- a/main/Utils/Logging/LogLevel.class.php
+++ b/main/Utils/Logging/LogLevel.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class LogLevel extends Enumeration
 	{
 		const SEVERE	= 1; // highest value
@@ -33,7 +35,7 @@ final class LogLevel extends Enumeration
 		);
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public function setId($id)
 		{
@@ -43,7 +45,7 @@ public function setId($id)
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public static function severe()
 		{
@@ -51,7 +53,7 @@ public static function severe()
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public static function warning()
 		{
@@ -59,7 +61,7 @@ public static function warning()
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public static function info()
 		{
@@ -67,7 +69,7 @@ public static function info()
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public static function config()
 		{
@@ -75,7 +77,7 @@ public static function config()
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public static function fine()
 		{
@@ -83,7 +85,7 @@ public static function fine()
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public static function finer()
 		{
@@ -91,7 +93,7 @@ public static function finer()
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public static function finest()
 		{
@@ -99,7 +101,7 @@ public static function finest()
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		private static function getInstance($id)
 		{
diff --git a/main/Utils/Logging/LogRecord.class.php b/main/Utils/Logging/LogRecord.class.php
index 33e25aef35..05a8397e90 100644
--- a/main/Utils/Logging/LogRecord.class.php
+++ b/main/Utils/Logging/LogRecord.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class LogRecord
 	{
 		private $message 	= null;
@@ -25,7 +27,7 @@ public function __construct()
 		}
 		
 		/**
-		 * @return LogRecord
+		 * @return \Onphp\LogRecord
 		**/
 		public static function create()
 		{
@@ -33,7 +35,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return LogRecord
+		 * @return \Onphp\LogRecord
 		**/
 		public function setMessage($message)
 		{
@@ -50,7 +52,7 @@ public function getMessage()
 		}
 		
 		/**
-		 * @return LogRecord
+		 * @return \Onphp\LogRecord
 		**/
 		public function setDate(Timestamp $date)
 		{
@@ -60,7 +62,7 @@ public function setDate(Timestamp $date)
 		}
 		
 		/**
-		 * @return Timestamp
+		 * @return \Onphp\Timestamp
 		**/
 		public function getDate()
 		{
@@ -68,7 +70,7 @@ public function getDate()
 		}
 		
 		/**
-		 * @return LogRecord
+		 * @return \Onphp\LogRecord
 		**/
 		public function setLevel(LogLevel $level)
 		{
@@ -78,7 +80,7 @@ public function setLevel(LogLevel $level)
 		}
 		
 		/**
-		 * @return LogLevel
+		 * @return \Onphp\LogLevel
 		**/
 		public function getLevel()
 		{
diff --git a/main/Utils/Logging/StreamLogger.class.php b/main/Utils/Logging/StreamLogger.class.php
index caa7158015..3ac5b293ad 100644
--- a/main/Utils/Logging/StreamLogger.class.php
+++ b/main/Utils/Logging/StreamLogger.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class StreamLogger extends BaseLogger
 	{
 		private $stream = null;
@@ -26,7 +28,7 @@ public function __destruct()
 		}
 		
 		/**
-		 * @return StreamLogger
+		 * @return \Onphp\StreamLogger
 		**/
 		public static function create()
 		{
@@ -34,7 +36,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return OutputStream
+		 * @return \Onphp\OutputStream
 		**/
 		public function getOutputStream()
 		{
@@ -42,7 +44,7 @@ public function getOutputStream()
 		}
 		
 		/**
-		 * @return StreamLogger
+		 * @return \Onphp\StreamLogger
 		**/
 		public function setOutputStream(OutputStream $stream)
 		{
@@ -52,7 +54,7 @@ public function setOutputStream(OutputStream $stream)
 		}
 		
 		/**
-		 * @return StreamLogger
+		 * @return \Onphp\StreamLogger
 		**/
 		public function flush()
 		{
@@ -63,7 +65,7 @@ public function flush()
 		}
 		
 		/**
-		 * @return StreamLogger
+		 * @return \Onphp\StreamLogger
 		**/
 		public function close()
 		{
@@ -79,7 +81,7 @@ public function close()
 		}
 		
 		/**
-		 * @return StreamLogger
+		 * @return \Onphp\StreamLogger
 		**/
 		protected function publish(LogRecord $record)
 		{
diff --git a/main/Utils/LogicUtils.class.php b/main/Utils/LogicUtils.class.php
index 4df2572ee6..28cf025e29 100644
--- a/main/Utils/LogicUtils.class.php
+++ b/main/Utils/LogicUtils.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class LogicUtils extends StaticFactory
 	{
 		/**
-		 * @throws WrongArgumentException
-		 * @return LogicalChain
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\LogicalChain
 		**/
 		public static function getOpenRange(
 			$left, $right, $min = null, $max = null
@@ -87,8 +89,8 @@ public static function getOpenRange(
 		
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return LogicalChain
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\LogicalChain
 		**/
 		public static function getOpenPoint(
 			$left, $right, $point
diff --git a/main/Utils/Mobile/MobileRequestDetector.class.php b/main/Utils/Mobile/MobileRequestDetector.class.php
index ce5e2aa046..17871161ab 100644
--- a/main/Utils/Mobile/MobileRequestDetector.class.php
+++ b/main/Utils/Mobile/MobileRequestDetector.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class MobileRequestDetector
 	{
 		static private $headers = array(
@@ -59,7 +61,7 @@ final class MobileRequestDetector
 		);
 		
 		/**
-		 * @return MobileRequestDetector
+		 * @return \Onphp\MobileRequestDetector
 		**/
 		public static function create()
 		{
diff --git a/main/Utils/Mobile/MobileUtils.class.php b/main/Utils/Mobile/MobileUtils.class.php
index 6992f6da4f..ac6580b608 100644
--- a/main/Utils/Mobile/MobileUtils.class.php
+++ b/main/Utils/Mobile/MobileUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Mobile
 	**/
+	namespace Onphp;
+
 	final class MobileUtils extends StaticFactory
 	{
 		public static function extractIp(array $headers)
diff --git a/main/Utils/Routers/Router.class.php b/main/Utils/Routers/Router.class.php
index 6c5df5cc8c..754777bba6 100644
--- a/main/Utils/Routers/Router.class.php
+++ b/main/Utils/Routers/Router.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface Router
 	{
 		/**
@@ -16,8 +18,8 @@ interface Router
 		 * If no route was possible, an exception is thrown.
 		 * 
 		 * @param  HttpRequest
-		 * @throws RouterException
-		 * @return HttpRequest | boolean
+		 * @throws \Onphp\RouterException
+		 * @return \Onphp\HttpRequest | boolean
 		**/
 		public function route(HttpRequest $request);
 		
@@ -49,7 +51,7 @@ public function route(HttpRequest $request);
 		 * ignoring URL params
 		 * 
 		 * @param  bool $encode Tells to encode URL parts on output
-		 * @throws RouterException
+		 * @throws \Onphp\RouterException
 		 * @return string Resulting URL path
 		**/
 		public function assembly(
diff --git a/main/Utils/Routers/RouterBaseRule.class.php b/main/Utils/Routers/RouterBaseRule.class.php
index dbe5846e07..037aca9a19 100644
--- a/main/Utils/Routers/RouterBaseRule.class.php
+++ b/main/Utils/Routers/RouterBaseRule.class.php
@@ -9,12 +9,14 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	abstract class RouterBaseRule implements RouterRule
 	{
 		protected $defaults = array();
 		
 		/**
-		 * @return RouterChainRule
+		 * @return \Onphp\RouterChainRule
 		**/
 		public function chain(RouterRule $route, $separator = '/')
 		{
@@ -52,7 +54,7 @@ public function getDefaults()
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		protected function getPath(HttpUrl $url)
 		{
@@ -110,7 +112,7 @@ protected function getPath(HttpUrl $url)
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		protected function processPath(HttpRequest $request)
 		{
diff --git a/main/Utils/Routers/RouterChainRule.class.php b/main/Utils/Routers/RouterChainRule.class.php
index 7be95db805..e95e83ab25 100644
--- a/main/Utils/Routers/RouterChainRule.class.php
+++ b/main/Utils/Routers/RouterChainRule.class.php
@@ -9,13 +9,15 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class RouterChainRule extends RouterBaseRule
 	{
 		protected $routes		= array();
 		protected $separators	= array();
 		
 		/**
-		 * @return RouterChainRule
+		 * @return \Onphp\RouterChainRule
 		**/
 		public static function create()
 		{
@@ -23,7 +25,7 @@ public static function create()
 		}
 		
 		/**
-		 * @return RouterChainRule
+		 * @return \Onphp\RouterChainRule
 		**/
 		public function chain(RouterRule $route, $separator = '/')
 		{
diff --git a/main/Utils/Routers/RouterException.class.php b/main/Utils/Routers/RouterException.class.php
index 73fb72c689..0115a6d2fb 100644
--- a/main/Utils/Routers/RouterException.class.php
+++ b/main/Utils/Routers/RouterException.class.php
@@ -9,5 +9,7 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class RouterException extends BaseException {/*_*/}
 ?>
\ No newline at end of file
diff --git a/main/Utils/Routers/RouterHostnameRule.class.php b/main/Utils/Routers/RouterHostnameRule.class.php
index 7e4129e32d..f6db7869b3 100644
--- a/main/Utils/Routers/RouterHostnameRule.class.php
+++ b/main/Utils/Routers/RouterHostnameRule.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class RouterHostnameRule extends RouterBaseRule
 	{
 		const SCHEME_HTTP			= 'http';
@@ -29,7 +31,7 @@ final class RouterHostnameRule extends RouterBaseRule
 		protected $staticCount		= 0;
 		
 		/**
-		 * @return RouterHostnameRule
+		 * @return \Onphp\RouterHostnameRule
 		**/
 		public static function create($route)
 		{
@@ -43,7 +45,7 @@ public function __construct($route)
 		}
 		
 		/**
-		 * @return RouterHostnameRule
+		 * @return \Onphp\RouterHostnameRule
 		**/
 		public function setRequirements(array $reqirements)
 		{
@@ -58,7 +60,7 @@ public function getRequirements()
 		}
 		
 		/**
-		 * @return RouterHostnameRule
+		 * @return \Onphp\RouterHostnameRule
 		**/
 		public function setSecure()
 		{
@@ -73,7 +75,7 @@ public function isSecure()
 		}
 		
 		/**
-		 * @return RouterHostnameRule
+		 * @return \Onphp\RouterHostnameRule
 		**/
 		public function setScheme($schema)
 		{
@@ -243,7 +245,7 @@ public function assembly(
 		}
 		
 		/**
-		 * @return RouterHostnameRule
+		 * @return \Onphp\RouterHostnameRule
 		**/
 		protected function processRoute()
 		{
diff --git a/main/Utils/Routers/RouterRegexpRule.class.php b/main/Utils/Routers/RouterRegexpRule.class.php
index aca811da17..0fb29a5260 100644
--- a/main/Utils/Routers/RouterRegexpRule.class.php
+++ b/main/Utils/Routers/RouterRegexpRule.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class RouterRegexpRule extends RouterBaseRule
 	{
 		protected $regexp	= null;
@@ -19,7 +21,7 @@ final class RouterRegexpRule extends RouterBaseRule
 		protected $values	= array();
 		
 		/**
-		 * @return RouterRegexpRule
+		 * @return \Onphp\RouterRegexpRule
 		**/
 		public static function create($route)
 		{
@@ -33,7 +35,7 @@ public function __construct($route)
 		}
 		
 		/**
-		 * @return RouterRegexpRule
+		 * @return \Onphp\RouterRegexpRule
 		**/
 		public function setMap(array $map)
 		{
@@ -48,7 +50,7 @@ public function getMap()
 		}
 		
 		/**
-		 * @return RouterRegexpRule
+		 * @return \Onphp\RouterRegexpRule
 		**/
 		public function setReverse($reverse)
 		{
diff --git a/main/Utils/Routers/RouterRewrite.class.php b/main/Utils/Routers/RouterRewrite.class.php
index bb9f950409..20d7b5cdd7 100644
--- a/main/Utils/Routers/RouterRewrite.class.php
+++ b/main/Utils/Routers/RouterRewrite.class.php
@@ -9,18 +9,20 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class RouterRewrite extends Singleton implements Router, Instantiatable
 	{
 		protected $routes		= array();
 		protected $currentRoute	= null;
 		
 		/**
-		 * @var HttpRequest
+		 * @var \Onphp\HttpRequest
 		**/
 		protected $request		= null;
 		
 		/**
-		 * @var HttpUrl
+		 * @var \Onphp\HttpUrl
 		**/
 		protected $baseUrl		= null;
 		
@@ -30,7 +32,7 @@ protected function __construct()
 		}
 		
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		public static function me()
 		{
@@ -38,7 +40,7 @@ public static function me()
 		}
 		
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		public function setRequest(HttpRequest $request)
 		{
@@ -48,7 +50,7 @@ public function setRequest(HttpRequest $request)
 		}
 		
 		/**
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function getRequest()
 		{
@@ -56,7 +58,7 @@ public function getRequest()
 		}
 		
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		public function resetRequest()
 		{
@@ -66,7 +68,7 @@ public function resetRequest()
 		}
 		
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		public function setBaseUrl(HttpUrl $url)
 		{
@@ -76,7 +78,7 @@ public function setBaseUrl(HttpUrl $url)
 		}
 		
 		/**
-		 * @return HttpUrl
+		 * @return \Onphp\HttpUrl
 		**/
 		public function getBaseUrl()
 		{
@@ -84,7 +86,7 @@ public function getBaseUrl()
 		}
 		
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		public function resetBaseUrl()
 		{
@@ -94,7 +96,7 @@ public function resetBaseUrl()
 		}
 		
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		public function addRoute($name, RouterRule $route)
 		{
@@ -109,7 +111,7 @@ public function addRoute($name, RouterRule $route)
 		}
 		
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		public function addRoutes(array $routes)
 		{
@@ -120,8 +122,8 @@ public function addRoutes(array $routes)
 		}
 		
 		/**
-		 * @throws RouterException
-		 * @return RouterRewrite
+		 * @throws \Onphp\RouterException
+		 * @return \Onphp\RouterRewrite
 		**/
 		public function removeRoute($name)
 		{
@@ -144,8 +146,8 @@ public function hasRoute($name)
 		}
 		
 		/**
-		 * @throws RouterException
-		 * @return RouterRule
+		 * @throws \Onphp\RouterException
+		 * @return \Onphp\RouterRule
 		**/
 		public function getRoute($name)
 		{
@@ -158,8 +160,8 @@ public function getRoute($name)
 		}
 		
 		/**
-		 * @throws RouterException
-		 * @return RouterRule
+		 * @throws \Onphp\RouterException
+		 * @return \Onphp\RouterRule
 		**/
 		public function getCurrentRoute()
 		{
@@ -172,8 +174,8 @@ public function getCurrentRoute()
 		}
 		
 		/**
-		 * @throws RouterException
-		 * @return RouterRule
+		 * @throws \Onphp\RouterException
+		 * @return \Onphp\RouterRule
 		**/
 		public function getCurrentRouteName()
 		{
@@ -194,7 +196,7 @@ public function getRoutes()
 		}
 		
 		/**
-		 * @return RouterRule
+		 * @return \Onphp\RouterRule
 		**/
 		public function resetRoutes()
 		{
@@ -208,7 +210,7 @@ public function resetRoutes()
 		 * Find a matching route to the current REQUEST_URI and
 		 * inject returning values to the HttpRequest object.
 		 * 
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		public function route(HttpRequest $request)
 		{
@@ -227,7 +229,7 @@ public function route(HttpRequest $request)
 		}
 		
 		/**
-		 * @throws RouterException
+		 * @throws \Onphp\RouterException
 		 * @return string
 		**/
 		public function assembly(
@@ -254,7 +256,7 @@ public function assembly(
 		}
 
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		public function resetAll()
 		{
@@ -267,7 +269,7 @@ public function resetAll()
 		}
 		
 		/**
-		 * @return RouterRewrite
+		 * @return \Onphp\RouterRewrite
 		**/
 		protected function setRequestParams(HttpRequest $request, array $params)
 		{
diff --git a/main/Utils/Routers/RouterRule.class.php b/main/Utils/Routers/RouterRule.class.php
index 144c3e7f25..125688a0b1 100644
--- a/main/Utils/Routers/RouterRule.class.php
+++ b/main/Utils/Routers/RouterRule.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	interface RouterRule
 	{
 		/**
diff --git a/main/Utils/Routers/RouterStaticRule.class.php b/main/Utils/Routers/RouterStaticRule.class.php
index 063813999d..4973a570d4 100644
--- a/main/Utils/Routers/RouterStaticRule.class.php
+++ b/main/Utils/Routers/RouterStaticRule.class.php
@@ -9,12 +9,14 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class RouterStaticRule extends RouterBaseRule
 	{
 		protected $route	= null;
 		
 		/**
-		 * @return RouterStaticRule
+		 * @return \Onphp\RouterStaticRule
 		**/
 		public static function create($route)
 		{
diff --git a/main/Utils/Routers/RouterTransparentRule.class.php b/main/Utils/Routers/RouterTransparentRule.class.php
index 45b57568d5..6b830a8db0 100644
--- a/main/Utils/Routers/RouterTransparentRule.class.php
+++ b/main/Utils/Routers/RouterTransparentRule.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class RouterTransparentRule extends RouterBaseRule
 	{
 		protected $urlVariable		= ':';
@@ -27,7 +29,7 @@ final class RouterTransparentRule extends RouterBaseRule
 		protected $staticCount		= 0;
 		
 		/**
-		 * @return RouterTransparentRule
+		 * @return \Onphp\RouterTransparentRule
 		**/
 		public static function create($route)
 		{
@@ -40,7 +42,7 @@ public function __construct($route)
 		}
 		
 		/**
-		 * @return RouterTransparentRule
+		 * @return \Onphp\RouterTransparentRule
 		**/
 		public function setRequirements(array $reqirements)
 		{
@@ -253,7 +255,7 @@ public function assembly(
 		}
 		
 		/**
-		 * @return RouterTransparentRule
+		 * @return \Onphp\RouterTransparentRule
 		**/
 		protected function processRoute()
 		{
diff --git a/main/Utils/Routers/RouterUrlHelper.class.php b/main/Utils/Routers/RouterUrlHelper.class.php
index 8abb2670b2..4d4267c584 100644
--- a/main/Utils/Routers/RouterUrlHelper.class.php
+++ b/main/Utils/Routers/RouterUrlHelper.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp;
+
 	final class RouterUrlHelper extends StaticFactory
 	{
 		/**
diff --git a/main/Utils/RussianTextUtils.class.php b/main/Utils/RussianTextUtils.class.php
index d5bf2f42bf..58c14ca04e 100644
--- a/main/Utils/RussianTextUtils.class.php
+++ b/main/Utils/RussianTextUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class RussianTextUtils extends StaticFactory
 	{
 		const MALE		= 0;
diff --git a/main/Utils/SortHelper.class.php b/main/Utils/SortHelper.class.php
index 52fb42ec65..04503daf31 100644
--- a/main/Utils/SortHelper.class.php
+++ b/main/Utils/SortHelper.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class SortHelper extends Singleton implements Instantiatable
 	{
 		const ASC 	= 0x1;
@@ -24,7 +26,7 @@ final class SortHelper extends Singleton implements Instantiatable
 		
 		public static function me()
 		{
-			return Singleton::getInstance('SortHelper');
+			return Singleton::getInstance('\Onphp\SortHelper');
 		}
 		
 		public function setVector(&$vector)
diff --git a/main/Utils/SynchronizableObject.class.php b/main/Utils/SynchronizableObject.class.php
index 88568be708..070889cad9 100644
--- a/main/Utils/SynchronizableObject.class.php
+++ b/main/Utils/SynchronizableObject.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	interface SynchronizableObject
 	{
 		public static function createFromMasterObject($masterObject);
diff --git a/main/Utils/TextUtils.class.php b/main/Utils/TextUtils.class.php
index f0aef8582e..af1526fd9f 100644
--- a/main/Utils/TextUtils.class.php
+++ b/main/Utils/TextUtils.class.php
@@ -16,6 +16,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class TextUtils extends StaticFactory
 	{
 		public static function friendlyFileSize(
diff --git a/main/Utils/TidyValidator.class.php b/main/Utils/TidyValidator.class.php
index 3681ca57fe..fe527dbe1c 100644
--- a/main/Utils/TidyValidator.class.php
+++ b/main/Utils/TidyValidator.class.php
@@ -14,6 +14,8 @@
 	 * 
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class TidyValidator
 	{
 		private $content		= null;
@@ -42,7 +44,7 @@ final class TidyValidator
 		private $encoding		= 'utf8';
 		
 		/**
-		 * @return TidyValidator
+		 * @return \Onphp\TidyValidator
 		**/
 		public static function create()
 		{
@@ -55,7 +57,7 @@ public static function create()
 		 * For example: TidyValidator::create()->setContent('<b>blabla</b>');
 		 * 
 		 * @param $content content itself
-		 * @return TidyValidator
+		 * @return \Onphp\TidyValidator
 		**/
 		public function setContent($content)
 		{
@@ -80,7 +82,7 @@ public function getMessages()
 		 * For example: TidyValidator::create()->setConfig('output-xhtml' => true);
 		 * 
 		 * @param $config array with tidy's configuration
-		 * @return TidyValidator
+		 * @return \Onphp\TidyValidator
 		**/
 		public function setConfig($config)
 		{
@@ -98,7 +100,7 @@ public function getConfig()
 		 * Sets header for content. There is default header (see code).
 		 * 
 		 * @param $header header string
-		 * @return TidyValidator
+		 * @return \Onphp\TidyValidator
 		**/
 		public function setHeader($header)
 		{
@@ -119,7 +121,7 @@ public function getHeader()
 		 * For example: TidyValidator::create()->setEncoding('utf8');
 		 * 
 		 * @param $encoding encoding name
-		 * @return TidyValidator
+		 * @return \Onphp\TidyValidator
 		**/
 		public function setEncoding($encoding)
 		{
@@ -160,7 +162,7 @@ public function getWarningCount()
 		 * 		getContent();
 		 * 
 		 * @param $content content to validate
-		 * @return TidyValidator
+		 * @return \Onphp\TidyValidator
 		**/
 		public function validateContent($content = null)
 		{
diff --git a/main/Utils/TuringTest/BackgroundDrawer.class.php b/main/Utils/TuringTest/BackgroundDrawer.class.php
index e2c3bbc039..1c90f7cd2d 100644
--- a/main/Utils/TuringTest/BackgroundDrawer.class.php
+++ b/main/Utils/TuringTest/BackgroundDrawer.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	abstract class BackgroundDrawer extends Drawer
 	{
 		abstract public function draw();
 		
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public function makeColor()
 		{
diff --git a/main/Utils/TuringTest/CellBackgroundDrawer.class.php b/main/Utils/TuringTest/CellBackgroundDrawer.class.php
index a639b83aed..7827e328f3 100644
--- a/main/Utils/TuringTest/CellBackgroundDrawer.class.php
+++ b/main/Utils/TuringTest/CellBackgroundDrawer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class CellBackgroundDrawer extends BackgroundDrawer
 	{
 		private $step = null;
@@ -22,7 +24,7 @@ public function __construct($step)
 		}
 		
 		/**
-		 * @return CellBackgroundDrawer
+		 * @return \Onphp\CellBackgroundDrawer
 		**/
 		public function draw()
 		{
diff --git a/main/Utils/TuringTest/CircleBackgroundDrawer.class.php b/main/Utils/TuringTest/CircleBackgroundDrawer.class.php
index a6d2b87433..4810daf2c5 100644
--- a/main/Utils/TuringTest/CircleBackgroundDrawer.class.php
+++ b/main/Utils/TuringTest/CircleBackgroundDrawer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class CircleBackgroundDrawer extends BackgroundDrawer
 	{
 		const VERTEX_COUNT	= 20;
@@ -31,7 +33,7 @@ public function __construct($count, $minRadius, $maxRadius = null)
 		}
 		
 		/**
-		 * @return CircleBackgroundDrawer
+		 * @return \Onphp\CircleBackgroundDrawer
 		**/
 		public function draw()
 		{
diff --git a/main/Utils/TuringTest/CodeGenerator.class.php b/main/Utils/TuringTest/CodeGenerator.class.php
index aa8ab6bfd4..e3c21879ac 100644
--- a/main/Utils/TuringTest/CodeGenerator.class.php
+++ b/main/Utils/TuringTest/CodeGenerator.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class CodeGenerator
 	{
 		private	$length				= null;
@@ -24,7 +26,7 @@ final class CodeGenerator
 		static private $similarSymbols	= array('0', 'o', '1', 'l');
 		
 		/**
-		 * @return CodeGenerator
+		 * @return \Onphp\CodeGenerator
 		**/
 		public static function create()
 		{
@@ -42,7 +44,7 @@ public function generate()
 		}
 		
 		/**
-		 * @return CodeGenerator
+		 * @return \Onphp\CodeGenerator
 		**/
 		public function setLength($length)
 		{
@@ -52,7 +54,7 @@ public function setLength($length)
 		}
 		
 		/**
-		 * @return CodeGenerator
+		 * @return \Onphp\CodeGenerator
 		**/
 		public function setLowerAllowed($lowerAllowed = true)
 		{
@@ -62,7 +64,7 @@ public function setLowerAllowed($lowerAllowed = true)
 		}
 		
 		/**
-		 * @return CodeGenerator
+		 * @return \Onphp\CodeGenerator
 		**/
 		public function setUpperAllowed($upperAllowed = true)
 		{
@@ -72,7 +74,7 @@ public function setUpperAllowed($upperAllowed = true)
 		}
 		
 		/**
-		 * @return CodeGenerator
+		 * @return \Onphp\CodeGenerator
 		**/
 		public function setSimilarAllowed($similarAllowed = true)
 		{
@@ -82,7 +84,7 @@ public function setSimilarAllowed($similarAllowed = true)
 		}
 		
 		/**
-		 * @return CodeGenerator
+		 * @return \Onphp\CodeGenerator
 		**/
 		public function setNumbersAllowed($numbersAllowed = true)
 		{
@@ -92,7 +94,7 @@ public function setNumbersAllowed($numbersAllowed = true)
 		}
 		
 		/**
-		 * @return CodeGenerator
+		 * @return \Onphp\CodeGenerator
 		**/
 		public function setCharactersAllowed($charactersAllowed = true)
 		{
diff --git a/main/Utils/TuringTest/Color.class.php b/main/Utils/TuringTest/Color.class.php
index 58e1b26e47..6a9f4ef106 100644
--- a/main/Utils/TuringTest/Color.class.php
+++ b/main/Utils/TuringTest/Color.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class Color implements Stringable
 	{
 		private	$red	= 0;
@@ -19,7 +21,7 @@ final class Color implements Stringable
 		private	$blue	= 0;
 		
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public static function create($rgb)
 		{
@@ -54,7 +56,7 @@ public function __construct($rgb)
 		}
 		
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public function setRed($red)
 		{
@@ -69,7 +71,7 @@ public function getRed()
 		}
 
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public function setGreen($green)
 		{
@@ -84,7 +86,7 @@ public function getGreen()
 		}
 
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public function setBlue($blue)
 		{
@@ -99,7 +101,7 @@ public function getBlue()
 		}
 	
 		/**
-		 * @return Color
+		 * @return \Onphp\Color
 		**/
 		public function invertColor()
 		{
diff --git a/main/Utils/TuringTest/ColorArray.class.php b/main/Utils/TuringTest/ColorArray.class.php
index f304f4e46f..438ceb6d64 100644
--- a/main/Utils/TuringTest/ColorArray.class.php
+++ b/main/Utils/TuringTest/ColorArray.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class ColorArray
 	{
 		private $colors = array();
 		
 		/**
-		 * @return ColorArray
+		 * @return \Onphp\ColorArray
 		**/
 		public function add(Color $color)
 		{
@@ -27,7 +29,7 @@ public function add(Color $color)
 		}
 		
 		/**
-		 * @return ColorArray
+		 * @return \Onphp\ColorArray
 		**/
 		public function clear()
 		{
@@ -37,8 +39,8 @@ public function clear()
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return Color
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\Color
 		**/
 		public function getRandomTextColor()
 		{
diff --git a/main/Utils/TuringTest/CurvedStringDrawer.class.php b/main/Utils/TuringTest/CurvedStringDrawer.class.php
index e19eaf3ce4..16d2203539 100644
--- a/main/Utils/TuringTest/CurvedStringDrawer.class.php
+++ b/main/Utils/TuringTest/CurvedStringDrawer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class CurvedStringDrawer extends TextDrawer
 	{
 		const MAX_ANGLE_CHANGE 				= 40;
@@ -19,7 +21,7 @@ final class CurvedStringDrawer extends TextDrawer
 		const MAX_VERTIVAL_POSITION_CHANGE 	= 1.5;
 		
 		/**
-		 * @return CurvedStringDrawer
+		 * @return \Onphp\CurvedStringDrawer
 		**/
 		public function draw($string)
 		{
diff --git a/main/Utils/TuringTest/Drawer.class.php b/main/Utils/TuringTest/Drawer.class.php
index 234e2b36e3..441177540a 100644
--- a/main/Utils/TuringTest/Drawer.class.php
+++ b/main/Utils/TuringTest/Drawer.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	abstract class Drawer
 	{
 		private	$turingImage	= null;
 		
 		/**
-		 * @return Drawer
+		 * @return \Onphp\Drawer
 		**/
 		public function setTuringImage(TuringImage $turingImage)
 		{
@@ -27,7 +29,7 @@ public function setTuringImage(TuringImage $turingImage)
 		}
 		
 		/**
-		 * @return TuringImage
+		 * @return \Onphp\TuringImage
 		**/
 		public function getTuringImage()
 		{
diff --git a/main/Utils/TuringTest/ErrorDrawer.class.php b/main/Utils/TuringTest/ErrorDrawer.class.php
index 7c7907e45b..03c461249f 100644
--- a/main/Utils/TuringTest/ErrorDrawer.class.php
+++ b/main/Utils/TuringTest/ErrorDrawer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class ErrorDrawer
 	{
 		const FONT_SIZE	= 4;
@@ -34,7 +36,7 @@ public function __construct($turingImage)
 		}
 		
 		/**
-		 * @return ErrorDrawer
+		 * @return \Onphp\ErrorDrawer
 		**/
 		public function draw($string = 'ERROR!')
 		{
diff --git a/main/Utils/TuringTest/InclinedStringDrawer.class.php b/main/Utils/TuringTest/InclinedStringDrawer.class.php
index 425ee4f741..82e2788e2d 100644
--- a/main/Utils/TuringTest/InclinedStringDrawer.class.php
+++ b/main/Utils/TuringTest/InclinedStringDrawer.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class InclinedStringDrawer extends TextDrawer
 	{
 		const MAX_ANGLE	= 70;
 		
 		/**
-		 * @return InclinedStringDrawer
+		 * @return \Onphp\InclinedStringDrawer
 		**/
 		public function draw($string)
 		{
diff --git a/main/Utils/TuringTest/LinearStringDrawer.class.php b/main/Utils/TuringTest/LinearStringDrawer.class.php
index c3ceab2db8..9ca7b32267 100644
--- a/main/Utils/TuringTest/LinearStringDrawer.class.php
+++ b/main/Utils/TuringTest/LinearStringDrawer.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class LinearStringDrawer extends TextDrawer
 	{
 		/**
-		 * @return LinearStringDrawer
+		 * @return \Onphp\LinearStringDrawer
 		**/
 		public function draw($string)
 		{
diff --git a/main/Utils/TuringTest/RandomLinesBackgroundDrawer.class.php b/main/Utils/TuringTest/RandomLinesBackgroundDrawer.class.php
index e47c4801c2..6894fe5aa4 100644
--- a/main/Utils/TuringTest/RandomLinesBackgroundDrawer.class.php
+++ b/main/Utils/TuringTest/RandomLinesBackgroundDrawer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class RandomLinesBackgroundDrawer extends BackgroundDrawer
 	{
 		private $count = null;
@@ -22,7 +24,7 @@ public function __construct($count)
 		}
 		
 		/**
-		 * @return RandomLinesBackgroundDrawer
+		 * @return \Onphp\RandomLinesBackgroundDrawer
 		**/
 		public function draw()
 		{
diff --git a/main/Utils/TuringTest/TextDrawer.class.php b/main/Utils/TuringTest/TextDrawer.class.php
index 92f309b993..b794fec324 100644
--- a/main/Utils/TuringTest/TextDrawer.class.php
+++ b/main/Utils/TuringTest/TextDrawer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	abstract class TextDrawer extends Drawer
 	{
 		const SPACE_RATIO = 10;
@@ -26,7 +28,7 @@ public function __construct($size)
 		}
 		
 		/**
-		 * @return TextDrawer
+		 * @return \Onphp\TextDrawer
 		**/
 		public function drawCraracter($angle, $x, $y, $character)
 		{
@@ -52,7 +54,7 @@ protected function getSize()
 		}
 		
 		/**
-		 * @return TextDrawer
+		 * @return \Onphp\TextDrawer
 		**/
 		protected function showError()
 		{
diff --git a/main/Utils/TuringTest/TuringImage.class.php b/main/Utils/TuringTest/TuringImage.class.php
index ee727cfe0f..044ea8f3e9 100644
--- a/main/Utils/TuringTest/TuringImage.class.php
+++ b/main/Utils/TuringTest/TuringImage.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class TuringImage
 	{
 		private $textColors			= null;
@@ -42,7 +44,7 @@ public function __construct($width, $height)
 		}
 		
 		/**
-		 * @return TuringImage
+		 * @return \Onphp\TuringImage
 		**/
 		public function setGeneratedCode($code)
 		{
@@ -97,7 +99,7 @@ public function setFont($font)
 		}
 		
 		/**
-		 * @return TuringImage
+		 * @return \Onphp\TuringImage
 		**/
 		public function setTextDrawer(TextDrawer $drawer)
 		{
@@ -108,7 +110,7 @@ public function setTextDrawer(TextDrawer $drawer)
 		}
 		
 		/**
-		 * @return TuringImage
+		 * @return \Onphp\TuringImage
 		**/
 		public function setBackgroundDrawer(BackgroundDrawer $drawer)
 		{
@@ -119,7 +121,7 @@ public function setBackgroundDrawer(BackgroundDrawer $drawer)
 		}
 		
 		/**
-		 * @return CodeGenerator
+		 * @return \Onphp\CodeGenerator
 		**/
 		public function getCodeGenerator()
 		{
@@ -156,7 +158,7 @@ public function getOneCharacterColor()
 		}
 		
 		/**
-		 * @return TuringImage
+		 * @return \Onphp\TuringImage
 		**/
 		public function toImage(ImageType $imageType)
 		{
@@ -177,7 +179,7 @@ public function toImage(ImageType $imageType)
 		}
 		
 		/**
-		 * @return TuringImage
+		 * @return \Onphp\TuringImage
 		**/
 		private function init()
 		{
@@ -190,7 +192,7 @@ private function init()
 		}
 		
 		/**
-		 * @return TuringImage
+		 * @return \Onphp\TuringImage
 		**/
 		private function drawBackGround()
 		{
@@ -218,7 +220,7 @@ private function drawBackGround()
 		}
 		
 		/**
-		 * @return TuringImage
+		 * @return \Onphp\TuringImage
 		**/
 		private function outputImage(ImageType $imageType)
 		{
diff --git a/main/Utils/TuringTest/WavesBackgroundDrawer.class.php b/main/Utils/TuringTest/WavesBackgroundDrawer.class.php
index 41be4122a6..ea7ae349eb 100644
--- a/main/Utils/TuringTest/WavesBackgroundDrawer.class.php
+++ b/main/Utils/TuringTest/WavesBackgroundDrawer.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Turing
 	**/
+	namespace Onphp;
+
 	final class WavesBackgroundDrawer extends BackgroundDrawer
 	{
 		const MIN_WAVE_DISTANCE	= 8;
@@ -19,7 +21,7 @@ final class WavesBackgroundDrawer extends BackgroundDrawer
 		const MAX_WAVE_OFFSET	= 5;
 		
 		/**
-		 * @return WavesBackgroundDrawer
+		 * @return \Onphp\WavesBackgroundDrawer
 		**/
 		public function draw()
 		{
diff --git a/main/Utils/TypesUtils.class.php b/main/Utils/TypesUtils.class.php
index 939852e1a8..740c0e3ca4 100644
--- a/main/Utils/TypesUtils.class.php
+++ b/main/Utils/TypesUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class TypesUtils extends StaticFactory
 	{
 		const SIGNED_MAX	= 2147483647;
diff --git a/main/Utils/UrlParamsUtils.class.php b/main/Utils/UrlParamsUtils.class.php
index d95288c178..f66a646810 100644
--- a/main/Utils/UrlParamsUtils.class.php
+++ b/main/Utils/UrlParamsUtils.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class UrlParamsUtils extends StaticFactory
 	{
 		/**
diff --git a/main/Utils/WebMoneyUtils.class.php b/main/Utils/WebMoneyUtils.class.php
index 6c7f26f35d..c53070435a 100644
--- a/main/Utils/WebMoneyUtils.class.php
+++ b/main/Utils/WebMoneyUtils.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp;
+
 	final class WebMoneyUtils extends StaticFactory
 	{
 		// order does matter!
diff --git a/main/Utils/XmlRpcClient.class.php b/main/Utils/XmlRpcClient.class.php
index bcc1706d5c..d40f65093b 100644
--- a/main/Utils/XmlRpcClient.class.php
+++ b/main/Utils/XmlRpcClient.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Utils
 	**/
+	namespace Onphp;
+
 	final class XmlRpcClient
 	{
 		private $url 		= null;
@@ -23,7 +25,7 @@ public function __construct($url = null)
 		}
 		
 		/**
-		 * @return XmlRpcClient
+		 * @return \Onphp\XmlRpcClient
 		**/
 		public static function create($url = null)
 		{
@@ -36,7 +38,7 @@ public function getUrl()
 		}
 		
 		/**
-		 * @return XmlRpcClient
+		 * @return \Onphp\XmlRpcClient
 		**/
 		public function setUrl($url)
 		{
@@ -50,7 +52,7 @@ public function getTimeout()
 		}
 		
 		/**
-		 * @return XmlRpcClient
+		 * @return \Onphp\XmlRpcClient
 		**/
 		public function setTimeout($timeout)
 		{
diff --git a/meta/bin/build.php b/meta/bin/build.php
index 81eb0b70e8..6537dd980b 100755
--- a/meta/bin/build.php
+++ b/meta/bin/build.php
@@ -1,5 +1,6 @@
-#!/usr/bin/php
 <?php
+
+	namespace Onphp;
 	
 	function help()
 	{
@@ -34,6 +35,9 @@ function help()
 	
 	--with-enum-check-ref-integrity:
 		check enumeration reference integrity [EXPERIMENTAL:for the real nerds].
+		
+	--puml:
+		just create uml diagramm and die.
 
 <?php
 		exit(1);
@@ -50,7 +54,9 @@ function init()
 				ONPHP_META_BUILDERS,
 				ONPHP_META_PATTERNS,
 				ONPHP_META_TYPES,
-			));
+			), 'Onphp');
+
+		Assert::isTrue(defined('PATH_CLASSES'), 'constant PATH_CLASSES must be defined');
 		
 		if (!defined('ONPHP_META_DAO_DIR'))
 			define(
@@ -116,11 +122,9 @@ function init()
 	
 	function stop($message = null)
 	{
-		echo $message."\n\n";
+		fwrite(STDERR, $message."\n\n");
 		
 		help();
-		
-		die();
 	}
 	
 	// paths
@@ -130,7 +134,7 @@ function stop($message = null)
 	$metaForce = $metaOnlyContainers = $metaNoSchema =
 	$metaNoSchemaCheck = $metaDropStaleFiles =
 	$metaNoIntegrityCheck = $metaDryRun = 
-	$metaCheckEnumerationRefIntegrity = $metaNoColor = false;
+	$metaCheckEnumerationRefIntegrity = $metaNoColor = $createPUML = false;
 	
 	$args = $_SERVER['argv'];
 	array_shift($args);
@@ -175,6 +179,10 @@ function stop($message = null)
 						$metaCheckEnumerationRefIntegrity = true;
 						break;
 					
+					case '--puml':
+						$createPUML = true;
+						
+						break;
 					default:
 						stop('Unknown switch: '.$arg);
 				}
@@ -299,6 +307,17 @@ function stop($message = null)
 				load($pathMeta)->
 				setForcedGeneration($metaForce);
 			
+			if ($createPUML) {
+				$pumlFile = ONPHP_META_AUTO_DIR.DIRECTORY_SEPARATOR."puml.txt";
+				
+				file_put_contents($pumlFile, $meta->makePUML());
+				
+				$out->infoLine('puml saved to '.$pumlFile);
+				
+				exit();
+			}
+				
+			
 			if ($metaOnlyContainers) {
 				$meta->buildContainers();
 			} else {
@@ -323,7 +342,7 @@ function stop($message = null)
 			
 			if ($metaCheckEnumerationRefIntegrity)
 				$meta->setWithEnumerationRefIntegrityCheck(true);
-			
+
 			if (!$metaNoIntegrityCheck)
 				$meta->checkIntegrity();
 		} catch (BaseException $e) {
@@ -343,4 +362,3 @@ function stop($message = null)
 	
 	$out->getOutput()->resetAll();
 	$out->newLine();
-?>
\ No newline at end of file
diff --git a/meta/builders/AutoClassBuilder.class.php b/meta/builders/AutoClassBuilder.class.php
index f0995ec7bb..d146baab94 100644
--- a/meta/builders/AutoClassBuilder.class.php
+++ b/meta/builders/AutoClassBuilder.class.php
@@ -12,26 +12,31 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class AutoClassBuilder extends BaseBuilder
 	{
 		public static function build(MetaClass $class)
 		{
 			$out = self::getHead();
 			
-			$out .= "abstract class Auto{$class->getName()}";
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
+				
+			$out .= "abstract class {$class->getName('Auto')}";
 			
 			$isNamed = false;
 			
 			if ($parent = $class->getParent())
-				$out .= " extends {$parent->getName()}";
+				$out .= " extends {$parent->getFullClassName()}";
 			elseif (
 				$class->getPattern() instanceof DictionaryClassPattern
 				&& $class->hasProperty('name')
 			) {
-				$out .= " extends NamedObject";
+				$out .= " extends \Onphp\NamedObject";
 				$isNamed = true;
 			} elseif (!$class->getPattern() instanceof ValueObjectPattern)
-				$out .= " extends IdentifiableObject";
+				$out .= " extends \Onphp\IdentifiableObject";
 			
 			if ($interfaces = $class->getInterfaces())
 				$out .= ' implements '.implode(', ', $interfaces);
@@ -39,22 +44,24 @@ public static function build(MetaClass $class)
 			$out .= "\n{\n";
 			
 			foreach ($class->getProperties() as $property) {
+				/* @var $property \Onphp\MetaClassProperty */
 				if (!self::doPropertyBuild($class, $property, $isNamed))
 					continue;
 				
-				$out .=
-					"protected \${$property->getName()} = "
-					."{$property->getType()->getDeclaration()};\n";
-				
 				if ($property->getFetchStrategyId() == FetchStrategy::LAZY) {
 					$out .=
 						"protected \${$property->getName()}Id = null;\n";
+				} else {
+					$out .=
+						"protected \${$property->getName()} = "
+						."{$property->getType()->getDeclaration()};\n";
 				}
 			}
 			
 			$valueObjects = array();
 			
 			foreach ($class->getProperties() as $property) {
+				/* @var $property \Onphp\MetaClassProperty */
 				if (
 					$property->getType() instanceof ObjectType
 					&& !$property->getType()->isGeneric()
@@ -62,7 +69,7 @@ public static function build(MetaClass $class)
 						instanceof ValueObjectPattern
 				) {
 					$valueObjects[$property->getName()] =
-						$property->getType()->getClassName();
+						$property->getType()->getClass()->getFullClassName();
 				}
 			}
 			
@@ -79,8 +86,11 @@ public function __construct()
 				
 				$out .= "}\n";
 			}
-			
+
+			$out .= self::staticCallsBuild($class);
+
 			foreach ($class->getProperties() as $property) {
+				/* @var $property \Onphp\MetaClassProperty */
 				if (!self::doPropertyBuild($class, $property, $isNamed))
 					continue;
 				
@@ -138,5 +148,122 @@ private static function doPropertyBuild(
 			
 			return true;
 		}
+
+		private static function staticCallsBuild(
+			MetaClass $class
+		)
+		{
+			$out = '';
+			if (
+				$class->getPattern()->daoExists()
+				&& (!$class->getPattern() instanceof AbstractClassPattern)
+			) {
+				$daoName = $class->getFullClassName('', 'DAO');
+				$dao = <<<EOT
+	/**
+	 * @return {$daoName}
+	**/
+	public static function dao()
+	{
+		return \Onphp\Singleton::getInstance('{$daoName}');
+	}
+
+EOT;
+			} else {
+				$dao = null;
+			}
+
+
+			if ($type = $class->getType())
+				$typeName = $type->toString().' ';
+			else
+				$typeName = null;
+
+			if (!$type || $type->getId() !== MetaClassType::CLASS_ABSTRACT) {
+				$customCreate = null;
+
+				if (
+					$class->getFinalParent()->getPattern()
+						instanceof InternalClassPattern
+				) {
+					$parent = $class;
+
+					while ($parent = $parent->getParent()) {
+						/* @var $parent MetaClass */
+						$info = new \ReflectionClass($parent->getFullClassName());
+
+						if (
+							$info->hasMethod('create')
+							&& ($info->getMethod('create')->getParameters() > 0)
+						) {
+							$customCreate = true;
+							break;
+						}
+					}
+				}
+
+				if ($customCreate) {
+					$creator = $info->getMethod('create');
+
+					$declaration = array();
+
+					foreach ($creator->getParameters() as $parameter) {
+						$declaration[] =
+							'$'.$parameter->getName()
+							// no one can live without default value @ ::create
+							.' = '
+							.(
+								$parameter->getDefaultValue()
+									? $parameter->getDefaultValue()
+									: 'null'
+							);
+					}
+
+					$declaration = implode(', ', $declaration);
+
+					$out .= <<<EOT
+
+	/**
+	 * @return {$class->getFullClassName()}
+	**/
+	public static function create({$declaration})
+	{
+		return new static({$declaration});
+	}
+
+EOT;
+				} else {
+					$out .= <<<EOT
+
+	/**
+	 * @return {$class->getFullClassName()}
+	**/
+	public static function create()
+	{
+		return new static;
+	}
+
+EOT;
+				}
+
+				$protoName = $class->getFullClassName('Proto');
+
+				$out .= <<<EOT
+
+{$dao}
+	/**
+	 * @return {$protoName}
+	**/
+	public static function proto()
+	{
+		return \Onphp\Singleton::getInstance('{$protoName}');
+	}
+
+EOT;
+
+			}
+
+			return $out;
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/builders/AutoDaoBuilder.class.php b/meta/builders/AutoDaoBuilder.class.php
index 6a8a5a62f0..7eb94add83 100644
--- a/meta/builders/AutoDaoBuilder.class.php
+++ b/meta/builders/AutoDaoBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class AutoDaoBuilder extends BaseBuilder
 	{
 		public static function build(MetaClass $class)
@@ -25,19 +27,22 @@ public static function build(MetaClass $class)
 				$class->getParent()->getPattern()
 					instanceof InternalClassPattern
 			) {
-				$parentName = 'StorableDAO';
+				$parentName = '\Onphp\StorableDAO';
 			} else {
-				$parentName = $parent->getName().'DAO';
+				$parentName = $parent->getFullClassName('', 'DAO');
 			}
 			
 			$out = self::getHead();
 			
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
+			
 			$out .= <<<EOT
-abstract class Auto{$class->getName()}DAO extends {$parentName}
+abstract class {$class->getName('Auto', 'DAO')} extends {$parentName}
 {
 
 EOT;
-
+			
 			$out .= self::buildPointers($class)."\n}\n";
 			
 			return $out.self::getHeel();
diff --git a/meta/builders/AutoProtoClassBuilder.class.php b/meta/builders/AutoProtoClassBuilder.class.php
index 2e7af61887..2e050917e8 100644
--- a/meta/builders/AutoProtoClassBuilder.class.php
+++ b/meta/builders/AutoProtoClassBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class AutoProtoClassBuilder extends BaseBuilder
 	{
 		public static function build(MetaClass $class)
@@ -21,12 +23,15 @@ public static function build(MetaClass $class)
 			$parent = $class->getParent();
 			
 			if ($class->hasBuildableParent())
-				$parentName = 'Proto'.$parent->getName();
+				$parentName = $parent->getFullClassName('Proto');
 			else
-				$parentName = 'AbstractProtoClass';
+				$parentName = '\Onphp\AbstractProtoClass';
 			
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
+				
 			$out .= <<<EOT
-abstract class AutoProto{$class->getName()} extends {$parentName}
+abstract class {$class->getName('AutoProto')} extends {$parentName}
 {
 EOT;
 			$classDump = self::dumpMetaClass($class);
@@ -73,6 +78,7 @@ protected function makePropertyList()
 			$list = array();
 			
 			foreach ($propertyList as $property) {
+				/* @var $property \Onphp\MetaClassProperty */
 				$list[] =
 					"'{$property->getName()}' => "
 					.$property->toLightProperty($class)->toString();
diff --git a/meta/builders/BaseBuilder.class.php b/meta/builders/BaseBuilder.class.php
index 9efc4c85ca..14edb24bb2 100644
--- a/meta/builders/BaseBuilder.class.php
+++ b/meta/builders/BaseBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	abstract class BaseBuilder extends StaticFactory
 	{
 		public static function build(MetaClass $class)
@@ -24,6 +26,14 @@ protected static function buildPointers(MetaClass $class)
 			$out = null;
 			
 			if (!$class->getPattern() instanceof AbstractClassPattern) {
+				if ($source = $class->getSourceLink()) {
+					$out .= <<<EOT
+	protected \$linkName =  '{$source}';
+	
+
+EOT;
+				}
+				
 				if (
 					$class->getIdentifier()->getColumnName() !== 'id'
 				) {
@@ -44,7 +54,7 @@ public function getTable()
 
 public function getObjectName()
 {
-	return '{$class->getName()}';
+	return '{$class->getFullClassName()}';
 }
 
 public function getSequence()
@@ -61,7 +71,10 @@ public function getSequence()
 			if ($liaisons = $class->getReferencingClasses()) {
 				$uncachers = array();
 				foreach ($liaisons as $className) {
-					$uncachers[] = $className.'::dao()->uncacheLists();';
+					$fullClassName = MetaConfiguration::me()
+						->getClassByName($className)
+						->getFullClassName();
+					$uncachers[] = $fullClassName.'::dao()->uncacheLists();';
 				}
 				
 				$uncachers = implode("\n", $uncachers);
@@ -78,17 +91,6 @@ public function uncacheLists()
 EOT;
 			}
 			
-			if ($source = $class->getSourceLink()) {
-				$out .= <<<EOT
-
-
-public function getLinkName()
-{
-	return '{$source}';
-}
-EOT;
-			}
-			
 			return $out;
 		}
 		
diff --git a/meta/builders/BusinessClassBuilder.class.php b/meta/builders/BusinessClassBuilder.class.php
index dfc5ef6875..5668fffad6 100644
--- a/meta/builders/BusinessClassBuilder.class.php
+++ b/meta/builders/BusinessClassBuilder.class.php
@@ -12,127 +12,37 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class BusinessClassBuilder extends OnceBuilder
 	{
 		public static function build(MetaClass $class)
 		{
 			$out = self::getHead();
-			
+
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
+
 			if ($type = $class->getType())
 				$typeName = $type->toString().' ';
 			else
 				$typeName = null;
-			
-			$interfaces = ' implements Prototyped';
-			
+
+			$interfaces = ' implements \Onphp\Prototyped';
+
 			if (
 				$class->getPattern()->daoExists()
 				&& (!$class->getPattern() instanceof AbstractClassPattern)
 			) {
-				$interfaces .= ', DAOConnected';
-				
-				$daoName = $class->getName().'DAO';
-				$dao = <<<EOT
-	/**
-	 * @return {$daoName}
-	**/
-	public static function dao()
-	{
-		return Singleton::getInstance('{$daoName}');
-	}
+				$interfaces .= ', \Onphp\DAOConnected';
+			}
 
-EOT;
-			} else
-				$dao = null;
-			
 			$out .= <<<EOT
-{$typeName}class {$class->getName()} extends Auto{$class->getName()}{$interfaces}
+{$typeName}class {$class->getName()} extends {$class->getFullClassName('Auto')}{$interfaces}
 {
 EOT;
 
-			if (!$type || $type->getId() !== MetaClassType::CLASS_ABSTRACT) {
-				$customCreate = null;
-				
-				if (
-					$class->getFinalParent()->getPattern()
-						instanceof InternalClassPattern
-				) {
-					$parent = $class;
-					
-					while ($parent = $parent->getParent()) {
-						$info = new ReflectionClass($parent->getName());
-						
-						if (
-							$info->hasMethod('create')
-							&& ($info->getMethod('create')->getParameters() > 0)
-						) {
-							$customCreate = true;
-							break;
-						}
-					}
-				}
-				
-				if ($customCreate) {
-					$creator = $info->getMethod('create');
-					
-					$declaration = array();
-					
-					foreach ($creator->getParameters() as $parameter) {
-						$declaration[] =
-							'$'.$parameter->getName()
-							// no one can live without default value @ ::create
-							.' = '
-							.(
-								$parameter->getDefaultValue()
-									? $parameter->getDefaultValue()
-									: 'null'
-							);
-					}
-					
-					$declaration = implode(', ', $declaration);
-					
-					$out .= <<<EOT
 
-	/**
-	 * @return {$class->getName()}
-	**/
-	public static function create({$declaration})
-	{
-		return new self({$declaration});
-	}
-		
-EOT;
-				} else {
-					$out .= <<<EOT
-
-	/**
-	 * @return {$class->getName()}
-	**/
-	public static function create()
-	{
-		return new self;
-	}
-		
-EOT;
-				}
-				
-				$protoName = 'Proto'.$class->getName();
-			
-				$out .= <<<EOT
-
-{$dao}
-	/**
-	 * @return {$protoName}
-	**/
-	public static function proto()
-	{
-		return Singleton::getInstance('{$protoName}');
-	}
-
-EOT;
-
-			}
-			
 			$out .= <<<EOT
 
 	// your brilliant stuff goes here
diff --git a/meta/builders/ContainerClassBuilder.class.php b/meta/builders/ContainerClassBuilder.class.php
index eb3243e118..d53502c2fc 100644
--- a/meta/builders/ContainerClassBuilder.class.php
+++ b/meta/builders/ContainerClassBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class ContainerClassBuilder extends OnceBuilder
 	{
 		public static function build(MetaClass $class)
@@ -24,14 +26,18 @@ public static function buildContainer(
 		)
 		{
 			$out = self::getHead();
+
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
 			
-			$containerName = $class->getName().ucfirst($holder->getName()).'DAO';
+			$containerName = $class->getName('',ucfirst($holder->getName()).'DAO');
+			$containerFullName = $class->getFullClassName('',ucfirst($holder->getName()).'DAO');
 			
 			$out .=
 				'final class '
 				.$containerName
 				.' extends '
-				.$holder->getRelation()->toString().'Linked'
+				.'\Onphp\\'.$holder->getRelation()->toString().'Linked'
 				."\n{\n";
 
 			$className = $class->getName();
@@ -40,19 +46,19 @@ public static function buildContainer(
 			$remoteColumnName = $holder->getType()->getClass()->getTableName();
 			
 			$out .= <<<EOT
-public function __construct({$className} \${$propertyName}, \$lazy = false)
+public function __construct({$class->getFullClassName()} \${$propertyName}, \$lazy = false)
 {
 	parent::__construct(
 		\${$propertyName},
-		{$holder->getType()->getClassName()}::dao(),
+		{$holder->getType()->getFullClassName()}::dao(),
 		\$lazy
 	);
 }
 
 /**
- * @return {$containerName}
+ * @return {$containerFullName}
 **/
-public static function create({$className} \${$propertyName}, \$lazy = false)
+public static function create({$class->getFullClassName()} \${$propertyName}, \$lazy = false)
 {
 	return new self(\${$propertyName}, \$lazy);
 }
diff --git a/meta/builders/DaoBuilder.class.php b/meta/builders/DaoBuilder.class.php
index 6e8d1648aa..6433b069cf 100644
--- a/meta/builders/DaoBuilder.class.php
+++ b/meta/builders/DaoBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class DaoBuilder extends OnceBuilder
 	{
 		public static function build(MetaClass $class)
@@ -45,9 +47,12 @@ public static function build(MetaClass $class)
 				$abstract = null;
 				$notes = 'your brilliant stuff goes here';
 			}
+
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
 			
 			$out .= <<<EOT
-{$abstract}class {$class->getName()}DAO extends Auto{$class->getName()}DAO
+{$abstract}class {$class->getName('', 'DAO')} extends {$class->getFullClassName('Auto', 'DAO')}
 {
 	// {$notes}
 }
diff --git a/meta/builders/DictionaryDaoBuilder.class.php b/meta/builders/DictionaryDaoBuilder.class.php
index 92257fa92b..3219036e93 100644
--- a/meta/builders/DictionaryDaoBuilder.class.php
+++ b/meta/builders/DictionaryDaoBuilder.class.php
@@ -12,14 +12,19 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class DictionaryDaoBuilder extends BaseBuilder
 	{
 		public static function build(MetaClass $class)
 		{
 			$out = self::getHead();
+
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
 			
 			$out .= <<<EOT
-abstract class Auto{$class->getName()}DAO extends StorableDAO
+abstract class {$class->getName('Auto', 'DAO')} extends \Onphp\StorableDAO
 {
 
 EOT;
diff --git a/meta/builders/EnumClassBuilder.class.php b/meta/builders/EnumClassBuilder.class.php
index a19d09ebec..4e64477d27 100644
--- a/meta/builders/EnumClassBuilder.class.php
+++ b/meta/builders/EnumClassBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class EnumClassBuilder extends OnceBuilder
 	{
 		public static function build(MetaClass $class)
@@ -23,8 +25,11 @@ public static function build(MetaClass $class)
 			else
 				$type = null;
 			
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
+			
 			$out .= <<<EOT
-{$type}class {$class->getName()} extends Enum
+{$type}class {$class->getName()} extends \Onphp\Enum
 {
 	// implement me!
 	protected static \$names = array();
diff --git a/meta/builders/EnumerationClassBuilder.class.php b/meta/builders/EnumerationClassBuilder.class.php
index 5ac5acda5c..ce887f2b77 100644
--- a/meta/builders/EnumerationClassBuilder.class.php
+++ b/meta/builders/EnumerationClassBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class EnumerationClassBuilder extends OnceBuilder
 	{
 		public static function build(MetaClass $class)
@@ -23,8 +25,11 @@ public static function build(MetaClass $class)
 			else
 				$type = null;
 			
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
+			
 			$out .= <<<EOT
-{$type}class {$class->getName()} extends Enumeration
+{$type}class {$class->getName()} extends \Onphp\Enumeration
 {
 	// implement me!
 }
diff --git a/meta/builders/OnceBuilder.class.php b/meta/builders/OnceBuilder.class.php
index ab74ef68e3..4a77e9b8af 100644
--- a/meta/builders/OnceBuilder.class.php
+++ b/meta/builders/OnceBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	abstract class OnceBuilder extends BaseBuilder
 	{
 		protected static function getHead()
diff --git a/meta/builders/ProtoClassBuilder.class.php b/meta/builders/ProtoClassBuilder.class.php
index a244017c5e..e758e0ca3e 100644
--- a/meta/builders/ProtoClassBuilder.class.php
+++ b/meta/builders/ProtoClassBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class ProtoClassBuilder extends OnceBuilder
 	{
 		public static function build(MetaClass $class)
@@ -23,8 +25,11 @@ public static function build(MetaClass $class)
 			else
 				$typeName = null;
 			
+			if ($namespace = trim($class->getNamespace(), '\\'))
+				$out .= "namespace {$namespace};\n\n";
+			
 			$out .= <<<EOT
-{$typeName}class Proto{$class->getName()} extends AutoProto{$class->getName()} {/*_*/}
+{$typeName}class {$class->getName('Proto')} extends {$class->getFullClassName('AutoProto')} {/*_*/}
 
 EOT;
 			
diff --git a/meta/builders/SchemaBuilder.class.php b/meta/builders/SchemaBuilder.class.php
index 6c587c29bc..53f3a87a61 100644
--- a/meta/builders/SchemaBuilder.class.php
+++ b/meta/builders/SchemaBuilder.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Builders
 	**/
+	namespace Onphp;
+
 	final class SchemaBuilder extends BaseBuilder
 	{
 		public static function buildTable($tableName, array $propertyList)
@@ -19,7 +21,7 @@ public static function buildTable($tableName, array $propertyList)
 			$out = <<<EOT
 \$schema->
 	addTable(
-		DBTable::create('{$tableName}')->
+		\Onphp\DBTable::create('{$tableName}')->
 
 EOT;
 
@@ -109,7 +111,7 @@ public static function buildRelations(MetaClass $class)
 						$out .= <<<EOT
 \$schema->
 	addTable(
-		DBTable::create('{$tableName}')->
+		\Onphp\DBTable::create('{$tableName}')->
 		{$property->toColumn()}->
 		{$foreignPropery->toColumn()}->
 		addUniques('{$property->getRelationColumnName()}', '{$foreignPropery->getColumnName()}')
@@ -133,8 +135,8 @@ public static function buildRelations(MetaClass $class)
 				\$schema->
 					getTableByName('{$targetTable}')->
 					getColumnByName('{$targetColumn}'),
-				ForeignChangeAction::restrict(),
-				ForeignChangeAction::cascade()
+				\Onphp\ForeignChangeAction::restrict(),
+				\Onphp\ForeignChangeAction::cascade()
 			);
 
 
@@ -151,7 +153,7 @@ public static function getHead()
 		{
 			$out = parent::getHead();
 			
-			$out .= "\$schema = new DBSchema();\n\n";
+			$out .= "\$schema = new \Onphp\DBSchema();\n\n";
 			
 			return $out;
 		}
diff --git a/meta/classes/ColoredTextOutput.class.php b/meta/classes/ColoredTextOutput.class.php
index c406298507..d7301ca2f8 100644
--- a/meta/classes/ColoredTextOutput.class.php
+++ b/meta/classes/ColoredTextOutput.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	final class ColoredTextOutput extends TextOutput
 	{
 		/**
-		 * @return ColoredTextOutput
+		 * @return \Onphp\ColoredTextOutput
 		**/
 		public function setMode(
 			$attribute = ConsoleMode::ATTR_RESET_ALL,
@@ -33,7 +35,7 @@ public function setMode(
 		}
 		
 		/**
-		 * @return ColoredTextOutput
+		 * @return \Onphp\ColoredTextOutput
 		**/
 		public function resetAll()
 		{
@@ -41,5 +43,23 @@ public function resetAll()
 			
 			return $this;
 		}
+
+		/**
+		 * @return string colored text
+		**/
+		public function wrapString(
+			$text,
+			$attribute = ConsoleMode::ATTR_RESET_ALL,
+			$foreground = ConsoleMode::FG_WHITE,
+			$background = ConsoleMode::BG_BLACK
+		)
+		{
+			return
+				chr(0x1B)
+				.'['.$attribute.';'
+				.$foreground .';'
+				.$background .'m'
+				.$text
+				.chr(0x1B) .'[0m';
+		}
 	}
-?>
\ No newline at end of file
diff --git a/meta/classes/ConsoleMode.class.php b/meta/classes/ConsoleMode.class.php
index a4d7e0be65..e90bfc6a9f 100644
--- a/meta/classes/ConsoleMode.class.php
+++ b/meta/classes/ConsoleMode.class.php
@@ -14,7 +14,9 @@
 	 * 
 	 * @ingroup MetaBase
 	**/
-	final class ConsoleMode /* extends StaticFactory */
+	namespace Onphp;
+
+	final class ConsoleMode /* extends \Onphp\StaticFactory */
 	{
 		const ATTR_RESET_ALL		= 0;
 		const ATTR_BOLD				= 1;
diff --git a/meta/classes/Format.class.php b/meta/classes/Format.class.php
index 3e5d1e1f41..86273ca8d4 100644
--- a/meta/classes/Format.class.php
+++ b/meta/classes/Format.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	final class Format extends StaticFactory
 	{
 		// dumb and straigh beautifier
diff --git a/meta/classes/MetaClass.class.php b/meta/classes/MetaClass.class.php
index 148898d532..265faf2441 100644
--- a/meta/classes/MetaClass.class.php
+++ b/meta/classes/MetaClass.class.php
@@ -12,9 +12,12 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	class MetaClass
 	{
 		private $name		= null;
+		private $namespace	= null;
 		private $tableName	= null;
 		private $type		= null;
 		
@@ -33,7 +36,7 @@ class MetaClass
 		
 		private $build		= true;
 		
-		public function __construct($name)
+		public function __construct($name, $namespace = null)
 		{
 			$this->name = $name;
 			
@@ -45,11 +48,24 @@ public function __construct($name)
 				$this->tableName = substr($dumb, 1);
 			else
 				$this->tableName = $dumb;
+			
+			$namespace = trim($namespace, '\\');
+			$this->namespace = '\\'.($namespace ? ($namespace . '\\') : '');
+		}
+		
+		public function getName($prefix = '', $postfix = '')
+		{
+			return $prefix.$this->name.$postfix;
+		}
+		
+		public function getNamespace()
+		{
+			return $this->namespace ?: '\\';
 		}
 		
-		public function getName()
+		public function getFullClassName($prefix = '', $postfix = '')
 		{
-			return $this->name;
+			return $this->getNamespace().$this->getName($prefix, $postfix);
 		}
 		
 		public function getTableName()
@@ -58,7 +74,7 @@ public function getTableName()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function setTableName($name)
 		{
@@ -68,7 +84,7 @@ public function setTableName($name)
 		}
 		
 		/**
-		 * @return MetaClassType
+		 * @return \Onphp\MetaClassType
 		**/
 		public function getType()
 		{
@@ -84,7 +100,7 @@ public function getTypeId()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function setType(MetaClassType $type)
 		{
@@ -94,7 +110,7 @@ public function setType(MetaClassType $type)
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function getParent()
 		{
@@ -102,7 +118,7 @@ public function getParent()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function getFinalParent()
 		{
@@ -113,7 +129,7 @@ public function getFinalParent()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function setParent(MetaClass $parent)
 		{
@@ -188,7 +204,7 @@ public function getAllParentsProperties()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function addProperty(MetaClassProperty $property)
 		{
@@ -208,8 +224,8 @@ public function addProperty(MetaClassProperty $property)
 		}
 		
 		/**
-		 * @return MetaClassProperty
-		 * @throws MissingElementException
+		 * @return \Onphp\MetaClassProperty
+		 * @throws \Onphp\MissingElementException
 		**/
 		public function getPropertyByName($name)
 		{
@@ -225,7 +241,7 @@ public function hasProperty($name)
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function dropProperty($name)
 		{
@@ -250,7 +266,7 @@ public function getInterfaces()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function addInterface($name)
 		{
@@ -260,7 +276,7 @@ public function addInterface($name)
 		}
 		
 		/**
-		 * @return GenerationPattern
+		 * @return \Onphp\GenerationPattern
 		**/
 		public function getPattern()
 		{
@@ -268,7 +284,7 @@ public function getPattern()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function setPattern(GenerationPattern $pattern)
 		{
@@ -278,7 +294,7 @@ public function setPattern(GenerationPattern $pattern)
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function getIdentifier()
 		{
@@ -290,7 +306,7 @@ public function getIdentifier()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function setSourceLink($link)
 		{
@@ -305,7 +321,7 @@ public function getSourceLink()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function setReferencingClass($className)
 		{
@@ -320,7 +336,7 @@ public function getReferencingClasses()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function setFetchStrategy(FetchStrategy $strategy)
 		{
@@ -330,7 +346,7 @@ public function setFetchStrategy(FetchStrategy $strategy)
 		}
 		
 		/**
-		 * @return FetchStrategy
+		 * @return \Onphp\FetchStrategy
 		**/
 		public function getFetchStrategy()
 		{
@@ -372,7 +388,7 @@ public function doBuild()
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function setBuild($do)
 		{
@@ -382,7 +398,7 @@ public function setBuild($do)
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function isRedefinedProperty($name)
 		{
diff --git a/meta/classes/MetaClassPUMLGenerator.class.php b/meta/classes/MetaClassPUMLGenerator.class.php
new file mode 100644
index 0000000000..d7ea0a1ff7
--- /dev/null
+++ b/meta/classes/MetaClassPUMLGenerator.class.php
@@ -0,0 +1,86 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2013 by Evgeny V. Kokovikhin                            *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	namespace Onphp;
+
+	final class MetaClassPUMLGenerator extends StaticFactory
+	{
+		public static function generate(MetaClass $class)
+		{
+			if (!$class->doBuild())
+				return null;
+			
+			$out = '';
+			
+			$out .= "class ".$class->getName();
+			
+			
+			$out .= " {\n";
+			
+			
+			foreach ($class->getProperties() as $property) {
+				$out .= "+get".ucfirst($property->getName())."()\n";
+			}
+			
+			$out .= "}\n";
+			
+			if ($class->getParent())
+				$out .= $class->getParent()->getName()." <|-- ".$class->getName()."\n";
+			
+			$out .= "\n";
+			
+			return $out;
+		}
+		
+		public static function generateLinks(array $classes)
+		{
+			$links = array();
+			
+			foreach ($classes as $class) {
+				Assert::isInstance($class, 'MetaClass');
+				
+				foreach ($class->getProperties() as $property) {
+					if (
+						$property->getType() instanceof ObjectType
+						&& $property->getType()->getClassName()
+						&& $property->getRelation()
+					) {
+						switch ($property->getRelation()->getId()) {
+							case MetaRelation::ONE_TO_ONE:
+								$rel = ' -- ';
+
+								break;
+							
+							case MetaRelation::ONE_TO_MANY:
+								$rel = ' *-- ';
+								
+								break;
+							
+							case MetaRelation::MANY_TO_MANY:
+								$rel = ' *--* ';
+								
+								break;
+							default:
+								throw new WrongStateException();
+								break;
+						}
+						
+						$links[] = $class->getName().$rel.$property->getType()->getClassName()."\n";
+				
+					}
+				}
+				
+				$links = array_unique($links);
+			}
+			
+			return implode("", $links)."\n";
+		}
+	}
\ No newline at end of file
diff --git a/meta/classes/MetaClassProperty.class.php b/meta/classes/MetaClassProperty.class.php
index b8572961ca..64abb8f51d 100644
--- a/meta/classes/MetaClassProperty.class.php
+++ b/meta/classes/MetaClassProperty.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	class MetaClassProperty
 	{
 		private $class		= null;
@@ -56,7 +58,7 @@ public function equals(MetaClassProperty $property)
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function getClass()
 		{
@@ -69,7 +71,7 @@ public function getName()
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function setName($name)
 		{
@@ -84,7 +86,7 @@ public function getColumnName()
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function setColumnName($name)
 		{
@@ -94,7 +96,7 @@ public function setColumnName($name)
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function getConvertedName()
 		{
@@ -104,7 +106,7 @@ public function getConvertedName()
 		}
 		
 		/**
-		 * @return BasePropertyType
+		 * @return \Onphp\BasePropertyType
 		**/
 		public function getType()
 		{
@@ -117,8 +119,8 @@ public function getSize()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return MetaClassProperty
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function setSize($size)
 		{
@@ -158,7 +160,7 @@ public function isOptional()
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function required()
 		{
@@ -168,7 +170,7 @@ public function required()
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function optional()
 		{
@@ -183,7 +185,7 @@ public function isIdentifier()
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function setIdentifier($really = false)
 		{
@@ -193,7 +195,7 @@ public function setIdentifier($really = false)
 		}
 		
 		/**
-		 * @return MetaRelation
+		 * @return \Onphp\MetaRelation
 		**/
 		public function getRelation()
 		{
@@ -209,7 +211,7 @@ public function getRelationId()
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function setRelation(MetaRelation $relation)
 		{
@@ -219,7 +221,7 @@ public function setRelation(MetaRelation $relation)
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		public function setFetchStrategy(FetchStrategy $strategy)
 		{
@@ -229,7 +231,7 @@ public function setFetchStrategy(FetchStrategy $strategy)
 		}
 		
 		/**
-		 * @return FetchStrategy
+		 * @return \Onphp\FetchStrategy
 		**/
 		public function getFetchStrategy()
 		{
@@ -327,10 +329,10 @@ public function toLightProperty(MetaClass $holder)
 			} elseif ($this->isIdentifier()) {
 				if ($this->getType() instanceof IntegerType) {
 					$primitiveName = 'integerIdentifier';
-					$className = $holder->getName();
+					$className = $holder->getFullClassName();
 				} elseif ($this->getType() instanceof StringType) {
 					$primitiveName = 'scalarIdentifier';
-					$className = $holder->getName();
+					$className = $holder->getFullClassName();
 				} else
 					$primitiveName = $this->getType()->getPrimitiveName();
 			} elseif (
@@ -362,21 +364,21 @@ public function toLightProperty(MetaClass $holder)
 			$inner = false;
 			
 			if ($this->getType() instanceof ObjectType) {
-				$className = $this->getType()->getClassName();
+				$className = $this->getType()->getFullClassName();
 				
 				if (!$this->getType()->isGeneric()) {
 					$class = $this->getType()->getClass();
 					$pattern = $class->getPattern();
 					
 					if ($pattern instanceof InternalClassPattern)
-						$className = $holder->getName();
+						$className = $holder->getFullClassName();
 					
 					if (
 						(
 							($pattern instanceof InternalClassPattern)
 							|| ($pattern instanceof ValueObjectPattern)
 						) && (
-							$className <> $holder->getName()
+							$className <> $holder->getFullClassName()
 						)
 					) {
 						$inner = true;
@@ -386,8 +388,8 @@ public function toLightProperty(MetaClass $holder)
 			
 			$propertyClassName = (
 				$inner
-					? 'InnerMetaProperty'
-					: 'LightMetaProperty'
+					? '\Onphp\InnerMetaProperty'
+					: '\Onphp\LightMetaProperty'
 			);
 			
 			if (
@@ -442,7 +444,7 @@ private function buildColumn($columnName)
 			
 			$column = <<<EOT
 addColumn(
-	DBColumn::create(
+	\Onphp\DBColumn::create(
 		{$this->type->toColumnType($this->size)}
 EOT;
 
@@ -512,10 +514,5 @@ private function buildColumn($columnName)
 			
 			return $column;
 		}
-		
-		private function toVarName($name)
-		{
-			return strtolower($name[0]).substr($name, 1);
-		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/classes/MetaClassType.class.php b/meta/classes/MetaClassType.class.php
index a7385e0ac0..075ff6f5b7 100644
--- a/meta/classes/MetaClassType.class.php
+++ b/meta/classes/MetaClassType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	final class MetaClassType extends Enumeration
 	{
 		const CLASS_FINAL		= 'final';
diff --git a/meta/classes/MetaConfiguration.class.php b/meta/classes/MetaConfiguration.class.php
index ce5f7fe414..c397840db8 100644
--- a/meta/classes/MetaConfiguration.class.php
+++ b/meta/classes/MetaConfiguration.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	final class MetaConfiguration extends Singleton implements Instantiatable
 	{
 		private $out = null;
@@ -30,15 +32,15 @@ final class MetaConfiguration extends Singleton implements Instantiatable
 		private $checkEnumerationRefIntegrity = false;
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public static function me()
 		{
-			return Singleton::getInstance('MetaConfiguration');
+			return Singleton::getInstance('\Onphp\MetaConfiguration');
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public static function out()
 		{
@@ -46,7 +48,7 @@ public static function out()
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function setForcedGeneration($orly)
 		{
@@ -61,7 +63,7 @@ public function isForcedGeneration()
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function setDryRun($dry)
 		{
@@ -76,7 +78,7 @@ public function isDryRun()
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function setWithEnumerationRefIntegrityCheck($orly)
 		{
@@ -86,7 +88,7 @@ public function setWithEnumerationRefIntegrityCheck($orly)
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function load($metafile, $generate = true)
 		{
@@ -214,7 +216,7 @@ public function load($metafile, $generate = true)
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function buildClasses()
 		{
@@ -241,7 +243,7 @@ public function buildClasses()
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function buildSchema()
 		{
@@ -295,7 +297,7 @@ public function buildSchema()
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function buildSchemaChanges()
 		{
@@ -371,7 +373,7 @@ public function buildSchemaChanges()
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function buildContainers()
 		{
@@ -429,7 +431,7 @@ public function buildContainers()
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function checkIntegrity()
 		{
@@ -446,13 +448,15 @@ public function checkIntegrity()
 					ONPHP_META_AUTO_BUSINESS_DIR,
 					ONPHP_META_AUTO_DAO_DIR,
 					ONPHP_META_AUTO_PROTO_DIR,
-				));
+				), 'Onphp');
 			
 			$out->info("\t");
 			
 			$formErrors = array();
-			
+
 			foreach ($this->classes as $name => $class) {
+				/* @var $class MetaClass */
+
 				if (
 					!(
 						$class->getPattern() instanceof SpookedClassPattern
@@ -460,33 +464,33 @@ public function checkIntegrity()
 						|| $class->getPattern() instanceof SpookedEnumPattern
 						|| $class->getPattern() instanceof InternalClassPattern
 					) && (
-						class_exists($class->getName(), true)
+						class_exists($class->getFullClassName(), true)
 					)
 				) {
-					$out->info($name, true);
+					$out->info($class->getFullClassName(), true);
 					
-					$info = new ReflectionClass($name);
+					$info = new \ReflectionClass($class->getFullClassName());
 					
 					$this->
 						checkClassSanity($class, $info);
 					
-					if ($info->implementsInterface('Prototyped'))
+					if ($info->implementsInterface('\Onphp\Prototyped'))
 						$this->checkClassSanity(
 							$class,
-							new ReflectionClass('Proto'.$name)
+							new \ReflectionClass($class->getFullClassName('Proto'))
 						);
 					
-					if ($info->implementsInterface('DAOConnected'))
+					if ($info->implementsInterface('\Onphp\DAOConnected'))
 						$this->checkClassSanity(
 							$class,
-							new ReflectionClass($name.'DAO')
+							new \ReflectionClass($class->getFullClassName('', 'DAO'))
 						);
 					
 					foreach ($class->getInterfaces() as $interface)
 						Assert::isTrue(
 							$info->implementsInterface($interface),
 							
-							'class '.$class->getName()
+							'class '.$class->getFullClassName()
 							.' expected to implement interface '.$interface
 						);
 					
@@ -495,7 +499,8 @@ class_exists($class->getName(), true)
 						$class->getPattern() instanceof EnumerationClassPattern
 						|| $class->getPattern() instanceof EnumClassPattern
 					) {
-						$object = new $name(call_user_func(array($name, 'getAnyId')));
+						$fullName = $class->getFullClassName();
+						$object = new $fullName(call_user_func(array($fullName, 'getAnyId')));
 						
 						Assert::isTrue(
 							unserialize(serialize($object)) == $object
@@ -518,23 +523,24 @@ class_exists($class->getName(), true)
 						
 						continue;
 					}
-					
+
 					if ($class->getPattern() instanceof AbstractClassPattern) {
 						$out->info(', ');
 						continue;
 					}
-					
-					$object = new $name;
+
+					$fullName = $class->getFullClassName();
+					$object = new $fullName();
 					$proto = $object->proto();
 					$form = $proto->makeForm();
 					
-					foreach ($class->getProperties() as $name => $property) {
+					foreach ($class->getProperties() as $propertyName => $property) {
 						Assert::isTrue(
 							$property->toLightProperty($class)
-							== $proto->getPropertyByName($name),
+								== $proto->getPropertyByName($propertyName),
 							
 							'defined property does not match autogenerated one - '
-							.$class->getName().'::'.$property->getName()
+								.$class->getFullClassName().'::'.$property->getName()
 						);
 					}
 					
@@ -548,7 +554,7 @@ class_exists($class->getName(), true)
 					Assert::isEqual(
 						$dao->getIdName(),
 						$class->getIdentifier()->getColumnName(),
-						'identifier name mismatch in '.$class->getName().' class'
+						'identifier name mismatch in '.$class->getFullClassName().' class'
 					);
 					
 					try {
@@ -590,7 +596,7 @@ class_exists($class->getName(), true)
 						FormUtils::object2form($object, $form);
 						
 						if ($errors = $form->getErrors()) {
-							$formErrors[$class->getName()] = $errors;
+							$formErrors[$class->getFullClassName()] = $errors;
 							
 							$out->error('F', true);
 						} else
@@ -657,7 +663,7 @@ class_exists($class->getName(), true)
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function checkForStaleFiles($drop = false)
 		{
@@ -672,8 +678,8 @@ public function checkForStaleFiles($drop = false)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return MetaClass
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\MetaClass
 		**/
 		public function getClassByName($name)
 		{
@@ -691,7 +697,7 @@ public function getClassList()
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		public function setOutput(MetaOutput $out)
 		{
@@ -701,15 +707,27 @@ public function setOutput(MetaOutput $out)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function getOutput()
 		{
 			return $this->out;
 		}
 		
+		public function makePUML()
+		{
+			$out = "@startuml\n";
+			
+			foreach ($this->classes as $metaclass)
+				$out .= MetaClassPUMLGenerator::generate($metaclass);
+			
+			$out .= MetaClassPUMLGenerator::generateLinks($this->classes);
+			
+			return $out."@enduml\n";
+		}
+		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		private function checkDirectory(
 			$directory, $preStrip, $postStrip, $drop = false
@@ -754,9 +772,9 @@ private function checkDirectory(
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
-		private function addSource(SimpleXMLElement $source)
+		private function addSource(\SimpleXMLElement $source)
 		{
 			$name = (string) $source['name'];
 			
@@ -784,7 +802,7 @@ private function addSource(SimpleXMLElement $source)
 		}
 		
 		/**
-		 * @return MetaClassProperty
+		 * @return \Onphp\MetaClassProperty
 		**/
 		private function makeProperty($name, $type, MetaClass $class, $size)
 		{
@@ -799,9 +817,9 @@ private function makeProperty($name, $type, MetaClass $class, $size)
 				);
 			
 			if (is_readable(ONPHP_META_TYPES.$type.'Type'.EXT_CLASS))
-				$typeClass = $type.'Type';
+				$typeClass = '\Onphp\\'.$type.'Type';
 			else
-				$typeClass = 'ObjectType';
+				$typeClass = '\Onphp\ObjectType';
 			
 			$property = new MetaClassProperty($name, new $typeClass($type), $class);
 			
@@ -828,14 +846,14 @@ private function makeProperty($name, $type, MetaClass $class, $size)
 		}
 		
 		/**
-		 * @throws MissingElementException
-		 * @return GenerationPattern
+		 * @throws \Onphp\MissingElementException
+		 * @return \Onphp\GenerationPattern
 		**/
 		private function guessPattern($name)
 		{
-			$class = $name.'Pattern';
+			$class = '\Onphp\\'.$name.'Pattern';
 			
-			if (is_readable(ONPHP_META_PATTERNS.$class.EXT_CLASS))
+			if (is_readable(ONPHP_META_PATTERNS.$name.'Pattern'.EXT_CLASS))
 				return Singleton::getInstance($class);
 			
 			throw new MissingElementException(
@@ -844,7 +862,7 @@ private function guessPattern($name)
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		private function checkSanity(MetaClass $class)
 		{
@@ -972,9 +990,9 @@ private function checkRecursion(
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
-		private function processIncludes(SimpleXMLElement $xml, $metafile)
+		private function processIncludes(\SimpleXMLElement $xml, $metafile)
 		{
 			foreach ($xml->include as $include) {
 				$file = (string) $include['file'];
@@ -996,19 +1014,21 @@ private function processIncludes(SimpleXMLElement $xml, $metafile)
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
-		private function processClasses(SimpleXMLElement $xml, $metafile, $generate)
+		private function processClasses(\SimpleXMLElement $xml, $metafile, $generate)
 		{
+			$classesNamespace = (string)$xml->classes['namespace'] ?: null;
 			foreach ($xml->classes[0] as $xmlClass) {
 				$name = (string) $xmlClass['name'];
+				$namespace = ((string) $xmlClass['namespace']) ?: $classesNamespace;
 				
 				Assert::isFalse(
 					isset($this->classes[$name]),
 					'class name collision found for '.$name
 				);
 				
-				$class = new MetaClass($name);
+				$class = new MetaClass($name, $namespace);
 				
 				if (isset($xmlClass['source']))
 					$class->setSourceLink((string) $xmlClass['source']);
@@ -1249,7 +1269,7 @@ private function loadXml($metafile, $generate)
 				$contents
 			);
 			
-			$doc = new DOMDocument('1.0');
+			$doc = new \DOMDocument('1.0');
 			$doc->loadXML($contents);
 			
 			try {
@@ -1284,11 +1304,11 @@ private function loadXml($metafile, $generate)
 		}
 		
 		/**
-		 * @return MetaConfiguration
+		 * @return \Onphp\MetaConfiguration
 		**/
 		private function checkClassSanity(
 			MetaClass $class,
-			ReflectionClass $info
+			\ReflectionClass $info
 		)
 		{
 			switch ($class->getTypeId()) {
@@ -1302,7 +1322,7 @@ private function checkClassSanity(
 					);
 					Assert::isTrue(
 						$class->getPattern() instanceof AbstractClassPattern,
-						'class '.$info->getName().' must use AbstractClassPattern'
+						'class '.$info->getName().' must use \Onphp\AbstractClassPattern'
 					);
 					break;
 				
@@ -1319,7 +1339,7 @@ private function checkClassSanity(
 					break;
 			}
 			
-			if ($public = $info->getProperties(ReflectionProperty::IS_PUBLIC)) {
+			if ($public = $info->getProperties(\ReflectionProperty::IS_PUBLIC)) {
 				Assert::isUnreachable(
 					$class->getName()
 					.' contains properties with evil visibility:'
@@ -1347,7 +1367,7 @@ private function checkEnumerationReferentialIntegrity(
 			
 			$db = DBPool::me()->getLink();
 			
-			$class = get_class($enumeration);
+			$class = ClassUtils::normalClassName($enumeration);
 			
 			$ids = array();
 
diff --git a/meta/classes/MetaOutput.class.php b/meta/classes/MetaOutput.class.php
index d9f5db7e3d..8499525a0f 100644
--- a/meta/classes/MetaOutput.class.php
+++ b/meta/classes/MetaOutput.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	final class MetaOutput
 	{
 		private $out = null;
@@ -22,7 +24,7 @@ public function __construct(TextOutput $out)
 		}
 		
 		/**
-		 * @return TextOutput
+		 * @return \Onphp\TextOutput
 		**/
 		public function getOutput()
 		{
@@ -30,7 +32,7 @@ public function getOutput()
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function newLine()
 		{
@@ -40,7 +42,7 @@ public function newLine()
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function log($text, $bold = false)
 		{
@@ -48,7 +50,7 @@ public function log($text, $bold = false)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function logLine($text, $bold = false)
 		{
@@ -56,7 +58,7 @@ public function logLine($text, $bold = false)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function info($text, $bold = false)
 		{
@@ -64,7 +66,7 @@ public function info($text, $bold = false)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function infoLine($text, $bold = false)
 		{
@@ -72,7 +74,7 @@ public function infoLine($text, $bold = false)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function warning($text)
 		{
@@ -80,7 +82,7 @@ public function warning($text)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function warningLine($text)
 		{
@@ -88,23 +90,23 @@ public function warningLine($text)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function error($text, $bold = false)
 		{
-			return $this->defaultText($text, ConsoleMode::FG_RED, $bold);
+			return $this->errorText($text, ConsoleMode::FG_RED, $bold);
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function errorLine($text, $bold = false)
 		{
-			return $this->defaultTextLine($text, ConsoleMode::FG_RED, $bold);
+			return $this->errorTextLine($text, ConsoleMode::FG_RED, $bold);
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function remark($text)
 		{
@@ -112,7 +114,7 @@ public function remark($text)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		public function remarkLine($text)
 		{
@@ -120,7 +122,7 @@ public function remarkLine($text)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		private function defaultText($text, $color, $bold)
 		{
@@ -139,7 +141,7 @@ private function defaultText($text, $color, $bold)
 		}
 		
 		/**
-		 * @return MetaOutput
+		 * @return \Onphp\MetaOutput
 		**/
 		private function defaultTextLine($text, $color, $bold)
 		{
@@ -156,5 +158,30 @@ private function defaultTextLine($text, $color, $bold)
 			
 			return $this;
 		}
+
+		/**
+		 * @return MetaOutput
+		**/
+		private function errorText($text, $color, $bold)
+		{
+			if ($this->out instanceof ColoredTextOutput)
+				$text = $this->out->wrapString($text);
+
+			$this->out->writeErr($text);
+
+			return $this;
+		}
+
+		/**
+		 * @return MetaOutput
+		**/
+		private function errorTextLine($text, $color, $bold)
+		{
+			if ($this->out instanceof ColoredTextOutput)
+				$text = $this->out->wrapString($text);
+
+			$this->out->writeErrLine($text);
+
+			return $this;
+		}
 	}
-?>
\ No newline at end of file
diff --git a/meta/classes/MetaRelation.class.php b/meta/classes/MetaRelation.class.php
index 071239c8c9..eac4de4a57 100644
--- a/meta/classes/MetaRelation.class.php
+++ b/meta/classes/MetaRelation.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	final class MetaRelation extends Enumeration
 	{
 		const ONE_TO_ONE		= 1;
@@ -25,7 +27,7 @@ final class MetaRelation extends Enumeration
 		);
 		
 		/**
-		 * @return MetaRelation
+		 * @return \Onphp\MetaRelation
 		**/
 		public static function create($id)
 		{
@@ -33,7 +35,7 @@ public static function create($id)
 		}
 		
 		/**
-		 * @return MetaRelation
+		 * @return \Onphp\MetaRelation
 		**/
 		public static function makeFromName($name)
 		{
diff --git a/meta/classes/TextOutput.class.php b/meta/classes/TextOutput.class.php
index 541957d445..d1ad0524ae 100644
--- a/meta/classes/TextOutput.class.php
+++ b/meta/classes/TextOutput.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup MetaBase
 	**/
+	namespace Onphp;
+
 	class TextOutput
 	{
 		/**
-		 * @return TextOutput
+		 * @return \Onphp\TextOutput
 		**/
 		public function write($text)
 		{
@@ -25,7 +27,7 @@ public function write($text)
 		}
 		
 		/**
-		 * @return TextOutput
+		 * @return \Onphp\TextOutput
 		**/
 		public function writeLine($text)
 		{
@@ -34,6 +36,26 @@ public function writeLine($text)
 			return $this;
 		}
 		
+		/**
+		 * @return \Onphp\TextOutput
+		**/
+		public function writeErr($text)
+		{
+			fwrite(STDERR, $text);
+
+			return $this;
+		}
+
+		/**
+		 * @return TextOutput
+		**/
+		public function writeErrLine($text)
+		{
+			fwrite(STDERR, $text .PHP_EOL);
+
+			return $this;
+		}
+
 		/**
 		 * @return TextOutput
 		**/
@@ -45,7 +67,7 @@ public function newLine()
 		}
 		
 		/**
-		 * @return TextOutput
+		 * @return \Onphp\TextOutput
 		**/
 		public function setMode(
 			$attribute = ConsoleMode::ATTR_RESET_ALL,
@@ -59,7 +81,7 @@ public function setMode(
 		}
 		
 		/**
-		 * @return TextOutput
+		 * @return \Onphp\TextOutput
 		**/
 		public function resetAll()
 		{
diff --git a/meta/dtd/meta.dtd b/meta/dtd/meta.dtd
index 0eaa67897f..18777fe6cc 100644
--- a/meta/dtd/meta.dtd
+++ b/meta/dtd/meta.dtd
@@ -3,6 +3,9 @@
 <!ELEMENT metaconfiguration (include*, classes*, sources*)>
 
 <!ELEMENT classes (class*)>
+<!ATTLIST classes
+		namespace	CDATA #IMPLIED
+>
 
 <!ELEMENT class (implement*, properties*, pattern)>
 <!ATTLIST class
@@ -11,6 +14,7 @@
 		extends		CDATA #IMPLIED
 		source		CDATA #IMPLIED
 		table		CDATA #IMPLIED
+		namespace	CDATA #IMPLIED
 >
 
 <!ELEMENT implement EMPTY>
diff --git a/meta/internal.xml b/meta/internal.xml
index 218aa8be50..4babeb3059 100644
--- a/meta/internal.xml
+++ b/meta/internal.xml
@@ -3,47 +3,47 @@
 
 <!-- $Id$ -->
 
-<metaconfiguration><classes>
+<metaconfiguration><classes namespace="Onphp">
 	<class name="Range">
 		<properties>
 			<property name="min" type="Integer" required="false" />
 			<property name="max" type="Integer" required="false" />
 		</properties>
-		
+
 		<pattern name="InternalClass" />
 	</class>
-	
+
 	<class name="DateRange">
 		<properties>
 			<property name="start" type="Date" required="false" />
 			<property name="end" type="Date" required="false" />
 		</properties>
-		
+
 		<pattern name="InternalClass" />
 	</class>
-	
+
 	<class name="TimestampRange">
 		<properties>
 			<property name="start" type="Timestamp" required="false" />
 			<property name="end" type="Timestamp" required="false" />
 		</properties>
-		
+
 		<pattern name="InternalClass" />
 	</class>
-	
+
 	<class name="IdentifiableObject">
 		<implement interface="Identifiable" />
-		
+
 		<properties>
 			<identifier type="Integer" />
 		</properties>
-		
+
 		<pattern name="InternalClass" />
 	</class>
-	
+
 	<class name="IdentifiableTree" extends="IdentifiableObject">
 		<implement interface="Stringable" />
-		
+
 		<properties>
 			<property
 				name="parent"
@@ -52,21 +52,21 @@
 				required="false"
 			/>
 		</properties>
-		
+
 		<pattern name="InternalClass" />
 	</class>
-	
+
 	<class name="NamedObject" extends="IdentifiableObject">
 		<implement interface="Named" />
 		<implement interface="Stringable" />
-		
+
 		<properties>
 			<property name="name" type="String" required="false" />
 		</properties>
-		
+
 		<pattern name="InternalClass" />
 	</class>
-	
+
 	<class name="NamedTree" extends="NamedObject">
 		<properties>
 			<property
@@ -76,7 +76,7 @@
 				required="false"
 			/>
 		</properties>
-		
+
 		<pattern name="InternalClass" />
 	</class>
 </classes></metaconfiguration>
\ No newline at end of file
diff --git a/meta/patterns/AbstractClassPattern.class.php b/meta/patterns/AbstractClassPattern.class.php
index 663add881c..70678237f3 100644
--- a/meta/patterns/AbstractClassPattern.class.php
+++ b/meta/patterns/AbstractClassPattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	final class AbstractClassPattern extends BasePattern
 	{
 		public function tableExists()
diff --git a/meta/patterns/BasePattern.class.php b/meta/patterns/BasePattern.class.php
index 18db66b740..40e70d3c10 100644
--- a/meta/patterns/BasePattern.class.php
+++ b/meta/patterns/BasePattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	abstract class BasePattern extends Singleton implements GenerationPattern
 	{
 		public function tableExists()
@@ -73,7 +75,7 @@ public function build(MetaClass $class)
 		}
 		
 		/**
-		 * @return BasePattern
+		 * @return \Onphp\BasePattern
 		**/
 		protected function fullBuild(MetaClass $class)
 		{
@@ -84,7 +86,7 @@ protected function fullBuild(MetaClass $class)
 		}
 		
 		/**
-		 * @return BasePattern
+		 * @return \Onphp\BasePattern
 		**/
 		protected function buildProto(MetaClass $class)
 		{
@@ -108,7 +110,7 @@ protected function buildProto(MetaClass $class)
 		}
 		
 		/**
-		 * @return BasePattern
+		 * @return \Onphp\BasePattern
 		**/
 		protected function buildBusiness(MetaClass $class)
 		{
@@ -132,7 +134,7 @@ protected function buildBusiness(MetaClass $class)
 		}
 		
 		/**
-		 * @return BasePattern
+		 * @return \Onphp\BasePattern
 		**/
 		protected function buildDao(MetaClass $class)
 		{
diff --git a/meta/patterns/DictionaryClassPattern.class.php b/meta/patterns/DictionaryClassPattern.class.php
index e73f7b01c8..8c49352842 100644
--- a/meta/patterns/DictionaryClassPattern.class.php
+++ b/meta/patterns/DictionaryClassPattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	final class DictionaryClassPattern extends BasePattern
 	{
 		public function daoExists()
diff --git a/meta/patterns/EnumClassPattern.class.php b/meta/patterns/EnumClassPattern.class.php
index 484e1551e2..d5b4ce2158 100644
--- a/meta/patterns/EnumClassPattern.class.php
+++ b/meta/patterns/EnumClassPattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	class EnumClassPattern extends BasePattern
 	{
 		public function daoExists()
@@ -25,7 +27,7 @@ public function tableExists()
 		}
 		
 		/**
-		 * @return EnumClassPattern
+		 * @return \Onphp\EnumClassPattern
 		**/
 		public function build(MetaClass $class)
 		{
diff --git a/meta/patterns/EnumerationClassPattern.class.php b/meta/patterns/EnumerationClassPattern.class.php
index a04c342db7..8edc8ea3f5 100644
--- a/meta/patterns/EnumerationClassPattern.class.php
+++ b/meta/patterns/EnumerationClassPattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	class EnumerationClassPattern extends BasePattern
 	{
 		public function daoExists()
@@ -25,7 +27,7 @@ public function tableExists()
 		}
 		
 		/**
-		 * @return EnumerationClassPattern
+		 * @return \Onphp\EnumerationClassPattern
 		**/
 		public function build(MetaClass $class)
 		{
diff --git a/meta/patterns/GenerationPattern.class.php b/meta/patterns/GenerationPattern.class.php
index 9c44de292a..102dc8e3b9 100644
--- a/meta/patterns/GenerationPattern.class.php
+++ b/meta/patterns/GenerationPattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	interface GenerationPattern
 	{
 		/// builds everything for given class
diff --git a/meta/patterns/InternalClassPattern.class.php b/meta/patterns/InternalClassPattern.class.php
index f414d9f8bd..4305c09845 100644
--- a/meta/patterns/InternalClassPattern.class.php
+++ b/meta/patterns/InternalClassPattern.class.php
@@ -12,12 +12,14 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	final class InternalClassPattern
 		extends BasePattern
 		implements GenerationPattern
 	{
 		/**
-		 * @return InternalClassPattern
+		 * @return \Onphp\InternalClassPattern
 		**/
 		public function build(MetaClass $class)
 		{
diff --git a/meta/patterns/SpookedClassPattern.class.php b/meta/patterns/SpookedClassPattern.class.php
index 42d1cdcf87..dd9c0b16fd 100644
--- a/meta/patterns/SpookedClassPattern.class.php
+++ b/meta/patterns/SpookedClassPattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	final class SpookedClassPattern extends Singleton implements GenerationPattern
 	{
 		public function build(MetaClass $class)
diff --git a/meta/patterns/SpookedEnumPattern.class.php b/meta/patterns/SpookedEnumPattern.class.php
index 16c4b57a39..4d50d27034 100644
--- a/meta/patterns/SpookedEnumPattern.class.php
+++ b/meta/patterns/SpookedEnumPattern.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	final class SpookedEnumPattern extends EnumClassPattern
 	{
 		/**
-		 * @return SpookedEnumPattern
+		 * @return \Onphp\SpookedEnumPattern
 		**/
 		public function build(MetaClass $class)
 		{
diff --git a/meta/patterns/SpookedEnumerationPattern.class.php b/meta/patterns/SpookedEnumerationPattern.class.php
index d5f90e1bdd..adf9a8bf30 100644
--- a/meta/patterns/SpookedEnumerationPattern.class.php
+++ b/meta/patterns/SpookedEnumerationPattern.class.php
@@ -12,10 +12,12 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	final class SpookedEnumerationPattern extends EnumerationClassPattern
 	{
 		/**
-		 * @return SpookedEnumerationPattern
+		 * @return \Onphp\SpookedEnumerationPattern
 		**/
 		public function build(MetaClass $class)
 		{
diff --git a/meta/patterns/StraightMappingPattern.class.php b/meta/patterns/StraightMappingPattern.class.php
index ca74f5ec16..953ee1a7ea 100644
--- a/meta/patterns/StraightMappingPattern.class.php
+++ b/meta/patterns/StraightMappingPattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	final class StraightMappingPattern extends BasePattern
 	{
 		public function daoExists()
diff --git a/meta/patterns/ValueObjectPattern.class.php b/meta/patterns/ValueObjectPattern.class.php
index 6116fcaf60..454c93b47c 100644
--- a/meta/patterns/ValueObjectPattern.class.php
+++ b/meta/patterns/ValueObjectPattern.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Patterns
 	**/
+	namespace Onphp;
+
 	final class ValueObjectPattern extends BasePattern
 	{
 		public function tableExists()
@@ -20,7 +22,7 @@ public function tableExists()
 		}
 		
 		/**
-		 * @return ValueObjectPattern
+		 * @return \Onphp\ValueObjectPattern
 		**/
 		protected function fullBuild(MetaClass $class)
 		{
diff --git a/meta/types/BasePropertyType.class.php b/meta/types/BasePropertyType.class.php
index 04049505a9..91648b1143 100644
--- a/meta/types/BasePropertyType.class.php
+++ b/meta/types/BasePropertyType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	abstract class BasePropertyType
 	{
 		abstract public function getDeclaration();
@@ -90,7 +92,7 @@ public function toSetter(
 				return <<<EOT
 
 /**
- * @return {$holder->getClass()->getName()}
+ * @return {$holder->getClass()->getFullClassName()}
 **/
 public function {$methodName}(\${$name})
 {
@@ -104,7 +106,7 @@ public function {$methodName}(\${$name})
 				return <<<EOT
 
 /**
- * @return {$class->getName()}
+ * @return {$class->getFullClassName()}
 **/
 public function {$methodName}(\${$name})
 {
diff --git a/meta/types/BigIntegerType.class.php b/meta/types/BigIntegerType.class.php
index 371d66992e..44a745d35a 100644
--- a/meta/types/BigIntegerType.class.php
+++ b/meta/types/BigIntegerType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class BigIntegerType extends IntegerType
 	{
 		public function getSize()
@@ -21,7 +23,7 @@ public function getSize()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::BIGINT)';
+			return '\Onphp\DataType::create(\Onphp\DataType::BIGINT)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/BinaryType.class.php b/meta/types/BinaryType.class.php
index 1ad89e1eb5..e003ced09e 100644
--- a/meta/types/BinaryType.class.php
+++ b/meta/types/BinaryType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class BinaryType extends BasePropertyType
 	{
 		public function getPrimitiveName()
@@ -26,7 +28,7 @@ public function getDeclaration()
 		
 		public function toColumnType($length = null)
 		{
-			return 'DataType::create(DataType::BINARY)';
+			return '\Onphp\DataType::create(\Onphp\DataType::BINARY)';
 		}
 		
 		public function isMeasurable()
diff --git a/meta/types/BooleanType.class.php b/meta/types/BooleanType.class.php
index 77836b9ad6..42c201a3b3 100644
--- a/meta/types/BooleanType.class.php
+++ b/meta/types/BooleanType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class BooleanType extends BasePropertyType
 	{
 		public function getPrimitiveName()
@@ -20,8 +22,8 @@ public function getPrimitiveName()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return BooleanType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\BooleanType
 		**/
 		public function setDefault($default)
 		{
@@ -55,7 +57,7 @@ public function isMeasurable()
 
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::BOOLEAN)';
+			return '\Onphp\DataType::create(\Onphp\DataType::BOOLEAN)';
 		}
 
 		public function toGetter(
@@ -116,7 +118,7 @@ public function toSetter(
 				return <<<EOT
 
 /**
- * @return {$holder->getClass()->getName()}
+ * @return {$holder->getClass()->getFullClassName()}
 **/
 public function {$methodName}(\${$name})
 {
@@ -131,7 +133,7 @@ public function {$methodName}(\${$name})
 					$method = <<<EOT
 
 /**
- * @return {$class->getName()}
+ * @return {$class->getFullClassName()}
 **/
 public function {$methodName}(\${$name} = false)
 {
@@ -145,11 +147,11 @@ public function {$methodName}(\${$name} = false)
 					$method = <<<EOT
 
 /**
- * @return {$class->getName()}
+ * @return {$class->getFullClassName()}
 **/
 public function {$methodName}(\${$name} = null)
 {
-	Assert::isTernaryBase(\${$name});
+	\Onphp\Assert::isTernaryBase(\${$name});
 	
 	\$this->{$name} = \${$name};
 
diff --git a/meta/types/DateRangeType.class.php b/meta/types/DateRangeType.class.php
index 7efa5553e8..31fa2f68e7 100644
--- a/meta/types/DateRangeType.class.php
+++ b/meta/types/DateRangeType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class DateRangeType extends RangeType
 	{
 		public function getPrimitiveName()
diff --git a/meta/types/DateType.class.php b/meta/types/DateType.class.php
index 0787b2849c..d9a255cca4 100644
--- a/meta/types/DateType.class.php
+++ b/meta/types/DateType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class DateType extends ObjectType
 	{
 		public function getPrimitiveName()
@@ -26,7 +28,7 @@ public function isGeneric()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::DATE)';
+			return '\Onphp\DataType::create(\Onphp\DataType::DATE)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/DoubleType.class.php b/meta/types/DoubleType.class.php
index 0e96641a72..95d00f5558 100644
--- a/meta/types/DoubleType.class.php
+++ b/meta/types/DoubleType.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class DoubleType extends FloatType
 	{
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::DOUBLE)';
+			return '\Onphp\DataType::create(\Onphp\DataType::DOUBLE)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/FixedLengthStringType.class.php b/meta/types/FixedLengthStringType.class.php
index 75027440fb..965ffcb6c2 100644
--- a/meta/types/FixedLengthStringType.class.php
+++ b/meta/types/FixedLengthStringType.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class FixedLengthStringType extends StringType
 	{
 		public function toColumnType($length = null)
 		{
-			return 'DataType::create(DataType::CHAR)';
+			return '\Onphp\DataType::create(\Onphp\DataType::CHAR)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/FloatType.class.php b/meta/types/FloatType.class.php
index 07902a7a69..fab9269abd 100644
--- a/meta/types/FloatType.class.php
+++ b/meta/types/FloatType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class FloatType extends IntegerType
 	{
 		protected $precision = 0;
@@ -22,8 +24,8 @@ public function getPrimitiveName()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return FloatType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\FloatType
 		**/
 		public function setDefault($default)
 		{
@@ -38,7 +40,7 @@ public function setDefault($default)
 		}
 
 		/**
-		 * @return NumericType
+		 * @return \Onphp\NumericType
 		**/
 		public function setPrecision($precision)
 		{
@@ -59,7 +61,7 @@ public function isMeasurable()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::REAL)';
+			return '\Onphp\DataType::create(\Onphp\DataType::REAL)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/HstoreType.class.php b/meta/types/HstoreType.class.php
index 1fec26f43b..717cc71fbb 100644
--- a/meta/types/HstoreType.class.php
+++ b/meta/types/HstoreType.class.php
@@ -13,6 +13,8 @@
 	 * @ingroup Types
 	 * @see http://www.postgresql.org/docs/8.3/interactive/hstore.html
 	**/
+	namespace Onphp;
+
 	final class HstoreType extends ObjectType
 	{
 		public function getPrimitiveName()
@@ -40,7 +42,7 @@ public function getDeclaration()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::TEXT)';
+			return '\Onphp\DataType::create(\Onphp\DataType::TEXT)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/HttpUrlType.class.php b/meta/types/HttpUrlType.class.php
index 364d9046ee..030f5d32f4 100644
--- a/meta/types/HttpUrlType.class.php
+++ b/meta/types/HttpUrlType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class HttpUrlType extends ObjectType
 	{
 		public function getPrimitiveName()
@@ -31,7 +33,7 @@ public function isMeasurable()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::VARCHAR)';
+			return '\Onphp\DataType::create(\Onphp\DataType::VARCHAR)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/InetType.class.php b/meta/types/InetType.class.php
index 9d93a76087..b7ce338ba7 100644
--- a/meta/types/InetType.class.php
+++ b/meta/types/InetType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class InetType extends IntegerType
 	{
 		public function getPrimitiveName()
@@ -25,8 +27,8 @@ public function getSize()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return InetType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\InetType
 		**/
 		public function setDefault($default)
 		{
diff --git a/meta/types/IntegerType.class.php b/meta/types/IntegerType.class.php
index cb7c461a3d..e9dc186b0b 100644
--- a/meta/types/IntegerType.class.php
+++ b/meta/types/IntegerType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class IntegerType extends BasePropertyType
 	{
 		public function getSize()
@@ -25,8 +27,8 @@ public function getPrimitiveName()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return IntegerType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\IntegerType
 		**/
 		public function setDefault($default)
 		{
@@ -55,7 +57,7 @@ public function isMeasurable()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::INTEGER)';
+			return '\Onphp\DataType::create(\Onphp\DataType::INTEGER)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/InternalType.class.php b/meta/types/InternalType.class.php
index 8775539075..de9dc66682 100644
--- a/meta/types/InternalType.class.php
+++ b/meta/types/InternalType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	abstract class InternalType extends ObjectType
 	{
 		public function isGeneric()
diff --git a/meta/types/IpAddressType.class.php b/meta/types/IpAddressType.class.php
index 2a2a6f90b2..2ed683a786 100644
--- a/meta/types/IpAddressType.class.php
+++ b/meta/types/IpAddressType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class IpAddressType extends ObjectType
 	{
 		public function getPrimitiveName()
@@ -31,7 +33,7 @@ public function isMeasurable()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::IP)';
+			return '\Onphp\DataType::create(\Onphp\DataType::IP)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/IpRangeType.class.php b/meta/types/IpRangeType.class.php
index d79da33b2d..31bab3e7f9 100644
--- a/meta/types/IpRangeType.class.php
+++ b/meta/types/IpRangeType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class IpRangeType extends ObjectType
 	{
 		public function getPrimitiveName()
@@ -31,7 +33,7 @@ public function isMeasurable()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::IP_RANGE)';
+			return '\Onphp\DataType::create(\Onphp\DataType::IP_RANGE)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/NumericType.class.php b/meta/types/NumericType.class.php
index 1f84404735..371d665235 100644
--- a/meta/types/NumericType.class.php
+++ b/meta/types/NumericType.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class NumericType extends FloatType
 	{
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::NUMERIC)';
+			return '\Onphp\DataType::create(\Onphp\DataType::NUMERIC)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/ObjectType.class.php b/meta/types/ObjectType.class.php
index fa90a9b6ec..f471996972 100644
--- a/meta/types/ObjectType.class.php
+++ b/meta/types/ObjectType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class ObjectType extends BasePropertyType
 	{
 		private $className = null;
@@ -27,7 +29,7 @@ public function __construct($className)
 		}
 		
 		/**
-		 * @return MetaClass
+		 * @return \Onphp\MetaClass
 		**/
 		public function getClass()
 		{
@@ -39,6 +41,14 @@ public function getClassName()
 			return $this->className;
 		}
 		
+		public function getFullClassName()
+		{
+			if ($this->isGeneric())
+				return '\Onphp\\'.$this->className;
+			
+			return $this->getClass()->getFullClassName();
+		}
+		
 		public function getDeclaration()
 		{
 			return 'null';
@@ -78,17 +88,9 @@ public function toGetter(
 			$classHint = $property->getType()->getHint();
 			
 			if ($holder) {
-				if ($property->getType() instanceof ObjectType) {
-					$class = $property->getType()->getClassName();
-				} else {
-					$class = null;
-				}
-				
 				return <<<EOT
 
-/**
- * @return {$class}
-**/
+{$classHint}
 public function {$methodName}()
 {
 	return \$this->{$holder->getName()}->{$methodName}();
@@ -97,7 +99,7 @@ public function {$methodName}()
 EOT;
 			} else {
 				if ($property->getFetchStrategyId() == FetchStrategy::LAZY) {
-					$className = $property->getType()->getClassName();
+					$className = $property->getType()->getClass()->getFullClassName();
 					
 					$isEnumeration =
 						(
@@ -114,18 +116,16 @@ public function {$methodName}()
 {$classHint}
 public function {$methodName}()
 {
-	if (!\$this->{$name} && \$this->{$name}Id) {
-		\$this->{$name} = {$fetchObjectString};
+	if (\$this->{$name}Id !== null) {
+		return {$fetchObjectString};
 	}
 	
-	return \$this->{$name};
+	return null;
 }
 
 public function {$methodName}Id()
 {
-	return \$this->{$name}
-		? \$this->{$name}->getId()
-		: \$this->{$name}Id;
+	return \$this->{$name}Id;
 }
 
 EOT;
@@ -137,7 +137,7 @@ public function {$methodName}Id()
 						$methodName = ucfirst($name);
 						$remoteName = ucfirst($property->getName());
 						
-						$containerName = $class->getName().$remoteName.'DAO';
+						$containerName = $class->getFullClassName('',$remoteName.'DAO');
 						
 						$method = <<<EOT
 
@@ -154,14 +154,14 @@ public function get{$methodName}(\$lazy = false)
 }
 
 /**
- * @return {$class->getName()}
+ * @return {$class->getFullClassName()}
 **/
 public function fill{$methodName}(\$collection, \$lazy = false)
 {
 	\$this->{$name} = new {$containerName}(\$this, \$lazy);
 	
 	if (!\$this->id) {
-		throw new WrongStateException(
+		throw new \Onphp\WrongStateException(
 			'i do not know which object i belong to'
 		);
 	}
@@ -204,15 +204,14 @@ public function toSetter(
 			
 			$name = $property->getName();
 			$methodName = 'set'.ucfirst($name);
-			$classHint = $this->getHint();
 			
 			if ($holder) {
 				return <<<EOT
 
 /**
- * @return {$holder->getClass()->getName()}
+ * @return {$holder->getClass()->getFullClassName()}
 **/
-public function {$methodName}({$property->getType()->getClassName()} \${$name})
+public function {$methodName}({$property->getType()->getClass()->getFullClassName()} \${$name})
 {
 	\$this->{$holder->getName()}->{$methodName}(\${$name});
 	
@@ -221,26 +220,26 @@ public function {$methodName}({$property->getType()->getClassName()} \${$name})
 
 EOT;
 			} else {
+				$defaultValue = $property->isOptional() ? ' = null' : '';
+
 				if ($property->getFetchStrategyId() == FetchStrategy::LAZY) {
 					$method = <<<EOT
 
 /**
- * @return {$property->getClass()->getName()}
+ * @return {$property->getClass()->getFullClassName()}
 **/
-public function {$methodName}({$this->className} \${$name})
+public function {$methodName}({$this->getClass()->getFullClassName()} \${$name}{$defaultValue})
 {
-	\$this->{$name} = \${$name};
-	\$this->{$name}Id = \${$name}->getId();
+	\$this->{$name}Id = \${$name}->getId() ? \${$name}->getId() : null;
 
 	return \$this;
 }
 
 /**
- * @return {$property->getClass()->getName()}
+ * @return {$property->getClass()->getFullClassName()}
 **/
-public function {$methodName}Id(\$id)
+public function {$methodName}Id(\$id{$defaultValue})
 {
-	\$this->{$name} = null;
 	\$this->{$name}Id = \$id;
 
 	return \$this;
@@ -251,9 +250,9 @@ public function {$methodName}Id(\$id)
 					$method = <<<EOT
 
 /**
- * @return {$property->getClass()->getName()}
+ * @return {$property->getClass()->getFullClassName()}
 **/
-public function {$methodName}({$this->className} \${$name})
+public function {$methodName}({$this->getFullClassName()} \${$name}{$defaultValue})
 {
 	\$this->{$name} = \${$name};
 
@@ -288,7 +287,7 @@ public function toDropper(
 					$method = <<<EOT
 
 /**
- * @return {$holder->getClass()->getName()}
+ * @return {$holder->getClass()->getFullClassName()}
 **/
 public function {$methodName}()
 {
@@ -303,11 +302,10 @@ public function {$methodName}()
 					$method = <<<EOT
 
 /**
- * @return {$class->getName()}
+ * @return {$class->getFullClassName()}
 **/
 public function {$methodName}()
 {
-	\$this->{$name} = null;
 	\$this->{$name}Id = null;
 
 	return \$this;
@@ -318,7 +316,7 @@ public function {$methodName}()
 					$method = <<<EOT
 
 /**
- * @return {$class->getName()}
+ * @return {$class->getFullClassName()}
 **/
 public function {$methodName}()
 {
@@ -343,7 +341,7 @@ public function getHint()
 		{
 			return <<<EOT
 /**
- * @return {$this->getClassName()}
+ * @return {$this->getFullClassName()}
 **/
 EOT;
 		}
diff --git a/meta/types/RangeType.class.php b/meta/types/RangeType.class.php
index e60bcf30fe..5cee2da5de 100644
--- a/meta/types/RangeType.class.php
+++ b/meta/types/RangeType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class RangeType extends InternalType
 	{
 		public function getPrimitiveName()
diff --git a/meta/types/SmallIntegerType.class.php b/meta/types/SmallIntegerType.class.php
index 5e810a78a6..594ca34809 100644
--- a/meta/types/SmallIntegerType.class.php
+++ b/meta/types/SmallIntegerType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class SmallIntegerType extends IntegerType
 	{
 		public function getSize()
@@ -21,7 +23,7 @@ public function getSize()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::SMALLINT)';
+			return '\Onphp\DataType::create(\Onphp\DataType::SMALLINT)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/StringType.class.php b/meta/types/StringType.class.php
index 91a7a3f6ce..603d2066b2 100644
--- a/meta/types/StringType.class.php
+++ b/meta/types/StringType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class StringType extends BasePropertyType
 	{
 		public function getPrimitiveName()
@@ -20,8 +22,8 @@ public function getPrimitiveName()
 		}
 		
 		/**
-		 * @throws WrongArgumentException
-		 * @return StringType
+		 * @throws \Onphp\WrongArgumentException
+		 * @return \Onphp\StringType
 		**/
 		public function setDefault($default)
 		{
@@ -52,8 +54,8 @@ public function toColumnType($length = null)
 		{
 			return
 				$length
-					? 'DataType::create(DataType::VARCHAR)'
-					: 'DataType::create(DataType::TEXT)';
+					? '\Onphp\DataType::create(\Onphp\DataType::VARCHAR)'
+					: '\Onphp\DataType::create(\Onphp\DataType::TEXT)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/TimeType.class.php b/meta/types/TimeType.class.php
index 246f56c222..b7822435d5 100644
--- a/meta/types/TimeType.class.php
+++ b/meta/types/TimeType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class TimeType extends ObjectType
 	{
 		public function getPrimitiveName()
@@ -26,7 +28,7 @@ public function isGeneric()
 
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::TIME)';
+			return '\Onphp\DataType::create(\Onphp\DataType::TIME)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/TimestampRangeType.class.php b/meta/types/TimestampRangeType.class.php
index 7199c4e18f..98a19058c1 100644
--- a/meta/types/TimestampRangeType.class.php
+++ b/meta/types/TimestampRangeType.class.php
@@ -12,11 +12,13 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	class TimestampRangeType extends DateRangeType
 	{
 		public function toPrimitive()
 		{
-			return 'Primitive::timestampRange';
+			return '\Onphp\Primitive::timestampRange';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/TimestampTZType.class.php b/meta/types/TimestampTZType.class.php
index 6327e7dfb0..7fb5b103fe 100644
--- a/meta/types/TimestampTZType.class.php
+++ b/meta/types/TimestampTZType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class TimestampTZType extends DateType
 	{
 		public function getPrimitiveName()
@@ -21,7 +23,7 @@ public function getPrimitiveName()
 
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::TIMESTAMPTZ)->setTimezoned(true)';
+			return '\Onphp\DataType::create(\Onphp\DataType::TIMESTAMPTZ)->setTimezoned(true)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/TimestampType.class.php b/meta/types/TimestampType.class.php
index 5626586841..36d7334ee4 100644
--- a/meta/types/TimestampType.class.php
+++ b/meta/types/TimestampType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class TimestampType extends DateType
 	{
 		public function getPrimitiveName()
@@ -21,7 +23,7 @@ public function getPrimitiveName()
 		
 		public function toColumnType()
 		{
-			return 'DataType::create(DataType::TIMESTAMP)';
+			return '\Onphp\DataType::create(\Onphp\DataType::TIMESTAMP)';
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/meta/types/UnsignedBigIntegerType.class.php b/meta/types/UnsignedBigIntegerType.class.php
index 794609c405..128fe5a8fb 100644
--- a/meta/types/UnsignedBigIntegerType.class.php
+++ b/meta/types/UnsignedBigIntegerType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class UnsignedBigIntegerType extends BigIntegerType
 	{
 		public function getSize()
diff --git a/meta/types/UnsignedIntegerType.class.php b/meta/types/UnsignedIntegerType.class.php
index fecd6e0f0d..0754894f5b 100644
--- a/meta/types/UnsignedIntegerType.class.php
+++ b/meta/types/UnsignedIntegerType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class UnsignedIntegerType extends IntegerType
 	{
 		public function getSize()
diff --git a/meta/types/UnsignedSmallIntegerType.class.php b/meta/types/UnsignedSmallIntegerType.class.php
index 3ab31735d9..4b1d5ad46b 100644
--- a/meta/types/UnsignedSmallIntegerType.class.php
+++ b/meta/types/UnsignedSmallIntegerType.class.php
@@ -12,6 +12,8 @@
 	/**
 	 * @ingroup Types
 	**/
+	namespace Onphp;
+
 	final class UnsignedSmallIntegerType extends SmallIntegerType
 	{
 		public function getSize()
diff --git a/nsConverter/build_meta.tpl.sh b/nsConverter/build_meta.tpl.sh
new file mode 100755
index 0000000000..488ecf5bd9
--- /dev/null
+++ b/nsConverter/build_meta.tpl.sh
@@ -0,0 +1 @@
+php ../meta/bin/build.php conf/config.auto.inc.php xml/config.xml
diff --git a/nsConverter/conf/config.auto.inc.php b/nsConverter/conf/config.auto.inc.php
new file mode 100644
index 0000000000..5d5cf1af5c
--- /dev/null
+++ b/nsConverter/conf/config.auto.inc.php
@@ -0,0 +1,63 @@
+<?php
+// system settings
+namespace Onphp\NsConverter;
+
+error_reporting(E_ALL | E_STRICT);
+
+setlocale(LC_CTYPE, "en_US.UTF8");
+setlocale(LC_TIME, "en_US.UTF8");
+
+// Xdebug settings @see phpinfo()
+ini_set('display_errors', 1);
+ini_set('xdebug.show_local_vars', 'on');
+ini_set('xdebug.dump_globals', 'on');
+ini_set('xdebug.dump.GET', '*');
+ini_set('xdebug.collect_params', 'on');
+ini_set('xdebug.var_display_max_depth', 8);
+ini_set('xdebug.var_display_max_data', 4096);
+date_default_timezone_set('Europe/Moscow');
+
+//including project constants
+if (file_exists('constants.inc.php'))
+	require_once('constants.inc.php');
+else
+	require_once('constants.inc.tpl.php');
+
+//Project constants
+define('PATH_BASE', dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+define('PATH_SRC', PATH_BASE.'src'.DIRECTORY_SEPARATOR);
+
+//SRC PATCHES
+define('PATH_CLASSES', PATH_SRC);
+
+// everything else
+define('DEFAULT_ENCODING', 'UTF-8');
+mb_internal_encoding(DEFAULT_ENCODING);
+mb_regex_encoding(DEFAULT_ENCODING);
+
+//including onPHP:
+require dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.'global.inc.php.tpl';
+
+//including project classes
+\Onphp\AutoloaderClassPathCache::create()
+	->setNamespaceResolver(\Onphp\NamespaceResolverPSR0::create())
+	->addPaths([
+		PATH_SRC,
+		PATH_SRC.'Auto'.DIRECTORY_SEPARATOR.'Business',
+		PATH_SRC.'Auto'.DIRECTORY_SEPARATOR.'Proto',
+		PATH_SRC.'Auto'.DIRECTORY_SEPARATOR.'DAOs',
+
+		PATH_SRC.'AddUtils',
+		PATH_SRC.'Buffers',
+		PATH_SRC.'Business',
+		PATH_SRC.'DAOs',
+		PATH_SRC.'Flow',
+		PATH_SRC.'Proto',
+		PATH_SRC.'Utils',
+	], 'Onphp\NsConverter')
+	->register();
+
+if (file_exists('config.inc.php'))
+	require 'config.inc.php';
+else
+	require 'config.inc.tpl.php';
diff --git a/nsConverter/conf/config.inc.tpl.php b/nsConverter/conf/config.inc.tpl.php
new file mode 100644
index 0000000000..ff7309a54d
--- /dev/null
+++ b/nsConverter/conf/config.inc.tpl.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Onphp\NsConverter;
+// db settings
+
+//$dbSettings = ['PgSQL', 'user', 'password', 'address', 'databasename'];
+//$dbTestSettings = ['PgSQL', 'user', 'password', 'address', 'testdatabasename'];
+//$curSetting = (defined('TEST_MODE') && TEST_MODE) ? $dbTestSettings : $dbSettings;
+//
+//DBPool::me()->addLink(
+//	'con',
+//	 call_user_func_array(['DB', 'spawn'], $dbTestSettings)
+//);
+
+//cach settings
+
+//session settings
diff --git a/nsConverter/conf/constants.inc.tpl.php b/nsConverter/conf/constants.inc.tpl.php
new file mode 100644
index 0000000000..699cd122d0
--- /dev/null
+++ b/nsConverter/conf/constants.inc.tpl.php
@@ -0,0 +1,5 @@
+<?php
+// paths
+namespace Onphp\NsConverter;
+
+define('__LOCAL_DEBUG__', false);
\ No newline at end of file
diff --git a/nsConverter/examples.txt b/nsConverter/examples.txt
new file mode 100644
index 0000000000..231f160fe9
--- /dev/null
+++ b/nsConverter/examples.txt
@@ -0,0 +1,2 @@
+php misc/scan.php --path=../onPHP/main/ --namespace=onPHP > replace.config/onPHP.main.txt
+php misc/replace.php --config=.../converter/replace.config/
\ No newline at end of file
diff --git a/nsConverter/misc/join.php b/nsConverter/misc/join.php
new file mode 100644
index 0000000000..550fd88779
--- /dev/null
+++ b/nsConverter/misc/join.php
@@ -0,0 +1,14 @@
+<?php
+namespace Onphp\NsConverter;
+
+use \Exception;
+use \Onphp\NsConverter\Flow\JoinCommand;
+
+require dirname(dirname(__FILE__)).'/conf/config.auto.inc.php';
+
+try {
+	$command = new JoinCommand();
+	$command->run();
+} catch	(Exception $e) {
+	var_dump(get_class($e), $e->getMessage(), $e->getCode(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
+}
\ No newline at end of file
diff --git a/nsConverter/misc/replace.php b/nsConverter/misc/replace.php
new file mode 100644
index 0000000000..355866601c
--- /dev/null
+++ b/nsConverter/misc/replace.php
@@ -0,0 +1,14 @@
+<?php
+namespace Onphp\NsConverter;
+
+use \Exception;
+use \Onphp\NsConverter\Flow\ReplaceCommand;
+
+require dirname(dirname(__FILE__)).'/conf/config.auto.inc.php';
+
+try {
+	$command = new ReplaceCommand();
+	$command->run();
+} catch	(Exception $e) {
+	var_dump(get_class($e), $e->getMessage(), $e->getCode(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
+}
\ No newline at end of file
diff --git a/nsConverter/misc/scan.php b/nsConverter/misc/scan.php
new file mode 100644
index 0000000000..3b54ee0d0a
--- /dev/null
+++ b/nsConverter/misc/scan.php
@@ -0,0 +1,14 @@
+<?php
+namespace Onphp\NsConverter;
+
+use \Exception;
+use \Onphp\NsConverter\Flow\ScanCommand;
+
+require dirname(dirname(__FILE__)).'/conf/config.auto.inc.php';
+
+try {
+	$command = new ScanCommand();
+	$command->run();
+} catch	(Exception $e) {
+	var_dump(get_class($e), $e->getMessage(), $e->getCode(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
+}
\ No newline at end of file
diff --git a/nsConverter/reloadAll.sh b/nsConverter/reloadAll.sh
new file mode 100755
index 0000000000..0159879a68
--- /dev/null
+++ b/nsConverter/reloadAll.sh
@@ -0,0 +1 @@
+php misc/reGenerateDatabase.php && php misc/run.php --command=Parse && php misc/run.php --command=Parse --linker && php misc/run.php --command=Class
\ No newline at end of file
diff --git a/nsConverter/replace.config/ns.converter.ini b/nsConverter/replace.config/ns.converter.ini
new file mode 100644
index 0000000000..6e308e1e2a
--- /dev/null
+++ b/nsConverter/replace.config/ns.converter.ini
@@ -0,0 +1,29 @@
+TestCase:\NsConverter\:\Onphp\NsConverter\
+ConTokenizerTestObserver:\NsConverter\:\Onphp\NsConverter\
+TestCaseDB:\NsConverter\:\Onphp\NsConverter\
+AutoNsClass:\NsConverter\:\Onphp\NsConverter\
+AutoProtoNsClass:\NsConverter\:\Onphp\NsConverter\
+OutputMsg:\NsConverter\:\Onphp\NsConverter\
+FormErrorWriter:\NsConverter\:\Onphp\NsConverter\
+CodeConverterException:\NsConverter\:\Onphp\NsConverter\
+PathListGetter:\NsConverter\:\Onphp\NsConverter\
+CodeConverter:\NsConverter\:\Onphp\NsConverter\
+NamespaceUtils:\NsConverter\:\Onphp\NsConverter\
+ClassStorage:\NsConverter\:\Onphp\NsConverter\
+NsClass:\NsConverter\:\Onphp\NsConverter\
+Buffer:\NsConverter\:\Onphp\NsConverter\
+CodeStorage:\NsConverter\:\Onphp\NsConverter\
+ClassStorageBuffer:\NsConverter\:\Onphp\NsConverter\
+ClassNameBuffer:\NsConverter\:\Onphp\NsConverter\
+ChainBuffer:\NsConverter\:\Onphp\NsConverter\
+NamespaceBuffer:\NsConverter\:\Onphp\NsConverter\
+PenjepitCounter:\NsConverter\:\Onphp\NsConverter\
+ClassNameDetectBuffer:\NsConverter\:\Onphp\NsConverter\
+FunctionBuffer:\NsConverter\:\Onphp\NsConverter\
+AliasBuffer:\NsConverter\:\Onphp\NsConverter\
+ClassBuffer:\NsConverter\:\Onphp\NsConverter\
+ProtoNsClass:\NsConverter\:\Onphp\NsConverter\
+CallbackLogicalObjectSuccess:\NsConverter\:\Onphp\NsConverter\
+CMDUtils:\NsConverter\:\Onphp\NsConverter\
+ScanCommand:\NsConverter\:\Onphp\NsConverter\
+ReplaceCommand:\NsConverter\:\Onphp\NsConverter\
diff --git a/nsConverter/replace.config/ns.converter.tests.ini b/nsConverter/replace.config/ns.converter.tests.ini
new file mode 100644
index 0000000000..4a5ddad338
--- /dev/null
+++ b/nsConverter/replace.config/ns.converter.tests.ini
@@ -0,0 +1,36 @@
+CodeConverterTest:\NsConverter\:\Onphp\NsConverter\
+ClassBufferTest:\NsConverter\:\Onphp\NsConverter\
+ClassNameBufferTest:\NsConverter\:\Onphp\NsConverter\
+NamespaceBufferTest:\NsConverter\:\Onphp\NsConverter\
+CodeStorageTest:\NsConverter\:\Onphp\NsConverter\
+ClassNameDetectBufferTest:\NsConverter\:\Onphp\NsConverter\
+FunctionBufferTest:\NsConverter\:\Onphp\NsConverter\
+TestCase:\NsConverter\:\Onphp\NsConverter\
+ConTokenizerTestObserver:\NsConverter\:\Onphp\NsConverter\
+TestCaseDB:\NsConverter\:\Onphp\NsConverter\
+AutoNsClass:\NsConverter\:\Onphp\NsConverter\
+AutoProtoNsClass:\NsConverter\:\Onphp\NsConverter\
+OutputMsg:\NsConverter\:\Onphp\NsConverter\
+FormErrorWriter:\NsConverter\:\Onphp\NsConverter\
+CodeConverterException:\NsConverter\:\Onphp\NsConverter\
+PathListGetter:\NsConverter\:\Onphp\NsConverter\
+CodeConverter:\NsConverter\:\Onphp\NsConverter\
+NamespaceUtils:\NsConverter\:\Onphp\NsConverter\
+ClassStorage:\NsConverter\:\Onphp\NsConverter\
+NsClass:\NsConverter\:\Onphp\NsConverter\
+Buffer:\NsConverter\:\Onphp\NsConverter\
+CodeStorage:\NsConverter\:\Onphp\NsConverter\
+ClassStorageBuffer:\NsConverter\:\Onphp\NsConverter\
+ClassNameBuffer:\NsConverter\:\Onphp\NsConverter\
+ChainBuffer:\NsConverter\:\Onphp\NsConverter\
+NamespaceBuffer:\NsConverter\:\Onphp\NsConverter\
+PenjepitCounter:\NsConverter\:\Onphp\NsConverter\
+ClassNameDetectBuffer:\NsConverter\:\Onphp\NsConverter\
+FunctionBuffer:\NsConverter\:\Onphp\NsConverter\
+AliasBuffer:\NsConverter\:\Onphp\NsConverter\
+ClassBuffer:\NsConverter\:\Onphp\NsConverter\
+ProtoNsClass:\NsConverter\:\Onphp\NsConverter\
+CallbackLogicalObjectSuccess:\NsConverter\:\Onphp\NsConverter\
+CMDUtils:\NsConverter\:\Onphp\NsConverter\
+ScanCommand:\NsConverter\:\Onphp\NsConverter\
+ReplaceCommand:\NsConverter\:\Onphp\NsConverter\
diff --git a/nsConverter/replace.config/onphp.core.ini b/nsConverter/replace.config/onphp.core.ini
new file mode 100644
index 0000000000..7495641bc2
--- /dev/null
+++ b/nsConverter/replace.config/onphp.core.ini
@@ -0,0 +1,260 @@
+MemcachedLocker:\:\Onphp\
+RuntimeMemory:\:\Onphp\
+Cache:\:\Onphp\
+SystemFiveLocker:\:\Onphp\
+SelectivePeer:\:\Onphp\
+CyclicAggregateCache:\:\Onphp\
+WatermarkedPeer:\:\Onphp\
+eAcceleratorLocker:\:\Onphp\
+ReadOnlyPeer:\:\Onphp\
+SharedMemory:\:\Onphp\
+DebugCachePeer:\:\Onphp\
+RubberFileSystem:\:\Onphp\
+DirectoryLocker:\:\Onphp\
+AggregateCache:\:\Onphp\
+BaseAggregateCache:\:\Onphp\
+PeclMemcached:\:\Onphp\
+FileLocker:\:\Onphp\
+BaseLocker:\:\Onphp\
+PeclMemcache:\:\Onphp\
+SimpleAggregateCache:\:\Onphp\
+SocketMemcached:\:\Onphp\
+CachePeer:\:\Onphp\
+ListGenerator:\:\Onphp\
+SemaphorePool:\:\Onphp\
+SequentialCache:\:\Onphp\
+PostfixUnaryExpression:\:\Onphp\
+InExpression:\:\Onphp\
+LTreeExpression:\:\Onphp\
+MappableObject:\:\Onphp\
+EqualsLowerExpression:\:\Onphp\
+Ip4ContainsExpression:\:\Onphp\
+LogicalObject:\:\Onphp\
+PrefixUnaryExpression:\:\Onphp\
+Expression:\:\Onphp\
+CallbackLogicalObject:\:\Onphp\
+LogicalChain:\:\Onphp\
+LogicalBetween:\:\Onphp\
+HstoreExpression:\:\Onphp\
+BinaryExpression:\:\Onphp\
+RedisNoSQLList:\:\Onphp\
+RedisNoSQL:\:\Onphp\
+Queue:\:\Onphp\
+DBPool:\:\Onphp\
+SQLite:\:\Onphp\
+PostgresError:\:\Onphp\
+LiteDialect:\:\Onphp\
+PgSQL:\:\Onphp\
+MyImprovedDialect:\:\Onphp\
+Sequenceless:\:\Onphp\
+MyDialect:\:\Onphp\
+MySQL:\:\Onphp\
+LitePDODialect:\:\Onphp\
+ImaginaryDialect:\:\Onphp\
+Dialect:\:\Onphp\
+DB:\:\Onphp\
+PostgresDialect:\:\Onphp\
+MySQLim:\:\Onphp\
+SQLitePDO:\:\Onphp\
+BaseTransaction:\:\Onphp\
+InnerTransaction:\:\Onphp\
+TransactionQueue:\:\Onphp\
+InnerTransactionWrapper:\:\Onphp\
+DBTransaction:\:\Onphp\
+Transaction:\:\Onphp\
+FakeTransaction:\:\Onphp\
+IsolationLevel:\:\Onphp\
+AccessMode:\:\Onphp\
+BusinessLogicException:\:\Onphp\
+TooManyRowsException:\:\Onphp\
+ObjectNotFoundException:\:\Onphp\
+WrongStateException:\:\Onphp\
+UnimplementedFeatureException:\:\Onphp\
+DatabaseException:\:\Onphp\
+MissingElementException:\:\Onphp\
+SyntaxErrorException:\:\Onphp\
+NetworkException:\:\Onphp\
+BaseException:\:\Onphp\
+ClassNotFoundException:\:\Onphp\
+SecurityException:\:\Onphp\
+IOException:\:\Onphp\
+PostgresDatabaseException:\:\Onphp\
+BadRequestException:\:\Onphp\
+UnsupportedMethodException:\:\Onphp\
+DuplicateObjectException:\:\Onphp\
+IOTimedOutException:\:\Onphp\
+SoapFault:\:\Onphp\
+FileNotFoundException:\:\Onphp\
+WrongArgumentException:\:\Onphp\
+CachedObjectNotFoundException:\:\Onphp\
+StaticFactory:\:\Onphp\
+Prototyped:\:\Onphp\
+IdentifiableObject:\:\Onphp\
+NamedObject:\:\Onphp\
+Timestamp:\:\Onphp\
+IntervalUnit:\:\Onphp\
+Aliased:\:\Onphp\
+Instantiatable:\:\Onphp\
+Identifiable:\:\Onphp\
+Identifier:\:\Onphp\
+Enumeration:\:\Onphp\
+Singleton:\:\Onphp\
+Ternary:\:\Onphp\
+Stringable:\:\Onphp\
+TimestampTZ:\:\Onphp\
+Date:\:\Onphp\
+Time:\:\Onphp\
+PriorityQueue:\:\Onphp\
+Assert:\:\Onphp\
+Named:\:\Onphp\
+Listable:\:\Onphp\
+Enum:\:\Onphp\
+SessionNotStartedException:\:\Onphp\
+Session:\:\Onphp\
+MappedForm:\:\Onphp\
+FormUtils:\:\Onphp\
+FormField:\:\Onphp\
+PlainForm:\:\Onphp\
+RegulatedForm:\:\Onphp\
+Filter:\:\Onphp\
+Primitive:\:\Onphp\
+Form:\:\Onphp\
+CompressWhitespaceFilter:\:\Onphp\
+StripTagsFilter:\:\Onphp\
+CropFilter:\:\Onphp\
+UrlEncodeFilter:\:\Onphp\
+RussianTypograph:\:\Onphp\
+HashFilter:\:\Onphp\
+PCREFilter:\:\Onphp\
+SafeUtf8Filter:\:\Onphp\
+FilterChain:\:\Onphp\
+LowerCaseFilter:\:\Onphp\
+TrimFilter:\:\Onphp\
+HtmlSpecialCharsFilter:\:\Onphp\
+JsonDecoderFilter:\:\Onphp\
+UnTypographizer:\:\Onphp\
+RemoveNewlineFilter:\:\Onphp\
+UpperCaseFilter:\:\Onphp\
+Filtrator:\:\Onphp\
+UrlDecodeFilter:\:\Onphp\
+CallbackFilter:\:\Onphp\
+DateRangeDisplayFilter:\:\Onphp\
+WordSplitterFilter:\:\Onphp\
+NewLinesToBreaks:\:\Onphp\
+Paragraphizer:\:\Onphp\
+UnixToUnixEncode:\:\Onphp\
+UnixToUnixDecode:\:\Onphp\
+UnserializeFilter:\:\Onphp\
+BaseFilter:\:\Onphp\
+JsonEncoderFilter:\:\Onphp\
+Utf16ConverterFilter:\:\Onphp\
+StringReplaceFilter:\:\Onphp\
+NormalizeUrlFilter:\:\Onphp\
+PrimitiveInteger:\:\Onphp\
+PrimitiveList:\:\Onphp\
+PrimitiveEnumeration:\:\Onphp\
+PrimitiveMultiList:\:\Onphp\
+IdentifiablePrimitive:\:\Onphp\
+PrimitiveBoolean:\:\Onphp\
+PrimitiveBinary:\:\Onphp\
+PrimitiveEnumerationList:\:\Onphp\
+PrimitiveTimestampTZ:\:\Onphp\
+PrimitiveNoValue:\:\Onphp\
+PrimitiveIntegerIdentifier:\:\Onphp\
+PrimitiveDateRange:\:\Onphp\
+PrimitiveAlias:\:\Onphp\
+PrimitiveEnumList:\:\Onphp\
+PrimitiveForm:\:\Onphp\
+PrimitiveDate:\:\Onphp\
+PrimitiveFormsList:\:\Onphp\
+PrimitiveFile:\:\Onphp\
+PrimitiveTimestampRange:\:\Onphp\
+ListedPrimitive:\:\Onphp\
+PrimitiveIdentifier:\:\Onphp\
+PrimitiveImage:\:\Onphp\
+PrimitiveIpAddress:\:\Onphp\
+PrimitiveFloat:\:\Onphp\
+PrimitiveClass:\:\Onphp\
+ComplexPrimitive:\:\Onphp\
+PrimitiveScalarIdentifier:\:\Onphp\
+RangedPrimitive:\:\Onphp\
+PrimitiveInet:\:\Onphp\
+BaseObjectPrimitive:\:\Onphp\
+PrimitiveEnumByValue:\:\Onphp\
+BasePrimitive:\:\Onphp\
+PrimitiveEnumerationByValue:\:\Onphp\
+PrimitiveString:\:\Onphp\
+PrimitiveHstore:\:\Onphp\
+TimeList:\:\Onphp\
+PrimitiveEnum:\:\Onphp\
+PrimitiveTimestamp:\:\Onphp\
+PrimitiveIdentifierList:\:\Onphp\
+PrimitiveAnyType:\:\Onphp\
+PrimitiveArray:\:\Onphp\
+PrimitiveRange:\:\Onphp\
+PrimitiveIpRange:\:\Onphp\
+FiltrablePrimitive:\:\Onphp\
+PrimitivePlainList:\:\Onphp\
+DateRangeList:\:\Onphp\
+PrimitiveNumber:\:\Onphp\
+PrimitivePolymorphicIdentifier:\:\Onphp\
+PrimitiveTernary:\:\Onphp\
+PrimitiveHttpUrl:\:\Onphp\
+PrimitiveTime:\:\Onphp\
+ExplodedPrimitive:\:\Onphp\
+DialectString:\:\Onphp\
+ExtractPart:\:\Onphp\
+SQLFullOuterJoin:\:\Onphp\
+DatePart:\:\Onphp\
+DBSchema:\:\Onphp\
+DBValue:\:\Onphp\
+OrderChain:\:\Onphp\
+DBRaw:\:\Onphp\
+SQLChain:\:\Onphp\
+DBBinary:\:\Onphp\
+TruncateQuery:\:\Onphp\
+InsertQuery:\:\Onphp\
+TimeIntervalsGenerator:\:\Onphp\
+DeleteQuery:\:\Onphp\
+FullTextRank:\:\Onphp\
+Joiner:\:\Onphp\
+DataType:\:\Onphp\
+SQLTableName:\:\Onphp\
+DBField:\:\Onphp\
+FieldGroup:\:\Onphp\
+SelectField:\:\Onphp\
+SQLArray:\:\Onphp\
+SQLBaseJoin:\:\Onphp\
+SQLJoin:\:\Onphp\
+DBColumn:\:\Onphp\
+QueryIdentification:\:\Onphp\
+SQLLeftJoin:\:\Onphp\
+OSQL:\:\Onphp\
+FromTable:\:\Onphp\
+SQLFunction:\:\Onphp\
+Query:\:\Onphp\
+FullText:\:\Onphp\
+ForeignChangeAction:\:\Onphp\
+DropTableQuery:\:\Onphp\
+Castable:\:\Onphp\
+QueryCombination:\:\Onphp\
+CreateTableQuery:\:\Onphp\
+JoinCapableQuery:\:\Onphp\
+SQLRightJoin:\:\Onphp\
+FieldTable:\:\Onphp\
+SelectQuery:\:\Onphp\
+QuerySkeleton:\:\Onphp\
+GroupBy:\:\Onphp\
+UpdateQuery:\:\Onphp\
+InsertOrUpdateQuery:\:\Onphp\
+QueryResult:\:\Onphp\
+FullTextSearch:\:\Onphp\
+QueryChain:\:\Onphp\
+CombineQuery:\:\Onphp\
+OrderBy:\:\Onphp\
+DBTable:\:\Onphp\
+;unknown:
+Redis:\:\
+RedisException:\:\
+;now implemented yet
+TaggableDaoWorker:\:\Onphp\
\ No newline at end of file
diff --git a/nsConverter/replace.config/onphp.main.ini b/nsConverter/replace.config/onphp.main.ini
new file mode 100644
index 0000000000..4263678b40
--- /dev/null
+++ b/nsConverter/replace.config/onphp.main.ini
@@ -0,0 +1,464 @@
+ObjectToFormConverter:\:\Onphp\
+ScopeToFormImporter:\:\Onphp\
+ObjectToDirectoryBinder:\:\Onphp\
+ObjectToDTOConverter:\:\Onphp\
+ObjectToFormSetter:\:\Onphp\
+ObjectBuilder:\:\Onphp\
+FormToScopeExporter:\:\Onphp\
+DirectoryBuilder:\:\Onphp\
+FormBuilder:\:\Onphp\
+DTOBuilder:\:\Onphp\
+ObjectToObjectCast:\:\Onphp\
+FormToObjectConverter:\:\Onphp\
+DirectoryToObjectBinder:\:\Onphp\
+DTOToScopeConverter:\:\Onphp\
+DTOToFormImporter:\:\Onphp\
+PrototypedMethodCaller:\:\Onphp\
+PrototypedSetter:\:\Onphp\
+PrototypedGetter:\:\Onphp\
+DirectoryContext:\:\Onphp\
+PrototypedBuilder:\:\Onphp\
+EntityProto:\:\Onphp\
+PrototypedEntity:\:\Onphp\
+FormExporter:\:\Onphp\
+FormGetter:\:\Onphp\
+DirectorySetter:\:\Onphp\
+FormSetter:\:\Onphp\
+DirectoryMutator:\:\Onphp\
+ScopeGetter:\:\Onphp\
+FormImporter:\:\Onphp\
+ScopeSetter:\:\Onphp\
+DirectoryGetter:\:\Onphp\
+ObjectGetter:\:\Onphp\
+DTOSetter:\:\Onphp\
+DTOGetter:\:\Onphp\
+ObjectSetter:\:\Onphp\
+FormMutator:\:\Onphp\
+FormHardenedSetter:\:\Onphp\
+MakeCommand:\:\Onphp\
+Controller:\:\Onphp\
+AddCommand:\:\Onphp\
+Model:\:\Onphp\
+DecoratorController:\:\Onphp\
+CarefulDatabaseRunner:\:\Onphp\
+CommandChain:\:\Onphp\
+ControllersCollection:\:\Onphp\
+ImportCommand:\:\Onphp\
+EditorCommand:\:\Onphp\
+BaseEditor:\:\Onphp\
+SaveCommand:\:\Onphp\
+ForbiddenCommand:\:\Onphp\
+ProxyController:\:\Onphp\
+DropCommand:\:\Onphp\
+PrototypedEditor:\:\Onphp\
+NullController:\:\Onphp\
+CarefulCommand:\:\Onphp\
+EditCommand:\:\Onphp\
+HttpRequest:\:\Onphp\
+ModelAndView:\:\Onphp\
+MethodMappedController:\:\Onphp\
+TakeCommand:\:\Onphp\
+EditorController:\:\Onphp\
+HandlerMapping:\:\Onphp\
+MonolithicController:\:\Onphp\
+Base62Utils:\:\Onphp\
+Crypter:\:\Onphp\
+CryptoFunctions:\:\Onphp\
+DiffieHellmanKeyPair:\:\Onphp\
+DiffieHellmanParameters:\:\Onphp\
+KeyPair:\:\Onphp\
+ScopeNavigationSchema:\:\Onphp\
+SimpleApplicationUrl:\:\Onphp\
+ApplicationUrl:\:\Onphp\
+MailAddress:\:\Onphp\
+MailException:\:\Onphp\
+MailEncoding:\:\Onphp\
+MailBuilder:\:\Onphp\
+MimePart:\:\Onphp\
+MailNotSentException:\:\Onphp\
+MimeMail:\:\Onphp\
+Mail:\:\Onphp\
+GenericUri:\:\Onphp\
+PercentEncodingNormalizator:\:\Onphp\
+HttpUrl:\:\Onphp\
+Url:\:\Onphp\
+Urn:\:\Onphp\
+HttpClient:\:\Onphp\
+HttpResponse:\:\Onphp\
+HttpStatus:\:\Onphp\
+CurlHttpClient:\:\Onphp\
+HttpMethod:\:\Onphp\
+HeaderUtils:\:\Onphp\
+Cookie:\:\Onphp\
+CookieCollection:\:\Onphp\
+HeaderParser:\:\Onphp\
+CurlHttpResponse:\:\Onphp\
+DTOMessage:\:\Onphp\
+DTOClass:\:\Onphp\
+PrototypedSoapClient:\:\Onphp\
+IpRange:\:\Onphp\
+IpUtils:\:\Onphp\
+IpAddress:\:\Onphp\
+IpNetwork:\:\Onphp\
+PinbedPeclMemcached:\:\Onphp\
+PinbedPgSQL:\:\Onphp\
+PinbaClient:\:\Onphp\
+PinbedMemcached:\:\Onphp\
+JsonView:\:\Onphp\
+RedirectToView:\:\Onphp\
+EmptyView:\:\Onphp\
+DebugPhpView:\:\Onphp\
+MultiPrefixPhpViewResolver:\:\Onphp\
+CleanRedirectView:\:\Onphp\
+JsonXssView:\:\Onphp\
+EmptyGifView:\:\Onphp\
+HttpErrorView:\:\Onphp\
+SimplePhpView:\:\Onphp\
+View:\:\Onphp\
+RedirectView:\:\Onphp\
+JsonPView:\:\Onphp\
+PartViewer:\:\Onphp\
+PhpViewResolver:\:\Onphp\
+ViewResolver:\:\Onphp\
+InnerMetaProperty:\:\Onphp\
+Comparator:\:\Onphp\
+CollectionItem:\:\Onphp\
+ImageType:\:\Onphp\
+CalendarMonthWeekly:\:\Onphp\
+AbstractProtoClass:\:\Onphp\
+RequestType:\:\Onphp\
+StandardComparator:\:\Onphp\
+FloatRange:\:\Onphp\
+CalendarDay:\:\Onphp\
+SingleRange:\:\Onphp\
+TimestampRange:\:\Onphp\
+IdentifiableTree:\:\Onphp\
+TempFile:\:\Onphp\
+NamedTree:\:\Onphp\
+CallChain:\:\Onphp\
+DateRange:\:\Onphp\
+BaseRange:\:\Onphp\
+Range:\:\Onphp\
+SerializedObjectComparator:\:\Onphp\
+IntegerSet:\:\Onphp\
+TempDirectory:\:\Onphp\
+IsoCurrency:\:\Onphp\
+ImmutableObjectComparator:\:\Onphp\
+Hstore:\:\Onphp\
+CalendarWeek:\:\Onphp\
+TransparentFile:\:\Onphp\
+LightMetaProperty:\:\Onphp\
+MimeType:\:\Onphp\
+AbstractCollection:\:\Onphp\
+DateObjectComparator:\:\Onphp\
+Collection:\:\Onphp\
+TextMessage:\:\Onphp\
+TextFileReceiver:\:\Onphp\
+TextFileSender:\:\Onphp\
+TextFileQueueBrowser:\:\Onphp\
+TextFileQueue:\:\Onphp\
+MessageQueueReceiver:\:\Onphp\
+MessageQueue:\:\Onphp\
+MessageQueueSender:\:\Onphp\
+MessageQueueBrowser:\:\Onphp\
+Message:\:\Onphp\
+SharedMemorySegmentHandler:\:\Onphp\
+FileSystemSegmentHandler:\:\Onphp\
+OptimizerSegmentHandler:\:\Onphp\
+CacheSegmentHandler:\:\Onphp\
+ApcSegmentHandler:\:\Onphp\
+MessageSegmentHandler:\:\Onphp\
+XCacheSegmentHandler:\:\Onphp\
+SegmentHandler:\:\Onphp\
+eAcceleratorSegmentHandler:\:\Onphp\
+BaseDaoWorker:\:\Onphp\
+TransparentDaoWorker:\:\Onphp\
+CustomDataScopedWorker:\:\Onphp\
+SmartDaoWorker:\:\Onphp\
+CommonDaoWorker:\:\Onphp\
+NullDaoWorker:\:\Onphp\
+DalayedDropDaoWorker:\:\Onphp\
+CacheDaoWorker:\:\Onphp\
+VoodooDaoWorker:\:\Onphp\
+UncacherBaseDaoWorker:\:\Onphp\
+UncacherGenericDAO:\:\Onphp\
+UncacherCacheDaoWorkerLists:\:\Onphp\
+UncacherNullDaoWorker:\:\Onphp\
+UncachersPool:\:\Onphp\
+UncacherTaggableDaoWorker:\:\Onphp\
+UncacherSmartDaoWorkerLists:\:\Onphp\
+UncacherCommonDaoWorker:\:\Onphp\
+UncacherBase:\:\Onphp\
+UncacherVoodoDaoWorkerLists:\:\Onphp\
+FullTextDAO:\:\Onphp\
+ProtoDAO:\:\Onphp\
+StorableDAO:\:\Onphp\
+BaseDAO:\:\Onphp\
+DAOConnected:\:\Onphp\
+GenericDAO:\:\Onphp\
+OneToManyLinkedWorker:\:\Onphp\
+UnifiedContainerWorker:\:\Onphp\
+ManyToManyLinked:\:\Onphp\
+OneToManyLinkedLazy:\:\Onphp\
+ManyToManyLinkedLazy:\:\Onphp\
+ManyToManyLinkedWorker:\:\Onphp\
+UnifiedContainer:\:\Onphp\
+ManyToManyLinkedFull:\:\Onphp\
+OneToManyLinkedFull:\:\Onphp\
+OneToManyLinked:\:\Onphp\
+Csv:\:\Onphp\
+SgmlOpenTag:\:\Onphp\
+Cdata:\:\Onphp\
+SgmlToken:\:\Onphp\
+HtmlAssembler:\:\Onphp\
+HtmlTokenizer:\:\Onphp\
+SgmlTag:\:\Onphp\
+SgmlIgnoredTag:\:\Onphp\
+SgmlEndTag:\:\Onphp\
+FeedChannel:\:\Onphp\
+RssFeedFormat:\:\Onphp\
+FeedItemContent:\:\Onphp\
+FeedItemContentType:\:\Onphp\
+RssItemWorker:\:\Onphp\
+FeedItemWorker:\:\Onphp\
+AtomItemWorker:\:\Onphp\
+YandexRssFeedItem:\:\Onphp\
+AtomChannelWorker:\:\Onphp\
+AtomFeedFormat:\:\Onphp\
+YandexRssFeedFormat:\:\Onphp\
+FeedFormat:\:\Onphp\
+RssChannelWorker:\:\Onphp\
+FeedChannelWorker:\:\Onphp\
+FeedItem:\:\Onphp\
+FeedReader:\:\Onphp\
+YandexRssItemWorker:\:\Onphp\
+GoogleChartDataScaling:\:\Onphp\
+ChartLineStyle:\:\Onphp\
+ChartLabelStyle:\:\Onphp\
+GoogleChartLegendPositionType:\:\Onphp\
+GoogleChartSolidFillCollection:\:\Onphp\
+LabelStyleType:\:\Onphp\
+GoogleChartDataSimpleEncoding:\:\Onphp\
+GoogleChartAxisType:\:\Onphp\
+GoogleChartLabelStyle:\:\Onphp\
+GoogleChartAxisLabel:\:\Onphp\
+GoogleChartSolidFill:\:\Onphp\
+GoogleChartDataEncoding:\:\Onphp\
+BaseGoogleChartDataEncoding:\:\Onphp\
+GoogleChartLine:\:\Onphp\
+GoogleChartColor:\:\Onphp\
+GoogleChartLineStyle:\:\Onphp\
+GoogleNormalizedLineChart:\:\Onphp\
+GoogleChartSize:\:\Onphp\
+GoogleChartAxisCollection:\:\Onphp\
+GoogleGridedLineChart:\:\Onphp\
+GoogleChart:\:\Onphp\
+GoogleChartLabelStyleNumberType:\:\Onphp\
+GoogleChartSolidFillType:\:\Onphp\
+GoogleChartDataSet:\:\Onphp\
+GoogleChartPiece:\:\Onphp\
+BaseGoogleChartData:\:\Onphp\
+GoogleChartData:\:\Onphp\
+BaseGoogleChartLabelStyleType:\:\Onphp\
+GoogleChartLabel:\:\Onphp\
+GoogleChartDataRange:\:\Onphp\
+GoogleChartLegend:\:\Onphp\
+GooglePieChart:\:\Onphp\
+GoogleLineChart:\:\Onphp\
+GoogleChartGrid:\:\Onphp\
+BaseGoogleChartParameter:\:\Onphp\
+GoogleChartDataTextEncoding:\:\Onphp\
+GoogleChartTitle:\:\Onphp\
+GoogleChartAxis:\:\Onphp\
+GoogleChartType:\:\Onphp\
+BaseGoogleChartStyle:\:\Onphp\
+OqlTokenizer:\:\Onphp\
+OqlToken:\:\Onphp\
+OqlGroupByParser:\:\Onphp\
+OqlOrderByParser:\:\Onphp\
+OqlParser:\:\Onphp\
+OqlSelectParser:\:\Onphp\
+OqlWhereParser:\:\Onphp\
+OqlSelectPropertiesParser:\:\Onphp\
+OqlHavingParser:\:\Onphp\
+OQL:\:\Onphp\
+OqlInExpression:\:\Onphp\
+OqlOrderByExpression:\:\Onphp\
+OqlQueryExpression:\:\Onphp\
+OqlPrefixMinusExpression:\:\Onphp\
+OqlQueryParameter:\:\Onphp\
+OqlQueryListedClause:\:\Onphp\
+OqlHavingClause:\:\Onphp\
+OqlSelectQuery:\:\Onphp\
+OqlProjectionClause:\:\Onphp\
+OqlWhereClause:\:\Onphp\
+OqlQueryExpressionClause:\:\Onphp\
+OqlOrderByClause:\:\Onphp\
+OqlSelectPropertiesClause:\:\Onphp\
+OqlQuery:\:\Onphp\
+OqlQueryClause:\:\Onphp\
+MtRandomSource:\:\Onphp\
+BigNumberFactory:\:\Onphp\
+GmpBigIntegerFactory:\:\Onphp\
+TupleFunctor:\:\Onphp\
+FileRandomSource:\:\Onphp\
+BigInteger:\:\Onphp\
+GmpBigInteger:\:\Onphp\
+RandomSource:\:\Onphp\
+MathUtils:\:\Onphp\
+AutoloaderClassNotFound:\:\Onphp\
+NamespaceDirScaner:\:\Onphp\
+AutoloaderNoCache:\:\Onphp\
+NamespaceResolverPSR0:\:\Onphp\
+NamespaceResolver:\:\Onphp\
+Autoloader:\:\Onphp\
+NamespaceDirScanerOnPHP:\:\Onphp\
+AutoloaderWithNamespace:\:\Onphp\
+NamespaceDirScanerPSR0:\:\Onphp\
+AutoloaderPool:\:\Onphp\
+NamespaceResolverOnPHP:\:\Onphp\
+AutoloaderRecachable:\:\Onphp\
+AutoloaderClassPathCache:\:\Onphp\
+Projection:\:\Onphp\
+FetchStrategy:\:\Onphp\
+Criteria:\:\Onphp\
+PropertyPath:\:\Onphp\
+GroupByClassProjection:\:\Onphp\
+PropertyProjection:\:\Onphp\
+RowCountProjection:\:\Onphp\
+AverageNumberProjection:\:\Onphp\
+HavingProjection:\:\Onphp\
+BaseProjection:\:\Onphp\
+MappableObjectProjection:\:\Onphp\
+DistinctCountProjection:\:\Onphp\
+ClassProjection:\:\Onphp\
+AggregateProjection:\:\Onphp\
+ObjectProjection:\:\Onphp\
+SumProjection:\:\Onphp\
+MinimalNumberProjection:\:\Onphp\
+GroupByPropertyProjection:\:\Onphp\
+MaximalNumberProjection:\:\Onphp\
+CountProjection:\:\Onphp\
+ProjectionChain:\:\Onphp\
+OpenIdConsumerResult:\:\Onphp\
+OpenIdConsumerSetupRequired:\:\Onphp\
+OpenIdConsumerAssociation:\:\Onphp\
+OpenIdExtension:\:\Onphp\
+OpenIdExtensionSreg:\:\Onphp\
+OpenIdException:\:\Onphp\
+OpenIdConsumerAssociationManager:\:\Onphp\
+OpenIdExtensionAttributeExchange:\:\Onphp\
+OpenIdConsumerFail:\:\Onphp\
+OpenIdConsumer:\:\Onphp\
+OpenIdConsumerCancel:\:\Onphp\
+OpenIdConsumerPositive:\:\Onphp\
+OpenIdCredentials:\:\Onphp\
+SimplifiedArrayAccess:\:\Onphp\
+AbstractList:\:\Onphp\
+PlainList:\:\Onphp\
+IndexedList:\:\Onphp\
+MobileUtils:\:\Onphp\
+MobileRequestDetector:\:\Onphp\
+ArchiverException:\:\Onphp\
+TarArchive:\:\Onphp\
+InfoZipArchive:\:\Onphp\
+FileArchive:\:\Onphp\
+TuringImage:\:\Onphp\
+CurvedStringDrawer:\:\Onphp\
+Drawer:\:\Onphp\
+TextDrawer:\:\Onphp\
+LinearStringDrawer:\:\Onphp\
+RandomLinesBackgroundDrawer:\:\Onphp\
+CellBackgroundDrawer:\:\Onphp\
+InclinedStringDrawer:\:\Onphp\
+CircleBackgroundDrawer:\:\Onphp\
+WavesBackgroundDrawer:\:\Onphp\
+BackgroundDrawer:\:\Onphp\
+Color:\:\Onphp\
+ColorArray:\:\Onphp\
+ErrorDrawer:\:\Onphp\
+CodeGenerator:\:\Onphp\
+ArgumentParser:\:\Onphp\
+FormToArgumentsConverter:\:\Onphp\
+DebugUtils:\:\Onphp\
+FullTextUtils:\:\Onphp\
+DaoSynchronizer:\:\Onphp\
+TextUtils:\:\Onphp\
+DateUtils:\:\Onphp\
+TidyValidator:\:\Onphp\
+CommonDoctypeDeclaration:\:\Onphp\
+ClassUtils:\:\Onphp\
+TypesUtils:\:\Onphp\
+CustomizableDaoSynchronizer:\:\Onphp\
+SynchronizableObject:\:\Onphp\
+DaoUtils:\:\Onphp\
+FileUtils:\:\Onphp\
+CyrillicPairs:\:\Onphp\
+RussianTextUtils:\:\Onphp\
+ArrayUtils:\:\Onphp\
+WebMoneyUtils:\:\Onphp\
+DaoIterator:\:\Onphp\
+XmlRpcClient:\:\Onphp\
+UrlParamsUtils:\:\Onphp\
+SortHelper:\:\Onphp\
+DaoMoveHelper:\:\Onphp\
+DoctypeDeclaration:\:\Onphp\
+LogicUtils:\:\Onphp\
+ContentTypeHeader:\:\Onphp\
+AMQPServerException:\:\Onphp\
+AMQPServerConnectionException:\:\Onphp\
+AMQPQueueConfig:\:\Onphp\
+AMQPSelective:\:\Onphp\
+AMQPBitmaskResolver:\:\Onphp\
+AMQPInterface:\:\Onphp\
+AMQPChannelInterface:\:\Onphp\
+AMQPOutgoingMessage:\:\Onphp\
+AMQPDefaultConsumer:\:\Onphp\
+AMQPExchangeConfig:\:\Onphp\
+AMQPIncomingMessage:\:\Onphp\
+AMQPBaseConfig:\:\Onphp\
+AMQPBaseChannel:\:\Onphp\
+AMQPBaseMessage:\:\Onphp\
+AMQPProxyChannel:\:\Onphp\
+AMQPPool:\:\Onphp\
+AMQP:\:\Onphp\
+AMQPConsumer:\:\Onphp\
+AMQPCredentials:\:\Onphp\
+AMQPExchangeType:\:\Onphp\
+AMQPQueueConsumer:\:\Onphp\
+AMQPPeclQueueBitmask:\:\Onphp\
+AMQPPeclExchangeBitmask:\:\Onphp\
+AMQPPeclQueueConsumer:\:\Onphp\
+AMQPPeclChannel:\:\Onphp\
+AMQPPeclBaseBitmask:\:\Onphp\
+AMQPPecl:\:\Onphp\
+AMQPPeclIncomingMessageAdapter:\:\Onphp\
+AMQPPeclOutgoingMessageBitmask:\:\Onphp\
+RouterBaseRule:\:\Onphp\
+RouterException:\:\Onphp\
+RouterStaticRule:\:\Onphp\
+Router:\:\Onphp\
+RouterRegexpRule:\:\Onphp\
+RouterTransparentRule:\:\Onphp\
+RouterRule:\:\Onphp\
+RouterUrlHelper:\:\Onphp\
+RouterRewrite:\:\Onphp\
+RouterHostnameRule:\:\Onphp\
+RouterChainRule:\:\Onphp\
+FileInputStream:\:\Onphp\
+OutputStream:\:\Onphp\
+BufferedReader:\:\Onphp\
+StringInputStream:\:\Onphp\
+Socket:\:\Onphp\
+Reader:\:\Onphp\
+BufferedInputStream:\:\Onphp\
+SocketOutputStream:\:\Onphp\
+SocketInputStream:\:\Onphp\
+FileOutputStream:\:\Onphp\
+FileReader:\:\Onphp\
+StringReader:\:\Onphp\
+InputStream:\:\Onphp\
+BaseLogger:\:\Onphp\
+StreamLogger:\:\Onphp\
+LogLevel:\:\Onphp\
+LogRecord:\:\Onphp\
diff --git a/nsConverter/replace.config/onphp.meta.ini b/nsConverter/replace.config/onphp.meta.ini
new file mode 100644
index 0000000000..7c9dde8eea
--- /dev/null
+++ b/nsConverter/replace.config/onphp.meta.ini
@@ -0,0 +1,63 @@
+Format:\:\Onphp\
+TextOutput:\:\Onphp\
+MetaClass:\:\Onphp\
+MetaRelation:\:\Onphp\
+MetaClassType:\:\Onphp\
+MetaOutput:\:\Onphp\
+ConsoleMode:\:\Onphp\
+MetaClassProperty:\:\Onphp\
+ColoredTextOutput:\:\Onphp\
+MetaConfiguration:\:\Onphp\
+BasePattern:\:\Onphp\
+InternalClassPattern:\:\Onphp\
+EnumerationClassPattern:\:\Onphp\
+SpookedEnumerationPattern:\:\Onphp\
+SpookedClassPattern:\:\Onphp\
+StraightMappingPattern:\:\Onphp\
+DictionaryClassPattern:\:\Onphp\
+EnumClassPattern:\:\Onphp\
+ValueObjectPattern:\:\Onphp\
+SpookedEnumPattern:\:\Onphp\
+GenerationPattern:\:\Onphp\
+AbstractClassPattern:\:\Onphp\
+ContainerClassBuilder:\:\Onphp\
+AutoDaoBuilder:\:\Onphp\
+BaseBuilder:\:\Onphp\
+EnumerationClassBuilder:\:\Onphp\
+AutoProtoClassBuilder:\:\Onphp\
+SchemaBuilder:\:\Onphp\
+ProtoClassBuilder:\:\Onphp\
+DaoBuilder:\:\Onphp\
+OnceBuilder:\:\Onphp\
+AutoClassBuilder:\:\Onphp\
+DictionaryDaoBuilder:\:\Onphp\
+EnumClassBuilder:\:\Onphp\
+BusinessClassBuilder:\:\Onphp\
+BigIntegerType:\:\Onphp\
+IpAddressType:\:\Onphp\
+FloatType:\:\Onphp\
+NumericType:\:\Onphp\
+TimestampRangeType:\:\Onphp\
+InternalType:\:\Onphp\
+ObjectType:\:\Onphp\
+FixedLengthStringType:\:\Onphp\
+TimestampType:\:\Onphp\
+BooleanType:\:\Onphp\
+DateType:\:\Onphp\
+BinaryType:\:\Onphp\
+StringType:\:\Onphp\
+TimeType:\:\Onphp\
+InetType:\:\Onphp\
+BasePropertyType:\:\Onphp\
+RangeType:\:\Onphp\
+IpRangeType:\:\Onphp\
+HstoreType:\:\Onphp\
+DoubleType:\:\Onphp\
+SmallIntegerType:\:\Onphp\
+UnsignedBigIntegerType:\:\Onphp\
+UnsignedSmallIntegerType:\:\Onphp\
+TimestampTZType:\:\Onphp\
+IntegerType:\:\Onphp\
+UnsignedIntegerType:\:\Onphp\
+DateRangeType:\:\Onphp\
+HttpUrlType:\:\Onphp\
diff --git a/nsConverter/replace.config/onphp.test.ini b/nsConverter/replace.config/onphp.test.ini
new file mode 100644
index 0000000000..1e698fa621
--- /dev/null
+++ b/nsConverter/replace.config/onphp.test.ini
@@ -0,0 +1,276 @@
+ServerVarUtils:\:\Onphp\Test\
+TestTables:\:\Onphp\Test\
+TestCase:\:\Onphp\Test\
+TestCaseDB:\:\Onphp\Test\
+DBTestPool:\:\Onphp\Test\
+Spook:\:\Onphp\Test\
+DBTestCreator:\:\Onphp\Test\
+TestSuite:\:\Onphp\Test\
+TestCaseDAO:\:\Onphp\Test\
+EntityProtoConvertersTest:\:\Onphp\Test\
+DirectoryItemBase:\:\Onphp\Test\
+DirectoryItem:\:\Onphp\Test\
+EntityProtoDirectoryItem:\:\Onphp\Test\
+HeaderParserTest:\:\Onphp\Test\
+HstoreTest:\:\Onphp\Test\
+CrypterTest:\:\Onphp\Test\
+GenericUriTest:\:\Onphp\Test\
+EnumerationTest:\:\Onphp\Test\
+CompatatorTest:\:\Onphp\Test\
+CompatatorTestObject:\:\Onphp\Test\
+OsqlDeleteTest:\:\Onphp\Test\
+MathUtilsTest:\:\Onphp\Test\
+MessagesTest:\:\Onphp\Test\
+OqlTokenizerTest:\:\Onphp\Test\
+DateUtilsTest:\:\Onphp\Test\
+JsonXssViewTest:\:\Onphp\Test\
+MimeMailTest:\:\Onphp\Test\
+CriteriaTest:\:\Onphp\Test\
+ViewTest:\:\Onphp\Test\
+OsqlInsertTest:\:\Onphp\Test\
+Base62UtilsTest:\:\Onphp\Test\
+CryptoTest:\:\Onphp\Test\
+RandomSourceStub:\:\Onphp\Test\
+OsqlSelectTest:\:\Onphp\Test\
+FloatRangeTest:\:\Onphp\Test\
+OsqlReturningTest:\:\Onphp\Test\
+GoogleChartTest:\:\Onphp\Test\
+JsonPViewTest:\:\Onphp\Test\
+SimpleStringableObject:\:\Onphp\Test\
+ClassUtilsTest:\:\Onphp\Test\
+ClassUtilsTestInterface:\:\Onphp\Test\
+ClassUtilsTestClass:\:\Onphp\Test\
+ClassUtilsTestClassChild:\:\Onphp\Test\
+ClassUtilsTestAbstract:\:\Onphp\Test\
+OpenIdTest:\:\Onphp\Test\
+HttpResponseStub:\:\Onphp\Test\
+HttpClientStub:\:\Onphp\Test\
+TextUtilsTest:\:\Onphp\Test\
+CsvTest:\:\Onphp\Test\
+FeedReaderTest:\:\Onphp\Test\
+RedisNoSQLTest:\:\Onphp\Test\
+MathTest:\:\Onphp\Test\
+HttpUtilsTest:\:\Onphp\Test\
+RangeTest:\:\Onphp\Test\
+JsonViewTest:\:\Onphp\Test\
+OqlSelectTest:\:\Onphp\Test\
+OqlSelectClauseTest:\:\Onphp\Test\
+CurlHttpClientTest:\:\Onphp\Test\
+CookieTest:\:\Onphp\Test\
+MailTest:\:\Onphp\Test\
+IpUtilsTest:\:\Onphp\Test\
+IpBaseRangeTest:\:\Onphp\Test\
+IpNetworktest:\:\Onphp\Test\
+IpAddressToSignedIntTest:\:\Onphp\Test\
+AutoloaderClassPathCacheTest:\:\Onphp\Test\
+NamespaceResolverTest:\:\Onphp\Test\
+FileUtilsTest:\:\Onphp\Test\
+SocketTest:\:\Onphp\Test\
+PinbaTest:\:\Onphp\Test\
+RunkitCallback:\:\Onphp\Test\
+UrlParamsUtilsTest:\:\Onphp\Test\
+WebMoneyUtilsTest:\:\Onphp\Test\
+TypesUtilsTest:\:\Onphp\Test\
+ArrayUtilsTest:\:\Onphp\Test\
+SortableObjectForTheTest:\:\Onphp\Test\
+SortableTextDataObjectForTheTest:\:\Onphp\Test\
+AMQPTestCaseNoAckQueueConsumer:\:\Onphp\Test\
+AMQPTestCaseAutoAckQueueConsumer:\:\Onphp\Test\
+AMQPPeclTest:\:\Onphp\Test\
+RouterRegexpRuleTest:\:\Onphp\Test\
+RouterBaseRuleStub:\:\Onphp\Test\
+RouterBaseRuleTest:\:\Onphp\Test\
+RouterRewriteTest:\:\Onphp\Test\
+RouterHostnameRuleTest:\:\Onphp\Test\
+RouterStaticRuleTest:\:\Onphp\Test\
+RouterChainRuleTest:\:\Onphp\Test\
+RouterTransparentRuleTest:\:\Onphp\Test\
+CountAndUnifiedDBTest:\:\Onphp\Test\
+IdDBTest:\:\Onphp\Test\
+IpDBTest:\:\Onphp\Test\
+DataDBTest:\:\Onphp\Test\
+InnerTransactionDBTest:\:\Onphp\Test\
+RecursionDBTest:\:\Onphp\Test\
+CriteriaDBTest:\:\Onphp\Test\
+CacheAndLazyDBTest:\:\Onphp\Test\
+PgSQLFullTextSearchDBTest:\:\Onphp\Test\
+HstoreDBTest:\:\Onphp\Test\
+AbstractProtoClassFillQueryTest:\:\Onphp\Test\
+SingletonTestInstance:\:\Onphp\Test\
+SingletonSingleArgumentTestInstance:\:\Onphp\Test\
+SingletonMultiArgumentTestInstance:\:\Onphp\Test\
+SingletonTest:\:\Onphp\Test\
+IntervalUnitTest:\:\Onphp\Test\
+TimestampTZTest:\:\Onphp\Test\
+PrimitiveTimestampTest:\:\Onphp\Test\
+TimestampTest:\:\Onphp\Test\
+PrimitiveIpTest:\:\Onphp\Test\
+FiltersTest:\:\Onphp\Test\
+CalendarDayTest:\:\Onphp\Test\
+DateTest:\:\Onphp\Test\
+AggregateCacheTest:\:\Onphp\Test\
+PrimitiveDateRangeTest:\:\Onphp\Test\
+BaseCachesTest:\:\Onphp\Test\
+LockerTest:\:\Onphp\Test\
+PrimitiveIdentifierTest:\:\Onphp\Test\
+PrimitiveStringTest:\:\Onphp\Test\
+PrimitiveTimestampTZTest:\:\Onphp\Test\
+TruncateQueryTest:\:\Onphp\Test\
+InnerTransactionTest:\:\Onphp\Test\
+PrimitiveHstoreTest:\:\Onphp\Test\
+PrimitiveCustomError:\:\Onphp\Test\
+PrimitiveAliasTest:\:\Onphp\Test\
+PrimitiveEnumerationTest:\:\Onphp\Test\
+PrimitiveTimeTest:\:\Onphp\Test\
+PrimitiveInetTest:\:\Onphp\Test\
+SequentialCacheTest:\:\Onphp\Test\
+LogicTest:\:\Onphp\Test\
+PrimitiveEnumTest:\:\Onphp\Test\
+AssertTest:\:\Onphp\Test\
+PrimitiveNumberTest:\:\Onphp\Test\
+FormPrimitivesDateTest:\:\Onphp\Test\
+FormTest:\:\Onphp\Test\
+UnionTest:\:\Onphp\Test\
+DeleteQueryTest:\:\Onphp\Test\
+DbConnectionTest:\:\Onphp\Test\
+PrimitiveClassTest:\:\Onphp\Test\
+DateRangeTest:\:\Onphp\Test\
+TestContactValue:\:\Onphp\Test\
+TestStringIdentifierRelated:\:\Onphp\Test\
+TestEncapsulant:\:\Onphp\Test\
+TestPart:\:\Onphp\Test\
+Credentials:\:\Onphp\Test\
+TestUserWithContactExtended:\:\Onphp\Test\
+TestStringIdentifier:\:\Onphp\Test\
+TestSubItem:\:\Onphp\Test\
+TestUserWithContact:\:\Onphp\Test\
+TestCity:\:\Onphp\Test\
+TestRange:\:\Onphp\Test\
+TestType:\:\Onphp\Test\
+TestItem:\:\Onphp\Test\
+TestUser:\:\Onphp\Test\
+TestChildObject:\:\Onphp\Test\
+TestObject:\:\Onphp\Test\
+TestBinaryStuff:\:\Onphp\Test\
+TestLazy:\:\Onphp\Test\
+TestSelfRecursion:\:\Onphp\Test\
+TestInternetProvider:\:\Onphp\Test\
+TestTree:\:\Onphp\Test\
+TestContactValueExtended:\:\Onphp\Test\
+TestParentObject:\:\Onphp\Test\
+ProtoTestSubItem:\:\Onphp\Test\
+ProtoTestContactValueExtended:\:\Onphp\Test\
+ProtoTestStringIdentifierRelated:\:\Onphp\Test\
+ProtoCredentials:\:\Onphp\Test\
+ProtoTestPart:\:\Onphp\Test\
+ProtoTestTree:\:\Onphp\Test\
+ProtoTestUser:\:\Onphp\Test\
+ProtoTestContactValue:\:\Onphp\Test\
+ProtoTestEncapsulant:\:\Onphp\Test\
+ProtoTestBinaryStuff:\:\Onphp\Test\
+ProtoTestUserWithContact:\:\Onphp\Test\
+ProtoTestObject:\:\Onphp\Test\
+ProtoTestCity:\:\Onphp\Test\
+ProtoTestParentObject:\:\Onphp\Test\
+ProtoTestStringIdentifier:\:\Onphp\Test\
+ProtoTestSelfRecursion:\:\Onphp\Test\
+ProtoTestRange:\:\Onphp\Test\
+ProtoTestItem:\:\Onphp\Test\
+ProtoTestLazy:\:\Onphp\Test\
+ProtoTestType:\:\Onphp\Test\
+ProtoTestInternetProvider:\:\Onphp\Test\
+ProtoTestChildObject:\:\Onphp\Test\
+ProtoTestUserWithContactExtended:\:\Onphp\Test\
+TestUserWithContactExtendedDAO:\:\Onphp\Test\
+TestItemSubItemsDAO:\:\Onphp\Test\
+TestLazyDAO:\:\Onphp\Test\
+TestUserDAO:\:\Onphp\Test\
+TestEncapsulantDAO:\:\Onphp\Test\
+TestItemDAO:\:\Onphp\Test\
+TestRangeDAO:\:\Onphp\Test\
+TestSubItemDAO:\:\Onphp\Test\
+TestEncapsulantCitiesDAO:\:\Onphp\Test\
+TestStringIdentifierRelatedDAO:\:\Onphp\Test\
+TestObjectDAO:\:\Onphp\Test\
+TestSelfRecursionDAO:\:\Onphp\Test\
+TestUserEncapsulantsDAO:\:\Onphp\Test\
+TestInternetProviderDAO:\:\Onphp\Test\
+TestParentObjectDAO:\:\Onphp\Test\
+TestTypeDAO:\:\Onphp\Test\
+TestChildObjectDAO:\:\Onphp\Test\
+TestTreeDAO:\:\Onphp\Test\
+TestBinaryStuffDAO:\:\Onphp\Test\
+TestUserPartsDAO:\:\Onphp\Test\
+TestStringIdentifierDAO:\:\Onphp\Test\
+TestUserWithContactDAO:\:\Onphp\Test\
+TestPartDAO:\:\Onphp\Test\
+TestCityDAO:\:\Onphp\Test\
+TestObjectTypesDAO:\:\Onphp\Test\
+TestTypeObjectsDAO:\:\Onphp\Test\
+AutoTestSelfRecursion:\:\Onphp\Test\
+AutoTestContactValueExtended:\:\Onphp\Test\
+AutoTestTree:\:\Onphp\Test\
+AutoTestChildObject:\:\Onphp\Test\
+AutoTestCity:\:\Onphp\Test\
+AutoTestUserWithContactExtended:\:\Onphp\Test\
+AutoTestBinaryStuff:\:\Onphp\Test\
+AutoTestContactValue:\:\Onphp\Test\
+AutoTestInternetProvider:\:\Onphp\Test\
+AutoTestRange:\:\Onphp\Test\
+AutoTestSubItem:\:\Onphp\Test\
+AutoTestParentObject:\:\Onphp\Test\
+AutoTestItem:\:\Onphp\Test\
+AutoTestLazy:\:\Onphp\Test\
+AutoTestObject:\:\Onphp\Test\
+AutoCredentials:\:\Onphp\Test\
+AutoTestUser:\:\Onphp\Test\
+AutoTestStringIdentifier:\:\Onphp\Test\
+AutoTestEncapsulant:\:\Onphp\Test\
+AutoTestPart:\:\Onphp\Test\
+AutoTestType:\:\Onphp\Test\
+AutoTestStringIdentifierRelated:\:\Onphp\Test\
+AutoTestUserWithContact:\:\Onphp\Test\
+AutoProtoTestContactValue:\:\Onphp\Test\
+AutoProtoTestLazy:\:\Onphp\Test\
+AutoProtoTestParentObject:\:\Onphp\Test\
+AutoProtoTestRange:\:\Onphp\Test\
+AutoProtoTestUser:\:\Onphp\Test\
+AutoProtoTestCity:\:\Onphp\Test\
+AutoProtoTestStringIdentifier:\:\Onphp\Test\
+AutoProtoTestUserWithContact:\:\Onphp\Test\
+AutoProtoTestTree:\:\Onphp\Test\
+AutoProtoTestContactValueExtended:\:\Onphp\Test\
+AutoProtoCredentials:\:\Onphp\Test\
+AutoProtoTestInternetProvider:\:\Onphp\Test\
+AutoProtoTestChildObject:\:\Onphp\Test\
+AutoProtoTestBinaryStuff:\:\Onphp\Test\
+AutoProtoTestType:\:\Onphp\Test\
+AutoProtoTestItem:\:\Onphp\Test\
+AutoProtoTestSelfRecursion:\:\Onphp\Test\
+AutoProtoTestStringIdentifierRelated:\:\Onphp\Test\
+AutoProtoTestEncapsulant:\:\Onphp\Test\
+AutoProtoTestSubItem:\:\Onphp\Test\
+AutoProtoTestUserWithContactExtended:\:\Onphp\Test\
+AutoProtoTestPart:\:\Onphp\Test\
+AutoProtoTestObject:\:\Onphp\Test\
+AutoTestPartDAO:\:\Onphp\Test\
+AutoTestChildObjectDAO:\:\Onphp\Test\
+AutoTestUserWithContactDAO:\:\Onphp\Test\
+AutoTestUserWithContactExtendedDAO:\:\Onphp\Test\
+AutoTestStringIdentifierDAO:\:\Onphp\Test\
+AutoTestParentObjectDAO:\:\Onphp\Test\
+AutoTestLazyDAO:\:\Onphp\Test\
+AutoTestItemDAO:\:\Onphp\Test\
+AutoTestStringIdentifierRelatedDAO:\:\Onphp\Test\
+AutoTestTreeDAO:\:\Onphp\Test\
+AutoTestInternetProviderDAO:\:\Onphp\Test\
+AutoTestEncapsulantDAO:\:\Onphp\Test\
+AutoTestSubItemDAO:\:\Onphp\Test\
+AutoTestObjectDAO:\:\Onphp\Test\
+AutoTestRangeDAO:\:\Onphp\Test\
+AutoTestSelfRecursionDAO:\:\Onphp\Test\
+AutoTestBinaryStuffDAO:\:\Onphp\Test\
+AutoTestCityDAO:\:\Onphp\Test\
+AutoTestUserDAO:\:\Onphp\Test\
+AutoTestTypeDAO:\:\Onphp\Test\
+AllTests:\:\Onphp\Test\
\ No newline at end of file
diff --git a/nsConverter/replace.config/php.stubs.ini b/nsConverter/replace.config/php.stubs.ini
new file mode 100644
index 0000000000..2bfd9c13fb
--- /dev/null
+++ b/nsConverter/replace.config/php.stubs.ini
@@ -0,0 +1,231 @@
+finfo:\:\
+DOMException:\:\
+DOMStringList:\:\
+DOMNameList:\:\
+DOMImplementationList:\:\
+DOMImplementationSource:\:\
+DOMImplementation:\:\
+DOMNode:\:\
+DOMNameSpaceNode:\:\
+DOMDocumentFragment:\:\
+DOMDocument:\:\
+DOMNodeList:\:\
+DOMNamedNodeMap:\:\
+DOMCharacterData:\:\
+DOMAttr:\:\
+DOMElement:\:\
+DOMText:\:\
+DOMComment:\:\
+DOMTypeinfo:\:\
+DOMUserDataHandler:\:\
+DOMDomError:\:\
+DOMErrorHandler:\:\
+DOMLocator:\:\
+DOMConfiguration:\:\
+DOMCdataSection:\:\
+DOMDocumentType:\:\
+DOMNotation:\:\
+DOMEntity:\:\
+DOMEntityReference:\:\
+DOMProcessingInstruction:\:\
+DOMStringExtend:\:\
+DOMXPath:\:\
+ImagickException:\:\
+ImagickDrawException:\:\
+ImagickPixelIteratorException:\:\
+ImagickPixelException:\:\
+Imagick:\:\
+ImagickDraw:\:\
+ImagickPixelIterator:\:\
+ImagickPixel:\:\
+XSLTProcessor:\:\
+__PHP_Incomplete_Class:\:\
+php_user_filter:\:\
+Directory:\:\
+SessionHandlerInterface:\:\
+SessionHandler:\:\
+LogicException:\:\
+BadFunctionCallException:\:\
+BadMethodCallException:\:\
+DomainException:\:\
+InvalidArgumentException:\:\
+LengthException:\:\
+OutOfRangeException:\:\
+RuntimeException:\:\
+OutOfBoundsException:\:\
+OverflowException:\:\
+RangeException:\:\
+UnderflowException:\:\
+UnexpectedValueException:\:\
+RecursiveIterator:\:\
+RecursiveIteratorIterator:\:\
+OuterIterator:\:\
+IteratorIterator:\:\
+FilterIterator:\:\
+RecursiveFilterIterator:\:\
+CallbackFilterIterator:\:\
+RecursiveCallbackFilterIterator:\:\
+ParentIterator:\:\
+Countable:\:\
+SeekableIterator:\:\
+LimitIterator:\:\
+CachingIterator:\:\
+RecursiveCachingIterator:\:\
+NoRewindIterator:\:\
+AppendIterator:\:\
+InfiniteIterator:\:\
+RegexIterator:\:\
+RecursiveRegexIterator:\:\
+EmptyIterator:\:\
+RecursiveTreeIterator:\:\
+ArrayObject:\:\
+ArrayIterator:\:\
+RecursiveArrayIterator:\:\
+SplFileInfo:\:\
+DirectoryIterator:\:\
+FilesystemIterator:\:\
+RecursiveDirectoryIterator:\:\
+GlobIterator:\:\
+SplFileObject:\:\
+SplTempFileObject:\:\
+SplDoublyLinkedList:\:\
+SplQueue:\:\
+SplStack:\:\
+SplHeap:\:\
+SplMinHeap:\:\
+SplMaxHeap:\:\
+SplPriorityQueue:\:\
+SplFixedArray:\:\
+SplObserver:\:\
+SplSubject:\:\
+SplObjectStorage:\:\
+MultipleIterator:\:\
+SoapClient:\:\
+SoapVar:\:\
+SoapServer:\:\
+;SoapFault:\:\
+SoapParam:\:\
+SoapHeader:\:\
+PDOException:\:\
+PDO:\:\
+PDOStatement:\:\
+PDORow:\:\
+ZipArchive:\:\
+MemcachePool:\:\
+Memcache:\:\
+OCI_Lob:\:\
+OCI_Collection:\:\
+SQLite3:\:\
+SQLite3Stmt:\:\
+SQLite3Result:\:\
+XMLWriter:\:\
+SWFShape:\:\
+SWFFill:\:\
+SWFGradient:\:\
+SWFBitmap:\:\
+SWFText:\:\
+SWFTextField:\:\
+SWFFont:\:\
+SWFDisplayItem:\:\
+SWFMovie:\:\
+SWFButton:\:\
+SWFAction:\:\
+SWFMorph:\:\
+SWFSprite:\:\
+SWFSound:\:\
+SWFFontChar:\:\
+SWFSoundInstance:\:\
+SWFVideoStream:\:\
+Memcached:\:\
+MemcachedException:\:\
+ReflectionException:\:\
+Reflection:\:\
+Reflector:\:\
+ReflectionFunctionAbstract:\:\
+ReflectionFunction:\:\
+ReflectionParameter:\:\
+ReflectionMethod:\:\
+ReflectionClass:\:\
+ReflectionObject:\:\
+ReflectionProperty:\:\
+ReflectionExtension:\:\
+ReflectionZendExtension:\:\
+JsonSerializable:\:\
+SQLiteDatabase:\:\
+SQLiteResult:\:\
+SQLiteUnbuffered:\:\
+SQLiteException:\:\
+SimpleXMLElement:\:\
+SimpleXMLIterator:\:\
+PharException:\:\
+Phar:\:\
+PharData:\:\
+PharFileInfo:\:\
+stdClass:\:\
+Traversable:\:\
+IteratorAggregate:\:\
+Iterator:\:\
+ArrayAccess:\:\
+Serializable:\:\
+Exception:\:\
+ErrorException:\:\
+Closure:\:\
+HttpException:\:\
+HttpRuntimeException:\:\
+HttpInvalidParamException:\:\
+HttpHeaderException:\:\
+HttpMalformedHeadersException:\:\
+HttpRequestMethodException:\:\
+HttpMessageTypeException:\:\
+HttpEncodingException:\:\
+HttpRequestException:\:\
+HttpRequestPoolException:\:\
+HttpSocketException:\:\
+HttpResponseException:\:\
+HttpUrlException:\:\
+HttpQueryStringException:\:\
+HttpDeflateStream:\:\
+HttpInflateStream:\:\
+HttpMessage:\:\
+HttpQueryString:\:\
+;HttpRequest:\:\
+HttpRequestDataShare:\:\
+HttpRequestPool:\:\
+;HttpResponse:\:\
+HttpUtil:\:\
+XMLReader:\:\
+LibXMLError:\:\
+Svn:\:\
+SvnWc:\:\
+SvnWcSchedule:\:\
+SvnNode:\:\
+mysqli_sql_exception:\:\
+mysqli_driver:\:\
+mysqli:\:\
+mysqli_warning:\:\
+mysqli_result:\:\
+mysqli_stmt:\:\
+ZendAPI_Queue:\:\
+ZendAPI_Job:\:\
+java:\:\
+JavaException:\:\
+tidy:\:\
+tidyNode:\:\
+DateTime:\:\
+DateTimeZone:\:\
+DateInterval:\:\
+DatePeriod:\:\
+Collator:\:\
+NumberFormatter:\:\
+Normalizer:\:\
+Locale:\:\
+MessageFormatter:\:\
+IntlDateFormatter:\:\
+ResourceBundle:\:\
+;additins:
+AMQPEnvelope:\:\
+AMQPQueue:\:\
+AMQPExchange:\:\
+AMQPChannel:\:\
+AMQPConnectionException:\:\
+AMQPConnection:\:\
\ No newline at end of file
diff --git a/nsConverter/replace.config/phpunit.ini b/nsConverter/replace.config/phpunit.ini
new file mode 100644
index 0000000000..e18de67324
--- /dev/null
+++ b/nsConverter/replace.config/phpunit.ini
@@ -0,0 +1,139 @@
+PHPUnit_Framework_Test:\:\
+PHPUnit_Framework_IncompleteTestError:\:\
+PHPUnit_Framework_OutputError:\:\
+PHPUnit_Framework_Constraint:\:\
+PHPUnit_Framework_SkippedTest:\:\
+PHPUnit_Framework_Assert:\:\
+PHPUnit_Framework_IncompleteTest:\:\
+PHPUnit_Framework_AssertionFailedError:\:\
+PHPUnit_Framework_SkippedTestSuiteError:\:\
+PHPUnit_Framework_Warning:\:\
+PHPUnit_Framework_SkippedTestError:\:\
+PHPUnit_Framework_Comparator:\:\
+PHPUnit_Framework_SyntheticError:\:\
+PHPUnit_Framework_Exception:\:\
+PHPUnit_Framework_ExpectationFailedException:\:\
+PHPUnit_Framework_ComparisonFailure:\:\
+PHPUnit_Framework_SelfDescribing:\:\
+PHPUnit_Framework_Error:\:\
+PHPUnit_Framework_ComparatorFactory:\:\
+PHPUnit_Framework_TestResult:\:\
+PHPUnit_Framework_TestCase:\:\
+PHPUnit_Framework_TestListener:\:\
+PHPUnit_Framework_TestSuite:\:\
+PHPUnit_Framework_TestFailure:\:\
+PHPUnit_Framework_Error_Notice:\:\
+PHPUnit_Framework_Error_Deprecated:\:\
+PHPUnit_Framework_Constraint_GreaterThan:\:\
+PHPUnit_Framework_Constraint_IsEqual:\:\
+PHPUnit_Framework_Constraint_IsNull:\:\
+PHPUnit_Framework_Constraint_Xor:\:\
+PHPUnit_Framework_Constraint_Composite:\:\
+PHPUnit_Framework_Constraint_IsType:\:\
+PHPUnit_Framework_Constraint_ExceptionCode:\:\
+PHPUnit_Framework_Constraint_StringEndsWith:\:\
+PHPUnit_Framework_Constraint_IsAnything:\:\
+PHPUnit_Framework_Constraint_StringMatches:\:\
+PHPUnit_Framework_Constraint_TraversableContains:\:\
+PHPUnit_Framework_Constraint_ObjectHasAttribute:\:\
+PHPUnit_Framework_Constraint_Count:\:\
+PHPUnit_Framework_Constraint_IsEmpty:\:\
+PHPUnit_Framework_Constraint_IsFalse:\:\
+PHPUnit_Framework_Constraint_IsInstanceOf:\:\
+PHPUnit_Framework_Constraint_ArrayHasKey:\:\
+PHPUnit_Framework_Constraint_LessThan:\:\
+PHPUnit_Framework_Constraint_TraversableContainsOnly:\:\
+PHPUnit_Framework_Constraint_FileExists:\:\
+PHPUnit_Framework_Constraint_StringContains:\:\
+PHPUnit_Framework_Constraint_PCREMatch:\:\
+PHPUnit_Framework_Constraint_ClassHasAttribute:\:\
+PHPUnit_Framework_Constraint_SameSize:\:\
+PHPUnit_Framework_Constraint_IsTrue:\:\
+PHPUnit_Framework_Constraint_ClassHasStaticAttribute:\:\
+PHPUnit_Framework_Constraint_Attribute:\:\
+PHPUnit_Framework_Constraint_Or:\:\
+PHPUnit_Framework_Constraint_Callback:\:\
+PHPUnit_Framework_Constraint_And:\:\
+PHPUnit_Framework_Constraint_IsIdentical:\:\
+PHPUnit_Framework_Constraint_Not:\:\
+PHPUnit_Framework_Constraint_ExceptionMessage:\:\
+PHPUnit_Framework_Constraint_StringStartsWith:\:\
+PHPUnit_Framework_MockObject_Invocation_Static:\:\
+PHPUnit_Framework_MockObject_Invocation_Object:\:\
+PHPUnit_Framework_MockObject_Generator:\:\
+PHPUnit_Framework_MockObject_Invocation:\:\
+PHPUnit_Framework_MockObject_Matcher:\:\
+PHPUnit_Framework_MockObject_InvocationMocker:\:\
+PHPUnit_Framework_MockObject_Invokable:\:\
+PHPUnit_Framework_MockObject_Stub:\:\
+PHPUnit_Framework_MockObject_MockBuilder:\:\
+PHPUnit_Framework_MockObject_MockObject:\:\
+PHPUnit_Framework_MockObject_Verifiable:\:\
+PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount:\:\
+PHPUnit_Framework_MockObject_Matcher_StatelessInvocation:\:\
+PHPUnit_Framework_MockObject_Matcher_InvokedCount:\:\
+PHPUnit_Framework_MockObject_Matcher_Parameters:\:\
+PHPUnit_Framework_MockObject_Matcher_MethodName:\:\
+PHPUnit_Framework_MockObject_Matcher_InvokedRecorder:\:\
+PHPUnit_Framework_MockObject_Matcher_AnyParameters:\:\
+PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex:\:\
+PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce:\:\
+PHPUnit_Framework_MockObject_Stub_Return:\:\
+PHPUnit_Framework_MockObject_Stub_ReturnValueMap:\:\
+PHPUnit_Framework_MockObject_Stub_ReturnCallback:\:\
+PHPUnit_Framework_MockObject_Stub_ReturnSelf:\:\
+PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls:\:\
+PHPUnit_Framework_MockObject_Stub_ReturnArgument:\:\
+PHPUnit_Framework_MockObject_Stub_MatcherCollection:\:\
+PHPUnit_Framework_MockObject_Builder_Namespace:\:\
+PHPUnit_Framework_MockObject_Builder_ParametersMatch:\:\
+PHPUnit_Framework_MockObject_Builder_MethodNameMatch:\:\
+PHPUnit_Framework_MockObject_Builder_Identity:\:\
+PHPUnit_Framework_MockObject_Builder_Match:\:\
+PHPUnit_Framework_TestSuite_DataProvider:\:\
+PHPUnit_Framework_Comparator_Numeric:\:\
+PHPUnit_Framework_Comparator_SplObjectStorage:\:\
+PHPUnit_Framework_Comparator_Double:\:\
+PHPUnit_Framework_Comparator_Resource:\:\
+PHPUnit_Framework_Comparator_Type:\:\
+PHPUnit_Framework_Comparator_DOMDocument:\:\
+PHPUnit_Framework_Comparator_Array:\:\
+PHPUnit_Framework_Comparator_Scalar:\:\
+PHPUnit_Util_TestDox_ResultPrinter_Text:\:\
+PHPUnit_Util_TestDox_ResultPrinter_HTML:\:\
+PHPUnit_Util_TestDox_NamePrettifier:\:\
+PHPUnit_Util_TestDox_ResultPrinter:\:\
+PHPUnit_Util_DeprecatedFeature_Logger:\:\
+PHPUnit_Util_Log_JUnit:\:\
+PHPUnit_Util_Log_JSON:\:\
+PHPUnit_Util_Log_TAP:\:\
+PHPUnit_Util_Class:\:\
+PHPUnit_Util_Printer:\:\
+PHPUnit_Util_Filesystem:\:\
+PHPUnit_Util_DeprecatedFeature:\:\
+PHPUnit_Util_Getopt:\:\
+PHPUnit_Util_String:\:\
+PHPUnit_Util_Diff:\:\
+PHPUnit_Util_Configuration:\:\
+PHPUnit_Util_Fileloader:\:\
+PHPUnit_Util_InvalidArgumentHelper:\:\
+PHPUnit_Util_ErrorHandler:\:\
+PHPUnit_Util_GlobalState:\:\
+PHPUnit_Util_TestSuiteIterator:\:\
+PHPUnit_Util_Filter:\:\
+PHPUnit_Util_XML:\:\
+PHPUnit_Util_PHP:\:\
+PHPUnit_Util_PHP_Default:\:\
+PHPUnit_Util_PHP_Windows:\:\
+PHPUnit_Runner_StandardTestSuiteLoader:\:\
+PHPUnit_Runner_BaseTestRunner:\:\
+PHPUnit_Runner_Version:\:\
+PHPUnit_Runner_TestSuiteLoader:\:\
+PHPUnit_TextUI_Command:\:\
+PHPUnit_TextUI_TestRunner:\:\
+PHPUnit_Extensions_PhptTestCase:\:\
+PHPUnit_Extensions_PhptTestSuite:\:\
+PHPUnit_Extensions_TicketListener:\:\
+PHPUnit_Extensions_RepeatedTest:\:\
+PHPUnit_Extensions_TestDecorator:\:\
+PHPUnit_Extensions_GroupTestSuite:\:\
diff --git a/nsConverter/src/AddUtils/CMDUtils.class.php b/nsConverter/src/AddUtils/CMDUtils.class.php
new file mode 100644
index 0000000000..22fc3a97e0
--- /dev/null
+++ b/nsConverter/src/AddUtils/CMDUtils.class.php
@@ -0,0 +1,42 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+	namespace Onphp\NsConverter\AddUtils;
+
+	use \Onphp\StaticFactory;
+
+	
+
+	class CMDUtils extends StaticFactory {
+
+		/**
+		 * Возвращает ассоциативный массив стартовых настроек для скрипта
+		 * Настройки должны быть вида --param1=value1
+		 * @return array
+		 */
+		public static function getOptionsList()
+		{
+			$uArguments = $_SERVER['argv'];
+			array_shift($uArguments);
+			$arguments = array();
+			foreach ($uArguments as $argument) {
+				if ($position = mb_strpos($argument, '=')) {
+					$arguments[mb_substr($argument, 0, $position)] = mb_substr($argument, $position + 1);
+				} else {
+					$arguments[$argument] = true;
+				}
+			}
+
+			return $arguments;
+		}
+	}
\ No newline at end of file
diff --git a/nsConverter/src/AddUtils/CallbackLogicalObjectSuccess.class.php b/nsConverter/src/AddUtils/CallbackLogicalObjectSuccess.class.php
new file mode 100644
index 0000000000..4d6c3082b1
--- /dev/null
+++ b/nsConverter/src/AddUtils/CallbackLogicalObjectSuccess.class.php
@@ -0,0 +1,45 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2011 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	namespace Onphp\NsConverter\AddUtils;
+
+	use \Onphp\CallbackLogicalObject;
+	use \Closure;
+	use \Onphp\Form;
+
+	/**
+	 * Wrapper around given childs of LogicalObject with custom logic-glue's which
+	 *
+	 * @ingroup Logic
+	**/
+	class CallbackLogicalObjectSuccess extends CallbackLogicalObject
+	{
+		/**
+		 * @static
+		 * @param Closure $callback
+		 * @return CallbackLogicalObjectSuccess
+		 */
+		static public function create($callback)
+		{
+			return new self($callback);
+		}
+
+		/**
+		 * @param Form $form
+		 * @return bool
+		 */
+		public function toBoolean(Form $form)
+		{
+			parent::toBoolean($form);
+			return true;
+		}
+	}
\ No newline at end of file
diff --git a/nsConverter/src/AddUtils/ConsoleReader.class.php b/nsConverter/src/AddUtils/ConsoleReader.class.php
new file mode 100644
index 0000000000..f58849564d
--- /dev/null
+++ b/nsConverter/src/AddUtils/ConsoleReader.class.php
@@ -0,0 +1,24 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+	namespace Onphp\NsConverter\AddUtils;
+
+	use \Onphp\StaticFactory;
+
+	class ConsoleReader
+	{	
+		public function readString()
+		{
+			return fgets(STDIN);
+		}
+	}
\ No newline at end of file
diff --git a/nsConverter/src/AddUtils/ConsoleValueSelector.class.php b/nsConverter/src/AddUtils/ConsoleValueSelector.class.php
new file mode 100644
index 0000000000..2991b84ff6
--- /dev/null
+++ b/nsConverter/src/AddUtils/ConsoleValueSelector.class.php
@@ -0,0 +1,50 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+	namespace Onphp\NsConverter\AddUtils;
+
+	use \Onphp\StaticFactory;
+
+	class ConsoleValueSelector
+	{
+		private $list = [];
+		
+		/**
+		 * @param array $list
+		 * @return \Onphp\NsConverter\AddUtils\ConsoleValueSelector
+		 */
+		public function setList(array $list)
+		{
+			$this->list = $list;
+			return $this;
+		}
+		
+		public function readValue()
+		{
+			if (empty($this->list))
+				return;
+			
+			while (true) {
+				foreach ($this->list as $key => $value) {
+					print "[{$key}] {$value}\n";
+				}
+				print "--------------------------\n";
+				print "Please write your string key: ";
+				$key = trim((new ConsoleReader())->readString());
+				
+				if (isset($this->list[$key])) {
+					return $this->list[$key];
+				}
+			}
+		}
+	}
\ No newline at end of file
diff --git a/nsConverter/src/Auto/Business/AutoNsClass.class.php b/nsConverter/src/Auto/Business/AutoNsClass.class.php
new file mode 100644
index 0000000000..555613684a
--- /dev/null
+++ b/nsConverter/src/Auto/Business/AutoNsClass.class.php
@@ -0,0 +1,83 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.2.master at 2012-11-09 13:55:52                    *
+ *   This file is autogenerated - do not edit.                               *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Auto\Business;
+
+	use \Onphp\NsConverter\Utils\NsObject;
+	use \Onphp\Singleton;
+	use \Onphp\NsConverter\Business\NsClass;
+	use \Onphp\NsConverter\Proto\ProtoNsClass;
+
+	abstract class AutoNsClass implements NsObject
+	{
+		protected $name = null;
+		protected $namespace = null;
+		protected $newNamespace = null;
+		
+		/**
+		 * @return NsClass
+		**/
+		public static function create()
+		{
+			return new static;
+		}
+		
+		
+		/**
+		 * @return ProtoNsClass
+		**/
+		public static function proto()
+		{
+			return Singleton::getInstance('\Onphp\NsConverter\Proto\ProtoNsClass');
+		}
+		
+		public function getName()
+		{
+			return $this->name;
+		}
+		
+		/**
+		 * @return NsClass
+		**/
+		public function setName($name)
+		{
+			$this->name = $name;
+			
+			return $this;
+		}
+		
+		public function getNamespace()
+		{
+			return $this->namespace;
+		}
+		
+		/**
+		 * @return NsClass
+		**/
+		public function setNamespace($namespace)
+		{
+			$this->namespace = $namespace;
+			
+			return $this;
+		}
+		
+		public function getNewNamespace()
+		{
+			return $this->newNamespace;
+		}
+		
+		/**
+		 * @return NsClass
+		**/
+		public function setNewNamespace($newNamespace)
+		{
+			$this->newNamespace = $newNamespace;
+			
+			return $this;
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Auto/Business/AutoNsConstant.class.php b/nsConverter/src/Auto/Business/AutoNsConstant.class.php
new file mode 100644
index 0000000000..c24ca14cca
--- /dev/null
+++ b/nsConverter/src/Auto/Business/AutoNsConstant.class.php
@@ -0,0 +1,50 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:43:08                    *
+ *   This file is autogenerated - do not edit.                               *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Auto\Business;
+
+	use \Onphp\Singleton;
+	use \Onphp\NsConverter\Business\NsConstant;
+	use \Onphp\NsConverter\Proto\ProtoNsConstant;
+
+	abstract class AutoNsConstant
+	{
+		protected $name = null;
+		
+		/**
+		 * @return NsConstant
+		**/
+		public static function create()
+		{
+			return new static;
+		}
+		
+		
+		/**
+		 * @return ProtoNsConstant
+		**/
+		public static function proto()
+		{
+			return Singleton::getInstance('\Onphp\NsConverter\Proto\ProtoNsConstant');
+		}
+		
+		public function getName()
+		{
+			return $this->name;
+		}
+		
+		/**
+		 * @return NsConstant
+		**/
+		public function setName($name)
+		{
+			$this->name = $name;
+			
+			return $this;
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Auto/Business/AutoNsFunction.class.php b/nsConverter/src/Auto/Business/AutoNsFunction.class.php
new file mode 100644
index 0000000000..4ea67e6caf
--- /dev/null
+++ b/nsConverter/src/Auto/Business/AutoNsFunction.class.php
@@ -0,0 +1,83 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.2.master at 2012-11-09 13:55:52                    *
+ *   This file is autogenerated - do not edit.                               *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Auto\Business;
+
+	use \Onphp\NsConverter\Utils\NsObject;
+	use \Onphp\Singleton;
+	use \Onphp\NsConverter\Business\NsFunction;
+	use \Onphp\NsConverter\Proto\ProtoNsFunction;
+
+	abstract class AutoNsFunction implements NsObject
+	{
+		protected $name = null;
+		protected $namespace = null;
+		protected $newNamespace = null;
+		
+		/**
+		 * @return NsFunction
+		**/
+		public static function create()
+		{
+			return new static;
+		}
+		
+		
+		/**
+		 * @return ProtoNsFunction
+		**/
+		public static function proto()
+		{
+			return Singleton::getInstance('\Onphp\NsConverter\Proto\ProtoNsFunction');
+		}
+		
+		public function getName()
+		{
+			return $this->name;
+		}
+		
+		/**
+		 * @return NsFunction
+		**/
+		public function setName($name)
+		{
+			$this->name = $name;
+			
+			return $this;
+		}
+		
+		public function getNamespace()
+		{
+			return $this->namespace;
+		}
+		
+		/**
+		 * @return NsFunction
+		**/
+		public function setNamespace($namespace)
+		{
+			$this->namespace = $namespace;
+			
+			return $this;
+		}
+		
+		public function getNewNamespace()
+		{
+			return $this->newNamespace;
+		}
+		
+		/**
+		 * @return NsFunction
+		**/
+		public function setNewNamespace($newNamespace)
+		{
+			$this->newNamespace = $newNamespace;
+			
+			return $this;
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Auto/Proto/AutoProtoNsClass.class.php b/nsConverter/src/Auto/Proto/AutoProtoNsClass.class.php
new file mode 100644
index 0000000000..b1488e8dd0
--- /dev/null
+++ b/nsConverter/src/Auto/Proto/AutoProtoNsClass.class.php
@@ -0,0 +1,24 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:42:43                    *
+ *   This file is autogenerated - do not edit.                               *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Auto\Proto;
+
+	use \Onphp\AbstractProtoClass;
+	use \Onphp\LightMetaProperty;
+
+	abstract class AutoProtoNsClass extends AbstractProtoClass
+	{
+		protected function makePropertyList()
+		{
+			return array(
+				'name' => LightMetaProperty::fill(new LightMetaProperty(), 'name', null, 'string', null, 256, true, true, false, null, null),
+				'namespace' => LightMetaProperty::fill(new LightMetaProperty(), 'namespace', null, 'string', null, 256, true, true, false, null, null),
+				'newNamespace' => LightMetaProperty::fill(new LightMetaProperty(), 'newNamespace', 'new_namespace', 'string', null, 256, true, true, false, null, null)
+			);
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Auto/Proto/AutoProtoNsConstant.class.php b/nsConverter/src/Auto/Proto/AutoProtoNsConstant.class.php
new file mode 100644
index 0000000000..8c5989f5af
--- /dev/null
+++ b/nsConverter/src/Auto/Proto/AutoProtoNsConstant.class.php
@@ -0,0 +1,22 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:43:08                    *
+ *   This file is autogenerated - do not edit.                               *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Auto\Proto;
+
+	use \Onphp\AbstractProtoClass;
+	use \Onphp\LightMetaProperty;
+
+	abstract class AutoProtoNsConstant extends AbstractProtoClass
+	{
+		protected function makePropertyList()
+		{
+			return array(
+				'name' => LightMetaProperty::fill(new LightMetaProperty(), 'name', null, 'string', null, 256, true, true, false, null, null)
+			);
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Auto/Proto/AutoProtoNsFunction.class.php b/nsConverter/src/Auto/Proto/AutoProtoNsFunction.class.php
new file mode 100644
index 0000000000..e7c392d2b9
--- /dev/null
+++ b/nsConverter/src/Auto/Proto/AutoProtoNsFunction.class.php
@@ -0,0 +1,24 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:43:08                    *
+ *   This file is autogenerated - do not edit.                               *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Auto\Proto;
+
+	use \Onphp\AbstractProtoClass;
+	use \Onphp\LightMetaProperty;
+
+	abstract class AutoProtoNsFunction extends AbstractProtoClass
+	{
+		protected function makePropertyList()
+		{
+			return array(
+				'name' => LightMetaProperty::fill(new LightMetaProperty(), 'name', null, 'string', null, 256, true, true, false, null, null),
+				'namespace' => LightMetaProperty::fill(new LightMetaProperty(), 'namespace', null, 'string', null, 256, true, true, false, null, null),
+				'newNamespace' => LightMetaProperty::fill(new LightMetaProperty(), 'newNamespace', 'new_namespace', 'string', null, 256, true, true, false, null, null)
+			);
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Auto/schema.php b/nsConverter/src/Auto/schema.php
new file mode 100644
index 0000000000..25cfafe879
--- /dev/null
+++ b/nsConverter/src/Auto/schema.php
@@ -0,0 +1,16 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:41:54                    *
+ *   This file is autogenerated - do not edit.                               *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Auto;
+
+	use \Onphp\DBSchema;
+
+	
+
+	$schema = new DBSchema();
+	
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Buffers/AliasBuffer.class.php b/nsConverter/src/Buffers/AliasBuffer.class.php
new file mode 100644
index 0000000000..93e0ea34bc
--- /dev/null
+++ b/nsConverter/src/Buffers/AliasBuffer.class.php
@@ -0,0 +1,163 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\UnimplementedFeatureException;
+use \Onphp\Assert;
+
+class AliasBuffer implements Buffer
+{
+	/**
+	 * @var NamespaceBuffer
+	 */
+	private $namespaceBuffer = null;
+	/**
+	 * @var ClassBuffer
+	 */
+	private $classBuffer = null;
+	private $buffer = false;
+	private $bufferStart = null;
+	private $buffers = [];
+	private $aliases = [];
+	/**
+	 * @var ClassNameBuffer
+	 */
+	private $classNameBuffer = null;
+	private $classFrom = null;
+	private $classTo = null;
+
+	/**
+	 * @param NamespaceBuffer $namespaceBuffer
+	 * @return AliasBuffer
+	 */
+	public function setNamespaceBuffer(NamespaceBuffer $namespaceBuffer)
+	{
+		$this->namespaceBuffer = $namespaceBuffer;
+		return $this;
+	}
+	/**
+	 * @param ClassBuffer $classBuffer
+	 * @return AliasBuffer
+	 */
+	public function setClassBuffer(ClassBuffer $classBuffer)
+	{
+		$this->classBuffer = $classBuffer;
+		return $this;
+	}
+
+	/**
+	 * @return NamespaceBuffer
+	 */
+	public function init()
+	{
+		$this->buffer = false;
+		$this->bufferStart = null;
+		$this->buffers = [];
+		$this->aliases = [];
+		$this->classNameBuffer = null;
+		$this->classFrom = null;
+		$this->classTo = null;
+		return $this;
+	}
+
+	public function findClass($className)
+	{
+		if (isset($this->aliases[$className]))
+			return $this->aliases[$className];
+	}
+
+	/**
+	 * @return bool
+	 */
+	public function isBuffer()
+	{
+		return $this->buffer == true;
+	}
+
+	public function getAliases()
+	{
+		return $this->aliases;
+	}
+
+	public function getBuffers()
+	{
+		return $this->buffers;
+	}
+
+	public function process($subject, $i)
+	{
+
+		if (is_array($subject) && $subject[0] == T_USE && !$this->classBuffer->getClassName()) {
+			$this->startBuffer($i);
+		} elseif ($this->buffer) {
+			if ($this->classNameBuffer) {
+				$this->classNameBuffer->process($subject, $i);
+			} elseif (ClassNameBuffer::canStart($subject)) {
+				$this->classNameBuffer = new ClassNameBuffer();
+				$this->classNameBuffer->process($subject, $i);
+			}
+			if (is_string($subject) && $subject == ';') {
+				$this->endAlias();
+				$this->endBuffer($i);
+			} elseif (is_string($subject) && $subject == ',') {
+				$this->endAlias();
+			} elseif (is_array($subject) && $subject[0] == T_AS) {
+				$this->storeClassName();
+			} elseif ($this->classNameBuffer && !$this->classNameBuffer->isBuffer()) {
+				throw new UnimplementedFeatureException();
+			}
+		}
+	}
+
+	private function endAlias()
+	{
+		$this->storeClassName();
+		if (!$this->classTo) {
+			$fromParts = explode('\\', $this->classFrom);
+			$this->classTo = array_pop($fromParts);
+		}
+		$this->aliases[$this->classTo] = $this->classFrom;
+		$this->classFrom = null;
+		$this->classTo = null;
+	}
+
+	private function startBuffer($i)
+	{
+		$this->buffer = true;
+		$this->classNameBuffer = null;
+		$this->bufferStart = $i;
+	}
+
+	private function endBuffer($i)
+	{
+		$this->buffers[] = [$this->bufferStart, $i];
+
+		$this->buffer = false;
+		$this->classNameBuffer = null;
+		$this->bufferStart = null;
+	}
+
+	private function storeClassName()
+	{
+		Assert::isNotNull($this->classNameBuffer);
+		if (!$this->classFrom)
+			$this->classFrom = '\\'.ltrim($this->classNameBuffer->getClassName(), '\\');
+		elseif (!$this->classTo)
+			$this->classTo = trim($this->classNameBuffer->getClassName());
+		else
+			Assert::isUnreachable ('unreachable');
+
+		$this->classNameBuffer = null;
+	}
+}
diff --git a/nsConverter/src/Buffers/Buffer.class.php b/nsConverter/src/Buffers/Buffer.class.php
new file mode 100644
index 0000000000..6c6a35abb8
--- /dev/null
+++ b/nsConverter/src/Buffers/Buffer.class.php
@@ -0,0 +1,23 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+interface Buffer
+{
+	public function init();
+
+	public function isBuffer();
+
+	public function process($subject, $i);
+}
\ No newline at end of file
diff --git a/nsConverter/src/Buffers/ChainBuffer.class.php b/nsConverter/src/Buffers/ChainBuffer.class.php
new file mode 100644
index 0000000000..cae9db0940
--- /dev/null
+++ b/nsConverter/src/Buffers/ChainBuffer.class.php
@@ -0,0 +1,60 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+class ChainBuffer implements Buffer
+{
+	/**
+	 * @var ClassBuffer
+	 */
+	private $buffers = [];
+
+	/**
+	 * @param Buffer $buffer
+	 * @return ChainBuffer
+	 */
+	public function addBuffer(Buffer $buffer)
+	{
+		$this->buffers[] = $buffer;
+		return $this;
+	}
+	
+	/**
+	 * @return ChainBuffer
+	 */
+	public function init()
+	{
+		foreach ($this->buffers as $buffer) {
+			/* @var $buffer Buffer */
+			$buffer->init();
+		}
+		return $this;
+	}
+
+	/**
+	 * @return bool
+	 */
+	public function isBuffer()
+	{
+		return false;
+	}
+
+	public function process($subject, $i)
+	{
+		foreach ($this->buffers as $buffer) {
+			/* @var $buffer Buffer */
+			$buffer->process($subject, $i);
+		}
+	}
+}
diff --git a/nsConverter/src/Buffers/ClassBuffer.class.php b/nsConverter/src/Buffers/ClassBuffer.class.php
new file mode 100644
index 0000000000..21d3d8ed0f
--- /dev/null
+++ b/nsConverter/src/Buffers/ClassBuffer.class.php
@@ -0,0 +1,87 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+class ClassBuffer implements Buffer
+{
+	private $buffer = false;
+	private $inClass = false;
+	private $className = null;
+	/**
+	 * @var PenjepitCounter
+	 */
+	private $penjepitCounter = null;
+
+	/**
+	 * @return NamespaceBuffer
+	 */
+	public function init()
+	{
+		$this->buffer = false;
+		$this->inClass = false;
+		$this->className = null;
+		$this->penjepitCounter = null;
+		return $this;
+	}
+
+	/**
+	 * @return bool
+	 */
+	public function isBuffer()
+	{
+		return $this->buffer == true;
+	}
+	
+	/**
+	 * @return string
+	 */
+	public function getClassName()
+	{
+		if (!$this->buffer && $this->className)
+			return $this->className;
+	}
+
+	public function process($subject, $i)
+	{
+		if ($this->penjepitCounter) {
+			$this->penjepitCounter->process($subject, $i);
+		}
+		
+		if (is_array($subject) && in_array($subject[0], [T_CLASS, T_INTERFACE, T_TRAIT])) {
+			$this->buffer = true;
+			$this->className = '';
+			$this->inClass = true;
+			$this->penjepitCounter = null;
+		} elseif ($this->buffer) {
+			$isBufferEnd1 = is_array($subject) && in_array($subject[0], [T_EXTENDS, T_IMPLEMENTS]);
+			$isBufferEnd2 = is_string($subject) && in_array($subject, ['{', ';', '(']);
+
+			if (is_array($subject) && in_array($subject[0], [T_STRING])) {
+				$this->className .= $subject[1];
+			} elseif ($isBufferEnd1 || $isBufferEnd2) {
+				$this->buffer = false;
+			}
+		}
+		if ($this->inClass && !$this->penjepitCounter && is_string($subject) && $subject == '{') {
+			$this->penjepitCounter = (new PenjepitCounter())->init();
+			$this->penjepitCounter->process($subject, $i);
+		}
+		if ($this->penjepitCounter && !$this->penjepitCounter->isBuffer()) {
+			$this->inClass = false;
+			$this->buffer = false;
+			$this->className = null;
+			$this->penjepitCounter = null;
+		}
+	}
+}
diff --git a/nsConverter/src/Buffers/ClassNameBuffer.class.php b/nsConverter/src/Buffers/ClassNameBuffer.class.php
new file mode 100644
index 0000000000..f06ae193f4
--- /dev/null
+++ b/nsConverter/src/Buffers/ClassNameBuffer.class.php
@@ -0,0 +1,138 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+class ClassNameBuffer implements Buffer
+{
+	private $buffer = false;
+	private $className = '';
+	private $classNameStart = null;
+	private $classNameEnd = null;
+	private $subjects = [];
+
+	private static $excludeNames = [
+		'null',
+		'true',
+		'false',
+		'parent',
+		'self',
+		'static',
+	];
+	
+	public static function canStart($subject, $prevSubject = null)
+	{
+		$isOkSubject = is_array($subject)
+			&& in_array($subject[0], [T_NS_SEPARATOR, T_STRING]);
+		
+		$isNokPrevSubject = false;
+		if ($prevSubject) {
+			$isNokPrevSubject = is_array($prevSubject)
+				&& in_array($prevSubject[0], [T_OBJECT_OPERATOR, T_PAAMAYIM_NEKUDOTAYIM, T_CONST]);
+		}
+		$isExcludeNames = is_array($subject)
+			&& $subject[0] == T_STRING
+			&& in_array(mb_strtolower($subject[1]), self::$excludeNames);
+		
+		return $isOkSubject
+			&& !$isNokPrevSubject
+			&& !$isExcludeNames;
+	}
+	
+	/**
+	 * @return NamespaceBuffer
+	 */
+	public function init()
+	{
+		$this->buffer = false;
+		$this->className = '';
+		$this->classNameStart = null;
+		$this->classNameEnd = null;
+		$this->subjects = [];
+		return $this;
+	}
+
+	/**
+	 * @return bool
+	 */
+	public function isBuffer()
+	{
+		return $this->buffer == true;
+	}
+	
+	public function getClassName() 
+	{
+		return (!$this->buffer && $this->className)
+			? $this->className
+			: null;
+	}
+	
+	public function getClassNameStart()
+	{
+		return (!$this->buffer && $this->className)
+			? $this->classNameStart
+			: null;
+	}
+
+	public function getClassNameEnd()
+	{
+		return (!$this->buffer && $this->className)
+			? $this->classNameEnd
+			: null;
+	}
+
+	
+	public function process($subject, $i)
+	{
+		if (!$this->buffer && self::canStart($subject)) {
+			$this->buffer = true;
+			$this->className = $subject[1];
+			$this->classNameStart = $i;
+			$this->classNameEnd = null;
+			$this->subjects = [$i => $subject];
+		} elseif ($this->buffer) {
+			$this->subjects[$i] = $subject;
+			if (self::canStart($subject)) {
+				$this->className .= $subject[1];
+			} elseif (is_array($subject) && $subject[0] == T_WHITESPACE) {
+				//we'll skip spaces
+			} else {
+				$this->buffer = false;
+				$this->classNameEnd = $this->getEndSubject($i - 1);
+				if (!preg_match('~^[\\\\A-Z]~u', $this->className)) {
+					$this->className = '';
+					$this->classNameEnd = null;
+					$this->classNameStart = null;
+				}
+			}
+		}
+	}
+	
+	/**
+	 * @param int $i
+	 * @return int
+	 */
+	private function getEndSubject($i)
+	{
+		while (isset($this->subjects[$i])) {
+			$subject = $this->subjects[$i];
+			if (is_array($subject) && $subject[0] == T_WHITESPACE) {
+				$i--;
+				continue;
+			} else {
+				break;
+			}
+		}
+		return $i;
+	}
+}
diff --git a/nsConverter/src/Buffers/ClassNameDetectBuffer.class.php b/nsConverter/src/Buffers/ClassNameDetectBuffer.class.php
new file mode 100644
index 0000000000..7e0c4e2841
--- /dev/null
+++ b/nsConverter/src/Buffers/ClassNameDetectBuffer.class.php
@@ -0,0 +1,142 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+class ClassNameDetectBuffer implements Buffer
+{
+	/**
+	 * @var NamespaceBuffer
+	 */
+	private $namespaceBuffer = null;
+	/**
+	 * @var ClassBuffer
+	 */
+	private $classBuffer = null;
+	/**
+	 * @var FunctionBuffer
+	 */
+	private $functionBuffer = null;
+	/**
+	 * @var AliasBuffer
+	 */
+	private $aliasBuffer = null;
+
+	/**
+	 * @var ClassNameBuffer
+	 */
+	private $classNameBuffer = null;
+	private $classNameList = [];
+	private $prevSubject = null;
+
+	/**
+	 * @param NamespaceBuffer $namespaceBuffer
+	 * @return ClassNameDetectBuffer
+	 */
+	public function setNamespaceBuffer(NamespaceBuffer $namespaceBuffer)
+	{
+		$this->namespaceBuffer = $namespaceBuffer;
+		return $this;
+	}
+
+	/**
+	 * @param ClassBuffer $classBuffer
+	 * @return ClassNameDetectBuffer
+	 */
+	public function setClassBuffer(ClassBuffer $classBuffer)
+	{
+		$this->classBuffer = $classBuffer;
+		return $this;
+	}
+
+	/**
+	 * @param FunctionBuffer $functionBuffer
+	 * @return ClassNameDetectBuffer
+	 */
+	public function setFunctionBuffer(FunctionBuffer $functionBuffer)
+	{
+		$this->functionBuffer = $functionBuffer;
+		return $this;
+	}
+
+	public function setAliasBuffer(AliasBuffer $aliasBuffer)
+	{
+		$this->aliasBuffer = $aliasBuffer;
+		return $this;
+	}
+
+	public function getClassNameList()
+	{
+		return $this->classNameList;
+	}
+
+	/**
+	 * @return NamespaceBuffer
+	 */
+	public function init()
+	{
+		$this->classNameBuffer = null;
+		$this->classNameList = [];
+		$this->prevSubject = null;
+		return $this;
+	}
+
+	/**
+	 * @return bool
+	 */
+	public function isBuffer()
+	{
+		return false;
+	}
+
+	public function process($subject, $i)
+	{
+		if ($this->classNameBuffer) {
+			$this->classNameBuffer->process($subject, $i);
+			if (!$this->classNameBuffer->isBuffer()) {
+				if ($this->classNameBuffer->getClassName()) {
+					$this->classNameList[] = [
+						$this->classNameBuffer->getClassName(),
+						$this->classNameBuffer->getClassNameStart(),
+						$this->classNameBuffer->getClassNameEnd(),
+					];
+				}
+				$this->classNameBuffer = null;
+			}
+		} elseif (
+			!$this->isSubBuffered()
+			&& ClassNameBuffer::canStart($subject, $this->prevSubject)
+		) {
+			$this->classNameBuffer = new ClassNameBuffer();
+			$this->classNameBuffer->process($subject, $i);
+		}
+
+		$this->pushSubject($subject);
+	}
+
+	private function isSubBuffered()
+	{
+		return $this->namespaceBuffer->isBuffer()
+			|| $this->classBuffer->isBuffer()
+			|| $this->functionBuffer->isBuffer()
+			|| $this->aliasBuffer->isBuffer();
+	}
+
+	private function pushSubject($subject)
+	{
+		$isSkip = is_array($subject) && in_array($subject[0], [T_WHITESPACE]);
+		if (!$isSkip) {
+			$this->prevSubject = $subject;
+		}
+	}
+}
diff --git a/nsConverter/src/Buffers/ClassStorageBuffer.class.php b/nsConverter/src/Buffers/ClassStorageBuffer.class.php
new file mode 100644
index 0000000000..ac78290d3e
--- /dev/null
+++ b/nsConverter/src/Buffers/ClassStorageBuffer.class.php
@@ -0,0 +1,113 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Utils\ClassStorage;
+use \Onphp\NsConverter\Business\NsClass;
+
+/**
+ * To add class names to CodeStorage
+ */
+class ClassStorageBuffer
+{
+	private $newNamespace = '';
+	/**
+	 * @var ClassStorage
+	 */
+	private $classStorage = null;
+	
+	private $currentClass = '';
+	/**
+	 * @var NamespaceBuffer
+	 */
+	private $namespaceBuffer = null;
+	/**
+	 * @var ClassBuffer
+	 */
+	private $classBuffer = null;
+	
+	/**
+	 * @param string $newNamespace
+	 * @return ClassStorageBuffer
+	 */
+	public function setNewNamespace($newNamespace)
+	{
+		$this->newNamespace = $newNamespace;
+		return $this;
+	}
+	
+	/**
+	 * @param ClassStorage $classStorage
+	 * @return ClassStorageBuffer
+	 */
+	public function setClassStorage(ClassStorage $classStorage)
+	{
+		$this->classStorage = $classStorage;
+		return $this;
+	}
+
+	/**
+	 * @param NamespaceBuffer $namespaceBuffer
+	 * @return ClassStorageBuffer
+	 */
+	public function setNamespaceBuffer(NamespaceBuffer $namespaceBuffer)
+	{
+		$this->namespaceBuffer = $namespaceBuffer;
+		return $this;
+	}
+
+	/**
+	 * @param ClassBuffer $classBuffer
+	 * @return ClassStorageBuffer
+	 */
+	public function setClassBuffer(ClassBuffer $classBuffer)
+	{
+		$this->classBuffer = $classBuffer;
+		return $this;
+	}
+		
+	/**
+	 * @return NamespaceBuffer
+	 */
+	public function init()
+	{
+		$this->currentClass = '';
+		$this->namespaceBuffer->init();
+		$this->classBuffer->init();
+		return $this;
+	}
+
+	public function process($subject, $i)
+	{
+		$this->namespaceBuffer->process($subject, $i);
+		$this->classBuffer->process($subject, $i);
+		if ($this->classBuffer->getClassName() != $this->currentClass) {
+			$this->currentClass = $this->classBuffer->getClassName();
+			$this->addClass();
+		}
+	}
+	
+	private function addClass()
+	{
+		if (!$this->currentClass)
+			return;
+		
+		$class = NsClass::create()
+			->setName($this->currentClass)
+			->setNamespace($this->namespaceBuffer->getNamespace())
+			->setNewNamespace($this->newNamespace);
+		
+		$this->classStorage->addClass($class);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/src/Buffers/CodeStorage.class.php b/nsConverter/src/Buffers/CodeStorage.class.php
new file mode 100644
index 0000000000..12e4cbb978
--- /dev/null
+++ b/nsConverter/src/Buffers/CodeStorage.class.php
@@ -0,0 +1,109 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\MissingElementException;
+
+
+
+class CodeStorage implements Buffer
+{
+
+	private $subjects = [];
+	private $replaces = [];
+	private $appends = [];
+
+	public function count()
+	{
+		return count($this->subjects);
+	}
+
+	public function get($i)
+	{
+		if (isset($this->subjects[$i]))
+			return $this->subjects[$i];
+
+		throw new MissingElementException('not found subject with num "'.$i.'"');
+	}
+
+	/**
+	 * @return CodeStorage
+	 */
+	public function init()
+	{
+		$this->subjects = [];
+		$this->replaces = [];
+		$this->appends = [];
+		return $this;
+	}
+
+	public function toString()
+	{
+		$php = [];
+		foreach ($this->subjects as $i => $subject) {
+			if (isset($this->replaces[$i])) {
+				$php[$i] = $this->replaces[$i];
+			} elseif (is_array($subject)) {
+				$php[$i] = $subject[1];
+			} elseif (is_string($subject)) {
+				$php[$i] = $subject;
+			}
+			if (isset($this->appends[$i])) {
+				foreach ($this->appends[$i] as $append) {
+					$php[$i] .= $append;
+				}
+			}
+		}
+		return implode('', $php);
+	}
+
+	public function process($subject, $i)
+	{
+		$this->subjects[$i] = $subject;
+	}
+
+	public function isBuffer()
+	{
+		return false;
+	}
+
+	/**
+	 * @param string $code
+	 * @param int $from
+	 * @param int $to
+	 * @return CodeStorage
+	 */
+	public function addReplace($code, $from, $to = null)
+	{
+		$this->replaces[$from] = $code;
+		for ($i = ($from + 1); $i <= ($to ? : $from); $i++) {
+			$this->replaces[$i] = '';
+		}
+		return $this;
+	}
+	
+	/**
+	 * @param string $code
+	 * @param int $i
+	 * @return CodeStorage
+	 */
+	public function addAppend($code, $i)
+	{
+		if (!isset($this->appends[$i])) {
+			$this->appends[$i] = [];
+		}
+		$this->appends[$i][] = $code;
+		return $this;
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/src/Buffers/DefineConstantBuffer.class.php b/nsConverter/src/Buffers/DefineConstantBuffer.class.php
new file mode 100644
index 0000000000..1b8f447561
--- /dev/null
+++ b/nsConverter/src/Buffers/DefineConstantBuffer.class.php
@@ -0,0 +1,74 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Utils\ClassStorage;
+use \Onphp\NsConverter\Business\NsConstant;
+
+class DefineConstantBuffer implements Buffer
+{
+	/**
+	 * @var ClassStorage
+	 */
+	private $classStorage = null;
+	private $buffer = false;
+
+	/**
+	 * @param ClassStorage $classStorage
+	 * @return DefineConstantBuffer
+	 */
+	public function setClassStorage(ClassStorage $classStorage)
+	{
+		$this->classStorage = $classStorage;
+		return $this;
+	}
+
+	/**
+	 * @return NamespaceBuffer
+	 */
+	public function init()
+	{
+		$this->buffer = false;
+		return $this;
+	}
+
+	/**
+	 * @return bool
+	 */
+	public function isBuffer()
+	{
+		return $this->buffer == true;
+	}
+
+	public function process($subject, $i)
+	{
+		if (!$this->buffer && is_array($subject) && $subject[0] == T_STRING && $subject[1] == 'define') {
+			$this->buffer = true;
+		} elseif ($this->buffer) {
+			$skip = (is_string($subject) && $subject == '(');
+
+			if ($skip) {
+				/* ok, wkip this */
+			} elseif (is_array($subject) && in_array($subject[0], [T_CONSTANT_ENCAPSED_STRING, T_WHITESPACE])) {
+				if (preg_match('~^[\'"]([\w]+)[\'"]$~iu', $subject[1], $match)) {
+					$constant = NsConstant::create()->setName($match[1]);
+					$this->classStorage->addConstant($constant);
+					$this->buffer = false;
+				}
+			} else {
+				$this->buffer = false;
+			}
+		}
+	}
+}
diff --git a/nsConverter/src/Buffers/FunctionBuffer.class.php b/nsConverter/src/Buffers/FunctionBuffer.class.php
new file mode 100644
index 0000000000..03babfcd27
--- /dev/null
+++ b/nsConverter/src/Buffers/FunctionBuffer.class.php
@@ -0,0 +1,86 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+class FunctionBuffer implements Buffer
+{
+	private $buffer = false;
+	private $inFunction = false;
+	private $functionName = null;
+	/**
+	 * @var PenjepitCounter
+	 */
+	private $penjepitCounter = null;
+
+	/**
+	 * @return NamespaceBuffer
+	 */
+	public function init()
+	{
+		$this->buffer = false;
+		$this->inFunction = false;
+		$this->functionName = null;
+		$this->penjepitCounter = null;
+		return $this;
+	}
+
+	/**
+	 * @return bool
+	 */
+	public function isBuffer()
+	{
+		return $this->buffer == true;
+	}
+	
+	/**
+	 * @return string
+	 */
+	public function getFunctionName()
+	{
+		if (!$this->buffer && $this->functionName)
+			return $this->functionName;
+	}
+
+	public function process($subject, $i)
+	{
+		if ($this->penjepitCounter) {
+			$this->penjepitCounter->process($subject, $i);
+		}
+		
+		if (is_array($subject) && in_array($subject[0], [T_FUNCTION])) {
+			$this->buffer = true;
+			$this->functionName = '';
+			$this->inFunction = true;
+			$this->penjepitCounter = null;
+		} elseif ($this->buffer) {
+			$isBufferEnd = is_string($subject) && in_array($subject, ['(']);
+
+			if (is_array($subject) && in_array($subject[0], [T_STRING])) {
+				$this->functionName .= $subject[1];
+			} elseif ($isBufferEnd) {
+				$this->buffer = false;
+			}
+		}
+		if ($this->inFunction && !$this->penjepitCounter && is_string($subject) && $subject == '{') {
+			$this->penjepitCounter = (new PenjepitCounter())->init();
+			$this->penjepitCounter->process($subject, $i);
+		}
+		if ($this->penjepitCounter && !$this->penjepitCounter->isBuffer()) {
+			$this->inFunction = false;
+			$this->buffer = false;
+			$this->functionName = null;
+			$this->penjepitCounter = null;
+		}
+	}
+}
diff --git a/nsConverter/src/Buffers/NamespaceBuffer.class.php b/nsConverter/src/Buffers/NamespaceBuffer.class.php
new file mode 100644
index 0000000000..ffb3201409
--- /dev/null
+++ b/nsConverter/src/Buffers/NamespaceBuffer.class.php
@@ -0,0 +1,86 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+class NamespaceBuffer implements Buffer
+{
+	private $buffer = null;
+	private $bufferStart = null;
+	private $bufferEnd = null;
+	private $namespace = '';
+	/**
+	 * @var PenjepitCounter
+	 */
+	private $penjepitCounter = null;
+
+	/**
+	 * @return NamespaceBuffer
+	 */
+	public function init()
+	{
+		$this->buffer = null;
+		$this->bufferStart = null;
+		$this->bufferEnd = null;
+		$this->namespace = '';
+		$this->penjepitCounter = null;
+		return $this;
+	}
+
+	public function isBuffer()
+	{
+		return $this->buffer !== null;
+	}
+	
+	public function getNamespace()
+	{
+		return $this->buffer ? '' : $this->namespace;
+	}
+	
+	public function getBufferStart()
+	{
+		return $this->bufferStart;
+	}
+	
+	public function getBufferEnd()
+	{
+		return $this->bufferEnd;
+	}
+
+	public function process($subject, $i)
+	{
+		if ($this->penjepitCounter) {
+			$this->penjepitCounter->process($subject, $i);
+		}
+		if (is_array($subject) && $subject[0] == T_NAMESPACE) {
+			$this->penjepitCounter = null;
+			$this->buffer = $i;
+			$this->bufferStart = $i;
+			$this->namespace = '';
+		} elseif (!is_null($this->buffer)) {
+			if (is_array($subject) && in_array($subject[0], [T_STRING, T_NS_SEPARATOR])) {
+				$this->namespace .= $subject[1];
+			} elseif (is_string($subject) && in_array($subject, [';', '{'])) {
+				$this->bufferEnd = $i;
+				$this->buffer = null;
+				if ($subject == '{') {
+					$this->penjepitCounter = (new PenjepitCounter())->init();
+					$this->penjepitCounter->process($subject, $i);
+				}
+			}
+		} elseif ($this->penjepitCounter && !$this->penjepitCounter->isBuffer()) {
+			$this->namespace = '';	
+			$this->penjepitCounter = null;
+		}
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/src/Buffers/PenjepitCounter.class.php b/nsConverter/src/Buffers/PenjepitCounter.class.php
new file mode 100644
index 0000000000..9e9820e353
--- /dev/null
+++ b/nsConverter/src/Buffers/PenjepitCounter.class.php
@@ -0,0 +1,51 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+class PenjepitCounter implements Buffer
+{
+	private $startAt = null;
+	private $penjepits = 0;
+	
+	/**
+	 * @return PenjepitCounter
+	 */
+	public function init()
+	{
+		$this->penjepits = 0;
+		return $this;
+	}
+
+	public function isBuffer()
+	{
+		return $this->penjepits > 0;
+	}
+	
+	public function getBufferStart()
+	{
+		return $this->startAt;
+	}
+
+	public function process($subject, $i)
+	{
+		if (is_string($subject) && $subject == '{') {
+			if ($this->penjepits == 0) {
+				$this->startAt = $i;
+			}
+			$this->penjepits++;
+		} elseif (is_string($subject) && $subject == '}') {
+			$this->penjepits--;
+		}
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/src/Business/NsClass.class.php b/nsConverter/src/Business/NsClass.class.php
new file mode 100644
index 0000000000..01817da4d8
--- /dev/null
+++ b/nsConverter/src/Business/NsClass.class.php
@@ -0,0 +1,39 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-10-28 12:28:55                    *
+ *   This file will never be generated again - feel free to edit.            *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Business;
+
+	use \Onphp\NsConverter\Auto\Business\AutoNsClass;
+	use \Onphp\Prototyped;
+	use \Onphp\NsConverter\Utils\NamespaceUtils;
+
+	class NsClass extends AutoNsClass implements Prototyped
+	{
+		public function getFullName()
+		{
+			return $this->getNamespace().$this->getName();
+		}
+
+		public function getFullNewName()
+		{
+			return $this->getNewNamespace().$this->getName();
+		}
+
+		/**
+		 * @param string $namespace
+		 * @return NsClass
+		 */
+		public function setNamespace($namespace)
+		{
+			return parent::setNamespace(NamespaceUtils::fixNamespace($namespace));
+		}
+
+		public function setNewNamespace($newNamespace)
+		{
+			return parent::setNewNamespace(NamespaceUtils::fixNamespace($newNamespace));
+		}
+	}
\ No newline at end of file
diff --git a/nsConverter/src/Business/NsConstant.class.php b/nsConverter/src/Business/NsConstant.class.php
new file mode 100644
index 0000000000..242714e14d
--- /dev/null
+++ b/nsConverter/src/Business/NsConstant.class.php
@@ -0,0 +1,17 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:43:08                    *
+ *   This file will never be generated again - feel free to edit.            *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Business;
+
+	use \Onphp\NsConverter\Auto\Business\AutoNsConstant;
+	use \Onphp\Prototyped;
+
+	class NsConstant extends AutoNsConstant implements Prototyped
+	{
+		// your brilliant stuff goes here
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Business/NsFunction.class.php b/nsConverter/src/Business/NsFunction.class.php
new file mode 100644
index 0000000000..4c7206c7ee
--- /dev/null
+++ b/nsConverter/src/Business/NsFunction.class.php
@@ -0,0 +1,40 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:43:08                    *
+ *   This file will never be generated again - feel free to edit.            *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Business;
+
+	use \Onphp\NsConverter\Auto\Business\AutoNsFunction;
+	use \Onphp\Prototyped;
+	use \Onphp\NsConverter\Utils\NamespaceUtils;
+
+	class NsFunction extends AutoNsFunction implements Prototyped
+	{
+		public function getFullName()
+		{
+			return $this->getNamespace().$this->getName();
+		}
+
+		public function getFullNewName()
+		{
+			return $this->getNewNamespace().$this->getName();
+		}
+
+		/**
+		 * @param string $namespace
+		 * @return NsClass
+		 */
+		public function setNamespace($namespace)
+		{
+			return parent::setNamespace(NamespaceUtils::fixNamespace($namespace));
+		}
+
+		public function setNewNamespace($newNamespace)
+		{
+			return parent::setNewNamespace(NamespaceUtils::fixNamespace($newNamespace));
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Flow/JoinCommand.class.php b/nsConverter/src/Flow/JoinCommand.class.php
new file mode 100644
index 0000000000..fb05d28199
--- /dev/null
+++ b/nsConverter/src/Flow/JoinCommand.class.php
@@ -0,0 +1,199 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Flow;
+
+use \Onphp\Assert;
+use \Onphp\Form;
+use \Onphp\NsConverter\AddUtils\CallbackLogicalObjectSuccess;
+use \Onphp\NsConverter\AddUtils\CMDUtils;
+use \Onphp\NsConverter\AddUtils\ConsoleValueSelector;
+use \Onphp\NsConverter\Business\NsClass;
+use \Onphp\NsConverter\Business\NsConstant;
+use \Onphp\NsConverter\Utils\ClassStorage;
+use \Onphp\NsConverter\Utils\FormErrorWriter;
+use \Onphp\NsConverter\Utils\OutputMsg;
+use \Onphp\Primitive;
+use \Onphp\WrongStateException;
+
+class JoinCommand
+{
+	use OutputMsg, FormErrorWriter {
+		OutputMsg::msg insteadof FormErrorWriter;
+	}
+
+	public function run()
+	{
+		$form = $this->getForm()
+			->import(CMDUtils::getOptionsList())
+			->checkRules();
+
+		if ($this->processFormError($form)) {
+			return;
+		}
+
+		$oldStorage = $this->readConfig($form->getValue('--old'));
+		$newStorage = $this->readConfig($form->getValue('--new'));
+		
+		$storage = $this->join($oldStorage, $newStorage);
+		
+		print $storage->export()."\n";
+	}
+	
+	private function readConfig($path)
+	{
+		$storage = new ClassStorage();
+		
+		$data = file_get_contents($path);
+		foreach (explode("\n", $data) as $line0 => $row) {
+			$line = $line0 + 1;
+			if (mb_strpos($row, ';') === 0 || !trim($row)) {
+				continue;
+			}
+			$parts = explode(':', $row);
+			$type = array_shift($parts);
+			if (in_array($type, ['C', 'F']) && count($parts) == 2) {
+				if ($type == 'F') {
+					continue; //we still not work with functions
+				}
+				list($className, $namespace) = $parts;
+				$class = NsClass::create()
+					->setName($className)
+					->setNamespace($namespace)
+					->setNewNamespace($namespace);
+				$storage->addClass($class);
+			} elseif ($type == 'CONST' && count($parts) == 1) {
+				$storage->addConstant(NsConstant::create()->setName($parts[0]));
+			} else {
+				throw new WrongStateException(
+					"Unknown type at line {$line} , file {$path}"
+				);
+			}
+		}
+		
+		return $storage;
+	}
+	
+	/**
+	 * @param ClassStorage $oldStorage
+	 * @param ClassStorage $newStorage
+	 * @return ClassStorage
+	 */
+	private function join(ClassStorage $oldStorage, ClassStorage $newStorage)
+	{
+		$storage = new ClassStorage();
+		$this->joinConstants($storage, $oldStorage, $newStorage);
+		$this->joinClasses($storage, $oldStorage, $newStorage);
+		
+		return $storage;
+	}
+	
+	private function joinConstants(ClassStorage $storage, ClassStorage $oldStorage, ClassStorage $newStorage)
+	{
+		foreach ($oldStorage->getListConstants() as $constant) {
+			$storage->addConstant($constant);
+		}
+		
+		foreach ($newStorage->getListConstants() as $constant) {
+			try {
+				$storage->addConstant($constant);
+			} catch (WrongStateException $e) {
+				/* do nothing */
+			}
+		}
+	}
+	
+	private function joinClasses(ClassStorage $storage, ClassStorage $oldStorage, ClassStorage $newStorage)
+	{
+		foreach ($oldStorage->getListClasses() as $oldClass) {
+			$oldStorage->dropClass($oldClass);
+			/* @var $oldClass NsClass */
+			if ($newClass = $newStorage->findByFullName($oldClass->getFullName())) {
+				$newStorage->dropClass($newClass);
+				$this->joinClass($storage, $oldClass, $newClass);
+				continue;
+			}
+			
+			$possibleList = $newStorage->getListByOldClassName($oldClass->getName());
+			if (count($possibleList) == 0) {
+				$storage->addClass($oldClass);
+			} elseif (count($possibleList) == 1) {
+				$newStorage->dropClass($possibleList[0]);
+				$this->joinClass($storage, $oldClass, $possibleList[0]);
+			} else {
+				$this->msg("For old class {$oldClass->getFullName()} found some new names:");
+				$list = [];
+				foreach ($possibleList as $newClass) {
+					/* @var $newClass NsClass */
+					$list[] = $newClass->getFullNewName();
+				}
+				$selector = new ConsoleValueSelector();
+				$fullNewClassName = $selector->setList($list)->readValue();
+				foreach ($possibleList as $newClass) {
+					/* @var $newClass NsClass */
+					if ($fullNewClassName == $newClass->getFullNewName()) {
+						$newStorage->dropClass($newClass);
+						$this->joinClass($storage, $oldClass, $newClass);
+						break 2;
+					}
+				}
+				Assert::isUnreachable();
+			}
+		}
+		
+		foreach ($newStorage->getListClasses() as $newClass) {
+			$storage->addClass($newClass);
+		}
+		
+		return $storage;
+	}
+	
+	private function joinClass(ClassStorage $storage, NsClass $oldClass, NsClass $newClass)
+	{
+		$class = NsClass::create()
+			->setName($oldClass->getName())
+			->setNamespace($oldClass->getNamespace())
+			->setNewNamespace($newClass->getNewNamespace());
+		$storage->addClass($class);
+	}
+
+	/**
+	 * @return Form
+	 */
+	private function getForm()
+	{
+		$form = Form::create();
+		$this->fillFilePathPrimitive($form, '--old');
+		$this->fillFilePathPrimitive($form, '--new');
+		return $form;
+	}
+	
+	private function fillFilePathPrimitive(Form $form, $name)
+	{
+		$callback = function (Form $form) use ($name) {
+			if ($path = $form->getValue($name)) {
+				if (!file_exists($path)) {
+					$form->markWrong($name, 'file not exists');
+				} elseif (!is_readable($path)) {
+					$form->markWrong($name, 'file not readable');
+				} elseif (!is_file($path)) {
+					$form->markWrong($name, 'not a file');
+				}
+			}
+		};
+		
+		$form
+			->add(Primitive::string($name)->required())
+			->addRule($name.'Rule', CallbackLogicalObjectSuccess::create($callback));
+	}
+}
diff --git a/nsConverter/src/Flow/ReplaceCommand.class.php b/nsConverter/src/Flow/ReplaceCommand.class.php
new file mode 100644
index 0000000000..85a42c5512
--- /dev/null
+++ b/nsConverter/src/Flow/ReplaceCommand.class.php
@@ -0,0 +1,154 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Flow;
+
+use \Onphp\NsConverter\Utils\OutputMsg;
+use \Onphp\NsConverter\Utils\PathListGetter;
+use \Onphp\NsConverter\Utils\FormErrorWriter;
+use \Onphp\NsConverter\AddUtils\CMDUtils;
+use \Onphp\Form;
+use \Onphp\NsConverter\Utils\ClassStorage;
+use \Onphp\NsConverter\Buffers\CodeStorage;
+use \Onphp\NsConverter\Buffers\NamespaceBuffer;
+use \Onphp\NsConverter\Buffers\ClassBuffer;
+use \Onphp\NsConverter\Buffers\AliasBuffer;
+use \Onphp\NsConverter\Buffers\FunctionBuffer;
+use \Onphp\NsConverter\Buffers\ClassNameDetectBuffer;
+use \Onphp\NsConverter\Buffers\ChainBuffer;
+use \Onphp\ClassUtils;
+use \Onphp\NsConverter\Utils\CodeConverter;
+use \Exception;
+use \Onphp\NsConverter\Utils\CodeConverterException;
+use \RecursiveDirectoryIterator;
+use \Onphp\Primitive;
+
+class ReplaceCommand
+{
+	use OutputMsg, PathListGetter, FormErrorWriter {
+		OutputMsg::msg insteadof FormErrorWriter;
+	}
+
+	public function run()
+	{
+		$form = $this->getForm()
+			->import(CMDUtils::getOptionsList())
+			->checkRules();
+
+		if ($this->processFormError($form)) {
+			return;
+		}
+
+		$storage = $this->loadConfig($form);
+		$pathList = $this->getPathList($form);
+		$this->replace($form, $storage, $pathList);
+	}
+
+	private function replace(Form $form, ClassStorage $storage, array $pathList)
+	{
+		$codeStorage = new CodeStorage();
+		$namespaceBuffer = new NamespaceBuffer();
+		$classBuffer = new ClassBuffer();
+		$aliasBuffer = (new AliasBuffer())
+			->setClassBuffer($classBuffer);
+		$functionBuffer = new FunctionBuffer();
+		$classNameDetectBuffer = (new ClassNameDetectBuffer())
+			->setNamespaceBuffer($namespaceBuffer)
+			->setClassBuffer($classBuffer)
+			->setFunctionBuffer($functionBuffer)
+			->setAliasBuffer($aliasBuffer);
+
+		$chainBuffer = (new ChainBuffer())
+			->addBuffer($codeStorage)
+			->addBuffer($namespaceBuffer)
+			->addBuffer($classBuffer)
+			->addBuffer($aliasBuffer)
+			->addBuffer($functionBuffer)
+			->addBuffer($classNameDetectBuffer);
+
+		foreach ($pathList as $path => $newNamespace) {
+			$subjects = token_get_all(file_get_contents($path));
+
+			$chainBuffer->init();
+			$className = null;
+			foreach ($subjects as $i => $subject) {
+				$chainBuffer->process($subject, $i);
+				if ($className == null && $classBuffer->getClassName()) {
+					$className = ClassUtils::normalClassName(
+						trim($newNamespace, '\\').'\\'.$classBuffer->getClassName()
+					);
+				}
+			}
+
+			$converter = new CodeConverter();
+			$converter
+				->setCurrentClassName($className)
+				->setNewNamespace($newNamespace)
+				->setNamespaceBuffer($namespaceBuffer)
+				->setClassStorage($storage)
+				->setCodeStorage($codeStorage)
+				->setClassNameDetectBuffer($classNameDetectBuffer)
+				->setAliasBuffer($aliasBuffer)
+				->setSkipUses($form->getValue('--noAlias'));
+
+			try {
+				$converter->run();
+			} catch (Exception $e) {
+				throw new CodeConverterException(
+					'Exception while file ('.$path.') converting: '.
+						print_r([get_class($e), $e->getMessage(), $e->getCode(), $e->getFile(), $e->getLine(), $e->getTraceAsString()], true),
+					null,
+					$e
+				);
+			}
+
+			file_put_contents($path, $codeStorage->toString());
+		}
+	}
+
+	/**
+	 *
+	 * @param Form $form
+	 * @return ClassStorage
+	 */
+	private function loadConfig(Form $form)
+	{
+		$storage = new ClassStorage();
+		$path = $form->getValue('--config');
+		if (is_file($path)) {
+			$storage->import(file_get_contents($path));
+		} elseif (is_dir($path)) {
+			$iterator = new RecursiveDirectoryIterator($path);
+			foreach ($iterator as $key => $value) {
+				if (is_file($key)) {
+					$storage->import(file_get_contents($key));
+				}
+			}
+		}
+		return $storage;
+	}
+
+	/**
+	 * @return Form
+	 */
+	private function getForm()
+	{
+		$form = Form::create()
+			->add(Primitive::string('--config')->required())
+			->add($noAlias = Primitive::boolean('--noAlias'))
+			->add(Primitive::alias('--skipAlias', $noAlias))
+			->addRule('configExistsRule', $this->getPathExistsRule('--config'));
+		$this->fillFormWithPath($form);
+		return $form;
+	}
+}
diff --git a/nsConverter/src/Flow/ScanCommand.class.php b/nsConverter/src/Flow/ScanCommand.class.php
new file mode 100644
index 0000000000..5fc1e7db02
--- /dev/null
+++ b/nsConverter/src/Flow/ScanCommand.class.php
@@ -0,0 +1,83 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Flow;
+
+use \Onphp\Form;
+use \Onphp\NsConverter\AddUtils\CMDUtils;
+use \Onphp\NsConverter\Buffers\ClassBuffer;
+use \Onphp\NsConverter\Buffers\ClassStorageBuffer;
+use \Onphp\NsConverter\Buffers\DefineConstantBuffer;
+use \Onphp\NsConverter\Buffers\NamespaceBuffer;
+use \Onphp\NsConverter\Utils\ClassStorage;
+use \Onphp\NsConverter\Utils\FormErrorWriter;
+use \Onphp\NsConverter\Utils\OutputMsg;
+use \Onphp\NsConverter\Utils\PathListGetter;
+use \Onphp\Primitive;
+
+class ScanCommand
+{
+	use OutputMsg, PathListGetter, FormErrorWriter {
+		OutputMsg::msg insteadof FormErrorWriter;
+	}
+
+	public function run()
+	{
+		$form = $this->getForm()
+			->import(CMDUtils::getOptionsList())
+			->checkRules();
+
+		if ($this->processFormError($form)) {
+			return;
+		}
+
+		$classPathList = $this->getPathList($form);
+		$this->scan($form, $classPathList);
+	}
+
+	private function scan(Form $form, array $pathList)
+	{
+		$classStorage = new ClassStorage();
+
+		$constantBuffer = (new DefineConstantBuffer())
+			->setClassStorage($classStorage);
+
+		$namespaceBuffer = new NamespaceBuffer();
+		$classBuffer = new ClassBuffer();
+		$buffer = (new ClassStorageBuffer())
+			->setClassStorage($classStorage)
+			->setNamespaceBuffer($namespaceBuffer)
+			->setClassBuffer($classBuffer);
+
+		foreach ($pathList as $path => $namespace) {
+			$subjects = token_get_all(file_get_contents($path));
+			$buffer->setNewNamespace($namespace)->init();
+			foreach ($subjects as $i => $subject) {
+				$buffer->process($subject, $i);
+				$constantBuffer->process($subject, $i);
+			}
+		}
+		print $classStorage->export($form->getValue('--current'))."\n";
+	}
+
+	/**
+	 * @return Form
+	 */
+	private function getForm()
+	{
+		$form = Form::create()
+			->add(Primitive::boolean('--current'));
+		$this->fillFormWithPath($form);
+		return $form;
+	}
+}
diff --git a/nsConverter/src/Proto/ProtoNsClass.class.php b/nsConverter/src/Proto/ProtoNsClass.class.php
new file mode 100644
index 0000000000..ea490a7ace
--- /dev/null
+++ b/nsConverter/src/Proto/ProtoNsClass.class.php
@@ -0,0 +1,15 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-10-28 12:28:55                    *
+ *   This file will never be generated again - feel free to edit.            *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Proto;
+
+	use \Onphp\NsConverter\Auto\Proto\AutoProtoNsClass;
+
+	
+	
+	class ProtoNsClass extends AutoProtoNsClass {/*_*/}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Proto/ProtoNsConstant.class.php b/nsConverter/src/Proto/ProtoNsConstant.class.php
new file mode 100644
index 0000000000..ce797179db
--- /dev/null
+++ b/nsConverter/src/Proto/ProtoNsConstant.class.php
@@ -0,0 +1,15 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:43:08                    *
+ *   This file will never be generated again - feel free to edit.            *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Proto;
+
+	use \Onphp\NsConverter\Auto\Proto\AutoProtoNsConstant;
+
+	
+	
+	class ProtoNsConstant extends AutoProtoNsConstant {/*_*/}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Proto/ProtoNsFunction.class.php b/nsConverter/src/Proto/ProtoNsFunction.class.php
new file mode 100644
index 0000000000..96c665cee1
--- /dev/null
+++ b/nsConverter/src/Proto/ProtoNsFunction.class.php
@@ -0,0 +1,15 @@
+<?php
+/*****************************************************************************
+ *   Copyright (C) 2006-2009, onPHP's MetaConfiguration Builder.             *
+ *   Generated by onPHP-1.1.master at 2012-11-09 13:43:08                    *
+ *   This file will never be generated again - feel free to edit.            *
+ *****************************************************************************/
+
+	namespace Onphp\NsConverter\Proto;
+
+	use \Onphp\NsConverter\Auto\Proto\AutoProtoNsFunction;
+
+	
+	
+	class ProtoNsFunction extends AutoProtoNsFunction {/*_*/}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Utils/ClassStorage.class.php b/nsConverter/src/Utils/ClassStorage.class.php
new file mode 100644
index 0000000000..7b4e331799
--- /dev/null
+++ b/nsConverter/src/Utils/ClassStorage.class.php
@@ -0,0 +1,247 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+use \Onphp\Assert;
+use \Onphp\NsConverter\Business\NsClass;
+use \Onphp\NsConverter\Business\NsConstant;
+use \Onphp\NsConverter\Business\NsFunction;
+use \Onphp\WrongStateException;
+
+class ClassStorage
+{
+	private $constants = [];
+
+	private $classStorage = [];
+	private $oldNamesMap = [];
+	/**
+	 * @var CodeConverterAlias
+	 */
+	private $aliasConverter = [];
+
+	/**
+	 * @param NsConstant $constant
+	 * @return ClassStorage
+	 * @throws WrongStateException
+	 */
+	public function addConstant(NsConstant $constant)
+	{
+		if (isset($this->constants[$constant->getName()])) {
+			throw new WrongStateException('Constant "'.$constant->getName().'" already added');
+		}
+		$this->constants[$constant->getName()] = $constant;
+		return $this;
+	}
+
+	/**
+	 * @param NsClass $class
+	 * @return ClassStorage
+	 * @throws WrongStateException
+	 */
+	public function addClass(NsObject $class)
+	{
+		$fullName = $class->getFullName();
+		$fullNewName = $class->getFullNewName();
+		if (isset($this->classStorage[$fullNewName])) {
+			$addedClass = $this->classStorage[$fullNewName];
+			/* @var $addedClass NsClass */
+			if (
+				$addedClass->getName() == $class->getName()
+				&& $addedClass->getNamespace() == $class->getNamespace()
+				&& $addedClass->getNewNamespace() == $class->getNewNamespace()
+			) {
+				return $this;
+			}
+			throw new WrongStateException('Class name "'.$fullNewName.'" already added');
+		}
+		if (isset($this->oldNamesMap[$fullName])) {
+			throw new WrongStateException('Old Class name "'.$fullName.'" already added');
+		}
+		$this->oldNamesMap[$fullName] = $fullNewName;
+		$this->classStorage[$fullNewName] = $class;
+
+		return $this;
+	}
+	
+	/**
+	 * @param \Onphp\NsConverter\Utils\NsObject $class
+	 * @return \Onphp\NsConverter\Utils\ClassStorage
+	 */
+	public function dropClass(NsObject $class)
+	{
+		$fullName = $class->getFullName();
+		$fullNewName = $class->getFullNewName();
+		unset($this->oldNamesMap[$fullName]);
+		unset($this->classStorage[$fullNewName]);
+		
+		return $this;
+	}
+
+	public function setAliasConverter(CodeConverterAlias $aliasConverter)
+	{
+		$this->aliasConverter = $aliasConverter;
+		return $this;
+	}
+
+	/**
+	 * @param string $name
+	 * @return NsConstant
+	 */
+	public function findConstant($name)
+	{
+		return isset($this->constants[$name])
+			? $this->constants[$name]
+			: null;
+	}
+	
+	/**
+	 * @return array
+	 */
+	public function getListClasses()
+	{
+		$list = [];
+		foreach ($this->classStorage as $class) {
+			$list[] = $class;
+		}
+		return $list;
+	}
+	
+	/**
+	 * @return array
+	 */
+	public function getListConstants()
+	{
+		$list = [];
+		foreach ($this->constants as $constant) {
+			$list[] = $constant;
+		}
+		return $list;
+	}
+	
+	/**
+	 * @param string $className
+	 * @return array
+	 */
+	public function getListByOldClassName($className)
+	{
+		$list = [];
+		foreach (array_keys($this->oldNamesMap) as $fullOldClassName) {
+			$oldClassName = NamespaceUtils::explodeFullName($fullOldClassName)[1];
+			if ($oldClassName == $className) {
+				$list[] = $this->classStorage[$this->oldNamesMap[$fullOldClassName]];
+			}
+		}
+		return $list;
+	}
+
+	/**
+	 * @param string $name
+	 * @param string $namespace
+	 * @return NsObject
+	 */
+	public function findByClassNs($name, $namespace = null)
+	{
+		$fullName = NamespaceUtils::fixNamespace($namespace).$name;
+		if (isset($this->oldNamesMap[$fullName])) {
+			$fullName = $this->oldNamesMap[$fullName];
+		}
+
+		return isset($this->classStorage[$fullName])
+			? $this->classStorage[$fullName]
+			: null;
+	}
+
+	/**
+	 * @param string $fullName
+	 * @return NsObject
+	 */
+	public function findByFullName($fullName)
+	{
+		list($namespace, $name) = NamespaceUtils::explodeFullName($fullName);
+		return $this->findByClassNs($name, $namespace);
+	}
+
+	/**
+	 * @param string $fullName
+	 * @return NsObject
+	 */
+	public function findByRawClassName($className, $currentNs, $aliases = true)
+	{
+		Assert::isNotNull($this->aliasConverter, 'setAliasConverter first');
+		if (mb_strpos($className, '\\') !== 0) {
+			if ($fullClassName = $this->aliasConverter->getAliasBuffer()->findClass($className)) {
+				$className = $fullClassName;
+			} elseif ($class = $this->findByClassNs($className, $currentNs)) {
+				return $class;
+			}
+		}
+		return $this->findByFullName($className);
+	}
+
+	public function getAliasClassName(NsClass $className, $newNs = null)
+	{
+		Assert::isNotNull($this->aliasConverter, 'setAliasConverter first');
+		return $this->aliasConverter->getClassNameAlias($className->getFullNewName(), $newNs);
+	}
+
+	public function export($currentOnly = false)
+	{
+		$config = [];
+		foreach ($this->constants as $constant) {
+			/* @var $constant NsConstant */
+			$config[] = implode(':', ['CONST', $constant->getName()]);
+		}
+		foreach ($this->classStorage as $class) {
+			/* @var $class NsObject */
+			$parts = [
+				$class instanceof NsClass ? 'C' : 'F',
+				$class->getName(),
+				$class->getNamespace()
+			];
+			if (!$currentOnly) {
+				$parts[] = $class->getNewNamespace();
+			}
+			$config[] = implode(':', $parts);
+		}
+		return implode("\n", $config);
+	}
+
+	public function import($data)
+	{
+		foreach (explode("\n", $data) as $line => $row) {
+			if (!trim($row))
+				continue;
+			if (mb_strpos($row, ';') === 0)
+				continue;
+
+			$parts = explode(':', $row);
+			if (count($parts) == 2 && $parts[0] == 'CONST') {
+				$constant = NsConstant::create()
+					->setName($parts[1]);
+				$this->addConstant($constant);
+			} elseif (count($parts) == 4 && in_array($parts[0], ['C', 'F'])) {
+				list($type, $name, $oldNamespace, $newNamespace) = $parts;
+				$object = ($type == 'C' ? NsClass::create() : NsFunction::create());
+				/* @var $object NsObject */
+				$class = $object
+					->setName($name)
+					->setNamespace($oldNamespace)
+					->setNewNamespace($newNamespace);
+				$this->addClass($class);
+			} else {
+				throw new WrongStateException("Undefined row at line {$line}: {$row}");
+			}
+		}
+	}
+}
diff --git a/nsConverter/src/Utils/CodeConverter.class.php b/nsConverter/src/Utils/CodeConverter.class.php
new file mode 100644
index 0000000000..c27b9e9d2f
--- /dev/null
+++ b/nsConverter/src/Utils/CodeConverter.class.php
@@ -0,0 +1,365 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+use \Onphp\NsConverter\Buffers\CodeStorage;
+use \Onphp\NsConverter\Buffers\NamespaceBuffer;
+use \Onphp\NsConverter\Buffers\ClassNameDetectBuffer;
+use \Onphp\NsConverter\Buffers\AliasBuffer;
+use \Onphp\NsConverter\Business\NsClass;
+use \Onphp\MissingElementException;
+use \Onphp\WrongStateException;
+
+class CodeConverter
+{
+	private static $constants = [
+		'UPLOAD_ERR_NO_FILE',
+		'PREG_SPLIT_NO_EMPTY',
+		'PREG_SPLIT_DELIM_CAPTURE',
+		'PREG_SPLIT_OFFSET_CAPTURE',
+		'MYSQLI_CLIENT_FOUND_ROWS',
+		'SQLITE_NUM',
+	];
+
+	/**
+	 * @var ClassStorage
+	 */
+	private $classStorage = null;
+	/**
+	 * @var CodeStorage
+	 */
+	private $codeStorage = null;
+	/**
+	 * @var NamespaceBuffer
+	 */
+	private $namespaceBuffer = null;
+	/**
+	 * @var ClassNameDetectBuffer
+	 */
+	private $classNameDetectBuffer = null;
+	/**
+	 * @var AliasBuffer
+	 */
+	private $aliasBuffer = null;
+	private $newNamespace = null;
+	private $skipUses = false;
+	private $currentClassName = null;
+
+	/**
+	 * @param ClassStorage $classStorage
+	 * @return CodeConverter
+	 */
+	public function setClassStorage(ClassStorage $classStorage)
+	{
+		$this->classStorage = $classStorage;
+		return $this;
+	}
+
+	/**
+	 * @param CodeStorage $codeStorage
+	 * @return CodeConverter
+	 */
+	public function setCodeStorage(CodeStorage $codeStorage)
+	{
+		$this->codeStorage = $codeStorage;
+		return $this;
+	}
+
+	/**
+	 * @param NamespaceBuffer $namespaceBuffer
+	 * @return CodeConverter
+	 */
+	public function setNamespaceBuffer(NamespaceBuffer $namespaceBuffer)
+	{
+		$this->namespaceBuffer = $namespaceBuffer;
+		return $this;
+	}
+
+	/**
+	 * @param string $newNamespace
+	 * @return CodeConverter
+	 */
+	public function setNewNamespace($newNamespace)
+	{
+		$this->newNamespace = $newNamespace;
+		return $this;
+	}
+
+	/**
+	 * @param ClassNameDetectBuffer $classNameDetectBuffer
+	 * @return CodeConverter
+	 */
+	public function setClassNameDetectBuffer(ClassNameDetectBuffer $classNameDetectBuffer)
+	{
+		$this->classNameDetectBuffer = $classNameDetectBuffer;
+		return $this;
+	}
+
+	/**
+	 * @param AliasBuffer $aliasBuffer
+	 * @return CodeConverter
+	 */
+	public function setAliasBuffer(AliasBuffer $aliasBuffer)
+	{
+		$this->aliasBuffer = $aliasBuffer;
+		return $this;
+	}
+
+	/**
+	 * @param type $skipUses
+	 * @return CodeConverter
+	 */
+	public function setSkipUses($skipUses = false)
+	{
+		$this->skipUses = $skipUses == true;
+		return $this;
+	}
+	
+	/**
+	 * @param type $currentClassName
+	 * @return CodeConverter
+	 */
+	public function setCurrentClassName($currentClassName)
+	{
+		$this->currentClassName = $currentClassName;
+		return $this;
+	}
+	
+	public function run()
+	{
+		$aliasConverter = new CodeConverterAlias();
+		$aliasConverter
+			->setAliasBuffer($this->aliasBuffer)
+			->setSkipUses($this->skipUses)
+			->setCurrentClassName($this->currentClassName);
+
+		$this->classStorage->setAliasConverter($aliasConverter);
+
+		$aliasConverter->clearOldAliases($this->codeStorage);
+		//replacing classnames
+		foreach ($this->classNameDetectBuffer->getClassNameList() as $row) {
+			list($className, $from, $to) = $row;
+			$this->processClassName($className, $from, $to);
+		}
+
+		$this->replaceCommentsStrings();
+
+		$aliases = $aliasConverter->getNewAliases($this->newNamespace);
+		$this->replaceNamespace($aliases);
+
+	}
+
+	private function processClassName($className, $from, $to)
+	{
+		if ($constant = $this->classStorage->findConstant($className)) {
+			/* ok, skip replacing for constants */
+		} elseif ($class = $this->classStorage->findByRawClassName($className, $this->namespaceBuffer->getNamespace())) {
+			if ($class instanceof NsClass) {
+				$alias = $this->classStorage->getAliasClassName($class, $this->newNamespace);
+				$this->codeStorage->addReplace($alias, $from, $to);
+			}
+		} else {
+			$msg = 'Could not find something about name "'.$className.'"';
+			throw new MissingElementException($msg);
+		}
+	}
+
+	private function replaceNamespace(array $aliases = [])
+	{
+		if ($this->namespaceBuffer->getBufferStart()) {
+			$this->codeStorage->addReplace(
+				'namespace '.trim($this->newNamespace, '\\'),
+				$this->namespaceBuffer->getBufferStart(),
+				$this->namespaceBuffer->getBufferEnd() - 1
+			);
+
+			//adding uses after namespace
+			if (!empty($aliases)) {
+				$tabs = '';
+				$endWhite = $this->codeStorage->get($this->namespaceBuffer->getBufferEnd() + 1);
+				$startWhite = $this->codeStorage->get($this->namespaceBuffer->getBufferStart() - 1);
+				if (
+					is_array($startWhite)
+					&& $startWhite[0] == T_WHITESPACE
+					&& preg_match('~\n(\t*)$~u', $startWhite[1], $matches)
+				) {
+					$tabs = $matches[1];
+				}
+				$postFix = is_array($endWhite) ? $endWhite[1] : $endWhite;
+				$aliasString = "\n\n{$tabs}".implode("\n{$tabs}", $aliases).$postFix;
+
+				$this->codeStorage->addReplace($aliasString, $this->namespaceBuffer->getBufferEnd() + 1);
+			}
+
+			return true;
+		} else {
+			$startSubject = $this->codeStorage->get(0);
+			if (!(is_array($startSubject) && $startSubject[0] == T_OPEN_TAG)) {
+				$startSubject = $this->codeStorage->get(0);
+				$startText = is_array($startSubject) ? $startSubject[1] : $startSubject;
+
+				$ns = 'namespace '.trim($this->newNamespace, '\\').';';
+				if ($aliases) {
+					$ns .= "\n".implode("\n", $aliases);
+				}
+				$this->codeStorage->addReplace(
+					"<?php\n".$ns."\n?>".$startText,
+					0
+				);
+				return true;
+			}
+
+			$openPos = null;
+			$codePos = null;
+			for ($i = 0; $i < $this->codeStorage->count(); $i++) {
+				$subject = $this->codeStorage->get($i);
+				if (is_null($openPos) && is_array($subject) && $subject[0] == T_OPEN_TAG) {
+					$openPos = $i;
+				}
+				if (is_null($openPos)) {
+					continue;
+				}
+				if (!is_null($openPos) && is_array($subject) && $subject[0] == T_CLOSE_TAG) {
+					break;
+				}
+
+				$continue = is_array($subject)
+					&& in_array($subject[0], [T_OPEN_TAG, T_OPEN_TAG_WITH_ECHO, T_COMMENT, T_DOC_COMMENT, T_WHITESPACE]);
+				if (!$continue) {
+					$codePos = $i;
+					break;
+				}
+			}
+
+			if (!is_null($codePos)) {
+				$tabs = '';
+				$tabSubject = $this->codeStorage->get($codePos - 1);
+				if (is_array($tabSubject) && $tabSubject[0] = T_WHITESPACE) {
+					if (preg_match("~(\t+)$~u", $tabSubject[1], $matches)) {
+						$tabs = $matches[1];
+					}
+				}
+
+				$nsString = 'namespace '.trim($this->newNamespace, '\\').";\n\n".$tabs;
+				if (!empty($aliases)) {
+					$nsString .= implode("\n{$tabs}", $aliases)."\n\n{$tabs}";
+				}
+
+				$this->codeStorage->addAppend($nsString, $codePos - 1);
+				return true;
+			} elseif (!is_null($openPos)) {
+				$tabs = '';
+				$nextSubject = $this->codeStorage->get($openPos + 1);
+				if (is_array($nextSubject) && $nextSubject[0] == T_WHITESPACE) {
+					if (preg_match("~(\t+)$~u", $nextSubject[1], $matches)) {
+						$tabs = $matches[1];
+					}
+				}
+
+				$nsString = 'namespace '.trim($this->newNamespace, '\\').";\n".$tabs;
+				if (!empty($aliases)) {
+					$nsString .= implode("\n{$tabs}", $aliases)."\n{$tabs}";
+				}
+				$this->codeStorage->addAppend(
+					"\n{$tabs}".$nsString,
+					$openPos
+				);
+				return true;
+			} else {
+				throw new WrongStateException('Php open tag not found');
+			}
+
+			return null;
+		}
+	}
+
+	private function replaceCommentsStrings()
+	{
+		$count = $this->codeStorage->count();
+		for ($i = 0; $i < $count; $i++) {
+			$subject = $this->codeStorage->get($i);
+			if (is_array($subject) && in_array($subject[0], [T_COMMENT, T_DOC_COMMENT])) {
+				$newComment = $this->processComment($subject[1], $i);
+				$this->codeStorage->addReplace($newComment, $i);
+			} elseif (is_array($subject) && in_array($subject[0], [T_CONSTANT_ENCAPSED_STRING])) {
+				$newString = $this->processString($subject[1], $i);
+				$this->codeStorage->addReplace($newString, $i);
+			}
+		}
+	}
+
+	private function processString($string, $num)
+	{
+		$pattern = '~^([\'"])([\\\\A-Z][\\\\A-Za-z0-9]+)([\'"])~';
+		if (preg_match($pattern, $string, $matches) && $matches[1] == $matches[3]) {
+			$class = $this->classStorage->findByRawClassName($matches[2], $this->namespaceBuffer->getNamespace(), false);
+			if ($class) {
+				return $matches[1]
+					. $class->getFullNewName()
+					.$matches[1];
+			}
+		}
+		return $string;
+	}
+
+	private function processComment($comment, $num)
+	{
+		$parts = [];
+		foreach ($this->getCommentPatterns() as $pattern) {
+			if ($count = preg_match_all($pattern, $comment, $matches)) {
+				for ($i = 0; $i < $count; $i++) {
+					$parts[$matches[0][$i]] = $matches[1][$i];
+				}
+			}
+		}
+
+		foreach ($parts as $codeString => $className) {
+			$class = $this->classStorage->findByRawClassName(
+				$className,
+				$this->namespaceBuffer->getNamespace()
+			);
+			if ($class) {
+				$alias = $this->classStorage->getAliasClassName($class, $this->newNamespace);
+				$newCodeString = preg_replace(
+					'~'.$this->regPatternEscape($className).'~u',
+					$alias,
+					$codeString
+				);
+				$newCodeString = preg_replace('~\$~', '\\\$', $newCodeString);
+				$pattern = '~'.$this->regPatternEscape($codeString).'~u';
+
+				$comment = preg_replace($pattern, $newCodeString, $comment);
+			}
+		}
+		return $comment;
+	}
+
+	private function getCommentPatterns()
+	{
+		$classPattern = '[\\\\A-Z][\\\\A-Za-z0-9]+';
+
+		return [
+			'~@param\s+('.$classPattern.')\s+\$[\w]+~us',
+			'~@var\s+('.$classPattern.')~us',
+			'~@var\s+\$[\w]+\s+('.$classPattern.')~us',
+			'~@return\s+('.$classPattern.')~us',
+			'~@throws\s+('.$classPattern.')~us',
+		];
+	}
+
+	private function regPatternEscape($string)
+	{
+		return preg_replace('~([$@()?\.+\\\\])~', '\\\\$1', $string);
+	}
+}
diff --git a/nsConverter/src/Utils/CodeConverterAlias.class.php b/nsConverter/src/Utils/CodeConverterAlias.class.php
new file mode 100644
index 0000000000..94dc3a614d
--- /dev/null
+++ b/nsConverter/src/Utils/CodeConverterAlias.class.php
@@ -0,0 +1,132 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+use \Onphp\NsConverter\Buffers\AliasBuffer;
+use \Onphp\WrongStateException;
+use \Onphp\NsConverter\Buffers\CodeStorage;
+
+class CodeConverterAlias
+{
+	/**
+	 * @var AliasBuffer
+	 */
+	private $aliasBuffer = null;
+	private $aliases = [];
+	private $rAliases = [];
+	private $hidden = [];
+	private $skipUses = false;
+//	private $currentNs = null;
+//	private $currentClassName = null;
+
+	/**
+	 * @return AliasBuffer
+	 */
+	public function getAliasBuffer()
+	{
+		return $this->aliasBuffer;
+	}
+
+	public function setAliasBuffer(AliasBuffer $aliasBuffer)
+	{
+		$this->aliasBuffer = $aliasBuffer;
+		return $this;
+	}
+
+	public function setSkipUses($skipUses)
+	{
+		$this->skipUses = $skipUses == true;
+		return $this;
+	}
+	
+	public function setCurrentClassName($currentName)
+	{
+		list($newNs) = NamespaceUtils::explodeFullName($currentName);
+		$this->getClassNameAlias($currentName, $newNs);
+		
+		return $this;
+	}
+	
+	public function getClassNameAlias($fullClassName, $newNs)
+	{
+		$newNs = NamespaceUtils::fixNamespace($newNs);
+		list($ns, $className) = NamespaceUtils::explodeFullName($fullClassName);
+
+		if ($this->skipUses) {
+			return $newNs == $ns ? $className : $fullClassName;
+		}
+
+		if (isset($this->rAliases[$fullClassName])) {
+			return $this->rAliases[$fullClassName];
+		}
+
+		$alias = $className;
+		if (isset($this->aliases[$alias])) {
+			$i = 2;
+			do {
+				$alias = $className.$i++;
+			} while (isset($this->aliases[$alias]) && $i < 100);
+			if (isset($this->aliases[$alias])) {
+				throw new WrongStateException();
+			}
+		}
+		$this->aliases[$alias] = $fullClassName;
+		$this->rAliases[$fullClassName] = $alias;
+		if ($ns == $newNs && $className == $alias) {
+			$this->hidden[$alias] = true;
+		}
+
+		return $alias;
+	}
+
+	/**
+	 * @param CodeStorage $codeStorage
+	 */
+	public function clearOldAliases(CodeStorage $codeStorage)
+	{
+		$isFirst = true;
+		foreach ($this->aliasBuffer->getBuffers() as $fromTo) {
+			list($from, $to) = $fromTo;
+			$codeStorage->addReplace('', $from, $to);
+			if (!$isFirst) {
+				$whiteSubj = $codeStorage->get($to + 1);
+				if (is_array($whiteSubj) && $whiteSubj[0] = T_WHITESPACE) {
+					$codeStorage->addReplace('', $to + 1);
+				}
+				$whiteSubj = $codeStorage->get($from - 1);
+				if (is_array($whiteSubj) && $whiteSubj[0] = T_WHITESPACE) {
+					$codeStorage->addReplace('', $from - 1);
+				}
+			}
+			$isFirst = false;
+		}
+	}
+
+	public function getNewAliases($currentNs)
+	{
+		$currentNs = NamespaceUtils::fixNamespace($currentNs);
+
+		$aliases = [];
+		foreach ($this->aliases as $to => $from) {
+			if (!isset($this->hidden[$to])) {
+				if (NamespaceUtils::explodeFullName($from)[1] != $to) {
+					$aliases[] = "use {$from} as {$to};";
+				} else {
+					$aliases[] = "use {$from};";
+				}
+			}
+		}
+		return $aliases;
+	}
+}
diff --git a/nsConverter/src/Utils/CodeConverterException.class.php b/nsConverter/src/Utils/CodeConverterException.class.php
new file mode 100644
index 0000000000..00e721d2d7
--- /dev/null
+++ b/nsConverter/src/Utils/CodeConverterException.class.php
@@ -0,0 +1,23 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	namespace Onphp\NsConverter\Utils;
+
+	use \Onphp\BaseException;
+
+	
+
+	class CodeConverterException extends BaseException
+	{
+		
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/src/Utils/FormErrorWriter.class.php b/nsConverter/src/Utils/FormErrorWriter.class.php
new file mode 100644
index 0000000000..bab89298a5
--- /dev/null
+++ b/nsConverter/src/Utils/FormErrorWriter.class.php
@@ -0,0 +1,31 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+use \Onphp\Form;
+
+
+
+trait FormErrorWriter
+{
+	use OutputMsg;
+	
+	public function processFormError(Form $form)
+	{
+		if ($errors = $form->getErrors()) {
+			$this->msg(print_r($errors, true));
+			return true;
+		}
+	}
+}
diff --git a/nsConverter/src/Utils/NamespaceUtils.class.php b/nsConverter/src/Utils/NamespaceUtils.class.php
new file mode 100644
index 0000000000..36ad46160d
--- /dev/null
+++ b/nsConverter/src/Utils/NamespaceUtils.class.php
@@ -0,0 +1,37 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+class NamespaceUtils
+{
+	public static function fixNamespace($namespace)
+	{
+		$namespace = trim($namespace, '\\');
+		return '\\'.($namespace ? ($namespace . '\\') : '');
+	}
+	
+	/**
+	 * @param string $fullName
+	 * @return array(namespace, className)
+	 */
+	public static function explodeFullName($fullName)
+	{
+		$parts = explode('\\', $fullName);
+		$className = array_pop($parts);
+		return [
+			NamespaceUtils::fixNamespace(implode('\\', $parts)),
+			$className
+		];
+	}
+}
diff --git a/nsConverter/src/Utils/NsObject.class.php b/nsConverter/src/Utils/NsObject.class.php
new file mode 100644
index 0000000000..2e2c6ecca1
--- /dev/null
+++ b/nsConverter/src/Utils/NsObject.class.php
@@ -0,0 +1,46 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+use \Onphp\NsConverter\Business\NsFunction;
+
+
+
+interface NsObject
+{
+	public function getName();
+
+	/**
+	 * @return NsFunction
+	**/
+	public function setName($name);
+
+	public function getNamespace();
+
+	/**
+	 * @return NsFunction
+	**/
+	public function setNamespace($namespace);
+
+	public function getNewNamespace();
+
+	/**
+	 * @return NsFunction
+	**/
+	public function setNewNamespace($newNamespace);
+
+	public function getFullName();
+
+	public function getFullNewName();
+}
diff --git a/nsConverter/src/Utils/OutputMsg.class.php b/nsConverter/src/Utils/OutputMsg.class.php
new file mode 100644
index 0000000000..4a91d22bb9
--- /dev/null
+++ b/nsConverter/src/Utils/OutputMsg.class.php
@@ -0,0 +1,22 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+trait OutputMsg
+{
+	protected function msg($msg)
+	{
+		print $msg . "\n";
+	}
+}
diff --git a/nsConverter/src/Utils/PathListGetter.class.php b/nsConverter/src/Utils/PathListGetter.class.php
new file mode 100644
index 0000000000..0ddbb4dc3f
--- /dev/null
+++ b/nsConverter/src/Utils/PathListGetter.class.php
@@ -0,0 +1,116 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+use \Onphp\Form;
+use \Onphp\Primitive;
+use \Onphp\NsConverter\AddUtils\CallbackLogicalObjectSuccess;
+use \Onphp\NamespaceResolverPSR0;
+use \Onphp\NamespaceResolverOnPHP;
+use \RecursiveIteratorIterator;
+use \RecursiveDirectoryIterator;
+use \Onphp\NamespaceResolver;
+
+trait PathListGetter
+{
+	/**
+	 * @return Form
+	 */
+	protected function fillFormWithPath(Form $form)
+	{
+		$form
+			->add(Primitive::string('--ext'))
+			->add(Primitive::string('--path')->required())
+			->add(Primitive::string('--psr0'))
+			->add(Primitive::string('--namespace')->setAllowedPattern('~^[\w\d\\\\]+$~iu'))
+			->addRule('pathExistsRule', $this->getPathExistsRule('--path'))
+		;
+	}
+	
+	protected function getPathExistsRule($property)
+	{
+		return CallbackLogicalObjectSuccess::create(function(Form $form) use ($property) {
+			if ($path = $form->getValue($property)) {
+				if (!file_exists($path)) {
+					$form->markWrong($property);
+				} elseif (!is_readable($path)) {
+					$form->markWrong($property);
+				}
+			}
+		});
+	}
+	
+	/**
+	 * @param NamespaceResolver $resolver
+	 * @return array (path => namespace)
+	 */
+	protected function getPathList(Form $form)
+	{
+		$path = realpath($form->getValue('--path'));
+		if (is_file($path)) {
+			return [$path => NamespaceUtils::fixNamespace($form->getValue('--namespace'))];
+		}
+		
+		$resolver = $this->getNamespaceResolver($form);
+		
+		$classPathList = $resolver->getClassPathList();
+		$pathList = [];
+		foreach ($classPathList as $key => $value) {
+			if (!is_numeric($key)) {
+				list($namespace, $classname) = NamespaceUtils::explodeFullName($key);
+				$path = realpath($classPathList[$value])
+					.'/'.$classname.$resolver->getClassExtension();
+				$pathList[$path] = $namespace;
+			}
+		}
+		return $pathList;
+	}
+	
+	/**
+	 * @param Form $form
+	 * @return NamespaceResolver
+	 */
+	private function getNamespaceResolver(Form $form)
+	{
+		if ($form->getValue('--psr0')) {
+			$resolver = NamespaceResolverPSR0::create();
+			if ($ext = $form->getValue('--ext')) {
+				$resolver->setClassExtension($ext);
+			}
+			$resolver->setAllowedUnderline(false);
+			$resolver->addPath(realpath($form->getValue('--path')), $form->getValue('--namespace'));
+			return $resolver;
+		}
+		
+		$resolver = NamespaceResolverOnPHP::create();
+		if ($ext = $form->getValue('--ext')) {
+			$resolver->setClassExtension($ext);
+		}
+		
+		$iterator = new RecursiveIteratorIterator(
+			new RecursiveDirectoryIterator(realpath($form->getValue('--path')))
+		);
+		$pathList = [];
+		foreach ($iterator as $key => $path) {
+			if (is_dir($key)) {
+				if (preg_match('~\.\.$~', $key)) {
+					continue;
+				}
+				$pathList[] = $key;
+			}
+		}
+		
+		return $resolver->addPaths($pathList, $form->getValue('--namespace'));
+	}
+}
diff --git a/nsConverter/test/bootstrap.php b/nsConverter/test/bootstrap.php
new file mode 100644
index 0000000000..f6ff40e4ae
--- /dev/null
+++ b/nsConverter/test/bootstrap.php
@@ -0,0 +1,11 @@
+<?php
+namespace Onphp\NsConverter;
+
+define('TEST_MODE', true);
+require dirname(dirname(__FILE__)).'/conf/config.auto.inc.php';
+\Onphp\AutoloaderClassPathCache::create()
+	->setNamespaceResolver(\Onphp\NamespaceResolverPSR0::create())
+	->addPaths([
+		PATH_BASE.'test'.DIRECTORY_SEPARATOR.'utils'.DIRECTORY_SEPARATOR,
+	], 'Onphp\NsConverter\Test')
+	->register();
diff --git a/nsConverter/test/cases/Buffers/AliasBufferTest.php b/nsConverter/test/cases/Buffers/AliasBufferTest.php
new file mode 100644
index 0000000000..97df156822
--- /dev/null
+++ b/nsConverter/test/cases/Buffers/AliasBufferTest.php
@@ -0,0 +1,116 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Test\TestCase;
+
+
+
+/**
+ * @group ab
+ */
+class AliasBufferTest extends TestCase
+{
+	/**
+	 * @group ab1
+	 */
+	public function testSimple()
+	{
+		$aliasBuffer = $this->execute();
+		
+		$this->assertEquals(['Class1' => '\SomeNs\Sub\Class1'], $aliasBuffer->getAliases());
+		$this->assertEquals([[6, 18]], $aliasBuffer->getBuffers());
+	}
+	
+	/**
+	 * @group ab2
+	 */
+	public function testMultiple()
+	{
+		$aliasExp = [
+			'Class1' => '\SomeNs\Sub\Class1',
+			'\SomeNs2\Sub3' => '\SomeNs\Sub2',
+			'Exception' => '\Exception',
+		];
+		
+		$aliasBuffer = $this->execute('2');
+		
+		$this->assertEquals($aliasExp, $aliasBuffer->getAliases());
+		$this->assertEquals([[6, 35]], $aliasBuffer->getBuffers());
+	}
+	
+	/**
+	 * @group ab3
+	 */
+	public function testMixed()
+	{
+		$aliasExp = [
+			'Class1' => '\SomeNs\Sub\Class1',
+			'\SomeNs2\Sub3' => '\SomeNs\Sub2',
+			'Exception' => '\Exception',
+			'Exception2' => '\Exception2',
+			'Class2' => '\SomeNs\Sub\Class1',
+		];
+		$buffersExp = [
+			[6, 35],
+			[37, 41],
+			[43, 55],
+		];
+		
+		$aliasBuffer = $this->execute('3');
+		
+		$this->assertEquals($aliasExp, $aliasBuffer->getAliases());
+		$this->assertEquals($buffersExp, $aliasBuffer->getBuffers());
+	}
+	
+	/**
+	 * @param string $fileNum
+	 * @return AliasBuffer
+	 */
+	private function execute($fileNum = '')
+	{
+		$chain = new ChainBuffer();
+		$chain->addBuffer($nsBuffer = new NamespaceBuffer());
+		$chain->addBuffer($classBuffer = new ClassBuffer());
+		$chain->addBuffer($aliasBuffer = $this->getService($nsBuffer, $classBuffer));
+		
+		$file = $this->getTestFileContent($fileNum);
+		$subjects = token_get_all($file);
+
+		$chain->init();
+		foreach ($subjects as $i => $subject) {
+			$chain->process($subject, $i);
+		}
+		
+		return $aliasBuffer;
+	}
+
+	/**
+	 * @return AliasBuffer
+	 */
+	private function getService(NamespaceBuffer $nsBuffer, ClassBuffer $classBuffer)
+	{
+		return (new AliasBuffer())
+			->setNamespaceBuffer($nsBuffer)
+			->setClassBuffer($classBuffer)
+			;
+	}
+
+	private function getTestFileContent($fileNum = '')
+	{
+		return file_get_contents(
+				$this->getDataPath('buffers' . DIRECTORY_SEPARATOR . "AliasBufferTest{$fileNum}.txt")
+		);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/cases/Buffers/ClassBufferTest.php b/nsConverter/test/cases/Buffers/ClassBufferTest.php
new file mode 100644
index 0000000000..cc5e0f7f93
--- /dev/null
+++ b/nsConverter/test/cases/Buffers/ClassBufferTest.php
@@ -0,0 +1,92 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Test\TestCase;
+
+
+
+class ClassBufferTest extends TestCase
+{
+	public function testSimple()
+	{
+		$buffer = $this->getService();
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+
+		$expectBuffering = [[6, 9], [24, 27], [91, 94]];
+		$expectClassnames = [
+			[10, 11, 'TestSecondClassToParse'],
+			[28, 79, 'A'],
+			[95, 175, 'TestOneClassToParse'],
+		];
+
+		foreach ($subjects as $i => $subject) {
+			$buffer->process($subject, $i);
+			$this->checkBuffering($buffer, $i, $expectBuffering);
+			$this->checkNaming($buffer, $i, $expectClassnames);
+		}
+		$this->assertEquals(178, $i, 'expecting 105 subjects');
+	}
+
+	private function checkBuffering(ClassBuffer $buffer, $i, $expectation)
+	{
+		$expect = false;
+		foreach ($expectation as $minMax) {
+			list($min, $max) = $minMax;
+			if ($i >= $min && $i <= $max) {
+				$expect = true;
+				break;
+			}
+		}
+		
+		if ($expect)
+			$this->assertTrue($buffer->isBuffer(), "expecting buffer at {$i} token position");
+		else
+			$this->assertFalse($buffer->isBuffer(), "not expected buffer at {$i} token position");
+	}
+
+	private function checkNaming(ClassBuffer $buffer, $i, $expectation)
+	{
+		$expect = '';
+		foreach ($expectation as $minMax) {
+			list($min, $max, $classname) = $minMax;
+			if ($i >= $min && $i <= $max) {
+				$expect = $classname;
+				break;
+			}
+		}
+		
+		$this->assertEquals(
+			$expect,
+			$buffer->getClassName(),
+			"expecting classname '{$expect}' at token position {$i}"
+		);
+	}
+
+	/**
+	 * @return ClassBuffer
+	 */
+	private function getService()
+	{
+		return (new ClassBuffer())->init();
+	}
+
+	private function getTestFileContent()
+	{
+		return file_get_contents(
+				$this->getDataPath('buffers' . DIRECTORY_SEPARATOR . 'ClassBufferTest.php')
+		);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/cases/Buffers/ClassNameBufferTest.php b/nsConverter/test/cases/Buffers/ClassNameBufferTest.php
new file mode 100644
index 0000000000..75d47b218d
--- /dev/null
+++ b/nsConverter/test/cases/Buffers/ClassNameBufferTest.php
@@ -0,0 +1,69 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Test\TestCase;
+
+
+
+/**
+ * @group cn
+ */
+class ClassNameBufferTest extends TestCase
+{
+	public function testSimple()
+	{
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+
+		$buffer = null;
+		$classList = [];
+		$prevSubject = null;
+		foreach ($subjects as $i => $subject) {
+			if (!$buffer && ClassNameBuffer::canStart($subject, $prevSubject)) {
+				$buffer = $this->getService();
+				$buffer->process($subject, $i);
+			} elseif ($buffer) {
+				$buffer->process($subject, $i);
+				if (!$buffer->isBuffer()) {
+					if ($className = $buffer->getClassName()) {
+						$classList[] = $buffer->getClassName()
+							.':'.$buffer->getClassNameStart()
+							.':'.$buffer->getClassNameEnd();
+					}
+					$buffer = null;
+				}
+			}
+			$prevSubject = $subject;
+		}
+		
+		$expectationClass = ['\NsConverter\Form:3:6', '\onPHP\Model:11:16', 'HttpRequest:23:23'];
+		$this->assertEquals(implode("\n", $expectationClass), implode("\n", $classList));
+	}
+
+	/**
+	 * @return ClassBuffer
+	 */
+	private function getService()
+	{
+		return (new ClassNameBuffer())->init();
+	}
+
+	private function getTestFileContent()
+	{
+		return file_get_contents(
+				$this->getDataPath('buffers' . DIRECTORY_SEPARATOR . 'ClassNameBufferTest.txt')
+		);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/cases/Buffers/ClassNameDetectBufferTest.php b/nsConverter/test/cases/Buffers/ClassNameDetectBufferTest.php
new file mode 100644
index 0000000000..bc2c8f6d19
--- /dev/null
+++ b/nsConverter/test/cases/Buffers/ClassNameDetectBufferTest.php
@@ -0,0 +1,82 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Test\TestCase;
+
+
+
+
+/**
+ * @group cd
+ */
+class ClassNameDetectBufferTest extends TestCase
+{
+	public function testSimple()
+	{
+		$service = $this->getService();
+
+		$service
+			->setNamespaceBuffer($nsBuffer = new NamespaceBuffer())
+			->setClassBuffer($classBuffer = new ClassBuffer())
+			->setAliasBuffer(
+				$aliasBuffer = (new AliasBuffer())
+					->setClassBuffer($classBuffer)
+					->setNamespaceBuffer($nsBuffer)
+			)
+			->setFunctionBuffer($functionBuffer = new FunctionBuffer());
+		
+		$chain = new ChainBuffer();
+		$chain
+			->addBuffer($nsBuffer)
+			->addBuffer($classBuffer)
+			->addBuffer($aliasBuffer)
+			->addBuffer($functionBuffer)
+			->addBuffer($service);
+
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+
+		$chain->init();
+		foreach ($subjects as $i => $subject) {
+			$chain->process($subject, $i);
+		}
+		
+		$expectationClass = [
+			'\NsConverter\Form:8:11',
+			'\onPHP\Model:16:21',
+			'HttpRequest:28:28',
+			'\CommandChain:81:82',
+		];
+
+		$map = function($value) {return implode(':', $value);};
+		$classList = array_map($map, $service->getClassNameList());
+		$this->assertEquals(implode("\n", $expectationClass), implode("\n", $classList));
+	}
+
+	/**
+	 * @return ClassNameDetectBuffer
+	 */
+	private function getService()
+	{
+		return (new ClassNameDetectBuffer())->init();
+	}
+
+	private function getTestFileContent()
+	{
+		return file_get_contents(
+				$this->getDataPath('buffers' . DIRECTORY_SEPARATOR . 'ClassNameDetectBufferTest.txt')
+		);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/cases/Buffers/CodeStorageTest.php b/nsConverter/test/cases/Buffers/CodeStorageTest.php
new file mode 100644
index 0000000000..3c0bbdc06b
--- /dev/null
+++ b/nsConverter/test/cases/Buffers/CodeStorageTest.php
@@ -0,0 +1,92 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Test\TestCase;
+
+
+
+class CodeStorageTest extends TestCase
+{
+
+	public function testSimpleCopy()
+	{
+		$storage = $this->getService();
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+		foreach ($subjects as $i => $subject) {
+			$storage->process($subject, $i);
+		}
+		$this->assertEquals($file, $storage->toString());
+	}
+	
+	public function testOneSizeReplace()
+	{
+		$storage = $this->getService();
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+		foreach ($subjects as $i => $subject) {
+			$storage->process($subject, $i);
+		}
+		$storage
+			->addReplace('<?', 0)
+			->addReplace('', count($subjects) - 1);
+		
+		$expectation = preg_replace(["~^<\?php\n~u", '~\?>$~u'], ['<?', ''], $file);
+		$this->assertEquals($expectation, $storage->toString());
+	}
+	
+	public function testMoreThanOneSizeReplace()
+	{
+		$storage = $this->getService();
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+		foreach ($subjects as $i => $subject) {
+			$storage->process($subject, $i);
+		}
+		$storage
+			->addReplace('require "someThing"', 2, 7);
+		
+		$expectation = preg_replace(["~namespace[^;]+;~iu"], ['require "someThing"'], $file);
+		$this->assertEquals($expectation, $storage->toString());
+	}
+	
+	public function testAppend()
+	{
+		$storage = $this->getService();
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+		foreach ($subjects as $i => $subject) {
+			$storage->process($subject, $i);
+		}
+		$storage->addAppend(' extends SomeAnotherClass', 11);
+		$expectation = preg_replace(["~(TestOneClassToParse)~iu"], ['$1 extends SomeAnotherClass'], $file);
+		$this->assertEquals($expectation, $storage->toString());
+	}
+
+	/**
+	 * @return CodeStorage
+	 */
+	private function getService()
+	{
+		return (new CodeStorage())->init();
+	}
+	
+	private function getTestFileContent()
+	{
+		return file_get_contents(
+			$this->getDataPath('buffers' . DIRECTORY_SEPARATOR . 'CodeStorageTest.php')
+		);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/cases/Buffers/DefineConstantBufferTest.php b/nsConverter/test/cases/Buffers/DefineConstantBufferTest.php
new file mode 100644
index 0000000000..787428a7ab
--- /dev/null
+++ b/nsConverter/test/cases/Buffers/DefineConstantBufferTest.php
@@ -0,0 +1,76 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Test\TestCase;
+use \Onphp\NsConverter\Utils\ClassStorage;
+
+/**
+ * @group dc
+ */
+class DefineConstantBufferTest extends TestCase
+{
+	/**
+	 * @group dc1
+	 */
+	public function testSimple()
+	{
+		$classStorage = $this->execute();
+
+		$exps = [
+			'CONST:ABC',
+			'CONST:A2BC5',
+			'CONST:ab_cf',
+		];
+
+
+		$this->assertEquals(implode("\n", $exps), $classStorage->export());
+	}
+
+	/**
+	 * @param string $fileNum
+	 * @return DefineConstantBuffer
+	 */
+	private function execute($fileNum = '')
+	{
+		$classStorage = new ClassStorage();
+		$constBuffer = $this->getService($classStorage);
+
+		$file = $this->getTestFileContent($fileNum);
+		$subjects = token_get_all($file);
+
+		$constBuffer->init();
+		foreach ($subjects as $i => $subject) {
+			$constBuffer->process($subject, $i);
+		}
+
+		return $classStorage;
+	}
+
+	/**
+	 * @return DefineConstantBuffer
+	 */
+	private function getService($classStorage)
+	{
+		return (new DefineConstantBuffer())
+			->setClassStorage($classStorage);
+	}
+
+	private function getTestFileContent($fileNum = '')
+	{
+		return file_get_contents(
+				$this->getDataPath('buffers' . DIRECTORY_SEPARATOR . "DefineConstantBufferTest{$fileNum}.txt")
+		);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/cases/Buffers/FunctionBufferTest.php b/nsConverter/test/cases/Buffers/FunctionBufferTest.php
new file mode 100644
index 0000000000..076bff55eb
--- /dev/null
+++ b/nsConverter/test/cases/Buffers/FunctionBufferTest.php
@@ -0,0 +1,92 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Test\TestCase;
+
+/**
+ * @group fb
+ */
+class FunctionBufferTest extends TestCase
+{
+	public function testSimple()
+	{
+		$buffer = $this->getService();
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+
+		$expectBuffering = [[17, 19], [71, 72]];
+		$expectClassnames = [
+			[20, 40, 'doSomething'],
+			[73, 90, ''],
+		];
+
+		foreach ($subjects as $i => $subject) {
+			$buffer->process($subject, $i);
+			$this->checkBuffering($buffer, $i, $expectBuffering);
+			$this->checkNaming($buffer, $i, $expectClassnames);
+		}
+		$this->assertEquals(105, $i, 'expecting 105 subjects');
+	}
+
+	private function checkBuffering(FunctionBuffer $buffer, $i, $expectation)
+	{
+		$expect = false;
+		foreach ($expectation as $minMax) {
+			list($min, $max) = $minMax;
+			if ($i >= $min && $i <= $max) {
+				$expect = true;
+				break;
+			}
+		}
+		
+		if ($expect)
+			$this->assertTrue($buffer->isBuffer(), "expecting buffer at {$i} token position");
+		else
+			$this->assertFalse($buffer->isBuffer(), "not expected buffer at {$i} token position");
+	}
+
+	private function checkNaming(FunctionBuffer $buffer, $i, $expectation)
+	{
+		$expect = '';
+		foreach ($expectation as $minMax) {
+			list($min, $max, $classname) = $minMax;
+			if ($i >= $min && $i <= $max) {
+				$expect = $classname;
+				break;
+			}
+		}
+		
+		$this->assertEquals(
+			$expect,
+			$buffer->getFunctionName(),
+			"expecting classname '{$expect}' at token position {$i}"
+		);
+	}
+
+	/**
+	 * @return FunctionBuffer
+	 */
+	private function getService()
+	{
+		return (new FunctionBuffer())->init();
+	}
+
+	private function getTestFileContent()
+	{
+		return file_get_contents(
+			$this->getDataPath('buffers' . DIRECTORY_SEPARATOR . 'FunctionBufferTest.php')
+		);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/cases/Buffers/NamespaceBufferTest.php b/nsConverter/test/cases/Buffers/NamespaceBufferTest.php
new file mode 100644
index 0000000000..4498505c29
--- /dev/null
+++ b/nsConverter/test/cases/Buffers/NamespaceBufferTest.php
@@ -0,0 +1,94 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Buffers;
+
+use \Onphp\NsConverter\Test\TestCase;
+
+
+
+class NamespaceBufferTest extends TestCase
+{
+
+	public function testSimple()
+	{
+		$buffer = $this->getService();
+		$file = $this->getTestFileContent();
+		$subjects = token_get_all($file);
+
+		$expectBuffering = [[2, 6], [45, 46], [59, 64]];
+		$expectNamespaces = [
+			[7, 44, 'converter\testclass'],
+			[65, 102, 'convert\testclass2'],
+		];
+
+		foreach ($subjects as $i => $subject) {
+			$buffer->process($subject, $i);
+			$this->checkBuffering($buffer, $i, $expectBuffering);
+			$this->checkNamespacing($buffer, $i, $expectNamespaces);
+		}
+		$this->assertEquals(59, $buffer->getBufferStart());
+		$this->assertEquals(65, $buffer->getBufferEnd());
+		$this->assertEquals(105, $i, 'expecting 105 subjects');
+	}
+
+	private function checkBuffering(NamespaceBuffer $buffer, $i, $expectation)
+	{
+		$expect = false;
+		foreach ($expectation as $minMax) {
+			list($min, $max) = $minMax;
+			if ($i >= $min && $i <= $max) {
+				$expect = true;
+				break;
+			}
+		}
+		
+		if ($expect)
+			$this->assertTrue($buffer->isBuffer(), "expecting buffer at {$i} token position");
+		else
+			$this->assertFalse($buffer->isBuffer(), "not expected buffer at {$i} token position");
+	}
+
+	private function checkNamespacing(NamespaceBuffer $buffer, $i, $expectation)
+	{
+		$expect = '';
+		foreach ($expectation as $minMax) {
+			list($min, $max, $namespace) = $minMax;
+			if ($i >= $min && $i <= $max) {
+				$expect = $namespace;
+				break;
+			}
+		}
+		
+		$this->assertEquals(
+			$expect,
+			$buffer->getNamespace(),
+			"expecting namespace '{$expect}' at token position {$i}"
+		);
+	}
+
+	/**
+	 * @return NamespaceBuffer
+	 */
+	private function getService()
+	{
+		return (new NamespaceBuffer())->init();
+	}
+
+	private function getTestFileContent()
+	{
+		return file_get_contents(
+				$this->getDataPath('buffers' . DIRECTORY_SEPARATOR . 'NamespaceBufferTest.php')
+		);
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/cases/Utils/CodeConverterTest.php b/nsConverter/test/cases/Utils/CodeConverterTest.php
new file mode 100644
index 0000000000..a7c0e6ad6d
--- /dev/null
+++ b/nsConverter/test/cases/Utils/CodeConverterTest.php
@@ -0,0 +1,206 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace Onphp\NsConverter\Utils;
+
+use \Onphp\NsConverter\Test\TestCase;
+use \Onphp\NsConverter\Buffers\CodeStorage;
+use \Onphp\NsConverter\Buffers\NamespaceBuffer;
+use \Onphp\NsConverter\Buffers\ClassBuffer;
+use \Onphp\NsConverter\Buffers\AliasBuffer;
+use \Onphp\NsConverter\Buffers\FunctionBuffer;
+use \Onphp\NsConverter\Buffers\ClassNameDetectBuffer;
+use \Onphp\NsConverter\Buffers\ChainBuffer;
+use \Onphp\NsConverter\Business\NsClass;
+use \Onphp\NsConverter\Business\NsFunction;
+use \Onphp\NsConverter\Business\NsConstant;
+
+/**
+ * @group cc
+ */
+class CodeConverterTest extends TestCase
+{
+	/**
+	 * @group cc1
+	 */
+	public function testSimpleNoNamespace()
+	{
+		$classStorage = $this->getClassStorage([
+			['Form', '', 'Onphp'],
+			['Model', '', '\\Onphp\\'],
+			['HttpRequest', '', 'convert\testclass2'],
+			['CommandChain', '', 'Onphp\\'],
+			['B', '', 'converter'],
+			['View', '', 'Onphp'],
+			['Primitive', '', 'Onphp'],
+		], [], ['SUPER_CONST', 'CONST', 'lowconst']);
+
+		$codeStorage = $this->runConverter($classStorage, $this->getTestFilePath(), 'convert\testclass2');
+		$this->assertEquals(file_get_contents($this->getTestFilePath('1u')), $codeStorage->toString());
+
+		$codeStorage = $this->runConverter($classStorage, $this->getTestFilePath(), 'convert\testclass2', true);
+		$this->assertEquals(file_get_contents($this->getTestFilePath('1n')), $codeStorage->toString());
+	}
+
+	/**
+	 * @group cc2
+	 */
+	public function testSimpleNs2Ns()
+	{
+		$classStorage = $this->getClassStorage([
+			['Form', 'Onphp', 'Onphp\main'],
+			['Model', '\Onphp\\', 'Onphp\core'],
+			['HttpRequest', '', 'Onphp\main'],
+			['CommandChain', 'Onphp', 'Onphp'],
+			['B', 'converter', 'convert\testclass3'],
+			['View', 'Onphp', 'convert\testclass3'],
+			['Primitive', 'Onphp', 'Onphp'],
+		], [], ['SUPER_CONST', 'CONST', 'lowconst']);
+
+		$codeStorage = $this->runConverter($classStorage, $this->getTestFilePath('2'), 'convert\testclass3', true);
+		$this->assertEquals(file_get_contents($this->getTestFilePath('2n')), $codeStorage->toString());
+
+		$codeStorage = $this->runConverter($classStorage, $this->getTestFilePath('2'), 'convert\testclass3');
+		$this->assertEquals(file_get_contents($this->getTestFilePath('2u')), $codeStorage->toString());
+	}
+
+	/**
+	 * @group cc3
+	 */
+	public function testSimplePHtml()
+	{
+		$classStorage = $this->getClassStorage([
+			['DB', '', 'Onphp'],
+			['OSQL', '', 'Onphp'],
+			['Form', '', 'Onphp'],
+		]);
+
+		$codeStorage = $this->runConverter($classStorage, $this->getTestFilePath('3'), 'convert\testclass3');
+		$this->assertEquals(file_get_contents($this->getTestFilePath('3u')), $codeStorage->toString());
+
+		$codeStorage = $this->runConverter($classStorage, $this->getTestFilePath('3'), 'convert\testclass3', true);
+		$this->assertEquals(file_get_contents($this->getTestFilePath('3n')), $codeStorage->toString());
+	}
+
+	/**
+	 * @group cc4
+	 */
+	public function testAliases()
+	{
+		$classStorage = $this->getClassStorage([
+			['Form', 'Onphp', 'Onphp'],
+			['Primitive', 'Onphp\Primitives', 'Onphp\Primitives'],
+			['OSQL', 'Sub', 'Onphp\OSQL'],
+			['OSQL', 'My\Ns', 'My\Ns'],
+			['CMDUtils', '\Onphp\Utils', 'OnphpUtils'],
+		]);
+
+		$codeStorage = $this->runConverter($classStorage, $this->getTestFilePath('4'), 'My\Ns');
+		$this->assertEquals(file_get_contents($this->getTestFilePath('4u')), $codeStorage->toString());
+
+		$codeStorage = $this->runConverter($classStorage, $this->getTestFilePath('4'), 'My\Ns', true);
+		$this->assertEquals(file_get_contents($this->getTestFilePath('4n')), $codeStorage->toString());
+	}
+
+	/**
+	 * @param ClassStorage $storage
+	 * @param type $path
+	 * @param type $newNamespace
+	 * @return CodeStorage
+	 */
+	private function runConverter(ClassStorage $storage, $path, $newNamespace = null, $skipUses = false)
+	{
+		$codeStorage = new CodeStorage();
+		$namespaceBuffer = new NamespaceBuffer();
+		$classBuffer = new ClassBuffer();
+		$aliasBuffer = (new AliasBuffer())
+			->setClassBuffer($classBuffer);
+		$functionBuffer = new FunctionBuffer();
+		$classNameDetectBuffer = (new ClassNameDetectBuffer())
+			->setNamespaceBuffer($namespaceBuffer)
+			->setClassBuffer($classBuffer)
+			->setFunctionBuffer($functionBuffer)
+			->setAliasBuffer($aliasBuffer);
+
+
+		$chainBuffer = (new ChainBuffer())
+			->addBuffer($codeStorage)
+			->addBuffer($namespaceBuffer)
+			->addBuffer($classBuffer)
+			->addBuffer($aliasBuffer)
+			->addBuffer($functionBuffer)
+			->addBuffer($classNameDetectBuffer);
+
+		$subjects = token_get_all(file_get_contents($path));
+
+		$chainBuffer->init();
+		foreach ($subjects as $i => $subject) {
+			$chainBuffer->process($subject, $i);
+		}
+
+		$converter = $this->getService();
+		$converter
+			->setNewNamespace($newNamespace)
+			->setNamespaceBuffer($namespaceBuffer)
+			->setClassStorage($storage)
+			->setCodeStorage($codeStorage)
+			->setClassNameDetectBuffer($classNameDetectBuffer)
+			->setAliasBuffer($aliasBuffer)
+			->setSkipUses($skipUses);
+
+		$converter->run();
+		return $codeStorage;
+	}
+
+	/**
+	 * @param string $classes
+	 * @return ClassStorage
+	 */
+	private function getClassStorage($classes, array $functions = [], array $constants = [])
+	{
+		$classStorage = new ClassStorage();
+		foreach ($classes as $object) {
+			list($objectName, $oldNamespace, $newNamespace) = $object;
+			$object = NsClass::create()
+				->setNamespace($oldNamespace)
+				->setNewNamespace($newNamespace)
+				->setName($objectName);
+			$classStorage->addClass($object);
+		}
+		foreach ($functions as $object) {
+			list($objectName, $oldNamespace, $newNamespace) = $object;
+			$object = NsFunction::create()
+				->setNamespace($oldNamespace)
+				->setNewNamespace($newNamespace)
+				->setName($objectName);
+			$classStorage->addClass($object);
+		}
+		foreach ($constants as $constantName) {
+			$classStorage->addConstant(NsConstant::create()->setName($constantName));
+		}
+		return $classStorage;
+	}
+
+	/**
+	 * @return CodeConverter
+	 */
+	private function getService()
+	{
+		return (new CodeConverter());
+	}
+
+	private function getTestFilePath($num = '1')
+	{
+		return $this->getDataPath('Utils' . DIRECTORY_SEPARATOR . "CodeConverterTest{$num}.txt");
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest1.txt b/nsConverter/test/data/Utils/CodeConverterTest1.txt
new file mode 100644
index 0000000000..296a3893b7
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest1.txt
@@ -0,0 +1,57 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+new Form();
+\Model::create();
+HttpRequest->create();
+
+
+trait A {
+	use B;
+
+	const    VALUE = 'value';
+
+	/**
+	 * @var View
+	 */
+	private $c = null;
+	private $cName = 'View';
+	private $cName2 = "View";
+
+	/**
+	 * @param Primitive $newNamespace
+	 * @param string $newNamespace
+	 * @return View
+	 */
+	function sum($a, $b) {
+		$sum = function ($a, $b) {
+			$command = \CommandChain::create(SUPER_CONST, CONST, lowconst);
+			$command = CommandChain :: create();
+			/* @var $command CommandChain */
+
+			$command
+				->add($command);
+
+			$c = new $cName();
+			/* @var View $c  */
+
+			return $c->
+				render($a + $b);
+		};
+		$sum(2, 3);
+
+		is_object(parent::run());
+		self ::run();
+		static:: run();
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest1n.txt b/nsConverter/test/data/Utils/CodeConverterTest1n.txt
new file mode 100644
index 0000000000..738c0f92ce
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest1n.txt
@@ -0,0 +1,59 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace convert\testclass2;
+
+new \Onphp\Form();
+\Onphp\Model::create();
+HttpRequest->create();
+
+
+trait A {
+	use \converter\B;
+
+	const    VALUE = 'value';
+
+	/**
+	 * @var \Onphp\View
+	 */
+	private $c = null;
+	private $cName = '\Onphp\View';
+	private $cName2 = "\Onphp\View";
+
+	/**
+	 * @param \Onphp\Primitive $newNamespace
+	 * @param string $newNamespace
+	 * @return \Onphp\View
+	 */
+	function sum($a, $b) {
+		$sum = function ($a, $b) {
+			$command = \Onphp\CommandChain::create(SUPER_CONST, CONST, lowconst);
+			$command = \Onphp\CommandChain :: create();
+			/* @var $command \Onphp\CommandChain */
+
+			$command
+				->add($command);
+
+			$c = new $cName();
+			/* @var \Onphp\View $c  */
+
+			return $c->
+				render($a + $b);
+		};
+		$sum(2, 3);
+
+		is_object(parent::run());
+		self ::run();
+		static:: run();
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest1u.txt b/nsConverter/test/data/Utils/CodeConverterTest1u.txt
new file mode 100644
index 0000000000..38746c409d
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest1u.txt
@@ -0,0 +1,66 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+namespace convert\testclass2;
+
+use \Onphp\Form;
+use \Onphp\Model;
+use \converter\B;
+use \Onphp\CommandChain;
+use \Onphp\View;
+use \Onphp\Primitive;
+
+new Form();
+Model::create();
+HttpRequest->create();
+
+
+trait A {
+	use B;
+
+	const    VALUE = 'value';
+
+	/**
+	 * @var View
+	 */
+	private $c = null;
+	private $cName = '\Onphp\View';
+	private $cName2 = "\Onphp\View";
+
+	/**
+	 * @param Primitive $newNamespace
+	 * @param string $newNamespace
+	 * @return View
+	 */
+	function sum($a, $b) {
+		$sum = function ($a, $b) {
+			$command = CommandChain::create(SUPER_CONST, CONST, lowconst);
+			$command = CommandChain :: create();
+			/* @var $command CommandChain */
+
+			$command
+				->add($command);
+
+			$c = new $cName();
+			/* @var View $c  */
+
+			return $c->
+				render($a + $b);
+		};
+		$sum(2, 3);
+
+		is_object(parent::run());
+		self ::run();
+		static:: run();
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest2.txt b/nsConverter/test/data/Utils/CodeConverterTest2.txt
new file mode 100644
index 0000000000..7d13e0b157
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest2.txt
@@ -0,0 +1,59 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+	namespace convert\testclass2;
+
+	new \Onphp\Form();
+	\Onphp\Model::create();
+	HttpRequest->create();
+
+
+	trait A {
+		use \converter\B;
+
+		const    VALUE = 'value';
+
+		/**
+		 * @var \Onphp\View
+		 */
+		private $c = null;
+		private $cName = '\Onphp\View';
+		private $cName2 = "\Onphp\View";
+
+		/**
+		 * @param \Onphp\Primitive $newNamespace
+		 * @param string $newNamespace
+		 * @return \Onphp\View
+		 */
+		function sum($a, $b) {
+			$sum = function ($a, $b) {
+				$command = \Onphp\CommandChain::create(SUPER_CONST, CONST, lowconst);
+				$command = \Onphp\CommandChain :: create();
+				/* @var $command \Onphp\CommandChain */
+
+				$command
+					->add($command);
+
+				$c = new $cName();
+				/* @var \Onphp\View $c  */
+
+				return $c->
+					render($a + $b);
+			};
+			$sum(2, 3);
+
+			is_object(parent::run());
+			self ::run();
+			static:: run();
+		}
+	}
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest2n.txt b/nsConverter/test/data/Utils/CodeConverterTest2n.txt
new file mode 100644
index 0000000000..32b1365d79
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest2n.txt
@@ -0,0 +1,59 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+	namespace convert\testclass3;
+
+	new \Onphp\main\Form();
+	\Onphp\core\Model::create();
+	\Onphp\main\HttpRequest->create();
+
+
+	trait A {
+		use B;
+
+		const    VALUE = 'value';
+
+		/**
+		 * @var View
+		 */
+		private $c = null;
+		private $cName = '\convert\testclass3\View';
+		private $cName2 = "\convert\testclass3\View";
+
+		/**
+		 * @param \Onphp\Primitive $newNamespace
+		 * @param string $newNamespace
+		 * @return View
+		 */
+		function sum($a, $b) {
+			$sum = function ($a, $b) {
+				$command = \Onphp\CommandChain::create(SUPER_CONST, CONST, lowconst);
+				$command = \Onphp\CommandChain :: create();
+				/* @var $command \Onphp\CommandChain */
+
+				$command
+					->add($command);
+
+				$c = new $cName();
+				/* @var View $c  */
+
+				return $c->
+					render($a + $b);
+			};
+			$sum(2, 3);
+
+			is_object(parent::run());
+			self ::run();
+			static:: run();
+		}
+	}
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest2u.txt b/nsConverter/test/data/Utils/CodeConverterTest2u.txt
new file mode 100644
index 0000000000..df4ef459ae
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest2u.txt
@@ -0,0 +1,65 @@
+<?php
+
+/* * *************************************************************************
+ *   Copyright (C) 2012 by Alexey Denisov                                  *
+ *   alexeydsov@gmail.com                                                  *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ * ************************************************************************* */
+
+	namespace convert\testclass3;
+
+	use \Onphp\main\Form;
+	use \Onphp\core\Model;
+	use \Onphp\main\HttpRequest;
+	use \Onphp\CommandChain;
+	use \Onphp\Primitive;
+
+	new Form();
+	Model::create();
+	HttpRequest->create();
+
+
+	trait A {
+		use B;
+
+		const    VALUE = 'value';
+
+		/**
+		 * @var View
+		 */
+		private $c = null;
+		private $cName = '\convert\testclass3\View';
+		private $cName2 = "\convert\testclass3\View";
+
+		/**
+		 * @param Primitive $newNamespace
+		 * @param string $newNamespace
+		 * @return View
+		 */
+		function sum($a, $b) {
+			$sum = function ($a, $b) {
+				$command = CommandChain::create(SUPER_CONST, CONST, lowconst);
+				$command = CommandChain :: create();
+				/* @var $command CommandChain */
+
+				$command
+					->add($command);
+
+				$c = new $cName();
+				/* @var View $c  */
+
+				return $c->
+					render($a + $b);
+			};
+			$sum(2, 3);
+
+			is_object(parent::run());
+			self ::run();
+			static:: run();
+		}
+	}
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest3.txt b/nsConverter/test/data/Utils/CodeConverterTest3.txt
new file mode 100644
index 0000000000..133f5bfdb3
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest3.txt
@@ -0,0 +1,10 @@
+<div class="block" style="float: left;">
+	<?
+	/* @var $db DB */
+	/* @var $form Form */
+
+	$db = new DB();
+	print DB::FULL_TEXT_AND ?>
+	<br />
+	<?=OSQL::select()->toString();?>
+</div>
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest3n.txt b/nsConverter/test/data/Utils/CodeConverterTest3n.txt
new file mode 100644
index 0000000000..39809c8b58
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest3n.txt
@@ -0,0 +1,12 @@
+<?php
+namespace convert\testclass3;
+?><div class="block" style="float: left;">
+	<?
+	/* @var $db \Onphp\DB */
+	/* @var $form \Onphp\Form */
+
+	$db = new \Onphp\DB();
+	print \Onphp\DB::FULL_TEXT_AND ?>
+	<br />
+	<?=\Onphp\OSQL::select()->toString();?>
+</div>
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest3u.txt b/nsConverter/test/data/Utils/CodeConverterTest3u.txt
new file mode 100644
index 0000000000..f6b76c12b6
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest3u.txt
@@ -0,0 +1,15 @@
+<?php
+namespace convert\testclass3;
+use \Onphp\DB;
+use \Onphp\OSQL;
+use \Onphp\Form;
+?><div class="block" style="float: left;">
+	<?
+	/* @var $db DB */
+	/* @var $form Form */
+
+	$db = new DB();
+	print DB::FULL_TEXT_AND ?>
+	<br />
+	<?=OSQL::select()->toString();?>
+</div>
\ No newline at end of file
diff --git a/nsConverter/test/data/Utils/CodeConverterTest4.txt b/nsConverter/test/data/Utils/CodeConverterTest4.txt
new file mode 100644
index 0000000000..0fc8be78cb
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest4.txt
@@ -0,0 +1,15 @@
+<?php
+
+namespace Onphp;
+
+use Onphp\Primitives\Primitive;
+use Sub\OSQL;
+use My\Ns\OSQL as OSQL2;
+
+$insert = OSQL::insert();
+$select = OSQL2::create();
+$form = Form::create()
+	->add(Primitive::string('name'))
+	->add(Primitive::integer('name'));
+
+$form->import(\Onphp\Utils\CMDUtils::getOptions());
diff --git a/nsConverter/test/data/Utils/CodeConverterTest4n.txt b/nsConverter/test/data/Utils/CodeConverterTest4n.txt
new file mode 100644
index 0000000000..76f2ec66ee
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest4n.txt
@@ -0,0 +1,11 @@
+<?php
+
+namespace My\Ns;
+
+$insert = \Onphp\OSQL\OSQL::insert();
+$select = OSQL::create();
+$form = \Onphp\Form::create()
+	->add(\Onphp\Primitives\Primitive::string('name'))
+	->add(\Onphp\Primitives\Primitive::integer('name'));
+
+$form->import(\OnphpUtils\CMDUtils::getOptions());
diff --git a/nsConverter/test/data/Utils/CodeConverterTest4u.txt b/nsConverter/test/data/Utils/CodeConverterTest4u.txt
new file mode 100644
index 0000000000..31aa419092
--- /dev/null
+++ b/nsConverter/test/data/Utils/CodeConverterTest4u.txt
@@ -0,0 +1,17 @@
+<?php
+
+namespace My\Ns;
+
+use \Onphp\OSQL\OSQL;
+use \My\Ns\OSQL as OSQL2;
+use \Onphp\Form;
+use \Onphp\Primitives\Primitive;
+use \OnphpUtils\CMDUtils;
+
+$insert = OSQL::insert();
+$select = OSQL2::create();
+$form = Form::create()
+	->add(Primitive::string('name'))
+	->add(Primitive::integer('name'));
+
+$form->import(CMDUtils::getOptions());
diff --git a/nsConverter/test/data/buffers/AliasBufferTest.txt b/nsConverter/test/data/buffers/AliasBufferTest.txt
new file mode 100644
index 0000000000..d29d3540fa
--- /dev/null
+++ b/nsConverter/test/data/buffers/AliasBufferTest.txt
@@ -0,0 +1,9 @@
+<?php
+
+namespace {
+	use \SomeNs\Sub\Class1 as Class1;
+
+	class Class3 {
+		use \SomeNs\Class5;
+	}
+}
\ No newline at end of file
diff --git a/nsConverter/test/data/buffers/AliasBufferTest2.txt b/nsConverter/test/data/buffers/AliasBufferTest2.txt
new file mode 100644
index 0000000000..9d7aa57bdb
--- /dev/null
+++ b/nsConverter/test/data/buffers/AliasBufferTest2.txt
@@ -0,0 +1,7 @@
+<?php
+
+namespace {
+	use \SomeNs\Sub\Class1,
+		\SomeNs\Sub2 as \SomeNs2\Sub3,
+		\Exception as Exception;
+}
\ No newline at end of file
diff --git a/nsConverter/test/data/buffers/AliasBufferTest3.txt b/nsConverter/test/data/buffers/AliasBufferTest3.txt
new file mode 100644
index 0000000000..66dad3326e
--- /dev/null
+++ b/nsConverter/test/data/buffers/AliasBufferTest3.txt
@@ -0,0 +1,11 @@
+<?php
+
+namespace {
+	use \SomeNs\Sub\Class1,
+		\SomeNs\Sub2 as \SomeNs2\Sub3,
+		\Exception as Exception;
+
+	use \Exception2;
+
+	use \SomeNs\Sub\Class1 as Class2;
+}
\ No newline at end of file
diff --git a/nsConverter/test/data/buffers/ClassBufferTest.php b/nsConverter/test/data/buffers/ClassBufferTest.php
new file mode 100644
index 0000000000..5d8fced03e
--- /dev/null
+++ b/nsConverter/test/data/buffers/ClassBufferTest.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace {
+
+	interface TestSecondClassToParse
+	{
+		
+	}
+
+}
+
+namespace convert\testclass2 {
+	trait A {
+		function sum($a, $b) {
+			$sum = function ($a, $b) {
+				return $a + $b;
+			};
+			$sum(2, 3);
+		}
+	}
+}
+
+namespace converter\testclass;
+
+class TestOneClassToParse implements TestSecondClassToParse
+{
+	use A;
+
+	public function doSomething()
+	{
+		$b = 42;
+		for ($i = 0; $i <= 1873; $i++) {
+			while (true)
+				$b++;
+		}
+		$a = 'kjdh' . 'sdkjh';
+		return $a;
+	}
+}
+?>
\ No newline at end of file
diff --git a/nsConverter/test/data/buffers/ClassNameBufferTest.txt b/nsConverter/test/data/buffers/ClassNameBufferTest.txt
new file mode 100644
index 0000000000..4ee1b4eb80
--- /dev/null
+++ b/nsConverter/test/data/buffers/ClassNameBufferTest.txt
@@ -0,0 +1,9 @@
+<?php
+new \NsConverter\Form();
+\onPHP \ Model::create();
+HttpRequest->create();
+(int)'15';
+(float)$g;
+(string)$jkhkj;
+$tt = true == false;
+$bb = null;
\ No newline at end of file
diff --git a/nsConverter/test/data/buffers/ClassNameDetectBufferTest.txt b/nsConverter/test/data/buffers/ClassNameDetectBufferTest.txt
new file mode 100644
index 0000000000..f74dda5fef
--- /dev/null
+++ b/nsConverter/test/data/buffers/ClassNameDetectBufferTest.txt
@@ -0,0 +1,20 @@
+<?php
+
+namespace {
+	new \NsConverter\Form();
+	\onPHP \ Model::create();
+	HttpRequest->create();
+}
+
+namespace convert\testclass2;
+
+trait A {
+	function sum($a, $b) {
+		$sum = function ($a, $b) {
+			$command = \CommandChain::create();
+			$command->add($command);
+			return $a + $b;
+		};
+		$sum(2, 3);
+	}
+}
diff --git a/nsConverter/test/data/buffers/CodeStorageTest.php b/nsConverter/test/data/buffers/CodeStorageTest.php
new file mode 100644
index 0000000000..fc1a961f7c
--- /dev/null
+++ b/nsConverter/test/data/buffers/CodeStorageTest.php
@@ -0,0 +1,9 @@
+<?php
+	
+	namespace		converter\testclass;
+
+	class TestOneClassToParse
+	{
+		
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/test/data/buffers/DefineConstantBufferTest.txt b/nsConverter/test/data/buffers/DefineConstantBufferTest.txt
new file mode 100644
index 0000000000..3a51c3c9b5
--- /dev/null
+++ b/nsConverter/test/data/buffers/DefineConstantBufferTest.txt
@@ -0,0 +1,12 @@
+<?php
+
+define('ABC', $abc);
+define('A2BC5', $abc);
+defined('ABCE');
+
+namespace {
+
+	define( 'ab_cf' , $abc);
+	defined('tg_ff');
+	define( 'ab_cd ' , $abc);
+}
\ No newline at end of file
diff --git a/nsConverter/test/data/buffers/FunctionBufferTest.php b/nsConverter/test/data/buffers/FunctionBufferTest.php
new file mode 100644
index 0000000000..534d8a1fb7
--- /dev/null
+++ b/nsConverter/test/data/buffers/FunctionBufferTest.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace converter\testclass;
+
+class TestOneClassToParse
+{
+
+	public function doSomething()
+	{
+		$a = 'kjdh' . 'sdkjh';
+		return $a;
+	}
+}
+
+namespace {
+
+	class TestSecondClassToParse
+	{
+		
+	}
+
+}
+
+namespace convert\testclass2 {
+	$sum = function ($a, $b) {
+		return $a + $b;
+	};
+	$sum(2, 3);
+}
+?>
\ No newline at end of file
diff --git a/nsConverter/test/data/buffers/NamespaceBufferTest.php b/nsConverter/test/data/buffers/NamespaceBufferTest.php
new file mode 100644
index 0000000000..534d8a1fb7
--- /dev/null
+++ b/nsConverter/test/data/buffers/NamespaceBufferTest.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace converter\testclass;
+
+class TestOneClassToParse
+{
+
+	public function doSomething()
+	{
+		$a = 'kjdh' . 'sdkjh';
+		return $a;
+	}
+}
+
+namespace {
+
+	class TestSecondClassToParse
+	{
+		
+	}
+
+}
+
+namespace convert\testclass2 {
+	$sum = function ($a, $b) {
+		return $a + $b;
+	};
+	$sum(2, 3);
+}
+?>
\ No newline at end of file
diff --git a/nsConverter/test/result.txt b/nsConverter/test/result.txt
new file mode 100644
index 0000000000..0998ad7da4
--- /dev/null
+++ b/nsConverter/test/result.txt
@@ -0,0 +1,11 @@
+<?php namespace convert\testclass3;
+?><div class="block" style="float: left;">
+	<?
+	/* @var $db \Onphp\DB */
+	/* @var $form \Onphp\Form */
+
+	$db = new \Onphp\DB();
+	print \Onphp\DB::FULL_TEXT_AND ?>
+	<br />
+	<?=\Onphp\OSQL::select()->toString();?>
+</div>
\ No newline at end of file
diff --git a/nsConverter/test/utils/TestCase.class.php b/nsConverter/test/utils/TestCase.class.php
new file mode 100644
index 0000000000..646f2a2ed7
--- /dev/null
+++ b/nsConverter/test/utils/TestCase.class.php
@@ -0,0 +1,17 @@
+<?php
+
+	namespace Onphp\NsConverter\Test;
+
+	use \PHPUnit_Framework_TestCase;
+
+	
+
+	abstract class TestCase extends PHPUnit_Framework_TestCase
+	{
+		protected $backupGlobals = false;
+		
+		protected function getDataPath($postfix) {
+			return PATH_BASE .'test'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.ltrim($postfix, DIRECTORY_SEPARATOR);
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/test/utils/TestCaseDB.class.php b/nsConverter/test/utils/TestCaseDB.class.php
new file mode 100644
index 0000000000..f71507cee5
--- /dev/null
+++ b/nsConverter/test/utils/TestCaseDB.class.php
@@ -0,0 +1,15 @@
+<?php
+
+	namespace Onphp\NsConverter\Test;
+	
+	abstract class TestCaseDB extends TestCase
+	{
+		public function setUp() {
+			$this->setUpDB();
+		}
+		
+		protected function setUpDB() {
+			//implement me
+		}
+	}
+?>
\ No newline at end of file
diff --git a/nsConverter/xml/config.xml b/nsConverter/xml/config.xml
new file mode 100644
index 0000000000..883471828f
--- /dev/null
+++ b/nsConverter/xml/config.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE metaconfiguration SYSTEM "meta.dtd">
+<metaconfiguration>
+
+	<classes namespace="Onphp\NsConverter">
+		<class name="NsClass">
+			<implement interface="\Onphp\NsConverter\NsObject" />
+			<properties>
+				<property name="name" type="String" size="256" required="true" />
+				<property name="namespace" type="String" size="256" required="true" />
+				<property name="newNamespace" type="String" size="256" required="true" />
+			</properties>
+			<pattern name="ValueObject" />
+		</class>
+
+		<class name="NsFunction">
+			<implement interface="\Onphp\NsConverter\NsObject" />
+			<properties>
+				<property name="name" type="String" size="256" required="true" />
+				<property name="namespace" type="String" size="256" required="true" />
+				<property name="newNamespace" type="String" size="256" required="true" />
+			</properties>
+			<pattern name="ValueObject" />
+		</class>
+
+		<class name="NsConstant">
+			<properties>
+				<property name="name" type="String" size="256" required="true" />
+			</properties>
+			<pattern name="ValueObject" />
+		</class>
+	</classes>
+
+	<sources>
+		<source name="con" default="false"/>
+	</sources>
+</metaconfiguration>
\ No newline at end of file
diff --git a/test/AllTests.php b/test/AllTests.php
index 4f8e126fe4..e31955cdba 100644
--- a/test/AllTests.php
+++ b/test/AllTests.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	if (!extension_loaded('onphp')) {
 		echo 'Trying to load onPHP extension.. ';
 		
@@ -18,8 +20,8 @@
 	
 	mb_internal_encoding(ENCODING);
 	mb_regex_encoding(ENCODING);
-	
-	AutoloaderPool::get('onPHP')->addPath(ONPHP_TEST_PATH.'misc');
+
+	\Onphp\AutoloaderPool::get('onPHP')->addPath(ONPHP_TEST_PATH.'misc', 'Onphp\Test');
 	
 	$testPathes = array(
 		ONPHP_TEST_PATH.'core'.DIRECTORY_SEPARATOR,
@@ -27,15 +29,20 @@
 		ONPHP_TEST_PATH.'main'.DIRECTORY_SEPARATOR.'Autoloader'.DIRECTORY_SEPARATOR,
 		ONPHP_TEST_PATH.'main'.DIRECTORY_SEPARATOR.'Ip'.DIRECTORY_SEPARATOR,
 		ONPHP_TEST_PATH.'main'.DIRECTORY_SEPARATOR.'Net'.DIRECTORY_SEPARATOR,
+		ONPHP_TEST_PATH.'main'.DIRECTORY_SEPARATOR.'Net'.DIRECTORY_SEPARATOR.'Http'.DIRECTORY_SEPARATOR,
 		ONPHP_TEST_PATH.'main'.DIRECTORY_SEPARATOR.'Utils'.DIRECTORY_SEPARATOR,
 		ONPHP_TEST_PATH.'main'.DIRECTORY_SEPARATOR.'Utils'.DIRECTORY_SEPARATOR.'Routers'.DIRECTORY_SEPARATOR,
 		ONPHP_TEST_PATH.'main'.DIRECTORY_SEPARATOR.'Utils'.DIRECTORY_SEPARATOR.'AMQP'.DIRECTORY_SEPARATOR,
 		ONPHP_TEST_PATH.'db'.DIRECTORY_SEPARATOR,
 	);
 	
-	$config = dirname(__FILE__).'/config.inc.php';
-	
-	include is_readable($config) ? $config : $config.'.tpl';
+	$config = __DIR__.'/config.inc.php';
+
+	require is_readable($config) ? $config : $config.'.tpl';
+
+	AllTests::$dbs = $dbs;
+	AllTests::$paths = $testPathes;
+	AllTests::$workers = $daoWorkers;
 	
 	final class AllTests
 	{
@@ -45,7 +52,7 @@ final class AllTests
 		
 		public static function main()
 		{
-			PHPUnit_TextUI_TestRunner::run(self::suite());
+			\PHPUnit_TextUI_TestRunner::run(self::suite());
 		}
 		
 		public static function suite()
@@ -58,10 +65,10 @@ public static function suite()
 					/**
 					 * @todo fail - constructor with argument, but static method 'me' - without
 					 */
-					Singleton::getInstance('DBTestPool', self::$dbs)->connect();
-				} catch (Exception $e) {
-					Singleton::dropInstance('DBTestPool');
-					Singleton::getInstance('DBTestPool');
+					\Onphp\Singleton::getInstance('\Onphp\Test\DBTestPool', self::$dbs)->connect();
+				} catch (\Exception $e) {
+					\Onphp\Singleton::dropInstance('\Onphp\Test\DBTestPool');
+					\Onphp\Singleton::getInstance('\Onphp\Test\DBTestPool');
 				}
 				
 				// build stuff from meta
@@ -83,7 +90,7 @@ public static function suite()
 				
 				include $path;
 				
-				AutoloaderPool::get('onPHP')->addPaths(array(
+				\Onphp\AutoloaderPool::get('onPHP')->addPaths(array(
 						ONPHP_META_AUTO_BUSINESS_DIR,
 						ONPHP_META_AUTO_DAO_DIR,
 						ONPHP_META_AUTO_PROTO_DIR,
@@ -91,17 +98,15 @@ public static function suite()
 						ONPHP_META_DAO_DIR,
 						ONPHP_META_BUSINESS_DIR,
 						ONPHP_META_PROTO_DIR
-					));
+					), 'Onphp\Test');
 				
 				$dBCreator = DBTestCreator::create()->
 					setSchemaPath(ONPHP_META_AUTO_DIR.'schema.php')->
 					setTestPool(DBTestPool::me());
 				
-				$out = MetaConfiguration::me()->getOutput();
+				$out = \Onphp\MetaConfiguration::me()->getOutput();
 				
-				foreach (DBTestPool::me()->getPool() as $connector => $db) {
-					DBPool::me()->setDefault($db);
-					
+				foreach (DBTestPool::me()->iterator() as $db) {
 					$out->
 						info('Using ')->
 						info(get_class($db), true)->
@@ -111,13 +116,13 @@ public static function suite()
 					
 					$dBCreator->createDB()->fillDB();
 					
-					MetaConfiguration::me()->checkIntegrity();
+					\Onphp\MetaConfiguration::me()->checkIntegrity();
 					$out->newLine();
 					
 					$dBCreator->dropDB();
 				}
 				
-				DBPool::me()->dropDefault();
+				\Onphp\DBPool::me()->dropDefault();
 			}
 			
 			foreach (self::$paths as $testPath)
@@ -127,8 +132,4 @@ public static function suite()
 			return $suite;
 		}
 	}
-	
-	AllTests::$dbs = $dbs;
-	AllTests::$paths = $testPathes;
-	AllTests::$workers = $daoWorkers;
 ?>
\ No newline at end of file
diff --git a/test/config.inc.php.tpl b/test/config.inc.php.tpl
index 683dee0bf6..f00c972e64 100644
--- a/test/config.inc.php.tpl
+++ b/test/config.inc.php.tpl
@@ -1,19 +1,19 @@
 <?php
 	
 	$dbs = array(
-		'PgSQL' => array(
+		'\Onphp\PgSQL' => array(
 			'user'	=> 'onphp',
 			'pass'	=> 'onphp',
 			'host'	=> '127.0.0.1',
 			'base'	=> 'onphp'
 		),
-		'MySQL' => array(
+		'\Onphp\MySQL' => array(
 			'user'	=> 'onphp',
 			'pass'	=> 'onphp',
 			'host'	=> '127.0.0.1',
 			'base'	=> 'onphp'
 		),
-		'SQLitePDO' => array(
+		'\Onphp\SQLitePDO' => array(
 			'user'	=> 'onphp',
 			'pass'	=> 'onphp',
 			'host'	=> '127.0.0.1',
@@ -22,11 +22,12 @@
 	);
 
 	$daoWorkers = array(
-		'NullDaoWorker', 'CommonDaoWorker', 'SmartDaoWorker', 'VoodooDaoWorker',
-		'CacheDaoWorker', 'VoodooDaoWorker', 'SmartDaoWorker', 'CommonDaoWorker', 'NullDaoWorker'
+		'\Onphp\NullDaoWorker', '\Onphp\CommonDaoWorker', '\Onphp\SmartDaoWorker', '\Onphp\VoodooDaoWorker',
+		'\Onphp\CacheDaoWorker', '\Onphp\TaggableDaoWorker', '\Onphp\VoodooDaoWorker', '\Onphp\SmartDaoWorker', '\Onphp\CommonDaoWorker', '\Onphp\NullDaoWorker'
 	);
 	
-	VoodooDaoWorker::setDefaultHandler('CacheSegmentHandler');
+	\Onphp\VoodooDaoWorker::setDefaultHandler('\Onphp\CacheSegmentHandler');
+	\Onphp\TaggableDaoWorker::setHandler('\Onphp\TaggableSmartHandler');
 	
 	define('__LOCAL_DEBUG__', true);
 	define('ONPHP_CURL_TEST_URL', 'http://localhost/curlTest.php'); //set here url to test script test/main/data/curlTest/curlTest.php
diff --git a/test/core/AbstractProtoClassFillQueryTest.class.php b/test/core/AbstractProtoClassFillQueryTest.class.php
index d6348c4db9..8097c73dd7 100644
--- a/test/core/AbstractProtoClassFillQueryTest.class.php
+++ b/test/core/AbstractProtoClassFillQueryTest.class.php
@@ -1,14 +1,16 @@
 <?php
+	namespace Onphp\Test;
+
 	final class AbstractProtoClassFillQueryTest extends TestCase
 	{
 		public function testFullInsertQueryByCity()
 		{
 			$city = $this->spawnCity();
 			
-			$insertCity = $city->proto()->fillQuery(OSQL::insert(), $city);
+			$insertCity = $city->proto()->fillQuery(\Onphp\OSQL::insert(), $city);
 			$this->assertEquals(
 				'INSERT INTO  (id, name, capital, large) VALUES (20, Saint-Peterburg, TRUE, TRUE)',
-				$insertCity->toDialectString(ImaginaryDialect::me())
+				$insertCity->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
@@ -16,7 +18,7 @@ public function testFullUpdateQueryByUser()
 		{
 			$city = $this->spawnCity();
 			$user = $this->spawnUser(array('city' => $city));
-			$updateUser = $user->proto()->fillQuery(OSQL::update(), $user);
+			$updateUser = $user->proto()->fillQuery(\Onphp\OSQL::update(), $user);
 			$this->assertEquals(
 				'UPDATE  SET id = 77, nickname = NULL, password = NULL, '
 					.'very_custom_field_name = 2011-12-31 00:00:00, '
@@ -24,7 +26,7 @@ public function testFullUpdateQueryByUser()
 					.'city_id = 20, first_optional_id = NULL, second_optional_id = NULL, '
 					.'url = https://www.github.com, '
 					.'properties = "a"=>"apple","b"=>"bananas",, ip = 127.0.0.1',
-				$updateUser->toDialectString(ImaginaryDialect::me())
+				$updateUser->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
@@ -33,12 +35,12 @@ public function testFullUpdateQueryByUserWithContactExt()
 			$contactValue = $this->spawnContactValueExt();
 			$user = $this->spawnUserWithContactExt(array('contactExt' => $contactValue));
 			
-			$updateUser = $user->proto()->fillQuery(OSQL::update(), $user);
+			$updateUser = $user->proto()->fillQuery(\Onphp\OSQL::update(), $user);
 			$this->assertEquals(
 				'UPDATE  SET id = 77, name = Aleksey, surname = Alekseev, email = foo@bar.com, '
 					.'icq = 12345678, phone = 89012345678, city_id = NULL, '
 					.'web = https://www.github.com/, skype = github',
-				$updateUser->toDialectString(ImaginaryDialect::me())
+				$updateUser->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
@@ -47,10 +49,10 @@ public function testUpdateQueryByCityOneBoolean()
 			$cityOld = $this->spawnCity(array('capital' => false));
 			$city = $this->spawnCity(array('capital' => true)); //1918
 			
-			$updateCity = $city->proto()->fillQuery(OSQL::update(), $city, $cityOld);
+			$updateCity = $city->proto()->fillQuery(\Onphp\OSQL::update(), $city, $cityOld);
 			$this->assertEquals(
 				'UPDATE  SET capital = TRUE',
-				$updateCity->toDialectString(ImaginaryDialect::me())
+				$updateCity->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
@@ -59,26 +61,26 @@ public function testUpdateQueryByCityOneString()
 			$cityOld = $this->spawnCity(array('name' => 'Leningrad'));
 			$city = $this->spawnCity(array('name' => 'Saint-Peterburg'));
 			
-			$updateCity = $city->proto()->fillQuery(OSQL::update(), $city, $cityOld);
+			$updateCity = $city->proto()->fillQuery(\Onphp\OSQL::update(), $city, $cityOld);
 			$this->assertEquals(
 				'UPDATE  SET name = Saint-Peterburg',
-				$updateCity->toDialectString(ImaginaryDialect::me())
+				$updateCity->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
 		public function testUpdateQueryByUserTimesAndUrl()
 		{
 			$oldUser = $this->spawnUser(array(
-				'strangeTime' => Time::create('12:12:12'),
-				'url' => HttpUrl::create()->parse('http://code.google.com/'),
+				'strangeTime' => \Onphp\Time::create('12:12:12'),
+				'url' => \Onphp\HttpUrl::create()->parse('http://code.google.com/'),
 			));
-			$user = $this->spawnUser(array('lastLogin' => Timestamp::create('2012-01-01')));
+			$user = $this->spawnUser(array('lastLogin' => \Onphp\Timestamp::create('2012-01-01')));
 			
-			$updateUser = $user->proto()->fillQuery(OSQL::update(), $user, $oldUser);
+			$updateUser = $user->proto()->fillQuery(\Onphp\OSQL::update(), $user, $oldUser);
 			$this->assertEquals(
 				'UPDATE  SET very_custom_field_name = 2012-01-01 00:00:00, '
 					.'strange_time = 01:23:45, url = https://www.github.com',
-				$updateUser->toDialectString(ImaginaryDialect::me())
+				$updateUser->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
@@ -92,22 +94,22 @@ public function testUpdateQueryByUserCitiesAndHstore()
 				'city' => $moscow,
 				'firstOptional' => $piter,
 				'secondOptional' => null,
-				'properties' => Hstore::make(array()),
+				'properties' => \Onphp\Hstore::make(array()),
 			);
 			$oldUser = $this->spawnUser($userParams);
 			$userParams = array(
 				'city' => $piter,
 				'firstOptional' => null,
 				'secondOptional' => $omsk,
-				'properties' => Hstore::make(array('param' => 'value')),
+				'properties' => \Onphp\Hstore::make(array('param' => 'value')),
 			);
 			$user = $this->spawnUser($userParams);
 			
-			$updateUser = $user->proto()->fillQuery(OSQL::update(), $user, $oldUser);
+			$updateUser = $user->proto()->fillQuery(\Onphp\OSQL::update(), $user, $oldUser);
 			$this->assertEquals(
 				'UPDATE  SET city_id = 2, first_optional_id = NULL, '
 					.'second_optional_id = 3, properties = "param"=>"value",',
-				$updateUser->toDialectString(ImaginaryDialect::me())
+				$updateUser->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
@@ -119,10 +121,10 @@ public function testUpdateQueryByUserWithValueObject()
 			$contactExt = $this->spawnContactValueExt(array('city' => $moscow));
 			$user = $this->spawnUserWithContactExt(array('contactExt' => $contactExt));
 			
-			$updateUser = $user->proto()->fillQuery(OSQL::update(), $user, $oldUser);
+			$updateUser = $user->proto()->fillQuery(\Onphp\OSQL::update(), $user, $oldUser);
 			$this->assertEquals(
 				'UPDATE  SET email = foo@bar.com, city_id = 20',
-				$updateUser->toDialectString(ImaginaryDialect::me())
+				$updateUser->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
@@ -133,17 +135,17 @@ public function testUpdateQueryByUserWithSameValueObject()
 			$oldUser = $this->spawnUserWithContactExt(array('contactExt' => $contactExt));
 			$user = $this->spawnUserWithContactExt(array('contactExt' => $contactExt));
 			
-			$updateUser = $user->proto()->fillQuery(OSQL::update(), $user, $oldUser);
+			$updateUser = $user->proto()->fillQuery(\Onphp\OSQL::update(), $user, $oldUser);
 			$this->assertEquals(
 				'UPDATE  SET email = foo@bar.com, icq = 12345678, '
 					.'phone = 89012345678, city_id = NULL, '
 					.'web = https://www.github.com/, skype = github',
-				$updateUser->toDialectString(ImaginaryDialect::me())
+				$updateUser->toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 		
 		/**
-		 * @return TestCity
+		 * @return \Onphp\Test\TestCity
 		 */
 		private function spawnCity($options = array())
 		{
@@ -158,22 +160,22 @@ private function spawnCity($options = array())
 		}
 		
 		/**
-		 * @return TestUser
+		 * @return \Onphp\Test\TestUser
 		 */
 		private function spawnUser($options = array())
 		{
 			$options += array(
 				'id' => '77',
 				'credentials' => Credentials::create(),
-				'lastLogin' => Timestamp::create('2011-12-31'),
-				'registered' => Timestamp::create('2011-12-30'),
-				'strangeTime' => Time::create('01:23:45'),
+				'lastLogin' => \Onphp\Timestamp::create('2011-12-31'),
+				'registered' => \Onphp\Timestamp::create('2011-12-30'),
+				'strangeTime' => \Onphp\Time::create('01:23:45'),
 				'city' => null,
 				'firstOptional' => null,
 				'secondOptional' => null,
-				'url' => HttpUrl::create()->parse('https://www.github.com'),
-				'properties' => Hstore::make(array('a' => 'apple', 'b' => 'bananas')),
-				'ip' => IpAddress::create('127.0.0.1'),
+				'url' => \Onphp\HttpUrl::create()->parse('https://www.github.com'),
+				'properties' => \Onphp\Hstore::make(array('a' => 'apple', 'b' => 'bananas')),
+				'ip' => \Onphp\IpAddress::create('127.0.0.1'),
 			);
 			
 			return $this->spawnObject(TestUser::create(), $options);
@@ -181,7 +183,7 @@ private function spawnUser($options = array())
 		}
 		
 		/**
-		 * @return TestContactValueExtended
+		 * @return \Onphp\Test\TestContactValueExtended
 		 */
 		private function spawnContactValueExt($options = array())
 		{
@@ -198,7 +200,7 @@ private function spawnContactValueExt($options = array())
 		}
 		
 		/**
-		 * @return TestUserWithContactExtended
+		 * @return \Onphp\Test\TestUserWithContactExtended
 		 */
 		private function spawnUserWithContactExt($options = array())
 		{
@@ -212,10 +214,10 @@ private function spawnUserWithContactExt($options = array())
 			return $this->spawnObject(TestUserWithContactExtended::create(), $options);
 		}
 		
-		private function spawnObject(Prototyped $object, array $options)
+		private function spawnObject(\Onphp\Prototyped $object, array $options)
 		{
 			foreach ($object->proto()->getPropertyList() as $propName => $property) {
-				/* @var $property LightMetaProperty */
+				/* @var $property \Onphp\LightMetaProperty */
 				if (isset($options[$propName])) {
 					$setter = $property->getSetter();
 					$object->{$setter}($options[$propName]);
diff --git a/test/core/AggregateCacheTest.class.php b/test/core/AggregateCacheTest.class.php
index 08afaac5d8..4ed3992ee0 100644
--- a/test/core/AggregateCacheTest.class.php
+++ b/test/core/AggregateCacheTest.class.php
@@ -1,5 +1,7 @@
 <?php
 
+	namespace Onphp\Test;
+
 	final class AggregateCacheTest extends TestCase
 	{
 		const QUERIES = 100;
@@ -7,12 +9,12 @@ final class AggregateCacheTest extends TestCase
 		public function testAggregateCache()
 		{
 			return $this->doTestMemcached(
-				AggregateCache::create()->
-					addPeer('low', SocketMemcached::create(), AggregateCache::LEVEL_LOW)->
-					addPeer('normal1', SocketMemcached::create())->
-					addPeer('normal2', SocketMemcached::create())->
-					addPeer('normal3', SocketMemcached::create())->
-					addPeer('high', SocketMemcached::create(), AggregateCache::LEVEL_HIGH)->
+				\Onphp\AggregateCache::create()->
+					addPeer('low', \Onphp\SocketMemcached::create(), \Onphp\AggregateCache::LEVEL_LOW)->
+					addPeer('normal1', \Onphp\SocketMemcached::create())->
+					addPeer('normal2', \Onphp\SocketMemcached::create())->
+					addPeer('normal3', \Onphp\SocketMemcached::create())->
+					addPeer('high', \Onphp\SocketMemcached::create(), \Onphp\AggregateCache::LEVEL_HIGH)->
 					setClassLevel('one', 0xb000)
 			);
 		}
@@ -32,12 +34,12 @@ public function testCompositeAggregateCache()
 		public function testSimpleAggregateCache()
 		{
 			return $this->doTestMemcached(
-				SimpleAggregateCache::create()->
-					addPeer('low', SocketMemcached::create(), AggregateCache::LEVEL_LOW)->
-					addPeer('normal1', SocketMemcached::create())->
-					addPeer('normal2', SocketMemcached::create())->
-					addPeer('normal3', SocketMemcached::create())->
-					addPeer('high', SocketMemcached::create(), AggregateCache::LEVEL_HIGH)->
+				\Onphp\SimpleAggregateCache::create()->
+					addPeer('low', \Onphp\SocketMemcached::create(), \Onphp\AggregateCache::LEVEL_LOW)->
+					addPeer('normal1', \Onphp\SocketMemcached::create())->
+					addPeer('normal2', \Onphp\SocketMemcached::create())->
+					addPeer('normal3', \Onphp\SocketMemcached::create())->
+					addPeer('high', \Onphp\SocketMemcached::create(), \Onphp\AggregateCache::LEVEL_HIGH)->
 					setClassLevel('one', 0xb000)
 			);
 		}
@@ -45,11 +47,11 @@ public function testSimpleAggregateCache()
 		public function testCyclicAggregateCache()
 		{
 			$this->doTestMemcached(
-				CyclicAggregateCache::create()->
+				\Onphp\CyclicAggregateCache::create()->
 					setSummaryWeight(42)->
-					addPeer('first', SocketMemcached::create(), 25)->
-					addPeer('second', PeclMemcached::create(), 1)->
-					addPeer('third', PeclMemcached::create(), 13)
+					addPeer('first', \Onphp\SocketMemcached::create(), 25)->
+					addPeer('second', \Onphp\PeclMemcached::create(), 1)->
+					addPeer('third', \Onphp\PeclMemcached::create(), 13)
 			);
 		}
 /*
@@ -67,57 +69,57 @@ public function testCompositeCyclicAggregateCache()
 */
 		public function testIntegerChanges()
 		{
-			Cache::me()->set('test_integer', 1);
+			\Onphp\Cache::me()->set('test_integer', 1);
 
 			for ($i = 0; $i < self::QUERIES; ++$i) {
 				$this->assertEquals(
 					$i + 2,
-					Cache::me()->increment('test_integer', 1)
+					\Onphp\Cache::me()->increment('test_integer', 1)
 				);
 
-				$this->assertEquals($i + 2, Cache::me()->get('test_integer'));
+				$this->assertEquals($i + 2, \Onphp\Cache::me()->get('test_integer'));
 			}
 
 			$this->assertEquals(
 				self::QUERIES + 1,
-				Cache::me()->get('test_integer')
+				\Onphp\Cache::me()->get('test_integer')
 			);
 
 			for ($i = 0; $i < self::QUERIES; ++$i) {
 				$this->assertEquals(
 					self::QUERIES - $i,
-					Cache::me()->decrement('test_integer', 1)
+					\Onphp\Cache::me()->decrement('test_integer', 1)
 				);
 
 				$this->assertEquals(
 					self::QUERIES - $i,
-					Cache::me()->get('test_integer')
+					\Onphp\Cache::me()->get('test_integer')
 				);
 			}
 
-			$this->assertEquals(Cache::me()->get('test_integer'), 1);
+			$this->assertEquals(\Onphp\Cache::me()->get('test_integer'), 1);
 		}
 		
-		private function doTestMemcached(SelectivePeer $cache)
+		private function doTestMemcached(\Onphp\SelectivePeer $cache)
 		{
-			Cache::setPeer($cache);
+			\Onphp\Cache::setPeer($cache);
 
-			if (!Cache::me()->isAlive()) {
+			if (!\Onphp\Cache::me()->isAlive()) {
 				return $this->markTestSkipped('memcached not available');
 			}
 			
 			for ($i = 0; $i < self::QUERIES; ++$i) {
-				$this->assertTrue(Cache::me()->mark('one')->set($i, $i));
-				$this->assertTrue(Cache::me()->mark('two')->set($i, $i));
+				$this->assertTrue(\Onphp\Cache::me()->mark('one')->set($i, $i));
+				$this->assertTrue(\Onphp\Cache::me()->mark('two')->set($i, $i));
 			}
 		
 			$oneHit = 0;
 			$twoHit = 0;
 		
 			for ($i = 0; $i < self::QUERIES; ++$i) {
-				if (Cache::me()->mark('one')->get($i) == $i)
+				if (\Onphp\Cache::me()->mark('one')->get($i) == $i)
 					++$oneHit;
-				if (Cache::me()->mark('two')->get($i) == $i)
+				if (\Onphp\Cache::me()->mark('two')->get($i) == $i)
 					++$twoHit;
 			}
 			
diff --git a/test/core/AssertTest.class.php b/test/core/AssertTest.class.php
index 3cfb09f2d5..d4617d7bce 100644
--- a/test/core/AssertTest.class.php
+++ b/test/core/AssertTest.class.php
@@ -1,47 +1,49 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class AssertTest extends TestCase
 	{
 		protected $backupGlobals = false;
 		
 		public function testTrue()
 		{
-			Assert::isTrue(true);
+			\Onphp\Assert::isTrue(true);
 			
 			try {
-				Assert::isTrue(false);
+				\Onphp\Assert::isTrue(false);
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 		}
 		
 		public function testFalse()
 		{
-			Assert::isFalse(false);
+			\Onphp\Assert::isFalse(false);
 			
 			try {
-				Assert::isFalse(true);
+				\Onphp\Assert::isFalse(true);
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 		}
 		
 		public function testFloat()
 		{
-			Assert::isFloat(4.2);
-			Assert::isFloat('28.82');
+			\Onphp\Assert::isFloat(4.2);
+			\Onphp\Assert::isFloat('28.82');
 			
 			$this->nonFloatCheck(null);
 		}
 		
 		public function testInteger()
 		{
-			Assert::isInteger(2006);
-			Assert::isInteger(0);
-			Assert::isInteger('095');
+			\Onphp\Assert::isInteger(2006);
+			\Onphp\Assert::isInteger(0);
+			\Onphp\Assert::isInteger('095');
 			
 			$this->nonIntegerCheck(null);
 			$this->nonIntegerCheck('1e9');
@@ -53,9 +55,9 @@ public function testInteger()
 		public function nonFloatCheck($string)
 		{
 			try {
-				Assert::isFloat($string);
+				\Onphp\Assert::isFloat($string);
 				$this->fail("'{$string}' is float!");
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 		}
@@ -63,9 +65,9 @@ public function nonFloatCheck($string)
 		public function nonIntegerCheck($string)
 		{
 			try {
-				Assert::isInteger($string);
+				\Onphp\Assert::isInteger($string);
 				$this->fail("'{$string}' is integer!");
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 		}
@@ -73,11 +75,11 @@ public function nonIntegerCheck($string)
 		public function testTernaryBase()
 		{
 			try {
-				Assert::isTernaryBase($value = true);
-				Assert::isTernaryBase($value = false);
-				Assert::isTernaryBase($value = null);
+				\Onphp\Assert::isTernaryBase($value = true);
+				\Onphp\Assert::isTernaryBase($value = false);
+				\Onphp\Assert::isTernaryBase($value = null);
 				/* pass */
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				$this->fail();
 			}
 		}
diff --git a/test/core/BaseCachesTest.class.php b/test/core/BaseCachesTest.class.php
index 82e7bcc0ff..990accfaf9 100644
--- a/test/core/BaseCachesTest.class.php
+++ b/test/core/BaseCachesTest.class.php
@@ -1,5 +1,7 @@
 <?php
 
+	namespace Onphp\Test;
+
 	final class BaseCachesTest extends TestCase
 	{
 		public static function cacheProvider()
@@ -8,7 +10,7 @@ public static function cacheProvider()
 //				array(SocketMemcached::create()),
 //				array(SharedMemory::create()),
 //				array(PeclMemcached::create()),
-				array(RuntimeMemory::create()),
+				array(\Onphp\RuntimeMemory::create()),
 //				array(RubberFileSystem::create())
 			);
 		}
@@ -16,15 +18,15 @@ public static function cacheProvider()
 		/**
 		 * @dataProvider cacheProvider
 		**/
-		public function testClean(CachePeer $cache)
+		public function testClean(\Onphp\CachePeer $cache)
 		{
-			$this->assertInstanceOf('CachePeer', $cache->clean());
+			$this->assertInstanceOf('\Onphp\CachePeer', $cache->clean());
 		}
 
 		/**
 		 * @dataProvider cacheProvider
 		**/
-		public function testClients(CachePeer $cache)
+		public function testClients(\Onphp\CachePeer $cache)
 		{
 			$this->clientTest($cache);
 			$this->clientTest($cache->enableCompression());
@@ -34,9 +36,9 @@ public function testClients(CachePeer $cache)
 		 * @dataProvider cacheProvider
 		 * @depends testClients
 		**/
-		public function testWatermarked(CachePeer $cache)
+		public function testWatermarked(\Onphp\CachePeer $cache)
 		{
-			$cache = WatermarkedPeer::create($cache);
+			$cache = \Onphp\WatermarkedPeer::create($cache);
 			$this->clientTest($cache);
 			$this->clientTest($cache->enableCompression());
 			$this->doTestWrongKeys($cache);
@@ -46,7 +48,7 @@ public function testWatermarked(CachePeer $cache)
 		 * @dataProvider cacheProvider
 		 * @depends testWatermarked
 		**/
-		public function testWrongKeys(CachePeer $cache)
+		public function testWrongKeys(\Onphp\CachePeer $cache)
 		{
 			if (!$cache->isAlive()) {
 				return $this->markTestSkipped('cache not available');
@@ -61,7 +63,7 @@ public function testWrongKeys(CachePeer $cache)
 		public function testWithTimeout()
 		{
 			$cache =
-				SocketMemcached::create('localhost')->
+				\Onphp\SocketMemcached::create('localhost')->
 				setTimeout(200);
 
 			$cache->add('a', 'b');
@@ -71,7 +73,7 @@ public function testWithTimeout()
 			$cache->clean();
 		}
 		
-		protected function clientTest(CachePeer $cache)
+		protected function clientTest(\Onphp\CachePeer $cache)
 		{
 			if (!$cache->isAlive()) {
 				return $this->markTestSkipped('cache not available');
@@ -82,13 +84,13 @@ protected function clientTest(CachePeer $cache)
 			$this->doExpires($cache);
 		}
 		
-		protected function clientTestSingleGet(CachePeer $cache)
+		protected function clientTestSingleGet(\Onphp\CachePeer $cache)
 		{
 			$cache->clean();
 			
 			$value = 'a';
 			
-			$this->assertTrue($cache->set('a', $value, Cache::EXPIRES_MEDIUM));
+			$this->assertTrue($cache->set('a', $value, \Onphp\Cache::EXPIRES_MEDIUM));
 			$this->assertEquals($cache->get('a'), $value);
 
 			$this->assertTrue($cache->append('a', $value));
@@ -99,11 +101,11 @@ protected function clientTestSingleGet(CachePeer $cache)
 
 			$value = array(1,'s', 1234.18, array(1,'w'));
 			$this->assertSame($value, $value);
-			$cache->set('a', $value, Cache::EXPIRES_MEDIUM);
+			$cache->set('a', $value, \Onphp\Cache::EXPIRES_MEDIUM);
 			$this->assertSame($cache->get('a'), $value);
 
 			$value = 1;
-			$cache->set('a', $value, Cache::EXPIRES_MEDIUM);
+			$cache->set('a', $value, \Onphp\Cache::EXPIRES_MEDIUM);
 			$this->assertEquals($cache->increment('a', 1), $value+1);
 			$this->assertEquals($cache->get('a'), $value+1);
 			$this->assertEquals($cache->increment('a', 2), $value+3);
@@ -112,7 +114,7 @@ protected function clientTestSingleGet(CachePeer $cache)
 			$this->assertEquals($cache->get('a'), $value+1);
 
 			$value = '25';
-			$cache->set('a', $value, Cache::EXPIRES_MEDIUM);
+			$cache->set('a', $value, \Onphp\Cache::EXPIRES_MEDIUM);
 			$cache->append('a', $value);
 			$this->assertEquals($cache->get('a'), $value.$value);
 
@@ -121,13 +123,13 @@ protected function clientTestSingleGet(CachePeer $cache)
 			$cache->clean();
 		}
 		
-		protected function clientTestMultiGet(CachePeer $cache)
+		protected function clientTestMultiGet(\Onphp\CachePeer $cache)
 		{
 			$cache->clean();
 			
-			$cache->set('a', 'a', Cache::EXPIRES_MEDIUM);
-			$cache->set('b', 2, Cache::EXPIRES_MEDIUM);
-			$cache->set('c', 42.28, Cache::EXPIRES_MEDIUM);
+			$cache->set('a', 'a', \Onphp\Cache::EXPIRES_MEDIUM);
+			$cache->set('b', 2, \Onphp\Cache::EXPIRES_MEDIUM);
+			$cache->set('c', 42.28, \Onphp\Cache::EXPIRES_MEDIUM);
 			
 			$this->assertEquals($cache->get('a'), 'a');
 			$this->assertEquals($cache->get('b'), 2);
@@ -162,9 +164,9 @@ protected function clientTestMultiGet(CachePeer $cache)
 			$cache->clean();
 		}
 
-		private function doExpires(CachePeer $cache)
+		private function doExpires(\Onphp\CachePeer $cache)
 		{
-			if ($cache instanceof RuntimeMemory) {
+			if ($cache instanceof \Onphp\RuntimeMemory) {
 				return $this->markTestSkipped('RuntimeMemory cache expire not implemented');
 			}
 
@@ -173,10 +175,10 @@ private function doExpires(CachePeer $cache)
 			$value = 'a';
 
 			// do not set if exist and not expired (RubberFileSystem logic)
-			$cache->set('a', $value, Cache::EXPIRES_MAXIMUM);
+			$cache->set('a', $value, \Onphp\Cache::EXPIRES_MAXIMUM);
 			$this->assertTrue($cache->set('a', '!!!', 1));
 			$this->assertEquals($cache->get('a'), $value);
-			$this->assertTrue($cache->replace('a', '!!!', Cache::EXPIRES_MINIMUM));
+			$this->assertTrue($cache->replace('a', '!!!', \Onphp\Cache::EXPIRES_MINIMUM));
 			$this->assertEquals($cache->get('a'), '!!!');
 
 			$cache->replace('a', $value, 1);
@@ -186,7 +188,7 @@ private function doExpires(CachePeer $cache)
 			$cache->clean();
 		}
 		
-		private function doTestWrongKeys(CachePeer $cache)
+		private function doTestWrongKeys(\Onphp\CachePeer $cache)
 		{
 			$cache->clean();
 
diff --git a/test/core/CalendarDayTest.class.php b/test/core/CalendarDayTest.class.php
index a70e748aec..d6e806590b 100644
--- a/test/core/CalendarDayTest.class.php
+++ b/test/core/CalendarDayTest.class.php
@@ -1,11 +1,13 @@
 <?php
 
+	namespace Onphp\Test;
+
 	final class CalendarDayTest extends TestCase
 	{
 		public function testSleeping()
 		{
 			$calendarDay =
-				CalendarDay::create('1984-03-25')->
+				\Onphp\CalendarDay::create('1984-03-25')->
 					setOutside(true)->
 					setSelected(false);
 
diff --git a/test/core/DateRangeTest.class.php b/test/core/DateRangeTest.class.php
index 44263418ea..d40cfbb8af 100644
--- a/test/core/DateRangeTest.class.php
+++ b/test/core/DateRangeTest.class.php
@@ -1,14 +1,16 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class DateRangeTest extends TestCase
 	{
 		public function testSplit()
 		{
-			$start = new Date('2007-03-26');
-			$end = new Date('2007-04-15');
+			$start = new \Onphp\Date('2007-03-26');
+			$end = new \Onphp\Date('2007-04-15');
 			
-			$range = DateRange::create()->lazySet($start, $end);
+			$range = \Onphp\DateRange::create()->lazySet($start, $end);
 			
 			$dates = $range->split();
 			
@@ -21,27 +23,27 @@ public function testSplit()
 		public function testOverlaps()
 		{
 			$this->assertTrue(
-				DateRange::create()->lazySet(
-					Date::create('2007-03-28'),
-					Date::create('2008-03-27')
+				\Onphp\DateRange::create()->lazySet(
+					\Onphp\Date::create('2007-03-28'),
+					\Onphp\Date::create('2008-03-27')
 				)->
 				overlaps(
-					DateRange::create()->lazySet(
-						Date::create('2007-05-14'),
-						Date::create('2008-03-29')
+					\Onphp\DateRange::create()->lazySet(
+						\Onphp\Date::create('2007-05-14'),
+						\Onphp\Date::create('2008-03-29')
 					)
 				)
 			);
 			
 			$this->assertFalse(
-				DateRange::create()->lazySet(
-					Date::create('2007-03-28'),
-					Date::create('2008-03-27')
+				\Onphp\DateRange::create()->lazySet(
+					\Onphp\Date::create('2007-03-28'),
+					\Onphp\Date::create('2008-03-27')
 				)->
 				overlaps(
-					DateRange::create()->lazySet(
-						Date::create('2005-05-14'),
-						Date::create('2006-03-29')
+					\Onphp\DateRange::create()->lazySet(
+						\Onphp\Date::create('2005-05-14'),
+						\Onphp\Date::create('2006-03-29')
 					)
 				)
 			);
diff --git a/test/core/DateTest.class.php b/test/core/DateTest.class.php
index acb5f8d37d..7ab690e9d9 100644
--- a/test/core/DateTest.class.php
+++ b/test/core/DateTest.class.php
@@ -1,46 +1,48 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class DateTest extends TestCase
 	{
 		public function testDayDifference()
 		{
-			$today = Date::makeToday();
+			$today = \Onphp\Date::makeToday();
 			
 			$this->dayDifferenceTest($today, $today, 0);
 			
-			$timestamp = Timestamp::makeNow();
+			$timestamp = \Onphp\Timestamp::makeNow();
 			
 			$this->dayDifferenceTest($timestamp, $timestamp, 0);
 			
-			$left = Date::create('2008-01-12');
-			$right = Date::create('2008-01-13');
+			$left = \Onphp\Date::create('2008-01-12');
+			$right = \Onphp\Date::create('2008-01-13');
 			
 			$this->dayDifferenceTest($left, $right, 1);
 			
-			$left = Date::create('2008-01-12');
-			$right = Date::create('2009-01-13');
+			$left = \Onphp\Date::create('2008-01-12');
+			$right = \Onphp\Date::create('2009-01-13');
 			
 			$this->dayDifferenceTest($left, $right, 367);
 			
-			$left = Date::create('2008-01-12');
-			$right = Date::create('2008-01-11');
+			$left = \Onphp\Date::create('2008-01-12');
+			$right = \Onphp\Date::create('2008-01-11');
 			
 			$this->dayDifferenceTest($left, $right, -1);
 			
-			$left = Timestamp::create('2008-01-12 01:23:00');
-			$right = Timestamp::create('2008-01-13 13:01:17');
+			$left = \Onphp\Timestamp::create('2008-01-12 01:23:00');
+			$right = \Onphp\Timestamp::create('2008-01-13 13:01:17');
 			
 			$this->dayDifferenceTest($left, $right, 1);
 			
 			// change time from winter to summer
-			$left = Timestamp::create('2008-03-29 02:00:00');
-			$right = Timestamp::create('2008-03-30 02:00:00');
+			$left = \Onphp\Timestamp::create('2008-03-29 02:00:00');
+			$right = \Onphp\Timestamp::create('2008-03-30 02:00:00');
 			
 			$this->dayDifferenceTest($left, $right, 1);
 			
-			$left = Timestamp::create('2008-03-29 03:00:00');
-			$right = Timestamp::create('2008-03-30 03:00:00');
+			$left = \Onphp\Timestamp::create('2008-03-29 03:00:00');
+			$right = \Onphp\Timestamp::create('2008-03-30 03:00:00');
 
 			$this->dayDifferenceTest($left, $right, 1);
 
@@ -54,13 +56,13 @@ public function testDayDifference()
 		
 		public function testDateComparsion()
 		{
-			$date1 = Date::create(mktime(0, 0, 0, 1, 1, 2009));
-			$date2 = Date::create(mktime(1, 0, 0, 1, 1, 2009));
+			$date1 = \Onphp\Date::create(mktime(0, 0, 0, 1, 1, 2009));
+			$date2 = \Onphp\Date::create(mktime(1, 0, 0, 1, 1, 2009));
 			
 			$this->assertEquals($date1, $date2);
 			
 			$this->assertEquals(
-				Date::compare($date1, $date2),
+				\Onphp\Date::compare($date1, $date2),
 				0
 			);
 			
@@ -69,7 +71,7 @@ public function testDateComparsion()
 
 		public function testClone()
 		{
-			$date1 = Date::makeToday();
+			$date1 = \Onphp\Date::makeToday();
 			$date2 = clone $date1;
 
 			$this->assertFalse(
@@ -82,44 +84,44 @@ public function testClone()
 		**/
 		public function testWeekCount()
 		{
-			$weekCount = Date::getWeekCountInYear(2012);
+			$weekCount = \Onphp\Date::getWeekCountInYear(2012);
 			$this->assertEquals($weekCount, 52, "Week count is incorrect");
 
-			$dateFromWeekNumberStamp = Date::makeFromWeek(5, 2012)->toStamp();
-			$expectedDate = Date::create('2012-01-30 00:00:00')->toStamp();
+			$dateFromWeekNumberStamp = \Onphp\Date::makeFromWeek(5, 2012)->toStamp();
+			$expectedDate = \Onphp\Date::create('2012-01-30 00:00:00')->toStamp();
 			$this->assertEquals($dateFromWeekNumberStamp, $expectedDate, 'Creating date from week number is incorrect.');
 
-			$weekCount2009 = Date::getWeekCountInYear(2009);
+			$weekCount2009 = \Onphp\Date::getWeekCountInYear(2009);
 			$expectedCount2009 = 53;
 			$this->assertEquals($weekCount2009, $expectedCount2009, 'Week count for 2009 year is incorrect.');
 
-			$weekBegin2009Stamp = Date::makeFromWeek(53, 2009)->toStamp();
-			$expectedDate2009 = Date::create('2009-12-28 00:00:00')->toStamp();
+			$weekBegin2009Stamp = \Onphp\Date::makeFromWeek(53, 2009)->toStamp();
+			$expectedDate2009 = \Onphp\Date::create('2009-12-28 00:00:00')->toStamp();
 			$this->assertEquals($weekBegin2009Stamp, $expectedDate2009, 'Week 53 for 2009 starts with incorrect date.');
 
 			$this->
 				assertEquals(
-					Date::makeFromWeek(1,2010)->toStamp(),
-					Date::create('2010-01-04')->toStamp(),
+					\Onphp\Date::makeFromWeek(1,2010)->toStamp(),
+					\Onphp\Date::create('2010-01-04')->toStamp(),
 					'Week 1 for 2010 starts with incorrect date.'
 				);
 
-			$this->assertEquals(Date::getWeekCountInYear(1996), 52, 'Incorrect week count in 1996 year');
+			$this->assertEquals(\Onphp\Date::getWeekCountInYear(1996), 52, 'Incorrect week count in 1996 year');
 
-			$this->assertEquals(Date::getWeekCountInYear(1976), 53, 'Incorrect week count in 1976 year');
+			$this->assertEquals(\Onphp\Date::getWeekCountInYear(1976), 53, 'Incorrect week count in 1976 year');
 		}
 
 		public function testMakeFromWeek()
 		{
-			$this->makeFromWeekTest(Date::create('2009-12-28'));
-			$this->makeFromWeekTest(Date::create('2010-01-04'));
+			$this->makeFromWeekTest(\Onphp\Date::create('2009-12-28'));
+			$this->makeFromWeekTest(\Onphp\Date::create('2010-01-04'));
 
 			return $this;
 		}
 
 		public function testSleeping()
 		{
-			$date = new Date('1984-03-25');
+			$date = new \Onphp\Date('1984-03-25');
 
 			$serializedDate = serialize($date);
 
@@ -132,20 +134,20 @@ public function testSleeping()
 			$this->assertEquals($date->getFirstDayOfWeek(), $unserializedDate->getFirstDayOfWeek());
 		}
 		
-		private function dayDifferenceTest(Date $left, Date $right, $expected)
+		private function dayDifferenceTest(\Onphp\Date $left, \Onphp\Date $right, $expected)
 		{
-			$this->assertEquals(Date::dayDifference($left, $right), $expected);
+			$this->assertEquals(\Onphp\Date::dayDifference($left, $right), $expected);
 			
 			return $this;
 		}
 
-		private function makeFromWeekTest(Date $date)
+		private function makeFromWeekTest(\Onphp\Date $date)
 		{
 			// day is monday?
 			$this->assertEquals(date('w', $date->toStamp()), 1);
 
 			$this->assertEquals(
-				Date::makeFromWeek(
+				\Onphp\Date::makeFromWeek(
 					date('W', $date->toStamp()),
 					date('Y', $date->toStamp())
 				),
diff --git a/test/core/DbConnectionTest.class.php b/test/core/DbConnectionTest.class.php
index babe3ac7c3..b0986bd9e1 100644
--- a/test/core/DbConnectionTest.class.php
+++ b/test/core/DbConnectionTest.class.php
@@ -1,29 +1,31 @@
 <?php
 
+	namespace Onphp\Test;
+
 	final class DbConnectionTest extends TestCase
 	{
 		public function setUp()
 		{
-			DBPool::me()->
+			\Onphp\DBPool::me()->
 				addLink(
 					'badLink',
-					DB::spawn('PinbedPgSQL', 'postgres', '', 'localhost', 'wrongDatabase')
+					\Onphp\DB::spawn('\Onphp\PinbedPgSQL', 'postgres', '', 'localhost', 'wrongDatabase')
 				);
 		}
 		
 		public function testPostgresql()
 		{
 			try {
-				$link = DBPool::me()->getLink('badLink');
+				$link = \Onphp\DBPool::me()->getLink('badLink');
 				$this->fail('Unreachable code');
-			} catch(Exception $e) {
-				$this->assertInstanceOf('DatabaseException', $e);
+			} catch(\Exception $e) {
+				$this->assertInstanceOf('\Onphp\DatabaseException', $e);
 			}
 		}
 		
 		public function tearDown()
 		{
-			DBPool::me()->dropLink('badLink');
+			\Onphp\DBPool::me()->dropLink('badLink');
 		}
 	}
 
diff --git a/test/core/DeleteQueryTest.class.php b/test/core/DeleteQueryTest.class.php
index 75fb9811d9..30377c99a5 100644
--- a/test/core/DeleteQueryTest.class.php
+++ b/test/core/DeleteQueryTest.class.php
@@ -1,29 +1,31 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class DeleteQueryTest extends TestCase
 	{
 		public function testQuery()
 		{
-			$query = OSQL::delete()->from('pity_table');
+			$query = \Onphp\OSQL::delete()->from('pity_table');
 			
-			$dialect = ImaginaryDialect::me();
+			$dialect = \Onphp\ImaginaryDialect::me();
 			
 			try {
 				$query->toDialectString($dialect);
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 			
-			$query->where(Expression::eq(1, 2));
+			$query->where(\Onphp\Expression::eq(1, 2));
 			
 			$this->assertEquals(
 				$query->toDialectString($dialect),
 				'DELETE FROM pity_table WHERE (1 = 2)'
 			);
 			
-			$query->andWhere(Expression::notEq('a', 'b'));
+			$query->andWhere(\Onphp\Expression::notEq('a', 'b'));
 			
 			$this->assertEquals(
 				$query->toDialectString($dialect),
diff --git a/test/core/FiltersTest.class.php b/test/core/FiltersTest.class.php
index 1a160c0b68..c034979579 100644
--- a/test/core/FiltersTest.class.php
+++ b/test/core/FiltersTest.class.php
@@ -1,11 +1,13 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class FiltersTest extends TestCase
 	{
 		public function testTrim()
 		{
-			$filter = TrimFilter::create();
+			$filter = \Onphp\TrimFilter::create();
 			$text = ' qq ';
 			
 			$this->assertEquals(
@@ -34,7 +36,7 @@ public function testUu()
 			$text = 'foo und bar';
 			
 			$this->assertEquals(
-				Filter::uudecode()->apply(Filter::uuencode()->apply($text)),
+				\Onphp\Filter::uudecode()->apply(\Onphp\Filter::uuencode()->apply($text)),
 				$text
 			);
 		}
@@ -42,14 +44,14 @@ public function testUu()
 		public function testNewLines()
 		{
 			$this->assertEquals(
-				Filter::nl2br()->apply("strange\nthings\nhappens"),
+				\Onphp\Filter::nl2br()->apply("strange\nthings\nhappens"),
 				"strange<br />\nthings<br />\nhappens"
 			);
 		}
-		
+
 		public function testRussianTypograf()
 		{
-			$filter = RussianTypograph::me();
+			$filter = \Onphp\RussianTypograph::me();
 			$emptyValues = array(null, '', false, 0, '  ', "\n");
 			
 			foreach ($emptyValues as $value) {
@@ -127,7 +129,7 @@ public function testRussianTypograf()
 		public function testCrop()
 		{
 			$this->assertEquals(
-				CropFilter::create()->
+				\Onphp\CropFilter::create()->
 				setLength(128)->
 				apply(urldecode('Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 Nokia6120c/4.21; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413')),
 				'Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 Nokia6120c/4.21; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, l'
@@ -137,9 +139,9 @@ public function testCrop()
 		public function testCallChain()
 		{
 			$chain =
-				CallChain::create()->
-				add(Filter::nl2br())->
-				add(Filter::htmlSpecialChars());
+				\Onphp\CallChain::create()->
+				add(\Onphp\Filter::nl2br())->
+				add(\Onphp\Filter::htmlSpecialChars());
 			
 			$text = "foo\nbar&";
 			
@@ -155,31 +157,31 @@ public function testCallChain()
 			
 			try {
 				$chain->undefinedMethod();
-			} catch (BaseException $e) {
+			} catch (\Onphp\BaseException $e) {
 				// passed
 			}
 			
 			try {
-				CallChain::create()->call('foo', 'bar');
-			} catch (WrongStateException $e) {
+				\Onphp\CallChain::create()->call('foo', 'bar');
+			} catch (\Onphp\WrongStateException $e) {
 				// passed
 			}
 			
 			try {
-				CallChain::create()->add(
-					IdentifiableObject::wrap(112233)
+				\Onphp\CallChain::create()->add(
+					\Onphp\IdentifiableObject::wrap(112233)
 				)->
 				undefinedMethod();
-			} catch (BaseException $e) {
+			} catch (\Onphp\BaseException $e) {
 				// passed;
 			}
 			
 			try {
-				CallChain::create()->add(
-					IdentifiableObject::wrap(332211)
+				\Onphp\CallChain::create()->add(
+					\Onphp\IdentifiableObject::wrap(332211)
 				)->
 				call('undefinedMethod');
-			} catch (BaseException $e) {
+			} catch (\Onphp\BaseException $e) {
 				// passed;
 			}
 		}
@@ -194,9 +196,9 @@ public function testJsonFilters()
 
 			$data = array('the keeey' => "that's value");
 			
-			$encoded = JsonEncoderFilter::me()->apply($data);
+			$encoded = \Onphp\JsonEncoderFilter::me()->apply($data);
 			
-			$decoded = JsonDecoderFilter::me()->setAssoc()->apply($encoded);
+			$decoded = \Onphp\JsonDecoderFilter::me()->setAssoc()->apply($encoded);
 			
 			$this->assertEquals($decoded, $data);
 		}
@@ -208,24 +210,24 @@ public function testUtf16ConverterFilter()
 			$utf16be = file_get_contents(dirname(__FILE__).'/../main/data/unicode/utf16be.txt');
 
 			$this->assertEquals(
-				Utf16ConverterFilter::me()->apply($utf8),
+				\Onphp\Utf16ConverterFilter::me()->apply($utf8),
 				$utf8
 			);
 
 			$this->assertEquals(
-				Utf16ConverterFilter::me()->apply($utf16),
+				\Onphp\Utf16ConverterFilter::me()->apply($utf16),
 				$utf8
 			);
 
 			$this->assertEquals(
-				Utf16ConverterFilter::me()->apply($utf16be),
+				\Onphp\Utf16ConverterFilter::me()->apply($utf16be),
 				$utf8
 			);
 
 			// most difficult case, because it is a vaild utf16 chineese (?)
 			$this->assertEquals(
 				'привет',
-				Utf16ConverterFilter::me()->apply('привет')
+				\Onphp\Utf16ConverterFilter::me()->apply('привет')
 			);
 		}
 		
@@ -233,7 +235,7 @@ public function testCallbackFilter()
 		{
 			//simple test
 			$postApply = ' and my applying';
-			$filter = CallbackFilter::create(function($value) use ($postApply) {
+			$filter = \Onphp\CallbackFilter::create(function($value) use ($postApply) {
 				return $value . $postApply;
 			});
 			
@@ -246,7 +248,7 @@ public function testCallbackFilter()
 		public function testTextImport()
 		{
 			$this->assertEquals(
-				Filter::textImport()->apply('  <b> some bold text    </b>   '),
+				\Onphp\Filter::textImport()->apply('  <b> some bold text    </b>   '),
 				'some bold text'
 			);
 		}
diff --git a/test/core/FormPrimitivesDateTest.class.php b/test/core/FormPrimitivesDateTest.class.php
index 81646578e2..7a5ace5e4d 100644
--- a/test/core/FormPrimitivesDateTest.class.php
+++ b/test/core/FormPrimitivesDateTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class FormPrimitivesDateTest extends TestCase
 	{
 		const VALID_DAY		= '22';
@@ -15,9 +17,9 @@ public function testValidScope()
 		{
 			$data =
 				array(
-					PrimitiveDate::DAY => self::VALID_DAY,
-					PrimitiveDate::MONTH => self::VALID_MONTH,
-					PrimitiveDate::YEAR => self::VALID_YEAR,
+					\Onphp\PrimitiveDate::DAY => self::VALID_DAY,
+					\Onphp\PrimitiveDate::MONTH => self::VALID_MONTH,
+					\Onphp\PrimitiveDate::YEAR => self::VALID_YEAR,
 				);
 			
 			$scope = array(
@@ -42,9 +44,9 @@ public function testInvalidScope()
 		{
 			$data =
 				array(
-					PrimitiveDate::DAY => self::INVALID_DAY,
-					PrimitiveDate::MONTH => self::INVALID_MONTH,
-					PrimitiveDate::YEAR => self::INVALID_YEAR,
+					\Onphp\PrimitiveDate::DAY => self::INVALID_DAY,
+					\Onphp\PrimitiveDate::MONTH => self::INVALID_MONTH,
+					\Onphp\PrimitiveDate::YEAR => self::INVALID_YEAR,
 				);
 			
 			$scope = array(
@@ -78,8 +80,8 @@ public function testEmptyScopeWithRequired()
 		protected function processValidScopeBy($scope, $data)
 		{
 			$form =
-				Form::create()->add(
-					Primitive::date('test')
+				\Onphp\Form::create()->add(
+					\Onphp\Primitive::date('test')
 				)->
 				import($scope);
 			
@@ -117,8 +119,8 @@ protected function processValidScopeBy($scope, $data)
 		protected function processInvalidBy($scope, $data)
 		{
 			$form =
-				Form::create()->add(
-					Primitive::date('test')
+				\Onphp\Form::create()->add(
+					\Onphp\Primitive::date('test')
 				)->
 				import($scope);
 			
@@ -140,7 +142,7 @@ protected function processInvalidBy($scope, $data)
 			$this->assertEquals(
 				$form->getErrors(),
 				array(
-					'test' => Form::WRONG,
+					'test' => \Onphp\Form::WRONG,
 				)
 			);
 		}
@@ -149,21 +151,21 @@ protected function processEmptyScope($required)
 		{
 			$data =
 				array(
-					PrimitiveDate::DAY => '',
-					PrimitiveDate::MONTH => '',
-					PrimitiveDate::YEAR => '',
+					\Onphp\PrimitiveDate::DAY => '',
+					\Onphp\PrimitiveDate::MONTH => '',
+					\Onphp\PrimitiveDate::YEAR => '',
 				);
 			
 			$scope = array(
 				'test' => $data
 			);
 			
-			$primitive = Primitive::date('test');
+			$primitive = \Onphp\Primitive::date('test');
 			if ($required)
 				$primitive->setRequired(true);
 			
 			$form =
-				Form::create()->
+				\Onphp\Form::create()->
 				add($primitive)->
 				import($scope);
 			
@@ -176,7 +178,7 @@ protected function processEmptyScope($required)
 				$this->assertEquals(
 					$form->getErrors(),
 					array(
-						'test' => Form::MISSING,
+						'test' => \Onphp\Form::MISSING,
 					)
 				);
 			else
diff --git a/test/core/FormTest.class.php b/test/core/FormTest.class.php
index b64c8e58e6..a6ae436b01 100644
--- a/test/core/FormTest.class.php
+++ b/test/core/FormTest.class.php
@@ -1,20 +1,22 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class FormTest extends TestCase
 	{
 		public function testRange()
 		{
 			$scope = array(
 				'test' => array(
-					PrimitiveRange::MIN => '42',
-					PrimitiveRange::MAX => '64',
+					\Onphp\PrimitiveRange::MIN => '42',
+					\Onphp\PrimitiveRange::MAX => '64',
 				)
 			);
 			
 			$form =
-				Form::create()->add(
-					Primitive::range('test')
+				\Onphp\Form::create()->add(
+					\Onphp\Primitive::range('test')
 				)->
 				import($scope);
 			
@@ -39,8 +41,8 @@ public function testRange()
 		
 		public function testSafeValues()
 		{
-			$prm = Primitive::date('date');
-			$date = Date::create('2005-02-19');
+			$prm = \Onphp\Primitive::date('date');
+			$date = \Onphp\Date::create('2005-02-19');
 			
 			$prm->import(
 				array('date' => '2005-02-19')
@@ -52,7 +54,7 @@ public function testSafeValues()
 				$prm->getSafeValue() == $date
 			);
 			
-			$prm = Primitive::date('date')->setDefault(
+			$prm = \Onphp\Primitive::date('date')->setDefault(
 				$date
 			);
 			
@@ -69,23 +71,23 @@ public function testSafeValues()
 		
 		public function testErrors()
 		{
-			$form = Form::create()->
+			$form = \Onphp\Form::create()->
 				add(
-					Primitive::ternary('flag')->
+					\Onphp\Primitive::ternary('flag')->
 						setFalseValue('0')->
 						setTrueValue('1')
 				)->
-				add(Primitive::integer('old')->required())->
-				addRule('someRule', Expression::between(FormField::create('old'), '18', '35'));
+				add(\Onphp\Primitive::integer('old')->required())->
+				addRule('someRule', \Onphp\Expression::between(\Onphp\FormField::create('old'), '18', '35'));
 			
 			//empty import
 			$form->import(array())->checkRules();
 			
 			//checking
-			$expectingErrors = array('old' => Form::MISSING, 'someRule' => Form::WRONG);
+			$expectingErrors = array('old' => \Onphp\Form::MISSING, 'someRule' => \Onphp\Form::WRONG);
 			$this->assertEquals($expectingErrors, $form->getErrors());
-			$this->assertEquals(Form::MISSING, $form->getError('old'));
-			$this->assertEquals(Form::WRONG, $form->getError('someRule'));
+			$this->assertEquals(\Onphp\Form::MISSING, $form->getError('old'));
+			$this->assertEquals(\Onphp\Form::WRONG, $form->getError('someRule'));
 			$this->assertTrue($form->hasError('old'));
 			$this->assertFalse($form->hasError('flag'));
 			
@@ -97,7 +99,7 @@ public function testErrors()
 			$form->clean()->importMore(array('flag' => '3', 'old' => '17'))->checkRules();
 			
 			//checking
-			$expectingErrors = array('flag' => Form::WRONG, 'someRule' => Form::WRONG);
+			$expectingErrors = array('flag' => \Onphp\Form::WRONG, 'someRule' => \Onphp\Form::WRONG);
 			$this->assertEquals($expectingErrors, $form->getErrors());
 			$this->assertTrue($form->hasError('someRule'));
 			
@@ -117,5 +119,49 @@ public function testErrors()
 			//checking
 			$this->assertEquals(array(), $form->getErrors());
 		}
+		
+		public function testFormCollection()
+		{
+			$collection = 
+				\Onphp\FormCollection::create(
+					TestCity::proto()->makeForm()->
+						drop('id')
+				);
+			
+			
+			$url = \Onphp\HttpUrl::create()->parse('http://i.would.like.to.create.cities/?name[77]=Moscow&capital[77]=1&large[77]=1&name[50]=Krasnogorsk&name[78]=Piter&large[78]=1');
+			parse_str($url->getQuery(), $getArray);
+			
+			$collection->import($getArray);
+			
+			foreach ($collection as $number => $form) {
+				switch ($number) {
+					case 77:
+						$this->assertEquals('Moscow', $form->getValue('name'));
+						$this->assertTrue($form->getValue('capital'));
+						$this->assertTrue($form->getValue('large'));
+
+						break;
+					
+					case 78:
+						$this->assertEquals('Piter', $form->getValue('name'));
+						$this->assertFalse($form->getValue('capital'));
+						$this->assertTrue($form->getValue('large'));
+						
+						break;
+					
+					case 50:
+						$this->assertEquals('Krasnogorsk', $form->getValue('name'));
+						$this->assertFalse($form->getValue('capital'));
+						$this->assertFalse($form->getValue('large'));
+						
+						break;
+					
+					default:
+						$this->assertTrue(false);
+						break;
+				}
+			}
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/test/core/InnerTransactionTest.class.php b/test/core/InnerTransactionTest.class.php
index e688bd72e0..e50cf62d05 100644
--- a/test/core/InnerTransactionTest.class.php
+++ b/test/core/InnerTransactionTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	class InnerTransactionTest extends TestCase
 	{
 		public function testCommitExt()
@@ -10,14 +12,14 @@ public function testCommitExt()
 			));
 			
 			//execute
-			$transaction = InnerTransaction::begin($db);
+			$transaction = \Onphp\InnerTransaction::begin($db);
 			$transaction->commit();
 			
 			//test Exception on second commit
 			try {
 				$transaction->commit();
 				$this->fail('expecting exception on second transaction commit');
-			} catch (WrongStateException $e) {
+			} catch (\Onphp\WrongStateException $e) {
 				/* all ok */
 			}
 		}
@@ -31,14 +33,14 @@ public function testRollbackExt()
 			));
 			
 			//execute
-			$transaction = InnerTransaction::begin($db);
+			$transaction = \Onphp\InnerTransaction::begin($db);
 			$transaction->rollback();
 			
 			//test Exception on second commit
 			try {
 				$transaction->rollback();
 				$this->fail('expecting exception on second transaction commit');
-			} catch (WrongStateException $e) {
+			} catch (\Onphp\WrongStateException $e) {
 				/* all ok */
 			}
 		}
@@ -53,14 +55,14 @@ public function testCommitInt()
 			));
 			
 			//execute
-			$transaction = InnerTransaction::begin($db);
+			$transaction = \Onphp\InnerTransaction::begin($db);
 			$transaction->commit();
 			
 			//test Exception on second commit
 			try {
 				$transaction->rollback();
 				$this->fail('expecting exception on second transaction commit');
-			} catch (WrongStateException $e) {
+			} catch (\Onphp\WrongStateException $e) {
 				/* all ok */
 			}
 		}
@@ -75,14 +77,14 @@ public function testRollbackInt()
 			));
 			
 			//execute
-			$transaction = InnerTransaction::begin($db);
+			$transaction = \Onphp\InnerTransaction::begin($db);
 			$transaction->rollback();
 			
 			//test Exception on second commit
 			try {
 				$transaction->commit();
 				$this->fail('expecting exception on second transaction commit');
-			} catch (WrongStateException $e) {
+			} catch (\Onphp\WrongStateException $e) {
 				/* all ok */
 			}
 		}
@@ -100,7 +102,7 @@ public function testWrapCommit()
 				return $foo . $bar;
 			};
 			
-			$wrapper = InnerTransactionWrapper::create()->
+			$wrapper = \Onphp\InnerTransactionWrapper::create()->
 				setDB($db)->
 				setFunction($innerFunction);
 			
@@ -121,7 +123,7 @@ public function testWrapRollbackByException()
 				return $e->getMessage().' '.$foo.$bar;
 			};
 			
-			$wrapper = InnerTransactionWrapper::create()->
+			$wrapper = \Onphp\InnerTransactionWrapper::create()->
 				setDB($db)->
 				setFunction(array($this, 'wrapExceptionFunction'))->
 				setExceptionFunction($catchExceptionFunc);
@@ -136,29 +138,29 @@ public function testWrapRollbackByOtherException()
 				'rollback' => 1,
 			));
 			
-			$exception = new DatabaseException('Some database exception');
+			$exception = new \Onphp\DatabaseException('Some database exception');
 			
 			$function = function () use ($exception) {throw $exception;};
 			
-			$wrapper = InnerTransactionWrapper::create()->
+			$wrapper = \Onphp\InnerTransactionWrapper::create()->
 				setDB($db)->
 				setFunction($function);
 			
 			try {
 				$wrapper->run();
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->assertEquals($exception, $e);
 			}
 		}
 		
 		public function wrapExceptionFunction($foo, $bar)
 		{
-			throw new UnimplementedFeatureException('some unimplemented feature');
+			throw new \Onphp\UnimplementedFeatureException('some unimplemented feature');
 		}
 		
 		/**
 		 * @param array $options
-		 * @return DB
+		 * @return \Onphp\DB
 		 */
 		private function spawnDb($options = array())
 		{
@@ -172,7 +174,7 @@ private function spawnDb($options = array())
 				'inTransaction' => false,
 			);
 			
-			$mock = $this->getMock('PgSQL');
+			$mock = $this->getMock('\Onphp\PgSQL');
 			
 			$countMethods = array(
 				'begin', 'commit', 'rollback',
diff --git a/test/core/IntervalUnitTest.class.php b/test/core/IntervalUnitTest.class.php
index 4c0767e6b7..94ba5ea655 100644
--- a/test/core/IntervalUnitTest.class.php
+++ b/test/core/IntervalUnitTest.class.php
@@ -1,14 +1,16 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class IntervalUnitTest extends TestCase
 	{
 		public function testMicrosecond()
 		{
-			$unit = IntervalUnit::create('microsecond');
+			$unit = \Onphp\IntervalUnit::create('microsecond');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -24,10 +26,10 @@ public function testMicrosecond()
 		
 		public function testMillisecond()
 		{
-			$unit = IntervalUnit::create('millisecond');
+			$unit = \Onphp\IntervalUnit::create('millisecond');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -43,10 +45,10 @@ public function testMillisecond()
 		
 		public function testSecond()
 		{
-			$unit = IntervalUnit::create('second');
+			$unit = \Onphp\IntervalUnit::create('second');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -62,10 +64,10 @@ public function testSecond()
 		
 		public function testMinute()
 		{
-			$unit = IntervalUnit::create('minute');
+			$unit = \Onphp\IntervalUnit::create('minute');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -81,10 +83,10 @@ public function testMinute()
 		
 		public function testHour()
 		{
-			$unit = IntervalUnit::create('hour');
+			$unit = \Onphp\IntervalUnit::create('hour');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -100,10 +102,10 @@ public function testHour()
 		
 		public function testHourFloor()
 		{
-			$unit = IntervalUnit::create('hour');
+			$unit = \Onphp\IntervalUnit::create('hour');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40'),
+				\Onphp\Timestamp::create('2001-02-16 20:38:40'),
 				true
 			);
 			
@@ -120,10 +122,10 @@ public function testHourFloor()
 		
 		public function testDay()
 		{
-			$unit = IntervalUnit::create('day');
+			$unit = \Onphp\IntervalUnit::create('day');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -139,10 +141,10 @@ public function testDay()
 		
 		public function testDayFloor()
 		{
-			$unit = IntervalUnit::create('day');
+			$unit = \Onphp\IntervalUnit::create('day');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2008-06-18 15:42:42'),
+				\Onphp\Timestamp::create('2008-06-18 15:42:42'),
 				true
 			);
 			
@@ -159,11 +161,11 @@ public function testDayFloor()
 		
 		public function testDayMsdMsk()
 		{
-			$unit = IntervalUnit::create('day');
+			$unit = \Onphp\IntervalUnit::create('day');
 			
 			for ($hour = 1; $hour < 24; ++$hour) {
 				$result = $unit->truncate(
-					Timestamp::create("2008-10-26 00:$hour:00")
+					\Onphp\Timestamp::create("2008-10-26 00:$hour:00")
 				);
 				
 				$this->assertEquals(
@@ -177,7 +179,7 @@ public function testDayMsdMsk()
 				);
 				
 				$result = $unit->truncate(
-					Timestamp::create("2008-03-30 00:$hour:00"),
+					\Onphp\Timestamp::create("2008-03-30 00:$hour:00"),
 					true
 				);
 				
@@ -195,10 +197,10 @@ public function testDayMsdMsk()
 		
 		public function testWeek()
 		{
-			$unit = IntervalUnit::create('week');
+			$unit = \Onphp\IntervalUnit::create('week');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -214,10 +216,10 @@ public function testWeek()
 		
 		public function testWeekFloor()
 		{
-			$unit = IntervalUnit::create('week');
+			$unit = \Onphp\IntervalUnit::create('week');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40'),
+				\Onphp\Timestamp::create('2001-02-16 20:38:40'),
 				true
 			);
 			
@@ -233,10 +235,10 @@ public function testWeekFloor()
 		}
 		public function testMonth()
 		{
-			$unit = IntervalUnit::create('month');
+			$unit = \Onphp\IntervalUnit::create('month');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -252,10 +254,10 @@ public function testMonth()
 		
 		public function testMonthFloor()
 		{
-			$unit = IntervalUnit::create('month');
+			$unit = \Onphp\IntervalUnit::create('month');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40'),
+				\Onphp\Timestamp::create('2001-02-16 20:38:40'),
 				true
 			);
 			
@@ -272,10 +274,10 @@ public function testMonthFloor()
 		
 		public function testYear()
 		{
-			$unit = IntervalUnit::create('year');
+			$unit = \Onphp\IntervalUnit::create('year');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -291,10 +293,10 @@ public function testYear()
 		
 		public function testYearFloor()
 		{
-			$unit = IntervalUnit::create('year');
+			$unit = \Onphp\IntervalUnit::create('year');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40'),
+				\Onphp\Timestamp::create('2001-02-16 20:38:40'),
 				true
 			);
 			
@@ -311,10 +313,10 @@ public function testYearFloor()
 		
 		public function testDecade()
 		{
-			$unit = IntervalUnit::create('decade');
+			$unit = \Onphp\IntervalUnit::create('decade');
 			
 			$result = $unit->truncate(
-				Timestamp::create('2001-02-16 20:38:40')
+				\Onphp\Timestamp::create('2001-02-16 20:38:40')
 			);
 			
 			$this->assertEquals(
@@ -330,14 +332,14 @@ public function testDecade()
 		
 		public function testCountSeconds()
 		{
-			$unit = IntervalUnit::create('second');
+			$unit = \Onphp\IntervalUnit::create('second');
 			
 			$this->assertEquals(
 				4,
 				$result = $unit->countInRange(
-					TimestampRange::create(
-						$start = Timestamp::create('2008-12-31 23:59:58'),
-						$end = Timestamp::create('2009-01-01 00:00:02')
+					\Onphp\TimestampRange::create(
+						$start = \Onphp\Timestamp::create('2008-12-31 23:59:58'),
+						$end = \Onphp\Timestamp::create('2009-01-01 00:00:02')
 					)
 				)
 			);
@@ -355,16 +357,16 @@ public function testCountSeconds()
 		
 		public function testCountHoursDST()
 		{
-			$unit = IntervalUnit::create('hour');
+			$unit = \Onphp\IntervalUnit::create('hour');
 			
 			$this->assertEquals(
 				4,
 				$result = $unit->countInRange(
-					TimestampRange::create(
+					\Onphp\TimestampRange::create(
 						// In 2008, March, 30 is a 23h-day because of daylight
 						// saving time
-						$start = Timestamp::create('2008-03-30 01:30:00'),
-						$end = Timestamp::create('2008-03-30 05:30:00')
+						$start = \Onphp\Timestamp::create('2008-03-30 01:30:00'),
+						$end = \Onphp\Timestamp::create('2008-03-30 05:30:00')
 					)
 				)
 			);
@@ -382,14 +384,14 @@ public function testCountHoursDST()
 		
 		public function testCountMonths()
 		{
-			$unit = IntervalUnit::create('month');
+			$unit = \Onphp\IntervalUnit::create('month');
 			
 			$this->assertEquals(
 				6,
 				$result = $unit->countInRange(
-					TimestampRange::create(
-						$start = Timestamp::create('2008-12-31 23:59:58'),
-						$end = Timestamp::create('2009-05-28 03:00:00')
+					\Onphp\TimestampRange::create(
+						$start = \Onphp\Timestamp::create('2008-12-31 23:59:58'),
+						$end = \Onphp\Timestamp::create('2009-05-28 03:00:00')
 					)
 				)
 			);
@@ -407,14 +409,14 @@ public function testCountMonths()
 		
 		public function testCountMonthsNotOverlapped()
 		{
-			$unit = IntervalUnit::create('month');
+			$unit = \Onphp\IntervalUnit::create('month');
 			
 			$this->assertEquals(
 				4,
 				$result = $unit->countInRange(
-					TimestampRange::create(
-						$start = Timestamp::create('2008-12-31 23:59:58'),
-						$end = Timestamp::create('2009-05-28 03:00:00')
+					\Onphp\TimestampRange::create(
+						$start = \Onphp\Timestamp::create('2008-12-31 23:59:58'),
+						$end = \Onphp\Timestamp::create('2009-05-28 03:00:00')
 					),
 					false
 				)
diff --git a/test/core/LockerTest.class.php b/test/core/LockerTest.class.php
index e8a709cebc..6617812c63 100644
--- a/test/core/LockerTest.class.php
+++ b/test/core/LockerTest.class.php
@@ -1,13 +1,15 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class LockerTest extends TestCase
 	{
 		public function testFileLocker()
 		{
 			$directory = ONPHP_TEMP_PATH.'file-locking/';
 			
-			$locker = new FileLocker('file-locking/');
+			$locker = new \Onphp\FileLocker('file-locking/');
 			
 			$this->assertTrue($locker->get('test'));
 			
diff --git a/test/core/LogicTest.class.php b/test/core/LogicTest.class.php
index 84f3a04452..157c85b6c1 100644
--- a/test/core/LogicTest.class.php
+++ b/test/core/LogicTest.class.php
@@ -1,257 +1,259 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class LogicTest extends TestCaseDB
 	{
 		public function testBaseSqlGeneration()
 		{
-			$dialect = ImaginaryDialect::me();
-			$pgDialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = \Onphp\ImaginaryDialect::me();
+			$pgDialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
 			$this->assertRegExp(
 				'/^\(a (AND|and) b\)$/',
-				Expression::expAnd('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::expAnd('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a (OR|or) b\)$/',
-				Expression::expOr('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::expOr('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
-				Expression::eq('a', 'b')->toDialectString($dialect),
+				\Onphp\Expression::eq('a', 'b')->toDialectString($dialect),
 				'(a = b)'
 			);
 			
-			$some = IdentifiableObject::wrap(123);
+			$some = \Onphp\IdentifiableObject::wrap(123);
 			$this->assertEquals(
-				Expression::eqId('a', $some)->toDialectString($dialect),
+				\Onphp\Expression::eqId('a', $some)->toDialectString($dialect),
 				'(a = 123)'
 			);
 			
 			$this->assertEquals(
-				Expression::notEq('a', 'b')->toDialectString($dialect),
+				\Onphp\Expression::notEq('a', 'b')->toDialectString($dialect),
 				'(a != b)'
 			);
 			
 			$this->assertEquals(
-				Expression::gt('a', 'b')->toDialectString($dialect),
+				\Onphp\Expression::gt('a', 'b')->toDialectString($dialect),
 				'(a > b)'
 			);
 			
 			$this->assertEquals(
-				Expression::gtEq('a', 'b')->toDialectString($dialect),
+				\Onphp\Expression::gtEq('a', 'b')->toDialectString($dialect),
 				'(a >= b)'
 			);
 			
 			$this->assertEquals(
-				Expression::lt('a', 'b')->toDialectString($dialect),
+				\Onphp\Expression::lt('a', 'b')->toDialectString($dialect),
 				'(a < b)'
 			);
 			
 			$this->assertEquals(
-				Expression::ltEq('a', 'b')->toDialectString($dialect),
+				\Onphp\Expression::ltEq('a', 'b')->toDialectString($dialect),
 				'(a <= b)'
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((IS NOT NULL)|(is not null)) *\)$/',
-				Expression::notNull('a')->toDialectString($dialect)
+				\Onphp\Expression::notNull('a')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((IS NULL)|(is null)) *\)$/',
-				Expression::isNull('a')->toDialectString($dialect)
+				\Onphp\Expression::isNull('a')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((IS TRUE)|(is true)) *\)$/',
-				Expression::isTrue('a')->toDialectString($dialect)
+				\Onphp\Expression::isTrue('a')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((IS FALSE)|(is false)) *\)$/',
-				Expression::isFalse('a')->toDialectString($dialect)
+				\Onphp\Expression::isFalse('a')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a (LIKE|like) b\)$/',
-				Expression::like('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::like('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((NOT LIKE)|(not like)) b\)$/',
-				Expression::notLike('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::notLike('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a (ILIKE|ilike) b\)$/',
-				Expression::ilike('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::ilike('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((NOT ILIKE)|(not like)) b\)$/',
-				Expression::notIlike('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::notIlike('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((SIMILAR TO)|(similar to)) b\)$/',
-				Expression::similar('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::similar('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((NOT SIMILAR TO)|(not similar to)) b\)$/',
-				Expression::notSimilar('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::notSimilar('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(lower(a) = b)',
-				Expression::eqLower('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::eqLower('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(lower(a) = lower(b))',
 				
-				Expression::eqLower(new DBValue('a'), new DBValue('b'))->
+				\Onphp\Expression::eqLower(new \Onphp\DBValue('a'), new \Onphp\DBValue('b'))->
 				toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(lower(\'a\') = lower(\'b\'))',
 				
-				Expression::eqLower(new DBValue('a'), new DBValue('b'))->
+				\Onphp\Expression::eqLower(new \Onphp\DBValue('a'), new \Onphp\DBValue('b'))->
 				toDialectString($pgDialect)
 			);
 			
 			$this->assertEquals(
 				'(lower(\'a\') = lower("b"))',
 				
-				Expression::eqLower(new DBValue('a'), new DBField('b'))->
+				\Onphp\Expression::eqLower(new \Onphp\DBValue('a'), new \Onphp\DBField('b'))->
 				toDialectString($pgDialect)
 			);
 			
 			$this->assertEquals(
 				'(lower("a") = lower(\'b\'))',
 				
-				Expression::eqLower(new DBField('a'), new DBValue('b'))->
+				\Onphp\Expression::eqLower(new \Onphp\DBField('a'), new \Onphp\DBValue('b'))->
 				toDialectString($pgDialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a (BETWEEN|between) b (AND|and) c\)$/',
-				Expression::between('a', 'b', 'c')->toDialectString($dialect)
+				\Onphp\Expression::between('a', 'b', 'c')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(a = 123)',
-				Expression::in('a', 123)->toDialectString($dialect)
+				\Onphp\Expression::in('a', 123)->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(a = 123)',
-				Expression::in('a', array(123))->toDialectString($dialect)
+				\Onphp\Expression::in('a', array(123))->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a (in|IN) \(123, 456\)\)$/',
-				Expression::in('a', array(123, 456))->toDialectString($dialect)
+				\Onphp\Expression::in('a', array(123, 456))->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(a != 123)',
-				Expression::notIn('a', 123)->toDialectString($dialect)
+				\Onphp\Expression::notIn('a', 123)->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(a != 123)',
-				Expression::notIn('a', array(123))->toDialectString($dialect)
+				\Onphp\Expression::notIn('a', array(123))->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a ((not in)|(NOT IN)) \(123, 456\)\)$/',
-				Expression::notIn('a', array(123, 456))->toDialectString($dialect)
+				\Onphp\Expression::notIn('a', array(123, 456))->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(a + b)',
-				Expression::add('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::add('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(a - b)',
-				Expression::sub('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::sub('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(a * b)',
-				Expression::mul('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::mul('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(a / b)',
-				Expression::div('a', 'b')->toDialectString($dialect)
+				\Onphp\Expression::div('a', 'b')->toDialectString($dialect)
 			);
 			
 			$this->assertRegExp(
 				'/^\(a (between|BETWEEN) b (and|AND) c\)$/',
-				Expression::between('a', 'b', 'c')->toDialectString($dialect)
+				\Onphp\Expression::between('a', 'b', 'c')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(-1 IS NULL)',
-				Expression::isNull(-1)->toDialectString($dialect)
+				\Onphp\Expression::isNull(-1)->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(NOT a)',
-				Expression::not('a')->toDialectString($dialect)
+				\Onphp\Expression::not('a')->toDialectString($dialect)
 			);
 			
 			$this->assertEquals(
 				'(- a)',
-				Expression::minus('a')->toDialectString($dialect)
+				\Onphp\Expression::minus('a')->toDialectString($dialect)
 			);
 			
 			try {
-				Expression::eq('id', null)->toDialectString($dialect);
+				\Onphp\Expression::eq('id', null)->toDialectString($dialect);
 				
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//it's Ok
 			}
 		}
 		
 		public function testPgGeneration()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			$this->assertRegExp(
 				'/^\(\(\(\(\'asdf\' = "b"\) (AND|and) \("e" != \("i" \/ \'123\'\)\) (AND|and) \(\(lower\("a"\) += +lower\("b"\)\) ((IS TRUE)|(is true))\) (AND|and) \("g" = \'12\'\) (AND|and) \("j" (BETWEEN|between) \'3\' (AND|and) "p"\)\) (OR|or) \("table"\."c" ((IS NOT NULL)|(is not null))\)\) (AND|and) \("sometable"\."a" ((not in)|(NOT IN)) \(\'q\', \'qwer\', \'xcvzxc\', \'wer\'\)\)\)$/',
- 				Expression::expAnd(
-					Expression::expOr(
-						Expression::andBlock(
-							Expression::eq(
-								new DBValue('asdf'),
-								new DBField('b')
+ 				\Onphp\Expression::expAnd(
+					\Onphp\Expression::expOr(
+						\Onphp\Expression::andBlock(
+							\Onphp\Expression::eq(
+								new \Onphp\DBValue('asdf'),
+								new \Onphp\DBField('b')
 							),
-							Expression::notEq(
-								new DBField('e'),
-								Expression::div(
-									new DBField('i'),
-									new DBValue(123)
+							\Onphp\Expression::notEq(
+								new \Onphp\DBField('e'),
+								\Onphp\Expression::div(
+									new \Onphp\DBField('i'),
+									new \Onphp\DBValue(123)
 								)
 							),
-							Expression::isTrue(
-								Expression::eqLower(new DBField('a'), new DBField('b'))
+							\Onphp\Expression::isTrue(
+								\Onphp\Expression::eqLower(new \Onphp\DBField('a'), new \Onphp\DBField('b'))
 							),
 							
-							Expression::eq(new DBField('g'), new DBValue(12)),
+							\Onphp\Expression::eq(new \Onphp\DBField('g'), new \Onphp\DBValue(12)),
 							
-							Expression::between('j', new DBValue(3), new DBField('p'))
+							\Onphp\Expression::between('j', new \Onphp\DBValue(3), new \Onphp\DBField('p'))
 						),
-						Expression::notNull(new DBField('c', 'table'))
+						\Onphp\Expression::notNull(new \Onphp\DBField('c', 'table'))
 					),
-					Expression::notIn(
-						new DBField('a', 'sometable'),
+					\Onphp\Expression::notIn(
+						new \Onphp\DBField('a', 'sometable'),
 						array('q', 'qwer', 'xcvzxc', 'wer')
 					)
 				)->toDialectString($dialect)
@@ -260,24 +262,24 @@ public function testPgGeneration()
 		
 		public function testFormCalculation()
 		{
-			$form = Form::create()->
+			$form = \Onphp\Form::create()->
 				add(
-					Primitive::string('a')
+					\Onphp\Primitive::string('a')
 				)->
 				add(
-					Primitive::boolean('b')
+					\Onphp\Primitive::boolean('b')
 				)->
 				add(
-					Primitive::integer('c')
+					\Onphp\Primitive::integer('c')
 				)->
 				add(
-					Primitive::integer('d')
+					\Onphp\Primitive::integer('d')
 				)->
 				add(
-					Primitive::integer('e')
+					\Onphp\Primitive::integer('e')
 				)->
 				add(
-					Primitive::boolean('f')
+					\Onphp\Primitive::boolean('f')
 				)->
 				import(
 					array(
@@ -290,38 +292,38 @@ public function testFormCalculation()
 				);
 			
 			$this->assertTrue(
-				Expression::isTrue(new FormField('b'))->toBoolean($form)
+				\Onphp\Expression::isTrue(new \Onphp\FormField('b'))->toBoolean($form)
 			);
 			
 			$this->assertFalse(
-				Expression::isTrue(new FormField('f'))->toBoolean($form)
+				\Onphp\Expression::isTrue(new \Onphp\FormField('f'))->toBoolean($form)
 			);
 			
 			$this->assertFalse(
-				Expression::eq('asdf', new FormField('a'))->toBoolean($form)
+				\Onphp\Expression::eq('asdf', new \Onphp\FormField('a'))->toBoolean($form)
 			);
 			
 			$this->assertTrue(
-				Expression::eqLower('asdfg', new FormField('a'))->toBoolean($form)
+				\Onphp\Expression::eqLower('asdfg', new \Onphp\FormField('a'))->toBoolean($form)
 			);
 			
 			$this->assertTrue(
-				Expression::eq('asDfg', new FormField('a'))->toBoolean($form)
+				\Onphp\Expression::eq('asDfg', new \Onphp\FormField('a'))->toBoolean($form)
 			);
 			
 			$this->assertTrue(
-				Expression::andBlock(
-					Expression::expOr(
-						new FormField('b'),
-						new FormField('f')
+				\Onphp\Expression::andBlock(
+					\Onphp\Expression::expOr(
+						new \Onphp\FormField('b'),
+						new \Onphp\FormField('f')
 					),
-					Expression::eq(
+					\Onphp\Expression::eq(
 						7,
-						Expression::add(
-							new FormField('c'),
-							Expression::mul(
-								new FormField('d'),
-								new FormField('e')
+						\Onphp\Expression::add(
+							new \Onphp\FormField('c'),
+							\Onphp\Expression::mul(
+								new \Onphp\FormField('d'),
+								new \Onphp\FormField('e')
 							)
 						)
 					)
@@ -330,19 +332,19 @@ public function testFormCalculation()
 			);
 			
 			$this->assertTrue(
-				Expression::between(new FormField('d'), new FormField('c'), new FormField('e'))->toBoolean($form)
+				\Onphp\Expression::between(new \Onphp\FormField('d'), new \Onphp\FormField('c'), new \Onphp\FormField('e'))->toBoolean($form)
 			);
 			
 			$this->assertFalse(
-				Expression::between(new FormField('c'), new FormField('d'), new FormField('e'))->toBoolean($form)
+				\Onphp\Expression::between(new \Onphp\FormField('c'), new \Onphp\FormField('d'), new \Onphp\FormField('e'))->toBoolean($form)
 			);
 			
 			$this->assertFalse(
-				Expression::not(new FormField('b'))->toBoolean($form)
+				\Onphp\Expression::not(new \Onphp\FormField('b'))->toBoolean($form)
 			);
 			
 			$this->assertTrue(
-				Expression::not(new FormField('f'))->toBoolean($form)
+				\Onphp\Expression::not(new \Onphp\FormField('f'))->toBoolean($form)
 			);
 			
 		}
@@ -351,58 +353,58 @@ public function testChainSQL()
 		{
 			$this->assertRegExp(
 				'/^\(\(a (OR|or) \(b ((IS NOT NULL)|(is not null)) *\)\) (AND|and) \(c = d\) (AND|and) \(e ((IS FALSE)|(is false)) *\)\)$/',
-				Expression::chain()->
+				\Onphp\Expression::chain()->
 					expAnd(
-						Expression::expOr(
+						\Onphp\Expression::expOr(
 							'a',
-							Expression::notNull('b')
+							\Onphp\Expression::notNull('b')
 						)
 					)->
 					expAnd(
-						Expression::eq('c', 'd')
+						\Onphp\Expression::eq('c', 'd')
 					)->
 					expAnd(
-						Expression::isFalse('e')
+						\Onphp\Expression::isFalse('e')
 					)->
-					toDialectString(ImaginaryDialect::me())
+					toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 			
 			$this->assertRegExp(
 				'/^\(\(a = b\) (OR|or) \(d (OR|or) \(c > e\)\) (OR|or) \(f (in|IN) \(qwer, asdf, zxcv\)\)\)$/',
-				Expression::chain()->
+				\Onphp\Expression::chain()->
 					expOr(
-						Expression::eq('a', 'b')
+						\Onphp\Expression::eq('a', 'b')
 					)->
 					expOr(
-						Expression::expOr('d', Expression::gt('c', 'e'))
+						\Onphp\Expression::expOr('d', \Onphp\Expression::gt('c', 'e'))
 					)->
 					expOr(
-						Expression::in('f', array('qwer', 'asdf', 'zxcv'))
+						\Onphp\Expression::in('f', array('qwer', 'asdf', 'zxcv'))
 					)->
-					toDialectString(ImaginaryDialect::me())
+					toDialectString(\Onphp\ImaginaryDialect::me())
 			);
 		}
 
 		public function testChainForm()
 		{
-			$form = Form::create()->
+			$form = \Onphp\Form::create()->
 				add(
-					Primitive::string('a')
+					\Onphp\Primitive::string('a')
 				)->
 				add(
-					Primitive::string('b')
+					\Onphp\Primitive::string('b')
 				)->
 				add(
-					Primitive::integer('c')
+					\Onphp\Primitive::integer('c')
 				)->
 				add(
-					Primitive::integer('d')
+					\Onphp\Primitive::integer('d')
 				)->
 				add(
-					Primitive::boolean('e')
+					\Onphp\Primitive::boolean('e')
 				)->
 				add(
-					Primitive::string('f')
+					\Onphp\Primitive::string('f')
 				)->
 				import(
 					array(
@@ -412,20 +414,20 @@ public function testChainForm()
 					)
 				);
 			
-			$andChain = Expression::chain()->
+			$andChain = \Onphp\Expression::chain()->
 				expAnd(
-					Expression::expOr(
-						new FormField('a'),
-						Expression::notNull(new FormField('b'))
+					\Onphp\Expression::expOr(
+						new \Onphp\FormField('a'),
+						\Onphp\Expression::notNull(new \Onphp\FormField('b'))
 					)
 				)->
 				expAnd(
-					Expression::eq(
-						new FormField('c'),
-						new FormField('d'))
+					\Onphp\Expression::eq(
+						new \Onphp\FormField('c'),
+						new \Onphp\FormField('d'))
 				)->
 				expAnd(
-					Expression::isFalse(new FormField('e'))
+					\Onphp\Expression::isFalse(new \Onphp\FormField('e'))
 				);
 
 			$this->assertTrue($andChain->toBoolean($form));
@@ -433,21 +435,21 @@ public function testChainForm()
 			$form->importMore(array('e' => 'on'));
 			$this->assertFalse($andChain->toBoolean($form));
 
-			$orChain = Expression::chain()->
+			$orChain = \Onphp\Expression::chain()->
 				expOr(
-					Expression::eq(new FormField('a'), new FormField('b'))
+					\Onphp\Expression::eq(new \Onphp\FormField('a'), new \Onphp\FormField('b'))
 				)->
 				expOr(
-					Expression::expOr(
-						new FormField('e'),
-						Expression::gt(
-							new FormField('c'),
-							new FormField('d')
+					\Onphp\Expression::expOr(
+						new \Onphp\FormField('e'),
+						\Onphp\Expression::gt(
+							new \Onphp\FormField('c'),
+							new \Onphp\FormField('d')
 						)
 					)
 				)->
 				expOr(
-					Expression::in(new FormField('f'), array('qwer', 'asdf', 'zxcv'))
+					\Onphp\Expression::in(new \Onphp\FormField('f'), array('qwer', 'asdf', 'zxcv'))
 				);
 
 			$form->import(array());
@@ -489,16 +491,16 @@ public function testCallbackLogicalObject()
 			if (mb_substr(PHP_VERSION, 0, 3) < '5.3') {
 				$this->markTestSkipped('only php 5.3 or later');
 			}
-			$callBack = function(Form $form) {
+			$callBack = function(\Onphp\Form $form) {
 				return $form->getValue('repository') == 'git';
 			};
 			
-			$form = Form::create()->
-				add(Primitive::string('repository'))->
-				addRule('isOurRepository', CallbackLogicalObject::create($callBack));
+			$form = \Onphp\Form::create()->
+				add(\Onphp\Primitive::string('repository'))->
+				addRule('isOurRepository', \Onphp\CallbackLogicalObject::create($callBack));
 			
 			$form->import(array('repository' => 'svn'))->checkRules();
-			$this->assertEquals(array('isOurRepository' => Form::WRONG), $form->getErrors());
+			$this->assertEquals(array('isOurRepository' => \Onphp\Form::WRONG), $form->getErrors());
 			
 			$form->clean()->dropAllErrors();
 			
diff --git a/test/core/PrimitiveAliasTest.class.php b/test/core/PrimitiveAliasTest.class.php
index 63733a101c..91fb151cce 100644
--- a/test/core/PrimitiveAliasTest.class.php
+++ b/test/core/PrimitiveAliasTest.class.php
@@ -1,7 +1,9 @@
 <?php
 	/* $Id$ */
 	
-	final class PrimitiveCustomError extends PrimitiveString
+	namespace Onphp\Test;
+
+	final class PrimitiveCustomError extends \Onphp\PrimitiveString
 	{
 		const CUSTOM_MARK = 0xff;
 		
@@ -23,13 +25,13 @@ final class PrimitiveAliasTest extends TestCase
 		public function testImport()
 		{
 			$realPrimitive =
-				Primitive::string('stringPrimitive')->
+				\Onphp\Primitive::string('stringPrimitive')->
 				required();
 			
 			$form =
-				Form::create()->
+				\Onphp\Form::create()->
 				add($realPrimitive)->
-				add(Primitive::alias('alias',$realPrimitive))->
+				add(\Onphp\Primitive::alias('alias',$realPrimitive))->
 				import(array('alias' => 'Йа строка'));
 			
 			$errors = $form->getErrors();
@@ -37,15 +39,15 @@ public function testImport()
 			$this->assertFalse(isset($errors['stringPrimitive']));
 
 			$enumPrimitive =
-				Primitive::enumeration('enumerationPrimitive')->
-				of('DataType')->
+				\Onphp\Primitive::enumeration('enumerationPrimitive')->
+				of('\Onphp\DataType')->
 				required();
 
 			$form =
-				Form::create()->
+				\Onphp\Form::create()->
 				add($enumPrimitive)->
-				add(Primitive::alias('alias', $enumPrimitive))->
-				import(array('alias' => DataType::getAnyId()));
+				add(\Onphp\Primitive::alias('alias', $enumPrimitive))->
+				import(array('alias' => \Onphp\DataType::getAnyId()));
 
 			$errors = $form->getErrors();
 
@@ -58,9 +60,9 @@ public function testCustomError()
 			$realPrimitive->setMax(1);
 			
 			$form =
-				Form::create()->
+				\Onphp\Form::create()->
 				add($realPrimitive)->
-				add(Primitive::alias('alias', $realPrimitive))->
+				add(\Onphp\Primitive::alias('alias', $realPrimitive))->
 				import(array('alias' => 'Toooo long'));
 			
 			$errors = $form->getErrors();
diff --git a/test/core/PrimitiveClassTest.class.php b/test/core/PrimitiveClassTest.class.php
index 491dfb758c..3a0acbef52 100644
--- a/test/core/PrimitiveClassTest.class.php
+++ b/test/core/PrimitiveClassTest.class.php
@@ -1,46 +1,48 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class PrimitiveClassTest extends TestCase
 	{
 		public function test()
 		{
-			$prm = Primitive::clazz('name');
+			$prm = \Onphp\Primitive::clazz('name');
 			
 			$this->assertFalse($prm->import(array('name' =>'InExIsTaNtClass')));
 			$this->assertFalse($prm->import(array('name' => "\0foo")));
 			
-			$this->assertTrue($prm->importValue('IdentifiableObject'));
-			$this->assertEquals($prm->getValue(), 'IdentifiableObject');
+			$this->assertTrue($prm->importValue('\Onphp\IdentifiableObject'));
+			$this->assertEquals($prm->getValue(), '\Onphp\IdentifiableObject');
 		}
 		
 		public function testOf()
 		{
-			$prm = Primitive::clazz('name');
+			$prm = \Onphp\Primitive::clazz('name');
 			
 			try {
 				$prm->of('InExIsNaNtClass');
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				// pass
 			}
 			
 			$this->assertFalse(
 				$prm->
-					of('Enumeration')->
-					importValue('IdentifiableObject')
+					of('\Onphp\Enumeration')->
+					importValue('\Onphp\IdentifiableObject')
 			);
 			
 			$this->assertTrue(
 				$prm->
-					of('Identifiable')->
-					importValue('IdentifiableObject')
+					of('\Onphp\Identifiable')->
+					importValue('\Onphp\IdentifiableObject')
 			);
 			
 			$this->assertTrue(
 				$prm->
-					of('IdentifiableObject')->
-					importValue('IdentifiableObject')
+					of('\Onphp\IdentifiableObject')->
+					importValue('\Onphp\IdentifiableObject')
 			);
 		}
 	}
diff --git a/test/core/PrimitiveDateRangeTest.class.php b/test/core/PrimitiveDateRangeTest.class.php
index c5fdb39ca6..970cd9c110 100644
--- a/test/core/PrimitiveDateRangeTest.class.php
+++ b/test/core/PrimitiveDateRangeTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class PrimitiveDateRangeTest extends TestCase
 	{
 		public function testImport()
@@ -9,7 +11,7 @@ public function testImport()
 			$stop = '1985-01-03';
 			$delimiter = ' - ';
 			
-			$prm = new PrimitiveDateRange('test');
+			$prm = new \Onphp\PrimitiveDateRange('test');
 			
 			$array = array('test' => $start.$delimiter.$stop);
 			
@@ -68,7 +70,7 @@ public function testDottedImport()
 			$dottedStart = '1985.01.03';
 			$dottedStop = '1985.01.03';
 			
-			$prm = new PrimitiveDateRange('test');
+			$prm = new \Onphp\PrimitiveDateRange('test');
 			
 			$array = array('test' => $dottedStart.$delimiter.$dottedStop);
 			
@@ -89,7 +91,7 @@ public function testDottedImport()
 			$date = '14.02';
 			$array = array('test' => $date);
 			
-			$now = Date::makeToday();
+			$now = \Onphp\Date::makeToday();
 			$result = $now->getYear().'-02-14';
 			
 			$this->assertTrue($prm->import($array));
@@ -102,7 +104,7 @@ public function testDottedImport()
 			$date = '02';
 			$array = array('test' => $date);
 			
-			$now = Date::makeToday();
+			$now = \Onphp\Date::makeToday();
 			$result = $now->getYear().'-'.$now->getMonth().'-'.$date;
 			
 			$this->assertTrue($prm->import($array));
@@ -146,12 +148,12 @@ public function testDottedImport()
 		
 		public function testUndelimitedDate()
 		{
-			$prm = new PrimitiveDateRange('test');
+			$prm = new \Onphp\PrimitiveDateRange('test');
 			
 			$date = '1402';
 			$array = array('test' => $date);
 			
-			$now = Date::makeToday();
+			$now = \Onphp\Date::makeToday();
 			$result = $now->getYear().'-02-14';
 			
 			$this->assertTrue($prm->import($array));
diff --git a/test/core/PrimitiveEnumTest.class.php b/test/core/PrimitiveEnumTest.class.php
index 585e5be89c..fdd12295b9 100644
--- a/test/core/PrimitiveEnumTest.class.php
+++ b/test/core/PrimitiveEnumTest.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class PrimitiveEnumTest extends TestCase
 	{
 		public function testIntegerValues()
@@ -16,14 +18,14 @@ public function testIntegerValues()
 			$defaultId = 2;
 			$importId = 1;
 
-			$default = MimeType::wrap($defaultId);
-			$imported = MimeType::wrap($importId);
+			$default = \Onphp\MimeType::wrap($defaultId);
+			$imported = \Onphp\MimeType::wrap($importId);
 
 			$form =
-				Form::create()->
+				\Onphp\Form::create()->
 				add(
-					Primitive::enum('enum')
-						->of('MimeType')
+					\Onphp\Primitive::enum('enum')
+						->of('\Onphp\MimeType')
 						->setDefault($default)
 				);
 			
@@ -46,16 +48,16 @@ public function testIntegerValues()
 		
 		public function testGetList()
 		{
-			$primitive = Primitive::enum('enum')->of('MimeType');
-			$enum = MimeType::wrap(1);
+			$primitive = \Onphp\Primitive::enum('enum')->of('\Onphp\MimeType');
+			$enum = \Onphp\MimeType::wrap(1);
 			
-			$this->assertEquals($primitive->getList(), MimeType::getObjectList());
+			$this->assertEquals($primitive->getList(), \Onphp\MimeType::getObjectList());
 			
 			$primitive->setDefault($enum);
-			$this->assertEquals($primitive->getList(), MimeType::getObjectList());
+			$this->assertEquals($primitive->getList(), \Onphp\MimeType::getObjectList());
 			
-			$primitive->import(array('enum' => MimeType::getAnyId()));
-			$this->assertEquals($primitive->getList(), MimeType::getObjectList());
+			$primitive->import(array('enum' => \Onphp\MimeType::getAnyId()));
+			$this->assertEquals($primitive->getList(), \Onphp\MimeType::getObjectList());
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/test/core/PrimitiveEnumerationTest.class.php b/test/core/PrimitiveEnumerationTest.class.php
index 42ad1d8bf5..463733ae04 100644
--- a/test/core/PrimitiveEnumerationTest.class.php
+++ b/test/core/PrimitiveEnumerationTest.class.php
@@ -1,14 +1,16 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class PrimitiveEnumerationTest extends TestCase
 	{
 		public function testIntegerValues()
 		{
 			$form =
-				Form::create()->
+				\Onphp\Form::create()->
 				add(
-					Primitive::enumeration('enum')->of('DataType')
+					\Onphp\Primitive::enumeration('enum')->of('\Onphp\DataType')
 				);
 			
 			$form->import(array('enum' => '4097'));
@@ -19,15 +21,15 @@ public function testIntegerValues()
 		
 		public function testGetList()
 		{
-			$primitive = Primitive::enumeration('enum')->of('DataType');
-			$enum = DataType::create(DataType::getAnyId());
+			$primitive = \Onphp\Primitive::enumeration('enum')->of('\Onphp\DataType');
+			$enum = \Onphp\DataType::create(\Onphp\DataType::getAnyId());
 			
 			$this->assertEquals($primitive->getList(), $enum->getObjectList());
 			
 			$primitive->setDefault($enum);
 			$this->assertEquals($primitive->getList(), $enum->getObjectList());
 			
-			$primitive->import(array('enum' => DataType::getAnyId()));
+			$primitive->import(array('enum' => \Onphp\DataType::getAnyId()));
 			$this->assertEquals($primitive->getList(), $enum->getObjectList());
 		}
 	}
diff --git a/test/core/PrimitiveHstoreTest.class.php b/test/core/PrimitiveHstoreTest.class.php
index 47da385dce..53ec19e216 100644
--- a/test/core/PrimitiveHstoreTest.class.php
+++ b/test/core/PrimitiveHstoreTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class PrimitiveHstoreTest extends TestCase
 	{
 		protected static $scope =
@@ -33,7 +35,7 @@ public function testImport()
 			$this->assertEquals($subform->getValue('weight'), 80);
 			$this->assertEquals($subform->getValue('comment'), 'test user case');
 			
-			$this->assertInstanceOf('Hstore', $prm->getValue());
+			$this->assertInstanceOf('\Onphp\Hstore', $prm->getValue());
 			
 			$hstore = $prm->getValue();
 			
@@ -53,7 +55,7 @@ public function testImport()
 			try {
 				$hstore->get('NotFound');
 				$this->fail('NotFound');
-			} catch (ObjectNotFoundException $e) {
+			} catch (\Onphp\ObjectNotFoundException $e) {
 				/** ok **/
 			}
 			
@@ -79,7 +81,7 @@ public function testInvalidImport()
 			$this->assertEquals(
 				$prm->getInnerErrors(),
 				array(
-					'weight' => Form::WRONG
+					'weight' => \Onphp\Form::WRONG
 				)
 			);
 			
@@ -89,17 +91,17 @@ public function testInvalidImport()
 		}
 		
 		/**
-		 * @return PrimitiveHstore
+		 * @return \Onphp\PrimitiveHstore
 		**/
 		protected function create()
 		{
 			return
-				Primitive::hstore('properties')->
+				\Onphp\Primitive::hstore('properties')->
 				setFormMapping(
 					array(
-						Primitive::string('age'),
-						Primitive::integer('weight'),
-						Primitive::string('comment'),
+						\Onphp\Primitive::string('age'),
+						\Onphp\Primitive::integer('weight'),
+						\Onphp\Primitive::string('comment'),
 					)
 				);
 		}
diff --git a/test/core/PrimitiveHttpUrlTest.class.php b/test/core/PrimitiveHttpUrlTest.class.php
new file mode 100644
index 0000000000..f153919dde
--- /dev/null
+++ b/test/core/PrimitiveHttpUrlTest.class.php
@@ -0,0 +1,44 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2013 by Vyacheslav Yu. Tsyrulnik                        *
+*                                                                         *
+*   This program is free software; you can redistribute it and/or modify  *
+*   it under the terms of the GNU Lesser General Public License as        *
+*   published by the Free Software Foundation; either version 3 of the    *
+*   License, or (at your option) any later version.                       *
+*                                                                         *
+***************************************************************************/
+	
+	final class PrimitiveHttpUrlTest extends \Onphp\Test\TestCase
+	{
+		private $urlWithPrivilegedPort = "https://path.to.some.com:444/hey.html";
+		
+		/**
+		 * @test
+		 */
+		public function privilegedPortIsOkByDefault()
+		{
+			$form = \Onphp\Form::create()->add(\Onphp\Primitive::httpUrl("url"));
+			
+			$form->import(array('url' => $this->urlWithPrivilegedPort));
+			$errors = $form->getErrors();
+			
+			$this->assertFalse(isset($errors["url"]));
+		}
+		
+		/**
+		 * @test
+		 */
+		public function privilegedPortInvalid()
+		{
+			$form = \Onphp\Form::create()->add(\Onphp\Primitive::httpUrl("url")->setCheckPrivilegedPorts());
+			
+			$form->import(array('url' => $this->urlWithPrivilegedPort));
+			$errors = $form->getErrors();
+			
+			$this->assertTrue(isset($errors["url"]));
+			$this->assertEquals(\Onphp\Form::WRONG, $errors["url"]);
+		}
+		
+	}
+?>
\ No newline at end of file
diff --git a/test/core/PrimitiveIdentifierTest.class.php b/test/core/PrimitiveIdentifierTest.class.php
index 22aa16eddf..25bdc3827d 100644
--- a/test/core/PrimitiveIdentifierTest.class.php
+++ b/test/core/PrimitiveIdentifierTest.class.php
@@ -1,24 +1,85 @@
 <?php
 	/* $Id$ */
 	
-	final class PrimitiveIdentifierTest extends TestCase
+	namespace Onphp\Test;
+
+	final class PrimitiveIdentifierTest extends TestCaseDAO
 	{
 		public function testEmpty()
 		{
-			$prm = Primitive::identifier('name')->of('TestCity');
-			
-			$nullValues = array(null, '');
-			foreach ($nullValues as $value) {
-				$this->assertNull($prm->import(array('name' => $value)));
-				$this->assertNull($prm->importValue($value));
+			foreach (DBTestPool::me()->iterator() as $db) {
+				$prm = \Onphp\Primitive::identifier('name')->of('\Onphp\Test\TestCity');
+
+				$nullValues = array(null, '');
+				foreach ($nullValues as $value) {
+					$this->assertNull($prm->import(array('name' => $value)));
+					$this->assertNull($prm->importValue($value));
+				}
+
+				$emptyValues = array(0, '0', false);
+
+				foreach ($emptyValues as $value) {
+					$this->assertFalse($prm->import(array('name' => $value)));
+					$this->assertFalse($prm->importValue($value));
+				}
 			}
-			
-			$emptyValues = array(0, '0', false);
-			
-			foreach ($emptyValues as $value) {
-				$this->assertFalse($prm->import(array('name' => $value)));
-				$this->assertFalse($prm->importValue($value));
+		}
+		
+		/**
+		 * @group pi
+		 */
+		public function testCustomImportExport()
+		{
+			foreach (DBTestPool::me()->iterator() as $db) {
+				$moscow = TestCity::create()->setCapital(true)->setName('Moscow');
+				$moscow->dao()->add($moscow);
+
+				$stalingrad = TestCity::create()->setCapital(false)->setName('Stalingrad');
+				$stalingrad->dao()->add($stalingrad);
+
+				$prms = array();
+				$prms[] = \Onphp\Primitive::identifier('city')
+					->setScalar(true)
+					->of('\Onphp\Test\TestCity')
+					->setMethodName('\Onphp\Test\PrimitiveIdentifierTest::getCityByName')
+					->setExtractMethod('\Onphp\Test\PrimitiveIdentifierTest::getCityName');
+
+				$prms[] = \Onphp\Primitive::identifier('city')
+					->setScalar(true)
+					->of('\Onphp\Test\TestCity')
+					->setMethodName(array(get_class($this), 'getCityByName'))
+					->setExtractMethod(function(TestCity $city) {return $city->getName();});
+
+				foreach ($prms as $prm) {
+					$prm->import(array('city' => 'Moscow'));
+					$this->assertEquals($moscow, $prm->getValue());
+					$this->assertEquals('Moscow', $prm->exportValue());
+
+					$prm->importValue($stalingrad);
+					$this->assertequals($stalingrad, $prm->getValue());
+					$this->assertequals('Stalingrad', $prm->exportValue());
+
+					$prm->import(array('city' => $moscow));
+					$this->assertEquals($moscow, $prm->getValue());
+					$this->assertEquals('Moscow', $prm->exportValue());
+				}
 			}
 		}
+		
+		/**
+		 * @param string $name
+		 * @return TestCity
+		 */
+		public static function getCityByName($name)
+		{
+			return \Onphp\Criteria::create(TestCity::dao())
+				->add(\Onphp\Expression::eq('name', \Onphp\DBValue::create($name)))
+				->get();
+		}
+		
+		public static function getCityName(TestCity $city)
+		{
+			return $city->getName();
+		}
 	}
 ?>
\ No newline at end of file
diff --git a/test/core/PrimitiveInetTest.class.php b/test/core/PrimitiveInetTest.class.php
index 5e06b2a86e..872489b89e 100644
--- a/test/core/PrimitiveInetTest.class.php
+++ b/test/core/PrimitiveInetTest.class.php
@@ -1,10 +1,12 @@
 <?php
 	
+	namespace Onphp\Test;
+
 	final class PrimitiveInetTest extends TestCase
 	{
 		public function testInet()
 		{
-			$prm = Primitive::inet('inet');
+			$prm = \Onphp\Primitive::inet('inet');
 			
 			$this->assertTrue($prm->importValue('127.0.0.1'));
 			$this->assertTrue($prm->importValue('254.254.254.254'));
diff --git a/test/core/PrimitiveIpTest.class.php b/test/core/PrimitiveIpTest.class.php
index 953ff4d1e6..67b2b0c937 100644
--- a/test/core/PrimitiveIpTest.class.php
+++ b/test/core/PrimitiveIpTest.class.php
@@ -1,10 +1,12 @@
 <?php
 	
+	namespace Onphp\Test;
+
 	final class PrimitiveIpTest extends TestCase
 	{
 		public function testBase()
 		{
-			$prm = Primitive::ipAddress('ip');
+			$prm = \Onphp\Primitive::ipAddress('ip');
 			
 			$this->assertTrue($prm->importValue('127.0.0.1'));
 			$this->assertTrue($prm->importValue('254.254.254.254'));
@@ -16,7 +18,7 @@ public function testBase()
 			$this->assertFalse($prm->importValue('10.0.256'));
 			
 			$prmWithDefault =
-				Primitive::ipAddress('ip')->setDefault(IpAddress::create('42.42.42.42'));
+				\Onphp\Primitive::ipAddress('ip')->setDefault(\Onphp\IpAddress::create('42.42.42.42'));
 			
 			$this->assertEquals(
 				$prmWithDefault->getActualValue()->toString(),
@@ -30,7 +32,7 @@ public function testBase()
 				'43.43.43.43'
 			);
 			
-			$prmWithDefault->importValue(IpAddress::create('8.8.8.8')); //google public dns ;)
+			$prmWithDefault->importValue(\Onphp\IpAddress::create('8.8.8.8')); //google public dns ;)
 			
 			$this->assertEquals(
 				$prmWithDefault->getActualValue()->toString(),
diff --git a/test/core/PrimitiveNumberTest.class.php b/test/core/PrimitiveNumberTest.class.php
index e0063b25fe..bdfd8b40cc 100644
--- a/test/core/PrimitiveNumberTest.class.php
+++ b/test/core/PrimitiveNumberTest.class.php
@@ -1,11 +1,13 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class PrimitiveNumberTest extends TestCase
 	{
 		public function testInteger()
 		{
-			$prm = Primitive::integer('int');
+			$prm = \Onphp\Primitive::integer('int');
 			
 			$this->assertTrue($prm->importValue(0));
 			
diff --git a/test/core/PrimitiveStringTest.class.php b/test/core/PrimitiveStringTest.class.php
index 6a3ce95fc3..9e1b0b276a 100644
--- a/test/core/PrimitiveStringTest.class.php
+++ b/test/core/PrimitiveStringTest.class.php
@@ -1,10 +1,12 @@
 <?php
 
+	namespace Onphp\Test;
+
 	final class PrimitiveStringTest extends TestCase
 	{
 		public function testImport()
 		{
-			$prm = Primitive::string('name');
+			$prm = \Onphp\Primitive::string('name');
 			
 			$nullValues = array(null, '');
 			
@@ -25,7 +27,7 @@ public function testImport()
 
 
 			$prm->setAllowedPattern(
-				PrimitiveString::MAIL_PATTERN
+				\Onphp\PrimitiveString::MAIL_PATTERN
 			);
 
 			$prm->clean();
diff --git a/test/core/PrimitiveTimeTest.class.php b/test/core/PrimitiveTimeTest.class.php
index 36219051b3..455f66d6b1 100644
--- a/test/core/PrimitiveTimeTest.class.php
+++ b/test/core/PrimitiveTimeTest.class.php
@@ -1,15 +1,17 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class PrimitiveTimeTest extends TestCase
 	{
 		public function testImport()
 		{
 			$prm =
-				Primitive::time('test')->
+				\Onphp\Primitive::time('test')->
 					setSingle(true)->
-					setMax(Time::create('00:12:00'))->
-					setMin(Time::create('00:10:00'));
+					setMax(\Onphp\Time::create('00:12:00'))->
+					setMin(\Onphp\Time::create('00:10:00'));
 			
 			$array =
 				array (
diff --git a/test/core/PrimitiveTimestampTZTest.class.php b/test/core/PrimitiveTimestampTZTest.class.php
index 1e850ebdfb..46a44e9219 100644
--- a/test/core/PrimitiveTimestampTZTest.class.php
+++ b/test/core/PrimitiveTimestampTZTest.class.php
@@ -1,26 +1,28 @@
 <?php
 	/* $Id$ */
 
+	namespace Onphp\Test;
+
 	final class PrimitiveTimestampTZTest extends TestCase
 	{
 
 		public function testMarried()
 		{
-			$currentTimeZone = new DateTimeZone(date_default_timezone_get());
-			$now = new DateTime('now', $currentTimeZone);
+			$currentTimeZone = new \DateTimeZone(date_default_timezone_get());
+			$now = new \DateTime('now', $currentTimeZone);
 			$zone = $now->format('O');
 
-			$prm = Primitive::timestampTZ('test')->setComplex();
+			$prm = \Onphp\Primitive::timestampTZ('test')->setComplex();
 
 			$array = array(
 				'test' => array(
-					PrimitiveDate::DAY		=> '1',
-					PrimitiveDate::MONTH	=> '2',
-					PrimitiveDate::YEAR		=> '',
-					PrimitiveTimestamp::HOURS	=> '17',
-					PrimitiveTimestamp::MINUTES	=> '38',
-					PrimitiveTimestamp::SECONDS	=> '59',
-					PrimitiveTimestampTZ::ZONE => $currentTimeZone->getName(),
+					\Onphp\PrimitiveDate::DAY		=> '1',
+					\Onphp\PrimitiveDate::MONTH	=> '2',
+					\Onphp\PrimitiveDate::YEAR		=> '',
+					\Onphp\PrimitiveTimestamp::HOURS	=> '17',
+					\Onphp\PrimitiveTimestamp::MINUTES	=> '38',
+					\Onphp\PrimitiveTimestamp::SECONDS	=> '59',
+					\Onphp\PrimitiveTimestampTZ::ZONE => $currentTimeZone->getName(),
 				)
 			);
 
@@ -32,7 +34,7 @@ public function testMarried()
 			);
 
 			//not supported other epochs
-			$array['test'][PrimitiveDate::YEAR] = '3456';
+			$array['test'][\Onphp\PrimitiveDate::YEAR] = '3456';
 			$this->assertTrue($prm->import($array));
 			$this->assertEquals(3456, $prm->getValue()->getYear());
 			$this->assertEquals(17, $prm->getValue()->getHour());
@@ -42,7 +44,7 @@ public function testMarried()
 				$prm->exportValue()
 			);
 
-			$array['test'][PrimitiveDate::YEAR] = '2012';
+			$array['test'][\Onphp\PrimitiveDate::YEAR] = '2012';
 
 			$this->assertTrue($prm->import($array));
 			$this->assertEquals(
@@ -53,7 +55,7 @@ public function testMarried()
 
 		public function testSingle()
 		{
-			$prm = Primitive::timestampTZ('test')->setSingle();
+			$prm = \Onphp\Primitive::timestampTZ('test')->setSingle();
 
 			$array = array('test' => '1234-01-02 17:38:59');
 
diff --git a/test/core/PrimitiveTimestampTest.class.php b/test/core/PrimitiveTimestampTest.class.php
index 60cc6b3217..03dab3d3e8 100644
--- a/test/core/PrimitiveTimestampTest.class.php
+++ b/test/core/PrimitiveTimestampTest.class.php
@@ -1,20 +1,22 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class PrimitiveTimestampTest extends TestCase
 	{
 		public function testMarried()
 		{
-			$prm = Primitive::timestamp('test')->setComplex();
+			$prm = \Onphp\Primitive::timestamp('test')->setComplex();
 			
 			$array = array(
 				'test' => array(
-					PrimitiveDate::DAY		=> '1',
-					PrimitiveDate::MONTH	=> '2',
-					PrimitiveDate::YEAR		=> '',
-					PrimitiveTimestamp::HOURS	=> '17',
-					PrimitiveTimestamp::MINUTES	=> '38',
-					PrimitiveTimestamp::SECONDS	=> '59'
+					\Onphp\PrimitiveDate::DAY		=> '1',
+					\Onphp\PrimitiveDate::MONTH	=> '2',
+					\Onphp\PrimitiveDate::YEAR		=> '',
+					\Onphp\PrimitiveTimestamp::HOURS	=> '17',
+					\Onphp\PrimitiveTimestamp::MINUTES	=> '38',
+					\Onphp\PrimitiveTimestamp::SECONDS	=> '59'
 				)
 			);
 			
@@ -25,7 +27,7 @@ public function testMarried()
 				array_filter($prm->exportValue())
 			);
 			
-			$array['test'][PrimitiveDate::YEAR] = '3456';
+			$array['test'][\Onphp\PrimitiveDate::YEAR] = '3456';
 			
 			$this->assertTrue($prm->import($array));
 			$this->assertTrue($prm->getValue()->getYear() == 3456);
@@ -35,7 +37,7 @@ public function testMarried()
 				$prm->exportValue()
 			);
 			
-			$array['test'][PrimitiveDate::YEAR] = '2006';
+			$array['test'][\Onphp\PrimitiveDate::YEAR] = '2006';
 			
 			$this->assertTrue($prm->import($array));
 			$this->assertEquals(
@@ -49,18 +51,18 @@ public function testMarried()
 		public function testMarriedOptional()
 		{
 			$prm =
-				Primitive::timestamp('test')->
+				\Onphp\Primitive::timestamp('test')->
 				setComplex()->
 				optional();
 			
 			$array = array(
 				'test' => array(
-					PrimitiveDate::DAY		=> '',
-					PrimitiveDate::MONTH	=> '',
-					PrimitiveDate::YEAR		=> '',
-					PrimitiveTimestamp::HOURS	=> '',
-					PrimitiveTimestamp::MINUTES	=> '',
-					PrimitiveTimestamp::SECONDS	=> ''
+					\Onphp\PrimitiveDate::DAY		=> '',
+					\Onphp\PrimitiveDate::MONTH	=> '',
+					\Onphp\PrimitiveDate::YEAR		=> '',
+					\Onphp\PrimitiveTimestamp::HOURS	=> '',
+					\Onphp\PrimitiveTimestamp::MINUTES	=> '',
+					\Onphp\PrimitiveTimestamp::SECONDS	=> ''
 				)
 			);
 			
@@ -69,7 +71,7 @@ public function testMarriedOptional()
 		
 		public function testSingle()
 		{
-			$prm = Primitive::timestamp('test')->setSingle();
+			$prm = \Onphp\Primitive::timestamp('test')->setSingle();
 			
 			$array = array('test' => '1234-01-02 17:38:59');
 			
diff --git a/test/core/SequentialCacheTest.class.php b/test/core/SequentialCacheTest.class.php
index 31b975dfcd..e6a38f804d 100644
--- a/test/core/SequentialCacheTest.class.php
+++ b/test/core/SequentialCacheTest.class.php
@@ -9,23 +9,25 @@
  *                                                                          *
  ****************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class SequentialCacheTest extends TestCase
 	{
 		public function testMultiCacheAliveLast()
 		{
-			$alifePeer = new PeclMemcached("127.0.0.1", "11211"); //some existing memcached
+			$alifePeer = new \Onphp\PeclMemcached("127.0.0.1", "11211"); //some existing memcached
 			$alifePeer->set('some_key', 'some_value');
 			
-			$deadPeer = new SocketMemcached("165.42.42.42", "11211"); //some not existing memcache
+			$deadPeer = new \Onphp\SocketMemcached("165.42.42.42", "11211"); //some not existing memcache
 			
-			$slave1 = new PeclMemcached("35.143.65.241", "11211"); //some not existing memcache
+			$slave1 = new \Onphp\PeclMemcached("35.143.65.241", "11211"); //some not existing memcache
 
 			$slave2 =
-				AggregateCache::create()->
-				addPeer('dead', new PeclMemcached("165.34.176.221", "11211"))-> //some not existing memcache
-				addPeer('dead_too', new PeclMemcached("165.34.176.222", "11211")); //some not existing memcache
+				\Onphp\AggregateCache::create()->
+				addPeer('dead', new \Onphp\PeclMemcached("165.34.176.221", "11211"))-> //some not existing memcache
+				addPeer('dead_too', new \Onphp\PeclMemcached("165.34.176.222", "11211")); //some not existing memcache
 
-			$cache = new SequentialCache($deadPeer, array($slave1, $slave2, $alifePeer));
+			$cache = new \Onphp\SequentialCache($deadPeer, array($slave1, $slave2, $alifePeer));
 
 			$result = $cache->get("some_key");
 
@@ -34,14 +36,14 @@ public function testMultiCacheAliveLast()
 		
 		public function testMultiCacheAliveFirst()
 		{
-			$alifePeer = new SocketMemcached("127.0.0.1", "11211"); //some existing memcached
+			$alifePeer = new \Onphp\SocketMemcached("127.0.0.1", "11211"); //some existing memcached
 			$alifePeer->set('some_key', 'some_value');
 			
-			$slave1 = new PeclMemcached("35.143.65.241", "11211"); //some not existing memcache
+			$slave1 = new \Onphp\PeclMemcached("35.143.65.241", "11211"); //some not existing memcache
 
-			$slave2 = new PeclMemcached("165.34.176.221", "11211"); //some not existing memcache
+			$slave2 = new \Onphp\PeclMemcached("165.34.176.221", "11211"); //some not existing memcache
 
-			$cache = new SequentialCache($alifePeer, array($slave1, $slave1, $slave2));
+			$cache = new \Onphp\SequentialCache($alifePeer, array($slave1, $slave1, $slave2));
 
 			$result = $cache->get("some_key");
 
@@ -51,14 +53,14 @@ public function testMultiCacheAliveFirst()
 		public function testMultiCacheAliveOnly()
 		{
 			$alifePeer =
-				CyclicAggregateCache::create()-> //some existing memcached
+				\Onphp\CyclicAggregateCache::create()-> //some existing memcached
 				setSummaryWeight(42)->
-				addPeer('first', new PeclMemcached("127.0.0.1", "11211"), 0)->
-				addPeer('second', new SocketMemcached("127.0.0.1", "11211"), 21);
+				addPeer('first', new \Onphp\PeclMemcached("127.0.0.1", "11211"), 0)->
+				addPeer('second', new \Onphp\SocketMemcached("127.0.0.1", "11211"), 21);
 			
 			$alifePeer->set('some_key', 'some_value');
 			
-			$cache = new SequentialCache($alifePeer);
+			$cache = new \Onphp\SequentialCache($alifePeer);
 
 			$result = $cache->get("some_key");
 
@@ -70,10 +72,10 @@ public function testMultiCacheAliveOnly()
 		 */
 		public function testMultiCacheNoAlive()
 		{
-			$dead1 = new PeclMemcached("35.143.65.241", "11211", 0.01);	//some not existing memcache
-			$dead2 = new PeclMemcached("165.34.176.221", "11211", 0.01);	//some not existing memcache
+			$dead1 = new \Onphp\PeclMemcached("35.143.65.241", "11211", 0.01);	//some not existing memcache
+			$dead2 = new \Onphp\PeclMemcached("165.34.176.221", "11211", 0.01);	//some not existing memcache
 			
-			$cache = new SequentialCache($dead1, array($dead2));
+			$cache = new \Onphp\SequentialCache($dead1, array($dead2));
 
 			$result = $cache->get("some_key");	//will throw RuntimeException
 		}
diff --git a/test/core/SingletonTest.class.php b/test/core/SingletonTest.class.php
index e57dbbe3b9..fa4db86a77 100644
--- a/test/core/SingletonTest.class.php
+++ b/test/core/SingletonTest.class.php
@@ -1,46 +1,48 @@
 <?php
 	/* $Id$ */
 	
-	final class SingletonTestInstance extends Singleton {/*_*/}
+	namespace Onphp\Test;
+
+	final class SingletonTestInstance extends \Onphp\Singleton {/*_*/}
 	
-	final class SingletonSingleArgumentTestInstance extends Singleton
+	final class SingletonSingleArgumentTestInstance extends \Onphp\Singleton
 	{
 		protected function __construct($arg1) { /*_*/ }
 	}
 	
-	final class SingletonMultiArgumentTestInstance extends Singleton
+	final class SingletonMultiArgumentTestInstance extends \Onphp\Singleton
 	{
 		protected function __construct($arg1, $arg2, $arg3 = null) { /*_*/ }
 	}
 	
 	final class SingletonTest extends TestCase
 	{
-		const CLASS_NAME		= 'SingletonTestInstance';
-		const SINGLE_CLASS_NAME	= 'SingletonSingleArgumentTestInstance';
-		const MULTI_CLASS_NAME	= 'SingletonMultiArgumentTestInstance';
+		const CLASS_NAME		= '\Onphp\Test\SingletonTestInstance';
+		const SINGLE_CLASS_NAME	= '\Onphp\Test\SingletonSingleArgumentTestInstance';
+		const MULTI_CLASS_NAME	= '\Onphp\Test\SingletonMultiArgumentTestInstance';
 		
 		public function testFactoryLikeCall()
 		{
 			$this->assertSameInstances(
 				self::CLASS_NAME,
-				Singleton::getInstance(self::CLASS_NAME),
-				Singleton::getInstance(self::CLASS_NAME)
+				\Onphp\Singleton::getInstance(self::CLASS_NAME),
+				\Onphp\Singleton::getInstance(self::CLASS_NAME)
 			);
 		}
 		
 		public function testNonSingletonChilds()
 		{
 			try {
-				Singleton::getInstance('Ternary');
+				\Onphp\Singleton::getInstance('\Onphp\Ternary');
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 		}
 		
 		public function testCreationProhibition()
 		{
-			$child = new ReflectionClass(self::CLASS_NAME);
+			$child = new \ReflectionClass(self::CLASS_NAME);
 			
 			$this->assertFalse(
 				$child->getMethod('__construct')->isPublic()
@@ -68,40 +70,40 @@ public function testArguments()
 		{
 			// cleaning up
 			try {
-				Singleton::dropInstance(self::SINGLE_CLASS_NAME);
-			} catch (MissingElementException $e) {
+				\Onphp\Singleton::dropInstance(self::SINGLE_CLASS_NAME);
+			} catch (\Onphp\MissingElementException $e) {
 				// that's ok for the first pass
 			}
 			
 			try {
-				Singleton::getInstance(self::SINGLE_CLASS_NAME);
+				\Onphp\Singleton::getInstance(self::SINGLE_CLASS_NAME);
 				$this->fail();
-			} catch (BaseException $e) {
+			} catch (\Onphp\BaseException $e) {
 				// pass
 			}
 			
 			$this->assertSameInstances(
 				self::SINGLE_CLASS_NAME,
-				Singleton::getInstance(self::SINGLE_CLASS_NAME, 'val1'),
-				Singleton::getInstance(self::SINGLE_CLASS_NAME, 'val2')
+				\Onphp\Singleton::getInstance(self::SINGLE_CLASS_NAME, 'val1'),
+				\Onphp\Singleton::getInstance(self::SINGLE_CLASS_NAME, 'val2')
 			);
 			
 			$this->assertSameInstances(
 				self::MULTI_CLASS_NAME,
-				Singleton::getInstance(self::MULTI_CLASS_NAME, 'val1', 'val2', 'val3'),
-				Singleton::getInstance(self::MULTI_CLASS_NAME, 'val1', 'val2')
+				\Onphp\Singleton::getInstance(self::MULTI_CLASS_NAME, 'val1', 'val2', 'val3'),
+				\Onphp\Singleton::getInstance(self::MULTI_CLASS_NAME, 'val1', 'val2')
 			);
 		}
 		
 		private function assertSameInstances(
 			$className,
-			Singleton $instance1,
-			Singleton $instance2
+			\Onphp\Singleton $instance1,
+			\Onphp\Singleton $instance2
 		)
 		{
 			$this->assertTrue($instance1 === $instance2);
 			
-			$all = Singleton::getAllInstances();
+			$all = \Onphp\Singleton::getAllInstances();
 			$this->assertTrue($instance1 === $all[$className]);
 		}
 	}
diff --git a/test/core/TaggableSmartHandlerTest.class.php b/test/core/TaggableSmartHandlerTest.class.php
new file mode 100644
index 0000000000..853cc2d8ef
--- /dev/null
+++ b/test/core/TaggableSmartHandlerTest.class.php
@@ -0,0 +1,160 @@
+<?php
+
+	namespace Onphp\Test;
+
+	use Onphp\Criteria;
+	use Onphp\DBValue;
+	use Onphp\Expression;
+	use Onphp\ImaginaryDialect;
+	use Onphp\TaggableSmartHandler;
+
+	final class TaggableSmartHandlerTest extends TestCase
+	{
+		public function testTableLazyList()
+		{
+			$criteria = Criteria::create(TestLazy::dao());
+			
+			$this->assertEquals(
+				array(TestLazy::dao()->getTable()),
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestLazy')
+			);
+		}
+		
+		public function testTableLazyListById()
+		{
+			$criteria = Criteria::create(TestLazy::dao())
+				->add(Expression::eq('id', DBValue::create('33')));
+			
+			$expectTags = array(
+				TestLazy::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'33',
+			);
+			$this->assertEquals(
+				$expectTags,
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestLazy')
+			);
+		}
+		
+		public function testTableLazyListByCities()
+		{
+			$criteria = Criteria::create(TestLazy::dao())
+				->add(Expression::eq('city', DBValue::create('1')))
+				->add(Expression::eq(DBValue::create('2'), 'cityOptional.id'));
+			
+			$expectTags = array(
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'1',
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'2',
+			);
+			$this->assertEquals(
+				$expectTags,
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestLazy')
+			);
+		}
+		
+		public function testTableLazyListByCityName()
+		{	
+			$criteria = Criteria::create(TestLazy::dao())
+				->add(Expression::eq('city.name', 'Moscow'));
+			
+			$expectTags = array(
+				TestLazy::dao()->getTable(),
+				TestCity::dao()->getTable(),
+			);
+			$this->assertEquals(
+				$expectTags,
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestLazy')
+			);
+		}
+		
+		public function testTableUserListFetchedWithJoins()
+		{
+			$criteria = Criteria::create(TestUser::dao());
+			
+			$expectTags = array(
+				TestUser::dao()->getTable(),
+				TestCity::dao()->getTable(),
+				TestCity::dao()->getTable(),
+				TestCity::dao()->getTable(),
+			);
+			$this->assertEquals(
+				$expectTags,
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestUser')
+			);
+		}
+
+		public function testTableLazyThroughValueObject()
+		{
+			$criteria = Criteria::create(TestUserWithContact::dao())
+				->add(Expression::eq('contacts.city.id', DBValue::create('3')));
+			
+			$expectTags = array(
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'3',
+			);
+			
+			$this->assertEquals(
+				$expectTags,
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestUserWithContact')
+			);
+		}
+
+		public function testTableLazyListInCities()
+		{
+			$criteria = Criteria::create(TestLazy::dao())
+				->add(Expression::in('city', array('1', '2', '42')));
+			
+			$expectTags = array(
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'1',
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'2',
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'42',
+			);
+			$this->assertEquals(
+				$expectTags,
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestLazy')
+			);
+		}
+
+		public function testTableLazyListInCitiesWithId()
+		{
+			$criteria = Criteria::create(TestLazy::dao())
+				->add(Expression::in('city.id', array('1', '2', '42')));
+
+			$expectTags = array(
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'1',
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'2',
+				TestCity::dao()->getTable().TaggableSmartHandler::ID_POSTFIX.'42',
+			);
+			$this->assertEquals(
+				$expectTags,
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestLazy')
+			);
+		}
+
+		/**
+		 * @group tzz1
+		 */
+		public function testOneToManyBack()
+		{
+			$criteria = Criteria::create(TestUser::dao())
+				->add(Expression::eq('parts.id', '1'));
+
+			$expectTags = array(
+				TestUser::dao()->getTable(),
+				TestPart::dao()->getTable(),
+				TestCity::dao()->getTable(),
+				TestCity::dao()->getTable(),
+				TestCity::dao()->getTable(),
+			);
+			$this->assertEquals(
+				$expectTags,
+				$this->spawnHandler()->getQueryTags($criteria->toSelectQuery(), '\Onphp\Test\TestUser')
+			);
+		}
+		
+		/**
+		 * @return TaggableSmartHandler 
+		 */
+		private function spawnHandler()
+		{
+			return new TaggableSmartHandler();
+		}
+	}
+?>
\ No newline at end of file
diff --git a/test/core/TimestampTZTest.class.php b/test/core/TimestampTZTest.class.php
index 46e204d642..d350195e3c 100644
--- a/test/core/TimestampTZTest.class.php
+++ b/test/core/TimestampTZTest.class.php
@@ -1,38 +1,37 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class TimestampTZTest extends TestCase
 	{
-		/**
-		 * @group ff
-		 */
 		public function testDifferentZones()
 		{
-			$someDate = TimestampTZ::create('2011-01-01 12:10:10 Europe/Moscow');
+			$someDate = \Onphp\TimestampTZ::create('2011-01-01 12:10:10 Europe/Moscow');
 			$this->assertEquals(
-				'2011-01-01 12:10:10+0300',
+				'2011-01-01 12:10:10',
 				$someDate->toTimestamp('Europe/Moscow')->toString()
 			);
 
 			$this->assertEquals(
-				$someDate->toTimestamp('Europe/London')->toString(),
-				'2011-01-01 09:10:10+0000'
+				'2011-01-01 09:10:10',
+				$someDate->toTimestamp('Europe/London')->toString()
 			);
 			
-			$moscowTime = TimestampTZ::create('2011-01-01 00:00:00 Europe/Moscow');
-			$londonTime = TimestampTZ::create('2010-12-31 21:00:00 Europe/London');
+			$moscowTime = \Onphp\TimestampTZ::create('2011-01-01 00:00:00 Europe/Moscow');
+			$londonTime = \Onphp\TimestampTZ::create('2010-12-31 21:00:00 Europe/London');
 			
-			$this->assertEquals(0, TimestampTZ::compare($moscowTime, $londonTime));
+			$this->assertEquals(0, \Onphp\TimestampTZ::compare($moscowTime, $londonTime));
 			
 			$moscowTime->modify('+ 1 second');
-			$this->assertEquals(TimestampTZ::compare($moscowTime, $londonTime), 1);
+			$this->assertEquals(1, \Onphp\TimestampTZ::compare($moscowTime, $londonTime));
 			$moscowTime->modify('- 2 second');
-			$this->assertEquals(TimestampTZ::compare($moscowTime, $londonTime), -1);
+			$this->assertEquals(-1, \Onphp\TimestampTZ::compare($moscowTime, $londonTime));
 			
 			
 			$this->assertEquals(
-				$moscowTime->toTimestamp('Europe/Moscow')->toString(),
-				'2010-12-31 23:59:59+0300'
+				'2010-12-31 23:59:59',
+				$moscowTime->toTimestamp('Europe/Moscow')->toString()
 			);
 		}
 		
@@ -42,13 +41,13 @@ public function testDifferentZones()
 		public function testDialect()
 		{
 			//setup
-			$someDate = TimestampTZ::create('2012-02-23 12:12:12 GMT');
+			$someDate = \Onphp\TimestampTZ::create('2012-02-23 12:12:12 GMT');
 			//expectation
 			$expectation = $someDate->toTimestamp()->toString();
 			
 			//check
 			$this->assertEquals(
-				$someDate->toDialectString(ImaginaryDialect::me()),
+				$someDate->toDialectString(\Onphp\ImaginaryDialect::me()),
 				$expectation
 			);
 		}
@@ -57,10 +56,10 @@ public function testDialect()
 		 * @group ff
 		 */
 		public function testSleeping() {
-			$time = TimestampTZ::create('2011-03-08 12:12:12 PST');
+			$time = \Onphp\TimestampTZ::create('2011-03-08 12:12:12 PST');
 			$sleepedTime = unserialize(serialize($time));
 			
-			$this->assertEquals(TimestampTZ::compare($time, $sleepedTime), 0);
+			$this->assertEquals(\Onphp\TimestampTZ::compare($time, $sleepedTime), 0);
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/test/core/TimestampTest.class.php b/test/core/TimestampTest.class.php
index 5dcb3a7632..aacb1b3721 100644
--- a/test/core/TimestampTest.class.php
+++ b/test/core/TimestampTest.class.php
@@ -1,19 +1,21 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class TimestampTest extends TestCase
 	{
 		public function testNonEpoch()
 		{
 			$future = '4683-03-04';
-			$after = new Timestamp($future);
+			$after = new \Onphp\Timestamp($future);
 			
 			$this->assertEquals('04', $after->getDay());
 			$this->assertEquals('03', $after->getMonth());
 			$this->assertEquals('4683', $after->getYear());
 			
 			$past = '1234-04-03';
-			$before = new Timestamp($past);
+			$before = new \Onphp\Timestamp($past);
 			
 			$this->assertEquals('03', $before->getDay());
 			$this->assertEquals('04', $before->getMonth());
@@ -29,7 +31,7 @@ public function testNonEpoch()
 			$this->assertEquals($past.$time, $before->toDateTime());
 
 			$past = '1-04-03';
-			$before = new Timestamp($past);
+			$before = new \Onphp\Timestamp($past);
 
 			$this->assertEquals('03', $before->getDay());
 			$this->assertEquals('04', $before->getMonth());
@@ -39,7 +41,7 @@ public function testNonEpoch()
 			);
 
 			$past = '14-01-02';
-			$before = new Timestamp($past);
+			$before = new \Onphp\Timestamp($past);
 
 			$this->assertEquals('02', $before->getDay());
 			$this->assertEquals('01', $before->getMonth());
@@ -49,7 +51,7 @@ public function testNonEpoch()
 			);
 
 			$past = '113-01-02';
-			$before = new Timestamp($past);
+			$before = new \Onphp\Timestamp($past);
 
 			$this->assertEquals('02', $before->getDay());
 			$this->assertEquals('01', $before->getMonth());
@@ -62,30 +64,30 @@ public function testNonEpoch()
 		public function testInvalidTimestamp()
 		{
 			try {
-				new Timestamp('2007-0-0');
+				new \Onphp\Timestamp('2007-0-0');
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 			
 			try {
-				new Timestamp('2007-00-00');
+				new \Onphp\Timestamp('2007-00-00');
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 			
 			try {
-				new Timestamp('2007-01-00');
+				new \Onphp\Timestamp('2007-01-00');
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 			
 			try {
-				new Timestamp('2007-00-01');
+				new \Onphp\Timestamp('2007-00-01');
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 		}
@@ -93,10 +95,10 @@ public function testInvalidTimestamp()
 		public function testCornerCases()
 		{
 			try {
-				Date::create('2007-10-0');
+				\Onphp\Date::create('2007-10-0');
 				
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 		}
@@ -104,8 +106,8 @@ public function testCornerCases()
 		public function testTimestampNow()
 		{
 			try {
-				Timestamp::create('now');
-			} catch (WrongArgumentException $e) {
+				\Onphp\Timestamp::create('now');
+			} catch (\Onphp\WrongArgumentException $e) {
 				$this->fail($e->getMessage());
 			}
 		}
@@ -113,15 +115,15 @@ public function testTimestampNow()
 		public function testDateNow()
 		{
 			try {
-				Date::create('now');
-			} catch (WrongArgumentException $e) {
+				\Onphp\Date::create('now');
+			} catch (\Onphp\WrongArgumentException $e) {
 				$this->fail($e->getMessage());
 			}
 		}
 
 		public function testStartHour()
 		{
-			$stamp = Timestamp::create('2010-03-25 14:15:10');
+			$stamp = \Onphp\Timestamp::create('2010-03-25 14:15:10');
 			
 			$this->assertNotEquals(
 				$stamp->toStamp(),
@@ -129,19 +131,19 @@ public function testStartHour()
 			);
 			
 			$this->assertTrue(
-				Timestamp::create($stamp->getHourStartStamp())
-				instanceof Timestamp
+				\Onphp\Timestamp::create($stamp->getHourStartStamp())
+				instanceof \Onphp\Timestamp
 			);
 			
 			$this->assertEquals(
-				Timestamp::create($stamp->getHourStartStamp())->toString(),
+				\Onphp\Timestamp::create($stamp->getHourStartStamp())->toString(),
 				'2010-03-25 14:00:00'
 			);
 		}
 
 		public function testSleeping()
 		{
-			$stamp = Timestamp::makeNow();
+			$stamp = \Onphp\Timestamp::makeNow();
 
 			$serializedStamp = serialize($stamp);
 
@@ -154,7 +156,7 @@ public function testSleeping()
 			$this->assertEquals($stamp->getMinute(), $unserializedStamp->getMinute());
 			$this->assertEquals($stamp->getSecond(), $unserializedStamp->getSecond());
 
-			$stamp = Timestamp::create('2039-01-05 12:14:05 Europe/Moscow');
+			$stamp = \Onphp\Timestamp::create('2039-01-05 12:14:05 Europe/Moscow');
 
 			$serializedStamp = serialize($stamp);
 
@@ -167,7 +169,7 @@ public function testSleeping()
 			$this->assertEquals($stamp->getMinute(), $unserializedStamp->getMinute());
 			$this->assertEquals($stamp->getSecond(), $unserializedStamp->getSecond());
 
-			$stamp = Timestamp::create('1899-12-31 16:07:45 Europe/London');
+			$stamp = \Onphp\Timestamp::create('1899-12-31 16:07:45 Europe/London');
 
 			$serializedStamp = serialize($stamp);
 
diff --git a/test/core/TruncateQueryTest.class.php b/test/core/TruncateQueryTest.class.php
index d43d4db9f5..fe59db2e34 100644
--- a/test/core/TruncateQueryTest.class.php
+++ b/test/core/TruncateQueryTest.class.php
@@ -1,25 +1,27 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class TruncateQueryTest extends TestCaseDB
 	{
 		public function testQuery()
 		{
-			$pgDialect = $this->getDbByType('PgSQL')->getDialect();
-			$myDialect = $this->getDbByType('MySQL')->getDialect();
-			$liteDialect = $this->getDbByType('SQLitePDO')->getDialect();
+			$pgDialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
+			$myDialect = $this->getDbByType('\Onphp\MySQL')->getDialect();
+			$liteDialect = $this->getDbByType('\Onphp\SQLitePDO')->getDialect();
 			
-			$query = OSQL::truncate('single_table');
+			$query = \Onphp\OSQL::truncate('single_table');
 			
 			try {
-				OSQL::truncate()->toDialectString(ImaginaryDialect::me());
+				\Onphp\OSQL::truncate()->toDialectString(\Onphp\ImaginaryDialect::me());
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 			
 			$this->assertEquals(
-				$query->toDialectString(ImaginaryDialect::me()),
+				$query->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'DELETE FROM single_table;'
 			);
 			
@@ -38,10 +40,10 @@ public function testQuery()
 				'TRUNCATE TABLE `single_table`;'
 			);
 			
-			$query = OSQL::truncate(array('foo', 'bar', 'bleh'));
+			$query = \Onphp\OSQL::truncate(array('foo', 'bar', 'bleh'));
 			
 			$this->assertEquals(
-				$query->toDialectString(ImaginaryDialect::me()),
+				$query->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'DELETE FROM foo; DELETE FROM bar; DELETE FROM bleh;'
 			);
 			
diff --git a/test/core/UnionTest.class.php b/test/core/UnionTest.class.php
index f80ecff13c..615bcc2385 100644
--- a/test/core/UnionTest.class.php
+++ b/test/core/UnionTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class UnionTest extends TestCaseDB
 	{
 		private $singleUnion 		= null;
@@ -13,52 +15,52 @@ final class UnionTest extends TestCaseDB
 		
 		public function setUp()
 		{
-			$left = OSQL::select()->
+			$left = \Onphp\OSQL::select()->
 				from('leftTable')->
 				get('a')->
 				get('b', 'c');
 				
-			$middle = OSQL::select()->
+			$middle = \Onphp\OSQL::select()->
 				from('middleTable')->
 				get('a')->
 				get('c');
 				
-			$right = OSQL::select()->
+			$right = \Onphp\OSQL::select()->
 				from('rightTable')->
 				get('d', 'a')->
 				get('c');
 			
-			$this->singleUnion = CombineQuery::union($left, $right);
-			$this->singleUnionAll = CombineQuery::unionAll($left, $right);
+			$this->singleUnion = \Onphp\CombineQuery::union($left, $right);
+			$this->singleUnionAll = \Onphp\CombineQuery::unionAll($left, $right);
 			
-			$this->singleIntersect = CombineQuery::intersect($left, $right);
-			$this->singleIntersectAll = CombineQuery::intersectAll(
+			$this->singleIntersect = \Onphp\CombineQuery::intersect($left, $right);
+			$this->singleIntersectAll = \Onphp\CombineQuery::intersectAll(
 				$left,
 				$right
 			);
 			
-			$this->singleExcept = CombineQuery::except($left, $right);
-			$this->singleExceptAll = CombineQuery::exceptAll($left, $right);
+			$this->singleExcept = \Onphp\CombineQuery::except($left, $right);
+			$this->singleExceptAll = \Onphp\CombineQuery::exceptAll($left, $right);
 			
-			$this->blockUnion = CombineQuery::unionBlock(
+			$this->blockUnion = \Onphp\CombineQuery::unionBlock(
 				$left,
 				$middle,
 				$right
 			);
-			$this->blockUnionAll = CombineQuery::unionAllBlock(
+			$this->blockUnionAll = \Onphp\CombineQuery::unionAllBlock(
 				$left,
 				$middle,
 				$right
 			);
 			
-			$this->limitedOrderedUnion = CombineQuery::union($left, $right)->
+			$this->limitedOrderedUnion = \Onphp\CombineQuery::union($left, $right)->
 				orderBy('a')->
 				limit(2, 3);
 		}
 			
 		public function testPostgresql()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
 			$this->assertEquals(
 				$this->singleUnion->toDialectString($dialect),
diff --git a/test/db/CacheAndLazyDBTest.class.php b/test/db/CacheAndLazyDBTest.class.php
index 42d4a17f2e..ebe0bb2180 100644
--- a/test/db/CacheAndLazyDBTest.class.php
+++ b/test/db/CacheAndLazyDBTest.class.php
@@ -1,11 +1,11 @@
 <?php
+	namespace Onphp\Test;
+
 	class CacheAndLazyDBTest extends TestCaseDAO
 	{
 		public function testWorkingWithCache()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
-				
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$item =
 					TestItem::create()->
 					setName('testItem1');
@@ -34,7 +34,7 @@ public function testWorkingWithCache()
 				TestSubItem::dao()->add($subItem2);
 				
 				$items =
-					Criteria::create(TestItem::dao())->
+					\Onphp\Criteria::create(TestItem::dao())->
 					getList();
 				
 				foreach ($items as $item) {
@@ -58,7 +58,7 @@ public function testWorkingWithCache()
 				TestItem::dao()->dropIdentityMap();
 				
 				$items =
-					Criteria::create(TestItem::dao())->
+					\Onphp\Criteria::create(TestItem::dao())->
 					getList();
 				
 				foreach ($items as $item) {
@@ -88,7 +88,7 @@ public function testWorkingWithCache()
 				TestItem::dao()->dropIdentityMap();
 				
 				$subItems =
-					Criteria::create(TestSubItem::dao())->
+					\Onphp\Criteria::create(TestSubItem::dao())->
 					getList();
 				
 				foreach ($subItems as $subItem) {
@@ -102,23 +102,21 @@ public function testWorkingWithCache()
 		
 		public function testLazy()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
-				
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$parent = TestParentObject::create();
-				$child = TestChildObject::create()->setParent($parent);
 
 				$parent->dao()->add($parent);
 
+				$child = TestChildObject::create()->setParent($parent);
 				$child->dao()->add($child);
 
 				$this->assertEquals(
 					$parent->getId(),
-					Criteria::create(TestChildObject::dao())->
+					\Onphp\Criteria::create(TestChildObject::dao())->
 						setProjection(
-							Projection::property('parent.id', 'parentId')
+							\Onphp\Projection::property('parent.id', 'parentId')
 						)->
-						add(Expression::eq('id', $child->getId()))->
+						add(\Onphp\Expression::eq('id', $child->getId()))->
 						getCustom('parentId')
 				);
 			}
diff --git a/test/db/CountAndUnifiedDBTest.class.php b/test/db/CountAndUnifiedDBTest.class.php
index 31c0b8dab4..71d541ce6d 100644
--- a/test/db/CountAndUnifiedDBTest.class.php
+++ b/test/db/CountAndUnifiedDBTest.class.php
@@ -1,21 +1,22 @@
 <?php
+	namespace Onphp\Test;
+
 	class CountAndUnifiedDBTest extends TestCaseDAO
 	{
 		public function testUnified()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$this->getDBCreator()->fillDB();
 				
 				$this->unified();
 				
-				Cache::me()->clean();
+				\Onphp\Cache::me()->clean();
 				
 				TestUser::dao()->dropById(1);
 				try {
 					TestUser::dao()->dropByIds(array(1, 2));
 					$this->fail();
-				} catch (WrongStateException $e) {
+				} catch (\Onphp\WrongStateException $e) {
 					// ok
 				}
 			}
@@ -23,8 +24,7 @@ public function testUnified()
 		
 		public function testCount()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$this->getDBCreator()->fillDB();
 				
 				$count = TestUser::dao()->getTotalCount();
@@ -44,10 +44,10 @@ public function testCount()
 						setPassword(sha1('newuser'))
 					)->
 					setLastLogin(
-						Timestamp::create(time())
+						\Onphp\Timestamp::create(time())
 					)->
 					setRegistered(
-						Timestamp::create(time())
+						\Onphp\Timestamp::create(time())
 					);
 				
 				TestUser::dao()->add($newUser);
@@ -101,9 +101,9 @@ public function unified()
 			
 			$this->assertEquals($user->getEncapsulants()->getCount(), 10);
 			
-			$criteria = Criteria::create(TestEncapsulant::dao())->
+			$criteria = \Onphp\Criteria::create(TestEncapsulant::dao())->
 				add(
-					Expression::in(
+					\Onphp\Expression::in(
 						'cities.id',
 						array($piter->getId(), $moscow->getId())
 					)
@@ -121,7 +121,7 @@ public function unified()
 					setDistinct(true)
 			);
 			
-			if (DBPool::me()->getLink() instanceof SQLite)
+			if (\Onphp\DBPool::me()->getLink() instanceof \Onphp\SQLite)
 				// TODO: sqlite does not support such queries yet
 				return null;
 			
diff --git a/test/db/CriteriaDBTest.class.php b/test/db/CriteriaDBTest.class.php
index e7346c76c4..bb0ed953e2 100644
--- a/test/db/CriteriaDBTest.class.php
+++ b/test/db/CriteriaDBTest.class.php
@@ -1,17 +1,17 @@
 <?php
+	namespace Onphp\Test;
+
 	class CriteriaDBTest extends TestCaseDAO
 	{
 		public function testCriteria()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				/* @var $db DB */
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$this->getDBCreator()->fillDB();
 
-				$queryResult = Criteria::create(TestCity::dao())->getResult();
+				$queryResult = \Onphp\Criteria::create(TestCity::dao())->getResult();
 				$this->assertEquals(2, $queryResult->getCount());
 
-				Cache::me()->clean();
+				\Onphp\Cache::me()->clean();
 			}
 		}
 	}
diff --git a/test/db/DataDBTest.class.php b/test/db/DataDBTest.class.php
index 5a3c3d048c..436ff86288 100644
--- a/test/db/DataDBTest.class.php
+++ b/test/db/DataDBTest.class.php
@@ -1,14 +1,15 @@
 <?php
+	namespace Onphp\Test;
+
 	class DataDBTest extends TestCaseDAO
 	{
 		public function testData()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$this->getDBCreator()->fillDB($this);
 				
 				$this->getSome(); // 41!
-				Cache::me()->clean();
+				\Onphp\Cache::me()->clean();
 				$this->getSome();
 				
 				$this->nonIntegerIdentifier();
@@ -21,28 +22,26 @@ public function testData()
 		
 		public function testBoolean()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
-				
+			foreach (DBTestPool::me()->iterator() as $db) {
 				//creating moscow
 				$moscow = TestCity::create()->setName('Moscow');
 				$moscow = $moscow->dao()->add($moscow);
 				$moscowId = $moscow->getId();
-				/* @var $moscow TestCity */
+				/* @var $moscow \Onphp\Test\TestCity */
 				
 				//now moscow capital
 				$moscow->dao()->merge($moscow->setCapital(true));
 				TestCity::dao()->dropIdentityMap();
 				
-				Criteria::create(TestCity::dao())->
+				\Onphp\Criteria::create(TestCity::dao())->
 					setSilent(false)->
-					add(Expression::isTrue('capital'))->
+					add(\Onphp\Expression::isTrue('capital'))->
 					get();
 				TestCity::dao()->dropIdentityMap();
 				
-				$moscow = Criteria::create(TestCity::dao())->
+				$moscow = \Onphp\Criteria::create(TestCity::dao())->
 					setSilent(false)->
-					add(Expression::isNull('large'))->
+					add(\Onphp\Expression::isNull('large'))->
 					get();
 				TestCity::dao()->dropIdentityMap();
 				
@@ -54,9 +53,9 @@ public function testBoolean()
 				$this->assertTrue($moscow->getCapital());
 				$this->assertTrue($moscow->getLarge());
 				
-				Criteria::create(TestCity::dao())->
+				\Onphp\Criteria::create(TestCity::dao())->
 					setSilent(false)->
-					add(Expression::not(Expression::isFalse('large')))->
+					add(\Onphp\Expression::not(\Onphp\Expression::isFalse('large')))->
 					get();
 				TestCity::dao()->dropIdentityMap();
 			}
@@ -94,7 +93,7 @@ private function getSome()
 			for ($i = 1; $i < 3; ++$i) {
 				$this->assertTrue(
 					TestUser::dao()->getByLogic(
-						Expression::eq('city_id', $i)
+						\Onphp\Expression::eq('city_id', $i)
 					)
 					== TestUser::dao()->getById($i)
 				);
@@ -118,14 +117,14 @@ private function nonIntegerIdentifier()
 			
 			try {
 				TestBinaryStuff::dao()->import($bin);
-			} catch (DatabaseException $e) {
+			} catch (\Onphp\DatabaseException $e) {
 				return $this->fail($e->getMessage());
 			}
 			
 			TestBinaryStuff::dao()->dropIdentityMap();
-			Cache::me()->clean();
+			\Onphp\Cache::me()->clean();
 			
-			$prm = Primitive::prototypedIdentifier('TestBinaryStuff', 'id');
+			$prm = \Onphp\Primitive::prototypedIdentifier('\Onphp\Test\TestBinaryStuff', 'id');
 			
 			$this->assertTrue($prm->import(array('id' => $id)));
 			$this->assertSame($prm->getValue()->getId(), $id);
@@ -135,10 +134,10 @@ private function nonIntegerIdentifier()
 			$this->assertEquals($binLoaded->getData(), $binaryData);
 			$this->assertEquals(TestBinaryStuff::dao()->dropById($id), 1);
 			
-			$integerIdPrimitive = Primitive::prototypedIdentifier('TestUser');
+			$integerIdPrimitive = \Onphp\Primitive::prototypedIdentifier('\Onphp\Test\TestUser');
 			try {
 				$integerIdPrimitive->import(array('id' => 'string-instead-of-integer'));
-			} catch (DatabaseException $e) {
+			} catch (\Onphp\DatabaseException $e) {
 				return $this->fail($e->getMessage());
 			}
 		}
@@ -154,7 +153,7 @@ private function racySave()
 				TestCity::dao()->save($lost);
 				
 				$this->fail();
-			} catch (WrongStateException $e) {
+			} catch (\Onphp\WrongStateException $e) {
 				/* pass */
 			}
 		}
@@ -175,7 +174,7 @@ private function binaryTest()
 			
 			$stuff = $stuff->dao()->import($stuff);
 			
-			Cache::me()->clean();
+			\Onphp\Cache::me()->clean();
 			
 			$this->assertEquals(
 				TestBinaryStuff::dao()->getById($id)->getData(),
@@ -194,13 +193,13 @@ private function lazyTest()
 					setCity($city)->
 					setCityOptional($city)->
 					setEnum(
-						new ImageType(ImageType::getAnyId())
+						new \Onphp\ImageType(\Onphp\ImageType::getAnyId())
 					)->setStaticEnum(
-						new MimeType(MimeType::getAnyId())
+						new \Onphp\MimeType(\Onphp\MimeType::getAnyId())
 					)
 			);
 			
-			Cache::me()->clean();
+			\Onphp\Cache::me()->clean();
 			
 			$form = TestLazy::proto()->makeForm();
 			$form->import(
@@ -209,12 +208,12 @@ private function lazyTest()
 			
 			$this->assertNotNull($form->getValue('id'));
 			
-			FormUtils::object2form($object, $form);
+			\Onphp\FormUtils::object2form($object, $form);
 			
 			foreach ($object->proto()->getPropertyList() as $name => $property) {
 				if (
-					$property->getRelationId() == MetaRelation::ONE_TO_ONE
-					&& $property->getFetchStrategyId() == FetchStrategy::LAZY
+					$property->getRelationId() == \Onphp\MetaRelation::ONE_TO_ONE
+					&& $property->getFetchStrategyId() == \Onphp\FetchStrategy::LAZY
 				) {
 					$this->assertEquals(
 						$object->{$property->getGetter()}(),
diff --git a/test/db/HstoreDBTest.class.php b/test/db/HstoreDBTest.class.php
index a499f5fd48..9018e58e18 100644
--- a/test/db/HstoreDBTest.class.php
+++ b/test/db/HstoreDBTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	class HstoreDBTest extends TestCaseDAO
 	{
 		/**
@@ -7,8 +9,7 @@ class HstoreDBTest extends TestCaseDAO
 		**/
 		public function testHstore()
 		{
-			foreach (DBTestPool::me()->getPool() as $connector => $db) {
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$properties = array(
 					'age' => '23',
 					'weight' => 80,
@@ -27,23 +28,23 @@ public function testHstore()
 						setPassword(sha1('passwd'))
 					)->
 					setLastLogin(
-						Timestamp::create(time())
+						\Onphp\Timestamp::create(time())
 					)->
 					setRegistered(
-						Timestamp::create(time())->modify('-1 day')
+						\Onphp\Timestamp::create(time())->modify('-1 day')
 					)->
-					setProperties(Hstore::make($properties));
+					setProperties(\Onphp\Hstore::make($properties));
 
 				$moscow = TestCity::dao()->add($moscow);
 
 				$user = TestUser::dao()->add($user);
 
-				Cache::me()->clean();
+				\Onphp\Cache::me()->clean();
 				TestUser::dao()->dropIdentityMap();
 
 				$user = TestUser::dao()->getById('1');
 
-				$this->assertInstanceOf('Hstore', $user->getProperties());
+				$this->assertInstanceOf('\Onphp\Hstore', $user->getProperties());
 
 				$this->assertEquals(
 					$properties,
@@ -55,9 +56,9 @@ public function testHstore()
 				$form->get('properties')->
 					setFormMapping(
 						array(
-							Primitive::string('age'),
-							Primitive::integer('weight'),
-							Primitive::string('comment'),
+							\Onphp\Primitive::string('age'),
+							\Onphp\Primitive::integer('weight'),
+							\Onphp\Primitive::string('comment'),
 						)
 					);
 
@@ -69,9 +70,9 @@ public function testHstore()
 
 				$object = $user;
 
-				FormUtils::object2form($object, $form);
+				\Onphp\FormUtils::object2form($object, $form);
 
-				$this->assertInstanceOf('Hstore', $form->getValue('properties'));
+				$this->assertInstanceOf('\Onphp\Hstore', $form->getValue('properties'));
 
 				$this->assertEquals(
 					array_filter($properties),
@@ -96,7 +97,7 @@ public function testHstore()
 
 				$user = new TestUser();
 
-				FormUtils::form2object($form, $user, false);
+				\Onphp\FormUtils::form2object($form, $user, false);
 
 				$this->assertEquals(
 					$user->getProperties()->getList(),
diff --git a/test/db/IdDBTest.class.php b/test/db/IdDBTest.class.php
index d85733583e..c5a9c1c8fe 100644
--- a/test/db/IdDBTest.class.php
+++ b/test/db/IdDBTest.class.php
@@ -1,14 +1,15 @@
 <?php
+	namespace Onphp\Test;
+
 	class IdDBTest extends TestCaseDAO
 	{
 		public function testGetByEmptyId()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
-				$this->getByEmptyIdTest(0);
+			foreach (DBTestPool::me()->iterator() as $db) {
+				$this->getByEmptyIdTest(0, true);
 				$this->getByEmptyIdTest(null);
 				$this->getByEmptyIdTest('');
-				$this->getByEmptyIdTest('0');
+				$this->getByEmptyIdTest('0', true);
 				$this->getByEmptyIdTest(false);
 
 				$empty = TestLazy::create();
@@ -33,13 +34,19 @@ public function testStringIdentifier()
 			$this->assertEquals($identifier->getType(), 'scalarIdentifier');
 		}
 		
-		private function getByEmptyIdTest($id)
+		private function getByEmptyIdTest($id, $isCorrect = false)
 		{
 			try {
 				TestUser::dao()->getById($id);
-				$this->fail();
-			} catch (WrongArgumentException $e) {
-				// pass
+				$this->fail('expects to get exception');
+			} catch (\Onphp\WrongArgumentException $e) {
+				if ($isCorrect) {
+					$this->fail('expects to get ObjectNotFoundException');
+				}
+			} catch (\Onphp\ObjectNotFoundException $e) {
+				if (!$isCorrect) {
+					$this->fail('expects to get WrongArgumentException');
+				}
 			}
 		}
 	}
diff --git a/test/db/InnerTransactionDBTest.class.php b/test/db/InnerTransactionDBTest.class.php
index 13c8708050..017538cf44 100644
--- a/test/db/InnerTransactionDBTest.class.php
+++ b/test/db/InnerTransactionDBTest.class.php
@@ -1,14 +1,15 @@
 <?php
+	namespace Onphp\Test;
+
 	class InnerTransactionDBTest extends TestCaseDAO
 	{
 		public function testInnerTransaction()
 		{
-			foreach (DBTestPool::me()->getPool() as $connector => $db) {
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$this->getDBCreator()->fillDB();
 				
-				$moscow = TestCity::dao()->getByLogic(Expression::eq('name', 'Moscow'));
-				$piter = TestCity::dao()->getByLogic(Expression::eq('name', 'Saint-Peterburg'));
+				$moscow = TestCity::dao()->getByLogic(\Onphp\Expression::eq('name', 'Moscow'));
+				$piter = TestCity::dao()->getByLogic(\Onphp\Expression::eq('name', 'Saint-Peterburg'));
 				
 				$cityNewer = function(TestCity $city) {
 					$city->dao()->merge($city->setName('New '.$city->getName()));
@@ -17,19 +18,19 @@ public function testInnerTransaction()
 				$citiesNewer = function($moscow, $piter) use ($cityNewer, $db) {
 					$cityNewer($moscow);
 					
-					InnerTransactionWrapper::create()->
+					\Onphp\InnerTransactionWrapper::create()->
 						setDB($db)->
 						setFunction($cityNewer)->
 						run($piter);
 				};
 				
-				InnerTransactionWrapper::create()->
+				\Onphp\InnerTransactionWrapper::create()->
 					setDao($moscow->dao())->
 					setFunction($citiesNewer)->
 					run($moscow, $piter);
 				
-				$this->assertNotNull(TestCity::dao()->getByLogic(Expression::eq('name', 'New Moscow')));
-				$this->assertNotNull(TestCity::dao()->getByLogic(Expression::eq('name', 'New Saint-Peterburg')));
+				$this->assertNotNull(TestCity::dao()->getByLogic(\Onphp\Expression::eq('name', 'New Moscow')));
+				$this->assertNotNull(TestCity::dao()->getByLogic(\Onphp\Expression::eq('name', 'New Saint-Peterburg')));
 			}
 		}
 	}
diff --git a/test/db/IpDBTest.class.php b/test/db/IpDBTest.class.php
index 7c06d7b139..8e02eec728 100644
--- a/test/db/IpDBTest.class.php
+++ b/test/db/IpDBTest.class.php
@@ -2,16 +2,18 @@
 	/**
 	 * @group ipdb
 	 */
+	namespace Onphp\Test;
+
 	class IpDBTest extends TestCaseDAO
 	{
 		public function testToDialect()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
 			$expression =
-				Expression::containsIp(
-					IpRange::create('127.0.0.1-127.0.0.5'),
-					IpAddress::create('127.0.0.3')
+				\Onphp\Expression::containsIp(
+					\Onphp\IpRange::create('127.0.0.1-127.0.0.5'),
+					\Onphp\IpAddress::create('127.0.0.3')
 				);
 			
 			$this->assertEquals(
@@ -20,8 +22,8 @@ public function testToDialect()
 			);
 			
 			$expression =
-				Expression::containsIp(
-					DBField::create('range'),
+				\Onphp\Expression::containsIp(
+					\Onphp\DBField::create('range'),
 					'192.168.1.1'
 				);
 			$this->assertEquals(
@@ -32,15 +34,15 @@ public function testToDialect()
 		
 		public function testWithObjects()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
 			$criteria =
-				Criteria::create(TestUser::dao())->
+				\Onphp\Criteria::create(TestUser::dao())->
 				add(
-					Expression::containsIp(
-						IpRange::create('192.168.1.1-192.168.1.255'), 'ip')
+					\Onphp\Expression::containsIp(
+						\Onphp\IpRange::create('192.168.1.1-192.168.1.255'), 'ip')
 				)->
-				addProjection(Projection::property('id'));
+				addProjection(\Onphp\Projection::property('id'));
 			
 			$this->assertEquals(
 				$criteria->toDialectString($dialect),
@@ -48,13 +50,13 @@ public function testWithObjects()
 			);
 			
 			$criteria =
-				Criteria::create(TestInternetProvider::dao())->
+				\Onphp\Criteria::create(TestInternetProvider::dao())->
 				add(
-					Expression::containsIp(
+					\Onphp\Expression::containsIp(
 						'range',
-						IpAddress::create('42.42.42.42')
+						\Onphp\IpAddress::create('42.42.42.42')
 					)
-				)->addProjection(Projection::property('id'));
+				)->addProjection(\Onphp\Projection::property('id'));
 			
 			$this->assertEquals(
 				$criteria->toDialectString($dialect),
@@ -65,8 +67,7 @@ public function testWithObjects()
 		
 		public function testIpAddressProperty()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				
 				$city =
 					TestCity::create()->
@@ -81,31 +82,31 @@ public function testIpAddressProperty()
 							setNickName('postgreser')->
 							setPassword(sha1('postgreser'))
 						)->
-						setLastLogin(Timestamp::makeNow())->
-						setRegistered(Timestamp::makeNow())->
+						setLastLogin(\Onphp\Timestamp::makeNow())->
+						setRegistered(\Onphp\Timestamp::makeNow())->
 						setCity($city)->
-						setIp(IpAddress::create('127.0.0.1'));
+						setIp(\Onphp\IpAddress::create('127.0.0.1'));
 
 				TestUser::dao()->add($userWithIp);
 
 				$this->assertTrue($userWithIp->getId() >= 1);
 
-				$this->assertTrue($userWithIp->getIp() instanceof IpAddress);
+				$this->assertTrue($userWithIp->getIp() instanceof \Onphp\IpAddress);
 
 				$plainIp =
-					DBPool::me()->getByDao(TestUser::dao())->
+					\Onphp\DBPool::me()->getByDao(TestUser::dao())->
 					queryColumn(
-						OSQL::select()->get('ip')->
+						\Onphp\OSQL::select()->get('ip')->
 						from(TestUser::dao()->getTable())->
-						where(Expression::eq('id', $userWithIp->getId()))
+						where(\Onphp\Expression::eq('id', $userWithIp->getId()))
 					);
 
 				$this->assertEquals($plainIp[0], $userWithIp->getIp()->toString());
 
 				$count =
-					Criteria::create(TestUser::dao())->
-					add(Expression::eq('ip', IpAddress::create('127.0.0.1')))->
-					addProjection(Projection::count('*', 'count'))->
+					\Onphp\Criteria::create(TestUser::dao())->
+					add(\Onphp\Expression::eq('ip', \Onphp\IpAddress::create('127.0.0.1')))->
+					addProjection(\Onphp\Projection::count('*', 'count'))->
 					getCustom('count');
 
 				$this->assertEquals($count, 1);
@@ -114,16 +115,14 @@ public function testIpAddressProperty()
 		
 		public function testIpRangeProperty()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
-				
+			foreach (DBTestPool::me()->iterator() as $db) {
 				$akado =
 					TestInternetProvider::create()->
 					setName('Akada')->
 					setRange(
-						IpRange::create(
-							IpAddress::create('192.168.1.1'),
-							IpAddress::create('192.168.1.42')
+						\Onphp\IpRange::create(
+							\Onphp\IpAddress::create('192.168.1.1'),
+							\Onphp\IpAddress::create('192.168.1.42')
 						)
 					);
 
@@ -131,9 +130,9 @@ public function testIpRangeProperty()
 					add($akado);
 
 				$plainRange =
-						Criteria::create(TestInternetProvider::dao())->
-						addProjection(Projection::property('range'))->
-						add(Expression::eq('name', 'Akada'))->
+						\Onphp\Criteria::create(TestInternetProvider::dao())->
+						addProjection(\Onphp\Projection::property('range'))->
+						add(\Onphp\Expression::eq('name', 'Akada'))->
 						getCustom();
 
 				$this->assertEquals(
@@ -146,12 +145,12 @@ public function testIpRangeProperty()
 					TestInternetProvider::create()->
 					setName('DomRu')->
 					setRange(
-						IpRange::create('192.168.2.0/24')
+						\Onphp\IpRange::create('192.168.2.0/24')
 					)
 				);
 
 				$list =
-					Criteria::create(TestInternetProvider::dao())->
+					\Onphp\Criteria::create(TestInternetProvider::dao())->
 					addOrder('id')->
 					getList();
 
diff --git a/test/db/PgSQLFullTextSearchDBTest.class.php b/test/db/PgSQLFullTextSearchDBTest.class.php
index 59d627d2cd..e1b84a7dfb 100644
--- a/test/db/PgSQLFullTextSearchDBTest.class.php
+++ b/test/db/PgSQLFullTextSearchDBTest.class.php
@@ -2,6 +2,8 @@
 	/**
 	 * @group pgsf
 	 */
+	namespace Onphp\Test;
+
 	class PgSQLFullTextSearchDBTest extends TestCaseDB
 	{
 		/**
@@ -9,24 +11,24 @@ class PgSQLFullTextSearchDBTest extends TestCaseDB
 		 */
 		public function getPgSQL()
 		{
-			foreach (DBTestPool::me()->getPool() as $db)
-				if ($db instanceof PgSQL)
+			foreach (DBTestPool::me()->iterator() as $db)
+				if ($db instanceof \Onphp\PgSQL)
 					return $db;
-				
+
 			$this->markTestIncomplete('Required PgSQL for testing');
 		}
-		
+
 		/**
 		 * @depends getPgSQL
-		 * @return PgSQL
+		 * @return \Onphp\PgSQL
 		 */
-		public function testPrepairFullText(PgSQL $db)
+		public function testPrepareFullText(\Onphp\PgSQL $db)
 		{
 			$this->assertEquals(
 				"'новый год' & 'снегурочка' & 'праздник'",
 				$db->getDialect()->prepareFullText(
 					array('Новый год', 'Снегурочка', 'ПрАзДнИк'),
-					DB::FULL_TEXT_AND
+					\Onphp\DB::FULL_TEXT_AND
 				)
 			);
 		}
diff --git a/test/db/RecursionDBTest.class.php b/test/db/RecursionDBTest.class.php
index 66b4553938..8de1fa5f5a 100644
--- a/test/db/RecursionDBTest.class.php
+++ b/test/db/RecursionDBTest.class.php
@@ -2,6 +2,8 @@
 	/**
 	 * @group rdb
 	 */
+	namespace Onphp\Test;
+
 	class RecursionDBTest extends TestCaseDAO
 	{
 		/**
@@ -11,8 +13,7 @@ public function testRecursiveContainers()
 		{
 			$this->markTestSkipped('wontfix');
 			
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				TestObject::dao()->import(
 					TestObject::create()->
 					setId(1)->
@@ -46,29 +47,28 @@ public function testRecursiveContainers()
 		
 		public function testRecursionObjects()
 		{
-			foreach (DBTestPool::me()->getPool() as $db) {
-				DBPool::me()->setDefault($db);
+			foreach (DBTestPool::me()->iterator() as $db) {
 				
 				$parentProperties =
-					Singleton::getInstance('ProtoTestParentObject')->
+					\Onphp\Singleton::getInstance('\Onphp\Test\ProtoTestParentObject')->
 					getPropertyList();
 
 				$resultRoot = $parentProperties['root']->
-					getFetchStrategyId() == FetchStrategy::LAZY;
+					getFetchStrategyId() == \Onphp\FetchStrategy::LAZY;
 
 				$childProperties =
-					Singleton::getInstance('ProtoTestChildObject')->
+					\Onphp\Singleton::getInstance('\Onphp\Test\ProtoTestChildObject')->
 					getPropertyList();
 
 				$resultParent = $childProperties['parent']->
-					getFetchStrategyId() == FetchStrategy::LAZY;
+					getFetchStrategyId() == \Onphp\FetchStrategy::LAZY;
 
 				$selfRecursiveProperties =
-					Singleton::getInstance('ProtoTestSelfRecursion')->
+					\Onphp\Singleton::getInstance('\Onphp\Test\ProtoTestSelfRecursion')->
 					getPropertyList();
 
 				$resultSelfRecursive = $selfRecursiveProperties['parent']->
-					getFetchStrategyId() == FetchStrategy::LAZY;
+					getFetchStrategyId() == \Onphp\FetchStrategy::LAZY;
 
 				$this->assertTrue($resultRoot);
 				$this->assertTrue($resultParent);
diff --git a/test/main/Autoloader/AutoloaderClassPathCacheTest.class.php b/test/main/Autoloader/AutoloaderClassPathCacheTest.class.php
index 3dedc2b317..6d7ac3fe0c 100644
--- a/test/main/Autoloader/AutoloaderClassPathCacheTest.class.php
+++ b/test/main/Autoloader/AutoloaderClassPathCacheTest.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class AutoloaderClassPathCacheTest extends TestCase
 	{
 		public function testOneCyclic()
@@ -17,7 +19,7 @@ public function testOneCyclic()
 			$service = $this->spawnService();
 			
 			//simple autoload, will cache data to file
-			$service->autoload('Form');
+			$service->autoload('\Onphp\Form');
 			
 			//second autoload call must not require to reload cache
 			$service->setNamespaceResolver($this->spawnResolver(array('getClassPathListCount' => 0)));
@@ -35,9 +37,9 @@ public function testWithBaseException()
 			$callback = function() use (&$counter) {
 				switch ($counter++) {
 					case 0: return null;
-					case 1: throw new BaseException('include exception');
+					case 1: throw new \Onphp\BaseException('include exception');
 					case 2: return null;
-					default: Assert::isUnreachable($counter - 1);
+					default: \Onphp\Assert::isUnreachable($counter - 1);
 				}
 			};
 			
@@ -46,15 +48,14 @@ public function testWithBaseException()
 				will($this->returnCallback($callback));
 			
 			//autoload without error, it's allow us to cache data
-			$service->autoload('Form');
-			
-			define('DEBUG', true);
+			$service->autoload('\Onphp\Form');
+
 			//second autoload and here we throw error
 			$service->setNamespaceResolver($this->spawnResolver(array(
 				'getPathsCount' => 2,
 				'getClassPathListCount' => 1,
 			)));
-			$service->autoload('Form');
+			$service->autoload('\Onphp\Form');
 		}
 		
 		public function testRecacheOnChangedPath()
@@ -63,25 +64,25 @@ public function testRecacheOnChangedPath()
 			$service = $this->spawnService();
 			
 			//simple autoload, will cache data to file
-			$service->autoload('Form');
+			$service->autoload('\Onphp\Form');
 			
 			//chang path list and expect recache
 			$service->setNamespaceResolver($this->spawnResolver(array(
 				'getPaths' => array('' => array('path1'))
 			)));
-			$service->autoload('Form');
+			$service->autoload('\Onphp\Form');
 		}
 		
 		/**
-		 * @return AutoloaderClassPathCache
+		 * @return \Onphp\AutoloaderClassPathCache
 		 */
 		private function spawnService(array $options = array())
 		{
-			$service = $this->getMockBuilder('AutoloaderClassPathCache')->
+			$service = $this->getMockBuilder('\Onphp\AutoloaderClassPathCache')->
 				setMethods(array('includeFile', 'register', 'unregister'))->
 				getMock();
 			
-			/* @var $service AutoloaderClassPathCache */
+			/* @var $service \Onphp\AutoloaderClassPathCache */
 			$service->
 				setNamespaceResolver($this->spawnResolver($options))->
 				setClassCachePath($this->spawnCacheDir());
@@ -90,7 +91,7 @@ private function spawnService(array $options = array())
 		}
 		
 		/**
-		 * @return NamespaceResolver
+		 * @return \Onphp\NamespaceResolver
 		 */
 		private function spawnResolver(array $options = array())
 		{
@@ -102,13 +103,13 @@ private function spawnResolver(array $options = array())
 				
 				'getClassPathList' => array(
 					0 => 'path1/',
-					'\Form' => 0,
+					'\Onphp\Form' => 0,
 					1 => 'path1/path2/',
 					'\Sub\Form' => 1,
 				),
 				'getClassPathListCount' => 1,
 			);
-			$mock = $this->getMock('NamespaceResolver');
+			$mock = $this->getMock('\Onphp\NamespaceResolver');
 			
 			$mock->expects($this->any())->
 				method('getClassExtension')->
@@ -132,7 +133,7 @@ private function spawnCacheDir()
 				if (is_file($cachePath))
 					unlink($cachePath);
 				elseif (is_dir($cachePath)) {
-					FileUtils::removeDirectory($cachePath, true);
+					\Onphp\FileUtils::removeDirectory($cachePath, true);
 				}
 			}
 			mkdir($cachePath, 0777, true);
diff --git a/test/main/Autoloader/NamespaceResolverTest.class.php b/test/main/Autoloader/NamespaceResolverTest.class.php
index 24241acdf3..76def421b5 100644
--- a/test/main/Autoloader/NamespaceResolverTest.class.php
+++ b/test/main/Autoloader/NamespaceResolverTest.class.php
@@ -12,12 +12,15 @@
 	/**
 	 * @group ns
 	 */
+	namespace Onphp\Test;
+
 	final class NamespaceResolverTest extends TestCase
 	{
 		public function testOnPHPResolver()
 		{
 			//setup
-			$resolver = NamespaceResolverOnPHP::create()->
+			$resolver = \Onphp\NamespaceResolverOnPHP::create()->
+				setClassExtension('.cass.php')->
 				addPath($this->getBasePath().'onPHP');
 			//expectation
 			$result = array(
@@ -26,7 +29,7 @@ public function testOnPHPResolver()
 			);
 			//execution
 			$this->assertEquals($result, $resolver->getClassPathList());
-			$this->assertEquals($this->getBasePath().'onPHP/MyForm.class.php', $resolver->getClassPath('MyForm'));
+			$this->assertEquals($this->getBasePath().'onPHP/MyForm.cass.php', $resolver->getClassPath('MyForm'));
 			$this->assertNull($resolver->getClassPath('MyFormSub'));
 			$this->assertNull($resolver->getClassPath('\onPHP\MyFormSub'));
 			$this->assertNull($resolver->getClassPath('\onPHP\MyFormSup'));
@@ -43,16 +46,16 @@ public function testOnPHPResolver()
 			$result['\onPHP\MyFormUp'] = 2;
 			//execution
 			$this->assertEquals($result, $resolver->getClassPathList());
-			$this->assertEquals($this->getBasePath().'onPHP/MyForm.class.php', $resolver->getClassPath('\MyForm'));
+			$this->assertEquals($this->getBasePath().'onPHP/MyForm.cass.php', $resolver->getClassPath('\MyForm'));
 			$this->assertNull($resolver->getClassPath('MyFormSub'));
 			$this->assertEquals(
-				$this->getBasePath().'onPHP/Sub/MyFormSub.class.php',
+				$this->getBasePath().'onPHP/Sub/MyFormSub.cass.php',
 				$resolver->getClassPath('\onPHP\MyFormSub')
 			);
 			$this->assertNull($resolver->getClassPath('\onPHP\MyFormSup'));
 			
 			//setup
-			$resolver->setClassExtension('.clazz.php');
+			$resolver->setClassExtension('.cazz.php');
 			//expecation
 			$result = array(
 				0 => $this->getBasePath().'onPHP/',
@@ -66,15 +69,16 @@ public function testOnPHPResolver()
 			$this->assertNull($resolver->getClassPath('MyFormSub'));
 			$this->assertNull($resolver->getClassPath('\onPHP\MyFormSub'));
 			$this->assertEquals(
-				$this->getBasePath().'onPHP/Sub/MyFormSup.clazz.php',
+				$this->getBasePath().'onPHP/Sub/MyFormSup.cazz.php',
 				$resolver->getClassPath('\onPHP\MyFormSup')
 			);
 		}
-		
+
 		public function testPSR0ResolverEmptyBaseNamespace()
 		{
 			//setup
-			$resolver = NamespaceResolverPSR0::create()->
+			$resolver = \Onphp\NamespaceResolverPSR0::create()->
+				setClassExtension('.cass.php')->
 				addPath($this->getBasePath());
 			
 			//expectation
@@ -94,14 +98,14 @@ public function testPSR0ResolverEmptyBaseNamespace()
 			//execution
 			$this->assertEquals($result, $resolver->getClassPathList());
 			$this->assertEquals(
-				$this->getBasePath().'MyNS/Sub/Class2.class.php',
+				$this->getBasePath().'MyNS/Sub/Class2.cass.php',
 				$resolver->getClassPath('\MyNS\\Sub\Class2')
 			);
 			$this->assertNull($resolver->getClassPath('\MyNS\\Sub\Class1'));
 			$this->assertNull($resolver->getClassPath('\onPHP\Sub\MyFormSup'));
 			
 			//setup
-			$resolver->setClassExtension('.clazz.php');
+			$resolver->setClassExtension('.cazz.php');
 			//expectation
 			$result = array(
 				0 => $this->getBasePath(),
@@ -116,15 +120,16 @@ public function testPSR0ResolverEmptyBaseNamespace()
 			$this->assertEquals($result, $resolver->getClassPathList());
 			$this->assertNull($resolver->getClassPath('\MyNS\Sub\Class2'));
 			$this->assertEquals(
-				$this->getBasePath().'onPHP/Sub/MyFormSup.clazz.php',
+				$this->getBasePath().'onPHP/Sub/MyFormSup.cazz.php',
 				$resolver->getClassPath('\onPHP\Sub\MyFormSup')
 			);
 		}
-		
+
 		public function testPSR0ResolverStartWithNamespace()
 		{
 			//setup
-			$resolver = NamespaceResolverPSR0::create()->
+			$resolver = \Onphp\NamespaceResolverPSR0::create()->
+				setClassExtension('.cass.php')->
 				addPath($this->getBasePath().'onPHP', '\onPHP\\');
 			//expectation
 			$result = array(
@@ -138,27 +143,28 @@ public function testPSR0ResolverStartWithNamespace()
 			//execution
 			$this->assertEquals($result, $resolver->getClassPathList());
 			$this->assertEquals(
-				$this->getBasePath().'onPHP/Up/MyFormUp.class.php',
+				$this->getBasePath().'onPHP/Up/MyFormUp.cass.php',
 				$resolver->getClassPath('onPHP\Up\MyFormUp')
 			);
 			$this->assertNull($resolver->getClassPath('\MyNS\\Sub\Class1'));
 			$this->assertNull($resolver->getClassPath('\onPHP\Sub\MyFormSup'));
 		}
-		
+
 		public function testPSR0WithUnderlineNoBaseNamespace()
 		{
 			//setup
-			$resolver = NamespaceResolverPSR0::create()->
+			$resolver = \Onphp\NamespaceResolverPSR0::create()->
 				setAllowedUnderline(true)->
-				addPath($this->getBasePath(true));
+				addPath($this->getBasePath(true))->
+				setClassExtension('.cass.php');
 			
 			//expectation
 			$this->assertEquals(
-				$this->getBasePath(true).'Under/Class.class.php',
+				$this->getBasePath(true).'Under/Class.cass.php',
 				$resolver->getClassPath('\Under_Class')
 			);
 			$this->assertEquals(
-				$this->getBasePath(true).'Under/Class.class.php',
+				$this->getBasePath(true).'Under/Class.cass.php',
 				$resolver->getClassPath('\Under\Class')
 			);
 			
@@ -174,25 +180,26 @@ public function testPSR0WithUnderlineNoBaseNamespace()
 			$resolver->setAllowedUnderline(false);
 			$this->assertNull($resolver->getClassPath('\Under_Class'));
 			$this->assertEquals(
-				$this->getBasePath(true).'Under/Class.class.php',
+				$this->getBasePath(true).'Under/Class.cass.php',
 				$resolver->getClassPath('\Under\Class')
 			);
 		}
-		
+
 		public function testPSR0WithUnderlineWithBaseNamespace()
 		{
 			//setup
-			$resolver = NamespaceResolverPSR0::create()->
+			$resolver = \Onphp\NamespaceResolverPSR0::create()->
 				setAllowedUnderline(true)->
-				addPath($this->getBasePath(true), 'My\base_package');
+				addPath($this->getBasePath(true), 'My\base_package')->
+				setClassExtension('.cass.php');
 			
 			//expectation
 			$this->assertEquals(
-				$this->getBasePath(true).'Under/Class.class.php',
+				$this->getBasePath(true).'Under/Class.cass.php',
 				$resolver->getClassPath('\My\base_package\Under_Class')
 			);
 			$this->assertEquals(
-				$this->getBasePath(true).'Under/Class.class.php',
+				$this->getBasePath(true).'Under/Class.cass.php',
 				$resolver->getClassPath('\My\base_package\Under\Class')
 			);
 			$this->assertNull($resolver->getClassPath('\Under\Class'));
@@ -209,7 +216,7 @@ public function testPSR0WithUnderlineWithBaseNamespace()
 			$resolver->setAllowedUnderline(false);
 			$this->assertNull($resolver->getClassPath('\My\base_package\Under_Class'));
 			$this->assertEquals(
-				$this->getBasePath(true).'Under/Class.class.php',
+				$this->getBasePath(true).'Under/Class.cass.php',
 				$resolver->getClassPath('\My\base_package\Under\Class')
 			);
 		}
diff --git a/test/main/Base62UtilsTest.class.php b/test/main/Base62UtilsTest.class.php
index a8d4d30678..5b13fe6db5 100644
--- a/test/main/Base62UtilsTest.class.php
+++ b/test/main/Base62UtilsTest.class.php
@@ -9,25 +9,27 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class Base62UtilsTest extends TestCase
 	{
 		public function testSetChars()
 		{
 			try {
-				Base62Utils::setChars('qwerty');
+				\Onphp\Base62Utils::setChars('qwerty');
 				$this->fail('Length test failed');
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//ok
 			}
 
 			try {
-				Base62Utils::setChars(
+				\Onphp\Base62Utils::setChars(
 					'0123456789abcdefghijklmn'
 					.'ЭЮЯ'
 					.'rstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
 				);
 				$this->fail('Pattern matching failed');
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//is ok
 			}
 		}
@@ -35,21 +37,21 @@ public function testSetChars()
 		public function testOutOfRange()
 		{
 			try {
-				Base62Utils::encode(PHP_INT_MAX + 1);
+				\Onphp\Base62Utils::encode(PHP_INT_MAX + 1);
 				$this->fail('Out of range failed');
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//is ok
 			}
 
 			try {
 				switch(PHP_INT_SIZE) {
 					case 4:
-						Base62Utils::decode('q1w2e3r'); // 7 symbols
+						\Onphp\Base62Utils::decode('q1w2e3r'); // 7 symbols
 						$this->fail('Wrong: int4 max length of code');
 						break;
 
 					case 8:
-						Base62Utils::decode('q1w2e3r4t5y6'); // 12 symbols
+						\Onphp\Base62Utils::decode('q1w2e3r4t5y6'); // 12 symbols
 						$this->fail('Wrong: int8 max length of code');
 						break;
 
@@ -58,14 +60,14 @@ public function testOutOfRange()
 						break;
 				}
 
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//is ok
 			}
 
 			try {
-				Base62Utils::decode('');
+				\Onphp\Base62Utils::decode('');
 				$this->fail('Wrong: min length of code');
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//is ok
 			}
 		}
@@ -73,9 +75,9 @@ public function testOutOfRange()
 		public function testPositiveInteger()
 		{
 			try {
-				Base62Utils::encode(-1);
+				\Onphp\Base62Utils::encode(-1);
 				$this->fail('Positive integer failed');
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//is ok
 			}
 		}
@@ -83,19 +85,19 @@ public function testPositiveInteger()
 		public function testWrongDecode()
 		{
 			try {
-				Base62Utils::decode('abc]');
+				\Onphp\Base62Utils::decode('abc]');
 				$this->fail('Wrong code');
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//is ok
 			}
 		}
 
 		public function testEncodeDecode()
 		{
-			$int = Base62Utils::decode('onPHP');
+			$int = \Onphp\Base62Utils::decode('onPHP');
 			$this->assertSame($int, 360312369);
 
-			$str = Base62Utils::encode(360312369);
+			$str = \Onphp\Base62Utils::encode(360312369);
 			$this->assertSame('onPHP', $str);
 		}
 	}
diff --git a/test/main/ClassUtilsTest.class.php b/test/main/ClassUtilsTest.class.php
index c2222842d6..8e8f1052a9 100644
--- a/test/main/ClassUtilsTest.class.php
+++ b/test/main/ClassUtilsTest.class.php
@@ -1,44 +1,46 @@
 <?php
 	/* $Id$ */
 
+	namespace Onphp\Test;
+
 	final class ClassUtilsTest extends TestCase
 	{
 		public function testStaticMethodCalling()
 		{
 			$this->assertEquals(
-				ClassUtils::callStaticMethod(
-					'Singleton::getInstance',
-					'UrlEncodeFilter'
+				\Onphp\ClassUtils::callStaticMethod(
+					'\Onphp\Singleton::getInstance',
+					'\Onphp\UrlEncodeFilter'
 				),
 				
-				Singleton::getInstance('UrlEncodeFilter')
+				\Onphp\Singleton::getInstance('\Onphp\UrlEncodeFilter')
 			);
 			
 			$this->assertEquals(
-				ClassUtils::callStaticMethod('ImaginaryDialect::me'),
-				ImaginaryDialect::me()
+				\Onphp\ClassUtils::callStaticMethod('\Onphp\ImaginaryDialect::me'),
+				\Onphp\ImaginaryDialect::me()
 			);
 			
 			try {
-				ClassUtils::callStaticMethod('InexistantClass::InSaNeMeThOd');
+				\Onphp\ClassUtils::callStaticMethod('InexistantClass::InSaNeMeThOd');
 				$this->fail();
-			} catch (ClassNotFoundException $e) {
+			} catch (\Onphp\ClassNotFoundException $e) {
 				/* first pass */
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* and all others */
 			}
 			
 			try {
-				ClassUtils::callStaticMethod('complete nonsense');
+				\Onphp\ClassUtils::callStaticMethod('complete nonsense');
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 			
 			try {
-				ClassUtils::callStaticMethod('Identifier::comp::lete::non::sense');
+				\Onphp\ClassUtils::callStaticMethod('Identifier::comp::lete::non::sense');
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\ClassNotFoundException $e) {
 				/* pass */
 			}
 		}
@@ -53,10 +55,10 @@ public function testSet()
 				ClassUtilsTestClass::create()->
 				setText('old Text');
 			
-			ClassUtils::fillNullProperties($source, $destination);
+			\Onphp\ClassUtils::fillNullProperties($source, $destination);
 			$this->assertEquals($destination->getText(), 'old Text');
 
-			ClassUtils::copyNotNullProperties($source, $destination);
+			\Onphp\ClassUtils::copyNotNullProperties($source, $destination);
 			$this->assertEquals($destination->getText(), 'new Text');
 		}
 		
@@ -68,10 +70,10 @@ public function testNotSet()
 				ClassUtilsTestClass::create()->
 				setText('old Text');			
 			
-			ClassUtils::fillNullProperties($source, $destination);
+			\Onphp\ClassUtils::fillNullProperties($source, $destination);
 			$this->assertEquals($destination->getText(), 'old Text');
 			
-			ClassUtils::copyNotNullProperties($source, $destination);
+			\Onphp\ClassUtils::copyNotNullProperties($source, $destination);
 			$this->assertEquals($destination->getText(), 'old Text');
 		}
 
@@ -89,56 +91,56 @@ public function testObject()
 				ClassUtilsTestClass::create()->
 				setText('old Text');			
 			
-			ClassUtils::fillNullProperties($source, $destination);
+			\Onphp\ClassUtils::fillNullProperties($source, $destination);
 			
 			$this->assertTrue($destination->getObject() === $innerObject);
 			
 			$destination->dropObject();
 			
-			ClassUtils::copyNotNullProperties($source, $destination);
+			\Onphp\ClassUtils::copyNotNullProperties($source, $destination);
 			$this->assertTrue($destination->getObject() === $innerObject);
 		}
 		
 		public function testInstanceOf()
 		{
 			try {
-				$this->assertFalse(ClassUtils::isInstanceOf('2007-07-14&genre', 'Date'));
-			} catch (WrongArgumentException $e) {
+				$this->assertFalse(\Onphp\ClassUtils::isInstanceOf('2007-07-14&genre', '\Onphp\Date'));
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
-			$this->assertTrue(ClassUtils::isInstanceOf('ClassUtilsTestClassChild', 'ClassUtilsTestClass'));
-			$this->assertFalse(ClassUtils::isInstanceOf('ClassUtilsTestClass', 'ClassUtilsTestClassChild'));
-			$this->assertTrue(ClassUtils::isInstanceOf('ClassUtilsTestClassChild', 'ClassUtilsTestInterface'));
-			$this->assertTrue(ClassUtils::isInstanceOf('ClassUtilsTestClass', 'ClassUtilsTestInterface'));
-			$this->assertTrue(ClassUtils::isInstanceOf('ClassUtilsTestAbstract', 'ClassUtilsTestInterface'));
-			$this->assertTrue(ClassUtils::isInstanceOf('ClassUtilsTestAbstract', 'ClassUtilsTestClass'));
-			$this->assertFalse(ClassUtils::isInstanceOf('ClassUtilsTestAbstract', 'ClassUtilsTestClassChild'));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf('\Onphp\Test\ClassUtilsTestClassChild', '\Onphp\Test\ClassUtilsTestClass'));
+			$this->assertFalse(\Onphp\ClassUtils::isInstanceOf('\Onphp\Test\ClassUtilsTestClass', '\Onphp\Test\ClassUtilsTestClassChild'));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf('\Onphp\Test\ClassUtilsTestClassChild', '\Onphp\Test\ClassUtilsTestInterface'));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf('\Onphp\Test\ClassUtilsTestClass', '\Onphp\Test\ClassUtilsTestInterface'));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf('\Onphp\Test\ClassUtilsTestAbstract', '\Onphp\Test\ClassUtilsTestInterface'));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf('\Onphp\Test\ClassUtilsTestAbstract', '\Onphp\Test\ClassUtilsTestClass'));
+			$this->assertFalse(\Onphp\ClassUtils::isInstanceOf('\Onphp\Test\ClassUtilsTestAbstract', '\Onphp\Test\ClassUtilsTestClassChild'));
 			
 			$base = new ClassUtilsTestClass;
-			$this->assertTrue(ClassUtils::isInstanceOf($base, $base));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf($base, $base));
 			
-			$this->assertTrue(ClassUtils::isInstanceOf('ClassUtilsTestAbstract', $base));
-			$this->assertFalse(ClassUtils::isInstanceOf($base, 'ClassUtilsTestAbstract'));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf('\Onphp\Test\ClassUtilsTestAbstract', $base));
+			$this->assertFalse(\Onphp\ClassUtils::isInstanceOf($base, '\Onphp\Test\ClassUtilsTestAbstract'));
 			
 			$child = new ClassUtilsTestClassChild();
 			
-			$this->assertFalse(ClassUtils::isInstanceOf($base, $child));
-			$this->assertTrue(ClassUtils::isInstanceOf($child, $base));
+			$this->assertFalse(\Onphp\ClassUtils::isInstanceOf($base, $child));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf($child, $base));
 			
-			$this->assertFalse(ClassUtils::isInstanceOf($base, 'ClassUtilsTestClassChild'));
-			$this->assertTrue(ClassUtils::isInstanceOf($child, 'ClassUtilsTestClass'));
+			$this->assertFalse(\Onphp\ClassUtils::isInstanceOf($base, '\Onphp\Test\ClassUtilsTestClassChild'));
+			$this->assertTrue(\Onphp\ClassUtils::isInstanceOf($child, '\Onphp\Test\ClassUtilsTestClass'));
 		}
 		
 		public function testIsClassName()
 		{
-			$this->assertFalse(ClassUtils::isClassName(null));
-			$this->assertFalse(ClassUtils::isClassName(''));
-			$this->assertFalse(ClassUtils::isClassName(0));
-			$this->assertFalse(ClassUtils::isClassName('0'));
-			$this->assertTrue(ClassUtils::isClassName('A0'));
-			$this->assertTrue(ClassUtils::isClassName('_'));
-			$this->assertTrue(ClassUtils::isClassName('_1'));
-			$this->assertTrue(ClassUtils::isClassName('Correct_Class1'));
+			$this->assertFalse(\Onphp\ClassUtils::isClassName(null));
+			$this->assertFalse(\Onphp\ClassUtils::isClassName(''));
+			$this->assertFalse(\Onphp\ClassUtils::isClassName(0));
+			$this->assertFalse(\Onphp\ClassUtils::isClassName('0'));
+			$this->assertTrue(\Onphp\ClassUtils::isClassName('A0'));
+			$this->assertTrue(\Onphp\ClassUtils::isClassName('_'));
+			$this->assertTrue(\Onphp\ClassUtils::isClassName('_1'));
+			$this->assertTrue(\Onphp\ClassUtils::isClassName('Correct_Class1'));
 		}
 	}
 	
diff --git a/test/main/ComparatorTest.class.php b/test/main/ComparatorTest.class.php
index 8b1389598c..59d3dae06c 100644
--- a/test/main/ComparatorTest.class.php
+++ b/test/main/ComparatorTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class CompatatorTest extends TestCase
 	{
 		/**
@@ -8,7 +10,7 @@ public function testSerializedObjectComparator($one, $two, $result)
 		{
 			$this->assertEquals(
 				$result,
-				SerializedObjectComparator::me()->compare($one, $two)
+				\Onphp\SerializedObjectComparator::me()->compare($one, $two)
 			);
 		}
 
@@ -19,7 +21,7 @@ public function testImmutableObjectComparator($one, $two, $result)
 		{
 			$this->assertEquals(
 				$result,
-				ImmutableObjectComparator::me()->compare($one, $two)
+				\Onphp\ImmutableObjectComparator::me()->compare($one, $two)
 			);
 		}
 
@@ -30,7 +32,7 @@ public function testDateObjectComparator($one, $two, $result)
 		{
 			$this->assertEquals(
 				$result,
-				DateObjectComparator::me()->compare($one, $two)
+				\Onphp\DateObjectComparator::me()->compare($one, $two)
 			);
 		}
 
@@ -80,14 +82,14 @@ public static function dateTestData()
 		{
 			return
 				array(
-					array(Date::makeToday(), Date::makeToday(), 0),
-					array(Date::makeToday(), Date::makeToday()->modify('-1 day'), 1),
-					array(Date::makeToday()->modify('-1 day'), Date::makeToday(), -1)
+					array(\Onphp\Date::makeToday(), \Onphp\Date::makeToday(), 0),
+					array(\Onphp\Date::makeToday(), \Onphp\Date::makeToday()->modify('-1 day'), 1),
+					array(\Onphp\Date::makeToday()->modify('-1 day'), \Onphp\Date::makeToday(), -1)
 				);
 		}
 	}
 
-	final class CompatatorTestObject extends IdentifiableObject
+	final class CompatatorTestObject extends \Onphp\IdentifiableObject
 	{
 		public $anotherObject	= null;
 		public $testVariable	= null;
diff --git a/test/main/CriteriaTest.class.php b/test/main/CriteriaTest.class.php
index 316e35eb21..88ca8b6400 100644
--- a/test/main/CriteriaTest.class.php
+++ b/test/main/CriteriaTest.class.php
@@ -1,16 +1,18 @@
 <?php
+	namespace Onphp\Test;
+
 	final class CriteriaTest extends TestCase
 	{
 		public function testClassProjection()
 		{
 			$criteria =
-				Criteria::create(TestUser::dao())->
+				\Onphp\Criteria::create(TestUser::dao())->
 				setProjection(
-					Projection::chain()->add(
-						ClassProjection::create('TestUser')
+					\Onphp\Projection::chain()->add(
+						\Onphp\ClassProjection::create('\Onphp\Test\TestUser')
 					)->
 					add(
-						Projection::group('id')
+						\Onphp\Projection::group('id')
 					)
 				);
 			
@@ -22,65 +24,65 @@ public function testClassProjection()
 		
 		public function testAddProjection()
 		{
-			$criteria = Criteria::create(TestUser::dao());
+			$criteria = \Onphp\Criteria::create(TestUser::dao());
 			
 			$this->assertEquals(
 				$criteria->getProjection(),
-				Projection::chain()
+				\Onphp\Projection::chain()
 			);
 			
-			$criteria = Criteria::create(TestUser::dao())->
+			$criteria = \Onphp\Criteria::create(TestUser::dao())->
 				addProjection(
-					Projection::chain()
+					\Onphp\Projection::chain()
 				);
 			
 			$this->assertEquals(
 				$criteria->getProjection(),
-				Projection::chain()
+				\Onphp\Projection::chain()
 			);
 			
-			$criteria = Criteria::create(TestUser::dao())->
+			$criteria = \Onphp\Criteria::create(TestUser::dao())->
 				addProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				);
 			
 			$this->assertEquals(
 				$criteria->getProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::property('id')
+						\Onphp\Projection::property('id')
 					)
 			);
 		}
 		
 		public function testSetProjection()
 		{
-			$criteria = Criteria::create(TestUser::dao())->
+			$criteria = \Onphp\Criteria::create(TestUser::dao())->
 				setProjection(
-					Projection::chain()->
+					\Onphp\Projection::chain()->
 						add(
-							Projection::property('id')
+							\Onphp\Projection::property('id')
 						)
 				);
 			
 			$this->assertEquals(
 				$criteria->getProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::property('id')
+						\Onphp\Projection::property('id')
 					)
 			);
 			
-			$criteria = Criteria::create(TestUser::dao())->
+			$criteria = \Onphp\Criteria::create(TestUser::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				);
 			
 			$this->assertEquals(
 				$criteria->getProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::property('id')
+						\Onphp\Projection::property('id')
 					)
 			);
 		}
@@ -90,14 +92,14 @@ public function testSetProjection()
 		**/
 		public function testOrder($order, $expectedString)
 		{
-			$criteria = Criteria::create(TestUser::dao())->
+			$criteria = \Onphp\Criteria::create(TestUser::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				)->
 				addOrder($order);
 			
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT test_user.id FROM test_user ORDER BY '.$expectedString
 			);
 		}
@@ -105,59 +107,59 @@ public function testOrder($order, $expectedString)
 		public function testValueObject()
 		{
 			$criteria =
-				Criteria::create(TestUserWithContact::dao())->
+				\Onphp\Criteria::create(TestUserWithContact::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				)->
 				add(
-					Expression::eq('contacts.city', 1)
+					\Onphp\Expression::eq('contacts.city', 1)
 				);			
 
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT test_user_with_contact.id FROM test_user_with_contact WHERE (test_user_with_contact.city_id = 1)'
 			);
 
 			$criteria =
-				Criteria::create(TestUserWithContact::dao())->
+				\Onphp\Criteria::create(TestUserWithContact::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				)->
 				add(
-					Expression::eq('contacts.city.name', 'Moscow')
+					\Onphp\Expression::eq('contacts.city.name', 'Moscow')
 				);		
 
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT test_user_with_contact.id FROM test_user_with_contact JOIN custom_table AS 3524772f_city_id ON (test_user_with_contact.city_id = 3524772f_city_id.id) WHERE (3524772f_city_id.name = Moscow)'
 			);
 
 			//check extending ValueObject
 			$criteria =
-				Criteria::create(TestUserWithContactExtended::dao())->
+				\Onphp\Criteria::create(TestUserWithContactExtended::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				)->
 				add(
-					Expression::eq('contactExt.skype', 'skype_nick_name')
+					\Onphp\Expression::eq('contactExt.skype', 'skype_nick_name')
 				);
 
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT test_user_with_contact_extended.id FROM test_user_with_contact_extended WHERE (test_user_with_contact_extended.skype = skype_nick_name)'
 			);
 
 			$criteria =
-				Criteria::create(TestUserWithContactExtended::dao())->
+				\Onphp\Criteria::create(TestUserWithContactExtended::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				)->
 				add(
-					Expression::eq('contactExt.city.name', 'Moscow')
+					\Onphp\Expression::eq('contactExt.city.name', 'Moscow')
 				);
 
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT test_user_with_contact_extended.id FROM test_user_with_contact_extended JOIN custom_table AS 3524772f_city_id ON (test_user_with_contact_extended.city_id = 3524772f_city_id.id) WHERE (3524772f_city_id.name = Moscow)'
 			);
 		}
@@ -165,30 +167,30 @@ public function testValueObject()
 		public function testDialectStringObjects()
 		{
 			$criteria =
-				Criteria::create(TestUser::dao())->
+				\Onphp\Criteria::create(TestUser::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				)->
 				add(
-					Expression::gt('registered', Date::create('2011-01-01'))
+					\Onphp\Expression::gt('registered', \Onphp\Date::create('2011-01-01'))
 				);
 			
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT test_user.id FROM test_user WHERE (test_user.registered > 2011-01-01)'
 			);
 			
 			$criteria =
-				Criteria::create(TestUserWithContactExtended::dao())->
+				\Onphp\Criteria::create(TestUserWithContactExtended::dao())->
 				setProjection(
-					Projection::property('contactExt.city.id', 'cityId')
+					\Onphp\Projection::property('contactExt.city.id', 'cityId')
 				)->
 				add(
-					Expression::eq('contactExt.city', TestCity::create()->setId(22))
+					\Onphp\Expression::eq('contactExt.city', TestCity::create()->setId(22))
 				);
 			
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT test_user_with_contact_extended.city_id AS cityId FROM test_user_with_contact_extended WHERE (test_user_with_contact_extended.city_id = 22)'
 			);
 			
@@ -198,34 +200,34 @@ public function testDialectStringObjects()
 			);
 			
 			$criteria =
-				Criteria::create(TestUser::dao())->
+				\Onphp\Criteria::create(TestUser::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				)->
 				add(
-					Expression::in('city', $cityList)
+					\Onphp\Expression::in('city', $cityList)
 				);
 			
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT test_user.id FROM test_user WHERE (test_user.city_id IN (3, 44))'
 			);
 		}
 		
 		public function testSqlFunction()
 		{
-			$criteria = Criteria::create(TestCity::dao())->
+			$criteria = \Onphp\Criteria::create(TestCity::dao())->
 				addProjection(
-					Projection::property(
-						SQLFunction::create(
+					\Onphp\Projection::property(
+						\Onphp\SQLFunction::create(
 							'count',
-							SQLFunction::create(
+							\Onphp\SQLFunction::create(
 								'substring',
-								BinaryExpression::create(
+								\Onphp\BinaryExpression::create(
 									'name',
-									BinaryExpression::create(
-										DBValue::create('M....w'),
-										DBValue::create('#'),
+									\Onphp\BinaryExpression::create(
+										\Onphp\DBValue::create('M....w'),
+										\Onphp\DBValue::create('#'),
 										'for'
 									)->
 									noBrackets(),
@@ -240,7 +242,7 @@ public function testSqlFunction()
 				);
 			
 			$this->assertEquals(
-				$criteria->toDialectString(ImaginaryDialect::me()),
+				$criteria->toDialectString(\Onphp\ImaginaryDialect::me()),
 				'SELECT count(DISTINCT substring(custom_table.name from M....w for #)) AS my_alias FROM custom_table'
 			);
 		}
@@ -248,7 +250,7 @@ public function testSqlFunction()
 		public function testSleepWithEmptyDao()
 		{
 			$baseCriteria =
-				Criteria::create()->
+				\Onphp\Criteria::create()->
 				setLimit(10);
 			
 			$newBaseCriteria =
@@ -268,8 +270,8 @@ public function testSleepWithEmptyDao()
 		public function testForgottenDao()
 		{
 			$criteria =
-				Criteria::create()->
-				add(Expression::eq('id', 42));
+				\Onphp\Criteria::create()->
+				add(\Onphp\Expression::eq('id', 42));
 			
 			$listCriteria = clone $criteria;
 			
@@ -277,37 +279,37 @@ public function testForgottenDao()
 				$listCriteria->getList();
 				
 				$this->fail();
-			} catch (WrongStateException $e) {/*it's good*/}
+			} catch (\Onphp\WrongStateException $e) {/*it's good*/}
 			
 			$customCriteria = clone $criteria;
 			
 			try {
 				$customCriteria->
-					addProjection(Projection::property('id'))->
+					addProjection(\Onphp\Projection::property('id'))->
 					getCustomList();
 				
 				$this->fail();
-			} catch (WrongStateException $e) {/*it's good*/}
+			} catch (\Onphp\WrongStateException $e) {/*it's good*/}
 		}
 
 		public static function orderDataProvider()
 		{
 			return array(
-				array(OrderBy::create('id'), 'test_user.id'),
+				array(\Onphp\OrderBy::create('id'), 'test_user.id'),
 				array(
-					OrderChain::create()->
-						add(OrderBy::create('id')->asc())->
-						add(OrderBy::create('id')),
+					\Onphp\OrderChain::create()->
+						add(\Onphp\OrderBy::create('id')->asc())->
+						add(\Onphp\OrderBy::create('id')),
 					'test_user.id ASC, test_user.id'
 				),
-				array(OrderBy::create('id')->asc(), 'test_user.id ASC'),
-				array(OrderBy::create('id')->desc(), 'test_user.id DESC'),
-				array(OrderBy::create('id')->nullsFirst(), 'test_user.id NULLS FIRST'),
-				array(OrderBy::create('id')->nullsLast(), 'test_user.id NULLS LAST'),
-				array(OrderBy::create('id')->asc()->nullsLast(), 'test_user.id ASC NULLS LAST'),
-				array(OrderBy::create('id')->desc()->nullsFirst(), 'test_user.id DESC NULLS FIRST'),
+				array(\Onphp\OrderBy::create('id')->asc(), 'test_user.id ASC'),
+				array(\Onphp\OrderBy::create('id')->desc(), 'test_user.id DESC'),
+				array(\Onphp\OrderBy::create('id')->nullsFirst(), 'test_user.id NULLS FIRST'),
+				array(\Onphp\OrderBy::create('id')->nullsLast(), 'test_user.id NULLS LAST'),
+				array(\Onphp\OrderBy::create('id')->asc()->nullsLast(), 'test_user.id ASC NULLS LAST'),
+				array(\Onphp\OrderBy::create('id')->desc()->nullsFirst(), 'test_user.id DESC NULLS FIRST'),
 				array(
-					OrderBy::create(Expression::isNull('id'))->
+					\Onphp\OrderBy::create(\Onphp\Expression::isNull('id'))->
 						asc()->
 						nullsFirst(),
 					'((test_user.id IS NULL)) ASC NULLS FIRST'
diff --git a/test/main/CrypterTest.class.php b/test/main/CrypterTest.class.php
index c8d543717f..149137acc9 100644
--- a/test/main/CrypterTest.class.php
+++ b/test/main/CrypterTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class CrypterTest extends TestCase
 	{
 		/**
@@ -36,7 +38,7 @@ private static function getCrypter()
 			static $crypter;
 
 			if (!$crypter)
-				$crypter = Crypter::create(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);
+				$crypter = \Onphp\Crypter::create(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);
 
 			return $crypter;
 		}
diff --git a/test/main/CryptoTest.class.php b/test/main/CryptoTest.class.php
index 335a9dfb21..410d254eb3 100644
--- a/test/main/CryptoTest.class.php
+++ b/test/main/CryptoTest.class.php
@@ -9,14 +9,16 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class CryptoTest extends TestCase
 	{
 		public function runDiffieHellmanExchange(
-			BigNumberFactory $factory,
-			RandomSource $source
+			\Onphp\BigNumberFactory $factory,
+			\Onphp\RandomSource $source
 		)
 		{
-			$parameters = DiffieHellmanParameters::create(
+			$parameters = \Onphp\DiffieHellmanParameters::create(
 				$factory->makeNumber(2),
 				$factory->makeNumber(
 					'155172898181473697471232257763715539915724801'
@@ -29,8 +31,8 @@ public function runDiffieHellmanExchange(
 				)
 			);
 			
-			$sideA = DiffieHellmanKeyPair::generate($parameters, $source);
-			$sideB = DiffieHellmanKeyPair::generate($parameters, $source);
+			$sideA = \Onphp\DiffieHellmanKeyPair::generate($parameters, $source);
+			$sideB = \Onphp\DiffieHellmanKeyPair::generate($parameters, $source);
 			
 			$this->assertEquals(
 				$sideA->makeSharedKey($sideB->getPublic())->toString(),
@@ -38,15 +40,15 @@ public function runDiffieHellmanExchange(
 			);
 		}
 		
-		public function runDiffieHellmanGeneration(BigNumberFactory $factory)
+		public function runDiffieHellmanGeneration(\Onphp\BigNumberFactory $factory)
 		{
-			$parameters = DiffieHellmanParameters::create(
+			$parameters = \Onphp\DiffieHellmanParameters::create(
 				$factory->makeNumber(2),
 				$factory->makeNumber(126)
 			);
 			
 			$sourceA = new RandomSourceStub("\x02");
-			$pairA = DiffieHellmanKeyPair::generate($parameters, $sourceA);
+			$pairA = \Onphp\DiffieHellmanKeyPair::generate($parameters, $sourceA);
 			$this->assertEquals(
 				$pairA->getPublic()->toString(),
 				'4'
@@ -58,7 +60,7 @@ public function runDiffieHellmanGeneration(BigNumberFactory $factory)
 			
 			
 			$sourceB = new RandomSourceStub("\x03");
-			$pairB = DiffieHellmanKeyPair::generate($parameters, $sourceB);
+			$pairB = \Onphp\DiffieHellmanKeyPair::generate($parameters, $sourceB);
 			$this->assertEquals(
 				$pairB->getPublic()->toString(),
 				'8'
@@ -85,8 +87,8 @@ public function runDiffieHellmanGeneration(BigNumberFactory $factory)
 					)->
 					toBinary()
 			);
-			$bigPair = DiffieHellmanKeyPair::generate(
-				DiffieHellmanParameters::create(
+			$bigPair = \Onphp\DiffieHellmanKeyPair::generate(
+				\Onphp\DiffieHellmanParameters::create(
 					$factory->makeNumber(2),
 					$factory->makeNumber(
 						'155172898181473697471232257763715539915724801966915404479707795314057629378541917580651227423698188993727816152646631438561595825688188889951272158842675419950341258706556549803580104870537681476726513255747040765857479291291572334510643245094715007229621094194349783925984760375594985848253359305585439638443'
@@ -120,22 +122,22 @@ public function runDiffieHellmanGeneration(BigNumberFactory $factory)
 			if (!extension_loaded('gmp')) {
 				try {
 					dl('gmp.so');
-				} catch (BaseException $e) {
+				} catch (\Onphp\BaseException $e) {
 					return $this->markTestSkipped('gmp module not available');
 				}
 			}
 			
-			$this->runDiffieHellmanGeneration(GmpBigIntegerFactory::me());
+			$this->runDiffieHellmanGeneration(\Onphp\GmpBigIntegerFactory::me());
 			
 			$this->runDiffieHellmanExchange(
-				GmpBigIntegerFactory::me(),
-				MtRandomSource::me()
+				\Onphp\GmpBigIntegerFactory::me(),
+				\Onphp\MtRandomSource::me()
 			);
 			
 			if (file_exists('/dev/urandom') && is_readable('/dev/urandom'))
 				$this->runDiffieHellmanExchange(
-					GmpBigIntegerFactory::me(),
-					new FileRandomSource('/dev/urandom')
+					\Onphp\GmpBigIntegerFactory::me(),
+					new \Onphp\FileRandomSource('/dev/urandom')
 				);
 		}
 		
@@ -145,64 +147,64 @@ public function runDiffieHellmanGeneration(BigNumberFactory $factory)
 		public function testHmacsha1()
 		{
 			$this->assertEquals(
-				TextUtils::hex2Binary('b617318655057264e28bc0b6fb378c8ef146be00'),
-				CryptoFunctions::hmacsha1(
-					TextUtils::hex2Binary('0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b'),
+				\Onphp\TextUtils::hex2Binary('b617318655057264e28bc0b6fb378c8ef146be00'),
+				\Onphp\CryptoFunctions::hmacsha1(
+					\Onphp\TextUtils::hex2Binary('0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b'),
 					"Hi There"
 				)
 			);
 			
 			$this->assertEquals(
-				CryptoFunctions::hmacsha1(
+				\Onphp\CryptoFunctions::hmacsha1(
 					"Jefe",
 					"what do ya want for nothing?"
 				),
-				TextUtils::hex2Binary('effcdf6ae5eb2fa2d27416d5f184df9c259a7c79')
+				\Onphp\TextUtils::hex2Binary('effcdf6ae5eb2fa2d27416d5f184df9c259a7c79')
 			);
 			
 			$this->assertEquals(
-				CryptoFunctions::hmacsha1(
-					TextUtils::hex2Binary('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
-					TextUtils::hex2Binary('dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd')
+				\Onphp\CryptoFunctions::hmacsha1(
+					\Onphp\TextUtils::hex2Binary('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
+					\Onphp\TextUtils::hex2Binary('dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd')
 				),
-				TextUtils::hex2Binary('125d7342b9ac11cd91a39af48aa17b4f63f175d3')
+				\Onphp\TextUtils::hex2Binary('125d7342b9ac11cd91a39af48aa17b4f63f175d3')
 			);
 			
 			$this->assertEquals(
-				CryptoFunctions::hmacsha1(
-					TextUtils::hex2Binary('0102030405060708090a0b0c0d0e0f10111213141516171819'),
-					TextUtils::hex2Binary('cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd')
+				\Onphp\CryptoFunctions::hmacsha1(
+					\Onphp\TextUtils::hex2Binary('0102030405060708090a0b0c0d0e0f10111213141516171819'),
+					\Onphp\TextUtils::hex2Binary('cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd')
 				),
-				TextUtils::hex2Binary('4c9007f4026250c6bc8414f9bf50c86c2d7235da')
+				\Onphp\TextUtils::hex2Binary('4c9007f4026250c6bc8414f9bf50c86c2d7235da')
 			);
 			
 			$this->assertEquals(
-				CryptoFunctions::hmacsha1(
-					TextUtils::hex2Binary('0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c'),
+				\Onphp\CryptoFunctions::hmacsha1(
+					\Onphp\TextUtils::hex2Binary('0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c'),
 					"Test With Truncation"
 				),
-				TextUtils::hex2Binary('4c1a03424b55e07fe7f27be1d58bb9324a9a5a04')
+				\Onphp\TextUtils::hex2Binary('4c1a03424b55e07fe7f27be1d58bb9324a9a5a04')
 			);
 			
 			$this->assertEquals(
-				CryptoFunctions::hmacsha1(
-					TextUtils::hex2Binary('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
+				\Onphp\CryptoFunctions::hmacsha1(
+					\Onphp\TextUtils::hex2Binary('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
 					"Test Using Larger Than Block-Size Key - Hash Key First"
 				),
-				TextUtils::hex2Binary('aa4ae5e15272d00e95705637ce8a3b55ed402112')
+				\Onphp\TextUtils::hex2Binary('aa4ae5e15272d00e95705637ce8a3b55ed402112')
 			);
 			
 			$this->assertEquals(
-				CryptoFunctions::hmacsha1(
-					TextUtils::hex2Binary('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
+				\Onphp\CryptoFunctions::hmacsha1(
+					\Onphp\TextUtils::hex2Binary('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
 					"Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"
 				),
-				TextUtils::hex2Binary('e8e99d0f45237d786d6bbaa7965c7808bbff1a91')
+				\Onphp\TextUtils::hex2Binary('e8e99d0f45237d786d6bbaa7965c7808bbff1a91')
 			);
 		}
 	}
 	
-	class RandomSourceStub implements RandomSource
+	class RandomSourceStub implements \Onphp\RandomSource
 	{
 		private $data = null;
 		
diff --git a/test/main/CsvTest.class.php b/test/main/CsvTest.class.php
index 4bc493d2f1..0bd9ec2592 100644
--- a/test/main/CsvTest.class.php
+++ b/test/main/CsvTest.class.php
@@ -9,7 +9,9 @@
  *                                                                         *
  ***************************************************************************/
 	
-	final class CsvTest extends PHPUnit_Framework_TestCase
+	namespace Onphp\Test;
+
+	final class CsvTest extends \PHPUnit_Framework_TestCase
 	{
 		public function testRender()
 		{
@@ -19,23 +21,23 @@ public function testRender()
 			);
 			
 			$string =
-				'1,2.2,-3,'.Csv::CRLF
-				."\"5\n5\",6'6,\"7\"\"7\",\"8,8\"".Csv::CRLF;
+				'1,2.2,-3,'.\Onphp\Csv::CRLF
+				."\"5\n5\",6'6,\"7\"\"7\",\"8,8\"".\Onphp\Csv::CRLF;
 			
-			$csv = Csv::create()->setArray($array);
+			$csv = \Onphp\Csv::create()->setArray($array);
 			$this->assertEquals($csv->render(), $string);
 		}
 		
 		public function testContentHeader()
 		{
-			$csv = Csv::create(false);
+			$csv = \Onphp\Csv::create(false);
 			
 			$this->assertEquals(
 				$csv->getContentTypeHeader()->toString(),
 				'text/csv; header="absent"'
 			);
 			
-			$csv = Csv::create(true);
+			$csv = \Onphp\Csv::create(true);
 			
 			$this->assertEquals(
 				$csv->getContentTypeHeader()->toString(),
diff --git a/test/main/DateUtilsTest.class.php b/test/main/DateUtilsTest.class.php
index e2f2c45905..766d846b10 100644
--- a/test/main/DateUtilsTest.class.php
+++ b/test/main/DateUtilsTest.class.php
@@ -1,13 +1,15 @@
 <?php
-	final class DateUtilsTest extends PHPUnit_Framework_TestCase
+	namespace Onphp\Test;
+
+	final class DateUtilsTest extends \PHPUnit_Framework_TestCase
 	{
 		/**
 		 * @dataProvider alignToSecondsDataProvider
 		**/
-		public function testAlignToSeconds(Timestamp $stamp, $expected)
+		public function testAlignToSeconds(\Onphp\Timestamp $stamp, $expected)
 		{
 			$this->assertEquals(
-				DateUtils::alignToSeconds($stamp, 42)->toString(),
+				\Onphp\DateUtils::alignToSeconds($stamp, 42)->toString(),
 				$expected
 			);
 		}
@@ -16,19 +18,19 @@ public static function alignToSecondsDataProvider()
 		{
 			return array(
 				array(
-					Timestamp::create('2009-01-01 10:00:42'),
+					\Onphp\Timestamp::create('2009-01-01 10:00:42'),
 					'2009-01-01 10:00:42'
 				),
 				array(
-					Timestamp::create('2009-01-01 10:00:41'),
+					\Onphp\Timestamp::create('2009-01-01 10:00:41'),
 					'2009-01-01 10:00:00'
 				),
 				array(
-					Timestamp::create('2009-01-01 10:01:34'),
+					\Onphp\Timestamp::create('2009-01-01 10:01:34'),
 					'2009-01-01 10:01:24'
 				),
 				array(
-					Timestamp::create('2009-01-01 10:10:01'),
+					\Onphp\Timestamp::create('2009-01-01 10:10:01'),
 					'2009-01-01 10:09:48'
 				)
 			);
diff --git a/test/main/EntityProtoConvertersTest.class.php b/test/main/EntityProtoConvertersTest.class.php
index 640db72590..31d6888ce9 100644
--- a/test/main/EntityProtoConvertersTest.class.php
+++ b/test/main/EntityProtoConvertersTest.class.php
@@ -9,12 +9,14 @@
  *                                                                         *
  ***************************************************************************/
 
-	final class EntityProtoConvertersTest extends PHPUnit_Framework_TestCase
+	namespace Onphp\Test;
+
+	final class EntityProtoConvertersTest extends \PHPUnit_Framework_TestCase
 	{
 		public function testDirectoryBinder()
 		{
-			$converter = DirectoryToObjectBinder::create(
-				Singleton::getInstance('EntityProtoDirectoryItem')
+			$converter = \Onphp\DirectoryToObjectBinder::create(
+				\Onphp\Singleton::getInstance('\Onphp\Test\EntityProtoDirectoryItem')
 			);
 			
 			$directoryContext = ONPHP_TEST_PATH.'main/data/directory';
@@ -32,8 +34,8 @@ public function testDirectoryBinder()
 			
 			$newDirectoryContext = ONPHP_TEMP_PATH.'tests/main/data/directory';
 			
-			$unconverter = ObjectToDirectoryBinder::create(
-				Singleton::getInstance('EntityProtoDirectoryItem')
+			$unconverter = \Onphp\ObjectToDirectoryBinder::create(
+				\Onphp\Singleton::getInstance('\Onphp\Test\EntityProtoDirectoryItem')
 			)->
 				setDirectory($newDirectoryContext);
 			
@@ -92,8 +94,8 @@ public function testReadSymlinks()
 			
 			$ringDir = ONPHP_TEMP_PATH.'tests/main/data/ring';
 			
-			$converter = DirectoryToObjectBinder::create(
-				Singleton::getInstance('EntityProtoDirectoryItem')
+			$converter = \Onphp\DirectoryToObjectBinder::create(
+				\Onphp\Singleton::getInstance('\Onphp\Test\EntityProtoDirectoryItem')
 			);
 			
 			$result = $converter->make($ringDir);
@@ -131,8 +133,8 @@ private function createContainers()
 		{
 			$ringDir = ONPHP_TEMP_PATH.'tests/main/data/ring';
 			
-			$converter = ObjectToDirectoryBinder::create(
-				Singleton::getInstance('EntityProtoDirectoryItem')
+			$converter = \Onphp\ObjectToDirectoryBinder::create(
+				\Onphp\Singleton::getInstance('\Onphp\Test\EntityProtoDirectoryItem')
 			)->
 				setDirectory($ringDir);
 			
@@ -172,7 +174,7 @@ private function createContainers()
 		}
 	}
 	
-	abstract class DirectoryItemBase implements Identifiable
+	abstract class DirectoryItemBase implements \Onphp\Identifiable
 	{
 		protected $textField;
 		protected $fileName;
@@ -257,29 +259,29 @@ public static function create()
 		}
 	}
 	
-	final class EntityProtoDirectoryItem extends EntityProto
+	final class EntityProtoDirectoryItem extends \Onphp\EntityProto
 	{
 		public function className()
 		{
-			return 'DirectoryItem';
+			return '\Onphp\Test\DirectoryItem';
 		}
 		
 		public function getFormMapping()
 		{
 			return array(
-				'items' => Primitive::formsList('items')->
-					of('DirectoryItem')->
+				'items' => \Onphp\Primitive::formsList('items')->
+					of('\Onphp\Test\DirectoryItem')->
 					required(),
 				
-				'textField' => Primitive::string('textField')->
+				'textField' => \Onphp\Primitive::string('textField')->
 					setMax(256)->
 					optional(),
 				
-				'fileName' => Primitive::file('contents')->
+				'fileName' => \Onphp\Primitive::file('contents')->
 					required(),
 				
-				'inner' => Primitive::form('inner')->
-					of('DirectoryItem')->
+				'inner' => \Onphp\Primitive::form('inner')->
+					of('\Onphp\Test\DirectoryItem')->
 					optional(),
 			);
 		}
diff --git a/test/main/EnumerationTest.class.php b/test/main/EnumerationTest.class.php
index f9441c60cb..30e47d255e 100644
--- a/test/main/EnumerationTest.class.php
+++ b/test/main/EnumerationTest.class.php
@@ -1,12 +1,14 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class EnumerationTest extends TestCase
 	{
 		public function testAnyId()
 		{
 			foreach (get_declared_classes() as $className) {
-				if (is_subclass_of($className, 'Enumeration')) {
+				if (is_subclass_of($className, '\Onphp\Enumeration')) {
 					try {
 						$enum = new $className(
 							call_user_func(
@@ -15,17 +17,17 @@ public function testAnyId()
 						);
 						
 						/* pass */
-					} catch (MissingElementException $e) {
+					} catch (\Onphp\MissingElementException $e) {
 						$this->fail($className);
 					}
-				} elseif(is_subclass_of($className, 'Enum')) {
+				} elseif(is_subclass_of($className, '\Onphp\Enum')) {
 					try {
 						$enum = new $className(
-							ClassUtils::callStaticMethod($className.'::getAnyId')
+							\Onphp\ClassUtils::callStaticMethod($className.'::getAnyId')
 						);
 
 						/* pass */
-					} catch (MissingElementException $e) {
+					} catch (\Onphp\MissingElementException $e) {
 						$this->fail($className);
 					}
 				}
diff --git a/test/main/FeedReaderTest.class.php b/test/main/FeedReaderTest.class.php
index 3db7377e93..a3978c05bd 100644
--- a/test/main/FeedReaderTest.class.php
+++ b/test/main/FeedReaderTest.class.php
@@ -1,15 +1,17 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class FeedReaderTest extends TestCase
 	{
 		public function testFeedReaderRss()
 		{
 			$feedChannel =
-				FeedReader::create()->
+				\Onphp\FeedReader::create()->
 				parseFile(dirname(__FILE__).'/data/feedReader/news.xml');
 			
-			$this->assertTrue($feedChannel instanceof FeedChannel);
+			$this->assertTrue($feedChannel instanceof \Onphp\FeedChannel);
 			
 			$feedItems = $feedChannel->getFeedItems();
 			
@@ -26,12 +28,12 @@ public function testFeedReaderRss()
 		public function testFeedReaderAtom()
 		{
 			$feedChannel =
-				FeedReader::create()->
+				\Onphp\FeedReader::create()->
 				parseFile(dirname(__FILE__).'/data/feedReader/atom_v1_0.xml');
 			
 			$feedItems = $feedChannel->getFeedItems();
 			
-			$this->assertTrue($feedChannel instanceof FeedChannel);
+			$this->assertTrue($feedChannel instanceof \Onphp\FeedChannel);
 			
 			$this->assertEquals(count($feedItems), 12);
 			
@@ -44,13 +46,13 @@ public function testFeedReaderAtom()
 		public function testFeedReaderYandexRss()
 		{
 			$feedChannel =
-				FeedReader::create()->
+				\Onphp\FeedReader::create()->
 				parseFile(dirname(__FILE__).'/data/feedReader/yandex_rss.xml');
 
 			$feedItems = $feedChannel->getFeedItems();
 			
-			$this->assertTrue($feedChannel instanceof FeedChannel);
-			$this->assertTrue($feedItems[1] instanceof YandexRssFeedItem);
+			$this->assertTrue($feedChannel instanceof \Onphp\FeedChannel);
+			$this->assertTrue($feedItems[1] instanceof \Onphp\YandexRssFeedItem);
 			
 			$this->assertEquals(count($feedItems), 3);
 			
diff --git a/test/main/FloatRangeTest.class.php b/test/main/FloatRangeTest.class.php
index 311e4d8c32..8c8851a290 100644
--- a/test/main/FloatRangeTest.class.php
+++ b/test/main/FloatRangeTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class FloatRangeTest extends TestCase
 	{
 		/**
@@ -7,9 +9,9 @@ final class FloatRangeTest extends TestCase
 		public function testCreation($min, $max, $throwsException)
 		{
 			if ($throwsException)
-				$this->setExpectedException('WrongArgumentException');
+				$this->setExpectedException('\Onphp\WrongArgumentException');
 			
-			$range = FloatRange::create($min, $max);
+			$range = \Onphp\FloatRange::create($min, $max);
 		} 
 		
 		public static function rangeDataProvider()
diff --git a/test/main/GenericUriTest.class.php b/test/main/GenericUriTest.class.php
index 582008f892..cb8ab9b7a1 100644
--- a/test/main/GenericUriTest.class.php
+++ b/test/main/GenericUriTest.class.php
@@ -4,6 +4,8 @@
  *   dedmajor@oemdesign.ru                                                 *
  ***************************************************************************/
 	
+	namespace Onphp\Test;
+
 	final class GenericUriTest extends TestCase
 	{
 		private $urls = array(
@@ -51,16 +53,16 @@ final class GenericUriTest extends TestCase
 			'mailto:astark1@unl.edu,ASTARK1@UNL.EDU?subject=MailTo Comments&cc=ASTARK1@UNL.EDU&bcc=id@internet.node' => null,
 			
 			'//ya0.ru'	=> null,
-			'//yandex.ru'	=> 'Url',
-			'//yandex.ru:80'	=> 'Url',
+			'//yandex.ru'	=> '\Onphp\Url',
+			'//yandex.ru:80'	=> '\Onphp\Url',
 			'ya1.ru'	=> null,
-			'ya2.ru'	=> 'Url',
-			'ya3.ru'	=> 'HttpUrl',
-			'http:ya4.ru'	=> 'HttpUrl',
-			'http:/ya5.ru'	=> 'HttpUrl',
-			'http:///ya6.ru'	=> 'HttpUrl',
+			'ya2.ru'	=> '\Onphp\Url',
+			'ya3.ru'	=> '\Onphp\HttpUrl',
+			'http:ya4.ru'	=> '\Onphp\HttpUrl',
+			'http:/ya5.ru'	=> '\Onphp\HttpUrl',
+			'http:///ya6.ru'	=> '\Onphp\HttpUrl',
 			
-			'hTTP://onphp.org'	=> 'HttpUrl',
+			'hTTP://onphp.org'	=> '\Onphp\HttpUrl',
 		);
 		
 		public function testParser()
@@ -90,15 +92,15 @@ public function testParser()
 				$exception = null;
 				
 				if (!$parserClass)
-					$parserClass = 'GenericUri';
+					$parserClass = '\Onphp\GenericUri';
 				
 				try {
-					$url = ClassUtils::callStaticMethod("$parserClass::parse", $testUrl, true);
-				} catch (WrongArgumentException $e) {
+					$url = \Onphp\ClassUtils::callStaticMethod("$parserClass::parse", $testUrl, true);
+				} catch (\Onphp\WrongArgumentException $e) {
 					$exception = $e;
 				}
 				
-				$fix = $parserClass == 'HttpUrl';
+				$fix = $parserClass == '\Onphp\HttpUrl';
 				
 				if ($fix)
 					$url->ensureAbsolute();
diff --git a/test/main/GoogleChartTest.class.php b/test/main/GoogleChartTest.class.php
index eda642eb20..a098c9b78f 100644
--- a/test/main/GoogleChartTest.class.php
+++ b/test/main/GoogleChartTest.class.php
@@ -1,33 +1,35 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class GoogleChartTest extends TestCase
 	{
 		public function testPieChart()
 		{
 			$chart =
-				GooglePieChart::create()->
+				\Onphp\GooglePieChart::create()->
 				setSize(
-					GoogleChartSize::create()->
+					\Onphp\GoogleChartSize::create()->
 					setWidth(500)->
 					setHeight(300)
 				)->
 				addPiece(
-					GoogleChartPiece::create()->
+					\Onphp\GoogleChartPiece::create()->
 					setTitle('Nokia')->
-					setColor(Color::create('ff0000'))->
+					setColor(\Onphp\Color::create('ff0000'))->
 					setValue(40)
 				)->
 				addPiece(
-					GoogleChartPiece::create()->
+					\Onphp\GoogleChartPiece::create()->
 					setTitle('Samsung')->
-					setColor(Color::create('336677'))->
+					setColor(\Onphp\Color::create('336677'))->
 					setValue(35)
 				)->
 				addPiece(
-					GoogleChartPiece::create()->
+					\Onphp\GoogleChartPiece::create()->
 					setTitle('Opera')->
-					setColor(Color::create('112200'))->
+					setColor(\Onphp\Color::create('112200'))->
 					setValue(25)
 				);
 			
@@ -40,42 +42,42 @@ public function testPieChart()
 		public function testTwoAxisLineChart()
 		{
 			$views =
-				GoogleChartDataSet::create()->
+				\Onphp\GoogleChartDataSet::create()->
 				setData(array(195, 191, 197, 183, 199, 195));
 			
 			$clicks =
-				GoogleChartDataSet::create()->
+				\Onphp\GoogleChartDataSet::create()->
 				setData(array(3, 1, 1, 3, 1, 3));
 			
 			$chart =
-				GoogleLineChart::create()->
+				\Onphp\GoogleLineChart::create()->
 				setSize(
-					GoogleChartSize::create()->
+					\Onphp\GoogleChartSize::create()->
 					setWidth(300)->
 					setHeight(300)
 				)->
 				addAxis(
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::Y)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::Y)
 					)->
-					setRange(IntegerSet::create(0, $views->getMax()))
+					setRange(\Onphp\IntegerSet::create(0, $views->getMax()))
 				)->
 				addAxis(
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::R)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::R)
 					)->
-					setRange(IntegerSet::create(0, $clicks->getMax()))
+					setRange(\Onphp\IntegerSet::create(0, $clicks->getMax()))
 				)->
 				addLine(
-					GoogleChartLine::create()->
+					\Onphp\GoogleChartLine::create()->
 					setTitle('Показы')->
-					setColor(Color::create('336699'))->
+					setColor(\Onphp\Color::create('336699'))->
 					setValue($views)
 				)->
 				addLine(
-					GoogleChartLine::create()->
+					\Onphp\GoogleChartLine::create()->
 					setTitle('Клики')->
-					setColor(Color::create('996633'))->
+					setColor(\Onphp\Color::create('996633'))->
 					setValue($clicks)
 				);
 			
@@ -88,11 +90,11 @@ public function testTwoAxisLineChart()
 		public function testThreeAxisLineChart()
 		{
 			$views =
-				GoogleChartDataSet::create()->
+				\Onphp\GoogleChartDataSet::create()->
 				setData(array(195, 191, 197, 183, 199, 195));
 			
 			$clicks =
-				GoogleChartDataSet::create()->
+				\Onphp\GoogleChartDataSet::create()->
 				setData(array(3, 1, 1, 3, 1, 3));
 			
 			$days =
@@ -106,46 +108,46 @@ public function testThreeAxisLineChart()
 				);
 			
 			$chart =
-				GoogleLineChart::create()->
+				\Onphp\GoogleLineChart::create()->
 				setSize(
-					GoogleChartSize::create()->
+					\Onphp\GoogleChartSize::create()->
 					setWidth(640)->
 					setHeight(240)
 				)->
 				addAxis(
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::Y)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::Y)
 					)->
-					setRange(IntegerSet::create(0, $views->getMax()))
+					setRange(\Onphp\IntegerSet::create(0, $views->getMax()))
 				)->
 				addAxis(
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::R)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::R)
 					)->
-					setRange(IntegerSet::create(0, $clicks->getMax()))
+					setRange(\Onphp\IntegerSet::create(0, $clicks->getMax()))
 				)->
 				addAxis(
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::X)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::X)
 					)->
 					setLabel(
-						GoogleChartAxisLabel::create()->
+						\Onphp\GoogleChartAxisLabel::create()->
 						setLabels($days)
 					)
 				)->
 				addLine(
-					GoogleChartLine::create()->
+					\Onphp\GoogleChartLine::create()->
 					setTitle('Показы')->
-					setColor(Color::create('336699'))->
+					setColor(\Onphp\Color::create('336699'))->
 					setValue($views)
 				)->
 				addLine(
-					GoogleChartLine::create()->
+					\Onphp\GoogleChartLine::create()->
 					setTitle('Клики')->
-					setColor(Color::create('996633'))->
+					setColor(\Onphp\Color::create('996633'))->
 					setValue($clicks)->
 					setStyle(
-						ChartLineStyle::create()->
+						\Onphp\ChartLineStyle::create()->
 						setThickness(2)
 					)
 				);
@@ -159,13 +161,13 @@ public function testThreeAxisLineChart()
 		public function testGridedLineChart()
 		{
 			$views =
-				GoogleChartDataSet::create()->
+				\Onphp\GoogleChartDataSet::create()->
 				setData(
 					array(0,0,20,2491,2334,0)
 				);
 			
 			$clicks =
-				GoogleChartDataSet::create()->
+				\Onphp\GoogleChartDataSet::create()->
 				setData(
 					array(0,0,10,480,530,0)
 				);
@@ -177,54 +179,54 @@ public function testGridedLineChart()
 			$clicks->setBase(pow(10, floor(log10($clicks->getMax()))));
 			
 			$viewAxis =
-				GoogleChartAxis::create(
-					new GoogleChartAxisType(GoogleChartAxisType::Y)
+				\Onphp\GoogleChartAxis::create(
+					new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::Y)
 				)->
 				setRange($views->getMinMax())->
 				setInterval($views->getBase());
 			
 			$clickAxis =
-				GoogleChartAxis::create(
-					new GoogleChartAxisType(GoogleChartAxisType::R)
+				\Onphp\GoogleChartAxis::create(
+					new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::R)
 				)->
 				setRange($clicks->getMinMax())->
 				setInterval($clicks->getBase());
 			
 			$chart =
-				GoogleGridedLineChart::create()->
+				\Onphp\GoogleGridedLineChart::create()->
 				setSize(
-					GoogleChartSize::create()->
+					\Onphp\GoogleChartSize::create()->
 					setWidth(640)->
 					setHeight(240)
 				)->
 				addAxis($viewAxis)->
 				addAxis($clickAxis)->
 				addAxis(
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::X)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::X)
 					)->
 					setLabel(
-						GoogleChartAxisLabel::create()->
+						\Onphp\GoogleChartAxisLabel::create()->
 						setLabels($days)
 					)
 				)->
 				addLine(
-					GoogleChartLine::create()->
+					\Onphp\GoogleChartLine::create()->
 					setTitle('Показы')->
-					setColor(Color::create('6699cc'))->
+					setColor(\Onphp\Color::create('6699cc'))->
 					setValue($views)->
 					setStyle(
-						ChartLineStyle::create()->
+						\Onphp\ChartLineStyle::create()->
 						setThickness(2)
 					)
 				)->
 				addLine(
-					GoogleChartLine::create()->
+					\Onphp\GoogleChartLine::create()->
 					setTitle('Клики')->
-					setColor(Color::create('339922'))->
+					setColor(\Onphp\Color::create('339922'))->
 					setValue($clicks)->
 					setStyle(
-						ChartLineStyle::create()->
+						\Onphp\ChartLineStyle::create()->
 						setThickness(2)
 					)
 				);
@@ -235,7 +237,7 @@ public function testGridedLineChart()
 			);
 			
 			$chart->setGrid(
-				GoogleChartGrid::create()->
+				\Onphp\GoogleChartGrid::create()->
 				setVerticalStepSize(10)
 			);
 			
@@ -252,7 +254,7 @@ public function testOneAxis($axisData, $result)
 		{
 			foreach ($result as $chartClass => $expectedString) {
 				$views =
-					GoogleChartDataSet::create()->
+					\Onphp\GoogleChartDataSet::create()->
 					setData($axisData);
 				
 				$chart = new $chartClass;
@@ -267,8 +269,8 @@ public function testOneAxis($axisData, $result)
 				}
 				
 				$axis =
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::Y)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::Y)
 					)->
 					setRange($views->getMinMax());
 				
@@ -277,21 +279,21 @@ public function testOneAxis($axisData, $result)
 				
 				$chart->
 					setSize(
-						GoogleChartSize::create()->
+						\Onphp\GoogleChartSize::create()->
 						setWidth(300)->
 						setHeight(300)
 					)->
 					addAxis($axis)->
 					addLine(
-						GoogleChartLine::create()->
+						\Onphp\GoogleChartLine::create()->
 						setTitle('Показы')->
-						setColor(Color::create('336699'))->
+						setColor(\Onphp\Color::create('336699'))->
 						setValue($views)->
 						setLabelStyle(
-							ChartLabelStyle::create()->
-							setType(GoogleChartLabelStyleNumberType::create())->
+							\Onphp\ChartLabelStyle::create()->
+							setType(\Onphp\GoogleChartLabelStyleNumberType::create())->
 							setSize(11)->
-							setColor(Color::create('117700'))
+							setColor(\Onphp\Color::create('117700'))
 						)
 					);
 				
@@ -306,11 +308,11 @@ public function testTwoAxis($firstAxisData, $secondtAxisData, $result)
 		{
 			foreach ($result as $chartClass => $expectedString) {
 				$views =
-					GoogleChartDataSet::create()->
+					\Onphp\GoogleChartDataSet::create()->
 					setData($firstAxisData);
 				
 				$clicks =
-					GoogleChartDataSet::create()->
+					\Onphp\GoogleChartDataSet::create()->
 					setData($secondtAxisData);
 				
 				$chart = new $chartClass;
@@ -332,14 +334,14 @@ public function testTwoAxis($firstAxisData, $secondtAxisData, $result)
 				}
 				
 				$viewAxis =
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::Y)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::Y)
 					)->
 					setRange($views->getMinMax());
 				
 				$clickAxis =
-					GoogleChartAxis::create(
-						new GoogleChartAxisType(GoogleChartAxisType::R)
+					\Onphp\GoogleChartAxis::create(
+						new \Onphp\GoogleChartAxisType(\Onphp\GoogleChartAxisType::R)
 					)->
 					setRange($clicks->getMinMax());
 				
@@ -350,22 +352,22 @@ public function testTwoAxis($firstAxisData, $secondtAxisData, $result)
 				
 				$chart->
 					setSize(
-						GoogleChartSize::create()->
+						\Onphp\GoogleChartSize::create()->
 						setWidth(300)->
 						setHeight(300)
 					)->
 					addAxis($viewAxis)->
 					addLine(
-						GoogleChartLine::create()->
+						\Onphp\GoogleChartLine::create()->
 						setTitle('Показы')->
-						setColor(Color::create('336699'))->
+						setColor(\Onphp\Color::create('336699'))->
 						setValue($views)
 					)->
 					addAxis($clickAxis)->
 					addLine(
-						GoogleChartLine::create()->
+						\Onphp\GoogleChartLine::create()->
 						setTitle('Клики')->
-						setColor(Color::create('339911'))->
+						setColor(\Onphp\Color::create('339911'))->
 						setValue($clicks)
 					);
 				
@@ -379,44 +381,44 @@ public static function oneAxisDataProvider()
 				array(
 					array(195, 191, 197, 183, 199, 195),
 					array(
-						'GoogleLineChart' =>
+						'\Onphp\GoogleLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:195,191,197,183,199,195&chds=0,199&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,199&chm=N**,117700,0,-1,11',
-						'GoogleNormalizedLineChart' =>
+						'\Onphp\GoogleNormalizedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:195,191,197,183,199,195&chds=0,200&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,200,100&chm=N**,117700,0,-1,11',
-						'GoogleGridedLineChart' =>
+						'\Onphp\GoogleGridedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:195,191,197,183,199,195&chds=0,200&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,200,100&chm=N**,117700,0,-1,11&chg=0,50,0'
 					)
 				),
 				array(
 					array(0.1, 191, 0.2, 0, 199, 195),
 					array(
-						'GoogleLineChart' =>
+						'\Onphp\GoogleLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0.1,191,0.2,0,199,195&chds=0,199&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,199&chm=N**,117700,0,-1,11',
-						'GoogleNormalizedLineChart' =>
+						'\Onphp\GoogleNormalizedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0.1,191,0.2,0,199,195&chds=0,200&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,200,100&chm=N**,117700,0,-1,11',
-						'GoogleGridedLineChart' =>
+						'\Onphp\GoogleGridedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0.1,191,0.2,0,199,195&chds=0,200&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,200,100&chm=N**,117700,0,-1,11&chg=0,50,0'
 					)
 				),
 				array(
 					array(0.1, 0.24, 1, 0.2, 0.3, 0),
 					array(
-						'GoogleLineChart' =>
+						'\Onphp\GoogleLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0.1,0.24,1,0.2,0.3,0&chds=0,1&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,1&chm=N**,117700,0,-1,11',
-						'GoogleNormalizedLineChart' =>
+						'\Onphp\GoogleNormalizedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0.1,0.24,1,0.2,0.3,0&chds=0,1&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,1,0.1&chm=N**,117700,0,-1,11',
-						'GoogleGridedLineChart' =>
+						'\Onphp\GoogleGridedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0.1,0.24,1,0.2,0.3,0&chds=0,1&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,1,0.1&chm=N**,117700,0,-1,11&chg=0,10,0'
 					)
 				),
 				array(
 					array(0, 0, 0),
 					array(
-						'GoogleLineChart' =>
+						'\Onphp\GoogleLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0,0,0&chds=0,1&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,1&chm=N**,117700,0,-1,11',
-						'GoogleNormalizedLineChart' =>
+						'\Onphp\GoogleNormalizedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0,0,0&chds=0,0.1&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,0.1,0.1&chm=N**,117700,0,-1,11',
-						'GoogleGridedLineChart' =>
+						'\Onphp\GoogleGridedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699&chd=t:0,0,0&chds=0,0.1&chdl=Показы&chdlp=b&chxt=y&chxr=0,0,0.1,0.1&chm=N**,117700,0,-1,11&chg=0,100,0'
 					)
 				)
@@ -430,11 +432,11 @@ public static function twoAxisDataProvider()
 					array(195, 191, 197, 183, 199, 195),
 					array(2, 3, 10, 1, 0, 22),
 					array(
-						'GoogleLineChart' =>
+						'\Onphp\GoogleLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:195,191,197,183,199,195|2,3,10,1,0,22&chds=0,199,0,22&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,199|1,0,22',
-						'GoogleNormalizedLineChart' =>
+						'\Onphp\GoogleNormalizedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:195,191,197,183,199,195|2,3,10,1,0,22&chds=0,300,0,30&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,300,100|1,0,30,10',
-						'GoogleGridedLineChart' =>
+						'\Onphp\GoogleGridedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:195,191,197,183,199,195|2,3,10,1,0,22&chds=0,300,0,30&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,300,100|1,0,30,10&chg=0,33.3,0'
 					)
 				),
@@ -442,11 +444,11 @@ public static function twoAxisDataProvider()
 					array(0.1, 191, 0.2, 0, 199, 195),
 					array(234, 3, 10, 0.1, 0, 22),
 					array(
-						'GoogleLineChart' =>
+						'\Onphp\GoogleLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0.1,191,0.2,0,199,195|234,3,10,0.1,0,22&chds=0,199,0,234&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,199|1,0,234',
-						'GoogleNormalizedLineChart' =>
+						'\Onphp\GoogleNormalizedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0.1,191,0.2,0,199,195|234,3,10,0.1,0,22&chds=0,300,0,300&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,300,100|1,0,300,100',
-						'GoogleGridedLineChart' =>
+						'\Onphp\GoogleGridedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0.1,191,0.2,0,199,195|234,3,10,0.1,0,22&chds=0,300,0,300&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,300,100|1,0,300,100&chg=0,33.3,0'
 					)
 				),
@@ -454,11 +456,11 @@ public static function twoAxisDataProvider()
 					array(0.1, 0.24, 1, 0.2, 0.3, 0),
 					array(0.01, 0.124, 0.1, 0.22, 0.03, 0),
 					array(
-						'GoogleLineChart' =>
+						'\Onphp\GoogleLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0.1,0.24,1,0.2,0.3,0|0.01,0.124,0.1,0.22,0.03,0&chds=0,1,0,0.22&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,1|1,0,0.22',
-						'GoogleNormalizedLineChart' =>
+						'\Onphp\GoogleNormalizedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0.1,0.24,1,0.2,0.3,0|0.01,0.124,0.1,0.22,0.03,0&chds=0,1,0,1&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,1,0.1|1,0,1,0.1',
-						'GoogleGridedLineChart' =>
+						'\Onphp\GoogleGridedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0.1,0.24,1,0.2,0.3,0|0.01,0.124,0.1,0.22,0.03,0&chds=0,1,0,1&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,1,0.1|1,0,1,0.1&chg=0,10,0'
 					)
 				),
@@ -466,11 +468,11 @@ public static function twoAxisDataProvider()
 					array(0, 0, 0),
 					array(0.01, 0.124, 0.1),
 					array(
-						'GoogleLineChart' =>
+						'\Onphp\GoogleLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0,0,0|0.01,0.124,0.1&chds=0,1,0,0.124&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,1|1,0,0.124',
-						'GoogleNormalizedLineChart' =>
+						'\Onphp\GoogleNormalizedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0,0,0|0.01,0.124,0.1&chds=0,0.2,0,0.2&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,0.2,0.1|1,0,0.2,0.1',
-						'GoogleGridedLineChart' =>
+						'\Onphp\GoogleGridedLineChart' =>
 						'http://chart.apis.google.com/chart?cht=lc&chs=300x300&chco=336699,339911&chd=t:0,0,0|0.01,0.124,0.1&chds=0,0.2,0,0.2&chdl=Показы|Клики&chdlp=b&chxt=y,r&chxr=0,0,0.2,0.1|1,0,0.2,0.1&chg=0,50,0'
 					)
 				)
diff --git a/test/main/HeaderParserTest.class.php b/test/main/HeaderParserTest.class.php
index 23e69cfe8c..4eb482b500 100644
--- a/test/main/HeaderParserTest.class.php
+++ b/test/main/HeaderParserTest.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	class HeaderParserTest extends TestCase
 	{
 		public function testSimple()
@@ -25,7 +27,7 @@ public function testSimple()
 Content-Language: ru
 Vary: accept-charset, user-agent
 EOT;
-			$parser = HeaderParser::create()->parse($raw);
+			$parser = \Onphp\HeaderParser::create()->parse($raw);
 			$this->assertEquals(9, count($parser->getHeaders()));
 			$this->assertEquals('close', $parser->getHeader('connection'));
 		}
@@ -43,7 +45,7 @@ public function testMultiline()
 Content-Type: text/html;
   charset=utf-8
 EOT;
-			$parser = HeaderParser::create()->parse($raw);
+			$parser = \Onphp\HeaderParser::create()->parse($raw);
 			$this->assertEquals(6, count($parser->getHeaders()));
 			$this->assertEquals($parser->getHeader('keep-alive'), 'timeout=20, max=200');
 			$this->assertEquals($parser->getHeader('content-length'), '123');
diff --git a/test/main/HstoreTest.class.php b/test/main/HstoreTest.class.php
index 3b8226a4fa..d7cdcc5ccd 100644
--- a/test/main/HstoreTest.class.php
+++ b/test/main/HstoreTest.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class HstoreTest extends TestCase
 	{
 		public function testRun()
@@ -19,8 +21,8 @@ public function testRun()
 				'null' => null
 			);
 
-			$test = Hstore::make($array);
-			$test2= Hstore::create($test->toString());
+			$test = \Onphp\Hstore::make($array);
+			$test2= \Onphp\Hstore::create($test->toString());
 
 			$this->assertEquals($test->toString(), $test2->toString());
 
diff --git a/test/main/HttpUrlTest.class.php b/test/main/HttpUrlTest.class.php
new file mode 100644
index 0000000000..58a221a305
--- /dev/null
+++ b/test/main/HttpUrlTest.class.php
@@ -0,0 +1,42 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2013 by Vyacheslav Yu. Tsyrulnik                        *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+	
+	final class HttpUrlTest extends \Onphp\Test\TestCase
+	{
+		private $urlWithPrivilegedPort = "https://path.to.some.com:444/hey.html";
+		
+		/**
+		 * @test
+		 */
+		public function privilegedPortsValidationEnabled()
+		{
+			$url =
+				\Onphp\HttpUrl::create()->
+					parse($this->urlWithPrivilegedPort)->
+					setCheckPrivilegedPorts();
+			
+			$this->assertFalse($url->isValid());
+			$this->assertTrue($url->isPrivilegedPortUsed());
+		}
+		
+		/**
+		 * @test
+		 */
+		public function privilegdPortsValidationDisabled()
+		{
+			$url = \Onphp\HttpUrl::create()->parse($this->urlWithPrivilegedPort);
+				
+			$this->assertTrue($url->isValid());
+			$this->assertTrue($url->isPrivilegedPortUsed());
+		}
+		
+	}
+?>
\ No newline at end of file
diff --git a/test/main/HttpUtilsTest.class.php b/test/main/HttpUtilsTest.class.php
index d847ad3582..94f9417125 100644
--- a/test/main/HttpUtilsTest.class.php
+++ b/test/main/HttpUtilsTest.class.php
@@ -9,27 +9,30 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class HttpUtilsTest extends TestCase
 	{
 		public function testCurlGet()
 		{
-			$request = HttpRequest::create()->
+			$request = \Onphp\HttpRequest::create()->
 				setUrl(
-					HttpUrl::create()->parse('https://github.com/')
+					\Onphp\HttpUrl::create()->parse('https://github.com/')
 				)->
-				setMethod(HttpMethod::get());
+				setHeaderVar('User-Agent', 'onphp-test')->
+				setMethod(\Onphp\HttpMethod::get());
 			
 			try {
-				$response = CurlHttpClient::create()->
+				$response = \Onphp\CurlHttpClient::create()->
 					setTimeout(3)->
 					send($request);
-			} catch (NetworkException $e) {
+			} catch (\Onphp\NetworkException $e) {
 				return $this->markTestSkipped('no network available');
 			}
 			
 			$this->assertEquals(
 				$response->getStatus()->getId(),
-				HttpStatus::CODE_200
+				\Onphp\HttpStatus::CODE_200
 			);
 			
 			$this->assertContains(
@@ -38,33 +41,33 @@ public function testCurlGet()
 			);
 			
 			try {
-				$badResponse = CurlHttpClient::create()->
+				$badResponse = \Onphp\CurlHttpClient::create()->
 					setTimeout(3)->
 					setMaxFileSize(100)-> // github page is bigger than 100 bytes
 					send($request);
 				$this->fail();
-			} catch (NetworkException $e) {
+			} catch (\Onphp\NetworkException $e) {
 				/* pass */
 			}
 		}
 		
 		public function testCurlException()
 		{
-			$request = HttpRequest::create()->
+			$request = \Onphp\HttpRequest::create()->
 				setUrl(
-					HttpUrl::create()->parse('http://nonexistentdomain.xyz')
+					\Onphp\HttpUrl::create()->parse('http://nonexistentdomain.xyz')
 				)->
-				setMethod(HttpMethod::get());
+				setMethod(\Onphp\HttpMethod::get());
 			
 			try {
-				$response = CurlHttpClient::create()->
+				$response = \Onphp\CurlHttpClient::create()->
 					setTimeout(3)->
 					send($request);
 				
 				$this->fail();
-			} catch (NetworkException $e) {
+			} catch (\Onphp\NetworkException $e) {
 				$this->assertContains('curl error', $e->getMessage());
 			}
 		}
 	}
-?>
\ No newline at end of file
+?>
diff --git a/test/main/Ip/IpAddressTest.class.php b/test/main/Ip/IpAddressTest.class.php
index f45baa5d3b..c402bea801 100644
--- a/test/main/Ip/IpAddressTest.class.php
+++ b/test/main/Ip/IpAddressTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class IpAddressToSignedIntTest extends TestCase
 	{
 		private $ips = 
@@ -22,7 +24,7 @@ public function testIpToSignedInt()
 		{
 			foreach ($this->ips as $ip) {
 				$this->assertEquals(
-					IpAddress::create($ip[0])->toSignedInt(),
+					\Onphp\IpAddress::create($ip[0])->toSignedInt(),
 					$ip[1]
 				);
 			}
@@ -33,7 +35,7 @@ public function testIpToLongToIp()
 			foreach ($this->ips as $ip) {
 				$this->assertEquals(
 					long2ip(
-						IpAddress::create($ip[0])->toSignedInt()
+						\Onphp\IpAddress::create($ip[0])->toSignedInt()
 					),
 					$ip[0]
 				);
@@ -44,7 +46,7 @@ public function testSignedLongToIpToSignedLong()
 		{
 			foreach ($this->ips as $ip) {
 				$this->assertEquals(
-					IpAddress::create(
+					\Onphp\IpAddress::create(
 						long2ip($ip[1])
 					)->toSignedInt(),
 					$ip[1]
diff --git a/test/main/Ip/IpBaseRangeTest.class.php b/test/main/Ip/IpBaseRangeTest.class.php
index 0ae3b7c034..bdeaeb0c3c 100644
--- a/test/main/Ip/IpBaseRangeTest.class.php
+++ b/test/main/Ip/IpBaseRangeTest.class.php
@@ -2,19 +2,21 @@
 	/**
 	 * @group ibr
 	 */
+	namespace Onphp\Test;
+
 	final class IpBaseRangeTest extends TestCaseDB
 	{
 		public function testContains()
 		{
 			$ipRange =
-				IpRange::create(
-					IpAddress::create('127.0.0.1'),
-					IpAddress::create('127.0.0.10')
+				\Onphp\IpRange::create(
+					\Onphp\IpAddress::create('127.0.0.1'),
+					\Onphp\IpAddress::create('127.0.0.10')
 				);
 			
 			$this->assertTrue(
 				$ipRange->contains(
-					IpAddress::create(
+					\Onphp\IpAddress::create(
 						'127.0.0.1'
 					)
 				)
@@ -22,7 +24,7 @@ public function testContains()
 			
 			$this->assertTrue(
 				$ipRange->contains(
-					IpAddress::create(
+					\Onphp\IpAddress::create(
 						'127.0.0.9'
 					)
 				)
@@ -30,7 +32,7 @@ public function testContains()
 			
 			$this->assertTrue(
 				$ipRange->contains(
-					IpAddress::create(
+					\Onphp\IpAddress::create(
 						'127.0.0.10'
 					)
 				)
@@ -38,7 +40,7 @@ public function testContains()
 			
 			$this->assertFalse(
 				$ipRange->contains(
-					IpAddress::create(
+					\Onphp\IpAddress::create(
 						'127.0.0.0'
 					)
 				)
@@ -46,7 +48,7 @@ public function testContains()
 			
 			$this->assertFalse(
 				$ipRange->contains(
-					IpAddress::create(
+					\Onphp\IpAddress::create(
 						'127.0.0.11'
 					)
 				)
@@ -54,7 +56,7 @@ public function testContains()
 			
 			$this->assertFalse(
 				$ipRange->contains(
-					IpAddress::create(
+					\Onphp\IpAddress::create(
 						'127.0.0.255'
 					)
 				)
@@ -64,9 +66,9 @@ public function testContains()
 		public function testToString()
 		{
 			$range =
-				IpRange::create(
-					IpAddress::create('192.168.1.1'),
-					IpAddress::create('192.168.255.255')
+				\Onphp\IpRange::create(
+					\Onphp\IpAddress::create('192.168.1.1'),
+					\Onphp\IpAddress::create('192.168.255.255')
 				);
 			
 				$this->assertEquals(
@@ -76,50 +78,50 @@ public function testToString()
 				
 				$this->assertEquals(
 					'\'192.168.1.1-192.168.255.255\'',
-					$range->toDialectString($this->getDbByType('PgSQL')->getDialect())
+					$range->toDialectString($this->getDbByType('\Onphp\PgSQL')->getDialect())
 				);
 				
 				$this->assertEquals(
 					'192.168.1.1-192.168.255.255',
-					$range->toDialectString(ImaginaryDialect::me())
+					$range->toDialectString(\Onphp\ImaginaryDialect::me())
 				);
 		}
 		
 		public function testCreation()
 		{
 			$range =
-				IpRange::create('192.168.2.1-192.168.255.255');
+				\Onphp\IpRange::create('192.168.2.1-192.168.255.255');
 			
 			$anotherRange =
-				IpRange::create(
-					IpAddress::create('192.168.2.1'),
-					IpAddress::create('192.168.255.255')
+				\Onphp\IpRange::create(
+					\Onphp\IpAddress::create('192.168.2.1'),
+					\Onphp\IpAddress::create('192.168.255.255')
 				);
 			
 			$this->assertEquals($range->toString(), $anotherRange->toString());
 			
 			try {
 				$range =
-					IpRange::create('192.168.2.1-192.168.255.666');
+					\Onphp\IpRange::create('192.168.2.1-192.168.255.666');
 				
 				$this->fail();
-			} catch (WrongArgumentException $e) {/**/}
+			} catch (\Onphp\WrongArgumentException $e) {/**/}
 			
 			try {
 				$range =
-					IpRange::create('192.168.666.1-192.168.255.254');
+					\Onphp\IpRange::create('192.168.666.1-192.168.255.254');
 				
 				$this->fail();
-			} catch (WrongArgumentException $e) {/**/}
+			} catch (\Onphp\WrongArgumentException $e) {/**/}
 			
 			try {
 				$range =
-					IpRange::create(array(array(array(false))));
+					\Onphp\IpRange::create(array(array(array(false))));
 				
 				$this->fail();
-			} catch (WrongArgumentException $e) {/**/}
+			} catch (\Onphp\WrongArgumentException $e) {/**/}
 			
-			$slashRange = IpRange::create('192.168.1.0/30');
+			$slashRange = \Onphp\IpRange::create('192.168.1.0/30');
 			
 			$this->assertEquals(
 				'192.168.1.0',
@@ -133,16 +135,16 @@ public function testCreation()
 			
 			try {
 				$range =
-					IpRange::create('192.168.1.0/4');
+					\Onphp\IpRange::create('192.168.1.0/4');
 				
 				$this->fail();
-			} catch (WrongArgumentException $e) {/**/}
+			} catch (\Onphp\WrongArgumentException $e) {/**/}
 			
-			$range = IpRange::create('8.8/16');
+			$range = \Onphp\IpRange::create('8.8/16');
 			
 			$this->assertEquals($range->toString(), '8.8.0.0-8.8.255.255');
 			
-			$range = IpRange::create('192.168.1.1');
+			$range = \Onphp\IpRange::create('192.168.1.1');
 			
 			$this->assertEquals(
 				$range->getStart()->toString(),
diff --git a/test/main/Ip/IpNetworkTest.class.php b/test/main/Ip/IpNetworkTest.class.php
index cc7c353716..7bf4816e0a 100644
--- a/test/main/Ip/IpNetworkTest.class.php
+++ b/test/main/Ip/IpNetworkTest.class.php
@@ -1,85 +1,87 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class IpNetworktest extends TestCase
 	{
 		public function testContains()
 		{
 			$IpNetwork =
-				IpNetwork::create(
-					IpAddress::create('83.149.5.0'),
+				\Onphp\IpNetwork::create(
+					\Onphp\IpAddress::create('83.149.5.0'),
 					24
 				);
 
 			$this->assertTrue(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.5.0')
+					\Onphp\IpAddress::create('83.149.5.0')
 				)
 			);
 			
 			$this->assertTrue(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.5.1')
+					\Onphp\IpAddress::create('83.149.5.1')
 				)
 			);
 			
 			$this->assertTrue(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.5.4')
+					\Onphp\IpAddress::create('83.149.5.4')
 				)
 			);
 			
 			$this->assertTrue(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.5.255')
+					\Onphp\IpAddress::create('83.149.5.255')
 				)
 			);
 			
 			$this->assertFalse(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.4.255')
+					\Onphp\IpAddress::create('83.149.4.255')
 				)
 			);
 			
 			$this->assertFalse(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.6.1')
+					\Onphp\IpAddress::create('83.149.6.1')
 				)
 			);
 			
 			$IpNetwork =
-				IpNetwork::create(
-					IpAddress::create('83.149.24.64'),
+				\Onphp\IpNetwork::create(
+					\Onphp\IpAddress::create('83.149.24.64'),
 					26
 				);
 				
 			$this->assertTrue(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.24.64')
+					\Onphp\IpAddress::create('83.149.24.64')
 				)
 			);
 			
 			$this->assertTrue(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.24.66')
+					\Onphp\IpAddress::create('83.149.24.66')
 				)
 			);
 			
 			$this->assertTrue(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.24.127')
+					\Onphp\IpAddress::create('83.149.24.127')
 				)
 			);
 			
 			$this->assertFalse(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.24.63')
+					\Onphp\IpAddress::create('83.149.24.63')
 				)
 			);
 			
 			$this->assertFalse(
 				$IpNetwork->contains(
-					IpAddress::create('83.149.25.64')
+					\Onphp\IpAddress::create('83.149.25.64')
 				)
 			);
 		}
diff --git a/test/main/Ip/IpUtilsTest.class.php b/test/main/Ip/IpUtilsTest.class.php
index 36447e0b56..c9a827f9fc 100644
--- a/test/main/Ip/IpUtilsTest.class.php
+++ b/test/main/Ip/IpUtilsTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class IpUtilsTest extends TestCase
 	{
 		/**
@@ -8,7 +10,7 @@ final class IpUtilsTest extends TestCase
 		**/
 		public function testMakeRanges($ips, $ranges)
 		{
-			$this->assertEquals($ranges, IpUtils::makeRanges($ips));
+			$this->assertEquals($ranges, \Onphp\IpUtils::makeRanges($ips));
 		}
 		
 		public static function ips()
diff --git a/test/main/JsonPViewTest.class.php b/test/main/JsonPViewTest.class.php
index bee79ceb3d..3f732bca0a 100644
--- a/test/main/JsonPViewTest.class.php
+++ b/test/main/JsonPViewTest.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class JsonPViewTest extends TestCase
 	{
 		protected $array = array('<foo>',"'bar'",'"baz"','&blong&');
@@ -16,25 +18,25 @@ final class JsonPViewTest extends TestCase
 
 		public function testMain()
 		{
-			$model = Model::create()->set('array', $this->array);
+			$model = \Onphp\Model::create()->set('array', $this->array);
 			$data = array('array' => $this->array);
 			$callback = 'myFunc';
 
 			//setup
-			$view = JsonPView::create();
+			$view = \Onphp\JsonPView::create();
 
 			try{
 				// empty js callback function name
 				$view->toString($model);
 
 				$this->fail('empty callback javascript function name expected!');
-			} catch(WrongArgumentException $e) {}
+			} catch(\Onphp\WrongArgumentException $e) {}
 
 			try{
 				$view->setCallback('34_callback'); // invalid javascript function name
 
 				$this->fail('invalid javascript function name expected!');
-			} catch(WrongArgumentException $e) {}
+			} catch(\Onphp\WrongArgumentException $e) {}
 
 			$view->setCallback($callback);
 
@@ -61,14 +63,14 @@ protected function makeString($callback, $data)
 
 	}
 
-	class SimpleStringableObject implements Stringable
+	class SimpleStringableObject implements \Onphp\Stringable
 	{
 		protected $string		= null;
 
 
 		/**
 		 * @static
-		 * @return SimpleStringableObject
+		 * @return \Onphp\Test\SimpleStringableObject
 		 */
 		public static function create()
 		{
@@ -77,11 +79,11 @@ public static function create()
 
 		/**
 		 * @param $value
-		 * @return SimpleStringableObject
+		 * @return \Onphp\Test\SimpleStringableObject
 		 */
 		public function setString($value)
 		{
-			Assert::isString($value);
+			\Onphp\Assert::isString($value);
 
 			$this->string = $value;
 
diff --git a/test/main/JsonViewTest.class.php b/test/main/JsonViewTest.class.php
index 765dc4714c..ac758ccd64 100644
--- a/test/main/JsonViewTest.class.php
+++ b/test/main/JsonViewTest.class.php
@@ -9,44 +9,46 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class JsonViewTest extends TestCase
 	{
 		protected $array = array('<foo>',"'bar'",'"baz"','&blong&');
 		
 		public function testOptions()
 		{
-			$model = Model::create()->set('array', $this->array);
+			$model = \Onphp\Model::create()->set('array', $this->array);
 			$data = array('array' => $this->array);
 
 			$this->assertEquals(
 				json_encode($data, JSON_HEX_QUOT),
-				JsonView::create()->setHexQuot(true)->toString($model)
+				\Onphp\JsonView::create()->setHexQuot(true)->toString($model)
 			);
 
 			$this->assertEquals(
 				json_encode($data, JSON_HEX_TAG),
-				JsonView::create()->setHexTag(true)->toString($model)
+				\Onphp\JsonView::create()->setHexTag(true)->toString($model)
 			);
 
 			$this->assertEquals(
 				json_encode($data, JSON_HEX_AMP),
-				JsonView::create()->setHexAmp(true)->toString($model)
+				\Onphp\JsonView::create()->setHexAmp(true)->toString($model)
 			);
 
 			$this->assertEquals(
 				json_encode($data, JSON_HEX_APOS),
-				JsonView::create()->setHexApos(true)->toString($model)
+				\Onphp\JsonView::create()->setHexApos(true)->toString($model)
 			);
 
 			$this->assertEquals(
 				json_encode($data, JSON_NUMERIC_CHECK),
-				JsonView::create()->setNumericCheck(true)->toString($model)
+				\Onphp\JsonView::create()->setNumericCheck(true)->toString($model)
 			);
 
 			if (defined("JSON_PRETTY_PRINT")) {
 				$this->assertEquals(
 					json_encode($data, JSON_PRETTY_PRINT),
-					JsonView::create()->
+					\Onphp\JsonView::create()->
 						setPrettyPrint(true)->
 						toString($model)
 				);
@@ -55,7 +57,7 @@ public function testOptions()
 			if (defined("JSON_UNESCAPED_SLASHES")) {
 				$this->assertEquals(
 					json_encode($data, JSON_UNESCAPED_SLASHES),
-					JsonView::create()->
+					\Onphp\JsonView::create()->
 						setUnescapedSlashes(true)->
 						toString($model)
 				);
@@ -64,7 +66,7 @@ public function testOptions()
 			//without any flags
 			$this->assertEquals(
 				json_encode($data),
-				JsonView::create()->
+				\Onphp\JsonView::create()->
 					setHexQuot(false)->
 					setHexTag(false)->
 					setHexAmp(false)->
@@ -83,7 +85,7 @@ public function testOptions()
 						| JSON_HEX_APOS
 						| JSON_NUMERIC_CHECK
 				),
-				JsonView::create()->
+				\Onphp\JsonView::create()->
 					setHexQuot(true)->
 					setHexTag(true)->
 					setHexAmp(true)->
@@ -95,11 +97,11 @@ public function testOptions()
 		
 		public function testRender()
 		{
-			$model = Model::create()->set('array', $this->array);
+			$model = \Onphp\Model::create()->set('array', $this->array);
 			$data = array('array' => $this->array);
 			
 			ob_start();
-			JsonView::create()->
+			\Onphp\JsonView::create()->
 				setHexQuot(true)->
 				setHexTag(true)->
 				setHexAmp(true)->
@@ -125,7 +127,7 @@ public function testRender()
 		
 		public function testNoModel() {
 			//setup
-			$view = JsonView::create()->setHexQuot(true)->setHexApos(true);
+			$view = \Onphp\JsonView::create()->setHexQuot(true)->setHexApos(true);
 			
 			//execution and check
 			$this->assertEquals(
diff --git a/test/main/JsonXssViewTest.class.php b/test/main/JsonXssViewTest.class.php
index 0f8e77804b..799a1e5641 100644
--- a/test/main/JsonXssViewTest.class.php
+++ b/test/main/JsonXssViewTest.class.php
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class JsonXssViewTest extends TestCase
 	{
 		protected $array = array('<foo>',"'bar'",'"baz"','&blong&');
@@ -18,11 +20,11 @@ public function testMain()
 			$prefix = 'window.';
 			$callback = 'name';
 
-			$model = Model::create()->set('array', $this->array);
+			$model = \Onphp\Model::create()->set('array', $this->array);
 			$data = array('array' => $this->array);
 
 			//setup
-			$view = JsonXssView::create();
+			$view = \Onphp\JsonXssView::create();
 
 			$defaultString = $view->toString($model);
 
diff --git a/test/main/MathTest.class.php b/test/main/MathTest.class.php
index 2e17378882..ff666ef32a 100644
--- a/test/main/MathTest.class.php
+++ b/test/main/MathTest.class.php
@@ -9,9 +9,11 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class MathTest extends TestCase
 	{
-		public function runMathTest(BigNumberFactory $factory)
+		public function runMathTest(\Onphp\BigNumberFactory $factory)
 		{
 			$this->assertEquals(
 				'4',
@@ -86,7 +88,7 @@ public function runMathTest(BigNumberFactory $factory)
 			);
 		}
 		
-		public function runRandomTest(BigNumberFactory $factory, RandomSource $source)
+		public function runRandomTest(\Onphp\BigNumberFactory $factory, \Onphp\RandomSource $source)
 		{
 			$this->assertNotEquals(
 				$factory->
@@ -113,15 +115,15 @@ public function runRandomTest(BigNumberFactory $factory, RandomSource $source)
 			if (!extension_loaded('gmp')) {
 				try {
 					dl('gmp.so');
-				} catch (BaseException $e) {
+				} catch (\Onphp\BaseException $e) {
 					return $this->markTestSkipped('gmp module not available');
 				}
 			}
 			
-			$this->runMathTest(GmpBigIntegerFactory::me());
+			$this->runMathTest(\Onphp\GmpBigIntegerFactory::me());
 		}
 		
-		public function runRandomSourceTest(RandomSource $source)
+		public function runRandomSourceTest(\Onphp\RandomSource $source)
 		{
 			$this->assertNotEquals($source->getBytes(2), $source->getBytes(2));
 			$this->assertNotEquals($source->getBytes(10), $source->getBytes(10));
@@ -130,10 +132,10 @@ public function runRandomSourceTest(RandomSource $source)
 		
 		public function testRandomSource()
 		{
-			$this->runRandomSourceTest(MtRandomSource::me());
+			$this->runRandomSourceTest(\Onphp\MtRandomSource::me());
 			
 			if (file_exists('/dev/urandom') && is_readable('/dev/urandom'))
-				$this->runRandomSourceTest(new FileRandomSource('/dev/urandom'));
+				$this->runRandomSourceTest(new \Onphp\FileRandomSource('/dev/urandom'));
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/test/main/MathUtilsTest.class.php b/test/main/MathUtilsTest.class.php
index 1b615d9cd9..b51bf73861 100644
--- a/test/main/MathUtilsTest.class.php
+++ b/test/main/MathUtilsTest.class.php
@@ -9,24 +9,59 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class MathUtilsTest extends TestCase
 	{
 		public function testCompareFloat()
 		{
 			$this->assertEquals(
-				MathUtils::compareFloat(0.001, 0.001),
+				\Onphp\MathUtils::compareFloat(0.001, 0.001),
 				0
 			);
 
 			$this->assertEquals(
-				MathUtils::compareFloat(0, 0.0001, 0.001),
+				\Onphp\MathUtils::compareFloat(0, 0.0001, 0.001),
 				0
 			);
 
 			$this->assertEquals(
-				MathUtils::compareFloat(0.0001, 0.00001, 0.000001),
+				\Onphp\MathUtils::compareFloat(0.0001, 0.00001, 0.000001),
 				1
 			);
 		}
+
+		public function testMatrixMultiplication()
+		{
+			$left = array(
+				array(1, 2),
+				array(3, 5),
+				array(2, 4)
+			);
+
+			$right = array(
+				array(4, 7, 5),
+				array(3, 1, 4)
+			);
+
+			$this->assertEquals(
+				\Onphp\MathUtils::getMmult($left, $right),
+				array(
+					array(10, 9, 13),
+					array(27, 26, 35),
+					array(20, 18, 26),
+				)
+			);
+
+			try {
+				\Onphp\MathUtils::getMmult(array(), $right);
+				$this->fail("Exception expected here");
+			} catch (\Onphp\WrongArgumentException $e) {}
+
+			try {
+				\Onphp\MathUtils::getMmult($left, array());
+				$this->fail("Exception expected here");
+			} catch (\Onphp\WrongArgumentException $e) {}
+		}
 	}
-?>
\ No newline at end of file
+?>
diff --git a/test/main/MessagesTest.class.php b/test/main/MessagesTest.class.php
index 6e982fcbd7..4f4332f7a7 100644
--- a/test/main/MessagesTest.class.php
+++ b/test/main/MessagesTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 
+	namespace Onphp\Test;
+
 	final class MessagesTest extends TestCase
 	{
 		public function testFileQueue()
@@ -16,23 +18,23 @@ public function testFileQueue()
 				unlink($uri);
 
 
-			$queue = TextFileQueue::create()->
+			$queue = \Onphp\TextFileQueue::create()->
 				setFileName($uri);
 
-			$sender = TextFileSender::create()->
+			$sender = \Onphp\TextFileSender::create()->
 				setQueue($queue);
 
-			$receiver = TextFileReceiver::create()->
+			$receiver = \Onphp\TextFileReceiver::create()->
 				setQueue($queue);
 
 
 			$sender->send(
-				TextMessage::create()->
+				\Onphp\TextMessage::create()->
 				setText('first ape')
 			);
 
 			$sender->send(
-				TextMessage::create()->
+				\Onphp\TextMessage::create()->
 				setText('second ape')
 			);
 
@@ -52,7 +54,7 @@ public function testFileQueue()
 
 
 			$sender->send(
-				TextMessage::create()->
+				\Onphp\TextMessage::create()->
 				setText('third ape')
 			);
 
diff --git a/test/main/MimeMailTest.class.php b/test/main/MimeMailTest.class.php
index 0323c44039..ce725b1222 100644
--- a/test/main/MimeMailTest.class.php
+++ b/test/main/MimeMailTest.class.php
@@ -1,15 +1,17 @@
 <?php
 
 
+	namespace Onphp\Test;
+
 	final class MimeMailTest extends TestCase
 	{
 		public function testMimeMail()
 		{
-			$mimeMail = new MimeMail();
+			$mimeMail = new \Onphp\MimeMail();
 			$mimeMail->setBoundary('MIME_MAIL_TEST');
 			$mimeMail->addPart(
-				MimePart::create()->
-					setEncoding(MailEncoding::base64())->
+				\Onphp\MimePart::create()->
+					setEncoding(\Onphp\MailEncoding::base64())->
 					setCharset('UTF-8')->
 					loadBodyFromFile(
 						dirname(__FILE__).'/data/mimeMail/message.html'
@@ -18,9 +20,9 @@ public function testMimeMail()
 			);
 			
 			$mimeMail->addPart(
-				MimePart::create()->
+				\Onphp\MimePart::create()->
 					setContentId('picture')->
-					setEncoding(MailEncoding::base64())->
+					setEncoding(\Onphp\MailEncoding::base64())->
 					setFilename('picture.jpg')->
 					loadBodyFromFile(
 						dirname(__FILE__).'/data/mimeMail/picture.jpg'
diff --git a/test/main/Net/CookieTest.class.php b/test/main/Net/CookieTest.class.php
index 7da89ead07..920b0697ab 100644
--- a/test/main/Net/CookieTest.class.php
+++ b/test/main/Net/CookieTest.class.php
@@ -1,10 +1,12 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class CookieTest extends TestCase
 	{
 		/**
-		* @expectedException WrongStateException
+		* @expectedException \Onphp\WrongStateException
 		*/
 		public function testCookie()
 		{
@@ -13,14 +15,14 @@ public function testCookie()
 
 			echo "\0";
 			
-			Cookie::create('testCookie')->
+			\Onphp\Cookie::create('testCookie')->
 				setValue('testValue')->
 				setMaxAge(60*60)->
 				httpSet();
 		}
 		
 		/**
-		* @expectedException WrongStateException
+		* @expectedException \Onphp\WrongStateException
 		*/
 		public function testCookieCollection()
 		{
@@ -29,9 +31,9 @@ public function testCookieCollection()
 			
 			echo "\0";
 			
-			CookieCollection::create()->
+			\Onphp\CookieCollection::create()->
 				add(
-					Cookie::create('anotherTestCookie')->
+					\Onphp\Cookie::create('anotherTestCookie')->
 						setValue('testValue')->
 						setMaxAge(60*60)
 				)->
diff --git a/test/main/Net/CurlHttpClientTest.class.php b/test/main/Net/CurlHttpClientTest.class.php
index faaae0b0b6..3e20b80fda 100644
--- a/test/main/Net/CurlHttpClientTest.class.php
+++ b/test/main/Net/CurlHttpClientTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class CurlHttpClientTest extends TestCase
 	{
 		private static $failTestMsg = null;
@@ -31,7 +33,7 @@ public function testGetWithAdditionalGet()
 				'e' => array('f' => array('&1&', '3', '5')),
 			);
 			
-			$request = $this->spawnRequest(HttpMethod::get(), 'urlGet=really')->
+			$request = $this->spawnRequest(\Onphp\HttpMethod::get(), 'urlGet=really')->
 				setGet($get)->
 				setPost(array('post' => 'value'));
 			
@@ -65,13 +67,13 @@ public function testPostAndFilesWithMultiCurl()
 			);
 			$body = file_get_contents($this->getFile1Path());
 			
-			$request1 = $this->spawnRequest(HttpMethod::post(), 'urlGet=super')->
+			$request1 = $this->spawnRequest(\Onphp\HttpMethod::post(), 'urlGet=super')->
 				setGet($get)->
 				setPost($post1);
-			$request2 = $this->spawnRequest(HttpMethod::post())->
+			$request2 = $this->spawnRequest(\Onphp\HttpMethod::post())->
 				setPost($post2)->
 				setFiles($files);
-			$request3 = $this->spawnRequest(HttpMethod::post())->
+			$request3 = $this->spawnRequest(\Onphp\HttpMethod::post())->
 				setBody($body);
 			
 			$client = $this->spawnClient()->
@@ -82,7 +84,7 @@ public function testPostAndFilesWithMultiCurl()
 			
 			//check response 1st request
 			$this->assertEquals(
-				$this->generateString(array('urlGet' => 'super') + $get, $post1, array(), UrlParamsUtils::toString($post1)),
+				$this->generateString(array('urlGet' => 'super') + $get, $post1, array(), \Onphp\UrlParamsUtils::toString($post1)),
 				$client->getResponse($request1)->getBody()
 			);
 			
@@ -113,14 +115,14 @@ public function testSecurityExceptionWithSendingFileAndAtInPost()
 			
 			$files = array('file' => $this->getFile1Path());
 			
-			$request = $this->spawnRequest(HttpMethod::post())->
+			$request = $this->spawnRequest(\Onphp\HttpMethod::post())->
 				setPost($post)->
 				setFiles($files);
 			
 			try {
 				$this->spawnClient()->send($request);
 				$this->fail('expected NetworkException about security');
-			} catch (NetworkException $e) {
+			} catch (\Onphp\NetworkException $e) {
 				$this->assertStringStartsWith('Security excepion:', $e->getMessage());
 			}
 		}
@@ -129,37 +131,47 @@ public function testSendingNotExistsFile()
 		{	
 			$files = array('file' => $this->getFileNotExists());
 			
-			$request = $this->spawnRequest(HttpMethod::post())->
+			$request = $this->spawnRequest(\Onphp\HttpMethod::post())->
 				setFiles($files);
 			
 			try {
 				$this->spawnClient()->send($request);
 				$this->fail('expected exception about not exists file');
-			} catch (WrongArgumentException $e) {
-				$this->assertStringStartsWith('couldn\'t access to file with path:', $e->getMessage());
+			} catch (\Onphp\WrongArgumentException $e) {
+				if (version_compare(PHP_VERSION, '5.5.0', '<')) {
+					$this->assertStringStartsWith('couldn\'t access to file with path:', $e->getMessage());
+				} else {
+					$this->fail('expects NetworkException');
+				}
+			} catch (\Onphp\NetworkException $e) {
+				if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
+					$this->assertStringStartsWith('curl error, code: 26 description: couldn\'t open file "', $e->getMessage());
+				} else {
+					$this->fail('expects WrongArgumentException');
+				}
 			}
 		}
 		
 		/**
-		 * @param HttpMethod $method
-		 * @return HttpRequest
+		 * @param \Onphp\HttpMethod $method
+		 * @return \Onphp\HttpRequest
 		 */
-		private function spawnRequest(HttpMethod $method, $urlPostfix = '')
+		private function spawnRequest(\Onphp\HttpMethod $method, $urlPostfix = '')
 		{
-			$url = HttpUrl::create()->parse(ONPHP_CURL_TEST_URL);
+			$url = \Onphp\HttpUrl::create()->parse(ONPHP_CURL_TEST_URL);
 			$glue = $url->getQuery() ? '&' : '?';
 			
-			return HttpRequest::create()->
+			return \Onphp\HttpRequest::create()->
 				setUrl($url->parse(ONPHP_CURL_TEST_URL.$glue.$urlPostfix))->
 				setMethod($method);
 		}
 		
 		/**
-		 * @return CurlHttpClient
+		 * @return \Onphp\CurlHttpClient
 		 */
 		private function spawnClient()
 		{
-			return CurlHttpClient::create()->
+			return \Onphp\CurlHttpClient::create()->
 				setOldUrlConstructor(false)->
 				setTimeout(5);
 		}
@@ -167,7 +179,7 @@ private function spawnClient()
 		private function generateString($get, $post, $files, $inputString)
 		{
 			ob_start();
-			var_dump($get, $post, $files, $inputString);
+			print_r([$get, $post, $files, $inputString]);
 			return ob_get_clean();
 		}
 		
diff --git a/test/main/Net/Http/HttpHeaderCollectionTest.class.php b/test/main/Net/Http/HttpHeaderCollectionTest.class.php
new file mode 100644
index 0000000000..2392f389f7
--- /dev/null
+++ b/test/main/Net/Http/HttpHeaderCollectionTest.class.php
@@ -0,0 +1,89 @@
+<?php
+/***************************************************************************
+ *   Copyright (C) 2013 by Nikita V. Konstantinov                          *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Lesser General Public License as        *
+ *   published by the Free Software Foundation; either version 3 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ ***************************************************************************/
+
+	namespace Onphp\Test;
+
+	use Onphp\HttpHeaderCollection;
+	use Onphp\MissingElementException;
+
+	class HttpHeaderCollectionTest extends TestCase
+	{
+		public function testSetter()
+		{
+			$collection =
+				new HttpHeaderCollection(
+					array('Content-Length' => 42)
+				);
+
+			return $collection;
+		}
+
+		/**
+		 * @depends testSetter
+		 */
+		public function testAddition(HttpHeaderCollection $collection)
+		{
+			$collection->add('x-foo', 'bar')->add('x-foo', 'baz');
+
+			return $collection;
+		}
+
+		/**
+		 * @depends testAddition
+		 */
+		public function testGetter(HttpHeaderCollection $collection)
+		{
+			$this->assertEquals(array(42), $collection->getRaw('content-LeNgTh'));
+			$this->assertEquals(42, $collection->get('content-LeNgTh'));
+			$this->assertEquals(array('bar', 'baz'), $collection->getRaw('x-foo'));
+			$this->assertEquals('baz', $collection->get('x-foo'));
+
+			return $collection;
+		}
+
+		/**
+		 * @depends testGetter
+		 */
+		public function testIterator(HttpHeaderCollection $collection)
+		{
+			$headerList = array(
+				'Content-Length: 42',
+				'X-Foo: bar',
+				'X-Foo: baz'
+			);
+
+			$this->assertEquals($headerList, iterator_to_array($collection));
+
+			return $collection;
+		}
+
+		/**
+		 * @depends testIterator
+		 */
+		public function testRemoving(HttpHeaderCollection $collection)
+		{
+			$collection->remove('x-foo');
+
+			return $collection;
+		}
+
+		/**
+		 * @depends testRemoving
+		 * @expectedException \Onphp\MissingElementException
+		 */
+		public function testFailedRemoving(HttpHeaderCollection $collection)
+		{
+			$collection->remove('x-foo');
+
+			return $collection;
+		}
+	}
+?>
diff --git a/test/main/Net/MailTest.class.php b/test/main/Net/MailTest.class.php
index 501179ee52..61013ae3fb 100644
--- a/test/main/Net/MailTest.class.php
+++ b/test/main/Net/MailTest.class.php
@@ -9,11 +9,13 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class MailTest extends TestCase
 	{
 		public function testMailAddressWithoutPerson()
 		{
-			$address = MailAddress::create()->
+			$address = \Onphp\MailAddress::create()->
 				setAddress('vasya@example.com');
 			
 			$this->assertEquals(
@@ -24,7 +26,7 @@ public function testMailAddressWithoutPerson()
 		
 		public function testMailAddressWithPerson()
 		{
-			$address = MailAddress::create()->
+			$address = \Onphp\MailAddress::create()->
 				setAddress('vasya@example.com')->
 				setPerson('Vasya Pupkin');
 			
@@ -36,7 +38,7 @@ public function testMailAddressWithPerson()
 		
 		public function testMailAddressWithQuotedPerson()
 		{
-			$address = MailAddress::create()->
+			$address = \Onphp\MailAddress::create()->
 				setAddress('vasya@example.com')->
 				setPerson('!@#$%^&*()_+');
 			
@@ -48,7 +50,7 @@ public function testMailAddressWithQuotedPerson()
 		
 		public function testMailAddressUnicode()
 		{
-			$address = MailAddress::create()->
+			$address = \Onphp\MailAddress::create()->
 				setAddress('vasya@example.com')->
 				setPerson('Вася Пупкин');
 			
@@ -60,7 +62,7 @@ public function testMailAddressUnicode()
 		
 		public function testMailAddressUnicodeLong()
 		{
-			$address = MailAddress::create()->
+			$address = \Onphp\MailAddress::create()->
 				setAddress('vasya@example.com')->
 				setPerson('Ваня Пупкин Ваня Пупкин Ваня Пупкин Ваня Пупкин');
 			
@@ -74,10 +76,10 @@ public function testMailAddressUnicodeLong()
 		
 		public function testBadMailAddresses()
 		{
-			$address1 = MailAddress::create()->
+			$address1 = \Onphp\MailAddress::create()->
 				setAddress("va\004sya@example.com");
 				
-			$address2 = MailAddress::create()->
+			$address2 = \Onphp\MailAddress::create()->
 				setAddress("va sya@example.com");
 			
 				
@@ -86,7 +88,7 @@ public function testBadMailAddresses()
 				$address2->toString();
 				
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//pass
 			}
 		}
@@ -94,11 +96,11 @@ public function testBadMailAddresses()
 		public function testSendWithoutReturnPath()
 		{
 			try {
-				Mail::create()->
+				\Onphp\Mail::create()->
 				setTo('admin@localhost')->
 				send();
 				
-			} catch (MailNotSentException $e) {
+			} catch (\Onphp\MailNotSentException $e) {
 				//it's ok
 			}
 		}
diff --git a/test/main/OpenIdTest.class.php b/test/main/OpenIdTest.class.php
index d564ed06cb..81bbe901a8 100644
--- a/test/main/OpenIdTest.class.php
+++ b/test/main/OpenIdTest.class.php
@@ -9,15 +9,17 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class OpenIdTest extends TestCase
 	{
 		public function testCredentials()
 		{
-			$credential = OpenIdCredentials::create(
-				HttpUrl::create()->parse('http://www.example.com/'),
+			$credential = \Onphp\OpenIdCredentials::create(
+				\Onphp\HttpUrl::create()->parse('http://www.example.com/'),
 				HttpClientStub::create(
 					HttpResponseStub::create()->
-						setStatus(new HttpStatus(HttpStatus::CODE_200))->
+						setStatus(new \Onphp\HttpStatus(\Onphp\HttpStatus::CODE_200))->
 						setBody(<<<EOT
 <html><head><link rel="openid.server"
                   href="http://www.myopenid.com/server" />
@@ -39,11 +41,11 @@ public function testCredentials()
 			);
 			
 			// from openId creator blog
-			$credential = OpenIdCredentials::create(
-				HttpUrl::create()->parse('http://brad.livejournal.com/'),
+			$credential = \Onphp\OpenIdCredentials::create(
+				\Onphp\HttpUrl::create()->parse('http://brad.livejournal.com/'),
 				HttpClientStub::create(
 					HttpResponseStub::create()->
-						setStatus(new HttpStatus(HttpStatus::CODE_200))->
+						setStatus(new \Onphp\HttpStatus(\Onphp\HttpStatus::CODE_200))->
 						setBody(<<<EOT
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
@@ -156,23 +158,23 @@ function controlstrip_init() {
 			);
 			
 			try {
-				$credential = OpenIdCredentials::create(
-					HttpUrl::create()->parse('http://www.example.com/'),
+				$credential = \Onphp\OpenIdCredentials::create(
+					\Onphp\HttpUrl::create()->parse('http://www.example.com/'),
 					HttpClientStub::create(
 						HttpResponseStub::create()->
-							setStatus(new HttpStatus(HttpStatus::CODE_404))
+							setStatus(new \Onphp\HttpStatus(\Onphp\HttpStatus::CODE_404))
 					)
 				);
 				$this->fail();
-			} catch (OpenIdException $e) {
+			} catch (\Onphp\OpenIdException $e) {
 				/* pass */
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->fail();
 			}
 		}
 	}
 	
-	class HttpResponseStub implements HttpResponse
+	class HttpResponseStub implements \Onphp\HttpResponse
 	{
 		private $status = null;
 		private $body = null;
@@ -187,7 +189,7 @@ public function getStatus()
 			return $this->status;
 		}
 		
-		public function setStatus(HttpStatus $status)
+		public function setStatus(\Onphp\HttpStatus $status)
 		{
 			$this->status = $status;
 			return $this;
@@ -206,12 +208,12 @@ public function setBody($body)
 		
 		public function getReasonPhrase()
 		{
-			throw new UnsupportedMethodException();
+			throw new \Onphp\UnsupportedMethodException();
 		}
 		
 		public function getHeaders()
 		{
-			throw new UnsupportedMethodException();
+			throw new \Onphp\UnsupportedMethodException();
 		}
 		
 		public function hasHeader($name)
@@ -225,51 +227,51 @@ public function getHeader($name)
 		}
 	}
 	
-	class HttpClientStub implements HttpClient
+	class HttpClientStub implements \Onphp\HttpClient
 	{
 		private $response = null;
 		
-		public function __construct(HttpResponse $response)
+		public function __construct(\Onphp\HttpResponse $response)
 		{
 			$this->response = $response;
 		}
 		
-		public static function create(HttpResponse $response)
+		public static function create(\Onphp\HttpResponse $response)
 		{
 			return new self($response);
 		}
 		
 		public function setTimeout($timeout)
 		{
-			throw new UnsupportedMethodException();
+			throw new \Onphp\UnsupportedMethodException();
 		}
 		
 		public function getTimeout()
 		{
-			throw new UnsupportedMethodException();
+			throw new \Onphp\UnsupportedMethodException();
 		}
 		
 		public function setFollowLocation(/* boolean */ $really)
 		{
-			throw new UnsupportedMethodException();
+			throw new \Onphp\UnsupportedMethodException();
 		}
 		
 		public function isFollowLocation()
 		{
-			throw new UnsupportedMethodException();
+			throw new \Onphp\UnsupportedMethodException();
 		}
 		
 		public function setMaxRedirects($maxRedirects)
 		{
-			throw new UnsupportedMethodException();
+			throw new \Onphp\UnsupportedMethodException();
 		}
 		
 		public function getMaxRedirects()
 		{
-			throw new UnsupportedMethodException();
+			throw new \Onphp\UnsupportedMethodException();
 		}
 		
-		public function send(HttpRequest $request)
+		public function send(\Onphp\HttpRequest $request)
 		{
 			return $this->response;
 		}
diff --git a/test/main/OqlSelectClauseTest.class.php b/test/main/OqlSelectClauseTest.class.php
index 05aae96f8b..d172901b9d 100644
--- a/test/main/OqlSelectClauseTest.class.php
+++ b/test/main/OqlSelectClauseTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class OqlSelectClauseTest extends TestCaseDB
 	{
 		public function testEmpty()
@@ -11,103 +13,103 @@ public function testEmpty()
 			
 			foreach ($clauses as $clauseName) {
 				try {
-					call_user_func(array('OQL', $clauseName), null);
+					call_user_func(array('\Onphp\OQL', $clauseName), null);
 					$this->fail();
 				
-				} catch (WrongArgumentException $e) {
+				} catch (\Onphp\WrongArgumentException $e) {
 					// pass
 				}
 			}
 			
 			foreach ($clauses as $clauseName) {
 				try {
-					call_user_func(array('OQL', $clauseName), '');
+					call_user_func(array('\Onphp\OQL', $clauseName), '');
 					$this->fail();
 				
-				} catch (SyntaxErrorException $e) {
+				} catch (\Onphp\SyntaxErrorException $e) {
 					// pass
 				}
 			}
 		}
-		
+
 		public function testProperties()
 		{
-			$query = OQL::select('from TestUser');
-			$criteria = Criteria::create(TestUser::dao());
+			$query = \Onphp\OQL::select('from \Onphp\Test\TestUser');
+			$criteria = \Onphp\Criteria::create(TestUser::dao());
 			
 			$this->assertCriteria($query, $criteria);
 			
 			$this->assertCriteria(
 				$query->addProperties(
-					OQL::properties('id, count(id) as count')
+					\Onphp\OQL::properties('id, count(id) as count')
 				),
 				$criteria->
-					addProjection(Projection::property('id'))->
-					addProjection(Projection::count('id', 'count'))
+					addProjection(\Onphp\Projection::property('id'))->
+					addProjection(\Onphp\Projection::count('id', 'count'))
 			);
 			
 			$this->assertCriteria(
 				$query->addProperties(
-					OQL::properties('city.id')
+					\Onphp\OQL::properties('city.id')
 				),
 				$criteria->addProjection(
-					Projection::property('city.id')
+					\Onphp\Projection::property('city.id')
 				)
 			);
 			
-			$properties = OQL::properties('id');
+			$properties = \Onphp\OQL::properties('id');
 			$this->assertFalse($properties->isDistinct());
 			$this->assertEquals(
 				$properties->toProjection(),
-				Projection::chain()->add(
-					Projection::property('id')
+				\Onphp\Projection::chain()->add(
+					\Onphp\Projection::property('id')
 				)
 			);
 			
-			$properties = OQL::properties('id, distinct name');
+			$properties = \Onphp\OQL::properties('id, distinct name');
 			$this->assertTrue($properties->isDistinct());
 			$this->assertEquals(
 				$properties->toProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::property('id')
+						\Onphp\Projection::property('id')
 					)->
 					add(
-						Projection::property('name')
+						\Onphp\Projection::property('name')
 					)
 			);
 			
-			$properties = OQL::properties('$1')->
+			$properties = \Onphp\OQL::properties('$1')->
 				bind(1, 'foo');
 			$this->assertEquals(
 				$properties->toProjection(),
-				Projection::chain()->add(
-					Projection::property('foo')
+				\Onphp\Projection::chain()->add(
+					\Onphp\Projection::property('foo')
 				)
 			);
 			
 			$properties->bind(1, 'bar');
 			$this->assertEquals(
 				$properties->toProjection(),
-				Projection::chain()->add(
-					Projection::property('bar')
+				\Onphp\Projection::chain()->add(
+					\Onphp\Projection::property('bar')
 				)
 			);
 			
 			$this->assertCriteria(
-				OQL::select('from TestUser')->
+				\Onphp\OQL::select('from \Onphp\Test\TestUser')->
 					addProperties(
 						$properties->bind(1, 'foo')
 					)->
 					bind(1, 'bar'),
-				Criteria::create(TestUser::dao())->
+				\Onphp\Criteria::create(TestUser::dao())->
 					addProjection(
-						Projection::property('bar')		// not foo!
+						\Onphp\Projection::property('bar')		// not foo!
 					)
 			);
 			
 			$properties =
-				OQL::properties(
+				\Onphp\OQL::properties(
 					'id, count(distinct city.id + $0), avg(some) as someAverage, '
 					.'name not like "%Ы%", foo and (bar or baz), $1 / $2, '
 					.'a in ($3, $0)'
@@ -118,39 +120,39 @@ public function testProperties()
 			$this->assertFalse($properties->isDistinct());
 			$this->assertEquals(
 				$properties->toProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::property('id')
+						\Onphp\Projection::property('id')
 					)->
 					add(
-						Projection::distinctCount(
-							Expression::add('city.id', 1)
+						\Onphp\Projection::distinctCount(
+							\Onphp\Expression::add('city.id', 1)
 						)
 					)->
 					add(
-						Projection::avg('some', 'someAverage')
+						\Onphp\Projection::avg('some', 'someAverage')
 					)->
 					add(
-						Projection::property(
-							Expression::notLike('name', '%Ы%')
+						\Onphp\Projection::property(
+							\Onphp\Expression::notLike('name', '%Ы%')
 						)
 					)->
 					add(
-						Projection::property(
-							Expression::expAnd(
+						\Onphp\Projection::property(
+							\Onphp\Expression::expAnd(
 								'foo',
-								Expression::expOr('bar', 'baz')
+								\Onphp\Expression::expOr('bar', 'baz')
 							)
 						)
 					)->
 					add(
-						Projection::property(
-							Expression::div(2, 'num')
+						\Onphp\Projection::property(
+							\Onphp\Expression::div(2, 'num')
 						)
 					)->
 					add(
-						Projection::property(
-							Expression::in('a', array('test', 1))
+						\Onphp\Projection::property(
+							\Onphp\Expression::in('a', array('test', 1))
 						)
 					)
 			);
@@ -158,138 +160,138 @@ public function testProperties()
 		
 		public function testWhere()
 		{
-			$query = OQL::select('from TestUser');
-			$criteria = Criteria::create(TestUser::dao());
+			$query = \Onphp\OQL::select('from \Onphp\Test\TestUser');
+			$criteria = \Onphp\Criteria::create(TestUser::dao());
 			
 			$this->assertCriteria(
 				$query->andWhere(
-					OQL::where('id = 1')
+					\Onphp\OQL::where('id = 1')
 				),
 				$criteria->add(
-					Expression::eq('id', 1)
+					\Onphp\Expression::eq('id', 1)
 				)
 			);
 			
 			$this->assertCriteria(
 				$query->orWhere(
-					OQL::where('id = 2 and city.id is not null')
+					\Onphp\OQL::where('id = 2 and city.id is not null')
 				),
-				Criteria::create(TestUser::dao())->add(
-					Expression::expOr(
-						Expression::eq('id', 1),
-						Expression::expAnd(
-							Expression::eq('id', 2),
-							Expression::notNull('city.id')
+				\Onphp\Criteria::create(TestUser::dao())->add(
+					\Onphp\Expression::expOr(
+						\Onphp\Expression::eq('id', 1),
+						\Onphp\Expression::expAnd(
+							\Onphp\Expression::eq('id', 2),
+							\Onphp\Expression::notNull('city.id')
 						)
 					)
 				)
 			);
 			
 			$this->assertEquals(
-				OQL::where('name similar to "test" and not $1')->
+				\Onphp\OQL::where('name similar to "test" and not $1')->
 					bindNext('name')->
 					toLogic(),
-				Expression::expAnd(
-					Expression::similar('name', 'test'),
-					Expression::not('name')
+				\Onphp\Expression::expAnd(
+					\Onphp\Expression::similar('name', 'test'),
+					\Onphp\Expression::not('name')
 				)
 			);
 			
 			$this->assertCriteria(
-				OQL::select('from TestUser')->
+				\Onphp\OQL::select('from \Onphp\Test\TestUser')->
 					where(
-						OQL::where('id > $1')->
+						\Onphp\OQL::where('id > $1')->
 							bindNext(1)
 					)->
 					bindNext(2),
-				Criteria::create(TestUser::dao())->
+				\Onphp\Criteria::create(TestUser::dao())->
 					add(
-						Expression::gt('id', 2)
+						\Onphp\Expression::gt('id', 2)
 					)
 			);
 		}
 		
 		public function testGroupBy()
 		{
-			$query = OQL::select('from TestUser');
-			$criteria = Criteria::create(TestUser::dao());
+			$query = \Onphp\OQL::select('from \Onphp\Test\TestUser');
+			$criteria = \Onphp\Criteria::create(TestUser::dao());
 			
 			$this->assertCriteria(
 				$query->addGroupBy(
-					OQL::groupBy('id')
+					\Onphp\OQL::groupBy('id')
 				),
 				$criteria->addProjection(
-					Projection::group('id')
+					\Onphp\Projection::group('id')
 				)
 			);
 			
 			$this->assertCriteria(
 				$query->addGroupBy(
-					OQL::groupBy('-name')
+					\Onphp\OQL::groupBy('-name')
 				),
 				$criteria->addProjection(
-					Projection::group(
-						Expression::minus('name')
+					\Onphp\Projection::group(
+						\Onphp\Expression::minus('name')
 					)
 				)
 			);
 			
 			$this->assertEquals(
-				OQL::groupBy('id, name')->
+				\Onphp\OQL::groupBy('id, name')->
 					toProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::group('id')
+						\Onphp\Projection::group('id')
 					)->
 					add(
-						Projection::group('name')
+						\Onphp\Projection::group('name')
 					)
 			);
 			
 			$this->assertEquals(
-				OQL::groupBy('id + 2')->
+				\Onphp\OQL::groupBy('id + 2')->
 					toProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::group(
-							Expression::add('id', 2)
+						\Onphp\Projection::group(
+							\Onphp\Expression::add('id', 2)
 						)
 					)
 			);
 			
 			$this->assertEquals(
-				OQL::groupBy('id > 2')->
+				\Onphp\OQL::groupBy('id > 2')->
 					toProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::group(
-							Expression::gt('id', 2)
+						\Onphp\Projection::group(
+							\Onphp\Expression::gt('id', 2)
 						)
 					)
 			);
 			
 			$this->assertEquals(
-				OQL::groupBy('$1')->
+				\Onphp\OQL::groupBy('$1')->
 					bindNext('id')->
 					toProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::group('id')
+						\Onphp\Projection::group('id')
 					)
 			);
 			
 			$this->assertEquals(
-				OQL::groupBy('$1, $2 + 3')->
+				\Onphp\OQL::groupBy('$1, $2 + 3')->
 					bindNext('name')->
 					bindNext('id')->
 					toProjection(),
-				Projection::chain()->
+				\Onphp\Projection::chain()->
 					add(
-						Projection::group('name')
+						\Onphp\Projection::group('name')
 					)->
 					add(
-						Projection::group(
-							Expression::add('id', 3)
+						\Onphp\Projection::group(
+							\Onphp\Expression::add('id', 3)
 						)
 					)
 			);
@@ -297,66 +299,66 @@ public function testGroupBy()
 		
 		public function testOrderBy()
 		{
-			$query = OQL::select('from TestUser');
-			$criteria = Criteria::create(TestUser::dao());
+			$query = \Onphp\OQL::select('from \Onphp\Test\TestUser');
+			$criteria = \Onphp\Criteria::create(TestUser::dao());
 			
 			$this->assertCriteria(
 				$query->addOrderBy(
-					OQL::orderBy('id')
+					\Onphp\OQL::orderBy('id')
 				),
 				$criteria->addOrder(
-					OrderBy::create('id')
+					\Onphp\OrderBy::create('id')
 				)
 			);
 			
 			$this->assertCriteria(
 				$query->addOrderBy(
-					OQL::orderBy('name asc, city.id desc')
+					\Onphp\OQL::orderBy('name asc, city.id desc')
 				),
 				$criteria->
 					addOrder(
-						OrderBy::create('name')->asc()
+						\Onphp\OrderBy::create('name')->asc()
 					)->
 					addOrder(
-						OrderBy::create('city.id')->desc()
+						\Onphp\OrderBy::create('city.id')->desc()
 					)
 			);
 			
 			$this->assertEquals(
-				OQL::orderBy('id + city.id desc, name')->
+				\Onphp\OQL::orderBy('id + city.id desc, name')->
 					toOrder(),
-				OrderChain::create()->
+				\Onphp\OrderChain::create()->
 					add(
-						OrderBy::create(
-							Expression::add('id', 'city.id')
+						\Onphp\OrderBy::create(
+							\Onphp\Expression::add('id', 'city.id')
 						)->
 						desc()
 					)->
 					add(
-						OrderBy::create('name')
+						\Onphp\OrderBy::create('name')
 					)
 			);
 			
-			$order = OQL::orderBy('name ilike $1')->
+			$order = \Onphp\OQL::orderBy('name ilike $1')->
 				bindNext('%ЙЦуК');
 			$this->assertEquals(
 				$order->toOrder(),
-				OrderChain::create()->
+				\Onphp\OrderChain::create()->
 					add(
-						OrderBy::create(
-							Expression::ilike('name', '%ЙЦуК')
+						\Onphp\OrderBy::create(
+							\Onphp\Expression::ilike('name', '%ЙЦуК')
 						)
 					)
 			);
 			
 			$this->assertCriteria(
-				OQL::select('from TestUser')->
+				\Onphp\OQL::select('from \Onphp\Test\TestUser')->
 					addOrderBy($order)->
 					bindNext('test'),
-				Criteria::create(TestUser::dao())->
+				\Onphp\Criteria::create(TestUser::dao())->
 					addOrder(
-						OrderBy::create(
-							Expression::ilike('name', 'test')
+						\Onphp\OrderBy::create(
+							\Onphp\Expression::ilike('name', 'test')
 						)
 					)
 			);
@@ -364,33 +366,33 @@ public function testOrderBy()
 		
 		public function testHaving()
 		{
-			$query = OQL::select('from TestUser');
-			$criteria = Criteria::create(TestUser::dao());
+			$query = \Onphp\OQL::select('from \Onphp\Test\TestUser');
+			$criteria = \Onphp\Criteria::create(TestUser::dao());
 			
 			$this->assertCriteria(
 				$query->addHaving(
-					OQL::having('id > 0')
+					\Onphp\OQL::having('id > 0')
 				),
 				$criteria->addProjection(
-					Projection::having(
-						Expression::gt('id', 0)
+					\Onphp\Projection::having(
+						\Onphp\Expression::gt('id', 0)
 					)
 				)
 			);
 			
 			$this->assertCriteria(
 				$query->addHaving(
-					OQL::having('name is not null and (id <> $1 or id != $2)')->
+					\Onphp\OQL::having('name is not null and (id <> $1 or id != $2)')->
 						bindNext(4)->
 						bindNext(8)
 				),
 				$criteria->addProjection(
-					Projection::having(
-						Expression::expAnd(
-							Expression::notNull('name'),
-							Expression::expOr(
-								Expression::notEq('id', 4),
-								Expression::notEq('id', 8)
+					\Onphp\Projection::having(
+						\Onphp\Expression::expAnd(
+							\Onphp\Expression::notNull('name'),
+							\Onphp\Expression::expOr(
+								\Onphp\Expression::notEq('id', 4),
+								\Onphp\Expression::notEq('id', 8)
 							)
 						)
 					)
@@ -398,36 +400,36 @@ public function testHaving()
 			);
 			
 			$this->assertEquals(
-				OQL::having('id + $15')->
+				\Onphp\OQL::having('id + $15')->
 					bind(15, 16)->
 					toProjection(),
-				Projection::having(
-					Expression::add('id', 16)
+				\Onphp\Projection::having(
+					\Onphp\Expression::add('id', 16)
 				)
 			);
 			
 			$this->assertCriteria(
-				OQL::select('from TestUser')->
+				\Onphp\OQL::select('from \Onphp\Test\TestUser')->
 					addHaving(
-						OQL::having('id = $1')->
+						\Onphp\OQL::having('id = $1')->
 							bindNext(23)
 					)->
 					bindNext(42),
-				Criteria::create(TestUser::dao())->
+				\Onphp\Criteria::create(TestUser::dao())->
 					addProjection(
-						Projection::having(
-							Expression::eq('id', 42)
+						\Onphp\Projection::having(
+							\Onphp\Expression::eq('id', 42)
 						)
 					)
 			);
 		}
 		
 		/**
-		 * @return OqlSelectClauseTest
+		 * @return \Onphp\Test\OqlSelectClauseTest
 		**/
-		private function assertCriteria(OqlQuery $query, Criteria $criteria)
+		private function assertCriteria(\Onphp\OqlQuery $query, \Onphp\Criteria $criteria)
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
 			$this->assertEquals(
 				$query->toCriteria()->toDialectString($dialect),
diff --git a/test/main/OqlSelectTest.class.php b/test/main/OqlSelectTest.class.php
index cd55b35858..8de794ffdf 100644
--- a/test/main/OqlSelectTest.class.php
+++ b/test/main/OqlSelectTest.class.php
@@ -1,6 +1,11 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
+	/**
+	 * @group os
+	 */
 	final class OqlSelectTest extends TestCaseDB
 	{
 		public function testProperty()
@@ -8,79 +13,79 @@ public function testProperty()
 			$this->
 				// no properties
 				assertCriteria(
-					'from TestUser',
-					Criteria::create(TestUser::dao())
+					'from \Onphp\Test\TestUser',
+					\Onphp\Criteria::create(TestUser::dao())
 				)->
 				// simple property
 				assertCriteria(
-					'id from TestUser',
-					Criteria::create(TestUser::dao())->
-						setProjection(Projection::property('id'))
+					'id from \Onphp\Test\TestUser',
+					\Onphp\Criteria::create(TestUser::dao())->
+						setProjection(\Onphp\Projection::property('id'))
 				)->
 				// aggregate functions, distinct, aliases, properties
 				assertCriteria(
 					'avg(id), count(city.id) as count, '
 					.'count(distinct city.id) as distinctCount, '
 					.'sum(id), min(id), max(id), city.Name as cityName, '
-					.'distinct id, city, min from TestUser',
-					Criteria::create(TestUser::dao())->
+					.'distinct id, city, min from \Onphp\Test\TestUser',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setDistinct(true)->
 						setProjection(
-							Projection::chain()->
-								add(Projection::avg('id'))->
-								add(Projection::count('city.id', 'count'))->
-								add(Projection::distinctCount('city.id', 'distinctCount'))->
-								add(Projection::sum('id'))->
-								add(Projection::min('id'))->
-								add(Projection::max('id'))->
-								add(Projection::property('city.Name', 'cityName'))->
-								add(Projection::property('id'))->
-								add(Projection::property('city'))->
-								add(Projection::property('min'))
+							\Onphp\Projection::chain()->
+								add(\Onphp\Projection::avg('id'))->
+								add(\Onphp\Projection::count('city.id', 'count'))->
+								add(\Onphp\Projection::distinctCount('city.id', 'distinctCount'))->
+								add(\Onphp\Projection::sum('id'))->
+								add(\Onphp\Projection::min('id'))->
+								add(\Onphp\Projection::max('id'))->
+								add(\Onphp\Projection::property('city.Name', 'cityName'))->
+								add(\Onphp\Projection::property('id'))->
+								add(\Onphp\Projection::property('city'))->
+								add(\Onphp\Projection::property('min'))
 						)
 				)->
 				// arithmetic expression in aggregate function
 				assertCriteria(
 					'avg(-id - -1 / -$1), avg((10-id) * -($1+-2.1)), avg(10) as ten '
-					.'from TestUser',
-					Criteria::create(TestUser::dao())->
+					.'from \Onphp\Test\TestUser',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::chain()->
+							\Onphp\Projection::chain()->
 								add(
-									Projection::avg(
-										Expression::sub(
-											Expression::minus('id'),
-											Expression::div(-1, -10)
+									\Onphp\Projection::avg(
+										\Onphp\Expression::sub(
+											\Onphp\Expression::minus('id'),
+											\Onphp\Expression::div(-1, -10)
 										)
 									)
 								)->
 								add(
-									Projection::avg(
-										Expression::mul(
-											Expression::sub(10, 'id'),
-											Expression::minus(
-												Expression::add(10, -2.1)
+									\Onphp\Projection::avg(
+										\Onphp\Expression::mul(
+											\Onphp\Expression::sub(10, 'id'),
+											\Onphp\Expression::minus(
+												\Onphp\Expression::add(10, -2.1)
 											)
 										)
 									)
 								)->
-								add(Projection::avg(10, 'ten'))
+								add(\Onphp\Projection::avg(10, 'ten'))
 						),
 					array(1 => 10)
 				)->
 				// boolean and arithmetic expressions in count function
 				assertCriteria(
 					'count(distinct -id * 2 / -3 > 10), count(id in (1, -$1, -3) and Name like `test`)'
-					.'from TestUser',
-					Criteria::create(TestUser::dao())->
+					.'from \Onphp\Test\TestUser',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::chain()->
+							\Onphp\Projection::chain()->
 								add(
-									Projection::distinctCount(
-										Expression::gt(
-											Expression::div(
-												Expression::mul(
-													Expression::minus('id'),
+									\Onphp\Projection::distinctCount(
+										\Onphp\Expression::gt(
+											\Onphp\Expression::div(
+												\Onphp\Expression::mul(
+													\Onphp\Expression::minus('id'),
 													2
 												),
 												-3
@@ -90,10 +95,10 @@ public function testProperty()
 									)
 								)->
 								add(
-									Projection::count(
-										Expression::expAnd(
-											Expression::in('id', array(1, -2, -3)),
-											Expression::like('Name', 'test')
+									\Onphp\Projection::count(
+										\Onphp\Expression::expAnd(
+											\Onphp\Expression::in('id', array(1, -2, -3)),
+											\Onphp\Expression::like('Name', 'test')
 										)
 									)
 								)
@@ -103,24 +108,24 @@ public function testProperty()
 				// boolean and arithmetic expressions as property
 				assertCriteria(
 					'(id > 10) and (20 > id) as inInterval, ((2*id + 1) / id), -id '
-					.'from TestUser',
-					Criteria::create(TestUser::dao())->
+					.'from \Onphp\Test\TestUser',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::chain()->
+							\Onphp\Projection::chain()->
 								add(
-									Projection::property(
-										Expression::expAnd(
-											Expression::gt('id', 10),
-											Expression::gt(20, 'id')
+									\Onphp\Projection::property(
+										\Onphp\Expression::expAnd(
+											\Onphp\Expression::gt('id', 10),
+											\Onphp\Expression::gt(20, 'id')
 										),
 										'inInterval'
 									)
 								)->
 								add(
-									Projection::property(
-										Expression::div(
-											Expression::add(
-												Expression::mul(2, 'id'),
+									\Onphp\Projection::property(
+										\Onphp\Expression::div(
+											\Onphp\Expression::add(
+												\Onphp\Expression::mul(2, 'id'),
 												1
 											),
 											'id'
@@ -128,8 +133,8 @@ public function testProperty()
 									)
 								)->
 								add(
-									Projection::property(
-										Expression::minus('id')
+									\Onphp\Projection::property(
+										\Onphp\Expression::minus('id')
 									)
 								)
 						)
@@ -144,18 +149,18 @@ public function testWhere()
 			$this->
 				// bindings, operator chain
 				assertCriteria(
-					'from TestUser where id = $1 or id = $2 or $2 = id or $1 = $2',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where id = $1 or id = $2 or $2 = id or $1 = $2',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expOr(
-								Expression::expOr(
-									Expression::expOr(
-										Expression::eqId('id', $user),
-										Expression::eq('id', $userId)
+							\Onphp\Expression::expOr(
+								\Onphp\Expression::expOr(
+									\Onphp\Expression::expOr(
+										\Onphp\Expression::eqId('id', $user),
+										\Onphp\Expression::eq('id', $userId)
 									),
-									Expression::eq($userId, 'id')
+									\Onphp\Expression::eq($userId, 'id')
 								),
-								Expression::eq($userId, $userId)
+								\Onphp\Expression::eq($userId, $userId)
 							)
 						),
 					array(
@@ -165,44 +170,44 @@ public function testWhere()
 				)->
 				// comparison operators
 				assertCriteria(
-					'from TestUser where id = 1 or id >= 1 or id <= 1 or id <> 1 or id != 1',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where id = 1 or id >= 1 or id <= 1 or id <> 1 or id != 1',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expOr(
-								Expression::expOr(
-									Expression::expOr(
-										Expression::expOr(
-											Expression::eq('id', 1),
-											Expression::gtEq('id', 1)
+							\Onphp\Expression::expOr(
+								\Onphp\Expression::expOr(
+									\Onphp\Expression::expOr(
+										\Onphp\Expression::expOr(
+											\Onphp\Expression::eq('id', 1),
+											\Onphp\Expression::gtEq('id', 1)
 										),
-										Expression::ltEq('id', 1)
+										\Onphp\Expression::ltEq('id', 1)
 									),
-									Expression::notEq('id', 1)
+									\Onphp\Expression::notEq('id', 1)
 								),
-								Expression::notEq('id', 1)
+								\Onphp\Expression::notEq('id', 1)
 							)
 						)
 				)->
 				// priority
 				assertCriteria(
-					'from TestUser where id = 1 and Name = "some" '
+					'from \Onphp\Test\TestUser where id = 1 and Name = "some" '
 					.'or Name = "any" or id = 1 > 2 = id * 2 + 1',
-					Criteria::create(TestUser::dao())->
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expOr(
-								Expression::expOr(
-									Expression::expAnd(
-										Expression::eq('id', 1),
-										Expression::eq('Name', 'some')
+							\Onphp\Expression::expOr(
+								\Onphp\Expression::expOr(
+									\Onphp\Expression::expAnd(
+										\Onphp\Expression::eq('id', 1),
+										\Onphp\Expression::eq('Name', 'some')
 									),
-									Expression::eq('Name', 'any')
+									\Onphp\Expression::eq('Name', 'any')
 								),
-								Expression::gt(
-									Expression::eq('id', 1),
-									Expression::eq(
+								\Onphp\Expression::gt(
+									\Onphp\Expression::eq('id', 1),
+									\Onphp\Expression::eq(
 										2,
-										Expression::add(
-											Expression::mul('id', 2),
+										\Onphp\Expression::add(
+											\Onphp\Expression::mul('id', 2),
 											1
 										)
 									)
@@ -212,60 +217,60 @@ public function testWhere()
 				)->
 				// parentheses priority
 				assertCriteria(
-					'from TestUser where (id = 1 and (Name = "some" or Name = "any"))',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where (id = 1 and (Name = "some" or Name = "any"))',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expAnd(
-								Expression::eq('id', 1),
-								Expression::expOr(
-									Expression::eq('Name', 'some'),
-									Expression::eq('Name', 'any')
+							\Onphp\Expression::expAnd(
+								\Onphp\Expression::eq('id', 1),
+								\Onphp\Expression::expOr(
+									\Onphp\Expression::eq('Name', 'some'),
+									\Onphp\Expression::eq('Name', 'any')
 								)
 							)
 						)
 				)->
 				// parentheses priority
 				assertCriteria(
-					'from TestUser where ((Name = "some" or Name = "any")) and (id = 1)',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where ((Name = "some" or Name = "any")) and (id = 1)',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expAnd(
-								Expression::expOr(
-									Expression::eq('Name', 'some'),
-									Expression::eq('Name', 'any')
+							\Onphp\Expression::expAnd(
+								\Onphp\Expression::expOr(
+									\Onphp\Expression::eq('Name', 'some'),
+									\Onphp\Expression::eq('Name', 'any')
 								),
-								Expression::eq('id', 1)
+								\Onphp\Expression::eq('id', 1)
 							)
 						)
 				)->
 				// complex boolean expressions
 				assertCriteria(
-					'from TestUser where (id = 1) != ((1 = id) = (id >= 2))',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where (id = 1) != ((1 = id) = (id >= 2))',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::notEq(
-								Expression::eq('id', 1),
-								Expression::eq(
-									Expression::eq(1, 'id'),
-									Expression::gtEq('id', 2)
+							\Onphp\Expression::notEq(
+								\Onphp\Expression::eq('id', 1),
+								\Onphp\Expression::eq(
+									\Onphp\Expression::eq(1, 'id'),
+									\Onphp\Expression::gtEq('id', 2)
 								)
 							)
 						)
 				)->
 				// unary not
 				assertCriteria(
-					'from TestUser where not (not not id = 1 and not id > 1)',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where not (not not id = 1 and not id > 1)',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::not(
-								Expression::expAnd(
-									Expression::not(
-										Expression::not(
-											Expression::eq('id', 1)
+							\Onphp\Expression::not(
+								\Onphp\Expression::expAnd(
+									\Onphp\Expression::not(
+										\Onphp\Expression::not(
+											\Onphp\Expression::eq('id', 1)
 										)
 									),
-									Expression::not(
-										Expression::gt('id', 1)
+									\Onphp\Expression::not(
+										\Onphp\Expression::gt('id', 1)
 									)
 								)
 							)
@@ -273,54 +278,54 @@ public function testWhere()
 				)->
 				// is ([not] null|true|false)
 				assertCriteria(
-					'from TestUser where id is null or id is not null or id is true or id is false',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where id is null or id is not null or id is true or id is false',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expOr(
-								Expression::expOr(
-									Expression::expOr(
-										Expression::isNull('id'),
-										Expression::notNull('id')
+							\Onphp\Expression::expOr(
+								\Onphp\Expression::expOr(
+									\Onphp\Expression::expOr(
+										\Onphp\Expression::isNull('id'),
+										\Onphp\Expression::notNull('id')
 									),
-									Expression::isTrue('id')
+									\Onphp\Expression::isTrue('id')
 								),
-								Expression::isFalse('id')
+								\Onphp\Expression::isFalse('id')
 							)
 						)
 				)->
 				// [not] in
 				assertCriteria(
-					'from TestUser where id in (1) or id not in (1, "2", $1, true)',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where id in (1) or id not in (1, "2", $1, true)',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expOr(
-								Expression::in('id', array(1)),
-								Expression::notIn('id', array(1, '2', true, true))
+							\Onphp\Expression::expOr(
+								\Onphp\Expression::in('id', array(1)),
+								\Onphp\Expression::notIn('id', array(1, '2', true, true))
 							)
 						),
 					array(1 => true)
 				)->
 				// in subquery
 				assertCriteria(
-					'from TestUser where id in ($1)',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where id in ($1)',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::in(
+							\Onphp\Expression::in(
 								'id',
-								Criteria::create(TestUser::dao())->
-									setProjection(Projection::property('id'))
+								\Onphp\Criteria::create(TestUser::dao())->
+									setProjection(\Onphp\Projection::property('id'))
 							)
 						),
 					array(
-						1 => OQL::select('id from TestUser')->toCriteria()
+						1 => \Onphp\OQL::select('id from \Onphp\Test\TestUser')->toCriteria()
 					)
 				)->
 				// in array
 				assertCriteria(
-					'from TestUser where id in ($1)',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where id in ($1)',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::in(
+							\Onphp\Expression::in(
 								'id',
 								array(1, 2)
 							)
@@ -331,26 +336,26 @@ public function testWhere()
 				)->
 				// [not] (like|ilike|similar to)
 				assertCriteria(
-					'from TestUser where id like $1 or id not like "Ы%" '
+					'from \Onphp\Test\TestUser where id like $1 or id not like "Ы%" '
 					.'or id ilike $2 or id not ilike "ы%" '
 					.'or Name similar to "s" or Name not similar to $3',
-					Criteria::create(TestUser::dao())->
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expOr(
-								Expression::expOr(
-									Expression::expOr(
-										Expression::expOr(
-											Expression::expOr(
-												Expression::like('id', 'ы'),
-												Expression::notLike('id', 'Ы%')
+							\Onphp\Expression::expOr(
+								\Onphp\Expression::expOr(
+									\Onphp\Expression::expOr(
+										\Onphp\Expression::expOr(
+											\Onphp\Expression::expOr(
+												\Onphp\Expression::like('id', 'ы'),
+												\Onphp\Expression::notLike('id', 'Ы%')
 											),
-											Expression::ilike('id', 'Ы')
+											\Onphp\Expression::ilike('id', 'Ы')
 										),
-										Expression::notIlike('id', 'ы%')
+										\Onphp\Expression::notIlike('id', 'ы%')
 									),
-									Expression::similar('Name', 's')
+									\Onphp\Expression::similar('Name', 's')
 								),
-								Expression::notSimilar('Name', 'S')
+								\Onphp\Expression::notSimilar('Name', 'S')
 							)
 						),
 					array(
@@ -361,32 +366,32 @@ public function testWhere()
 				)->
 				// between
 				assertCriteria(
-					'from TestUser where created between "2008-08-06 10:00" and $1 '
+					'from \Onphp\Test\TestUser where created between "2008-08-06 10:00" and $1 '
 					.'or id between id and 10',
-					Criteria::create(TestUser::dao())->
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::expOr(
-								Expression::between(
+							\Onphp\Expression::expOr(
+								\Onphp\Expression::between(
 									'created',
 									'2008-08-06 10:00',
-									SQLFunction::create('now')
+									\Onphp\SQLFunction::create('now')
 								),
-								Expression::between('id', 'id', 10)
+								\Onphp\Expression::between('id', 'id', 10)
 							)
 						),
-					array(1 => SQLFunction::create('now'))
+					array(1 => \Onphp\SQLFunction::create('now'))
 				)->
 				// arithmetic expression
 				assertCriteria(
-					'from TestUser where (2 + -id --1) / 2 = id',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser where (2 + -id --1) / 2 = id',
+					\Onphp\Criteria::create(TestUser::dao())->
 						add(
-							Expression::eq(
-								Expression::div(
-									Expression::sub(
-										Expression::add(
+							\Onphp\Expression::eq(
+								\Onphp\Expression::div(
+									\Onphp\Expression::sub(
+										\Onphp\Expression::add(
 											2,
-											Expression::minus('id')
+											\Onphp\Expression::minus('id')
 										),
 										-1
 									),
@@ -403,47 +408,47 @@ public function testGroupBy()
 		{
 			$this->
 				assertCriteria(
-					'from TestUser group by id',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser group by id',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::group('id')
+							\Onphp\Projection::group('id')
 						)
 				)->
 				assertCriteria(
-					'from TestUser group by id, nickname',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser group by id, nickname',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::chain()->
-								add(Projection::group('id'))->
-								add(Projection::group('nickname'))
+							\Onphp\Projection::chain()->
+								add(\Onphp\Projection::group('id'))->
+								add(\Onphp\Projection::group('nickname'))
 						)
 				)->
 				assertCriteria(
-					'from TestUser group by id + 1, id / 2',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser group by id + 1, id / 2',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::chain()->
+							\Onphp\Projection::chain()->
 								add(
-									Projection::group(
-										Expression::add('id', 1)
+									\Onphp\Projection::group(
+										\Onphp\Expression::add('id', 1)
 									)
 								)->
 								add(
-									Projection::group(
-										Expression::div('id', 2)
+									\Onphp\Projection::group(
+										\Onphp\Expression::div('id', 2)
 									)
 								)
 						)
 				)->
 				assertCriteria(
-					'from TestUser group by id > (1 + id) / 2',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser group by id > (1 + id) / 2',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::group(
-								Expression::gt(
+							\Onphp\Projection::group(
+								\Onphp\Expression::gt(
 									'id',
-									Expression::div(
-										Expression::add(1, 'id'),
+									\Onphp\Expression::div(
+										\Onphp\Expression::add(1, 'id'),
 										2
 									)
 								)
@@ -451,15 +456,15 @@ public function testGroupBy()
 						)
 				)->
 				assertCriteria(
-					'from TestUser group by $1, $2 - $3',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser group by $1, $2 - $3',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::chain()->
-								add(Projection::group('id'))->
+							\Onphp\Projection::chain()->
+								add(\Onphp\Projection::group('id'))->
 								add(
-									Projection::group(
-										Expression::sub(
-											SQLFunction::create('rand'),
+									\Onphp\Projection::group(
+										\Onphp\Expression::sub(
+											\Onphp\SQLFunction::create('rand'),
 											10
 										)
 									)
@@ -467,7 +472,7 @@ public function testGroupBy()
 						),
 					array(
 						1 => 'id',
-						2 => SQLFunction::create('rand'),
+						2 => \Onphp\SQLFunction::create('rand'),
 						3 => 10 
 					)
 				);
@@ -478,45 +483,45 @@ public function testOrderBy()
 			$this->
 				// property
 				assertCriteria(
-					'from TestUser order by id',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser order by id',
+					\Onphp\Criteria::create(TestUser::dao())->
 						addOrder(
-							OrderBy::create('id')
+							\Onphp\OrderBy::create('id')
 						)
 				)->
 				// asc|desc
 				assertCriteria(
-					'from TestUser order by id asc, nickname desc',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser order by id asc, nickname desc',
+					\Onphp\Criteria::create(TestUser::dao())->
 						addOrder(
-							OrderChain::create()->
+							\Onphp\OrderChain::create()->
 								add(
-									OrderBy::create('id')->asc()
+									\Onphp\OrderBy::create('id')->asc()
 								)->
 								add(
-									OrderBy::create('nickname')->desc()
+									\Onphp\OrderBy::create('nickname')->desc()
 								)
 						)
 				)->
 				// substitution, boolean and arithmetic expressions
 				assertCriteria(
-					'from TestUser order by $1, nickname is null, -id/2 + 1 asc ',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser order by $1, nickname is null, -id/2 + 1 asc ',
+					\Onphp\Criteria::create(TestUser::dao())->
 						addOrder(
-							OrderChain::create()->
+							\Onphp\OrderChain::create()->
 								add(
-									OrderBy::create(SQLFunction::create('rand'))
+									\Onphp\OrderBy::create(\Onphp\SQLFunction::create('rand'))
 								)->
 								add(
-									OrderBy::create(
-										Expression::isNull('nickname')
+									\Onphp\OrderBy::create(
+										\Onphp\Expression::isNull('nickname')
 									)
 								)->
 								add(
-									OrderBy::create(
-										Expression::add(
-											Expression::div(
-												Expression::minus('id'),
+									\Onphp\OrderBy::create(
+										\Onphp\Expression::add(
+											\Onphp\Expression::div(
+												\Onphp\Expression::minus('id'),
 												2
 											),
 											1
@@ -525,7 +530,7 @@ public function testOrderBy()
 									asc()
 								)
 						),
-					array(1 => SQLFunction::create('rand'))
+					array(1 => \Onphp\SQLFunction::create('rand'))
 				);
 		}
 		
@@ -534,16 +539,16 @@ public function testHaving()
 			$this->
 				// arithmetic expression
 				assertCriteria(
-					'from TestUser having (2 + -id --1) / 2 = id',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser having (2 + -id --1) / 2 = id',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::having(
-								Expression::eq(
-									Expression::div(
-										Expression::sub(
-											Expression::add(
+							\Onphp\Projection::having(
+								\Onphp\Expression::eq(
+									\Onphp\Expression::div(
+										\Onphp\Expression::sub(
+											\Onphp\Expression::add(
 												2,
-												Expression::minus('id')
+												\Onphp\Expression::minus('id')
 											),
 											-1
 										),
@@ -557,15 +562,15 @@ public function testHaving()
 				)->
 				// complex boolean expressions
 				assertCriteria(
-					'from TestUser having (id = 1) != ((1 = id) = (id >= 2))',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser having (id = 1) != ((1 = id) = (id >= 2))',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::having(
-								Expression::notEq(
-									Expression::eq('id', 1),
-									Expression::eq(
-										Expression::eq(1, 'id'),
-										Expression::gtEq('id', 2)
+							\Onphp\Projection::having(
+								\Onphp\Expression::notEq(
+									\Onphp\Expression::eq('id', 1),
+									\Onphp\Expression::eq(
+										\Onphp\Expression::eq(1, 'id'),
+										\Onphp\Expression::gtEq('id', 2)
 									)
 								)
 							)
@@ -573,17 +578,17 @@ public function testHaving()
 				)->
 				// substitution
 				assertCriteria(
-					'from TestUser having $1 = 1',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser having $1 = 1',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::having(
-								Expression::eq(
-									SQLFunction::create('count', 'id'),
+							\Onphp\Projection::having(
+								\Onphp\Expression::eq(
+									\Onphp\SQLFunction::create('count', 'id'),
 									1
 								)
 							)
 						),
-					array(1 => SQLFunction::create('count', 'id'))
+					array(1 => \Onphp\SQLFunction::create('count', 'id'))
 				);
 		}
 		
@@ -591,25 +596,25 @@ public function testLimitOffset()
 		{
 			$this->
 				assertCriteria(
-					'from TestUser limit 10',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser limit 10',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setLimit(10)
 				)->
 				assertCriteria(
-					'from TestUser limit $1',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser limit $1',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setLimit(31),
 					array(1 => 31)
 				)->
 				assertCriteria(
-					'from TestUser limit 10 offset 0',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser limit 10 offset 0',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setLimit(10)->
 						setOffset(0)
 				)->
 				assertCriteria(
-					'from TestUser limit $1 offset $2',
-					Criteria::create(TestUser::dao())->
+					'from \Onphp\Test\TestUser limit $1 offset $2',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setLimit(10)->
 						setOffset(31),
 					array(1 => 10, 2 => 31)
@@ -630,39 +635,39 @@ public function testBind()
 				// Identifiable object
 				array(1 => $user),
 				// DialectString object
-				array(1 => SQLFunction::create('rand'))
+				array(1 => \Onphp\SQLFunction::create('rand'))
 			);
 			
 			foreach ($bindingsList as $bindings) {
 				$value = $bindings[1];
-				if ($value instanceof Identifiable)
+				if ($value instanceof \Onphp\Identifiable)
 					$value = $value->getId();
 				
 				$this->
 					// in property list
 					assertCriteria(
-						'$1 from TestUser',
-						Criteria::create(TestUser::dao())->
+						'$1 from \Onphp\Test\TestUser',
+						\Onphp\Criteria::create(TestUser::dao())->
 							setProjection(
-								Projection::property($value)
+								\Onphp\Projection::property($value)
 							),
 						$bindings
 					)->
 					// in aggregate function
 					assertCriteria(
-						'count($1) from TestUser',
-						Criteria::create(TestUser::dao())->
+						'count($1) from \Onphp\Test\TestUser',
+						\Onphp\Criteria::create(TestUser::dao())->
 							setProjection(
-								Projection::count($value)
+								\Onphp\Projection::count($value)
 							),
 						$bindings
 					)->
 					// in where expression
 					assertCriteria(
-						'from TestUser where id = $1',
-						Criteria::create(TestUser::dao())->
+						'from \Onphp\Test\TestUser where id = $1',
+						\Onphp\Criteria::create(TestUser::dao())->
 							add(
-								Expression::eq('id', $value)
+								\Onphp\Expression::eq('id', $value)
 							),
 						$bindings
 					);
@@ -670,10 +675,10 @@ public function testBind()
 				// in 'in' expression
 				if (is_scalar($value)) {
 					$this->assertCriteria(
-						'from TestUser where id in (1, $1)',
-						Criteria::create(TestUser::dao())->
+						'from \Onphp\Test\TestUser where id in (1, $1)',
+						\Onphp\Criteria::create(TestUser::dao())->
 							add(
-								Expression::in('id', array(1, $value))
+								\Onphp\Expression::in('id', array(1, $value))
 							),
 						$bindings
 					);
@@ -682,31 +687,31 @@ public function testBind()
 				$this->
 					// in order by expression
 					assertCriteria(
-						'from TestUser order by $1',
-						Criteria::create(TestUser::dao())->
+						'from \Onphp\Test\TestUser order by $1',
+						\Onphp\Criteria::create(TestUser::dao())->
 							addOrder(
-								OrderBy::create($value)
+								\Onphp\OrderBy::create($value)
 							),
 						$bindings
 					)->
 					// in having expression
 					assertCriteria(
-						'from TestUser having id = $1',
-						Criteria::create(TestUser::dao())->
+						'from \Onphp\Test\TestUser having id = $1',
+						\Onphp\Criteria::create(TestUser::dao())->
 							setProjection(
-								Projection::having(
-									Expression::eq('id', $value)
+								\Onphp\Projection::having(
+									\Onphp\Expression::eq('id', $value)
 								)
 							),
 						$bindings
 					)->
 					// in group by expression
 					assertCriteria(
-						'from TestUser group by id = $1',
-						Criteria::create(TestUser::dao())->
+						'from \Onphp\Test\TestUser group by id = $1',
+						\Onphp\Criteria::create(TestUser::dao())->
 							setProjection(
-								Projection::group(
-									Expression::eq('id', $value)
+								\Onphp\Projection::group(
+									\Onphp\Expression::eq('id', $value)
 								)
 							),
 						$bindings
@@ -716,15 +721,15 @@ public function testBind()
 					$this->
 						// in limit expression
 						assertCriteria(
-							'from TestUser limit $1',
-							Criteria::create(TestUser::dao())->
+							'from \Onphp\Test\TestUser limit $1',
+							\Onphp\Criteria::create(TestUser::dao())->
 								setLimit($value),
 							$bindings
 						)->
 						// in offset expression
 						assertCriteria(
-							'from TestUser offset $1',
-							Criteria::create(TestUser::dao())->
+							'from \Onphp\Test\TestUser offset $1',
+							\Onphp\Criteria::create(TestUser::dao())->
 								setOffset($value),
 							$bindings
 						);
@@ -734,12 +739,12 @@ public function testBind()
 		public function testBindNext()
 		{
 			$this->assertEquals(
-				OQL::select('from TestCity where foo = $1 and $2 = $3')->
+				\Onphp\OQL::select('from \Onphp\Test\TestCity where foo = $1 and $2 = $3')->
 				bind(1, 'bar')->
 				bind(2, 'foo')->
 				bind(3, 'boo'),
 				
-				OQL::select('from TestCity where foo = $1 and $2 = $3')->
+				\Onphp\OQL::select('from \Onphp\Test\TestCity where foo = $1 and $2 = $3')->
 				bindNext('bar')->
 				bindNext('foo')->
 				bindNext('boo')
@@ -748,77 +753,77 @@ public function testBindNext()
 		
 		public function testQuery()
 		{
-			$criteria = Criteria::create(TestUser::dao())->
+			$criteria = \Onphp\Criteria::create(TestUser::dao())->
 				setProjection(
-					Projection::property('id')
+					\Onphp\Projection::property('id')
 				)->
 				add(
-					Expression::isTrue('id')
+					\Onphp\Expression::isTrue('id')
 				);
 			
 			$this->
 				// property and where
 				assertCriteria(
-					'id from TestUser where id is true',
+					'id from \Onphp\Test\TestUser where id is true',
 					$criteria
 				)->
 				// property, where and order by
 				assertCriteria(
-					'id from TestUser where id is true order by id asc',
+					'id from \Onphp\Test\TestUser where id is true order by id asc',
 					$criteria->
 						addOrder(
-							OrderBy::create('id')->asc()
+							\Onphp\OrderBy::create('id')->asc()
 						)
 				)->
 				// property, where, order by, limit, offset
 				assertCriteria(
-					'id from TestUser where id is true order by id asc limit 10 offset 1',
+					'id from \Onphp\Test\TestUser where id is true order by id asc limit 10 offset 1',
 					$criteria->
 						setLimit(10)->
 						setOffset(1)
 				)->
 				// property, where, order by, limit, offset, group by
 				assertCriteria(
-					'id from TestUser where id is true group by id order by id asc limit 10 offset 1',
+					'id from \Onphp\Test\TestUser where id is true group by id order by id asc limit 10 offset 1',
 					$criteria->
 						setProjection(
-							Projection::chain()->
-								add(Projection::property('id'))->
-								add(Projection::group('id'))
+							\Onphp\Projection::chain()->
+								add(\Onphp\Projection::property('id'))->
+								add(\Onphp\Projection::group('id'))
 						)
 				)->
 				// property, where, order by, limit, offset, group by, having
 				assertCriteria(
-					'id from TestUser where id is true group by id order by id asc having id = 1 limit 10 offset 1',
+					'id from \Onphp\Test\TestUser where id is true group by id order by id asc having id = 1 limit 10 offset 1',
 					$criteria->
 						setProjection(
-							Projection::chain()->
-								add(Projection::property('id'))->
-								add(Projection::group('id'))->
+							\Onphp\Projection::chain()->
+								add(\Onphp\Projection::property('id'))->
+								add(\Onphp\Projection::group('id'))->
 								add(
-									Projection::having(
-										Expression::eq('id', 1)
+									\Onphp\Projection::having(
+										\Onphp\Expression::eq('id', 1)
 									)
 								)
 						)
 				)->
 				// property, group by, having
 				assertCriteria(
-					'count(id) as count from TestUser group by id having count = 2',
-					Criteria::create(TestUser::dao())->
+					'count(id) as count from \Onphp\Test\TestUser group by id having count = 2',
+					\Onphp\Criteria::create(TestUser::dao())->
 						setProjection(
-							Projection::chain()->
-								add(Projection::count('id', 'count'))->
-								add(Projection::group('id'))->
+							\Onphp\Projection::chain()->
+								add(\Onphp\Projection::count('id', 'count'))->
+								add(\Onphp\Projection::group('id'))->
 								add(
-									Projection::having(
-										Expression::eq('count', 2)
+									\Onphp\Projection::having(
+										\Onphp\Expression::eq('count', 2)
 									)
 								)
 						)
 				);
 		}
-		
+
 		public function testSyntaxError()
 		{
 			$this->
@@ -844,101 +849,101 @@ public function testSyntaxError()
 				)->
 				assertSyntaxError(
 					'from 123',
-					'invalid class name: 123'
+					'invalid class name: \123'
 				)->
 				assertSyntaxError(
-					'from OQL',
-					'class must implement DAOConnected interface: OQL'
+					'from \Onphp\OQL',
+					'class must implement DAOConnected interface: \Onphp\OQL'
 				)->
 				assertSyntaxError(
-					'from TestUser order by having where',
+					'from \Onphp\Test\TestUser order by having where',
 					'unexpected: where'
 				)->
 				assertSyntaxError(
-					'from TestUser where',
+					'from \Onphp\Test\TestUser where',
 					'expecting first argument in expression: =|!='
 				)->
 				assertSyntaxError(
-					'from TestUser where 1 + ',
+					'from \Onphp\Test\TestUser where 1 + ',
 					'expecting first argument in expression: *|/'
 				)->
 				assertSyntaxError(
-					'from TestUser where and id = 1',
+					'from \Onphp\Test\TestUser where and id = 1',
 					"expecting 'where' expression"
 				)->
 				assertSyntaxError(
-					'from TestUser where ((e=1)',
+					'from \Onphp\Test\TestUser where ((e=1)',
 					"expecting ')' in expression"
 				)->
 				assertSyntaxError(
-					'from TestUser where ((e=1)))',
+					'from \Onphp\Test\TestUser where ((e=1)))',
 					"unexpected ')'"
 				)->
 				assertSyntaxError(
-					'from TestUser where a is',
+					'from \Onphp\Test\TestUser where a is',
 					"expecting 'null', 'not null', 'true' or 'false'"
 				)->
 				assertSyntaxError(
-					'from TestUser where a in (',
+					'from \Onphp\Test\TestUser where a in (',
 					'expecting constant or substitution in expression: in'
 				)->
 				assertSyntaxError(
-					'from TestUser where a in (1',
+					'from \Onphp\Test\TestUser where a in (1',
 					"expecting ')' in expression: in"
 				)->
 				assertSyntaxError(
-					'from TestUser where a not',
+					'from \Onphp\Test\TestUser where a not',
 					'expecting in, like, ilike or similar to'
 				)->
 				assertSyntaxError(
-					'from TestUser where a like 123',
+					'from \Onphp\Test\TestUser where a like 123',
 					'expecting string constant or substitution: like'
 				)->
 				assertSyntaxError(
-					'from TestUser where a between',
+					'from \Onphp\Test\TestUser where a between',
 					'expecting first argument in expression: between'
 				)->
 				assertSyntaxError(
-					'from TestUser where a between 1',
+					'from \Onphp\Test\TestUser where a between 1',
 					"expecting 'and' in expression: between"
 				)->
 				assertSyntaxError(
-					'from TestUser where a between 1 and',
+					'from \Onphp\Test\TestUser where a between 1 and',
 					'expecting second argument in expression: between'
 				)->
 				assertSyntaxError(
-					'from TestUser limit',
+					'from \Onphp\Test\TestUser limit',
 					"expecting 'limit' expression"
 				)->
 				assertSyntaxError(
-					'from TestUser limit prop',
+					'from \Onphp\Test\TestUser limit prop',
 					"expecting 'limit' expression"
 				)->
 				assertSyntaxError(
-					'from TestUser limit offset',
+					'from \Onphp\Test\TestUser limit offset',
 					"expecting 'limit' expression"
 				)->
 				assertSyntaxError(
-					'from TestUser offset',
+					'from \Onphp\Test\TestUser offset',
 					"expecting 'offset' expression"
 				)->
 				assertSyntaxError(
-					'from TestUser offset prop',
+					'from \Onphp\Test\TestUser offset prop',
 					"expecting 'offset' expression"
 				);
 		}
 		
 		/**
-		 * @return OqlSelectTest
+		 * @return \Onphp\Test\OqlSelectTest
 		**/
-		private function assertCriteria($query, Criteria $criteria, $bindings = null)
+		private function assertCriteria($query, \Onphp\Criteria $criteria, $bindings = null)
 		{
-			$oqlQuery = OQL::select($query);
+			$oqlQuery = \Onphp\OQL::select($query);
 			
 			if (is_array($bindings))
 				$oqlQuery->bindAll($bindings);
 			
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
 			$this->assertEquals(
 				$oqlQuery->toCriteria()->toDialectString($dialect),
@@ -949,14 +954,14 @@ private function assertCriteria($query, Criteria $criteria, $bindings = null)
 		}
 		
 		/**
-		 * @return OqlSelectTest
+		 * @return \Onphp\Test\OqlSelectTest
 		**/
 		private function assertSyntaxError($query, $message)
 		{
 			try {
-				OQL::select($query);
+				\Onphp\OQL::select($query);
 				
-			} catch (SyntaxErrorException $e) {
+			} catch (\Onphp\SyntaxErrorException $e) {
 				$this->assertEquals($e->getMessage(), $message);
 			}
 			
diff --git a/test/main/OqlTokenizerTest.class.php b/test/main/OqlTokenizerTest.class.php
index fea4cf9566..f3ce2f4306 100644
--- a/test/main/OqlTokenizerTest.class.php
+++ b/test/main/OqlTokenizerTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class OqlTokenizerTest extends TestCase
 	{
 		public function testEmpty()
@@ -21,9 +23,9 @@ public function testPosition()
 			$this->assertTokens(
 				"\n1\n\r1\r\n\n1\n",
 				array(
-					OqlToken::make(1., '1', OqlToken::NUMBER, 2, 0),
-					OqlToken::make(1., '1', OqlToken::NUMBER, 3, 1),
-					OqlToken::make(1., '1', OqlToken::NUMBER, 5, 0)
+					\Onphp\OqlToken::make(1., '1', \Onphp\OqlToken::NUMBER, 2, 0),
+					\Onphp\OqlToken::make(1., '1', \Onphp\OqlToken::NUMBER, 3, 1),
+					\Onphp\OqlToken::make(1., '1', \Onphp\OqlToken::NUMBER, 5, 0)
 				)
 			);
 		}
@@ -34,31 +36,31 @@ public function testString()
 				'"" "some string \"substring1\" \'substring2\' `substring3`"  '
 				."'многа \' \" ` букаф' `strange quotes` ",
 				array(
-					OqlToken::make(
+					\Onphp\OqlToken::make(
 						'',
 						'""',
-						OqlToken::STRING,
+						\Onphp\OqlToken::STRING,
 						1,
 						0
 					),
-					OqlToken::make(
+					\Onphp\OqlToken::make(
 						'some string "substring1" \'substring2\' `substring3`',
 						'"some string \"substring1\" \'substring2\' `substring3`"',
-						OqlToken::STRING,
+						\Onphp\OqlToken::STRING,
 						1,
 						3
 					),
-					OqlToken::make(
+					\Onphp\OqlToken::make(
 						"многа ' \" ` букаф",
 						"'многа \' \" ` букаф'",
-						OqlToken::STRING,
+						\Onphp\OqlToken::STRING,
 						1,
 						59
 					),
-					OqlToken::make(
+					\Onphp\OqlToken::make(
 						'strange quotes',
 						'`strange quotes`',
-						OqlToken::STRING,
+						\Onphp\OqlToken::STRING,
 						1,
 						80
 					)
@@ -71,17 +73,17 @@ public function testNumber()
 			$this->assertTokens(
 				'123 +123 .123 123.456 1e23 1E+23 1E-23 0.1e23 -.1e23',
 				array(
-					OqlToken::make(123., '123', OqlToken::NUMBER, 1, 0),
-					OqlToken::make('+', '+', OqlToken::ARITHMETIC_OPERATOR, 1, 4),
-					OqlToken::make(123., '123', OqlToken::NUMBER, 1, 5),
-					OqlToken::make(.123, '.123', OqlToken::NUMBER, 1, 9),
-					OqlToken::make(123.456, '123.456', OqlToken::NUMBER, 1, 14),
-					OqlToken::make(1e23, '1e23', OqlToken::NUMBER, 1, 22),
-					OqlToken::make(1e23, '1E+23', OqlToken::NUMBER, 1, 27),
-					OqlToken::make(1e-23, '1E-23', OqlToken::NUMBER, 1, 33),
-					OqlToken::make(1e22, '0.1e23', OqlToken::NUMBER, 1, 39),
-					OqlToken::make('-', '-', OqlToken::ARITHMETIC_OPERATOR, 1, 46),
-					OqlToken::make(1e22, '.1e23', OqlToken::NUMBER, 1, 47)
+					\Onphp\OqlToken::make(123., '123', \Onphp\OqlToken::NUMBER, 1, 0),
+					\Onphp\OqlToken::make('+', '+', \Onphp\OqlToken::ARITHMETIC_OPERATOR, 1, 4),
+					\Onphp\OqlToken::make(123., '123', \Onphp\OqlToken::NUMBER, 1, 5),
+					\Onphp\OqlToken::make(.123, '.123', \Onphp\OqlToken::NUMBER, 1, 9),
+					\Onphp\OqlToken::make(123.456, '123.456', \Onphp\OqlToken::NUMBER, 1, 14),
+					\Onphp\OqlToken::make(1e23, '1e23', \Onphp\OqlToken::NUMBER, 1, 22),
+					\Onphp\OqlToken::make(1e23, '1E+23', \Onphp\OqlToken::NUMBER, 1, 27),
+					\Onphp\OqlToken::make(1e-23, '1E-23', \Onphp\OqlToken::NUMBER, 1, 33),
+					\Onphp\OqlToken::make(1e22, '0.1e23', \Onphp\OqlToken::NUMBER, 1, 39),
+					\Onphp\OqlToken::make('-', '-', \Onphp\OqlToken::ARITHMETIC_OPERATOR, 1, 46),
+					\Onphp\OqlToken::make(1e22, '.1e23', \Onphp\OqlToken::NUMBER, 1, 47)
 				)
 			);
 		}
@@ -91,8 +93,8 @@ public function testBoolean()
 			$this->assertTokens(
 				'TrUe falSE',
 				array(
-					OqlToken::make(true, 'TrUe', OqlToken::BOOLEAN, 1, 0),
-					OqlToken::make(false, 'falSE', OqlToken::BOOLEAN, 1, 5)
+					\Onphp\OqlToken::make(true, 'TrUe', \Onphp\OqlToken::BOOLEAN, 1, 0),
+					\Onphp\OqlToken::make(false, 'falSE', \Onphp\OqlToken::BOOLEAN, 1, 5)
 				)
 			);
 		}
@@ -102,11 +104,11 @@ public function testNull()
 			$this->assertTokens(
 				'null testNULL nullTest testNULLtest NULL',
 				array(
-					OqlToken::make('null', 'null', OqlToken::NULL, 1, 0),
-					OqlToken::make('testNULL', 'testNULL', OqlToken::IDENTIFIER, 1, 5),
-					OqlToken::make('nullTest', 'nullTest', OqlToken::IDENTIFIER, 1, 14),
-					OqlToken::make('testNULLtest', 'testNULLtest', OqlToken::IDENTIFIER, 1, 23),
-					OqlToken::make('null', 'NULL', OqlToken::NULL, 1, 36)
+					\Onphp\OqlToken::make('null', 'null', \Onphp\OqlToken::NULL, 1, 0),
+					\Onphp\OqlToken::make('testNULL', 'testNULL', \Onphp\OqlToken::IDENTIFIER, 1, 5),
+					\Onphp\OqlToken::make('nullTest', 'nullTest', \Onphp\OqlToken::IDENTIFIER, 1, 14),
+					\Onphp\OqlToken::make('testNULLtest', 'testNULLtest', \Onphp\OqlToken::IDENTIFIER, 1, 23),
+					\Onphp\OqlToken::make('null', 'NULL', \Onphp\OqlToken::NULL, 1, 36)
 				)
 			);
 		}
@@ -116,8 +118,8 @@ public function testSubstitution()
 			$this->assertTokens(
 				' $1 $22 $ ',
 				array(
-					OqlToken::make(1, '$1', OqlToken::SUBSTITUTION, 1, 1),
-					OqlToken::make(22, '$22', OqlToken::SUBSTITUTION, 1, 4)
+					\Onphp\OqlToken::make(1, '$1', \Onphp\OqlToken::SUBSTITUTION, 1, 1),
+					\Onphp\OqlToken::make(22, '$22', \Onphp\OqlToken::SUBSTITUTION, 1, 4)
 				)
 			);
 		}
@@ -129,26 +131,26 @@ public function testKeyword()
 				."ORDER BY asc desc having limit offset not and or "
 				."as in is SIMILAR  TO ilike",
 				array(
-					OqlToken::make('distinct', 'distinct', OqlToken::KEYWORD, 1, 0),
-					OqlToken::make('from', 'From', OqlToken::KEYWORD, 1, 9),
-					OqlToken::make('where', 'WHERE', OqlToken::KEYWORD, 1, 14),
-					OqlToken::make('like', 'like', OqlToken::KEYWORD, 1, 20),
-					OqlToken::make('between', 'between', OqlToken::KEYWORD, 1, 25),
-					OqlToken::make('group by', "group \n\t\r by", OqlToken::KEYWORD, 1, 33),
-					OqlToken::make('order by', 'ORDER BY', OqlToken::KEYWORD, 2, 6),
-					OqlToken::make('asc', 'asc', OqlToken::KEYWORD, 2, 15),
-					OqlToken::make('desc', 'desc', OqlToken::KEYWORD, 2, 19),
-					OqlToken::make('having', 'having', OqlToken::KEYWORD, 2, 24),
-					OqlToken::make('limit', 'limit', OqlToken::KEYWORD, 2, 31),
-					OqlToken::make('offset', 'offset', OqlToken::KEYWORD, 2, 37),
-					OqlToken::make('not', 'not', OqlToken::KEYWORD, 2, 44),
-					OqlToken::make('and', 'and', OqlToken::KEYWORD, 2, 48),
-					OqlToken::make('or', 'or', OqlToken::KEYWORD, 2, 52),
-					OqlToken::make('as', 'as', OqlToken::KEYWORD, 2, 55),
-					OqlToken::make('in', 'in', OqlToken::KEYWORD, 2, 58),
-					OqlToken::make('is', 'is', OqlToken::KEYWORD, 2, 61),
-					OqlToken::make('similar to', 'SIMILAR  TO', OqlToken::KEYWORD, 2, 64),
-					OqlToken::make('ilike', 'ilike', OqlToken::KEYWORD, 2, 76)
+					\Onphp\OqlToken::make('distinct', 'distinct', \Onphp\OqlToken::KEYWORD, 1, 0),
+					\Onphp\OqlToken::make('from', 'From', \Onphp\OqlToken::KEYWORD, 1, 9),
+					\Onphp\OqlToken::make('where', 'WHERE', \Onphp\OqlToken::KEYWORD, 1, 14),
+					\Onphp\OqlToken::make('like', 'like', \Onphp\OqlToken::KEYWORD, 1, 20),
+					\Onphp\OqlToken::make('between', 'between', \Onphp\OqlToken::KEYWORD, 1, 25),
+					\Onphp\OqlToken::make('group by', "group \n\t\r by", \Onphp\OqlToken::KEYWORD, 1, 33),
+					\Onphp\OqlToken::make('order by', 'ORDER BY', \Onphp\OqlToken::KEYWORD, 2, 6),
+					\Onphp\OqlToken::make('asc', 'asc', \Onphp\OqlToken::KEYWORD, 2, 15),
+					\Onphp\OqlToken::make('desc', 'desc', \Onphp\OqlToken::KEYWORD, 2, 19),
+					\Onphp\OqlToken::make('having', 'having', \Onphp\OqlToken::KEYWORD, 2, 24),
+					\Onphp\OqlToken::make('limit', 'limit', \Onphp\OqlToken::KEYWORD, 2, 31),
+					\Onphp\OqlToken::make('offset', 'offset', \Onphp\OqlToken::KEYWORD, 2, 37),
+					\Onphp\OqlToken::make('not', 'not', \Onphp\OqlToken::KEYWORD, 2, 44),
+					\Onphp\OqlToken::make('and', 'and', \Onphp\OqlToken::KEYWORD, 2, 48),
+					\Onphp\OqlToken::make('or', 'or', \Onphp\OqlToken::KEYWORD, 2, 52),
+					\Onphp\OqlToken::make('as', 'as', \Onphp\OqlToken::KEYWORD, 2, 55),
+					\Onphp\OqlToken::make('in', 'in', \Onphp\OqlToken::KEYWORD, 2, 58),
+					\Onphp\OqlToken::make('is', 'is', \Onphp\OqlToken::KEYWORD, 2, 61),
+					\Onphp\OqlToken::make('similar to', 'SIMILAR  TO', \Onphp\OqlToken::KEYWORD, 2, 64),
+					\Onphp\OqlToken::make('ilike', 'ilike', \Onphp\OqlToken::KEYWORD, 2, 76)
 				)
 			);
 		}
@@ -158,11 +160,11 @@ public function testAggregateFunction()
 			$this->assertTokens(
 				'SUM aVg min Max count',
 				array(
-					OqlToken::make('sum', 'SUM', OqlToken::AGGREGATE_FUNCTION, 1, 0),
-					OqlToken::make('avg', 'aVg', OqlToken::AGGREGATE_FUNCTION, 1, 4),
-					OqlToken::make('min', 'min', OqlToken::AGGREGATE_FUNCTION, 1, 8),
-					OqlToken::make('max', 'Max', OqlToken::AGGREGATE_FUNCTION, 1, 12),
-					OqlToken::make('count', 'count', OqlToken::AGGREGATE_FUNCTION, 1, 16)
+					\Onphp\OqlToken::make('sum', 'SUM', \Onphp\OqlToken::AGGREGATE_FUNCTION, 1, 0),
+					\Onphp\OqlToken::make('avg', 'aVg', \Onphp\OqlToken::AGGREGATE_FUNCTION, 1, 4),
+					\Onphp\OqlToken::make('min', 'min', \Onphp\OqlToken::AGGREGATE_FUNCTION, 1, 8),
+					\Onphp\OqlToken::make('max', 'Max', \Onphp\OqlToken::AGGREGATE_FUNCTION, 1, 12),
+					\Onphp\OqlToken::make('count', 'count', \Onphp\OqlToken::AGGREGATE_FUNCTION, 1, 16)
 				)
 			);
 		}
@@ -172,10 +174,10 @@ public function testIdentifier()
 			$this->assertTokens(
 				'User _prop1.prop2.prop3 .prop4..prop5 0prop',
 				array(
-					OqlToken::make('User', 'User', OqlToken::IDENTIFIER, 1, 0),
-					OqlToken::make('_prop1.prop2.prop3', '_prop1.prop2.prop3', OqlToken::IDENTIFIER, 1, 5),
-					OqlToken::make('prop4', 'prop4', OqlToken::IDENTIFIER, 1, 25),
-					OqlToken::make('prop5', 'prop5', OqlToken::IDENTIFIER, 1, 32)
+					\Onphp\OqlToken::make('User', 'User', \Onphp\OqlToken::IDENTIFIER, 1, 0),
+					\Onphp\OqlToken::make('_prop1.prop2.prop3', '_prop1.prop2.prop3', \Onphp\OqlToken::IDENTIFIER, 1, 5),
+					\Onphp\OqlToken::make('prop4', 'prop4', \Onphp\OqlToken::IDENTIFIER, 1, 25),
+					\Onphp\OqlToken::make('prop5', 'prop5', \Onphp\OqlToken::IDENTIFIER, 1, 32)
 				)
 			);
 		}
@@ -185,9 +187,9 @@ public function testSymbol()
 			$this->assertTokens(
 				'(,)',
 				array(
-					OqlToken::make('(', '(', OqlToken::PARENTHESES, 1, 0),
-					OqlToken::make(',', ',', OqlToken::PUNCTUATION, 1, 1),
-					OqlToken::make(')', ')', OqlToken::PARENTHESES, 1, 2)
+					\Onphp\OqlToken::make('(', '(', \Onphp\OqlToken::PARENTHESES, 1, 0),
+					\Onphp\OqlToken::make(',', ',', \Onphp\OqlToken::PUNCTUATION, 1, 1),
+					\Onphp\OqlToken::make(')', ')', \Onphp\OqlToken::PARENTHESES, 1, 2)
 				)
 			);
 		}
@@ -197,17 +199,17 @@ public function testOperator()
 			$this->assertTokens(
 				'>= <= <> < > != = + - / *',
 				array(
-					OqlToken::make('>=', '>=', OqlToken::COMPARISON_OPERATOR, 1, 0),
-					OqlToken::make('<=', '<=', OqlToken::COMPARISON_OPERATOR, 1, 3),
-					OqlToken::make('!=', '<>', OqlToken::COMPARISON_OPERATOR, 1, 6),
-					OqlToken::make('<', '<', OqlToken::COMPARISON_OPERATOR, 1, 9),
-					OqlToken::make('>', '>', OqlToken::COMPARISON_OPERATOR, 1, 11),
-					OqlToken::make('!=', '!=', OqlToken::COMPARISON_OPERATOR, 1, 13),
-					OqlToken::make('=', '=', OqlToken::COMPARISON_OPERATOR, 1, 16),
-					OqlToken::make('+', '+', OqlToken::ARITHMETIC_OPERATOR, 1, 18),
-					OqlToken::make('-', '-', OqlToken::ARITHMETIC_OPERATOR, 1, 20),
-					OqlToken::make('/', '/', OqlToken::ARITHMETIC_OPERATOR, 1, 22),
-					OqlToken::make('*', '*', OqlToken::ARITHMETIC_OPERATOR, 1, 24)
+					\Onphp\OqlToken::make('>=', '>=', \Onphp\OqlToken::COMPARISON_OPERATOR, 1, 0),
+					\Onphp\OqlToken::make('<=', '<=', \Onphp\OqlToken::COMPARISON_OPERATOR, 1, 3),
+					\Onphp\OqlToken::make('!=', '<>', \Onphp\OqlToken::COMPARISON_OPERATOR, 1, 6),
+					\Onphp\OqlToken::make('<', '<', \Onphp\OqlToken::COMPARISON_OPERATOR, 1, 9),
+					\Onphp\OqlToken::make('>', '>', \Onphp\OqlToken::COMPARISON_OPERATOR, 1, 11),
+					\Onphp\OqlToken::make('!=', '!=', \Onphp\OqlToken::COMPARISON_OPERATOR, 1, 13),
+					\Onphp\OqlToken::make('=', '=', \Onphp\OqlToken::COMPARISON_OPERATOR, 1, 16),
+					\Onphp\OqlToken::make('+', '+', \Onphp\OqlToken::ARITHMETIC_OPERATOR, 1, 18),
+					\Onphp\OqlToken::make('-', '-', \Onphp\OqlToken::ARITHMETIC_OPERATOR, 1, 20),
+					\Onphp\OqlToken::make('/', '/', \Onphp\OqlToken::ARITHMETIC_OPERATOR, 1, 22),
+					\Onphp\OqlToken::make('*', '*', \Onphp\OqlToken::ARITHMETIC_OPERATOR, 1, 24)
 				)
 			);
 		}
@@ -220,60 +222,60 @@ public function testQuery()
 				."where (id in (1, $1) or id >= $2) and (name like \"%'ы'%\") "
 				."order by id desc",
 				array(
-					OqlToken::make('avg', 'AVG', OqlToken::AGGREGATE_FUNCTION, 1, 0),
-					OqlToken::make('(', '(', OqlToken::PARENTHESES, 1, 3),
-					OqlToken::make('user.id', 'user.id', OqlToken::IDENTIFIER, 1, 4),
-					OqlToken::make(')', ')', OqlToken::PARENTHESES, 1, 11),
-					OqlToken::make('as', 'as', OqlToken::KEYWORD, 1, 13),
-					OqlToken::make('avg', 'Avg', OqlToken::AGGREGATE_FUNCTION, 1, 16),	// identifier actually
-					OqlToken::make(',', ',', OqlToken::PUNCTUATION, 1, 19),
-					OqlToken::make('count', 'count', OqlToken::AGGREGATE_FUNCTION, 1, 21),
-					OqlToken::make('(', '(', OqlToken::PARENTHESES, 1, 26),
-					OqlToken::make('id', 'id', OqlToken::IDENTIFIER, 1, 27),
-					OqlToken::make(')', ')', OqlToken::PARENTHESES, 1, 29),
-					OqlToken::make(',', ',', OqlToken::PUNCTUATION, 1, 30),
-					OqlToken::make('(', '(', OqlToken::PARENTHESES, 1, 32),
-					OqlToken::make('id', 'id', OqlToken::IDENTIFIER, 1, 33),
-					OqlToken::make('+', '+', OqlToken::ARITHMETIC_OPERATOR, 1, 36),
-					OqlToken::make(10., '10', OqlToken::NUMBER, 1, 38),
-					OqlToken::make(')', ')', OqlToken::PARENTHESES, 1, 40),
-					OqlToken::make('/', '/', OqlToken::ARITHMETIC_OPERATOR, 1, 42),
-					OqlToken::make(2., '2', OqlToken::NUMBER, 1, 44),
-					OqlToken::make('from', 'from', OqlToken::KEYWORD, 2, 0),
-					OqlToken::make('UserGroup', 'UserGroup', OqlToken::IDENTIFIER, 2, 5),
-					OqlToken::make('where', 'where', OqlToken::KEYWORD, 3, 0),
-					OqlToken::make('(', '(', OqlToken::PARENTHESES, 3, 6),
-					OqlToken::make('id', 'id', OqlToken::IDENTIFIER, 3, 7),
-					OqlToken::make('in', 'in', OqlToken::KEYWORD, 3, 10),
-					OqlToken::make('(', '(', OqlToken::PARENTHESES, 3, 13),
-					OqlToken::make(1., '1', OqlToken::NUMBER, 3, 14),
-					OqlToken::make(',', ',', OqlToken::PUNCTUATION, 3, 15),
-					OqlToken::make(1, '$1', OqlToken::SUBSTITUTION, 3, 17),
-					OqlToken::make(')', ')', OqlToken::PARENTHESES, 3, 19),
-					OqlToken::make('or', 'or', OqlToken::KEYWORD, 3, 21),
-					OqlToken::make('id', 'id', OqlToken::IDENTIFIER, 3, 24),
-					OqlToken::make('>=', '>=', OqlToken::COMPARISON_OPERATOR, 3, 27),
-					OqlToken::make(2, '$2', OqlToken::SUBSTITUTION, 3, 30),
-					OqlToken::make(')', ')', OqlToken::PARENTHESES, 3, 32),
-					OqlToken::make('and', 'and', OqlToken::KEYWORD, 3, 34),
-					OqlToken::make('(', '(', OqlToken::PARENTHESES, 3, 38),
-					OqlToken::make('name', 'name', OqlToken::IDENTIFIER, 3, 39),
-					OqlToken::make('like', 'like', OqlToken::KEYWORD, 3, 44),
-					OqlToken::make('%\'ы\'%', '"%\'ы\'%"', OqlToken::STRING, 3, 49),
-					OqlToken::make(')', ')', OqlToken::PARENTHESES, 3, 56),
-					OqlToken::make('order by', 'order by', OqlToken::KEYWORD, 3, 58),
-					OqlToken::make('id', 'id', OqlToken::IDENTIFIER, 3, 67),
-					OqlToken::make('desc', 'desc', OqlToken::KEYWORD, 3, 70)
+					\Onphp\OqlToken::make('avg', 'AVG', \Onphp\OqlToken::AGGREGATE_FUNCTION, 1, 0),
+					\Onphp\OqlToken::make('(', '(', \Onphp\OqlToken::PARENTHESES, 1, 3),
+					\Onphp\OqlToken::make('user.id', 'user.id', \Onphp\OqlToken::IDENTIFIER, 1, 4),
+					\Onphp\OqlToken::make(')', ')', \Onphp\OqlToken::PARENTHESES, 1, 11),
+					\Onphp\OqlToken::make('as', 'as', \Onphp\OqlToken::KEYWORD, 1, 13),
+					\Onphp\OqlToken::make('avg', 'Avg', \Onphp\OqlToken::AGGREGATE_FUNCTION, 1, 16),	// identifier actually
+					\Onphp\OqlToken::make(',', ',', \Onphp\OqlToken::PUNCTUATION, 1, 19),
+					\Onphp\OqlToken::make('count', 'count', \Onphp\OqlToken::AGGREGATE_FUNCTION, 1, 21),
+					\Onphp\OqlToken::make('(', '(', \Onphp\OqlToken::PARENTHESES, 1, 26),
+					\Onphp\OqlToken::make('id', 'id', \Onphp\OqlToken::IDENTIFIER, 1, 27),
+					\Onphp\OqlToken::make(')', ')', \Onphp\OqlToken::PARENTHESES, 1, 29),
+					\Onphp\OqlToken::make(',', ',', \Onphp\OqlToken::PUNCTUATION, 1, 30),
+					\Onphp\OqlToken::make('(', '(', \Onphp\OqlToken::PARENTHESES, 1, 32),
+					\Onphp\OqlToken::make('id', 'id', \Onphp\OqlToken::IDENTIFIER, 1, 33),
+					\Onphp\OqlToken::make('+', '+', \Onphp\OqlToken::ARITHMETIC_OPERATOR, 1, 36),
+					\Onphp\OqlToken::make(10., '10', \Onphp\OqlToken::NUMBER, 1, 38),
+					\Onphp\OqlToken::make(')', ')', \Onphp\OqlToken::PARENTHESES, 1, 40),
+					\Onphp\OqlToken::make('/', '/', \Onphp\OqlToken::ARITHMETIC_OPERATOR, 1, 42),
+					\Onphp\OqlToken::make(2., '2', \Onphp\OqlToken::NUMBER, 1, 44),
+					\Onphp\OqlToken::make('from', 'from', \Onphp\OqlToken::KEYWORD, 2, 0),
+					\Onphp\OqlToken::make('UserGroup', 'UserGroup', \Onphp\OqlToken::IDENTIFIER, 2, 5),
+					\Onphp\OqlToken::make('where', 'where', \Onphp\OqlToken::KEYWORD, 3, 0),
+					\Onphp\OqlToken::make('(', '(', \Onphp\OqlToken::PARENTHESES, 3, 6),
+					\Onphp\OqlToken::make('id', 'id', \Onphp\OqlToken::IDENTIFIER, 3, 7),
+					\Onphp\OqlToken::make('in', 'in', \Onphp\OqlToken::KEYWORD, 3, 10),
+					\Onphp\OqlToken::make('(', '(', \Onphp\OqlToken::PARENTHESES, 3, 13),
+					\Onphp\OqlToken::make(1., '1', \Onphp\OqlToken::NUMBER, 3, 14),
+					\Onphp\OqlToken::make(',', ',', \Onphp\OqlToken::PUNCTUATION, 3, 15),
+					\Onphp\OqlToken::make(1, '$1', \Onphp\OqlToken::SUBSTITUTION, 3, 17),
+					\Onphp\OqlToken::make(')', ')', \Onphp\OqlToken::PARENTHESES, 3, 19),
+					\Onphp\OqlToken::make('or', 'or', \Onphp\OqlToken::KEYWORD, 3, 21),
+					\Onphp\OqlToken::make('id', 'id', \Onphp\OqlToken::IDENTIFIER, 3, 24),
+					\Onphp\OqlToken::make('>=', '>=', \Onphp\OqlToken::COMPARISON_OPERATOR, 3, 27),
+					\Onphp\OqlToken::make(2, '$2', \Onphp\OqlToken::SUBSTITUTION, 3, 30),
+					\Onphp\OqlToken::make(')', ')', \Onphp\OqlToken::PARENTHESES, 3, 32),
+					\Onphp\OqlToken::make('and', 'and', \Onphp\OqlToken::KEYWORD, 3, 34),
+					\Onphp\OqlToken::make('(', '(', \Onphp\OqlToken::PARENTHESES, 3, 38),
+					\Onphp\OqlToken::make('name', 'name', \Onphp\OqlToken::IDENTIFIER, 3, 39),
+					\Onphp\OqlToken::make('like', 'like', \Onphp\OqlToken::KEYWORD, 3, 44),
+					\Onphp\OqlToken::make('%\'ы\'%', '"%\'ы\'%"', \Onphp\OqlToken::STRING, 3, 49),
+					\Onphp\OqlToken::make(')', ')', \Onphp\OqlToken::PARENTHESES, 3, 56),
+					\Onphp\OqlToken::make('order by', 'order by', \Onphp\OqlToken::KEYWORD, 3, 58),
+					\Onphp\OqlToken::make('id', 'id', \Onphp\OqlToken::IDENTIFIER, 3, 67),
+					\Onphp\OqlToken::make('desc', 'desc', \Onphp\OqlToken::KEYWORD, 3, 70)
 				)
 			);
 		}
 		
 		/**
-		 * @return OqlTokenizerTest
+		 * @return \Onphp\Test\OqlTokenizerTest
 		**/
 		private function assertTokens($string, $expectedTokens)
 		{
-			$tokenizer = new OqlTokenizer($string);
+			$tokenizer = new \Onphp\OqlTokenizer($string);
 			$tokens = $tokenizer->getList();
 			
 			$this->assertEquals(sizeof($tokens), sizeof($expectedTokens));
diff --git a/test/main/OsqlDeleteTest.class.php b/test/main/OsqlDeleteTest.class.php
index 2b6fd70567..fe3d747093 100644
--- a/test/main/OsqlDeleteTest.class.php
+++ b/test/main/OsqlDeleteTest.class.php
@@ -1,28 +1,30 @@
 <?php
 	
+	namespace Onphp\Test;
+
 	final class OsqlDeleteTest extends TestCaseDB
 	{
 		public function testQuery()
 		{
-			$query = OSQL::delete()->from('pity_table');
+			$query = \Onphp\OSQL::delete()->from('pity_table');
 			
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
 			try {
 				$query->toDialectString($dialect);
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				/* pass */
 			}
 			
-			$query->where(Expression::eq('count', 2));
+			$query->where(\Onphp\Expression::eq('count', 2));
 			
 			$this->assertEquals(
 				$query->toDialectString($dialect),
 				'DELETE FROM "pity_table" WHERE ("count" = \'2\')'
 			);
 			
-			$query->andWhere(Expression::notEq('a', '2'));
+			$query->andWhere(\Onphp\Expression::notEq('a', '2'));
 			
 			$this->assertEquals(
 				$query->toDialectString($dialect),
diff --git a/test/main/OsqlInsertTest.class.php b/test/main/OsqlInsertTest.class.php
index 9b34b855c1..43297015b4 100644
--- a/test/main/OsqlInsertTest.class.php
+++ b/test/main/OsqlInsertTest.class.php
@@ -1,18 +1,20 @@
 <?php
 	
+	namespace Onphp\Test;
+
 	final class OsqlInsertTest extends TestCaseDB
 	{
 		public function testInsertFromSelect()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
-			$select = OSQL::select()->
+			$select = \Onphp\OSQL::select()->
 				from('test_table2')->
 				get('field3')->
 				get('field_7')->
-				andWhere(Expression::gt('field2', DBValue::create('33')));
+				andWhere(\Onphp\Expression::gt('field2', \Onphp\DBValue::create('33')));
 			
-			$insert = OSQL::insert()->
+			$insert = \Onphp\OSQL::insert()->
 				setSelect($select)->
 				into('test_table')->
 				set('field2', 2)->
diff --git a/test/main/OsqlReturningTest.class.php b/test/main/OsqlReturningTest.class.php
index 61e4738f12..1c199c023c 100644
--- a/test/main/OsqlReturningTest.class.php
+++ b/test/main/OsqlReturningTest.class.php
@@ -1,14 +1,16 @@
 <?php
 	
+	namespace Onphp\Test;
+
 	final class OsqlReturningTest extends TestCaseDB
 	{
 		public function testUpdate()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
-			$query = OSQL::update('test_table')->
+			$query = \Onphp\OSQL::update('test_table')->
 				set('field1', 1)->
-				where(Expression::eq('field1',2));
+				where(\Onphp\Expression::eq('field1',2));
 			
 			$this->addReturning($query);
 			
@@ -27,9 +29,9 @@ public function testUpdate()
 		
 		public function testInsert()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
-			$query = OSQL::insert()->
+			$query = \Onphp\OSQL::insert()->
 				into('test_table')->
 				set('field2', 2)->
 				set('field16', 3);
@@ -50,18 +52,18 @@ public function testInsert()
 		
 		public function testDelete()
 		{
-			$query = OSQL::delete()->from('pity_table');
+			$query = \Onphp\OSQL::delete()->from('pity_table');
 			
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
 			try {
 				$query->toDialectString($dialect);
 				$this->fail();
-			} catch (WrongArgumentException $e) {
+			} catch (\Onphp\WrongArgumentException $e) {
 				//pass
 			}
 			
-			$query->where(Expression::eq('count', 2))->returning('id');
+			$query->where(\Onphp\Expression::eq('count', 2))->returning('id');
 			
 			$this->assertEquals(
 				$query->toDialectString($dialect),
@@ -71,16 +73,16 @@ public function testDelete()
 		
 		public function testHasNoReturning()
 		{
-			$dialect = ImaginaryDialect::me();
+			$dialect = \Onphp\ImaginaryDialect::me();
 			
-			$query = OSQL::update('test_table')->
+			$query = \Onphp\OSQL::update('test_table')->
 				set('field1', 1)->
-				where(Expression::eq('field1',2))->
+				where(\Onphp\Expression::eq('field1',2))->
 				returning('field1');
 			
 			try {
 				$query->toDialectString($dialect);
-			} catch (UnimplementedFeatureException $e) {
+			} catch (\Onphp\UnimplementedFeatureException $e) {
 				return $this;
 			}
 			
@@ -88,21 +90,21 @@ public function testHasNoReturning()
 		}
 		
 		/**
-		 * @return InsertOrUpdateQuery
+		 * @return \Onphp\InsertOrUpdateQuery
 		**/
-		protected function addReturning(InsertOrUpdateQuery $query)
+		protected function addReturning(\Onphp\InsertOrUpdateQuery $query)
 		{
 			$query->
-				returning(DBField::create('field1', 'test_table'), 'alias1')->
+				returning(\Onphp\DBField::create('field1', 'test_table'), 'alias1')->
 				returning('field2')->
 				returning(
-					SQLFunction::create(
-						'count', DBField::create('field5', 'test_table')
+					\Onphp\SQLFunction::create(
+						'count', \Onphp\DBField::create('field5', 'test_table')
 					)->
 					setAlias('alias5')
 				)->
 				returning(
-					OSQL::select()->
+					\Onphp\OSQL::select()->
 						from('test_table1')->
 						setName('foo1')->
 						get('id')
diff --git a/test/main/OsqlSelectTest.class.php b/test/main/OsqlSelectTest.class.php
index 4cc68e7232..46067011ac 100644
--- a/test/main/OsqlSelectTest.class.php
+++ b/test/main/OsqlSelectTest.class.php
@@ -1,30 +1,32 @@
 <?php
 	
+	namespace Onphp\Test;
+
 	final class OsqlSelectTest extends TestCaseDB
 	{
 		public function testSelectGet()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
-			$query = OSQL::select()->
+			$query = \Onphp\OSQL::select()->
 				from('test_table')->
-				get(DBField::create('field1', 'test_table'), 'alias1')->
-				get(DBField::create('field2', 'test_table'))->
+				get(\Onphp\DBField::create('field1', 'test_table'), 'alias1')->
+				get(\Onphp\DBField::create('field2', 'test_table'))->
 				get('field3', 'alias3')->
 				get('field4')->
 				get(
-					SQLFunction::create(
-						'count', DBField::create('field5', 'test_table')
+					\Onphp\SQLFunction::create(
+						'count', \Onphp\DBField::create('field5', 'test_table')
 					)->
 					setAggregateDistinct()->
 					setAlias('alias5')
 				)->
 				get(
-					SQLFunction::create(
+					\Onphp\SQLFunction::create(
 						'substring',
-						BinaryExpression::create(
-							DBField::create('field6', 'test_table'),
-							DBValue::create('a..b'),
+						\Onphp\BinaryExpression::create(
+							\Onphp\DBField::create('field6', 'test_table'),
+							\Onphp\DBValue::create('a..b'),
 							'from'
 						)->
 						noBrackets()
@@ -46,13 +48,13 @@ public function testSelectGet()
 		
 		public function testSelectSubqueryGet()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 			
-			$query = OSQL::select()->
+			$query = \Onphp\OSQL::select()->
 				from('test_table')->
 				get('field1')->
 				get(
-					OSQL::select()->
+					\Onphp\OSQL::select()->
 						from('test_table1')->
 						setName('foo1')->
 						get('id')
@@ -69,7 +71,7 @@ public function testSelectSubqueryGet()
 
 		public function testSelectJoin()
 		{
-			$dialect = $this->getDbByType('PgSQL')->getDialect();
+			$dialect = $this->getDbByType('\Onphp\PgSQL')->getDialect();
 
 			$joinTypeList = array(
 				'JOIN ' => 'join',
@@ -79,9 +81,9 @@ public function testSelectJoin()
 			);
 
 			$joinExpression =
-				Expression::eq(
-					DBField::create('joinField', 'table1'),
-					DBField::create('joinField', 'table2')
+				\Onphp\Expression::eq(
+					\Onphp\DBField::create('joinField', 'table1'),
+					\Onphp\DBField::create('joinField', 'table2')
 				);
 
 			$baseRawQuery =
@@ -128,10 +130,10 @@ public function testSelectJoin()
 		private function getBaseJoinSelect()
 		{
 			return
-				OSQL::select()->
+				\Onphp\OSQL::select()->
 				from('table1')->
-				get(DBField::create('field1', 'table1'))->
-				get(DBField::create('field2', 'table2'));
+				get(\Onphp\DBField::create('field1', 'table1'))->
+				get(\Onphp\DBField::create('field2', 'table2'));
 		}
 
 	}
diff --git a/test/main/RangeTest.class.php b/test/main/RangeTest.class.php
index 8ff4c7fca5..6d7771d89d 100644
--- a/test/main/RangeTest.class.php
+++ b/test/main/RangeTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class RangeTest extends TestCase
 	{
 		/**
@@ -7,9 +9,9 @@ final class RangeTest extends TestCase
 		public function testCreation($min, $max, $throwsException)
 		{
 			if ($throwsException)
-				$this->setExpectedException('WrongArgumentException');
+				$this->setExpectedException('\Onphp\WrongArgumentException');
 			
-			$range = Range::create($min, $max);
+			$range = \Onphp\Range::create($min, $max);
 		} 
 		
 		public static function rangeDataProvider()
diff --git a/test/main/RedisNoSQLTest.class.php b/test/main/RedisNoSQLTest.class.php
index 9b19747c17..809b517008 100644
--- a/test/main/RedisNoSQLTest.class.php
+++ b/test/main/RedisNoSQLTest.class.php
@@ -9,6 +9,8 @@
 	*                                                                         *
 	***************************************************************************/
 	
+	namespace Onphp\Test;
+
 	final class RedisNoSQLTest extends TestCase
 	{
 		public function setUp()
@@ -16,7 +18,7 @@ public function setUp()
 			if (!extension_loaded('redis'))
 				$this->markTestSkipped('Install phpredis https://github.com/nicolasff/phpredis/');
 			
-			$redis = new RedisNoSQL('localhost', 6379);
+			$redis = new \Onphp\RedisNoSQL('localhost', 6379);
 
 			if (!$redis->isAlive()) {
 				$this->markTestSkipped('Can\'t connect to redis server at localhost');
@@ -25,7 +27,7 @@ public function setUp()
 		
 		public function testCachePeer()
 		{
-			$redis = new RedisNoSQL('localhost', 6379);
+			$redis = new \Onphp\RedisNoSQL('localhost', 6379);
 
 			$redis->set('some_key', 'some_value');
 			$result = $redis->get('some_key');
@@ -44,7 +46,7 @@ public function testCachePeer()
 		
 		public function testList()
 		{
-			$redis	= new RedisNoSQL('localhost', 6379);
+			$redis	= new \Onphp\RedisNoSQL('localhost', 6379);
 			$redis->delete('list');
 			
 			$list	= $redis->fetchList('list');
@@ -60,7 +62,7 @@ public function testList()
 		
 		public function testListIterator()
 		{
-			$redis	= new RedisNoSQL('localhost', 6379);
+			$redis	= new \Onphp\RedisNoSQL('localhost', 6379);
 			$redis->delete('list');
 			
 			$list	= $redis->fetchList('list');
@@ -80,7 +82,7 @@ public function testListIterator()
 		
 		public function testListArrayAccess()
 		{
-			$redis	= new RedisNoSQL('localhost', 6379);
+			$redis	= new \Onphp\RedisNoSQL('localhost', 6379);
 			$redis->delete('list');
 			
 			$list	= $redis->fetchList('list');
@@ -94,7 +96,7 @@ public function testListArrayAccess()
 		
 		public function testListTrim()
 		{
-			$redis	= new RedisNoSQL('localhost', 6379);
+			$redis	= new \Onphp\RedisNoSQL('localhost', 6379);
 			$redis->delete('list');
 			
 			$list	= $redis->fetchList('list');
@@ -114,7 +116,7 @@ public function testListTrim()
 		
 		public function testListClean()
 		{
-			$redis	= new RedisNoSQL('localhost', 6379);
+			$redis	= new \Onphp\RedisNoSQL('localhost', 6379);
 			$redis->delete('list');
 			
 			$list	= $redis->fetchList('list');
diff --git a/test/main/TextUtilsTest.class.php b/test/main/TextUtilsTest.class.php
index 453ddbc4c3..5dae80955b 100644
--- a/test/main/TextUtilsTest.class.php
+++ b/test/main/TextUtilsTest.class.php
@@ -1,24 +1,26 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	final class TextUtilsTest extends TestCase
 	{
 		public function testFriendlyFileSize()
 		{
 			$units = array('', 'k' , 'M', 'G', 'T', 'P');
 			
-			$this->assertEquals(TextUtils::friendlyFileSize(0), '0');
-			$this->assertEquals(TextUtils::friendlyFileSize(1024), '1k');
-			$this->assertEquals(TextUtils::friendlyFileSize(812), '812');
+			$this->assertEquals(\Onphp\TextUtils::friendlyFileSize(0), '0');
+			$this->assertEquals(\Onphp\TextUtils::friendlyFileSize(1024), '1k');
+			$this->assertEquals(\Onphp\TextUtils::friendlyFileSize(812), '812');
 			
 			for ($i = 0; $i < 6; ++$i) {
 				$this->assertEquals(
-					TextUtils::friendlyFileSize(2 * pow(1024, $i)), '2'.$units[$i]
+					\Onphp\TextUtils::friendlyFileSize(2 * pow(1024, $i)), '2'.$units[$i]
 				);
 			}
 			
 			$this->assertEquals(
-				TextUtils::friendlyFileSize(2 * pow(1024, 6)), '2048'.$units[5]
+				\Onphp\TextUtils::friendlyFileSize(2 * pow(1024, 6)), '2048'.$units[5]
 			);
 		}
 		
@@ -28,110 +30,110 @@ public function testFriendlyNumber()
 			$decimalPoint = $localeInfo['decimal_point'];
 			
 			$this->assertEquals(
-				TextUtils::friendlyNumber(100.02), '100'.$decimalPoint.'02'
+				\Onphp\TextUtils::friendlyNumber(100.02), '100'.$decimalPoint.'02'
 			);
 			
-			$this->assertEquals(TextUtils::friendlyNumber((0.1 + 0.7) * 10), '8');
-			$this->assertEquals(TextUtils::friendlyNumber(10000), '10 000');
+			$this->assertEquals(\Onphp\TextUtils::friendlyNumber((0.1 + 0.7) * 10), '8');
+			$this->assertEquals(\Onphp\TextUtils::friendlyNumber(10000), '10 000');
 
 			$this->assertEquals(
-				TextUtils::friendlyNumber(10000.45), '10 000'.$decimalPoint.'45'
+				\Onphp\TextUtils::friendlyNumber(10000.45), '10 000'.$decimalPoint.'45'
 			);
 
 			$this->assertEquals(
-				TextUtils::friendlyNumber(-999999.99), '-999 999'.$decimalPoint.'99'
+				\Onphp\TextUtils::friendlyNumber(-999999.99), '-999 999'.$decimalPoint.'99'
 			);
 		}
 		
 		public function testNormalizeUri()
 		{
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/'),
 				'http://example.com/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com'),
+				\Onphp\TextUtils::normalizeUri('http://example.com'),
 				'http://example.com/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com:/'),
+				\Onphp\TextUtils::normalizeUri('http://example.com:/'),
 				'http://example.com/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com:80/'),
+				\Onphp\TextUtils::normalizeUri('http://example.com:80/'),
 				'http://example.com/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://wWw.exaMPLE.COm/'),
+				\Onphp\TextUtils::normalizeUri('http://wWw.exaMPLE.COm/'),
 				'http://www.example.com/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('htTP://example.com/'),
+				\Onphp\TextUtils::normalizeUri('htTP://example.com/'),
 				'http://example.com/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/foo%7bbar'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/foo%7bbar'),
 				'http://example.com/foo%7Bbar'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/foo%2Dbar%2dbaz%2cqaz'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/foo%2Dbar%2dbaz%2cqaz'),
 				'http://example.com/foo-bar-baz%2Cqaz'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/a/b/c/./../../g'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/a/b/c/./../../g'),
 				'http://example.com/a/g'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/mid/content=5/../6'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/mid/content=5/../6'),
 				'http://example.com/mid/6'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/a/./b'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/a/./b'),
 				'http://example.com/a/b'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/a/../b'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/a/../b'),
 				'http://example.com/b'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/../b'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/../b'),
 				'http://example.com/b'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/a/.'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/a/.'),
 				'http://example.com/a/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/a/..'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/a/..'),
 				'http://example.com/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/a/./'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/a/./'),
 				'http://example.com/a/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('http://example.com/a/../'),
+				\Onphp\TextUtils::normalizeUri('http://example.com/a/../'),
 				'http://example.com/'
 			);
 
 			$this->assertEquals(
-				TextUtils::normalizeUri('hTTPS://a/./b/../b/%63/%7bfoo%7d'),
+				\Onphp\TextUtils::normalizeUri('hTTPS://a/./b/../b/%63/%7bfoo%7d'),
 				'https://a/b/c/%7Bfoo%7D'
 			);
 		}
@@ -140,7 +142,7 @@ public function testHex2Binary()
 		{
 			$this->assertEquals(
 				'     ',
-				TextUtils::hex2Binary('2020202020')
+				\Onphp\TextUtils::hex2Binary('2020202020')
 			);
 		}
 	}
diff --git a/test/main/Utils/AMQP/AMQPPeclTest.class.php b/test/main/Utils/AMQP/AMQPPeclTest.class.php
index 49662d0405..cc6170624c 100755
--- a/test/main/Utils/AMQP/AMQPPeclTest.class.php
+++ b/test/main/Utils/AMQP/AMQPPeclTest.class.php
@@ -9,7 +9,9 @@
  *                                                                         *
  ***************************************************************************/
 
-	class AMQPTestCaseNoAckQueueConsumer extends AMQPPeclQueueConsumer
+	namespace Onphp\Test;
+
+	class AMQPTestCaseNoAckQueueConsumer extends \Onphp\AMQPPeclQueueConsumer
 	{
 		protected $checkString = '';
 
@@ -25,7 +27,7 @@ public function handleConsumeOk($consumerTag)
 			AMQPPeclTest::checkMessageCount($this->getChannel());
 		}
 
-		public function handleDelivery(AMQPIncomingMessage $delivery)
+		public function handleDelivery(\Onphp\AMQPIncomingMessage $delivery)
 		{
 			AMQPPeclTest::messageTest($delivery, $this->count);
 
@@ -49,7 +51,7 @@ public function handleChangeConsumerTag($fromTag, $toTag)
 		}
 	}
 
-	class AMQPTestCaseAutoAckQueueConsumer extends AMQPPeclQueueConsumer
+	class AMQPTestCaseAutoAckQueueConsumer extends \Onphp\AMQPPeclQueueConsumer
 	{
 		protected $checkString = '';
 
@@ -65,7 +67,7 @@ public function handleConsumeOk($consumerTag)
 			AMQPPeclTest::checkMessageCount($this->getChannel());
 		}
 
-		public function handleDelivery(AMQPIncomingMessage $delivery)
+		public function handleDelivery(\Onphp\AMQPIncomingMessage $delivery)
 		{
 			AMQPPeclTest::messageTest($delivery, $this->count);
 
@@ -97,7 +99,7 @@ class AMQPPeclTest extends TestCase
 			// basic queue
 			'basic' => array(
 				'exchange' => 'AMQPPeclTestExchange',
-				'exchangeType' => AMQPExchangeType::DIRECT,
+				'exchangeType' => \Onphp\AMQPExchangeType::DIRECT,
 				'name' => 'AMQPPeclTestQueue',
 				'key' => 'routing.key',
 				'args' => array()
@@ -105,7 +107,7 @@ class AMQPPeclTest extends TestCase
 			// exchange2exchange binding
 			'exchangeBinded' => array(
 				'exchange' => 'AMQPPeclTestExchangeBinded',
-				'exchangeType' => AMQPExchangeType::FANOUT,
+				'exchangeType' => \Onphp\AMQPExchangeType::FANOUT,
 				'name' => 'AMQPPeclTestQueueBinded',
 				'key' => 'routing.key.binded',
 				'args' => array()
@@ -113,7 +115,7 @@ class AMQPPeclTest extends TestCase
 			// Highly Available Queues
 			'mirrored' => array(
 				'exchange' => 'AMQPPeclTestExchange',
-				'exchangeType' => AMQPExchangeType::DIRECT,
+				'exchangeType' => \Onphp\AMQPExchangeType::DIRECT,
 				'name' => 'AMQPPeclTestQueueMirrored',
 				'key' => 'routing.key.mirrored',
 				'args' => array('x-ha-policy' => 'all')
@@ -129,18 +131,18 @@ protected function setUp()
 			}
 		}
 
-		public static function messageTest(AMQPIncomingMessage $mess, $i)
+		public static function messageTest(\Onphp\AMQPIncomingMessage $mess, $i)
 		{
 			self::messageAssertion($mess, $i);
 		}
 
 
 		/**
-		 * @param AMQPPeclChannel $channel
+		 * @param \Onphp\AMQPPeclChannel $channel
 		 * @param string $label
 		 * @param int $value
 		 */
-		public static function checkMessageCount(AMQPChannelInterface $channel,
+		public static function checkMessageCount(\Onphp\AMQPChannelInterface $channel,
 			$label = 'basic', $value = self::COUNT_OF_PUBLISH
 		) {
 			usleep(self::MESSAGE_COUNT_WAIT);
@@ -149,7 +151,7 @@ public static function checkMessageCount(AMQPChannelInterface $channel,
 
 			$count =  $channel->queueDeclare(
 				self::$queueList[$label]['name'],
-				AMQPQueueConfig::create()->
+				\Onphp\AMQPQueueConfig::create()->
 					setDurable(true)->
 					setArguments(
 						self::$queueList[$label]['args']
@@ -162,14 +164,14 @@ public static function checkMessageCount(AMQPChannelInterface $channel,
 		public function testDefaulConnection()
 		{
 			try {
-				$c = new AMQPPecl(
-					AMQPCredentials::createDefault()
+				$c = new \Onphp\AMQPPecl(
+					\Onphp\AMQPCredentials::createDefault()
 				);
 				
-				$this->assertInstanceOf('AMQP', $c->connect());
+				$this->assertInstanceOf('\Onphp\AMQP', $c->connect());
 				$this->assertTrue($c->isConnected());
 				
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->fail($e->getMessage());
 			}
 		}
@@ -177,8 +179,8 @@ public function testDefaulConnection()
 		public function testCustomConnection()
 		{
 			try {
-				$c = new AMQPPecl(
-					AMQPCredentials::create()->
+				$c = new \Onphp\AMQPPecl(
+					\Onphp\AMQPCredentials::create()->
 						setHost('localhost')->
 						setPort(5672)->
 						setLogin('guest')->
@@ -186,18 +188,18 @@ public function testCustomConnection()
 						setVirtualHost('/')
 				);
 				
-				$this->assertInstanceOf('AMQP', $c->connect());
+				$this->assertInstanceOf('\Onphp\AMQP', $c->connect());
 				$this->assertTrue($c->isConnected());
 				
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->fail($e->getMessage());
 			}
 		}
 
 		public function testChannel()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::create()->
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::create()->
 					setHost('localhost')->
 					setPort(5672)->
 					setLogin('guest')->
@@ -212,7 +214,7 @@ public function testChannel()
 			$this->assertSame(3, count($c->getChannelList()));
 
 			$this->assertInstanceOf(
-				'AMQPPeclChannel',
+				'\Onphp\AMQPPeclChannel',
 				$c->getChannel(1)
 			);
 
@@ -224,30 +226,30 @@ public function testChannel()
 				$c->getChannel(1);
 				$this->fail("Channel was't dropped");
 
-			} catch (MissingElementException $e) {
+			} catch (\Onphp\MissingElementException $e) {
 				//ok
 			}
 		}
 
 		public function testDeclareExchange()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
 
 			try {
 				$this->exchangeDeclare($channel, 'basic');
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->fail($e->getMessage());
 			}
 		}
 
 		public function testDeclareQueue()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -257,15 +259,15 @@ public function testDeclareQueue()
 
 				$this->assertSame($int, 0);
 
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->fail($e->getMessage());
 			}
 		}
 
 		public function testProducerLogic()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -283,8 +285,8 @@ public function testProducerLogic()
 		**/
 		public function testNoAckConsumerLogic()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -311,8 +313,8 @@ public function testNoAckConsumerLogic()
 		**/
 		public function testConsumerLogic()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -323,7 +325,7 @@ public function testConsumerLogic()
 			try {
 				while($mess = $channel->basicGet(self::$queueList['basic']['name']))
 					self::messageTest($mess, ++$i);
-			} catch (ObjectNotFoundException $e) {
+			} catch (\Onphp\ObjectNotFoundException $e) {
 				//it's ok, because queue is empty
 				$this->assertSame(self::COUNT_OF_PUBLISH, $i);
 			}
@@ -334,18 +336,18 @@ public function testConsumerLogic()
 		 */
 		public function testDeclareQueueCluster()
 		{
-			$c = AMQPSelective::me()->
+			$c = \Onphp\AMQPSelective::me()->
 				addLink(
 					'slave',
-					new AMQPPecl(
-						AMQPCredentials::createDefault()->
+					new \Onphp\AMQPPecl(
+						\Onphp\AMQPCredentials::createDefault()->
 						setPort(self::PORT_MIRRORED)
 					)
 				)->
 				addLink(
 					'master',
-					new AMQPPecl(
-						AMQPCredentials::createDefault()
+					new \Onphp\AMQPPecl(
+						\Onphp\AMQPCredentials::createDefault()
 					)
 				)->
 				setCurrent('slave');
@@ -355,32 +357,32 @@ public function testDeclareQueueCluster()
 			$channel = $c->createChannel(1);
 
 			AMQPPeclTest::assertEquals(
-				AMQPCredentials::DEFAULT_PORT,
+				\Onphp\AMQPCredentials::DEFAULT_PORT,
 				$c->getCredentials()->getPort()
 			);
 
 			try {
 				$int = $this->queueDeclare($channel, 'mirrored');
 				$this->assertSame($int, 0);
-			} catch (Exception $e) {
+			} catch (\Exception $e) {
 				$this->fail($e->getMessage());
 			}
 		}
 
 		public function testProducerLogicMirrored()
 		{
-			$c = AMQPSelective::me()->
+			$c = \Onphp\AMQPSelective::me()->
 				addLink(
 					'slave',
-					new AMQPPecl(
-						AMQPCredentials::createDefault()->
+					new \Onphp\AMQPPecl(
+						\Onphp\AMQPCredentials::createDefault()->
 						setPort(self::PORT_MIRRORED)
 					)
 				)->
 				addLink(
 					'master',
-					new AMQPPecl(
-						AMQPCredentials::createDefault()
+					new \Onphp\AMQPPecl(
+						\Onphp\AMQPCredentials::createDefault()
 					)
 				)->
 				setCurrent('slave');
@@ -402,7 +404,7 @@ public function testProducerLogicMirrored()
 			$this->publishMessages($channel, false, 'mirrored');
 
 			AMQPPeclTest::assertEquals(
-				AMQPCredentials::DEFAULT_PORT,
+				\Onphp\AMQPCredentials::DEFAULT_PORT,
 				$c->getCredentials()->getPort()
 			);
 
@@ -415,18 +417,18 @@ public function testProducerLogicMirrored()
 		**/
 		public function testConsumerLogicMirrored()
 		{
-			$c = AMQPSelective::me()->
+			$c = \Onphp\AMQPSelective::me()->
 				addLink(
 					'slave',
-					new AMQPPecl(
-						AMQPCredentials::createDefault()->
+					new \Onphp\AMQPPecl(
+						\Onphp\AMQPCredentials::createDefault()->
 						setPort(self::PORT_MIRRORED)
 					)
 				)->
 				addLink(
 					'master',
-					new AMQPPecl(
-						AMQPCredentials::createDefault()
+					new \Onphp\AMQPPecl(
+						\Onphp\AMQPCredentials::createDefault()
 					)
 				)->
 				setCurrent('slave');
@@ -441,11 +443,11 @@ public function testConsumerLogicMirrored()
 			try {
 				while($mess = $channel->basicGet(self::$queueList['mirrored']['name']))
 					self::messageTest($mess, ++$i);
-			} catch (ObjectNotFoundException $e) {/**/}
+			} catch (\Onphp\ObjectNotFoundException $e) {/**/}
 			$this->assertSame(self::COUNT_OF_PUBLISH, $i);
 
 			AMQPPeclTest::assertEquals(
-				AMQPCredentials::DEFAULT_PORT,
+				\Onphp\AMQPCredentials::DEFAULT_PORT,
 				$c->getCredentials()->getPort()
 			);
 				
@@ -453,8 +455,8 @@ public function testConsumerLogicMirrored()
 
 		public function testCleanup()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -472,8 +474,8 @@ public function testCleanup()
 
 		public function testQueueConsumerNoAck()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -502,7 +504,7 @@ public function testQueueConsumerNoAck()
 			//drop channels and close connection
 			$c->disconnect();
 
-			$c = new AMQPPecl(AMQPCredentials::createDefault());
+			$c = new \Onphp\AMQPPecl(\Onphp\AMQPCredentials::createDefault());
 			$channel = $c->createChannel(1);
 
 			$this->exchangeDeclare($channel, 'basic');
@@ -512,8 +514,8 @@ public function testQueueConsumerNoAck()
 
 		public function testQueueConsumerAutoAck()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -541,7 +543,7 @@ public function testQueueConsumerAutoAck()
 			//drop channels and close connection
 			$c->disconnect();
 
-			$c = new AMQPPecl(AMQPCredentials::createDefault());
+			$c = new \Onphp\AMQPPecl(\Onphp\AMQPCredentials::createDefault());
 			$channel = $c->createChannel(1);
 
 			$this->exchangeDeclare($channel, 'basic');
@@ -554,8 +556,8 @@ public function testExchangeToExchangeProducerLogic()
 		{
 			$this->exchangeToExchangeCleanup();
 			
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -578,7 +580,7 @@ public function testExchangeToExchangeProducerLogic()
 				self::$queueList['exchangeBinded']['exchange'],
 				self::$queueList['basic']['key']
 			);
-			$this->assertInstanceOf('AMQPChannelInterface', $channelInterface);
+			$this->assertInstanceOf('\Onphp\AMQPChannelInterface', $channelInterface);
 
 			/**
 			 * publish messages to 2 queues throw exchangeBinded-exchange
@@ -588,16 +590,16 @@ public function testExchangeToExchangeProducerLogic()
 				$channelInterface = $channel->basicPublish(
 					self::$queueList['exchangeBinded']['exchange'],
 					self::$queueList['basic']['key'],
-					AMQPOutgoingMessage::create()->
+					\Onphp\AMQPOutgoingMessage::create()->
 						setBody("message {$i}")->
-						setTimestamp(Timestamp::makeNow())->
+						setTimestamp(\Onphp\Timestamp::makeNow())->
 						setAppId(__CLASS__)->
 						setMessageId($i)->
 						setContentEncoding('utf-8')
 				);
 
 				$this->assertInstanceOf(
-					'AMQPChannelInterface',
+					'\Onphp\AMQPChannelInterface',
 					$channelInterface
 				);
 			}
@@ -614,8 +616,8 @@ public function testExchangeToExchangeProducerLogic()
 		**/
 		public function testExchangeToExchangeConsumerLogic()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -629,7 +631,7 @@ public function testExchangeToExchangeConsumerLogic()
 				try {
 					while($mess = $channel->basicGet($name)) 
 						self::messageTest($mess, ++$i);
-				} catch (ObjectNotFoundException $e) {/**/}
+				} catch (\Onphp\ObjectNotFoundException $e) {/**/}
 				
 				$this->assertSame(
 					self::COUNT_OF_PUBLISH,
@@ -647,8 +649,8 @@ public function testExchangeToExchangeCleanup()
 
 		protected function exchangeToExchangeCleanup()
 		{
-			$c = new AMQPPecl(
-				AMQPCredentials::createDefault()
+			$c = new \Onphp\AMQPPecl(
+				\Onphp\AMQPCredentials::createDefault()
 			);
 
 			$channel = $c->createChannel(1);
@@ -675,7 +677,7 @@ protected function exchangeToExchangeCleanup()
 				self::$queueList['basic']['key']
 			);
 			$this->assertInstanceOf(
-				'AMQPChannelInterface',
+				'\Onphp\AMQPChannelInterface',
 				$channelInterface
 			);
 			$this->queueDelete($channel, 'exchangeBinded');
@@ -686,21 +688,21 @@ protected function exchangeToExchangeCleanup()
 		}
 
 				/**
-		 * @param AMQPChannelInterface $channel
+		 * @param \Onphp\AMQPChannelInterface $channel
 		 * @param bool $check
 		 * @param string $key
 		 * @param string $queueName
 		 */
-		protected function publishMessages(AMQPChannelInterface $channel, $check = true,
+		protected function publishMessages(\Onphp\AMQPChannelInterface $channel, $check = true,
 			$label = 'basic'
 		) {
 			for($i = 1; $i <= self::COUNT_OF_PUBLISH; $i++) {
 				$channelInterface = $channel->basicPublish(
 					self::$queueList[$label]['exchange'],
 					self::$queueList[$label]['key'],
-					AMQPOutgoingMessage::create()->
+					\Onphp\AMQPOutgoingMessage::create()->
 						setBody("message {$i}")->
-						setTimestamp(Timestamp::makeNow())->
+						setTimestamp(\Onphp\Timestamp::makeNow())->
 						setAppId(__CLASS__)->
 						setMessageId($i)->
 						setContentEncoding('utf-8')
@@ -708,7 +710,7 @@ protected function publishMessages(AMQPChannelInterface $channel, $check = true,
 
 				if ($check)
 					$this->assertInstanceOf(
-						'AMQPChannelInterface',
+						'\Onphp\AMQPChannelInterface',
 						$channelInterface
 					);
 			}
@@ -717,47 +719,47 @@ protected function publishMessages(AMQPChannelInterface $channel, $check = true,
 				$this->checkMessageCount($channel, $label);
 		}
 
-		protected static function messageAssertion(AMQPIncomingMessage $mess, $i)
+		protected static function messageAssertion(\Onphp\AMQPIncomingMessage $mess, $i)
 		{
-			self::assertInstanceOf('AMQPIncomingMessage', $mess);
-			self::assertInstanceOf('Timestamp', $mess->getTimestamp());
+			self::assertInstanceOf('\Onphp\AMQPIncomingMessage', $mess);
+			self::assertInstanceOf('\Onphp\Timestamp', $mess->getTimestamp());
 			self::assertTrue(strlen(trim($mess->getDeliveryTag())) > 0);
 
 			$properties = $mess->getProperties();
 
 			//self::assertEquals('guest', $mess->getUserId());
 			self::assertTrue(
-				isset($properties[AMQPIncomingMessage::USER_ID])
-				&& $properties[AMQPIncomingMessage::USER_ID] ==
+				isset($properties[\Onphp\AMQPIncomingMessage::USER_ID])
+				&& $properties[\Onphp\AMQPIncomingMessage::USER_ID] ==
 				$mess->getUserId()
 			);
 
 			self::assertEquals(__CLASS__, $mess->getAppId());
 			self::assertTrue(
-				isset($properties[AMQPIncomingMessage::APP_ID])
-				&& $properties[AMQPIncomingMessage::APP_ID] ==
+				isset($properties[\Onphp\AMQPIncomingMessage::APP_ID])
+				&& $properties[\Onphp\AMQPIncomingMessage::APP_ID] ==
 				$mess->getAppId()
 			);
 
 			self::assertEquals($i, $mess->getMessageId());
 			self::assertTrue(
-				isset($properties[AMQPIncomingMessage::MESSAGE_ID])
-				&& $properties[AMQPIncomingMessage::MESSAGE_ID] ==
+				isset($properties[\Onphp\AMQPIncomingMessage::MESSAGE_ID])
+				&& $properties[\Onphp\AMQPIncomingMessage::MESSAGE_ID] ==
 				$mess->getMessageId()
 			);
 
 
 			self::assertEquals('text/plain', $mess->getContentType());
 			self::assertTrue(
-				isset($properties[AMQPIncomingMessage::CONTENT_TYPE])
-				&& $properties[AMQPIncomingMessage::CONTENT_TYPE] ==
+				isset($properties[\Onphp\AMQPIncomingMessage::CONTENT_TYPE])
+				&& $properties[\Onphp\AMQPIncomingMessage::CONTENT_TYPE] ==
 				$mess->getContentType()
 			);
 
 			self::assertEquals('utf-8', $mess->getContentEncoding());
 			self::assertTrue(
-				isset($properties[AMQPIncomingMessage::CONTENT_ENCODING])
-				&& $properties[AMQPIncomingMessage::CONTENT_ENCODING] ==
+				isset($properties[\Onphp\AMQPIncomingMessage::CONTENT_ENCODING])
+				&& $properties[\Onphp\AMQPIncomingMessage::CONTENT_ENCODING] ==
 				$mess->getContentEncoding()
 			);
 
@@ -765,34 +767,34 @@ protected static function messageAssertion(AMQPIncomingMessage $mess, $i)
 		}
 
 		/**
-		 * @param AMQPPeclChannel $channel
-		 * @param AMQPPeclChannel $label
-		 * @return AMQPPeclChannel
+		 * @param \Onphp\AMQPPeclChannel $channel
+		 * @param \Onphp\AMQPPeclChannel $label
+		 * @return \Onphp\AMQPPeclChannel
 		 */
-		protected function exchangeDeclare(AMQPChannelInterface $channel, $label)
+		protected function exchangeDeclare(\Onphp\AMQPChannelInterface $channel, $label)
 		{
 			$this->assertTrue(isset(self::$queueList[$label]));
 			
 			$interface = $channel->exchangeDeclare(
 				self::$queueList[$label]['exchange'],
-				AMQPExchangeConfig::create()->
+				\Onphp\AMQPExchangeConfig::create()->
 					setType(
-						new AMQPExchangeType(self::$queueList[$label]['exchangeType'])
+						new \Onphp\AMQPExchangeType(self::$queueList[$label]['exchangeType'])
 					)->
 					setDurable(true)
 			);
 
-			$this->assertInstanceOf('AMQPChannelInterface', $interface);
+			$this->assertInstanceOf('\Onphp\AMQPChannelInterface', $interface);
 
 			return $interface;
 		}
 
 		/**
-		 * @param AMQPChannelInterface $channel
+		 * @param \Onphp\AMQPChannelInterface $channel
 		 * @param string $label
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		 */
-		protected function exchangeDelete(AMQPChannelInterface $channel, $label)
+		protected function exchangeDelete(\Onphp\AMQPChannelInterface $channel, $label)
 		{
 			$this->assertTrue(isset(self::$queueList[$label]));
 
@@ -801,7 +803,7 @@ protected function exchangeDelete(AMQPChannelInterface $channel, $label)
 			);
 
 			$this->assertInstanceOf(
-				'AMQPChannelInterface',
+				'\Onphp\AMQPChannelInterface',
 				$channelInterface
 			);
 
@@ -809,17 +811,17 @@ protected function exchangeDelete(AMQPChannelInterface $channel, $label)
 		}
 		
 		/**
-		 * @param AMQPChannelInterface $channel
+		 * @param \Onphp\AMQPChannelInterface $channel
 		 * @param string $label
 		 * @return int
 		 */
-		protected function queueDeclare(AMQPChannelInterface $channel, $label)
+		protected function queueDeclare(\Onphp\AMQPChannelInterface $channel, $label)
 		{
 			$this->assertTrue(isset(self::$queueList[$label]));
 
 			return $channel->queueDeclare(
 				self::$queueList[$label]['name'],
-				AMQPQueueConfig::create()->
+				\Onphp\AMQPQueueConfig::create()->
 					setDurable(true)->
 					setArguments(
 						self::$queueList[$label]['args']
@@ -828,11 +830,11 @@ protected function queueDeclare(AMQPChannelInterface $channel, $label)
 		}
 
 		/**
-		 * @param AMQPChannelInterface $channel
+		 * @param \Onphp\AMQPChannelInterface $channel
 		 * @param string $label
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		 */
-		protected function queueBind(AMQPChannelInterface $channel, $label)
+		protected function queueBind(\Onphp\AMQPChannelInterface $channel, $label)
 		{
 			$this->assertTrue(isset(self::$queueList[$label]));
 
@@ -842,33 +844,33 @@ protected function queueBind(AMQPChannelInterface $channel, $label)
 				self::$queueList[$label]['key']
 			);
 			
-			$this->assertInstanceOf('AMQPChannelInterface', $channelInterface);
+			$this->assertInstanceOf('\Onphp\AMQPChannelInterface', $channelInterface);
 
 			return $channelInterface;
 		}
 
 		/**
-		 * @param AMQPChannelInterface $channel
+		 * @param \Onphp\AMQPChannelInterface $channel
 		 * @param string $label
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		 */
-		protected function queuePurge(AMQPChannelInterface $channel, $label)
+		protected function queuePurge(\Onphp\AMQPChannelInterface $channel, $label)
 		{
 			$this->assertTrue(isset(self::$queueList[$label]));
 
 			$channelInterface = $channel->queuePurge(self::$queueList[$label]['name']);
 
-			$this->assertInstanceOf('AMQPChannelInterface', $channelInterface);
+			$this->assertInstanceOf('\Onphp\AMQPChannelInterface', $channelInterface);
 
 			return $channelInterface;
 		}
 
 		/**
-		 * @param AMQPChannelInterface $channel
-		 * @param AMQPPeclChannel $label
-		 * @return AMQPChannelInterface
+		 * @param \Onphp\AMQPChannelInterface $channel
+		 * @param \Onphp\AMQPPeclChannel $label
+		 * @return \Onphp\AMQPChannelInterface
 		 */
-		protected function queueUnbind(AMQPChannelInterface $channel, $label)
+		protected function queueUnbind(\Onphp\AMQPChannelInterface $channel, $label)
 		{
 			$this->assertTrue(isset(self::$queueList[$label]));
 
@@ -879,7 +881,7 @@ protected function queueUnbind(AMQPChannelInterface $channel, $label)
 			);
 
 			$this->assertInstanceOf(
-				'AMQPChannelInterface',
+				'\Onphp\AMQPChannelInterface',
 				$channelInterface
 			);
 
@@ -887,11 +889,11 @@ protected function queueUnbind(AMQPChannelInterface $channel, $label)
 		}
 
 		/**
-		 * @param AMQPChannelInterface $channel
+		 * @param \Onphp\AMQPChannelInterface $channel
 		 * @param string $label
-		 * @return AMQPChannelInterface
+		 * @return \Onphp\AMQPChannelInterface
 		 */
-		protected function queueDelete(AMQPChannelInterface $channel, $label)
+		protected function queueDelete(\Onphp\AMQPChannelInterface $channel, $label)
 		{
 			$this->assertTrue(isset(self::$queueList[$label]));
 
@@ -900,7 +902,7 @@ protected function queueDelete(AMQPChannelInterface $channel, $label)
 			);
 
 			$this->assertInstanceOf(
-				'AMQPChannelInterface',
+				'\Onphp\AMQPChannelInterface',
 				$channelInterface
 			);
 
diff --git a/test/main/Utils/ArrayUtilsTest.class.php b/test/main/Utils/ArrayUtilsTest.class.php
index 4c56d8a394..32b67595b2 100644
--- a/test/main/Utils/ArrayUtilsTest.class.php
+++ b/test/main/Utils/ArrayUtilsTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class ArrayUtilsTest extends TestCase
 	{
 		/**
@@ -8,10 +10,10 @@ public function testMergeDateSortedLists($list1, $list2, $method, $result, $limi
 		{
 			$this->assertEquals(
 				$result,
-				ArrayUtils::mergeSortedLists(
+				\Onphp\ArrayUtils::mergeSortedLists(
 					$list1,
 					$list2,
-					DateObjectComparator::me(),
+					\Onphp\DateObjectComparator::me(),
 					$method,
 					$limit
 				)
@@ -20,7 +22,7 @@ public function testMergeDateSortedLists($list1, $list2, $method, $result, $limi
 
 		public static function dateObjectsSortedLists()
 		{
-			$today = Date::makeToday();
+			$today = \Onphp\Date::makeToday();
 
 			return
 				array(
@@ -128,15 +130,28 @@ public function testMergeTextDataSortedLists($list1, $list2, $method, $result, $
 		{
 			$this->assertEquals(
 				$result,
-				ArrayUtils::mergeSortedLists(
+				\Onphp\ArrayUtils::mergeSortedLists(
 					$list1,
 					$list2,
-					StandardComparator::me(),
+					\Onphp\StandardComparator::me(),
 					$method,
 					$limit
 				)
 			);
 		}
+		
+		public function testConvertObjectList()
+		{
+			$list =
+				array(
+					TestCity::create()->setId(42)->setName('Beldyazki'),
+					TestCity::create()->setId(666)->setName('Moscow')
+				);
+			
+			$this->assertEquals(array(42, 666), array_keys(\Onphp\ArrayUtils::convertObjectList($list)));
+			$this->assertEquals(array('Beldyazki', 'Moscow'), array_keys(\Onphp\ArrayUtils::convertObjectList($list, 'getName')));
+			
+		}
 
 		public static function textDataSortedLists()
 		{
@@ -176,7 +191,7 @@ public static function create()
 			return new self;
 		}
 
-		public function setDate(Date $date)
+		public function setDate(\Onphp\Date $date)
 		{
 			$this->date = $date;
 			
diff --git a/test/main/Utils/FileUtilsTest.class.php b/test/main/Utils/FileUtilsTest.class.php
index 1e512e2dda..0dc2ca5244 100644
--- a/test/main/Utils/FileUtilsTest.class.php
+++ b/test/main/Utils/FileUtilsTest.class.php
@@ -1,23 +1,25 @@
 <?php
+	namespace Onphp\Test;
+
 	final class FileUtilsTest extends TestCase
 	{
 		public function testUniqueNames()
 		{
-			$uniqueName = FileUtils::makeUniqueName('Chasey Lain.jpeg');
+			$uniqueName = \Onphp\FileUtils::makeUniqueName('Chasey Lain.jpeg');
 			
 			$this->assertEquals(
 				substr($uniqueName, strpos($uniqueName, '.')),
 				'.jpeg'
 			);
 
-			$uniqueName = FileUtils::makeUniqueName('Елена Беркова.jpeg');
+			$uniqueName = \Onphp\FileUtils::makeUniqueName('Елена Беркова.jpeg');
 			
 			$this->assertEquals(
 				substr($uniqueName, strpos($uniqueName, '.')),
 				'.jpeg'
 			);
 
-			$uniqueName = FileUtils::makeUniqueLatinName('Елена Беркова.gif'); //animated gif ;)
+			$uniqueName = \Onphp\FileUtils::makeUniqueLatinName('Елена Беркова.gif'); //animated gif ;)
 			
 			$this->assertEquals(
 				substr($uniqueName, strpos($uniqueName, '.')),
diff --git a/test/main/Utils/PinbaTest.class.php b/test/main/Utils/PinbaTest.class.php
index 73d9c42653..6a823cbf43 100644
--- a/test/main/Utils/PinbaTest.class.php
+++ b/test/main/Utils/PinbaTest.class.php
@@ -1,5 +1,7 @@
 <?php
 	
+	namespace Onphp\Test;
+
 	final class PinbaTest extends TestCase
 	{
 		protected static $skipMessage	= 'unknown error';
@@ -10,7 +12,7 @@ public static function setUpBeforeClass()
 			if (!extension_loaded('pinba'))
 				return self::skip('The pinba extension is not available.');
 			
-			if (!PinbaClient::isEnabled())
+			if (!\Onphp\PinbaClient::isEnabled())
 				return self::skip('The pinba is not enabled at php.ini (pinba.enabled=1).');
 			
 			if (!extension_loaded('runkit'))
@@ -47,31 +49,31 @@ public function setUp()
 		
 		public function testTreeLog()
 		{
-			PinbaClient::me()->setTreeLogEnabled();
+			\Onphp\PinbaClient::me()->setTreeLogEnabled();
 			
-			$this->assertEquals(count(PinbaClient::me()->getTreeQueue()), 0);
+			$this->assertEquals(count(\Onphp\PinbaClient::me()->getTreeQueue()), 0);
 			
-			PinbaClient::me()->timerStart(
+			\Onphp\PinbaClient::me()->timerStart(
 				'test',
 				array("test" => 'main')
 			);
 			
-			$this->assertEquals(count(PinbaClient::me()->getTreeQueue()), 1);
+			$this->assertEquals(count(\Onphp\PinbaClient::me()->getTreeQueue()), 1);
 			
-			PinbaClient::me()->timerStart(
+			\Onphp\PinbaClient::me()->timerStart(
 				'subtest',
 				array("test" => 'submain')
 			);
 			
-			$this->assertEquals(count(PinbaClient::me()->getTreeQueue()), 2);
+			$this->assertEquals(count(\Onphp\PinbaClient::me()->getTreeQueue()), 2);
 			
-			PinbaClient::me()->timerStop('subtest');
+			\Onphp\PinbaClient::me()->timerStop('subtest');
 			
-			$this->assertEquals(count(PinbaClient::me()->getTreeQueue()), 1);
+			$this->assertEquals(count(\Onphp\PinbaClient::me()->getTreeQueue()), 1);
 			
-			PinbaClient::me()->timerStop('test');
+			\Onphp\PinbaClient::me()->timerStop('test');
 			
-			$this->assertEquals(count(PinbaClient::me()->getTreeQueue()), 0);
+			$this->assertEquals(count(\Onphp\PinbaClient::me()->getTreeQueue()), 0);
 			
 		}
 		
@@ -97,7 +99,7 @@ public static function start($tags, array $data = array())
 				&& $tags['treeParentId'] != "root"
 			) {
 				if ($tags['treeParentId'] != end(self::$queue)) {
-					throw new Exception('Error generatin tree');
+					throw new \Exception('Error generatin tree');
 				}
 			}
 			
@@ -114,7 +116,7 @@ public static function stop($id)
 			$tree_id = $current['treeId'];
 			
 			if (end(self::$queue) != $tree_id) {
-				throw new Exception('Error generatin tree');
+				throw new \Exception('Error generatin tree');
 			}
 			
 			array_pop(self::$queue);
diff --git a/test/main/Utils/Routers/RouterBaseRuleTest.class.php b/test/main/Utils/Routers/RouterBaseRuleTest.class.php
index aa0f1ec571..82c4581ada 100644
--- a/test/main/Utils/Routers/RouterBaseRuleTest.class.php
+++ b/test/main/Utils/Routers/RouterBaseRuleTest.class.php
@@ -1,22 +1,24 @@
 <?php
 	/** $Id$ **/
 	
-	class RouterBaseRuleStub extends RouterBaseRule
+	namespace Onphp\Test;
+
+	class RouterBaseRuleStub extends \Onphp\RouterBaseRule
 	{
 		/**
-		 * @return RouterBaseRuleStub
+		 * @return \Onphp\Test\RouterBaseRuleStub
 		**/
 		public static function create()
 		{
 			return new self();
 		}
 		
-		public function getPath(HttpUrl $url)
+		public function getPath(\Onphp\HttpUrl $url)
 		{
 			return parent::getPath($url);
 		}
 		
-		public function match(HttpRequest $request) {/**/}
+		public function match(\Onphp\HttpRequest $request) {/**/}
 		
 		public function assembly(array $data = array(), $reset = false, $encode = false) {/**/}
 	}
@@ -136,15 +138,15 @@ public function testGetPath()
 		{
 			foreach (self::$fixtures as $base => $cases) {
 				$rewriter =
-					RouterRewrite::me()->setBaseUrl(
-						HttpUrl::create()->parse($base)
+					\Onphp\RouterRewrite::me()->setBaseUrl(
+						\Onphp\HttpUrl::create()->parse($base)
 					);
 				
 				foreach ($cases as $requestUri => $pathResult) {
 					$actualResult =
 						RouterBaseRuleStub::create()->
 						getPath(
-							HttpUrl::create()->
+							\Onphp\HttpUrl::create()->
 							parse($requestUri)
 						)->
 						toString();
diff --git a/test/main/Utils/Routers/RouterChainRuleTest.class.php b/test/main/Utils/Routers/RouterChainRuleTest.class.php
index 91f5e737a2..e860bcda48 100644
--- a/test/main/Utils/Routers/RouterChainRuleTest.class.php
+++ b/test/main/Utils/Routers/RouterChainRuleTest.class.php
@@ -1,23 +1,25 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	class RouterChainRuleTest extends TestCase
 	{
 		public function setUp()
 		{
 			ServerVarUtils::unsetVars($_SERVER);
-			RouterRewrite::me()->
+			\Onphp\RouterRewrite::me()->
 				setBaseUrl(
-					new HttpUrl()
+					new \Onphp\HttpUrl()
 				);
 		}
 		
 		public function testChainingMatch()
 		{
-			$chain = new RouterChainRule();
+			$chain = new \Onphp\RouterChainRule();
 			
 			$foo =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -27,7 +29,7 @@ public function testChainingMatch()
 				);
 			
 			$bar =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'bar'
 				)->
 				setDefaults(
@@ -57,7 +59,7 @@ public function testChainingMatch()
 		public function testChainingShortcutMatch()
 		{
 			$foo =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -67,7 +69,7 @@ public function testChainingShortcutMatch()
 				);
 			
 			$bar =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'bar'
 				)->
 				setDefaults(
@@ -91,7 +93,7 @@ public function testChainingShortcutMatch()
 		public function testChainingMatchFailure()
 		{
 			$foo =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -101,7 +103,7 @@ public function testChainingMatchFailure()
 				);
 			
 			$bar =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'bar'
 				)->
 				setDefaults(
@@ -124,7 +126,7 @@ public function testChainingMatchFailure()
 		public function testChainingVariableOverriding()
 		{
 			$foo =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -136,7 +138,7 @@ public function testChainingVariableOverriding()
 				);
 			
 			$bar =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'bar'
 				)->
 				setDefaults(
@@ -161,13 +163,13 @@ public function testChainingSeparatorOverriding()
 		{
 			$this->markTestSkipped('Route features not ready');
 			
-			$foo = RouterTransparentRule::create('foo')->
+			$foo = \Onphp\RouterTransparentRule::create('foo')->
 				setDefaults(array('foo' => 1));
 				
-			$bar = RouterTransparentRule::create('bar')->
+			$bar = \Onphp\RouterTransparentRule::create('bar')->
 				setDefaults(array('bar' => 2));
 				
-			$baz = RouterTransparentRule::create('baz')->
+			$baz = \Onphp\RouterTransparentRule::create('baz')->
 				setDefaults(array('baz' => 3));
 			
 			$chain = $foo->chain($bar, '.');
@@ -189,7 +191,7 @@ public function testI18nChaining()
 			$this->markTestSkipped('Route features not ready');
 			
 			$lang =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang'
 				)->
 				setDefaults(
@@ -199,7 +201,7 @@ public function testI18nChaining()
 				);
 			
 			$profile =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'user/:id'
 				)->
 				setDefaults(
@@ -219,10 +221,10 @@ public function testI18nChaining()
 		
 		public function testChainingAssemblyWithStatic()
 		{
-			$chain = new RouterChainRule();
+			$chain = new \Onphp\RouterChainRule();
 			
 			$foo =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -232,7 +234,7 @@ public function testChainingAssemblyWithStatic()
 				);
 			
 			$bar =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'bar'
 				)->
 				setDefaults(
@@ -257,10 +259,10 @@ public function testChainingAssemblyWithStatic()
 		
 		public function testChainingAssemblyWithRegex()
 		{
-			$chain = new RouterChainRule();
+			$chain = new \Onphp\RouterChainRule();
 			
 			$foo =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -270,7 +272,7 @@ public function testChainingAssemblyWithRegex()
 				);
 			
 			$bar =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'bar'
 				)->
 				setDefaults(
@@ -297,7 +299,7 @@ public function testChainingAssemblyWithRegex()
 		public function testChainingReuse()
 		{
 			$foo =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -307,7 +309,7 @@ public function testChainingReuse()
 				);
 			
 			$profile =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'user/:id'
 				)->
 				setDefaults(
@@ -317,7 +319,7 @@ public function testChainingReuse()
 				);
 			
 			$article =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'article/:id'
 				)->
 				setDefaults(
@@ -346,10 +348,10 @@ public function testChainingReuse()
 		
 		public function testAssemblyWithHostnameAndTransparent()
 		{
-			$chain = new RouterChainRule();
+			$chain = new \Onphp\RouterChainRule();
 			
 			$host =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					':subdomain.example.com'
 				)->
 				setDefaults(
@@ -359,7 +361,7 @@ public function testAssemblyWithHostnameAndTransparent()
 				);
 			
 			$transparent =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':bar/:area/:action'
 				)->
 				setDefaults(
@@ -409,14 +411,14 @@ public function testAssemblyWithHostnameAndTransparent()
 		
 		/**
 		 * @param string $url
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		protected function buildRequest($url)
 		{
 			ServerVarUtils::build($_SERVER, $url);
 			
 			return
-				HttpRequest::create()->
+				\Onphp\HttpRequest::create()->
 				setServer($_SERVER);
 		}
 	}
diff --git a/test/main/Utils/Routers/RouterHostnameRuleTest.class.php b/test/main/Utils/Routers/RouterHostnameRuleTest.class.php
index e902813a7e..1289fa9a4d 100644
--- a/test/main/Utils/Routers/RouterHostnameRuleTest.class.php
+++ b/test/main/Utils/Routers/RouterHostnameRuleTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	class RouterHostnameRuleTest extends TestCase
 	{
 		public function setUp()
@@ -81,7 +83,7 @@ public function testAssemblyHostWithMissingParam()
 			try {
 				$route->assembly();
 				$this->fail('An expected RouterException has not been raised');
-			} catch (RouterException $expected) {
+			} catch (\Onphp\RouterException $expected) {
 				$this->assertContains('subdomain is not specified', $expected->getMessage());
 			}
 		}
@@ -100,7 +102,7 @@ public function testAssemblyHostWithDefaultParamInSecureScheme()
 		{
 			$route =
 				$this->buildHostnameRuleWithDefault()->
-				setScheme(RouterHostnameRule::SCHEME_HTTPS);
+				setScheme(\Onphp\RouterHostnameRule::SCHEME_HTTPS);
 			
 			$this->assertRegexp(
 				'/^https\:\/\/bar\.example\.com$/i',
@@ -137,7 +139,7 @@ public function testRouteWithHostname()
 			$request = $this->buildRequest('www.example.com');
 			
 			$route =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -154,12 +156,12 @@ public function testRouteWithHostname()
 		}
 				
 		/**
-		* @return RouterHostnameRule
+		* @return \Onphp\RouterHostnameRule
 		**/
 		protected function buildStaticHostnameRule()
 		{
 			$route =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -173,12 +175,12 @@ protected function buildStaticHostnameRule()
 		}
 		
 		/**
-		* @return RouterHostnameRule
+		* @return \Onphp\RouterHostnameRule
 		**/
 		protected function buildHostnameRule()
 		{
 			$route =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					':subdomain.example.com'
 				)->
 				setDefaults(
@@ -197,12 +199,12 @@ protected function buildHostnameRule()
 		}
 		
 		/**
-		 * @return RouterHostnameRule
+		 * @return \Onphp\RouterHostnameRule
 		**/
 		protected function buildHostnameRuleWithDefault()
 		{
 			$route =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					':subdomain.example.com'
 				)->
 				setDefaults(
@@ -223,14 +225,14 @@ protected function buildHostnameRuleWithDefault()
 		
 		/**
 		 * @param string $host
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		protected function buildRequest($host, $schema = 'http')
 		{
 			ServerVarUtils::build($_SERVER, $schema.'://'.$host);
 			
 			return
-				HttpRequest::create()->
+				\Onphp\HttpRequest::create()->
 				setServer($_SERVER);
 		}
 	}
diff --git a/test/main/Utils/Routers/RouterRegexpRuleTest.class.php b/test/main/Utils/Routers/RouterRegexpRuleTest.class.php
index 7753b3529e..8bc4783cf1 100644
--- a/test/main/Utils/Routers/RouterRegexpRuleTest.class.php
+++ b/test/main/Utils/Routers/RouterRegexpRuleTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	class RouterRegexpRuleTest extends TestCase
 	{
 		public function setUp()
@@ -10,7 +12,7 @@ public function setUp()
 		
 		public function testStaticMatch()
 		{
-			$route = new RouterRegexpRule('users/all');
+			$route = new \Onphp\RouterRegexpRule('users/all');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/all')
 			);
@@ -20,7 +22,7 @@ public function testStaticMatch()
 		
 		public function testURLDecode()
 		{
-			$route = new RouterRegexpRule('żółć');
+			$route = new \Onphp\RouterRegexpRule('żółć');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/'.urlencode('żółć'))
 			);
@@ -30,7 +32,7 @@ public function testURLDecode()
 		
 		public function testStaticNoMatch()
 		{
-			$route = new RouterRegexpRule('users/a/martel');
+			$route = new \Onphp\RouterRegexpRule('users/a/martel');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/a')
 			);
@@ -41,7 +43,7 @@ public function testStaticNoMatch()
 		public function testStaticMatchWithDefaults()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/all'
 				)->
 				setDefaults(
@@ -60,7 +62,7 @@ public function testStaticMatchWithDefaults()
 		
 		public function testRootRoute()
 		{
-			$route = new RouterRegexpRule('');
+			$route = new \Onphp\RouterRegexpRule('');
 			$values = $route->match($this->buildRequest('http://localhost/'));
 			
 			$this->assertSame(array(), $values);
@@ -68,7 +70,7 @@ public function testRootRoute()
 		
 		public function testVariableMatch()
 		{
-			$route = new RouterRegexpRule('users/(.+)');
+			$route = new \Onphp\RouterRegexpRule('users/(.+)');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/martel')
 			);
@@ -79,7 +81,7 @@ public function testVariableMatch()
 		
 		public function testDoubleMatch()
 		{
-			$route = new RouterRegexpRule('users/(user_(\d+).html)');
+			$route = new \Onphp\RouterRegexpRule('users/(user_(\d+).html)');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/user_1354.html')
 			);
@@ -92,7 +94,7 @@ public function testDoubleMatch()
 		public function testNegativeMatch()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'((?!admin|moderator).+)'
 				)->
 				setDefaults(
@@ -120,7 +122,7 @@ public function testNegativeMatch()
 		public function testNumericDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(.+)?'
 				)->
 				setDefaults(
@@ -140,7 +142,7 @@ public function testNumericDefault()
 		public function testVariableMatchWithNumericDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(.+)?'
 				)->
 				setDefaults(
@@ -159,7 +161,7 @@ public function testVariableMatchWithNumericDefault()
 		
 		public function testNamedVariableMatch()
 		{
-			$route = new RouterRegexpRule('users/(?P<username>.+)');
+			$route = new \Onphp\RouterRegexpRule('users/(?P<username>.+)');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/martel')
 			);
@@ -171,7 +173,7 @@ public function testNamedVariableMatch()
 		public function testMappedVariableMatch()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(.+)'
 				)->
 				setMap(
@@ -191,7 +193,7 @@ public function testMappedVariableMatch()
 		public function testMappedVariableWithDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users(?:/(.+))?'
 				)->
 				setDefaults(
@@ -216,7 +218,7 @@ public function testMappedVariableWithDefault()
 		public function testMappedVariableWithNamedSubpattern()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(?P<name>.+)'
 				)->
 				setMap(
@@ -236,7 +238,7 @@ public function testMappedVariableWithNamedSubpattern()
 		public function testOptionalVar()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(\w+)/?(?:p/(\d+))?'
 				)->
 				setMap(
@@ -258,7 +260,7 @@ public function testOptionalVar()
 		public function testEmptyOptionalVar()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(\w+)/?(?:p/(\d+))?'
 				)->
 				setMap(
@@ -279,7 +281,7 @@ public function testEmptyOptionalVar()
 		public function testMixedMap()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(\w+)/?(?:p/(\d+))?'
 				)->
 				setMap(
@@ -300,7 +302,7 @@ public function testMixedMap()
 		public function testNumericDefaultWithMap()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(.+)?'
 				)->
 				setDefaults(
@@ -325,7 +327,7 @@ public function testNumericDefaultWithMap()
 		public function testMixedMapWithDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(\w+)/?(?:p/(\d+))?'
 				)->
 				setDefaults(
@@ -351,7 +353,7 @@ public function testMixedMapWithDefault()
 		public function testMixedMapWithDefaults2()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(\w+)?/?(?:p/(\d+))?'
 				)->
 				setDefaults(
@@ -376,7 +378,7 @@ public function testMixedMapWithDefaults2()
 		public function testOptionalVarWithMapAndDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(\w+)/?(?:p/(\d+))?'
 				)->
 				setDefaults(
@@ -404,7 +406,7 @@ public function testOptionalVarWithMapAndDefault()
 		public function testOptionalVarWithMapAndNumericDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(\w+)/?(?:p/(\d+))?'
 				)->
 				setDefaults(
@@ -430,7 +432,7 @@ public function testOptionalVarWithMapAndNumericDefault()
 		public function testMappedAndNumericDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(\w+)?'
 				)->
 				setDefaults(
@@ -456,7 +458,7 @@ public function testMappedAndNumericDefault()
 		public function testAssembly()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(.+)'
 				)->
 				setMap(
@@ -479,7 +481,7 @@ public function testAssembly()
 		public function testAssemblyWithDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(.+)?'
 				)->
 				setDefaults(
@@ -502,7 +504,7 @@ public function testAssemblyWithDefault()
 		public function testAssemblyWithMappedDefault()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(.+)?'
 				)->
 				setDefaults(
@@ -530,7 +532,7 @@ public function testAssemblyWithMappedDefault()
 		public function testAssemblyWithData()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(.+)'
 				)->
 				setReverse(
@@ -548,7 +550,7 @@ public function testAssemblyWithData()
 		public function testAssemblyWithMappedVariable()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(.+)'
 				)->
 				setMap(
@@ -574,7 +576,7 @@ public function testAssemblyWithMappedVariable()
 		public function testAssemblyWithMappedVariableAndNumericKey()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(.+)'
 				)->
 				setMap(
@@ -597,7 +599,7 @@ public function testAssemblyWithMappedVariableAndNumericKey()
 		public function testAssemblyWithoutMatch()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(.+)'
 				)->
 				setReverse(
@@ -607,13 +609,13 @@ public function testAssemblyWithoutMatch()
 			try {
 				$url = $route->assembly();
 				$this->fail();
-			} catch (BaseException $e) {/*_*/}
+			} catch (\Onphp\BaseException $e) {/*_*/}
 		}
 		
 		public function testAssemblyWithDefaultWithoutMatch()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(.+)?'
 				)->
 				setDefaults(
@@ -632,7 +634,7 @@ public function testAssemblyWithDefaultWithoutMatch()
 		public function testAssemblyWithMappedDefaultWithoutMatch()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/?(.+)?'
 				)->
 				setDefaults(
@@ -656,7 +658,7 @@ public function testAssemblyWithMappedDefaultWithoutMatch()
 		public function testAssemblyWithDataWithoutMatch()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(.+)'
 				)->
 				setReverse(
@@ -670,7 +672,7 @@ public function testAssemblyWithDataWithoutMatch()
 		public function testAssemblyWithMappedVariableWithoutMatch()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'users/(.+)'
 				)->
 				setMap(
@@ -689,7 +691,7 @@ public function testAssemblyWithMappedVariableWithoutMatch()
 		public function testAssembly2()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'(.+)\.([0-9]+)-([0-9]+)\.html'
 				)->
 				setDefaults(
@@ -730,7 +732,7 @@ public function testAssembly2()
 		public function testCreateInstance()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'forum/(\d+)'
 				)->
 				setDefaults(
@@ -742,7 +744,7 @@ public function testCreateInstance()
 					'forum/%d'
 				);
 			
-			$this->assertInstanceOf('RouterRegexpRule', $route);
+			$this->assertInstanceOf('\Onphp\RouterRegexpRule', $route);
 			
 			$values = $route->match($this->buildRequest('http://localhost/forum/1'));
 			
@@ -752,7 +754,7 @@ public function testCreateInstance()
 		public function testAssemblyOfRouteWithMergedMatchedParts()
 		{
 			$route =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'itemlist(?:/(\d+))?'
 				)->
 				setDefaults(
@@ -809,7 +811,7 @@ protected function buildRequest($url)
 			ServerVarUtils::build($_SERVER, $url);
 			
 			return
-				HttpRequest::create()->
+				\Onphp\HttpRequest::create()->
 				setServer($_SERVER);
 		}
 	}
diff --git a/test/main/Utils/Routers/RouterRewriteTest.class.php b/test/main/Utils/Routers/RouterRewriteTest.class.php
index 867284cb3c..43eb34bb6b 100644
--- a/test/main/Utils/Routers/RouterRewriteTest.class.php
+++ b/test/main/Utils/Routers/RouterRewriteTest.class.php
@@ -1,19 +1,21 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	class RouterRewriteTest extends TestCase
 	{
 		/**
-		 * @var RouterRewrite
+		 * @var \Onphp\RouterRewrite
 		**/
 		protected $router = null;
 		
 		public function setUp()
 		{
 			$this->router =
-				RouterRewrite::me()->
+				\Onphp\RouterRewrite::me()->
 					resetAll()->
-					setBaseUrl(HttpUrl::create());
+					setBaseUrl(\Onphp\HttpUrl::create());
 			
 			ServerVarUtils::unsetVars($_SERVER);
 		}
@@ -28,7 +30,7 @@ public function testAddRoute()
 			$this->router->addRoute(
 				'archive',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'archive/:year'
 				)->
 				setDefaults(
@@ -48,12 +50,12 @@ public function testAddRoute()
 			$routes = $this->router->getRoutes();
 			
 			$this->assertEquals(1, count($routes));
-			$this->assertInstanceOf('RouterTransparentRule', $routes['archive']);
+			$this->assertInstanceOf('\Onphp\RouterTransparentRule', $routes['archive']);
 			
 			$this->router->addRoute(
 				'register',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'register/:action'
 				)->
 				setDefaults(
@@ -67,14 +69,14 @@ public function testAddRoute()
 			$routes = $this->router->getRoutes();
 			
 			$this->assertEquals(2, count($routes));
-			$this->assertInstanceOf('RouterTransparentRule', $routes['register']);
+			$this->assertInstanceOf('\Onphp\RouterTransparentRule', $routes['register']);
 		}
 		
 		public function testAddRoutes()
 		{
 			$routes = array(
 				'archive' =>
-					RouterTransparentRule::create(
+					\Onphp\RouterTransparentRule::create(
 						'archive/:year'
 					)->
 					setDefaults(
@@ -90,7 +92,7 @@ public function testAddRoutes()
 						)
 					),
 				'register' =>
-					RouterTransparentRule::create(
+					\Onphp\RouterTransparentRule::create(
 						'register/:action'
 					)->
 					setDefaults(
@@ -106,8 +108,8 @@ public function testAddRoutes()
 			$values = $this->router->getRoutes();
 			
 			$this->assertEquals(2, count($values));
-			$this->assertInstanceOf('RouterTransparentRule', $values['archive']);
-			$this->assertInstanceOf('RouterTransparentRule', $values['register']);
+			$this->assertInstanceOf('\Onphp\RouterTransparentRule', $values['archive']);
+			$this->assertInstanceOf('\Onphp\RouterTransparentRule', $values['register']);
 		}
 		
 		public function testHasRoute()
@@ -115,7 +117,7 @@ public function testHasRoute()
 			$this->router->addRoute(
 				'archive',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'archive/:year'
 				)->
 				setDefaults(
@@ -139,7 +141,7 @@ public function testHasRoute()
 		public function testGetRoute()
 		{
 			$archive =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'archive/:year'
 				)->
 				setDefaults(
@@ -159,7 +161,7 @@ public function testGetRoute()
 			
 			$route = $this->router->getRoute('archive');
 			
-			$this->assertInstanceOf('RouterTransparentRule', $route);
+			$this->assertInstanceOf('\Onphp\RouterTransparentRule', $route);
 			$this->assertSame($route, $archive);
 		}
 		
@@ -168,7 +170,7 @@ public function testRemoveRoute()
 			$this->router->addRoute(
 				'archive',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'archive/:year'
 				)->
 				setDefaults(
@@ -195,8 +197,8 @@ public function testRemoveRoute()
 			
 			try {
 				$route = $this->router->removeRoute('archive');
-			} catch (RouterException $e) {
-				$this->assertInstanceOf('RouterException', $e);
+			} catch (\Onphp\RouterException $e) {
+				$this->assertInstanceOf('\Onphp\RouterException', $e);
 				return true;
 			}
 			
@@ -207,8 +209,8 @@ public function testGetNonExistentRoute()
 		{
 			try {
 				$route = $this->router->getRoute('bogus');
-			} catch (RouterException $e) {
-				$this->assertInstanceOf('RouterException', $e);
+			} catch (\Onphp\RouterException $e) {
+				$this->assertInstanceOf('\Onphp\RouterException', $e);
 				return true;
 			}
 			
@@ -221,7 +223,7 @@ public function testRoute()
 			
 			$token = $this->router->route($request);
 			
-			$this->assertInstanceOf('HttpRequest', $token);
+			$this->assertInstanceOf('\Onphp\HttpRequest', $token);
 		}
 				
 		public function testEmptyRoute()
@@ -231,7 +233,7 @@ public function testEmptyRoute()
 			$this->router->addRoute(
 				'empty',
 				
-				RouterTransparentRule::create('')->
+				\Onphp\RouterTransparentRule::create('')->
 				setDefaults(
 					array(
 						'area' => 'ctrl',
@@ -253,7 +255,7 @@ public function testEmptyPath()
 			$this->router->addRoute(
 				'catch-all',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/*'
 				)->
 				setDefaults(
@@ -277,7 +279,7 @@ public function testEmptyPathWithWildcardRoute()
 			$this->router->addRoute(
 				'catch-all',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'*'
 				)->
 				setDefaults(
@@ -302,7 +304,7 @@ public function testRouteNotMatched()
 			
 			$this->router->addRoute(
 				'default',
-				new RouterTransparentRule(':area/:action')
+				new \Onphp\RouterTransparentRule(':area/:action')
 			);
 			
 			$token = $this->router->route($request);
@@ -318,7 +320,7 @@ public function testFirstRouteMatched()
 			$this->router->addRoute(
 				'archive',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'archive/:year'
 				)->
 				setDefaults(
@@ -338,7 +340,7 @@ public function testFirstRouteMatched()
 			$this->router->addRoute(
 				'register',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'register/:action'
 				)->
 				setDefaults(
@@ -361,10 +363,10 @@ public function testFirstRouteMatched()
 				);
 				
 				$this->assertInstanceOf(
-					'RouterTransparentRule',
+					'\Onphp\RouterTransparentRule',
 					$this->router->getCurrentRoute()
 				);
-			} catch (BaseException $e) {
+			} catch (\Onphp\BaseException $e) {
 				$this->fail('Current route is not set');
 			}
 		}
@@ -376,8 +378,8 @@ public function testExceptionGetCurrentRoute()
 			try {
 				$route = $this->router->getCurrentRouteName();
 				$this->fail();
-			} catch (BaseException $e) {
-				$this->assertInstanceOf('RouterException', $e);
+			} catch (\Onphp\BaseException $e) {
+				$this->assertInstanceOf('\Onphp\RouterException', $e);
 			}
 		}
 		
@@ -390,7 +392,7 @@ public function testAttachedVars()
 			$this->router->addRoute(
 				'test',
 				
-				new RouterTransparentRule(
+				new \Onphp\RouterTransparentRule(
 					':area/:action/*'
 				)
 			);
@@ -409,7 +411,7 @@ public function testUrlValuesHandling1()
 			$this->router->addRoute(
 				'foo',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang/foo'
 				)->
 				setDefaults(
@@ -424,7 +426,7 @@ public function testUrlValuesHandling1()
 			$this->router->addRoute(
 				'bar',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang/bar'
 				)->
 				setDefaults(
@@ -455,7 +457,7 @@ public function testUrlValuesHandling2()
 			$this->router->addRoute(
 				'foo',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang/foo'
 				)->
 				setDefaults(
@@ -470,7 +472,7 @@ public function testUrlValuesHandling2()
 			$this->router->addRoute(
 				'bar',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang/bar'
 				)->
 				setDefaults(
@@ -500,7 +502,7 @@ public function testUrlValuesHandling3()
 			$this->router->addRoute(
 				'foo',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang/foo'
 				)->
 				setDefaults(
@@ -515,7 +517,7 @@ public function testUrlValuesHandling3()
 			$this->router->addRoute(
 				'bar',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang/bar'
 				)->
 				setDefaults(
@@ -547,7 +549,7 @@ public function testRoutingChainedRoutes()
 			$request = $this->buildRequest('http://localhost/foo/bar');
 			
 			$foo =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'foo'
 				)->
 				setDefaults(
@@ -557,7 +559,7 @@ public function testRoutingChainedRoutes()
 				);
 			
 			$bar =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'bar'
 				)->
 				setDefaults(
@@ -568,7 +570,7 @@ public function testRoutingChainedRoutes()
 					)
 				);
 			
-			$chain = new RouterChainRule();
+			$chain = new \Onphp\RouterChainRule();
 			
 			$chain->
 				chain($foo)->
@@ -589,7 +591,7 @@ public function testRouteWithHostnameChain()
 			$request = $this->buildRequest('http://www.example.com/bar');
 			
 			$foo =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'nope.example.com'
 				)->
 				setDefaults(
@@ -600,7 +602,7 @@ public function testRouteWithHostnameChain()
 				);
 			
 			$bar =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -610,7 +612,7 @@ public function testRouteWithHostnameChain()
 				);
 			
 			$bla =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'bar'
 				)->
 				setDefaults(
@@ -620,13 +622,13 @@ public function testRouteWithHostnameChain()
 					)
 				);
 			
-			$chainMatch = new RouterChainRule();
+			$chainMatch = new \Onphp\RouterChainRule();
 			
 			$chainMatch->
 				chain($bar)->
 				chain($bla);
 			
-			$chainNoMatch = new RouterChainRule();
+			$chainNoMatch = new \Onphp\RouterChainRule();
 			
 			$chainNoMatch->
 				chain($foo)->
@@ -647,7 +649,7 @@ public function testRouteWithHostnameAndTransparentRuleChain()
 			$request = $this->buildRequest('http://www.example.com/test/123');
 			
 			$host =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -658,7 +660,7 @@ public function testRouteWithHostnameAndTransparentRuleChain()
 				);
 			
 			$transparent =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:contest'
 				)->
 				setRequirements(
@@ -668,7 +670,7 @@ public function testRouteWithHostnameAndTransparentRuleChain()
 					)
 				);
 			
-			$chain = new RouterChainRule();
+			$chain = new \Onphp\RouterChainRule();
 			
 			$chain->
 				chain($host)->
@@ -691,7 +693,7 @@ public function testRouteWithHostnameAndTransparentAndBaseUrlRuleChain()
 			$request = $this->buildRequest($base.'test/123');
 			
 			$host =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					'www.example.com'
 				)->
 				setDefaults(
@@ -702,7 +704,7 @@ public function testRouteWithHostnameAndTransparentAndBaseUrlRuleChain()
 				);
 			
 			$transparent =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:contest'
 				)->
 				setRequirements(
@@ -712,14 +714,14 @@ public function testRouteWithHostnameAndTransparentAndBaseUrlRuleChain()
 					)
 				);
 			
-			$chain = new RouterChainRule();
+			$chain = new \Onphp\RouterChainRule();
 			
 			$chain->
 				chain($host)->
 				chain($transparent);
 			
 			$this->router->setBaseUrl(
-				HttpUrl::create()->parse($base)
+				\Onphp\HttpUrl::create()->parse($base)
 			);
 			
 			$this->router->addRoute('HostnameAndTransparentWithBaseUrl', $chain);
@@ -740,7 +742,7 @@ public function testRouteWithHostnameMaskAndRegexpAndBaseUrlRuleChain()
 			$request = $this->buildRequest('http://test123d.example.com/~user/public_html/www/test/123.html');
 			
 			$host =
-				RouterHostnameRule::create(
+				\Onphp\RouterHostnameRule::create(
 					':subdomain.example.com'
 				)->
 				setDefaults(
@@ -756,7 +758,7 @@ public function testRouteWithHostnameMaskAndRegexpAndBaseUrlRuleChain()
 				);
 			
 			$transparent =
-				RouterRegexpRule::create(
+				\Onphp\RouterRegexpRule::create(
 					'test/(\d+)\.html'
 				)->
 				setDefaults(
@@ -770,14 +772,14 @@ public function testRouteWithHostnameMaskAndRegexpAndBaseUrlRuleChain()
 					)
 				);
 			
-			$chain = new RouterChainRule();
+			$chain = new \Onphp\RouterChainRule();
 			
 			$chain->
 				chain($host)->
 				chain($transparent);
 			
 			$this->router->setBaseUrl(
-				HttpUrl::create()->parse($base)
+				\Onphp\HttpUrl::create()->parse($base)
 			);
 			
 			$this->router->addRoute('HostnameMaskWithRegexp', $chain);
@@ -796,7 +798,7 @@ public function testAssemlingWithTransparentRule()
 			$this->router->addRoute(
 				'contest',
 				
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'contest/:contest/*'
 				)->
 				setDefaults(
@@ -827,7 +829,7 @@ public function testAssemlingWithTransparentRule()
 		
 		public function testAssemblingWithHostnameHttp()
 		{
-			$route = new RouterHostnameRule('www.example.com');
+			$route = new \Onphp\RouterHostnameRule('www.example.com');
 			
 			$this->router->addRoute('hostname-route', $route);
 			
@@ -840,7 +842,7 @@ public function testAssemblingWithHostnameHttp()
 		public function testAssemblingWithHostnameHttps()
 		{
 			$route =
-				RouterHostnameRule::create('www.example.com')->
+				\Onphp\RouterHostnameRule::create('www.example.com')->
 				setSecure();
 			
 			$this->router->addRoute('hostname-route', $route);
@@ -853,11 +855,11 @@ public function testAssemblingWithHostnameHttps()
 		
 		public function testAssemblingWithHostnameThroughChainHttp()
 		{
-			$foo = new RouterHostnameRule('www.example.com');
-			$bar = new RouterStaticRule('bar');
+			$foo = new \Onphp\RouterHostnameRule('www.example.com');
+			$bar = new \Onphp\RouterStaticRule('bar');
 			
 			$chain =
-				RouterChainRule::create()->
+				\Onphp\RouterChainRule::create()->
 				chain($foo)->
 				chain($bar);
 			
@@ -871,8 +873,8 @@ public function testAssemblingWithHostnameThroughChainHttp()
 		
 		public function testAssemblingWithHostnameWithChainHttp()
 		{
-			$foo = new RouterHostnameRule('www.example.com');
-			$bar = new RouterStaticRule('bar');
+			$foo = new \Onphp\RouterHostnameRule('www.example.com');
+			$bar = new \Onphp\RouterStaticRule('bar');
 			
 			$chain = $foo->chain($bar);
 			
@@ -886,17 +888,17 @@ public function testAssemblingWithHostnameWithChainHttp()
 		
 		public function testAssemblingWithHostnameThroughChainHttpAndBaseUrl()
 		{
-			$foo = new RouterHostnameRule('www.example.com');
-			$bar = new RouterStaticRule('bar');
+			$foo = new \Onphp\RouterHostnameRule('www.example.com');
+			$bar = new \Onphp\RouterStaticRule('bar');
 			
 			$chain =
-				RouterChainRule::create()->
+				\Onphp\RouterChainRule::create()->
 				chain($foo)->
 				chain($bar);
 			
 			$this->router->
 				setBaseUrl(
-					HttpUrl::create()->
+					\Onphp\HttpUrl::create()->
 					parse('http://www.example.com/~user/public/')
 				)->
 				addRoute('foo-bar', $chain);
@@ -909,17 +911,17 @@ public function testAssemblingWithHostnameThroughChainHttpAndBaseUrl()
 		
 		public function testAssemblingWithHostnameThroughChainHttpAndBaseUrlAndDiffHost()
 		{
-			$foo = new RouterHostnameRule('www.example.com');
-			$bar = new RouterStaticRule('bar');
+			$foo = new \Onphp\RouterHostnameRule('www.example.com');
+			$bar = new \Onphp\RouterStaticRule('bar');
 			
 			$chain =
-				RouterChainRule::create()->
+				\Onphp\RouterChainRule::create()->
 				chain($foo)->
 				chain($bar);
 			
 			$this->router->
 				setBaseUrl(
-					HttpUrl::create()->
+					\Onphp\HttpUrl::create()->
 					parse('http://qwerty.example.com/~user/public/')
 				)->
 				addRoute('foo-bar', $chain);
@@ -932,17 +934,17 @@ public function testAssemblingWithHostnameThroughChainHttpAndBaseUrlAndDiffHost(
 		
 		public function testAssemblingWithHostnameThroughChainHttpAndBaseUrlAndDiffScheme()
 		{
-			$foo = new RouterHostnameRule('http.example.com');
-			$bar = new RouterStaticRule('bar');
+			$foo = new \Onphp\RouterHostnameRule('http.example.com');
+			$bar = new \Onphp\RouterStaticRule('bar');
 			
 			$chain =
-				RouterChainRule::create()->
+				\Onphp\RouterChainRule::create()->
 				chain($foo)->
 				chain($bar);
 			
 			$this->router->
 				setBaseUrl(
-					HttpUrl::create()->
+					\Onphp\HttpUrl::create()->
 					parse('https://www.example.com/~user/public/')
 				)->
 				addRoute('foo-bar', $chain);
@@ -956,19 +958,19 @@ public function testAssemblingWithHostnameThroughChainHttpAndBaseUrlAndDiffSchem
 		public function testAssemblingWithSettingHostnameThroughChainHttpAndBaseUrlAndDiffScheme()
 		{
 			$foo =
-				RouterHostnameRule::create('https.example.com')->
+				\Onphp\RouterHostnameRule::create('https.example.com')->
 				setSecure();
 				
-			$bar = new RouterStaticRule('bar');
+			$bar = new \Onphp\RouterStaticRule('bar');
 			
 			$chain =
-				RouterChainRule::create()->
+				\Onphp\RouterChainRule::create()->
 				chain($foo)->
 				chain($bar);
 			
 			$this->router->
 				setBaseUrl(
-					HttpUrl::create()->
+					\Onphp\HttpUrl::create()->
 					parse('https://www.example.com/~user/public/')
 				)->
 				addRoute('foo-bar', $chain);
@@ -981,8 +983,8 @@ public function testAssemblingWithSettingHostnameThroughChainHttpAndBaseUrlAndDi
 					
 		public function testAssemblingWrongChain()
 		{
-			$foo = new RouterStaticRule('bar');
-			$bar = new RouterHostnameRule('mega.example.com');
+			$foo = new \Onphp\RouterStaticRule('bar');
+			$bar = new \Onphp\RouterHostnameRule('mega.example.com');
 			
 			$chain = $foo->chain($bar);
 			
@@ -995,8 +997,8 @@ public function testAssemblingWrongChain()
 			
 			try {
 				$s = $this->router->assembly(array(), 'foobar');
-			} catch (BaseException $e) {
-				$this->assertInstanceOf('RouterException', $e);
+			} catch (\Onphp\BaseException $e) {
+				$this->assertInstanceOf('\Onphp\RouterException', $e);
 				return true;
 			}
 			
@@ -1006,7 +1008,7 @@ public function testAssemblingWrongChain()
 		public function testRouteShouldMatchEvenWithTrailingSlash()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'blog/articles/:id'
 				)->
 				setDefaults(
@@ -1037,7 +1039,7 @@ public function testAssemblingWithHostnameAndBaseUrl()
 			$base = 'http://www.example.com/~users/public/www/';
 			
 			$hostname =
-				RouterHostnameRule::create(':subdomain.example.com')->
+				\Onphp\RouterHostnameRule::create(':subdomain.example.com')->
 					setDefaults(
 						array(
 							'subdomain' => 'mega'
@@ -1045,7 +1047,7 @@ public function testAssemblingWithHostnameAndBaseUrl()
 					);
 			
 			$this->router->setBaseUrl(
-				HttpUrl::create()->parse($base)
+				\Onphp\HttpUrl::create()->parse($base)
 			);
 			
 			$this->router->addRoute('host', $hostname);
@@ -1066,7 +1068,7 @@ public function testAssemblingWithHostnameAndTransparentWithBaseUrl()
 			$base = 'http://www.example.com/~users/public/www/';
 			
 			$hostname =
-				RouterHostnameRule::create(':subdomain.example.com')->
+				\Onphp\RouterHostnameRule::create(':subdomain.example.com')->
 					setDefaults(
 						array(
 							'subdomain' => 'www'
@@ -1074,7 +1076,7 @@ public function testAssemblingWithHostnameAndTransparentWithBaseUrl()
 					);
 			
 			$transparent =
-				RouterTransparentRule::create('/company/:id')->
+				\Onphp\RouterTransparentRule::create('/company/:id')->
 					setRequirements(
 						array(
 							'id' => '\d+'
@@ -1082,12 +1084,12 @@ public function testAssemblingWithHostnameAndTransparentWithBaseUrl()
 					);
 			
 			$chain =
-				RouterChainRule::create()->
+				\Onphp\RouterChainRule::create()->
 				chain($hostname)->
 				chain($transparent);
 			
 			$this->router->setBaseUrl(
-				HttpUrl::create()->parse($base)
+				\Onphp\HttpUrl::create()->parse($base)
 			);
 			
 			$this->router->addRoute('chain', $chain);
@@ -1106,20 +1108,20 @@ public function testAssemblingWithHostnameAndTransparentWithBaseUrl()
 		
 		/**
 		 * @param string $url
-		 * @return HttpRequest
+		 * @return \Onphp\HttpRequest
 		**/
 		protected function buildRequest($url = null)
 		{
 			ServerVarUtils::build($_SERVER, $url);
 			
 			return
-				HttpRequest::create()->
+				\Onphp\HttpRequest::create()->
 				setServer($_SERVER);
 		}
 		
 		protected function buildIncorrectRequest()
 		{
-			return HttpRequest::create();
+			return \Onphp\HttpRequest::create();
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/test/main/Utils/Routers/RouterStaticRuleTest.class.php b/test/main/Utils/Routers/RouterStaticRuleTest.class.php
index fb4b9505d0..d5760d5430 100644
--- a/test/main/Utils/Routers/RouterStaticRuleTest.class.php
+++ b/test/main/Utils/Routers/RouterStaticRuleTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	class RouterStaticRuleTest extends TestCase
 	{
 		public function setUp()
@@ -10,7 +12,7 @@ public function setUp()
 		
 		public function testStaticMatch()
 		{
-			$route = new RouterStaticRule('users/all');
+			$route = new \Onphp\RouterStaticRule('users/all');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/all')
 			);
@@ -20,7 +22,7 @@ public function testStaticMatch()
 		
 		public function testStaticMatchFailure()
 		{
-			$route = new RouterStaticRule('archive/2006');
+			$route = new \Onphp\RouterStaticRule('archive/2006');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/all')
 			);
@@ -31,7 +33,7 @@ public function testStaticMatchFailure()
 		public function testStaticMatchWithDefaults()
 		{
 			$route =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'users/all'
 				)->
 				setDefaults(
@@ -52,7 +54,7 @@ public function testStaticMatchWithDefaults()
 		
 		public function testStaticUTFMatch()
 		{
-			$route = new RouterStaticRule('żółć');
+			$route = new \Onphp\RouterStaticRule('żółć');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/'.urlencode('żółć'))
 			);
@@ -62,7 +64,7 @@ public function testStaticUTFMatch()
 		
 		public function testRootRoute()
 		{
-			$route = new RouterStaticRule('/');
+			$route = new \Onphp\RouterStaticRule('/');
 			$values = $route->match($this->buildRequest('http://localhost/'));
 			
 			$this->assertSame(array(), $values);
@@ -70,7 +72,7 @@ public function testRootRoute()
 		
 		public function testAssembly()
 		{
-			$route = new RouterStaticRule('/about');
+			$route = new \Onphp\RouterStaticRule('/about');
 			$url = $route->assembly();
 			
 			$this->assertSame('about', $url);
@@ -79,7 +81,7 @@ public function testAssembly()
 		public function testGetDefaults()
 		{
 			$route =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'users/all'
 				)->
 				setDefaults(
@@ -99,7 +101,7 @@ public function testGetDefaults()
 		public function testGetDefault()
 		{
 			$route =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'users/all'
 				)->
 				setDefaults(
@@ -116,7 +118,7 @@ public function testGetDefault()
 		public function testGetInstance()
 		{
 			$route =
-				RouterStaticRule::create(
+				\Onphp\RouterStaticRule::create(
 					'users/all'
 				)->
 				setDefaults(
@@ -125,7 +127,7 @@ public function testGetInstance()
 					)
 				);
 			
-			$this->assertInstanceOf('RouterStaticRule', $route);
+			$this->assertInstanceOf('\Onphp\RouterStaticRule', $route);
 			
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/all')
@@ -139,7 +141,7 @@ protected function buildRequest($url)
 			ServerVarUtils::build($_SERVER, $url);
 			
 			return
-				HttpRequest::create()->
+				\Onphp\HttpRequest::create()->
 				setServer($_SERVER);
 		}
 	}
diff --git a/test/main/Utils/Routers/RouterTransparentRuleTest.class.php b/test/main/Utils/Routers/RouterTransparentRuleTest.class.php
index 66c0270b64..fa222e97d8 100644
--- a/test/main/Utils/Routers/RouterTransparentRuleTest.class.php
+++ b/test/main/Utils/Routers/RouterTransparentRuleTest.class.php
@@ -1,6 +1,8 @@
 <?php
 	/* $Id$ */
 	
+	namespace Onphp\Test;
+
 	class RouterTransparentRuleTest extends TestCase
 	{
 		public function setUp()
@@ -10,7 +12,7 @@ public function setUp()
 		
 		public function testStaticMatch()
 		{
-			$route = new RouterTransparentRule('users/all');
+			$route = new \Onphp\RouterTransparentRule('users/all');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/all')
 			);
@@ -20,7 +22,7 @@ public function testStaticMatch()
 		
 		public function testURLDecode()
 		{
-			$route = new RouterTransparentRule('żółć');
+			$route = new \Onphp\RouterTransparentRule('żółć');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/'.urlencode('żółć'))
 			);
@@ -30,7 +32,7 @@ public function testURLDecode()
 		
 		public function testStaticPathShorterThanParts()
 		{
-			$route = new RouterTransparentRule('users/a/martel');
+			$route = new \Onphp\RouterTransparentRule('users/a/martel');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/a')
 			);
@@ -40,7 +42,7 @@ public function testStaticPathShorterThanParts()
 		
 		public function testStaticPathLongerThanParts()
 		{
-			$route = new RouterTransparentRule('users/a');
+			$route = new \Onphp\RouterTransparentRule('users/a');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/a/martel')
 			);
@@ -51,7 +53,7 @@ public function testStaticPathLongerThanParts()
 		public function testStaticMatchWithDefaults()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'users/all'
 				)->
 				setDefaults(
@@ -69,7 +71,7 @@ public function testStaticMatchWithDefaults()
 		
 		public function testNotMatched()
 		{
-			$route = new RouterTransparentRule('users/all');
+			$route = new \Onphp\RouterTransparentRule('users/all');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/martel')
 			);
@@ -80,7 +82,7 @@ public function testNotMatched()
 		public function testNotMatchedWithVariablesAndDefaults()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action'
 				)->
 				setDefaults(
@@ -99,7 +101,7 @@ public function testNotMatchedWithVariablesAndDefaults()
 		
 		public function testNotMatchedWithVariablesAndStatic()
 		{
-			$route = new RouterTransparentRule('archive/:year/:month');
+			$route = new \Onphp\RouterTransparentRule('archive/:year/:month');
 			$values = $route->match(
 				$this->buildRequest('http://localhost/ctrl/act/2000')
 			);
@@ -110,7 +112,7 @@ public function testNotMatchedWithVariablesAndStatic()
 		public function testStaticMatchWithWildcard()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'news/view/*'
 				)->
 				setDefaults(
@@ -136,7 +138,7 @@ public function testStaticMatchWithWildcard()
 		public function testWildcardWithUTF()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'news/*'
 				)->
 				setDefaults(
@@ -164,7 +166,7 @@ public function testWildcardWithUTF()
 		public function testWildcardURLDecode()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'news/*'
 				)->
 				setDefaults(
@@ -187,7 +189,7 @@ public function testWildcardURLDecode()
 		
 		public function testVariableValues()
 		{
-			$route = new RouterTransparentRule(':area/:action/:year');
+			$route = new \Onphp\RouterTransparentRule(':area/:action/:year');
 			
 			$values = $route->match(
 				$this->buildRequest('http://localhost/ctrl/act/2000')
@@ -200,7 +202,7 @@ public function testVariableValues()
 		
 		public function testVariableUTFValues()
 		{
-			$route = new RouterTransparentRule('test/:param');
+			$route = new \Onphp\RouterTransparentRule('test/:param');
 			$values = $route->match(
 				$this->buildRequest(
 					'http://localhost/test/'.urlencode('aä')
@@ -213,7 +215,7 @@ public function testVariableUTFValues()
 		public function testOneVariableValue()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':action'
 				)->
 				setDefaults(
@@ -234,7 +236,7 @@ public function testOneVariableValue()
 		public function testVariablesWithDefault()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/:year'
 				)->
 				setDefaults(
@@ -255,7 +257,7 @@ public function testVariablesWithDefault()
 		public function testVariablesWithNullDefault()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/:year'
 				)->
 				setDefaults(
@@ -276,7 +278,7 @@ public function testVariablesWithNullDefault()
 		public function testVariablesWithDefaultAndValue()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/:year'
 				)->
 				setDefaults(
@@ -297,7 +299,7 @@ public function testVariablesWithDefaultAndValue()
 		public function testVariablesWithRequirementAndValue()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/:year'
 				)->
 				setRequirements(
@@ -318,7 +320,7 @@ public function testVariablesWithRequirementAndValue()
 		public function testVariablesWithRequirementAndIncorrectValue()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/:year'
 				)->
 				setRequirements(
@@ -337,7 +339,7 @@ public function testVariablesWithRequirementAndIncorrectValue()
 		public function testVariablesWithDefaultAndRequirement()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/:year'
 				)->
 				setDefaults(
@@ -363,7 +365,7 @@ public function testVariablesWithDefaultAndRequirement()
 		public function testVariablesWithDefaultAndRequirementAndIncorrectValue()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/:year'
 				)->
 				setDefaults(
@@ -387,7 +389,7 @@ public function testVariablesWithDefaultAndRequirementAndIncorrectValue()
 		public function testVariablesWithDefaultAndRequirementAndWithoutValue()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/:year'
 				)->
 				setDefaults(
@@ -412,7 +414,7 @@ public function testVariablesWithDefaultAndRequirementAndWithoutValue()
 		
 		public function testVariablesWithWildcardAndNumericKey()
 		{
-			$route = new RouterTransparentRule(':area/:action/:next/*');
+			$route = new \Onphp\RouterTransparentRule(':area/:action/:next/*');
 			$values = $route->match(
 				$this->buildRequest(
 					'http://localhost/c/a/next/2000/show/all/sort/name'
@@ -427,7 +429,7 @@ public function testVariablesWithWildcardAndNumericKey()
 		
 		public function testRootRoute()
 		{
-			$route = new RouterTransparentRule('/');
+			$route = new \Onphp\RouterTransparentRule('/');
 			$values = $route->match($this->buildRequest('http://localhost/'));
 			
 			$this->assertEquals(array(), $values);
@@ -435,7 +437,7 @@ public function testRootRoute()
 		
 		public function testAssembly()
 		{
-			$route = new RouterTransparentRule('authors/:name');
+			$route = new \Onphp\RouterTransparentRule('authors/:name');
 			$url = $route->assembly(array('name' => 'martel'));
 			
 			$this->assertEquals('authors/martel', $url);
@@ -443,11 +445,11 @@ public function testAssembly()
 		
 		public function testAssemblyWithoutValue()
 		{
-			$route = new RouterTransparentRule('authors/:name');
+			$route = new \Onphp\RouterTransparentRule('authors/:name');
 			
 			try {
 				$url = $route->assembly();
-			} catch (BaseException $e) {
+			} catch (\Onphp\BaseException $e) {
 				return true;
 			}
 			
@@ -457,7 +459,7 @@ public function testAssemblyWithoutValue()
 		public function testAssemblyWithDefault()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'authors/:name'
 				)->
 				setDefaults(
@@ -474,7 +476,7 @@ public function testAssemblyWithDefault()
 		public function testAssemblyWithDefaultAndValue()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'authors/:name'
 				)->
 				setDefaults(
@@ -490,7 +492,7 @@ public function testAssemblyWithDefaultAndValue()
 		
 		public function testAssemblyWithWildcardMap()
 		{
-			$route = new RouterTransparentRule('authors/:name/*');
+			$route = new \Onphp\RouterTransparentRule('authors/:name/*');
 			$url = $route->assembly(array('name' => 'martel'));
 			
 			$this->assertEquals('authors/martel', $url);
@@ -499,7 +501,7 @@ public function testAssemblyWithWildcardMap()
 		public function testAssemblyWithReset()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'archive/:year/*'
 				)->
 				setDefaults(
@@ -523,7 +525,7 @@ public function testAssemblyWithReset()
 		public function testAssemblyWithReset2()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/*'
 				)->
 				setDefaults(
@@ -545,7 +547,7 @@ public function testAssemblyWithReset2()
 		public function testAssemblyWithReset3()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'archive/:year/*'
 				)->
 				setDefaults(
@@ -570,7 +572,7 @@ public function testAssemblyWithReset3()
 		public function testAssemblyWithReset4()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/*'
 				)->
 				setDefaults(
@@ -592,7 +594,7 @@ public function testAssemblyWithReset4()
 		public function testAssemblyWithReset5()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'*'
 				)->
 				setDefaults(
@@ -615,7 +617,7 @@ public function testAssemblyWithReset5()
 		
 		public function testAssemblyWithWildcardAndAdditionalParameters()
 		{
-			$route = new RouterTransparentRule('authors/:name/*');
+			$route = new \Onphp\RouterTransparentRule('authors/:name/*');
 			
 			$url = $route->assembly(
 				array(
@@ -629,7 +631,7 @@ public function testAssemblyWithWildcardAndAdditionalParameters()
 		
 		public function testAssemblyWithUrlVariablesReuse()
 		{
-			$route = new RouterTransparentRule('archives/:year/:month');
+			$route = new \Onphp\RouterTransparentRule('archives/:year/:month');
 			
 			$values = $route->match(
 				$this->buildRequest('http://localhost/archives/2006/07')
@@ -645,7 +647,7 @@ public function testAssemblyWithUrlVariablesReuse()
 		public function testWildcardUrlVariablesOverwriting()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'archives/:year/:month/*'
 				)->
 				setDefaults(
@@ -671,7 +673,7 @@ public function testWildcardUrlVariablesOverwriting()
 		public function testGetDefaults()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'users/all'
 				)->
 				setDefaults(
@@ -691,7 +693,7 @@ public function testGetDefaults()
 		public function testGetDefault()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'users/all'
 				)->
 				setDefaults(
@@ -716,14 +718,14 @@ public function testCreateInstance()
 			);
 			
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					$routeConf['route']
 				)->
 				setDefaults(
 					$routeConf['defaults']
 				);
 			
-			$this->assertInstanceOf('RouterTransparentRule', $route);
+			$this->assertInstanceOf('\Onphp\RouterTransparentRule', $route);
 			
 			$values = $route->match(
 				$this->buildRequest('http://localhost/users/all')
@@ -735,7 +737,7 @@ public function testCreateInstance()
 		public function testAssemblyResetDefaults()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/*'
 				)->
 				setDefaults(
@@ -762,7 +764,7 @@ public function testAssemblyResetDefaults()
 		public function testAssemblyWithRemovedDefaults()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/*'
 				)->
 				setDefaults(
@@ -813,7 +815,7 @@ public function testAssemblyWithRemovedDefaults()
 		public function testAssemblyWithAction()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'families/:action/*'
 				)->
 				setDefaults(
@@ -838,7 +840,7 @@ public function testAssemblyWithAction()
 		public function testAssemlingWithDefaultValueAndParams()
 		{
 			$router =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					'contest/:contest/*'
 				)->
 				setDefaults(
@@ -870,7 +872,7 @@ public function testAssemlingWithDefaultValueAndParams()
 		public function testAssemblingTransparentDefaultLogic()
 		{
 			$transparent =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':bar/:area/:action'
 				)->
 				setDefaults(
@@ -912,7 +914,7 @@ public function testAssemblingTransparentDefaultLogic()
 		public function testEncode()
 		{
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/:action/*'
 				)->
 				setDefaults(
@@ -947,7 +949,7 @@ public function testEncode()
 			$this->assertEquals('en/foo/id/My+Other+Value', $url);
 			
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':area/*'
 				)->
 				setDefaults(
@@ -965,7 +967,7 @@ public function testPartialMatch()
 			$this->markTestSkipped('Route features not ready');
 			
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang/:temp'
 				)->
 				setDefaults(
@@ -988,7 +990,7 @@ public function testPartialMatch()
 			$this->assertFalse($values);
 			
 			$route =
-				RouterTransparentRule::create(
+				\Onphp\RouterTransparentRule::create(
 					':lang/:temp'
 				)->
 				setDefaults(
@@ -1014,7 +1016,7 @@ protected function buildRequest($url)
 			ServerVarUtils::build($_SERVER, $url);
 			
 			return
-				HttpRequest::create()->
+				\Onphp\HttpRequest::create()->
 				setServer($_SERVER);
 		}
 	}
diff --git a/test/main/Utils/SocketTest.class.php b/test/main/Utils/SocketTest.class.php
index 439e3f1271..e0328dd88d 100644
--- a/test/main/Utils/SocketTest.class.php
+++ b/test/main/Utils/SocketTest.class.php
@@ -1,15 +1,17 @@
 <?php
+	namespace Onphp\Test;
+
 	final class SocketTest extends TestCase
 	{
 		public function testShutdown()
 		{
-			Socket::create()->
+			\Onphp\Socket::create()->
 				setHost('localhost')->
 				setPort(80)->
 				close();
 			
 			$timedOutSocket =
-				Socket::create()->
+				\Onphp\Socket::create()->
 					setHost('google.com')->
 					setPort(80)->
 					setTimeout(1)->
diff --git a/test/main/Utils/TypesUtilsTest.class.php b/test/main/Utils/TypesUtilsTest.class.php
index f55209287c..1334828876 100644
--- a/test/main/Utils/TypesUtilsTest.class.php
+++ b/test/main/Utils/TypesUtilsTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class TypesUtilsTest extends TestCase
 	{
 		/**
@@ -6,7 +8,7 @@ final class TypesUtilsTest extends TestCase
 		**/
 		public function testSignedToUnsigned($signed, $unsigned)
 		{
-			$this->assertEquals(TypesUtils::signedToUnsigned($signed), $unsigned);
+			$this->assertEquals(\Onphp\TypesUtils::signedToUnsigned($signed), $unsigned);
 		}
 
 		/**
@@ -14,7 +16,7 @@ public function testSignedToUnsigned($signed, $unsigned)
 		**/
 		public function testUnsignedToSigned($signed, $unsigned)
 		{
-			$this->assertEquals($signed, TypesUtils::unsignedToSigned($unsigned));
+			$this->assertEquals($signed, \Onphp\TypesUtils::unsignedToSigned($unsigned));
 		}
 		
 		public static function integers()
diff --git a/test/main/Utils/UrlParamsUtilsTest.class.php b/test/main/Utils/UrlParamsUtilsTest.class.php
index 6b26231d62..f8914e7099 100644
--- a/test/main/Utils/UrlParamsUtilsTest.class.php
+++ b/test/main/Utils/UrlParamsUtilsTest.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	final class UrlParamsUtilsTest extends TestCase
 	{
 		public function testOneDeepLvl()
@@ -11,15 +13,15 @@ public function testOneDeepLvl()
 			
 			$this->assertEquals(
 				'a=1&c=%403&g[1]=1&g[0]=%5B0%5D',
-				UrlParamsUtils::toStringOneDeepLvl($scope)
+				\Onphp\UrlParamsUtils::toStringOneDeepLvl($scope)
 			);
 			
 			$scope['z'] = array('2' => array('8' => '8'));
 			
 			try {
-				UrlParamsUtils::toStringOneDeepLvl($scope);
+				\Onphp\UrlParamsUtils::toStringOneDeepLvl($scope);
 				$this->fail('expected exception');
-			} catch (BaseException $e) {
+			} catch (\Onphp\BaseException $e) {
 				$this->assertEquals(
 					'urlencode() expects parameter 1 to be string, array given',
 					$e->getMessage()
@@ -45,12 +47,12 @@ public function testAnyDeepLvl()
 					'fo[0][1]' => 'ba',
 					'fo[0][2]' => 'r',
 				),
-				UrlParamsUtils::toParamsList($scope)
+				\Onphp\UrlParamsUtils::toParamsList($scope)
 			);
 			
 			$this->assertEquals(
 				'foo[foo][foo]=%40bar&bar[%40bar][bar]=foo%5B%5D%D1%8F&fo[0][0]=o&fo[0][1]=ba&fo[0][2]=r',
-				UrlParamsUtils::toString($scope)
+				\Onphp\UrlParamsUtils::toString($scope)
 			);
 		}
 	}
diff --git a/test/main/Utils/WebMoneyUtilsTest.class.php b/test/main/Utils/WebMoneyUtilsTest.class.php
index a44c23f0a2..f0935698eb 100644
--- a/test/main/Utils/WebMoneyUtilsTest.class.php
+++ b/test/main/Utils/WebMoneyUtilsTest.class.php
@@ -1,5 +1,7 @@
 <?php
-	final class WebMoneyUtilsTest extends PHPUnit_Framework_TestCase
+	namespace Onphp\Test;
+
+	final class WebMoneyUtilsTest extends \PHPUnit_Framework_TestCase
 	{
 		/**
 		 * @dataProvider data
@@ -9,9 +11,9 @@ public function testHashValidation(
 		)
 		{
 			$this->{$assertFunction}(
-				WebMoneyUtils::isValidPayment(
+				\Onphp\WebMoneyUtils::isValidPayment(
 					$expectedHash,
-					WebMoneyUtils::makePaymentHash($secretKey, $data)
+					\Onphp\WebMoneyUtils::makePaymentHash($secretKey, $data)
 				)
 			);
 		}
diff --git a/test/main/ViewTest.class.php b/test/main/ViewTest.class.php
index 052cc0a355..d67b1903e6 100644
--- a/test/main/ViewTest.class.php
+++ b/test/main/ViewTest.class.php
@@ -9,13 +9,15 @@
  *                                                                         *
  ***************************************************************************/
 
+	namespace Onphp\Test;
+
 	final class ViewTest extends TestCase
 	{
 		protected static $resolver;
 
 		public static function setUpBeforeClass()
 		{
-			self::$resolver = new PhpViewResolver(ONPHP_TEST_PATH.'main/data/views/', EXT_TPL);
+			self::$resolver = new \Onphp\PhpViewResolver(ONPHP_TEST_PATH.'main/data/views/', EXT_TPL);
 		}
 
 		public static function tearDownAfterClass()
@@ -28,7 +30,7 @@ public function testToString()
 			$renderView = self::$resolver->resolveViewName('testView');
 			$toStringView = self::$resolver->resolveViewName('testViewToString');
 
-			$model = Model::create();
+			$model = \Onphp\Model::create();
 
 			$this->assertTrue(
 				$toStringView->toString($model) == $renderView->toString($model)
diff --git a/test/main/data/curlTest/curlTest.php b/test/main/data/curlTest/curlTest.php
index 8137edf6fb..c56f9b211d 100644
--- a/test/main/data/curlTest/curlTest.php
+++ b/test/main/data/curlTest/curlTest.php
@@ -1,12 +1,14 @@
 <?php
 
+namespace Onphp\Test;
+
 try {
 	$files = array();
 	foreach ($_FILES as $fileName => $value) {
 		if (isset($value['tmp_name']))
 			$files[$fileName] = file_get_contents($value['tmp_name']);
 	}
-	var_dump($_GET, $_POST, $files, file_get_contents('php://input'));
-} catch (Exception $e) {
+	print_r([$_GET, $_POST, $files, file_get_contents('php://input')]);
+} catch (\Exception $e) {
 	var_dump(get_class($e), $e->getMessage(), $e->getCode(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
 }
\ No newline at end of file
diff --git a/test/main/data/namespace/MyNS/Class1.class.php b/test/main/data/namespace/MyNS/Class1.cass.php
similarity index 100%
rename from test/main/data/namespace/MyNS/Class1.class.php
rename to test/main/data/namespace/MyNS/Class1.cass.php
diff --git a/test/main/data/namespace/MyNS/Sub/Class2.class.php b/test/main/data/namespace/MyNS/Sub/Class2.cass.php
similarity index 100%
rename from test/main/data/namespace/MyNS/Sub/Class2.class.php
rename to test/main/data/namespace/MyNS/Sub/Class2.cass.php
diff --git a/test/main/data/namespace/onPHP/MyForm.class.php b/test/main/data/namespace/onPHP/MyForm.cass.php
similarity index 100%
rename from test/main/data/namespace/onPHP/MyForm.class.php
rename to test/main/data/namespace/onPHP/MyForm.cass.php
diff --git a/test/main/data/namespace/onPHP/Sub/MyFormSub.class.php b/test/main/data/namespace/onPHP/Sub/MyFormSub.cass.php
similarity index 100%
rename from test/main/data/namespace/onPHP/Sub/MyFormSub.class.php
rename to test/main/data/namespace/onPHP/Sub/MyFormSub.cass.php
diff --git a/test/main/data/namespace/onPHP/Sub/MyFormSup.clazz.php b/test/main/data/namespace/onPHP/Sub/MyFormSup.cazz.php
similarity index 100%
rename from test/main/data/namespace/onPHP/Sub/MyFormSup.clazz.php
rename to test/main/data/namespace/onPHP/Sub/MyFormSup.cazz.php
diff --git a/test/main/data/namespace/onPHP/Up/MyFormUp.class.php b/test/main/data/namespace/onPHP/Up/MyFormUp.cass.php
similarity index 100%
rename from test/main/data/namespace/onPHP/Up/MyFormUp.class.php
rename to test/main/data/namespace/onPHP/Up/MyFormUp.cass.php
diff --git a/test/main/data/namespace_ul/Under/Class.class.php b/test/main/data/namespace_ul/Under/Class.cass.php
similarity index 100%
rename from test/main/data/namespace_ul/Under/Class.class.php
rename to test/main/data/namespace_ul/Under/Class.cass.php
diff --git a/test/main/data/urls/parser.dump b/test/main/data/urls/parser.dump
index 0b1ffbc452..73e65caf0e 100644
--- a/test/main/data/urls/parser.dump
+++ b/test/main/data/urls/parser.dump
@@ -1,5 +1,5 @@
-a:44:{s:12:"http://ya.ru";s:325:"url: http://ya.ru
-class: HttpUrl
+a:44:{s:12:"http://ya.ru";s:331:"url: http://ya.ru
+class: Onphp\HttpUrl
 toString(): http://ya.ru
 getSchemeSpecificPart(): //ya.ru
 getScheme(): http
@@ -16,8 +16,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:11:"/etc/passwd";s:332:"url: /etc/passwd
-class: GenericUri
+";s:11:"/etc/passwd";s:338:"url: /etc/passwd
+class: Onphp\GenericUri
 toString(): /etc/passwd
 getSchemeSpecificPart(): /etc/passwd
 getScheme(): 
@@ -34,8 +34,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:12:"file:///etc/";s:321:"url: file:///etc/
-class: Url
+";s:12:"file:///etc/";s:327:"url: file:///etc/
+class: Onphp\Url
 toString(): file:///etc/
 getSchemeSpecificPart(): ///etc/
 getScheme(): file
@@ -52,8 +52,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:9:"http:/uri";s:320:"url: http:/uri
-class: HttpUrl
+";s:9:"http:/uri";s:326:"url: http:/uri
+class: Onphp\HttpUrl
 toString(): http:/uri
 getSchemeSpecificPart(): http:/uri
 getScheme(): 
@@ -70,8 +70,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:8:"http:uri";s:316:"url: http:uri
-class: HttpUrl
+";s:8:"http:uri";s:322:"url: http:uri
+class: Onphp\HttpUrl
 toString(): http:uri
 getSchemeSpecificPart(): http:uri
 getScheme(): 
@@ -88,8 +88,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:22:"mailto://localhost.com";s:360:"url: mailto://localhost.com
-class: Urn
+";s:22:"mailto://localhost.com";s:366:"url: mailto://localhost.com
+class: Onphp\Urn
 toString(): mailto://localhost.com
 getSchemeSpecificPart(): //localhost.com
 getScheme(): mailto
@@ -106,8 +106,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:23:"mailto://spam@localhost";s:364:"url: mailto://spam@localhost
-class: Urn
+";s:23:"mailto://spam@localhost";s:370:"url: mailto://spam@localhost
+class: Onphp\Urn
 toString(): mailto://spam@localhost
 getSchemeSpecificPart(): //spam@localhost
 getScheme(): mailto
@@ -124,8 +124,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:37:"mailto://cuckoo@localhost.com:boo.com";s:420:"url: mailto://cuckoo@localhost.com:boo.com
-class: Urn
+";s:37:"mailto://cuckoo@localhost.com:boo.com";s:426:"url: mailto://cuckoo@localhost.com:boo.com
+class: Onphp\Urn
 toString(): mailto://cuckoo@localhost.com:boo.com
 getSchemeSpecificPart(): //cuckoo@localhost.com:boo.com
 getScheme(): mailto
@@ -142,8 +142,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:37:"mailto://cuckoo:localhost.com@boo.com";s:420:"url: mailto://cuckoo:localhost.com@boo.com
-class: Urn
+";s:37:"mailto://cuckoo:localhost.com@boo.com";s:426:"url: mailto://cuckoo:localhost.com@boo.com
+class: Onphp\Urn
 toString(): mailto://cuckoo:localhost.com@boo.com
 getSchemeSpecificPart(): //cuckoo:localhost.com@boo.com
 getScheme(): mailto
@@ -160,8 +160,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:18:"//samba/de/janeiro";s:358:"url: //samba/de/janeiro
-class: GenericUri
+";s:18:"//samba/de/janeiro";s:364:"url: //samba/de/janeiro
+class: Onphp\GenericUri
 toString(): //samba/de/janeiro
 getSchemeSpecificPart(): //samba/de/janeiro
 getScheme(): 
@@ -178,8 +178,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:64:"ftp://cnn.example.com&story=breaking_news@10.0.0.1/top_story.htm";s:529:"url: ftp://cnn.example.com&story=breaking_news@10.0.0.1/top_story.htm
-class: Url
+";s:64:"ftp://cnn.example.com&story=breaking_news@10.0.0.1/top_story.htm";s:535:"url: ftp://cnn.example.com&story=breaking_news@10.0.0.1/top_story.htm
+class: Onphp\Url
 toString(): ftp://cnn.example.com&story=breaking_news@10.0.0.1/top_story.htm
 getSchemeSpecificPart(): //cnn.example.com&story=breaking_news@10.0.0.1/top_story.htm
 getScheme(): ftp
@@ -196,8 +196,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:18:"http://a/b/c/d;p?q";s:348:"url: http://a/b/c/d;p?q
-class: HttpUrl
+";s:18:"http://a/b/c/d;p?q";s:354:"url: http://a/b/c/d;p?q
+class: Onphp\HttpUrl
 toString(): http://a/b/c/d;p?q
 getSchemeSpecificPart(): //a/b/c/d;p?q
 getScheme(): http
@@ -214,8 +214,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:7:"g;x?y#s";s:314:"url: g;x?y#s
-class: GenericUri
+";s:7:"g;x?y#s";s:320:"url: g;x?y#s
+class: Onphp\GenericUri
 toString(): g;x?y#s
 getSchemeSpecificPart(): g;x?y#s
 getScheme(): 
@@ -232,8 +232,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:0:"";s:288:"url: 
-class: GenericUri
+";s:0:"";s:294:"url: 
+class: Onphp\GenericUri
 toString(): 
 getSchemeSpecificPart(): 
 getScheme(): 
@@ -250,8 +250,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:13:"../../../../g";s:340:"url: ../../../../g
-class: GenericUri
+";s:13:"../../../../g";s:346:"url: ../../../../g
+class: Onphp\GenericUri
 toString(): ../../../../g
 getSchemeSpecificPart(): ../../../../g
 getScheme(): 
@@ -268,8 +268,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:19:"tel:+1-816-555-1212";s:352:"url: tel:+1-816-555-1212
-class: Urn
+";s:19:"tel:+1-816-555-1212";s:358:"url: tel:+1-816-555-1212
+class: Onphp\Urn
 toString(): tel:+1-816-555-1212
 getSchemeSpecificPart(): +1-816-555-1212
 getScheme(): tel
@@ -286,8 +286,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:23:"telnet://192.0.2.16:80/";s:362:"url: telnet://192.0.2.16:80/
-class: Url
+";s:23:"telnet://192.0.2.16:80/";s:368:"url: telnet://192.0.2.16:80/
+class: Onphp\Url
 toString(): telnet://192.0.2.16:80/
 getSchemeSpecificPart(): //192.0.2.16:80/
 getScheme(): telnet
@@ -304,8 +304,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:51:"urn:oasis:names:specification:docbook:dtd:xml:4.1.2";s:480:"url: urn:oasis:names:specification:docbook:dtd:xml:4.1.2
-class: Urn
+";s:51:"urn:oasis:names:specification:docbook:dtd:xml:4.1.2";s:486:"url: urn:oasis:names:specification:docbook:dtd:xml:4.1.2
+class: Onphp\Urn
 toString(): urn:oasis:names:specification:docbook:dtd:xml:4.1.2
 getSchemeSpecificPart(): oasis:names:specification:docbook:dtd:xml:4.1.2
 getScheme(): urn
@@ -322,8 +322,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:42:"ldap://[2001:db8::7]/c=GB?objectClass?one]";s:446:"url: ldap://[2001:db8::7]/c=GB?objectClass?one]
-class: GenericUri
+";s:42:"ldap://[2001:db8::7]/c=GB?objectClass?one]";s:452:"url: ldap://[2001:db8::7]/c=GB?objectClass?one]
+class: Onphp\GenericUri
 toString(): ldap://[2001:db8::7]/c=GB?objectClass?one]
 getSchemeSpecificPart(): //[2001:db8::7]/c=GB?objectClass?one]
 getScheme(): ldap
@@ -340,8 +340,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 
 isValidFragment(): 1
-";s:27:"mailto:John.Doe@example.com";s:381:"url: mailto:John.Doe@example.com
-class: Urn
+";s:27:"mailto:John.Doe@example.com";s:387:"url: mailto:John.Doe@example.com
+class: Onphp\Urn
 toString(): mailto:John.Doe@example.com
 getSchemeSpecificPart(): John.Doe@example.com
 getScheme(): mailto
@@ -358,8 +358,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:36:"http://[1080:0:0:0:8:800:200C:417A]/";s:421:"url: http://[1080:0:0:0:8:800:200C:417A]/
-class: HttpUrl
+";s:36:"http://[1080:0:0:0:8:800:200C:417A]/";s:427:"url: http://[1080:0:0:0:8:800:200C:417A]/
+class: Onphp\HttpUrl
 toString(): http://[1080:0:0:0:8:800:200C:417A]/
 getSchemeSpecificPart(): //[1080:0:0:0:8:800:200C:417A]/
 getScheme(): http
@@ -376,8 +376,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:31:"http://[1080::8:800:200C:417A]/";s:401:"url: http://[1080::8:800:200C:417A]/
-class: HttpUrl
+";s:31:"http://[1080::8:800:200C:417A]/";s:407:"url: http://[1080::8:800:200C:417A]/
+class: Onphp\HttpUrl
 toString(): http://[1080::8:800:200C:417A]/
 getSchemeSpecificPart(): //[1080::8:800:200C:417A]/
 getScheme(): http
@@ -394,8 +394,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:29:"http://[::FFFF:129.144.52.38]";s:393:"url: http://[::FFFF:129.144.52.38]
-class: HttpUrl
+";s:29:"http://[::FFFF:129.144.52.38]";s:399:"url: http://[::FFFF:129.144.52.38]
+class: Onphp\HttpUrl
 toString(): http://[::FFFF:129.144.52.38]
 getSchemeSpecificPart(): //[::FFFF:129.144.52.38]
 getScheme(): http
@@ -412,8 +412,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:24:"http://[::129.144.52.38]";s:373:"url: http://[::129.144.52.38]
-class: HttpUrl
+";s:24:"http://[::129.144.52.38]";s:379:"url: http://[::129.144.52.38]
+class: Onphp\HttpUrl
 toString(): http://[::129.144.52.38]
 getSchemeSpecificPart(): //[::129.144.52.38]
 getScheme(): http
@@ -430,8 +430,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:21:"http://[::FFFF:1.1.1]";s:360:"url: http://[::FFFF:1.1.1]
-class: HttpUrl
+";s:21:"http://[::FFFF:1.1.1]";s:366:"url: http://[::FFFF:1.1.1]
+class: Onphp\HttpUrl
 toString(): http://[::FFFF:1.1.1]
 getSchemeSpecificPart(): //[::FFFF:1.1.1]
 getScheme(): http
@@ -448,8 +448,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:19:"http://[::FFFF:1.1]";s:352:"url: http://[::FFFF:1.1]
-class: HttpUrl
+";s:19:"http://[::FFFF:1.1]";s:358:"url: http://[::FFFF:1.1]
+class: Onphp\HttpUrl
 toString(): http://[::FFFF:1.1]
 getSchemeSpecificPart(): //[::FFFF:1.1]
 getScheme(): http
@@ -466,8 +466,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:19:"http://[::66.66.66]";s:352:"url: http://[::66.66.66]
-class: HttpUrl
+";s:19:"http://[::66.66.66]";s:358:"url: http://[::66.66.66]
+class: Onphp\HttpUrl
 toString(): http://[::66.66.66]
 getSchemeSpecificPart(): //[::66.66.66]
 getScheme(): http
@@ -484,8 +484,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:14:"http://[::5.5]";s:332:"url: http://[::5.5]
-class: HttpUrl
+";s:14:"http://[::5.5]";s:338:"url: http://[::5.5]
+class: Onphp\HttpUrl
 toString(): http://[::5.5]
 getSchemeSpecificPart(): //[::5.5]
 getScheme(): http
@@ -502,8 +502,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:18:"http://[::FFFF:10]";s:349:"url: http://[::FFFF:10]
-class: HttpUrl
+";s:18:"http://[::FFFF:10]";s:355:"url: http://[::FFFF:10]
+class: Onphp\HttpUrl
 toString(): http://[::FFFF:10]
 getSchemeSpecificPart(): //[::FFFF:10]
 getScheme(): http
@@ -520,8 +520,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:20:"http://[192.168.0.1]";s:356:"url: http://[192.168.0.1]
-class: HttpUrl
+";s:20:"http://[192.168.0.1]";s:362:"url: http://[192.168.0.1]
+class: Onphp\HttpUrl
 toString(): http://[192.168.0.1]
 getSchemeSpecificPart(): //[192.168.0.1]
 getScheme(): http
@@ -538,8 +538,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:19:"http://266.66.66.66";s:352:"url: http://266.66.66.66
-class: HttpUrl
+";s:19:"http://266.66.66.66";s:358:"url: http://266.66.66.66
+class: Onphp\HttpUrl
 toString(): http://266.66.66.66
 getSchemeSpecificPart(): //266.66.66.66
 getScheme(): http
@@ -556,8 +556,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:43:"mailto:"George, Ted" <Shared@Group.Arpanet>";s:444:"url: mailto:"George, Ted" <Shared@Group.Arpanet>
-class: Urn
+";s:43:"mailto:"George, Ted" <Shared@Group.Arpanet>";s:450:"url: mailto:"George, Ted" <Shared@Group.Arpanet>
+class: Onphp\Urn
 toString(): mailto:"George, Ted" <Shared@Group.Arpanet>
 getSchemeSpecificPart(): "George, Ted" <Shared@Group.Arpanet>
 getScheme(): mailto
@@ -574,8 +574,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:55:"mailto:%22George,%20Ted%22%20%3CShared@Group.Arpanet%3E";s:493:"url: mailto:%22George,%20Ted%22%20%3CShared@Group.Arpanet%3E
-class: Urn
+";s:55:"mailto:%22George,%20Ted%22%20%3CShared@Group.Arpanet%3E";s:499:"url: mailto:%22George,%20Ted%22%20%3CShared@Group.Arpanet%3E
+class: Onphp\Urn
 toString(): mailto:%22George,%20Ted%22%20%3CShared@Group.Arpanet%3E
 getSchemeSpecificPart(): %22George,%20Ted%22%20%3CShared@Group.Arpanet%3E
 getScheme(): mailto
@@ -592,8 +592,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:102:"mailto:astark1@unl.edu,ASTARK1@UNL.EDU?subject=MailTo Comments&cc=ASTARK1@UNL.EDU&bcc=id@internet.node";s:679:"url: mailto:astark1@unl.edu,ASTARK1@UNL.EDU?subject=MailTo Comments&cc=ASTARK1@UNL.EDU&bcc=id@internet.node
-class: Urn
+";s:102:"mailto:astark1@unl.edu,ASTARK1@UNL.EDU?subject=MailTo Comments&cc=ASTARK1@UNL.EDU&bcc=id@internet.node";s:685:"url: mailto:astark1@unl.edu,ASTARK1@UNL.EDU?subject=MailTo Comments&cc=ASTARK1@UNL.EDU&bcc=id@internet.node
+class: Onphp\Urn
 toString(): mailto:astark1@unl.edu,ASTARK1@UNL.EDU?subject=MailTo Comments&cc=ASTARK1@UNL.EDU&bcc=id@internet.node
 getSchemeSpecificPart(): astark1@unl.edu,ASTARK1@UNL.EDU?subject=MailTo Comments&cc=ASTARK1@UNL.EDU&bcc=id@internet.node
 getScheme(): mailto
@@ -610,8 +610,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 
 isValidFragment(): 1
-";s:8:"//ya0.ru";s:318:"url: //ya0.ru
-class: GenericUri
+";s:8:"//ya0.ru";s:324:"url: //ya0.ru
+class: Onphp\GenericUri
 toString(): //ya0.ru
 getSchemeSpecificPart(): //ya0.ru
 getScheme(): 
@@ -628,8 +628,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:11:"//yandex.ru";s:324:"url: //yandex.ru
-class: Url
+";s:11:"//yandex.ru";s:330:"url: //yandex.ru
+class: Onphp\Url
 toString(): //yandex.ru
 getSchemeSpecificPart(): //yandex.ru
 getScheme(): 
@@ -646,8 +646,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:14:"//yandex.ru:80";s:336:"url: //yandex.ru:80
-class: Url
+";s:14:"//yandex.ru:80";s:342:"url: //yandex.ru:80
+class: Onphp\Url
 toString(): //yandex.ru:80
 getSchemeSpecificPart(): //yandex.ru:80
 getScheme(): 
@@ -664,8 +664,8 @@ isValidPort(): 1
 isValidPath(): 
 isValidQuery(): 1
 isValidFragment(): 1
-";s:6:"ya1.ru";s:312:"url: ya1.ru
-class: GenericUri
+";s:6:"ya1.ru";s:318:"url: ya1.ru
+class: Onphp\GenericUri
 toString(): ya1.ru
 getSchemeSpecificPart(): ya1.ru
 getScheme(): 
@@ -682,8 +682,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:6:"ya2.ru";s:305:"url: ya2.ru
-class: Url
+";s:6:"ya2.ru";s:311:"url: ya2.ru
+class: Onphp\Url
 toString(): ya2.ru
 getSchemeSpecificPart(): ya2.ru
 getScheme(): 
@@ -700,8 +700,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:6:"ya3.ru";s:325:"url: ya3.ru
-class: HttpUrl
+";s:6:"ya3.ru";s:331:"url: ya3.ru
+class: Onphp\HttpUrl
 toString(): http://ya3.ru/
 getSchemeSpecificPart(): //ya3.ru/
 getScheme(): http
@@ -718,8 +718,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:11:"http:ya4.ru";s:330:"url: http:ya4.ru
-class: HttpUrl
+";s:11:"http:ya4.ru";s:336:"url: http:ya4.ru
+class: Onphp\HttpUrl
 toString(): http://ya4.ru/
 getSchemeSpecificPart(): //ya4.ru/
 getScheme(): http
@@ -736,8 +736,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:12:"http:/ya5.ru";s:331:"url: http:/ya5.ru
-class: HttpUrl
+";s:12:"http:/ya5.ru";s:337:"url: http:/ya5.ru
+class: Onphp\HttpUrl
 toString(): http://ya5.ru/
 getSchemeSpecificPart(): //ya5.ru/
 getScheme(): http
@@ -754,8 +754,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:14:"http:///ya6.ru";s:333:"url: http:///ya6.ru
-class: HttpUrl
+";s:14:"http:///ya6.ru";s:339:"url: http:///ya6.ru
+class: Onphp\HttpUrl
 toString(): http://ya6.ru/
 getSchemeSpecificPart(): //ya6.ru/
 getScheme(): http
@@ -772,8 +772,8 @@ isValidPort(): 1
 isValidPath(): 1
 isValidQuery(): 1
 isValidFragment(): 1
-";s:16:"hTTP://onphp.org";s:341:"url: hTTP://onphp.org
-class: HttpUrl
+";s:16:"hTTP://onphp.org";s:347:"url: hTTP://onphp.org
+class: Onphp\HttpUrl
 toString(): hTTP://onphp.org
 getSchemeSpecificPart(): //onphp.org
 getScheme(): hTTP
diff --git a/test/meta/config.meta.xml b/test/meta/config.meta.xml
index ba98dc7840..928cacf958 100644
--- a/test/meta/config.meta.xml
+++ b/test/meta/config.meta.xml
@@ -3,14 +3,14 @@
 
 <!-- $Id$ -->
 
-<metaconfiguration><classes>
+<metaconfiguration><classes namespace="Onphp\Test\">
 
 	<class name="Credentials" type="final">
 		<properties>
 			<property name="nickname" type="String" size="255" required="true" />
 			<property name="password" type="FixedLengthString" size="40" required="true" />
 		</properties>
-		
+
 		<pattern name="ValueObject" />
 	</class>
 
@@ -18,39 +18,39 @@
 		<properties>
 			<identifier type="Integer" />
 		</properties>
-		
+
 		<pattern name="SpookedClass" />
 	</class>
-	
+
 	<class name="TestTree" extends="NamedTree">
 		<properties />
 		<pattern name="StraightMapping" />
 	</class>
-	
+
 	<class name="TestRange" extends="DateRange">
 		<properties>
 			<identifier />
-			
+
 			<property name="start" type="Date" required="true" />
-			
+
 			<property name="description" type="String" required="false" />
 		</properties>
-		
+
 		<pattern name="StraightMapping" />
 	</class>
 
 	<class name="TestCity" type="final" table="custom_table">
 		<properties>
 			<identifier />
-			
+
 			<property name="name" type="String" size="50" required="true" />
 			<property name="capital" type="Boolean" required="true" default="false" />
 			<property name="large" type="Boolean" required="false" />
 		</properties>
-		
+
 		<pattern name="DictionaryClass" fetch="cascade" />
 	</class>
-	
+
 	<class name="TestEncapsulant">
 		<properties>
 			<identifier />
@@ -63,30 +63,30 @@
 	<class name="TestUser" type="final">
 		<properties>
 			<identifier />
-			
+
 			<property name="credentials" type="Credentials" required="true" relation="OneToOne" />
-			
+
 			<property name="lastLogin" type="Timestamp" required="true" column="very_custom_field_name" />
 			<property name="registered" type="Timestamp" required="true" />
 			<property name="strangeTime" type="Time" required="false" />
-			
+
 			<property name="city" type="TestCity" relation="OneToOne" required="true" />
-			
+
 			<property name="firstOptional" type="TestCity" relation="OneToOne" required="false" />
 			<property name="secondOptional" type="TestCity" relation="OneToOne" required="false" />
 			<property name="parts" type="TestPart" relation="OneToMany" />
 			<property name="encapsulants" type="TestEncapsulant" relation="ManyToMany" />
-			
+
 			<property name="url" type="HttpUrl" size="256" required="false" />
 			<property name="properties" type="Hstore" required="false" />
-			
+
 			<property name="ip" type="IpAddress" required="false" />
-			
+
 		</properties>
-		
+
 		<pattern name="StraightMapping" />
 	</class>
-	
+
 	<class name="TestPart">
 		<properties>
 			<identifier />
@@ -95,7 +95,7 @@
 		</properties>
 		<pattern name="DictionaryClass" />
 	</class>
-	
+
 	<class name="TestBinaryStuff">
 		<properties>
 			<identifier type="String" size="40" />
@@ -103,7 +103,7 @@
 		</properties>
 		<pattern name="StraightMapping" />
 	</class>
-	
+
 	<class name="TestItem" type="final">
 		<properties>
 			<identifier />
@@ -112,17 +112,17 @@
 		</properties>
 		<pattern name="DictionaryClass" />
 	</class>
-	
+
 	<class name="TestSubItem" type="final">
 		<properties>
 			<identifier />
 			<property name="item" type="TestItem" relation="OneToOne" required="true" column="test_item_id" />
-			<property name="encapsulant" type="TestEncapsulant" relation="OneToOne" required="true" />
+			<property name="encapsulant" type="TestEncapsulant" relation="OneToOne" required="true" fetch="lazy" />
 			<property name="name" type="String" size="50" required="true" />
 		</properties>
 		<pattern name="DictionaryClass" />
 	</class>
-	
+
 	<class name="TestParentObject" type="final">
 		<properties>
 			<identifier />
@@ -130,7 +130,7 @@
 		</properties>
 		<pattern name="DictionaryClass" />
 	</class>
-	
+
 	<class name="TestChildObject" type="final">
 		<properties>
 			<identifier />
@@ -146,21 +146,21 @@
 		</properties>
 		<pattern name="DictionaryClass" />
 	</class>
-	
-	<class name="ImageType" type="final">
+
+	<class name="ImageType" type="final" namespace="Onphp" >
 		<properties>
 			<identifier />
 		</properties>
 		<pattern name="SpookedEnumeration" />
 	</class>
 
-	<class name="MimeType" type="final">
+	<class name="MimeType" type="final" namespace="Onphp" >
 		<properties>
 			<identifier />
 		</properties>
 		<pattern name="SpookedEnum" />
 	</class>
-	
+
 	<class name="TestLazy" type="final">
 		<properties>
 			<identifier />
@@ -171,7 +171,7 @@
 		</properties>
 		<pattern name="StraightMapping" />
 	</class>
-	
+
 	<class name="TestObject" type="final">
 		<properties>
 				<identifier />
@@ -180,7 +180,7 @@
 		</properties>
 		<pattern name="StraightMapping" />
 	</class>
-	
+
 	<class name="TestType" type="final">
 		<properties>
 				<identifier />
@@ -221,7 +221,7 @@
 		<properties>
 			<identifier />
 			<property name="name" type="String" size="255" required="true" />
-			<property name="surname" type="String" size="255" />			
+			<property name="surname" type="String" size="255" />
 			<property name="contacts" type="TestContactValue" relation="OneToOne" required="true" />
 		</properties>
 
@@ -247,7 +247,7 @@
 
 		<pattern name="StraightMapping" />
 	</class>
-	
+
 	<class name="TestInternetProvider" type="final">
 		<properties>
 			<identifier />
diff --git a/test/misc/DBTestCreator.class.php b/test/misc/DBTestCreator.class.php
index c3550c0bb8..a2ffabcef7 100644
--- a/test/misc/DBTestCreator.class.php
+++ b/test/misc/DBTestCreator.class.php
@@ -1,17 +1,19 @@
 <?php
+	namespace Onphp\Test;
+
 	class DBTestCreator
 	{
 		/**
-		 * @var DBSchema
+		 * @var \Onphp\DBSchema
 		 */
 		private $schema = null;
 		/**
-		 * @var DBTestPool
+		 * @var \Onphp\Test\DBTestPool
 		 */
 		private $pool = null;
 		
 		/**
-		 * @return DBTestCreator
+		 * @return \Onphp\Test\DBTestCreator
 		 */
 		public static function create()
 		{
@@ -20,20 +22,20 @@ public static function create()
 		
 		/**
 		 * @param string $path
-		 * @return DBTestCreator
+		 * @return \Onphp\Test\DBTestCreator
 		 */
 		public function setSchemaPath($path)
 		{
 			require $path;
-			Assert::isTrue(isset($schema));
-			Assert::isInstance($schema, 'DBSchema');
+			\Onphp\Assert::isTrue(isset($schema));
+			\Onphp\Assert::isInstance($schema, '\Onphp\DBSchema');
 			$this->schema = $schema;
 			return $this;
 		}
 		
 		/**
-		 * @param DBTestPool $testPool
-		 * @return DBTestCreator
+		 * @param \Onphp\Test\DBTestPool $testPool
+		 * @return \Onphp\Test\DBTestCreator
 		 */
 		public function setTestPool(DBTestPool $testPool) {
 			$this->pool = $testPool;
@@ -41,7 +43,7 @@ public function setTestPool(DBTestPool $testPool) {
 		}
 		
 		/**
-		 * @return DBTestCreator
+		 * @return \Onphp\Test\DBTestCreator
 		 */
 		public function createDB() {
 			/**
@@ -53,8 +55,8 @@ public function createDB() {
 				getColumnByName('root_id')->
 				dropReference();
 			
-			foreach ($this->pool->getPool() as $name => $db) {
-				foreach ($this->schema->getTables() as $name => $table) {
+			foreach ($this->pool->iterator() as $db) {
+				foreach ($this->schema->getTables() as $table) {
 					$db->queryRaw($table->toDialectString($db->getDialect()));
 				}
 			}
@@ -64,21 +66,21 @@ public function createDB() {
 		
 		/**
 		 * @param bool $clean
-		 * @return DBTestCreator
-		 * @throws DatabaseException
+		 * @return \Onphp\Test\DBTestCreator
+		 * @throws \Onphp\DatabaseException
 		 */
 		public function dropDB($clean = false)
 		{
-			foreach ($this->pool->getPool() as $name => $db) {
-				/* @var $db DB */
+			foreach ($this->pool->iterator() as $db) {
+				/* @var $db \Onphp\DB */
 				foreach ($this->schema->getTableNames() as $name) {
 					try {
 						$db->queryRaw(
-							OSQL::dropTable($name, true)->toDialectString(
+							\Onphp\OSQL::dropTable($name, true)->toDialectString(
 								$db->getDialect()
 							)
 						);
-					} catch (DatabaseException $e) {
+					} catch (\Onphp\DatabaseException $e) {
 						if (!$clean)
 							throw $e;
 					}
@@ -91,7 +93,7 @@ public function dropDB($clean = false)
 							try {
 								if ($column->isAutoincrement())
 									$db->queryRaw("DROP SEQUENCE {$name}_id;");
-							} catch (DatabaseException $e) {
+							} catch (\Onphp\DatabaseException $e) {
 								if (!$clean)
 									throw $e;
 							}
@@ -104,8 +106,8 @@ public function dropDB($clean = false)
 		}
 		
 		/**
-		 * @param TestCase $test
-		 * @return DBTestCreator
+		 * @param \Onphp\Test\TestCase $test
+		 * @return \Onphp\Test\DBTestCreator
 		 */
 		public function fillDB(TestCase $test = null)
 		{
@@ -126,10 +128,10 @@ public function fillDB(TestCase $test = null)
 					setPassword(sha1('mysqler'))
 				)->
 				setLastLogin(
-					Timestamp::create(time())
+					\Onphp\Timestamp::create(time())
 				)->
 				setRegistered(
-					Timestamp::create(time())->modify('-1 day')
+					\Onphp\Timestamp::create(time())->modify('-1 day')
 				);
 			
 			$postgreser = clone $mysqler;
@@ -141,7 +143,7 @@ public function fillDB(TestCase $test = null)
 					setPassword(sha1('postgreser'))
 				)->
 				setCity($piter)->
-				setUrl(HttpUrl::create()->parse('http://postgresql.org/'));
+				setUrl(\Onphp\HttpUrl::create()->parse('http://postgresql.org/'));
 			
 			$piter = TestCity::dao()->add($piter);
 			$moscow = TestCity::dao()->add($moscow);
@@ -181,11 +183,11 @@ public function fillDB(TestCase $test = null)
 				TestUser::dao()->getById(1);
 				TestUser::dao()->getById(2);
 				
-				if ($test instanceof DBDataTest) {
+				if ($test instanceof TestCaseDAO) {
 					$test->getListByIdsTest();
 				}
 				
-				Cache::me()->clean();
+				\Onphp\Cache::me()->clean();
 				
 				$test->assertTrue(
 					($postgreser == TestUser::dao()->getById(1))
@@ -209,13 +211,13 @@ public function fillDB(TestCase $test = null)
 				try {
 					TestUser::dao()->getById(1);
 					$test->fail();
-				} catch (ObjectNotFoundException $e) {
+				} catch (\Onphp\ObjectNotFoundException $e) {
 					/* pass */
 				}
 				
 				$result =
-					Criteria::create(TestUser::dao())->
-					add(Expression::eq(1, 2))->
+					\Onphp\Criteria::create(TestUser::dao())->
+					add(\Onphp\Expression::eq(1, 2))->
 					getResult();
 				
 				$test->assertEquals($result->getCount(), 0);
@@ -225,7 +227,7 @@ public function fillDB(TestCase $test = null)
 			TestUser::dao()->import($firstClone);
 			TestUser::dao()->import($secondClone);
 			
-			if ($test && $test instanceof DBDataTest) {
+			if ($test && $test instanceof TestCaseDAO) {
 				// cache multi-get
 				$test->getListByIdsTest();
 				$test->getListByIdsTest();
diff --git a/test/misc/DBTestIterator.class.php b/test/misc/DBTestIterator.class.php
new file mode 100644
index 0000000000..ac12a16ee7
--- /dev/null
+++ b/test/misc/DBTestIterator.class.php
@@ -0,0 +1,23 @@
+<?php
+
+	namespace Onphp\Test;
+
+	use Onphp\DB;
+	use Onphp\DBPool;
+
+	class DBTestIterator extends \ArrayIterator
+	{
+		public function __construct($array = array(), $flags = 0)
+		{
+			parent::__construct($array, $flags);
+		}
+
+		public function current()
+		{
+			$db = parent::current();
+			if ($db instanceof DB) {
+				DBPool::me()->setDefault($db);
+			}
+			return $db;
+		}
+	}
\ No newline at end of file
diff --git a/test/misc/DBTestPool.class.php b/test/misc/DBTestPool.class.php
index c020b60cb1..082740abb1 100644
--- a/test/misc/DBTestPool.class.php
+++ b/test/misc/DBTestPool.class.php
@@ -1,22 +1,24 @@
 <?php
-	final class DBTestPool extends Singleton implements Instantiatable
+	namespace Onphp\Test;
+
+	final class DBTestPool extends \Onphp\Singleton implements \Onphp\Instantiatable
 	{
 		private $pool = array();
 		
 		/**
-		 * @return DBTestPool
+		 * @return \Onphp\Test\DBTestPool
 		 */
 		public static function me()
 		{
-			return Singleton::getInstance(__CLASS__);
+			return \Onphp\Singleton::getInstance(__CLASS__);
 		}
 		
 		protected function __construct(array $dbs = array())
 		{
-			Assert::isArray($dbs);
-			
+			\Onphp\Assert::isArray($dbs);
+
 			foreach ($dbs as $connector => $credentials) {
-				$this->pool[$connector] = DB::spawn(
+				$this->pool[$connector] = \Onphp\DB::spawn(
 					$connector,
 					$credentials['user'],
 					$credentials['pass'],
@@ -38,10 +40,16 @@ public function connect($persistent = false)
 				$connector->setPersistent($persistent)->connect();
 			}
 		}
-		
-		public function getPool()
+
+		/**
+		 * @return \Iterator
+		 */
+		public function iterator()
 		{
-			return $this->pool;
+			if (empty($this->pool)) {
+				throw new \PHPUnit_Framework_AssertionFailedError("for tests requires");
+			}
+			return new DBTestIterator($this->pool);
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/test/misc/ServerVarUtils.class.php b/test/misc/ServerVarUtils.class.php
index 321ea1ab68..6e7a231a0b 100644
--- a/test/misc/ServerVarUtils.class.php
+++ b/test/misc/ServerVarUtils.class.php
@@ -1,7 +1,9 @@
 <?php
 	/** $Id$ **/
 
-	class ServerVarUtils extends StaticFactory
+	namespace Onphp\Test;
+
+	class ServerVarUtils extends \Onphp\StaticFactory
 	{
 		public static function build(&$serverVars, $url)
 		{
diff --git a/test/misc/Spook.class.php b/test/misc/Spook.class.php
index b59bd24718..9d0f175dcd 100644
--- a/test/misc/Spook.class.php
+++ b/test/misc/Spook.class.php
@@ -1,4 +1,6 @@
 <?php
 	// provide fake spooked class
-	class Spook extends IdentifiableObject {/*_*/}
+	namespace Onphp\Test;
+
+	class Spook extends \Onphp\IdentifiableObject {/*_*/}
 ?>
\ No newline at end of file
diff --git a/test/misc/TestCase.class.php b/test/misc/TestCase.class.php
index 66cf2a6ca0..92537aa9ec 100644
--- a/test/misc/TestCase.class.php
+++ b/test/misc/TestCase.class.php
@@ -1,7 +1,9 @@
 <?php
 	/* $Id$ */
 	
-	abstract class TestCase extends PHPUnit_Framework_TestCase
+	namespace Onphp\Test;
+
+	abstract class TestCase extends \PHPUnit_Framework_TestCase
 	{
 		protected $backupGlobals = false;
 	}
diff --git a/test/misc/TestCaseDAO.class.php b/test/misc/TestCaseDAO.class.php
index 0b9160ee9b..2bd9d58c1a 100644
--- a/test/misc/TestCaseDAO.class.php
+++ b/test/misc/TestCaseDAO.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	abstract class TestCaseDAO extends TestCaseDB
 	{
 		public function setUp()
diff --git a/test/misc/TestCaseDB.class.php b/test/misc/TestCaseDB.class.php
index 064a88c364..2d3511e47b 100644
--- a/test/misc/TestCaseDB.class.php
+++ b/test/misc/TestCaseDB.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	abstract class TestCaseDB extends TestCase
 	{
 		private $dBCreator = null;
@@ -17,7 +19,7 @@ public function tearDown() {
 		}
 		
 		/**
-		 * @return DBTestCreator
+		 * @return \Onphp\Test\DBTestCreator
 		 */
 		protected function getDBCreator() {
 			return $this->dBCreator;
@@ -25,11 +27,11 @@ protected function getDBCreator() {
 		
 		/**
 		 * @param type $type
-		 * @return DB
+		 * @return \Onphp\DB
 		 */
 		protected function getDbByType($type) {
-			foreach (DBTestPool::me()->getPool() as $db) {
-				if (get_class($db) == $type)
+			foreach (DBTestPool::me()->iterator() as $db) {
+				if (\Onphp\ClassUtils::normalClassName($db) == $type)
 					return $db;
 			}
 			
diff --git a/test/misc/TestSuite.class.php b/test/misc/TestSuite.class.php
index 54b4b28095..39a2c4e68d 100644
--- a/test/misc/TestSuite.class.php
+++ b/test/misc/TestSuite.class.php
@@ -1,13 +1,15 @@
 <?php
-	final class TestSuite extends PHPUnit_Framework_TestSuite
+	namespace Onphp\Test;
+
+	final class TestSuite extends \PHPUnit_Framework_TestSuite
 	{
 		public function setUp()
 		{
 			if (AllTests::$workers) {
 				$worker = array_pop(AllTests::$workers);
 				echo "\nProcessing with {$worker}\n";
-				Cache::dropWorkers();
-				Cache::setDefaultWorker($worker);
+				\Onphp\Cache::dropWorkers();
+				\Onphp\Cache::setDefaultWorker($worker);
 			} else {
 				$this->markTestSuiteSkipped('No more workers available.');
 			}
diff --git a/test/misc/TestTables.class.php b/test/misc/TestTables.class.php
index ba3cd96a2f..66ca9e5962 100644
--- a/test/misc/TestTables.class.php
+++ b/test/misc/TestTables.class.php
@@ -1,4 +1,6 @@
 <?php
+	namespace Onphp\Test;
+
 	abstract class TestTables extends TestCase
 	{
 		protected $schema = null;
@@ -7,20 +9,20 @@ public function __construct()
 		{
 			require ONPHP_META_AUTO_DIR.'schema.php';
 			
-			Assert::isTrue(isset($schema));
+			\Onphp\Assert::isTrue(isset($schema));
 			
 			$this->schema = $schema;
 			
 			// in case of unclean shutdown of previous tests
-			foreach (DBTestPool::me()->getPool() as $name => $db) {
+			foreach (DBTestPool::me()->iterator() as $db) {
 				foreach ($this->schema->getTableNames() as $name) {
 					try {
 						$db->queryRaw(
-							OSQL::dropTable($name, true)->toDialectString(
+							\Onphp\OSQL::dropTable($name, true)->toDialectString(
 								$db->getDialect()
 							)
 						);
-					} catch (DatabaseException $e) {
+					} catch (\Onphp\DatabaseException $e) {
 						// ok
 					}
 					
@@ -33,7 +35,7 @@ public function __construct()
 							try {
 								if ($column->isAutoincrement())
 									$db->queryRaw("DROP SEQUENCE {$name}_id;");
-							} catch (DatabaseException $e) {
+							} catch (\Onphp\DatabaseException $e) {
 								// ok
 							}
 						}
@@ -44,10 +46,8 @@ public function __construct()
 		
 		public function create()
 		{
-			$pool = DBTestPool::me()->getPool();
-			
-			foreach ($pool as $name => $db) {
-				foreach ($this->schema->getTables() as $name => $table) {
+			foreach (DBTestPool::me()->iterator() as $db) {
+				foreach ($this->schema->getTables() as $table) {
 					$db->queryRaw($table->toDialectString($db->getDialect()));
 				}
 			}
@@ -57,12 +57,10 @@ public function create()
 		
 		public function drop()
 		{
-			$pool = DBTestPool::me()->getPool();
-			
-			foreach ($pool as $name => $db) {
+			foreach (DBTestPool::me()->iterator() as $db) {
 				foreach ($this->schema->getTableNames() as $name) {
 					$db->queryRaw(
-						OSQL::dropTable($name, true)->toDialectString(
+						\Onphp\OSQL::dropTable($name, true)->toDialectString(
 							$db->getDialect()
 						)
 					);
@@ -84,8 +82,10 @@ public function drop()
 
 		protected function setUp()
 		{
-			if (!DBTestPool::me()->getPool())
-				$this->markTestSkipped('haven\'t connected database pool');
+			foreach (DBTestPool::me()->iterator() as $db) {
+				return;
+			}
+			$this->markTestSkipped('haven\'t connected database pool');
 		}
 	}
 ?>
\ No newline at end of file
diff --git a/test/runme.sh b/test/runme.sh
index b3224506df..036b9cf352 100755
--- a/test/runme.sh
+++ b/test/runme.sh
@@ -3,7 +3,7 @@ cd `dirname $0`
 
 if [ "$*" = '' ]
 then
-	ARGS='--repeat 9 AllTests'
+	ARGS='--repeat 10 AllTests'
 else
 	ARGS="$*"
 fi
