Removing _assign_to_models and _assign_libraries from model related code in favor of __get().
diff --git a/system/core/Loader.php b/system/core/Loader.php
index e297061..2324eca 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -109,8 +109,6 @@
 		{
 			$this->_ci_load_class($library, $params, $object_name);
 		}
-
-		$this->_ci_assign_to_models();
 	}
 
 	// --------------------------------------------------------------------
@@ -182,7 +180,9 @@
 			if ($db_conn !== FALSE AND ! class_exists('CI_DB'))
 			{
 				if ($db_conn === TRUE)
+				{
 					$db_conn = '';
+				}
 
 				$CI->load->database($db_conn, FALSE, TRUE);
 			}
@@ -197,7 +197,6 @@
 			$model = ucfirst($model);
 
 			$CI->$name = new $model();
-			$CI->$name->_assign_libraries();
 
 			$this->_ci_models[] = $name;
 			return;
@@ -242,9 +241,6 @@
 
 		// Load the DB class
 		$CI->db =& DB($params, $active_record);
-
-		// Assign the DB object to any existing models
-		$this->_ci_assign_to_models();
 	}
 
 	// --------------------------------------------------------------------
@@ -273,8 +269,6 @@
 		$class = 'CI_DB_'.$CI->db->dbdriver.'_utility';
 
 		$CI->dbutil =& instantiate_class(new $class());
-
-		$CI->load->_ci_assign_to_models();
 	}
 
 	// --------------------------------------------------------------------
@@ -299,8 +293,6 @@
 		$class = 'CI_DB_'.$CI->db->dbdriver.'_forge';
 
 		$CI->dbforge = new $class();
-
-		$CI->load->_ci_assign_to_models();
 	}
 
 	// --------------------------------------------------------------------
@@ -1005,33 +997,6 @@
 		{
 			$this->model($autoload['model']);
 		}
-
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Assign to Models
-	 *
-	 * Makes sure that anything loaded by the loader class (libraries, etc.)
-	 * will be available to models, if any exist.
-	 *
-	 * @access	private
-	 * @param	object
-	 * @return	array
-	 */
-	function _ci_assign_to_models()
-	{
-		if (count($this->_ci_models) == 0)
-		{
-			return;
-		}
-
-		foreach($this->_ci_models as $model)
-		{
-			$model = $this->_ci_get_component($model);
-			$model->_assign_libraries();
-		}
 	}
 
 	// --------------------------------------------------------------------
diff --git a/system/core/Model.php b/system/core/Model.php
index ebbb0fb..f6098d0 100644
--- a/system/core/Model.php
+++ b/system/core/Model.php
@@ -26,57 +26,29 @@
  */
 class CI_Model {
 
-	var $_parent_name = '';
-
 	/**
 	 * Constructor
 	 *
 	 * @access public
 	 */
-	function CI_Model()
+	function __construct()
 	{
-		// If the magic __get() or __set() methods are used in a Model references can't be used.
-		$this->_assign_libraries( (method_exists($this, '__get') OR method_exists($this, '__set')) ? FALSE : TRUE );
-
-		// We don't want to assign the model object to itself when using the
-		// assign_libraries function below so we'll grab the name of the model parent
-		$this->_parent_name = ucfirst(get_class($this));
-
 		log_message('debug', "Model Class Initialized");
 	}
 
 	/**
-	 * Assign Libraries
+	 * __get
 	 *
-	 * Creates local references to all currently instantiated objects
-	 * so that any syntax that can be legally used in a controller
-	 * can be used within models.
+	 * Allows models to access CI's loaded classes using the same
+	 * syntax as controllers.
 	 *
 	 * @access private
 	 */
-	function _assign_libraries($use_reference = TRUE)
+	function __get($key)
 	{
 		$CI =& get_instance();
-		foreach (array_keys(get_object_vars($CI)) as $key)
-		{
-			if ( ! isset($this->$key) AND $key != $this->_parent_name)
-			{
-				// In some cases using references can cause
-				// problems so we'll conditionally use them
-				if ($use_reference == TRUE)
-				{
-					// Needed to prevent reference errors with some configurations
-					$this->$key = '';
-					$this->$key =& $CI->$key;
-				}
-				else
-				{
-					$this->$key = $CI->$key;
-				}
-			}
-		}
+		return $CI->$key;
 	}
-
 }
 // END Model Class