diff --git a/commerce_discount.module b/commerce_discount.module
index e62f433..fa0c85f 100644
--- a/commerce_discount.module
+++ b/commerce_discount.module
@@ -50,7 +50,7 @@ function commerce_discount_commerce_cart_order_refresh($wrapper) {
 
       // Only check non-new line items; new ones have already been saved.
       if (isset($cloned_line_items[$id])) {
-        $unit_price = $wrapper_line_item->commerce_unit_price->value();
+        $unit_price = commerce_price_wrapper_value($wrapper_line_item, 'commerce_unit_price', TRUE);
         if ($wrapper_line_item->getBundle() == 'commerce_discount' && empty($unit_price['amount'])) {
           $line_items_to_delete[] = $id;
           $wrapper->commerce_line_items->offsetUnset($delta);
@@ -60,13 +60,11 @@ function commerce_discount_commerce_cart_order_refresh($wrapper) {
           // commerce_cart_order_refresh() does) and quantity.
           // (Don't check e.g. commerce_total; it may not be updated yet.)
           $old_line_item_wrapper = entity_metadata_wrapper('commerce_line_item', $cloned_line_items[$id]);
-          $old_unit_price = $old_line_item_wrapper->commerce_unit_price->value();
-          $old_data = (array) $old_unit_price['data'] + array('components' => array());
-          $data = (array) $unit_price['data'] + array('components' => array());
+          $old_unit_price = commerce_price_wrapper_value($old_line_item_wrapper, 'commerce_unit_price', TRUE);
 
-          if ($unit_price['amount'] != $old_unit_price['amount'] ||
-            $unit_price['currency_code'] != $old_unit_price['currency_code'] ||
-            $data['components'] != $old_data['components']) {
+          if ($unit_price['data']['amount'] != $old_unit_price['amount'] ||
+            $unit_price['data']['currency_code'] != $old_unit_price['currency_code'] ||
+            $data['components'] != $old_unit_price['data']['components']) {
             // Save changed line item (which will correctly set commerce_total).
             $wrapper_line_item->save();
           }
@@ -697,7 +695,7 @@ function commerce_discount_offer_type_get_name($type = NULL) {
 }
 
 /**
- * Return an array keyed by commerce order type and label as value.
+ * Return an array keyed by commerce discount name and label as value.
  */
 function commerce_discount_entity_list() {
   $options = array();
@@ -949,13 +947,12 @@ function commerce_discount_usage_order_discounts($order) {
 
   foreach ($order_wrapper->commerce_line_items as $line_item_wrapper) {
     // If the current line item actually no longer exists, continue.
-    if (!$line_item_wrapper->value() || !isset($line_item_wrapper->commerce_unit_price)) {
+    if (!isset($line_item_wrapper->commerce_unit_price)) {
       continue;
     }
 
-    $data = $line_item_wrapper->commerce_unit_price->data->value();
-
-    foreach ($data['components'] as $key => $component) {
+    $unit_price = commerce_price_wrapper_value($line_item_wrapper, 'commerce_unit_price', TRUE);
+    foreach ($unit_price['data']['components'] as $key => $component) {
       if (strpos($component['name'], 'discount|') === 0 && !empty($component['price']['data']['discount_name'])) {
         $order_discount_name = $component['price']['data']['discount_name'];
         $order_discount_wrapper = entity_metadata_wrapper('commerce_discount', $order_discount_name);
diff --git a/commerce_discount.rules.inc b/commerce_discount.rules.inc
index 6bb63d7..50744fb 100644
--- a/commerce_discount.rules.inc
+++ b/commerce_discount.rules.inc
@@ -878,9 +878,8 @@ function commerce_discount_fixed_amount(EntityDrupalWrapper $wrapper, $discount_
 
     case 'commerce_line_item':
       // Check whether this discount was already added as a price component.
-      $price_data = $wrapper->commerce_unit_price->data->value();
-
-      foreach ($price_data['components'] as $component) {
+      $unit_price = commerce_price_wrapper_value($wrapper, 'commerce_unit_price', TRUE);
+      foreach ($unit_price['data']['components'] as $component) {
         if (!empty($component['price']['data']['discount_name']) && $component['price']['data']['discount_name'] == $discount_wrapper->getIdentifier()) {
           return;
         }
@@ -955,18 +954,15 @@ function commerce_discount_percentage(EntityDrupalWrapper $wrapper, $discount_na
       }
 
       // Check whether this discount was already added as a price component.
-      $price_data = $wrapper->commerce_unit_price->data->value();
-      foreach ($price_data['components'] as $component) {
+      $unit_price = commerce_price_wrapper_value($wrapper, 'commerce_unit_price', TRUE);
+      foreach ($unit_price['data']['components'] as $component) {
         if (!empty($component['price']['data']['discount_name']) && $component['price']['data']['discount_name'] == $discount_name) {
           return;
         }
       }
 
-      $unit_price = commerce_price_wrapper_value($wrapper, 'commerce_unit_price', TRUE);
-      $calculated_discount = $unit_price['amount'] * $rate * -1;
-
       $discount_amount = array(
-        'amount' => $calculated_discount,
+        'amount' => $unit_price['amount'] * $rate * -1,
         'currency_code' => $unit_price['currency_code'],
       );
       commerce_discount_add_price_component($wrapper, $discount_name, $discount_amount);
@@ -1414,9 +1410,9 @@ function commerce_discount_add_price_component(EntityDrupalWrapper $line_item_wr
   // Set the new unit price.
   $line_item_wrapper->commerce_unit_price->amount = $updated_amount;
   // Add the discount amount as a price component.
-  $price = $line_item_wrapper->commerce_unit_price->value();
+  $unit_price = commerce_price_wrapper_value($line_item_wrapper, 'commerce_unit_price', TRUE);
   $type = empty($component_title) ? 'discount' : check_plain('discount|' . $discount_name);
-  $line_item_wrapper->commerce_unit_price->data = commerce_price_component_add($price, $type, $difference, TRUE, TRUE);
+  $line_item_wrapper->commerce_unit_price->data = commerce_price_component_add($unit_price, $type, $difference, TRUE, TRUE);
 
   // Update the line item total.
   _commerce_discount_update_commerce_total($line_item_wrapper);
@@ -1450,9 +1446,9 @@ function commerce_discount_set_price_component(EntityDrupalWrapper $line_item_wr
   $line_item_wrapper->commerce_unit_price->amount = $discount_amount['amount'];
 
   // Add the discount amount as a price component.
-  $price = $line_item_wrapper->commerce_unit_price->value();
+  $unit_price = commerce_price_wrapper_value($line_item_wrapper, 'commerce_unit_price', TRUE);
   $type = empty($component_title) ? 'discount' : check_plain('discount|' . $discount_name);
-  $line_item_wrapper->commerce_unit_price->data = commerce_price_component_add($price, $type, $discount_amount, TRUE, TRUE);
+  $line_item_wrapper->commerce_unit_price->data = commerce_price_component_add($unit_price, $type, $discount_amount, TRUE, TRUE);
 
   // Update the line item total.
   _commerce_discount_update_commerce_total($line_item_wrapper);
