diff --git a/payment/uc_google_checkout/uc_google_checkout.module b/payment/uc_google_checkout/uc_google_checkout.module
index 6c6305e..5780c8b 100644
--- a/payment/uc_google_checkout/uc_google_checkout.module
+++ b/payment/uc_google_checkout/uc_google_checkout.module
@@ -267,8 +267,7 @@ function uc_google_checkout_node_revision_delete($node) {
  * Implements hook_uc_cart_pane().
  */
 function uc_google_checkout_uc_cart_pane() {
-  $panes[] = array(
-    'id' => 'uc_google_checkout',
+  $panes['uc_google_checkout'] = array(
     'title' => t('Google Checkout'),
     'enabled' => TRUE,
     'weight' => 1,
diff --git a/payment/uc_paypal/uc_paypal.module b/payment/uc_paypal/uc_paypal.module
index 816ca8c..996a5e6 100644
--- a/payment/uc_paypal/uc_paypal.module
+++ b/payment/uc_paypal/uc_paypal.module
@@ -128,8 +128,7 @@ function uc_paypal_form_uc_cart_checkout_review_form_alter(&$form, &$form_state,
  * Implements hook_uc_cart_pane().
  */
 function uc_paypal_uc_cart_pane() {
-  $panes[] = array(
-    'id' => 'uc_paypal_ec',
+  $panes['uc_paypal_ec'] = array(
     'title' => t('PayPal Express Checkout'),
     'enabled' => FALSE,
     'weight' => 1,
diff --git a/shipping/uc_quote/uc_quote.module b/shipping/uc_quote/uc_quote.module
index 0ead791..9e01e5c 100644
--- a/shipping/uc_quote/uc_quote.module
+++ b/shipping/uc_quote/uc_quote.module
@@ -316,7 +316,7 @@ function uc_quote_uc_cart_pane($items) {
     $body = '';
   }
 
-  $panes[] = array('id' => 'quotes',
+  $panes['quotes'] = array(
     'title' => t('Shipping quotes'),
     'enabled' => FALSE,
     'weight' => 5,
diff --git a/uc_cart/uc_cart.admin.inc b/uc_cart/uc_cart.admin.inc
index 0341a61..6630943 100644
--- a/uc_cart/uc_cart.admin.inc
+++ b/uc_cart/uc_cart.admin.inc
@@ -207,15 +207,15 @@ function uc_cart_cart_panes_form($form, &$form_state) {
     '#theme' => 'uc_pane_sort_table',
     '#pane_prefix' => 'uc_cap',
   );
-  foreach ($panes as $pane) {
-    $form['panes'][$pane['id']]['uc_cap_' . $pane['id'] . '_enabled'] = array(
+  foreach ($panes as $id => $pane) {
+    $form['panes'][$id]['uc_cap_' . $id . '_enabled'] = array(
       '#type' => 'checkbox',
       '#default_value' => $pane['enabled'],
     );
-    $form['panes'][$pane['id']]['title'] = array(
+    $form['panes'][$id]['title'] = array(
       '#markup' => $pane['title'],
     );
-    $form['panes'][$pane['id']]['uc_cap_' . $pane['id'] . '_weight'] = array(
+    $form['panes'][$id]['uc_cap_' . $id . '_weight'] = array(
       '#type' => 'weight',
       '#delta' => 10,
       '#default_value' => $pane['weight'],
diff --git a/uc_cart/uc_cart.api.php b/uc_cart/uc_cart.api.php
index 0594346..edf9cca 100644
--- a/uc_cart/uc_cart.api.php
+++ b/uc_cart/uc_cart.api.php
@@ -201,11 +201,8 @@ function hook_uc_cart_item($op, &$item) {
  *   The current contents of the shopping cart.
  *
  * @return
- *   The function is expected to return an array of pane arrays with the
- *   following keys:
- *   - "id"
- *     - type: string
- *     - value: The internal ID of the pane, using a-z, 0-9, and - or _.
+ *   The function is expected to return an array of pane arrays, keyed by the
+ *   internal ID of the pane, each with the following members:
  *   - "title"
  *     - type: string
  *     - value: The name of the cart pane displayed to the user.  Use t().
@@ -234,8 +231,7 @@ function hook_uc_cart_pane($items) {
     );
   }
 
-  $panes[] = array(
-    'id' => 'cart_form',
+  $panes['cart_form'] = array(
     'title' => t('Default cart form'),
     'enabled' => TRUE,
     'weight' => 0,
@@ -256,11 +252,7 @@ function hook_uc_cart_pane($items) {
  *   The array of item information.
  */
 function hook_uc_cart_pane_alter(&$panes, $items) {
-  foreach ($panes as &$pane) {
-    if ($pane['id'] == 'cart') {
-      $pane['body'] = drupal_get_form('my_custom_pane_form_builder', $items);
-    }
-  }
+  $panes['cart_form']['body'] = drupal_get_form('my_custom_pane_form_builder', $items);
 }
 
 /**
diff --git a/uc_cart/uc_cart.module b/uc_cart/uc_cart.module
index d329210..daf52ac 100644
--- a/uc_cart/uc_cart.module
+++ b/uc_cart/uc_cart.module
@@ -765,8 +765,7 @@ function uc_cart_uc_cart_pane($items) {
     );
   }
 
-  $panes[] = array(
-    'id' => 'cart_form',
+  $panes['cart_form'] = array(
     'title' => t('Default cart form'),
     'enabled' => TRUE,
     'weight' => 0,
@@ -1713,25 +1712,37 @@ function uc_cart_empty($cart_id, $op = 'remove') {
  *   If 'rebuild' is passed, the static pane cache is cleared.
  */
 function uc_cart_cart_pane_list($items, $action = NULL) {
-  static $panes;
+  static $panes = array();
 
   if (count($panes) > 0 && $action !== 'rebuild') {
     return $panes;
   }
 
-  $panes = module_invoke_all('uc_cart_pane', $items);
+  foreach (module_invoke_all('uc_cart_pane', $items) as $id => $pane) {
+    // Preserve backward compatibility for panes with no key specified.
+    if (is_numeric($id)) {
+      $id = $pane['id'];
+    }
 
-  // Allow other modules to alter the panes.
+    // Set defaults.
+    $panes[$id] = $pane + array(
+      'id' => $id,
+      'enabled' => TRUE,
+      'weight' => 0,
+      'body' => array(),
+    );
+  }
+
+  // Allow other modules to alter the defaults.
   drupal_alter('uc_cart_pane', $panes, $items);
 
-  if (!is_array($panes) || count($panes) == 0) {
-    return array();
+  // Use admin-specified enabled and weight values.
+  foreach ($panes as $id => &$pane) {
+    $pane['enabled'] = variable_get('uc_cap_' . $id . '_enabled', $pane['enabled']);
+    $pane['weight'] = variable_get('uc_cap_' . $id . '_weight', $pane['weight']);
   }
-  foreach ($panes as $i => $value) {
-    $panes[$i]['enabled'] = variable_get('uc_cap_' . $panes[$i]['id'] . '_enabled', (!isset($panes[$i]['enabled']) ? TRUE : $panes[$i]['enabled']));
-    $panes[$i]['weight'] = variable_get('uc_cap_' . $panes[$i]['id'] . '_weight', (!isset($panes[$i]['weight']) ? 0 : $panes[$i]['weight']));
-  }
-  usort($panes, 'uc_weight_sort');
+
+  uasort($panes, 'uc_weight_sort');
 
   return $panes;
 }
diff --git a/uc_cart/uc_cart.pages.inc b/uc_cart/uc_cart.pages.inc
index 4512e7b..9e60409 100644
--- a/uc_cart/uc_cart.pages.inc
+++ b/uc_cart/uc_cart.pages.inc
@@ -35,11 +35,11 @@ function uc_cart_view() {
 
   $build = array();
   // Load through the cart panes...
-  foreach (uc_cart_cart_pane_list($items) as $pane) {
+  foreach (uc_cart_cart_pane_list($items) as $id => $pane) {
     // If the pane is enabled...
     if ($pane['enabled']) {
       // Add its output to the cart view.
-      $build[$pane['id']] = $pane['body'];
+      $build[$id] = $pane['body'];
     }
   }
 
