Clean up the libraries
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index eee1235..b73ed51 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -39,11 +39,11 @@
 	/**
 	 * These are the regular expression rules that we use to validate the product ID and product name
 	 * alpha-numeric, dashes, underscores, or periods
-	 * 
+	 *
 	 * @var string
 	 */
 	public $product_id_rules	= '\.a-z0-9_-';
-	
+
 	/**
 	 * These are the regular expression rules that we use to validate the product ID and product name
 	 * alpha-numeric, dashes, underscores, colons or periods
@@ -51,7 +51,7 @@
 	 * @var string
 	 */
 	public $product_name_rules	= '\.\:\-_ a-z0-9';
-	
+
 	/**
 	 * only allow safe product names
 	 *
@@ -62,14 +62,14 @@
 	// --------------------------------------------------------------------------
 	// Protected variables. Do not change!
 	// --------------------------------------------------------------------------
-	
+
 	/**
 	 * Reference to CodeIgniter instance
 	 *
 	 * @var object
 	 */
 	protected $CI;
-	
+
 	/**
 	 * Contents of the cart
 	 *
@@ -83,6 +83,7 @@
 	 * The constructor loads the Session class, used to store the shopping cart contents.
 	 *
 	 * @param	array
+	 * @return	void
 	 */
 	public function __construct($params = array())
 	{
@@ -180,7 +181,7 @@
 		// --------------------------------------------------------------------
 
 		// Does the $items array contain an id, quantity, price, and name?  These are required
-		if ( ! isset($items['id']) OR ! isset($items['qty']) OR ! isset($items['price']) OR ! isset($items['name']))
+		if ( ! isset($items['id'], $items['qty'], $items['price'], $items['name']))
 		{
 			log_message('error', 'The cart array must contain a product ID, quantity, price, and name.');
 			return FALSE;
@@ -341,7 +342,7 @@
 	protected function _update($items = array())
 	{
 		// Without these array indexes there is nothing we can do
-		if ( ! isset($items['qty']) OR ! isset($items['rowid']) OR ! isset($this->_cart_contents[$items['rowid']]))
+		if ( ! isset($items['qty'], $items['rowid'], $this->_cart_contents[$items['rowid']]))
 		{
 			return FALSE;
 		}
@@ -383,7 +384,7 @@
 		foreach ($this->_cart_contents as $key => $val)
 		{
 			// We make sure the array contains the proper indexes
-			if ( ! is_array($val) OR ! isset($val['price']) OR ! isset($val['qty']))
+			if ( ! is_array($val) OR ! isset($val['price'], $val['qty']))
 			{
 				continue;
 			}
@@ -393,7 +394,7 @@
 			$this->_cart_contents[$key]['subtotal'] = ($this->_cart_contents[$key]['price'] * $this->_cart_contents[$key]['qty']);
 		}
 
-		// Is our cart empty?  If so we delete it from the session
+		// Is our cart empty? If so we delete it from the session
 		if (count($this->_cart_contents) <= 2)
 		{
 			$this->CI->session->unset_userdata('cart_contents');
@@ -489,7 +490,7 @@
 	 */
 	public function has_options($rowid = '')
 	{
-		return (isset($this->_cart_contents[$rowid]['options']) && count($this->_cart_contents[$rowid]['options']) !== 0) ? TRUE : FALSE;
+		return (isset($this->_cart_contents[$rowid]['options']) && count($this->_cart_contents[$rowid]['options']) !== 0);
 	}
 
 	// --------------------------------------------------------------------
@@ -519,15 +520,7 @@
 	 */
 	public function format_number($n = '')
 	{
-		if ($n == '')
-		{
-			return '';
-		}
-
-		// Remove anything that isn't a number or decimal point.
-		$n = (float) $n;
-
-		return number_format($n, 2, '.', ',');
+		return ($n == '') ? '' : number_format( (float) $n, 2, '.', ',');
 	}
 
 	// --------------------------------------------------------------------