Added method chaining to DBForge.
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 78bf77a..c74fa40 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -102,12 +102,11 @@
 	/**
 	 * Add Key
 	 *
-	 * @access	public
 	 * @param	string	key
 	 * @param	string	type
-	 * @return	void
+	 * @return	object
 	 */
-	function add_key($key = '', $primary = FALSE)
+	public function add_key($key = '', $primary = FALSE)
 	{
 		if (is_array($key))
 		{
@@ -132,6 +131,8 @@
 		{
 			$this->keys[] = $key;
 		}
+
+		return $this;
 	}
 
 	// --------------------------------------------------------------------
@@ -139,11 +140,10 @@
 	/**
 	 * Add Field
 	 *
-	 * @access	public
 	 * @param	string	collation
-	 * @return	void
+	 * @return	object
 	 */
-	function add_field($field = '')
+	public function add_field($field = '')
 	{
 		if ($field == '')
 		{
@@ -155,12 +155,12 @@
 			if ($field == 'id')
 			{
 				$this->add_field(array(
-										'id' => array(
-													'type' => 'INT',
-													'constraint' => 9,
-													'auto_increment' => TRUE
-													)
-								));
+					'id' => array(
+						'type' => 'INT',
+						'constraint' => 9,
+						'auto_increment' => TRUE
+					)
+				));
 				$this->add_key('id', TRUE);
 			}
 			else
@@ -178,7 +178,8 @@
 		{
 			$this->fields = array_merge($this->fields, $field);
 		}
-
+		
+		return $this;
 	}
 
 	// --------------------------------------------------------------------
@@ -186,11 +187,10 @@
 	/**
 	 * Create Table
 	 *
-	 * @access	public
 	 * @param	string	the table name
 	 * @return	bool
 	 */
-	function create_table($table = '', $if_not_exists = FALSE)
+	public function create_table($table = '', $if_not_exists = FALSE)
 	{
 		if ($table == '')
 		{
@@ -219,11 +219,10 @@
 	/**
 	 * Drop Table
 	 *
-	 * @access	public
 	 * @param	string	the table name
 	 * @return	bool
 	 */
-	function drop_table($table_name)
+	public function drop_table($table_name)
 	{
 		$sql = $this->_drop_table($this->db->dbprefix.$table_name);
 
@@ -240,12 +239,11 @@
 	/**
 	 * Rename Table
 	 *
-	 * @access	public
 	 * @param	string	the old table name
 	 * @param	string	the new table name
 	 * @return	bool
 	 */
-	function rename_table($table_name, $new_table_name)
+	public function rename_table($table_name, $new_table_name)
 	{
 		if ($table_name == '' OR $new_table_name == '')
 		{
@@ -261,13 +259,12 @@
 	/**
 	 * Column Add
 	 *
-	 * @access	public
 	 * @param	string	the table name
 	 * @param	string	the column name
 	 * @param	string	the column definition
 	 * @return	bool
 	 */
-	function add_column($table = '', $field = array(), $after_field = '')
+	public function add_column($table = '', $field = array(), $after_field = '')
 	{
 		if ($table == '')
 		{
@@ -297,7 +294,6 @@
 		}
 
 		return TRUE;
-
 	}
 
 	// --------------------------------------------------------------------
@@ -305,12 +301,11 @@
 	/**
 	 * Column Drop
 	 *
-	 * @access	public
 	 * @param	string	the table name
 	 * @param	string	the column name
 	 * @return	bool
 	 */
-	function drop_column($table = '', $column_name = '')
+	public function drop_column($table = '', $column_name = '')
 	{
 
 		if ($table == '')
@@ -333,13 +328,12 @@
 	/**
 	 * Column Modify
 	 *
-	 * @access	public
 	 * @param	string	the table name
 	 * @param	string	the column name
 	 * @param	string	the column definition
 	 * @return	bool
 	 */
-	function modify_column($table = '', $field = array())
+	public function modify_column($table = '', $field = array())
 	{
 		if ($table == '')
 		{
@@ -384,10 +378,9 @@
 	 *
 	 * Resets table creation vars
 	 *
-	 * @access	private
 	 * @return	void
 	 */
-	function _reset()
+	protected function _reset()
 	{
 		$this->fields		= array();
 		$this->keys			= array();