Remove access description lines and cleanup the form helper
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 37337d9..ada8228 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -24,8 +24,6 @@
  * @since		Version 1.0
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * CodeIgniter Form Helpers
  *
@@ -43,7 +41,6 @@
  *
  * Creates the opening portion of the form.
  *
- * @access	public
  * @param	string	the URI segments of the form destination
  * @param	array	a key/value pair of attributes
  * @param	array	a key/value pair hidden data
@@ -71,15 +68,15 @@
 
 		$form = '<form action="'.$action.'"'._attributes_to_string($attributes, TRUE).">\n";
 
-		// Add CSRF field if enabled, but leave it out for GET requests and requests to external websites	
-		if ($CI->config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->base_url()) === FALSE OR strpos($form, 'method="get"')))	
+		// Add CSRF field if enabled, but leave it out for GET requests and requests to external websites
+		if ($CI->config->item('csrf_protection') === TRUE && ! (strpos($action, $CI->config->base_url()) === FALSE OR strpos($form, 'method="get"')))
 		{
 			$hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash();
 		}
 
-		if (is_array($hidden) AND count($hidden) > 0)
+		if (is_array($hidden) && count($hidden) > 0)
 		{
-			$form .= sprintf("<div style=\"display:none\">%s</div>", form_hidden($hidden));
+			$form .= sprintf('<div style="display:none;">%s</div>', form_hidden($hidden));
 		}
 
 		return $form;
@@ -93,7 +90,6 @@
  *
  * Creates the opening portion of the form, but with "multipart/form-data".
  *
- * @access	public
  * @param	string	the URI segments of the form destination
  * @param	array	a key/value pair of attributes
  * @param	array	a key/value pair hidden data
@@ -121,10 +117,9 @@
 /**
  * Hidden Input Field
  *
- * Generates hidden fields.  You can pass a simple key/value string or an associative
- * array with multiple values.
+ * Generates hidden fields. You can pass a simple key/value string or
+ * an associative array with multiple values.
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @return	string
@@ -157,7 +152,7 @@
 		{
 			foreach ($value as $k => $v)
 			{
-				$k = (is_int($k)) ? '' : $k;
+				$k = is_int($k) ? '' : $k;
 				form_hidden($name.'['.$k.']', $v, TRUE);
 			}
 		}
@@ -171,7 +166,6 @@
 /**
  * Text Input Field
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -181,7 +175,7 @@
 {
 	function form_input($data = '', $value = '', $extra = '')
 	{
-		$defaults = array('type' => 'text', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+		$defaults = array('type' => 'text', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value);
 
 		return '<input '._parse_form_attributes($data, $defaults).$extra." />\n";
 	}
@@ -194,7 +188,6 @@
  *
  * Identical to the input function but adds the "password" type
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -221,7 +214,6 @@
  *
  * Identical to the input function but adds the "file" type
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -246,7 +238,6 @@
 /**
  * Textarea field
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -256,7 +247,7 @@
 {
 	function form_textarea($data = '', $value = '', $extra = '')
 	{
-		$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '40', 'rows' => '10');
+		$defaults = array('name' => ( ! is_array($data) ? $data : ''), 'cols' => '40', 'rows' => '10');
 
 		if ( ! is_array($data) OR ! isset($data['value']))
 		{
@@ -268,7 +259,7 @@
 			unset($data['value']); // textareas don't use the value attribute
 		}
 
-		$name = (is_array($data)) ? $data['name'] : $data;
+		$name = is_array($data) ? $data['name'] : $data;
 		return '<textarea '._parse_form_attributes($data, $defaults).$extra.'>'.form_prep($val, $name)."</textarea>\n";
 	}
 }
@@ -278,12 +269,11 @@
 /**
  * Multi-select menu
  *
- * @access	public
  * @param	string
  * @param	array
  * @param	mixed
  * @param	string
- * @return	type
+ * @return	string
  */
 if ( ! function_exists('form_multiselect'))
 {
@@ -303,7 +293,6 @@
 /**
  * Drop-down Menu
  *
- * @access	public
  * @param	string
  * @param	array
  * @param	string
@@ -314,28 +303,16 @@
 {
 	function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
 	{
-    // If name is really an array then we'll call the function again using the array
-    if (is_array($name) && isset($name['name']))
-    {
-      
-      if ( ! isset($name['options'])) 
-      {
-        $name['options'] = array();
-      }
-      
-      if ( ! isset($name['selected'])) 
-      {
-        $name['selected'] = array();
-      }
-      
-      if ( ! isset($name['extra'])) 
-      {
-        $name['extra'] = '';
-      }
-      
-      return form_dropdown($name['name'], $name['options'], $name['selected'], $name['extra']);
-    }
-    
+		// If name is really an array then we'll call the function again using the array
+		if (is_array($name) && isset($name['name']))
+		{
+			isset($name['options']) OR $name['options'] = array();
+			isset($name['selected']) OR $name['selected'] = array();
+			isset($name['extra']) OR $name['extra'] = array();
+
+			return form_dropdown($name['name'], $name['options'], $name['selected'], $name['extra']);
+		}
+
 		if ( ! is_array($selected))
 		{
 			$selected = array($selected);
@@ -363,11 +340,11 @@
 
 				foreach ($val as $optgroup_key => $optgroup_val)
 				{
-					$sel = (in_array($optgroup_key, $selected)) ? ' selected="selected"' : '';
+					$sel = in_array($optgroup_key, $selected) ? ' selected="selected"' : '';
 					$form .= '<option value="'.$optgroup_key.'"'.$sel.'>'.(string) $optgroup_val."</option>\n";
 				}
 
-				$form .= '</optgroup>'."\n";
+				$form .= "</optgroup>\n";
 			}
 			else
 			{
@@ -375,9 +352,7 @@
 			}
 		}
 
-		$form .= "</select>\n";
-
-		return $form;
+		return $form."</select>\n";
 	}
 }
 
@@ -386,7 +361,6 @@
 /**
  * Checkbox Field
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	bool
@@ -397,9 +371,9 @@
 {
 	function form_checkbox($data = '', $value = '', $checked = FALSE, $extra = '')
 	{
-		$defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+		$defaults = array('type' => 'checkbox', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value);
 
-		if (is_array($data) AND array_key_exists('checked', $data))
+		if (is_array($data) && array_key_exists('checked', $data))
 		{
 			$checked = $data['checked'];
 
@@ -431,7 +405,6 @@
 /**
  * Radio Button
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	bool
@@ -457,7 +430,6 @@
 /**
  * Submit Button
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -467,7 +439,7 @@
 {
 	function form_submit($data = '', $value = '', $extra = '')
 	{
-		$defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+		$defaults = array('type' => 'submit', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value);
 		return '<input '._parse_form_attributes($data, $defaults).$extra." />\n";
 	}
 }
@@ -477,7 +449,6 @@
 /**
  * Reset Button
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -487,7 +458,7 @@
 {
 	function form_reset($data = '', $value = '', $extra = '')
 	{
-		$defaults = array('type' => 'reset', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+		$defaults = array('type' => 'reset', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value);
 		return '<input '._parse_form_attributes($data, $defaults).$extra." />\n";
 	}
 }
@@ -497,7 +468,6 @@
 /**
  * Form Button
  *
- * @access	public
  * @param	mixed
  * @param	string
  * @param	string
@@ -507,8 +477,8 @@
 {
 	function form_button($data = '', $content = '', $extra = '')
 	{
-		$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'type' => 'button');
-		if ( is_array($data) AND isset($data['content']))
+		$defaults = array('name' => ( ! is_array($data) ? $data : ''), 'type' => 'button');
+		if (is_array($data) && isset($data['content']))
 		{
 			$content = $data['content'];
 			unset($data['content']); // content is not an attribute
@@ -523,7 +493,6 @@
 /**
  * Form Label Tag
  *
- * @access	public
  * @param	string	The text to appear onscreen
  * @param	string	The id the label applies to
  * @param	string	Additional attributes
@@ -538,10 +507,10 @@
 
 		if ($id != '')
 		{
-			$label .= " for=\"$id\"";
+			$label .= ' for="'.$id.'"';
 		}
 
-		if (is_array($attributes) AND count($attributes) > 0)
+		if (is_array($attributes) && count($attributes) > 0)
 		{
 			foreach ($attributes as $key => $val)
 			{
@@ -549,7 +518,7 @@
 			}
 		}
 
-		return $label .= ">$label_text</label>";
+		return $label.'>'.$label_text.'</label>';
 	}
 }
 
@@ -560,7 +529,6 @@
  * Used to produce <fieldset><legend>text</legend>.  To close fieldset
  * use form_fieldset_close()
  *
- * @access	public
  * @param	string	The legend text
  * @param	string	Additional attributes
  * @return	string
@@ -572,7 +540,7 @@
 		$fieldset = '<fieldset'._attributes_to_string($attributes, FALSE).">\n";
 		if ($legend_text != '')
 		{
-			$fieldset .= "<legend>$legend_text</legend>\n";
+			return $fieldset.'<legend>'.$legend_text."</legend>\n";
 		}
 
 		return $fieldset;
@@ -584,7 +552,6 @@
 /**
  * Fieldset Close Tag
  *
- * @access	public
  * @param	string
  * @return	string
  */
@@ -592,7 +559,7 @@
 {
 	function form_fieldset_close($extra = '')
 	{
-		return "</fieldset>".$extra;
+		return '</fieldset>'.$extra;
 	}
 }
 
@@ -601,7 +568,6 @@
 /**
  * Form Close Tag
  *
- * @access	public
  * @param	string
  * @return	string
  */
@@ -609,7 +575,7 @@
 {
 	function form_close($extra = '')
 	{
-		return "</form>".$extra;
+		return '</form>'.$extra;
 	}
 }
 
@@ -670,10 +636,9 @@
  * Form Value
  *
  * Grabs a value from the POST array for the specified field so you can
- * re-populate an input field or textarea.  If Form Validation
+ * re-populate an input field or textarea. If Form Validation
  * is active it retrieves the info from the validation class
  *
- * @access	public
  * @param	string
  * @return	mixed
  */
@@ -703,7 +668,6 @@
  * Let's you set the selected value of a <select> menu via data in the POST array.
  * If Form Validation is active it retrieves the info from the validation class
  *
- * @access	public
  * @param	string
  * @param	string
  * @param	bool
@@ -719,7 +683,7 @@
 		{
 			if ( ! isset($_POST[$field]))
 			{
-				if (count($_POST) === 0 AND $default == TRUE)
+				if (count($_POST) === 0 && $default == TRUE)
 				{
 					return ' selected="selected"';
 				}
@@ -735,12 +699,9 @@
 					return '';
 				}
 			}
-			else
+			elseif (($field == '' OR $value == '') OR ($field != $value))
 			{
-				if (($field == '' OR $value == '') OR ($field != $value))
-				{
-					return '';
-				}
+				return '';
 			}
 
 			return ' selected="selected"';
@@ -758,7 +719,6 @@
  * Let's you set the selected value of a checkbox via the value in the POST array.
  * If Form Validation is active it retrieves the info from the validation class
  *
- * @access	public
  * @param	string
  * @param	string
  * @param	bool
@@ -774,7 +734,7 @@
 		{
 			if ( ! isset($_POST[$field]))
 			{
-				if (count($_POST) === 0 AND $default == TRUE)
+				if (count($_POST) === 0 && $default == TRUE)
 				{
 					return ' checked="checked"';
 				}
@@ -790,12 +750,9 @@
 					return '';
 				}
 			}
-			else
+			elseif (($field == '' OR $value == '') OR ($field != $value))
 			{
-				if (($field == '' OR $value == '') OR ($field != $value))
-				{
-					return '';
-				}
+				return '';
 			}
 
 			return ' checked="checked"';
@@ -813,7 +770,6 @@
  * Let's you set the selected value of a radio field via info in the POST array.
  * If Form Validation is active it retrieves the info from the validation class
  *
- * @access	public
  * @param	string
  * @param	string
  * @param	bool
@@ -829,7 +785,7 @@
 		{
 			if ( ! isset($_POST[$field]))
 			{
-				if (count($_POST) === 0 AND $default == TRUE)
+				if (count($_POST) === 0 && $default == TRUE)
 				{
 					return ' checked="checked"';
 				}
@@ -865,10 +821,9 @@
 /**
  * Form Error
  *
- * Returns the error for a specific form field.  This is a helper for the
+ * Returns the error for a specific form field. This is a helper for the
  * form validation class.
  *
- * @access	public
  * @param	string
  * @param	string
  * @param	string
@@ -892,10 +847,9 @@
 /**
  * Validation Error String
  *
- * Returns all the errors associated with a form submission.  This is a helper
+ * Returns all the errors associated with a form submission. This is a helper
  * function for the form validation class.
  *
- * @access	public
  * @param	string
  * @param	string
  * @return	string
@@ -920,7 +874,6 @@
  *
  * Helper function used by some of the form helpers
  *
- * @access	private
  * @param	array
  * @param	array
  * @return	string
@@ -955,7 +908,7 @@
 				$val = form_prep($val, $default['name']);
 			}
 
-			$att .= $key . '="' . $val . '" ';
+			$att .= $key.'="'.$val.'" ';
 		}
 
 		return $att;
@@ -969,7 +922,6 @@
  *
  * Helper function used by some of the form helpers
  *
- * @access	private
  * @param	mixed
  * @param	bool
  * @return	string
@@ -978,14 +930,14 @@
 {
 	function _attributes_to_string($attributes, $formtag = FALSE)
 	{
-		if (is_string($attributes) AND strlen($attributes) > 0)
+		if (is_string($attributes) && strlen($attributes) > 0)
 		{
-			if ($formtag == TRUE AND strpos($attributes, 'method=') === FALSE)
+			if ($formtag == TRUE && strpos($attributes, 'method=') === FALSE)
 			{
 				$attributes .= ' method="post"';
 			}
 
-			if ($formtag == TRUE AND strpos($attributes, 'accept-charset=') === FALSE)
+			if ($formtag == TRUE && strpos($attributes, 'accept-charset=') === FALSE)
 			{
 				$attributes .= ' accept-charset="'.strtolower(config_item('charset')).'"';
 			}
@@ -993,21 +945,21 @@
 			return ' '.$attributes;
 		}
 
-		if (is_object($attributes) AND count($attributes) > 0)
+		if (is_object($attributes) && count($attributes) > 0)
 		{
-			$attributes = (array)$attributes;
+			$attributes = (array) $attributes;
 		}
 
-		if (is_array($attributes) AND ($formtag === TRUE OR count($attributes) > 0))
+		if (is_array($attributes) && ($formtag === TRUE OR count($attributes) > 0))
 		{
 			$atts = '';
 
-			if ( ! isset($attributes['method']) AND $formtag === TRUE)
+			if ( ! isset($attributes['method']) && $formtag === TRUE)
 			{
 				$atts .= ' method="post"';
 			}
 
-			if ( ! isset($attributes['accept-charset']) AND $formtag === TRUE)
+			if ( ! isset($attributes['accept-charset']) && $formtag === TRUE)
 			{
 				$atts .= ' accept-charset="'.strtolower(config_item('charset')).'"';
 			}
@@ -1030,7 +982,6 @@
  * Determines what the form validation class was instantiated as, fetches
  * the object and returns it.
  *
- * @access	private
  * @return	mixed
  */
 if ( ! function_exists('_get_validation_object'))
@@ -1057,4 +1008,4 @@
 }
 
 /* End of file form_helper.php */
-/* Location: ./system/helpers/form_helper.php */
+/* Location: ./system/helpers/form_helper.php */
\ No newline at end of file