Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into patch
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 92187fa..2935822 100755
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -25,8 +25,6 @@
  * @filesource
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * System Initialization File
  *
@@ -230,6 +228,13 @@
 	// Load the base controller class
 	require BASEPATH.'core/Controller.php';
 
+	/**
+	 * Reference to the CI_Controller method.
+	 *
+	 * Returns current CI instance object
+	 *
+	 * @return object
+	 */
 	function &get_instance()
 	{
 		return CI_Controller::get_instance();
diff --git a/system/core/Common.php b/system/core/Common.php
index aeb784b..075b221 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -39,17 +39,18 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Determines if the current version of PHP is greater then the supplied value
- *
- * Since there are a few places where we conditionally test for PHP > 5
- * we'll set a static variable.
- *
- * @param	string
- * @return	bool	TRUE if the current version is $version or higher
- */
+
 if ( ! function_exists('is_php'))
 {
+	/**
+	 * Determines if the current version of PHP is greater then the supplied value
+	 *
+	 * Since there are a few places where we conditionally test for PHP > 5
+	 * we'll set a static variable.
+	 *
+	 * @param	string
+	 * @return	bool	TRUE if the current version is $version or higher
+	 */
 	function is_php($version = '5.0.0')
 	{
 		static $_is_php;
@@ -66,18 +67,18 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Tests for file writability
- *
- * is_writable() returns TRUE on Windows servers when you really can't write to
- * the file, based on the read-only attribute. is_writable() is also unreliable
- * on Unix servers if safe_mode is on.
- *
- * @param	string
- * @return	void
- */
 if ( ! function_exists('is_really_writable'))
 {
+	/**
+	 * Tests for file writability
+	 *
+	 * is_writable() returns TRUE on Windows servers when you really can't write to
+	 * the file, based on the read-only attribute. is_writable() is also unreliable
+	 * on Unix servers if safe_mode is on.
+	 *
+	 * @param	string
+	 * @return	void
+	 */
 	function is_really_writable($file)
 	{
 		// If we're on a Unix server with safe_mode off we call is_writable
@@ -114,20 +115,20 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Class registry
- *
- * This function acts as a singleton. If the requested class does not
- * exist it is instantiated and set to a static variable. If it has
- * previously been instantiated the variable is returned.
- *
- * @param	string	the class name being requested
- * @param	string	the directory where the class should be found
- * @param	string	the class name prefix
- * @return	object
- */
 if ( ! function_exists('load_class'))
 {
+	/**
+	 * Class registry
+	 *
+	 * This function acts as a singleton. If the requested class does not
+	 * exist it is instantiated and set to a static variable. If it has
+	 * previously been instantiated the variable is returned.
+	 *
+	 * @param	string	the class name being requested
+	 * @param	string	the directory where the class should be found
+	 * @param	string	the class name prefix
+	 * @return	object
+	 */
 	function &load_class($class, $directory = 'libraries', $prefix = 'CI_')
 	{
 		static $_classes = array();
@@ -187,15 +188,15 @@
 
 // --------------------------------------------------------------------
 
-/**
- * Keeps track of which libraries have been loaded. This function is
- * called by the load_class() function above
- *
- * @param	string
- * @return	array
- */
 if ( ! function_exists('is_loaded'))
 {
+	/**
+	 * Keeps track of which libraries have been loaded. This function is
+	 * called by the load_class() function above
+	 *
+	 * @param	string
+	 * @return	array
+	 */
 	function &is_loaded($class = '')
 	{
 		static $_is_loaded = array();
@@ -211,17 +212,17 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Loads the main config.php file
- *
- * This function lets us grab the config file even if the Config class
- * hasn't been instantiated yet
- *
- * @param	array
- * @return	array
- */
 if ( ! function_exists('get_config'))
 {
+	/**
+	 * Loads the main config.php file
+	 *
+	 * This function lets us grab the config file even if the Config class
+	 * hasn't been instantiated yet
+	 *
+	 * @param	array
+	 * @return	array
+	 */
 	function &get_config($replace = array())
 	{
 		static $_config;
@@ -271,14 +272,14 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Returns the specified config item
- *
- * @param	string
- * @return	mixed
- */
 if ( ! function_exists('config_item'))
 {
+	/**
+	 * Returns the specified config item
+	 *
+	 * @param	string
+	 * @return	mixed
+	 */
 	function config_item($item)
 	{
 		static $_config_item = array();
@@ -300,22 +301,22 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Error Handler
- *
- * This function lets us invoke the exception class and
- * display errors using the standard error template located
- * in application/errors/errors.php
- * This function will send the error page directly to the
- * browser and exit.
- *
- * @param	string
- * @param	int
- * @param	string
- * @return	void
- */
 if ( ! function_exists('show_error'))
 {
+	/**
+	 * Error Handler
+	 *
+	 * This function lets us invoke the exception class and
+	 * display errors using the standard error template located
+	 * in application/errors/errors.php
+	 * This function will send the error page directly to the
+	 * browser and exit.
+	 *
+	 * @param	string
+	 * @param	int
+	 * @param	string
+	 * @return	void
+	 */
 	function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered')
 	{
 		$_error =& load_class('Exceptions', 'core');
@@ -326,19 +327,19 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * 404 Page Handler
- *
- * This function is similar to the show_error() function above
- * However, instead of the standard error template it displays
- * 404 errors.
- *
- * @param	string
- * @param	bool
- * @return	void
- */
 if ( ! function_exists('show_404'))
 {
+	/**
+	 * 404 Page Handler
+	 *
+	 * This function is similar to the show_error() function above
+	 * However, instead of the standard error template it displays
+	 * 404 errors.
+	 *
+	 * @param	string
+	 * @param	bool
+	 * @return	void
+	 */
 	function show_404($page = '', $log_error = TRUE)
 	{
 		$_error =& load_class('Exceptions', 'core');
@@ -349,19 +350,19 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Error Logging Interface
- *
- * We use this as a simple mechanism to access the logging
- * class and send messages to be logged.
- *
- * @param	string
- * @param	string
- * @param	bool
- * @return	void
- */
 if ( ! function_exists('log_message'))
 {
+	/**
+	 * Error Logging Interface
+	 *
+	 * We use this as a simple mechanism to access the logging
+	 * class and send messages to be logged.
+	 *
+	 * @param	string
+	 * @param	string
+	 * @param	bool
+	 * @return	void
+	 */
 	function log_message($level = 'error', $message, $php_error = FALSE)
 	{
 		static $_log;
@@ -378,59 +379,59 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Set HTTP Status Header
- *
- * @param	int	the status code
- * @param	string
- * @return	void
- */
 if ( ! function_exists('set_status_header'))
 {
+	/**
+	 * Set HTTP Status Header
+	 *
+	 * @param	int	the status code
+	 * @param	string
+	 * @return	void
+	 */
 	function set_status_header($code = 200, $text = '')
 	{
 		$stati = array(
-					200	=> 'OK',
-					201	=> 'Created',
-					202	=> 'Accepted',
-					203	=> 'Non-Authoritative Information',
-					204	=> 'No Content',
-					205	=> 'Reset Content',
-					206	=> 'Partial Content',
+			200	=> 'OK',
+			201	=> 'Created',
+			202	=> 'Accepted',
+			203	=> 'Non-Authoritative Information',
+			204	=> 'No Content',
+			205	=> 'Reset Content',
+			206	=> 'Partial Content',
 
-					300	=> 'Multiple Choices',
-					301	=> 'Moved Permanently',
-					302	=> 'Found',
-					304	=> 'Not Modified',
-					305	=> 'Use Proxy',
-					307	=> 'Temporary Redirect',
+			300	=> 'Multiple Choices',
+			301	=> 'Moved Permanently',
+			302	=> 'Found',
+			304	=> 'Not Modified',
+			305	=> 'Use Proxy',
+			307	=> 'Temporary Redirect',
 
-					400	=> 'Bad Request',
-					401	=> 'Unauthorized',
-					403	=> 'Forbidden',
-					404	=> 'Not Found',
-					405	=> 'Method Not Allowed',
-					406	=> 'Not Acceptable',
-					407	=> 'Proxy Authentication Required',
-					408	=> 'Request Timeout',
-					409	=> 'Conflict',
-					410	=> 'Gone',
-					411	=> 'Length Required',
-					412	=> 'Precondition Failed',
-					413	=> 'Request Entity Too Large',
-					414	=> 'Request-URI Too Long',
-					415	=> 'Unsupported Media Type',
-					416	=> 'Requested Range Not Satisfiable',
-					417	=> 'Expectation Failed',
-					422	=> 'Unprocessable Entity',
+			400	=> 'Bad Request',
+			401	=> 'Unauthorized',
+			403	=> 'Forbidden',
+			404	=> 'Not Found',
+			405	=> 'Method Not Allowed',
+			406	=> 'Not Acceptable',
+			407	=> 'Proxy Authentication Required',
+			408	=> 'Request Timeout',
+			409	=> 'Conflict',
+			410	=> 'Gone',
+			411	=> 'Length Required',
+			412	=> 'Precondition Failed',
+			413	=> 'Request Entity Too Large',
+			414	=> 'Request-URI Too Long',
+			415	=> 'Unsupported Media Type',
+			416	=> 'Requested Range Not Satisfiable',
+			417	=> 'Expectation Failed',
+			422	=> 'Unprocessable Entity',
 
-					500	=> 'Internal Server Error',
-					501	=> 'Not Implemented',
-					502	=> 'Bad Gateway',
-					503	=> 'Service Unavailable',
-					504	=> 'Gateway Timeout',
-					505	=> 'HTTP Version Not Supported'
-			);
+			500	=> 'Internal Server Error',
+			501	=> 'Not Implemented',
+			502	=> 'Bad Gateway',
+			503	=> 'Service Unavailable',
+			504	=> 'Gateway Timeout',
+			505	=> 'HTTP Version Not Supported'
+		);
 
 		if ($code == '' OR ! is_numeric($code))
 		{
@@ -466,25 +467,25 @@
 
 // --------------------------------------------------------------------
 
-/**
- * Exception Handler
- *
- * This is the custom exception handler that is declaired at the top
- * of Codeigniter.php. The main reason we use this is to permit
- * PHP errors to be logged in our own log files since the user may
- * not have access to server logs. Since this function
- * effectively intercepts PHP errors, however, we also need
- * to display errors based on the current error_reporting level.
- * We do that with the use of a PHP error template.
- *
- * @param	int
- * @param	string
- * @param	string
- * @param	int
- * @return	void
- */
 if ( ! function_exists('_exception_handler'))
 {
+	/**
+	 * Exception Handler
+	 *
+	 * This is the custom exception handler that is declaired at the top
+	 * of Codeigniter.php. The main reason we use this is to permit
+	 * PHP errors to be logged in our own log files since the user may
+	 * not have access to server logs. Since this function
+	 * effectively intercepts PHP errors, however, we also need
+	 * to display errors based on the current error_reporting level.
+	 * We do that with the use of a PHP error template.
+	 *
+	 * @param	int
+	 * @param	string
+	 * @param	string
+	 * @param	int
+	 * @return	void
+	 */
 	function _exception_handler($severity, $message, $filepath, $line)
 	{
 		 // We don't bother with "strict" notices since they tend to fill up
@@ -518,18 +519,18 @@
 
 // --------------------------------------------------------------------
 
-/**
- * Remove Invisible Characters
- *
- * This prevents sandwiching null characters
- * between ascii characters, like Java\0script.
- *
- * @param	string
- * @param	bool
- * @return	string
- */
 if ( ! function_exists('remove_invisible_characters'))
 {
+	/**
+	 * Remove Invisible Characters
+	 *
+	 * This prevents sandwiching null characters
+	 * between ascii characters, like Java\0script.
+	 *
+	 * @param	string
+	 * @param	bool
+	 * @return	string
+	 */
 	function remove_invisible_characters($str, $url_encoded = TRUE)
 	{
 		$non_displayables = array();
@@ -556,14 +557,14 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Returns HTML escaped variable
- *
- * @param	mixed
- * @return	mixed
- */
 if ( ! function_exists('html_escape'))
 {
+	/**
+	 * Returns HTML escaped variable
+	 *
+	 * @param	mixed
+	 * @return	mixed
+	 */
 	function html_escape($var)
 	{
 		return is_array($var)
diff --git a/system/core/Config.php b/system/core/Config.php
index 91826bd..fc61834 100755
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -46,12 +46,14 @@
 	 * @var array
 	 */
 	public $config = array();
+	
 	/**
 	 * List of all loaded config files
 	 *
 	 * @var array
 	 */
 	public $is_loaded = array();
+	
 	/**
 	 * List of paths to search when trying to load a config file.
 	 * This must be public as it's used by the Loader class.
@@ -188,7 +190,6 @@
 	/**
 	 * Fetch a config file item
 	 *
-	 *
 	 * @param	string	the config item name
 	 * @param	string	the index name
 	 * @param	bool
@@ -354,4 +355,4 @@
 }
 
 /* End of file Config.php */
-/* Location: ./system/core/Config.php */
+/* Location: ./system/core/Config.php */
\ No newline at end of file
diff --git a/system/core/Controller.php b/system/core/Controller.php
index 05e1bf5..0c6c471 100644
--- a/system/core/Controller.php
+++ b/system/core/Controller.php
@@ -25,8 +25,6 @@
  * @filesource
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * CodeIgniter Application Controller Class
  *
@@ -41,8 +39,16 @@
  */
 class CI_Controller {
 
+	/**
+	 * Reference to the global CI instance
+	 *
+	 * @var object
+	 */
 	private static $instance;
 
+	/**
+	 * Set up controller properties and methods
+	 */
 	public function __construct()
 	{
 		self::$instance =& $this;
@@ -60,6 +66,11 @@
 		log_message('debug', 'Controller Class Initialized');
 	}
 
+	/**
+	 * Return the CI object 
+	 *
+	 * @return object
+	 */
 	public static function &get_instance()
 	{
 		return self::$instance;
@@ -67,4 +78,4 @@
 }
 
 /* End of file Controller.php */
-/* Location: ./system/core/Controller.php */
+/* Location: ./system/core/Controller.php */
\ No newline at end of file
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index f36b315..f55f9fc 100755
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -36,12 +36,6 @@
  */
 class CI_Exceptions {
 
-	public $action;
-	public $severity;
-	public $message;
-	public $filename;
-	public $line;
-
 	/**
 	 * Nesting level of the output buffering mechanism
 	 *
@@ -55,20 +49,23 @@
 	 * @var array
 	 */
 	public $levels = array(
-				E_ERROR			=>	'Error',
-				E_WARNING		=>	'Warning',
-				E_PARSE			=>	'Parsing Error',
-				E_NOTICE		=>	'Notice',
-				E_CORE_ERROR		=>	'Core Error',
-				E_CORE_WARNING		=>	'Core Warning',
-				E_COMPILE_ERROR		=>	'Compile Error',
-				E_COMPILE_WARNING	=>	'Compile Warning',
-				E_USER_ERROR		=>	'User Error',
-				E_USER_WARNING		=>	'User Warning',
-				E_USER_NOTICE		=>	'User Notice',
-				E_STRICT		=>	'Runtime Notice'
-			);
+		E_ERROR			=>	'Error',
+		E_WARNING		=>	'Warning',
+		E_PARSE			=>	'Parsing Error',
+		E_NOTICE		=>	'Notice',
+		E_CORE_ERROR		=>	'Core Error',
+		E_CORE_WARNING		=>	'Core Warning',
+		E_COMPILE_ERROR		=>	'Compile Error',
+		E_COMPILE_WARNING	=>	'Compile Warning',
+		E_USER_ERROR		=>	'User Error',
+		E_USER_WARNING		=>	'User Warning',
+		E_USER_NOTICE		=>	'User Notice',
+		E_STRICT		=>	'Runtime Notice'
+	);
 
+	/**
+	 * Initialize execption class
+	 */
 	public function __construct()
 	{
 		$this->ob_level = ob_get_level();
diff --git a/system/core/Hooks.php b/system/core/Hooks.php
index 68e30ef..672fe29 100755
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -43,13 +43,15 @@
 	 *
 	 * @var bool
 	 */
-	public $enabled		= FALSE;
+	public $enabled = FALSE;
+	
 	/**
 	 * List of all hooks set in config/hooks.php
 	 *
 	 * @var array
 	 */
-	public $hooks		= array();
+	public $hooks = array();
+	
 	/**
 	 * Determines wether hook is in progress, used to prevent infinte loops
 	 *
diff --git a/system/core/Input.php b/system/core/Input.php
index 6e68859..7ee8f36 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -43,45 +43,51 @@
 	 *
 	 * @var string
 	 */
-	public $ip_address				= FALSE;
+	public $ip_address = FALSE;
+	
 	/**
 	 * user agent (web browser) being used by the current user
 	 *
 	 * @var string
 	 */
-	public $user_agent				= FALSE;
+	public $user_agent = FALSE;
+	
 	/**
 	 * If FALSE, then $_GET will be set to an empty array
 	 *
 	 * @var bool
 	 */
-	protected $_allow_get_array		= TRUE;
+	protected $_allow_get_array = TRUE;
+	
 	/**
 	 * If TRUE, then newlines are standardized
 	 *
 	 * @var bool
 	 */
-	protected $_standardize_newlines	= TRUE;
+	protected $_standardize_newlines = TRUE;
+	
 	/**
 	 * Determines whether the XSS filter is always active when GET, POST or COOKIE data is encountered
 	 * Set automatically based on config setting
 	 *
 	 * @var bool
 	 */
-	protected $_enable_xss			= FALSE;
+	protected $_enable_xss = FALSE;
+	
 	/**
 	 * Enables a CSRF cookie token to be set.
 	 * Set automatically based on config setting
 	 *
 	 * @var bool
 	 */
-	protected $_enable_csrf			= FALSE;
+	protected $_enable_csrf = FALSE;
+	
 	/**
 	 * List of all HTTP request headers
 	 *
 	 * @var array
 	 */
-	protected $headers			= array();
+	protected $headers = array();
 
 	/**
 	 * Constructor
@@ -141,12 +147,12 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Fetch an item from the GET array
-	*
-	* @param	string
-	* @param	bool
-	* @return	string
-	*/
+	 * Fetch an item from the GET array
+	 *
+	 * @param	string
+	 * @param	bool
+	 * @return	string
+	 */
 	public function get($index = NULL, $xss_clean = FALSE)
 	{
 		// Check if a field has been provided
@@ -168,12 +174,12 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Fetch an item from the POST array
-	*
-	* @param	string
-	* @param	bool
-	* @return	string
-	*/
+	 * Fetch an item from the POST array
+	 *
+	 * @param	string
+	 * @param	bool
+	 * @return	string
+	 */
 	public function post($index = NULL, $xss_clean = FALSE)
 	{
 		// Check if a field has been provided
@@ -196,12 +202,12 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Fetch an item from either the GET array or the POST
-	*
-	* @param	string	The index key
-	* @param	bool	XSS cleaning
-	* @return	string
-	*/
+	 * Fetch an item from either the GET array or the POST
+	 *
+	 * @param	string	The index key
+	 * @param	bool	XSS cleaning
+	 * @return	string
+	 */
 	public function get_post($index = '', $xss_clean = FALSE)
 	{
 		return isset($_POST[$index])
@@ -212,12 +218,12 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Fetch an item from the COOKIE array
-	*
-	* @param	string
-	* @param	bool
-	* @return	string
-	*/
+	 * Fetch an item from the COOKIE array
+	 *
+	 * @param	string
+	 * @param	bool
+	 * @return	string
+	 */
 	public function cookie($index = '', $xss_clean = FALSE)
 	{
 		return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
@@ -226,21 +232,21 @@
 	// ------------------------------------------------------------------------
 
 	/**
-	* Set cookie
-	*
-	* Accepts seven parameters, or you can submit an associative
-	* array in the first parameter containing all the values.
-	*
-	* @param	mixed
-	* @param	string	the value of the cookie
-	* @param	string	the number of seconds until expiration
-	* @param	string	the cookie domain.  Usually:  .yourdomain.com
-	* @param	string	the cookie path
-	* @param	string	the cookie prefix
-	* @param	bool	true makes the cookie secure
-	* @param	bool	true makes the cookie accessible via http(s) only (no javascript)
-	* @return	void
-	*/
+	 * Set cookie
+	 *
+	 * Accepts seven parameters, or you can submit an associative
+	 * array in the first parameter containing all the values.
+	 *
+	 * @param	mixed
+	 * @param	string	the value of the cookie
+	 * @param	string	the number of seconds until expiration
+	 * @param	string	the cookie domain.  Usually:  .yourdomain.com
+	 * @param	string	the cookie path
+	 * @param	string	the cookie prefix
+	 * @param	bool	true makes the cookie secure
+	 * @param	bool	true makes the cookie accessible via http(s) only (no javascript)
+	 * @return	void
+	 */
 	public function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE)
 	{
 		if (is_array($name))
@@ -291,12 +297,12 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Fetch an item from the SERVER array
-	*
-	* @param	string
-	* @param	bool
-	* @return	string
-	*/
+	 * Fetch an item from the SERVER array
+	 *
+	 * @param	string
+	 * @param	bool
+	 * @return	string
+	 */
 	public function server($index = '', $xss_clean = FALSE)
 	{
 		return $this->_fetch_from_array($_SERVER, $index, $xss_clean);
@@ -305,10 +311,10 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Fetch the IP Address
-	*
-	* @return	string
-	*/
+	 * Fetch the IP Address
+	 *
+	 * @return	string
+	 */
 	public function ip_address()
 	{
 		if ($this->ip_address !== FALSE)
@@ -362,13 +368,13 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Validate IP Address
-	*
-	* Updated version suggested by Geert De Deckere
-	*
-	* @param	string
-	* @return	bool
-	*/
+	 * Validate IP Address
+	 *
+	 * Updated version suggested by Geert De Deckere
+	 *
+	 * @param	string
+	 * @return	bool
+	 */
 	public function valid_ip($ip)
 	{
 		return (bool) filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
@@ -377,10 +383,10 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* User Agent
-	*
-	* @return	string
-	*/
+	 * User Agent
+	 *
+	 * @return	string
+	 */
 	public function user_agent()
 	{
 		if ($this->user_agent !== FALSE)
@@ -394,24 +400,39 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Sanitize Globals
-	*
-	* This function does the following:
-	*
-	* - Unsets $_GET data (if query strings are not enabled)
-	* - Unsets all globals if register_globals is enabled
-	* - Standardizes newline characters to \n
-	*
-	* @return	void
-	*/
+	 * Sanitize Globals
+	 *
+	 * This function does the following:
+	 *
+	 * - Unsets $_GET data (if query strings are not enabled)
+	 * - Unsets all globals if register_globals is enabled
+	 * - Standardizes newline characters to \n
+	 *
+	 * @return	void
+	 */
 	protected function _sanitize_globals()
 	{
 		// It would be "wrong" to unset any of these GLOBALS.
-		$protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',
-					'_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',
-					'system_folder', 'application_folder', 'BM', 'EXT',
-					'CFG', 'URI', 'RTR', 'OUT', 'IN'
-				);
+		$protected = array(
+			'_SERVER',
+			'_GET',
+			'_POST',
+			'_FILES',
+			'_REQUEST',
+			'_SESSION',
+			'_ENV',
+			'GLOBALS',
+			'HTTP_RAW_POST_DATA',
+			'system_folder',
+			'application_folder',
+			'BM',
+			'EXT',
+			'CFG',
+			'URI',
+			'RTR',
+			'OUT',
+			'IN'
+		);
 
 		// Unset globals for securiy.
 		// This is effectively the same as register_globals = off
@@ -493,14 +514,14 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Clean Input Data
-	*
-	* This is a helper function. It escapes data and
-	* standardizes newline characters to \n
-	*
-	* @param	string
-	* @return	string
-	*/
+	 * Clean Input Data
+	 *
+	 * This is a helper function. It escapes data and
+	 * standardizes newline characters to \n
+	 *
+	 * @param	string
+	 * @return	string
+	 */
 	protected function _clean_input_data($str)
 	{
 		if (is_array($str))
@@ -550,15 +571,15 @@
 	// --------------------------------------------------------------------
 
 	/**
-	* Clean Keys
-	*
-	* This is a helper function. To prevent malicious users
-	* from trying to exploit keys we make sure that keys are
-	* only named with alpha-numeric text and a few other items.
-	*
-	* @param	string
-	* @return	string
-	*/
+	 * Clean Keys
+	 *
+	 * This is a helper function. To prevent malicious users
+	 * from trying to exploit keys we make sure that keys are
+	 * only named with alpha-numeric text and a few other items.
+	 *
+	 * @param	string
+	 * @return	string
+	 */
 	protected function _clean_input_keys($str)
 	{
 		if ( ! preg_match('/^[a-z0-9:_\/-]+$/i', $str))
@@ -695,4 +716,4 @@
 }
 
 /* End of file Input.php */
-/* Location: ./system/core/Input.php */
+/* Location: ./system/core/Input.php */
\ No newline at end of file
diff --git a/system/core/Lang.php b/system/core/Lang.php
index 9ef76f4..7abdc61 100755
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -25,8 +25,6 @@
  * @filesource
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * Language Class
  *
@@ -43,14 +41,18 @@
 	 *
 	 * @var array
 	 */
-	public $language	= array();
+	public $language = array();
+	
 	/**
 	 * List of loaded language files
 	 *
 	 * @var array
 	 */
-	public $is_loaded	= array();
+	public $is_loaded = array();
 
+	/**
+	 * Initialize language class
+	 */
 	public function __construct()
 	{
 		log_message('debug', 'Language Class Initialized');
@@ -161,4 +163,4 @@
 }
 
 /* End of file Lang.php */
-/* Location: ./system/core/Lang.php */
+/* Location: ./system/core/Lang.php */
\ No newline at end of file
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 027ed20..b99ce69 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -45,75 +45,86 @@
 	 * @var int
 	 */
 	protected $_ci_ob_level;
+	
 	/**
 	 * List of paths to load views from
 	 *
 	 * @var array
 	 */
-	protected $_ci_view_paths		= array();
+	protected $_ci_view_paths = array();
+	
 	/**
 	 * List of paths to load libraries from
 	 *
 	 * @var array
 	 */
-	protected $_ci_library_paths	= array();
+	protected $_ci_library_paths = array();
+	
 	/**
 	 * List of paths to load models from
 	 *
 	 * @var array
 	 */
-	protected $_ci_model_paths		= array();
+	protected $_ci_model_paths = array();
+	
 	/**
 	 * List of paths to load helpers from
 	 *
 	 * @var array
 	 */
-	protected $_ci_helper_paths		= array();
+	protected $_ci_helper_paths = array();
+	
 	/**
 	 * List of loaded base classes
 	 *
 	 * @var array
 	 */
-	protected $_base_classes		= array(); // Set by the controller class
+	protected $_base_classes = array(); // Set by the controller class
+	
 	/**
 	 * List of cached variables
 	 *
 	 * @var array
 	 */
-	protected $_ci_cached_vars		= array();
+	protected $_ci_cached_vars = array();
+	
 	/**
 	 * List of loaded classes
 	 *
 	 * @var array
 	 */
-	protected $_ci_classes			= array();
+	protected $_ci_classes = array();
+	
 	/**
 	 * List of loaded files
 	 *
 	 * @var array
 	 */
-	protected $_ci_loaded_files		= array();
+	protected $_ci_loaded_files = array();
+	
 	/**
 	 * List of loaded models
 	 *
 	 * @var array
 	 */
-	protected $_ci_models			= array();
+	protected $_ci_models = array();
+	
 	/**
 	 * List of loaded helpers
 	 *
 	 * @var array
 	 */
-	protected $_ci_helpers			= array();
+	protected $_ci_helpers = array();
+	
 	/**
 	 * List of class name mappings
 	 *
 	 * @var array
 	 */
-	protected $_ci_varmap			= array(
-							'unit_test' => 'unit',
-							'user_agent' => 'agent'
-							);
+	protected $_ci_varmap = array(
+		'unit_test' => 'unit',
+		'user_agent' => 'agent'
+	);
 
 	/**
 	 * Constructor
@@ -138,7 +149,6 @@
 	 *
 	 * This method is called once in CI_Controller.
 	 *
-	 * @param 	array
 	 * @return 	object
 	 */
 	public function initialize()
@@ -1123,7 +1133,6 @@
 	 * The config/autoload.php file contains an array that permits sub-systems,
 	 * libraries, and helpers to be loaded automatically.
 	 *
-	 * @param	array
 	 * @return	void
 	 */
 	protected function _ci_autoloader()
diff --git a/system/core/Model.php b/system/core/Model.php
index 49b8d34..7c99719 100755
--- a/system/core/Model.php
+++ b/system/core/Model.php
@@ -25,8 +25,6 @@
  * @filesource
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * CodeIgniter Model Class
  *
@@ -38,6 +36,9 @@
  */
 class CI_Model {
 
+	/**
+	 * Initialize CI_Model Class
+	 */
 	public function __construct()
 	{
 		log_message('debug', 'Model Class Initialized');
@@ -59,4 +60,4 @@
 }
 
 /* End of file Model.php */
-/* Location: ./system/core/Model.php */
+/* Location: ./system/core/Model.php */
\ No newline at end of file
diff --git a/system/core/Output.php b/system/core/Output.php
index 3cb4062..0683539 100755
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -44,49 +44,59 @@
 	 * @var string
 	 */
 	public $final_output;
+	
 	/**
 	 * Cache expiration time
 	 *
 	 * @var int
 	 */
-	public $cache_expiration	= 0;
+	public $cache_expiration = 0;
+	
 	/**
 	 * List of server headers
 	 *
 	 * @var array
 	 */
-	public $headers			= array();
+	public $headers = array();
+	
 	/**
 	 * List of mime types
 	 *
 	 * @var array
 	 */
-	public $mime_types		= array();
+	public $mime_types = array();
+	
 	/**
 	 * Determines wether profiler is enabled
 	 *
 	 * @var book
 	 */
-	public $enable_profiler		= FALSE;
+	public $enable_profiler = FALSE;
+	
 	/**
 	 * Determines if output compression is enabled
 	 *
 	 * @var bool
 	 */
-	protected $_zlib_oc		= FALSE;
+	protected $_zlib_oc = FALSE;
+	
 	/**
 	 * List of profiler sections
 	 *
 	 * @var array
 	 */
 	protected $_profiler_sections = array();
+	
 	/**
 	 * Whether or not to parse variables like {elapsed_time} and {memory_usage}
 	 *
 	 * @var bool
 	 */
-	public $parse_exec_vars		= TRUE;
+	public $parse_exec_vars = TRUE;
 
+	/**
+	 * Set up Output class
+	 */
 	public function __construct()
 	{
 		$this->_zlib_oc = @ini_get('zlib.output_compression');
diff --git a/system/core/Router.php b/system/core/Router.php
index 5477fed..b5c2002 100755
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -44,36 +44,42 @@
 	 * @var object
 	 */
 	public $config;
+	
 	/**
 	 * List of routes
 	 *
 	 * @var array
 	 */
-	public $routes			= array();
+	public $routes = array();
+	
 	/**
 	 * List of error routes
 	 *
 	 * @var array
 	 */
-	public $error_routes	= array();
+	public $error_routes = array();
+	
 	/**
 	 * Current class name
 	 *
 	 * @var string
 	 */
-	public $class			= '';
+	public $class = '';
+	
 	/**
 	 * Current method name
 	 *
 	 * @var string
 	 */
-	public $method			= 'index';
+	public $method = 'index';
+	
 	/**
 	 * Sub-directory that contains the requested controller class
 	 *
 	 * @var string
 	 */
-	public $directory		= '';
+	public $directory = '';
+	
 	/**
 	 * Default controller (and method if specific)
 	 *
@@ -211,7 +217,6 @@
 	 * input, and sets the current class/method
 	 *
 	 * @param	array
-	 * @param	bool
 	 * @return	void
 	 */
 	protected function _set_request($segments = array())
diff --git a/system/core/Security.php b/system/core/Security.php
index ac39ce9..1395116 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -41,14 +41,14 @@
 	 *
 	 * @var string
 	 */
-	protected $_xss_hash			= '';
+	protected $_xss_hash = '';
 
 	/**
 	 * Random Hash for Cross Site Request Forgery Protection Cookie
 	 *
 	 * @var string
 	 */
-	protected $_csrf_hash			= '';
+	protected $_csrf_hash = '';
 
 	/**
 	 * Expiration time for Cross Site Request Forgery Protection Cookie
@@ -56,21 +56,21 @@
 	 *
 	 * @var int
 	 */
-	protected $_csrf_expire			= 7200;
+	protected $_csrf_expire = 7200;
 
 	/**
 	 * Token name for Cross Site Request Forgery Protection Cookie
 	 *
 	 * @var string
 	 */
-	protected $_csrf_token_name		= 'ci_csrf_token';
+	protected $_csrf_token_name = 'ci_csrf_token';
 
 	/**
 	 * Cookie name for Cross Site Request Forgery Protection Cookie
 	 *
 	 * @var string
 	 */
-	protected $_csrf_cookie_name		= 'ci_csrf_token';
+	protected $_csrf_cookie_name = 'ci_csrf_token';
 
 	/**
 	 * List of never allowed strings
@@ -78,17 +78,17 @@
 	 * @var array
 	 */
 	protected $_never_allowed_str = array(
-						'document.cookie'	=> '[removed]',
-						'document.write'	=> '[removed]',
-						'.parentNode'		=> '[removed]',
-						'.innerHTML'		=> '[removed]',
-						'window.location'	=> '[removed]',
-						'-moz-binding'		=> '[removed]',
-						'<!--'				=> '&lt;!--',
-						'-->'				=> '--&gt;',
-						'<![CDATA['			=> '&lt;![CDATA[',
-						'<comment>'			=> '&lt;comment&gt;'
-					);
+		'document.cookie'	=> '[removed]',
+		'document.write'	=> '[removed]',
+		'.parentNode'		=> '[removed]',
+		'.innerHTML'		=> '[removed]',
+		'window.location'	=> '[removed]',
+		'-moz-binding'		=> '[removed]',
+		'<!--'				=> '&lt;!--',
+		'-->'				=> '--&gt;',
+		'<![CDATA['			=> '&lt;![CDATA[',
+		'<comment>'			=> '&lt;comment&gt;'
+	);
 
 	/**
 	 * List of never allowed regex replacement
@@ -96,12 +96,15 @@
 	 * @var array
 	 */
 	protected $_never_allowed_regex = array(
-						'javascript\s*:',
-						'expression\s*(\(|&\#40;)', // CSS and IE
-						'vbscript\s*:', // IE, surprise!
-						'Redirect\s+302'
-					);
+		'javascript\s*:',
+		'expression\s*(\(|&\#40;)', // CSS and IE
+		'vbscript\s*:', // IE, surprise!
+		'Redirect\s+302'
+	);
 
+	/**
+	 * Initialize security class
+	 */
 	public function __construct()
 	{
 		// Is CSRF protection enabled?
@@ -362,9 +365,9 @@
 		 * These words are compacted back to their correct state.
 		 */
 		$words = array(
-				'javascript', 'expression', 'vbscript', 'script',
-				'applet', 'alert', 'document', 'write', 'cookie', 'window'
-			);
+			'javascript', 'expression', 'vbscript', 'script',
+			'applet', 'alert', 'document', 'write', 'cookie', 'window'
+		);
 
 		foreach ($words as $word)
 		{
@@ -522,23 +525,23 @@
 	public function sanitize_filename($str, $relative_path = FALSE)
 	{
 		$bad = array(
-				'../', '<!--', '-->', '<', '>',
-				"'", '"', '&', '$', '#',
-				'{', '}', '[', ']', '=',
-				';', '?', '%20', '%22',
-				'%3c',		// <
-				'%253c',	// <
-				'%3e',		// >
-				'%0e',		// >
-				'%28',		// (
-				'%29',		// )
-				'%2528',	// (
-				'%26',		// &
-				'%24',		// $
-				'%3f',		// ?
-				'%3b',		// ;
-				'%3d'		// =
-			);
+			'../', '<!--', '-->', '<', '>',
+			"'", '"', '&', '$', '#',
+			'{', '}', '[', ']', '=',
+			';', '?', '%20', '%22',
+			'%3c',		// <
+			'%253c',	// <
+			'%3e',		// >
+			'%0e',		// >
+			'%28',		// (
+			'%29',		// )
+			'%2528',	// (
+			'%26',		// &
+			'%24',		// $
+			'%3f',		// ?
+			'%3b',		// ;
+			'%3d'		// =
+		);
 
 		if ( ! $relative_path)
 		{
@@ -558,8 +561,8 @@
 	 * Callback function for xss_clean() to remove whitespace from
 	 * things like j a v a s c r i p t
 	 *
-	 * @param	type
-	 * @return	type
+	 * @param	array
+	 * @return	string
 	 */
 	protected function _compact_exploded_words($matches)
 	{
@@ -568,8 +571,8 @@
 
 	// --------------------------------------------------------------------
 
-	/*
-	 * Remove Evil HTML Attributes (like evenhandlers and style)
+	/**
+	 * Remove Evil HTML Attributes (like event handlers and style)
 	 *
 	 * It removes the evil attribute and either:
 	 * 	- Everything up until a space
@@ -838,4 +841,4 @@
 }
 
 /* End of file Security.php */
-/* Location: ./system/core/Security.php */
+/* Location: ./system/core/Security.php */
\ No newline at end of file
diff --git a/system/core/URI.php b/system/core/URI.php
index 48bb7ae..1402953 100755
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -24,8 +24,6 @@
  * @since		Version 1.0
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * URI Class
  *
@@ -44,26 +42,29 @@
 	 *
 	 * @var array
 	 */
-	public $keyval		= array();
+	public $keyval = array();
+	
 	/**
 	 * Current uri string
 	 *
 	 * @var string
 	 */
 	public $uri_string;
+	
 	/**
 	 * List of uri segments
 	 *
 	 * @var array
 	 */
-	public $segments	= array();
+	public $segments = array();
+	
 	/**
 	 * Re-indexed list of uri segments
 	 * Starts at 1 instead of 0
 	 *
 	 * @var array
 	 */
-	public $rsegments	= array();
+	public $rsegments = array();
 
 	/**
 	 * Constructor
@@ -326,6 +327,7 @@
 	}
 
 	// --------------------------------------------------------------------
+	
 	/**
 	 * Re-index Segments
 	 *
@@ -406,6 +408,9 @@
 	{
 		return $this->_uri_to_assoc($n, $default, 'segment');
 	}
+	
+	// --------------------------------------------------------------------
+	
 	/**
 	 * Identical to above only it uses the re-routed segment array
 	 *
@@ -501,7 +506,6 @@
 	/**
 	 * Generate a URI string from an associative array
 	 *
-	 *
 	 * @param	array	an associative array of key/values
 	 * @return	array
 	 */
@@ -647,4 +651,4 @@
 }
 
 /* End of file URI.php */
-/* Location: ./system/core/URI.php */
+/* Location: ./system/core/URI.php */
\ No newline at end of file
diff --git a/system/core/Utf8.php b/system/core/Utf8.php
index ba35674..122020a 100644
--- a/system/core/Utf8.php
+++ b/system/core/Utf8.php
@@ -25,8 +25,6 @@
  * @filesource
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * Utf8 Class
  *
@@ -161,4 +159,4 @@
 }
 
 /* End of file Utf8.php */
-/* Location: ./system/core/Utf8.php */
+/* Location: ./system/core/Utf8.php */
\ No newline at end of file
diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst
index 2b91d1c..925954c 100644
--- a/user_guide_src/source/general/styleguide.rst
+++ b/user_guide_src/source/general/styleguide.rst
@@ -149,7 +149,7 @@
 the following are recommended.
 
 `DocBlock <http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblock>`_
-style comments preceding class and method declarations so they can be
+style comments preceding class, method, and property declarations so they can be
 picked up by IDEs::
 
 	/**
@@ -172,6 +172,17 @@
 	 * @return	string
 	 */
 	function xml_encode($str)
+	
+::
+
+	/**
+	 * Data for class manipulation
+	 *
+	 * @var	array
+	 */
+	public $data
+	
+	
 
 Use single line comments within code, leaving a blank line between large
 comment blocks and code.