diff --git a/README.txt b/README.txt
index 0bc60bf..6475d40 100644
--- a/README.txt
+++ b/README.txt
@@ -72,22 +72,26 @@ KNOWN ISSUES
  * This module will not work reliably at the moment if the order
    field commerce_customer_billing is missing or if that field (profile) is
    missing the field commerce_customer_address.
+   See http://drupal.org/node/2001424.
  * The order object must have the order::mail property set before the payment
    transaction is triggered. If you are using Drupal Commerce's account
    information pane then this is already done for you. But if you are
    gathering account details using a custom method, then you must ensure you
    correctly populate the order object used in checkout.
+   See http://drupal.org/node/2001424
  * The "Add payment" tool on the order UI Payment page will not work if it uses
    this module to make a transaction. I'm not sure if this can be made to work
-   with this service. If anyone has any ideas on how to solve this please open
-   an issue on the feature.
+   with this service. See http://drupal.org/node/2001442.
 
 TODO
 ----
 * Set appropriate Commerce Transaction status for SecureCode ('authentication').
+  See http://drupal.org/node/2001452.
 * Set appropriate Commerce Transaction status for AVS ('AVS').
-* Finish Bartik WorldPay theme (images etc.).
+  See http://drupal.org/node/2001454.
+* Finish Bartik WorldPay theme (images etc.): http://drupal.org/node/2001458
 * Make the module function fine without an addressfield or billing profile.
+  See http://drupal.org/node/2001424
 
 SUPPORT
 -------
diff --git a/commerce_worldpay_bg.info b/commerce_worldpay_bg.info
index 40e4eb0..ababc84 100644
--- a/commerce_worldpay_bg.info
+++ b/commerce_worldpay_bg.info
@@ -1,6 +1,6 @@
 name = WorldPay Business Gateway Integration
 description = Provides Integration with the WorldPay Payment Gateway (http://www.worldpay.com)
-package = Commerce - Payment
+package = Commerce (contrib)
 dependencies[] = commerce
 dependencies[] = commerce_payment
 core = 7.x
diff --git a/commerce_worldpay_bg.module b/commerce_worldpay_bg.module
index 945f3d3..6e85f11 100644
--- a/commerce_worldpay_bg.module
+++ b/commerce_worldpay_bg.module
@@ -23,7 +23,7 @@ define('C_WORLDPAY_BG_RESPONSE_URL_TOKEN', 'MC_callback');
  *
  * Defines what post fields should be used in the Worldpay MD5 signature.
  *
- * TODO Decide if this is worth making configurable.
+ * @todo Decide if this is worth making configurable.
  * @see http://www.worldpay.com/support/kb/bg/htmlredirect/rhtml5802.html
  *
  * @return array
@@ -86,54 +86,32 @@ function commerce_worldpay_bg_menu() {
  * Implements hook_theme().
  */
 function commerce_worldpay_bg_theme() {
+  $common_vars = array(
+    'installation_id' => NULL,
+    'order' => NULL,
+    'order_id' => NULL,
+    'order_no' => NULL,
+    'wp_txn_id' => NULL,
+    'settings' => NULL,
+  );
   return array(
     'commerce_worldpay_bg_html' => array(
-      'variables' => array(
-        'installation_id' => NULL,
-        'order' => NULL,
-        'order_id' => NULL,
-        'order_no' => NULL,
-        'wp_txn_id' => NULL,
-        'settings' => NULL,
-        'page' => NULL,
-      ),
+      'variables' => $common_vars += array('page' => NULL),
       'template' => 'theme/commerce-worldpay-bg-html',
       'file' => 'includes/commerce_worldpay_bg.theme.inc',
     ),
     'commerce_worldpay_bg_page' => array(
-      'variables' => array(
-        'installation_id' => NULL,
-        'order' => NULL,
-        'order_id' => NULL,
-        'order_no' => NULL,
-        'wp_txn_id' => NULL,
-        'settings' => NULL,
-        'content' => NULL,
-      ),
+      'variables' => $common_vars += array('content' => NULL),
       'template' => 'theme/commerce-worldpay-bg-page',
       'file' => 'includes/commerce_worldpay_bg.theme.inc',
     ),
     'commerce_worldpay_bg_success' => array(
-      'variables' => array(
-        'installation_id' => NULL,
-        'order' => NULL,
-        'order_id' => NULL,
-        'order_no' => NULL,
-        'wp_txn_id' => NULL,
-        'settings' => NULL,
-      ),
+      'variables' => $common_vars,
       'template' => 'theme/commerce-worldpay-bg-success',
       'file' => 'includes/commerce_worldpay_bg.theme.inc',
     ),
     'commerce_worldpay_bg_cancel' => array(
-      'variables' => array(
-        'installation_id' => NULL,
-        'order' => NULL,
-        'order_id' => NULL,
-        'order_no' => NULL,
-        'wp_txn_id' => NULL,
-        'settings' => NULL,
-      ),
+      'variables' => $common_vars,
       'template' => 'theme/commerce-worldpay-bg-cancel',
       'file' => 'includes/commerce_worldpay_bg.theme.inc',
     ),
@@ -199,22 +177,27 @@ function commerce_worldpay_bg_settings_form($settings = NULL) {
     ),
   );
 
+  $url = url('commerce/worldpay/bg/response', array());
+  // Remove language prefixes.
+  if (!empty($GLOBALS['language']->prefix) && drupal_multilingual()) {
+    $url = str_replace('/' . $GLOBALS['language']->prefix, '', $url);
+  }
   $form['help_text']['worldpay_settings'] = array(
     '#type' => 'item',
     '#markup' => t(
-'<h4>Installation instructions</h4>
-<p>For this module to work properly you must configure a few specific options in your RBS WorldPay account under <em>Installation Administration</em> settings:</p>
-<ul>
-  <li><strong>Payment Response URL</strong> must be set to: <em>@response_url</em></li>
-  <li><strong>Payment Response enabled?</strong> must be <em>enabled</em></li>
-  <li><strong>Enable the Shopper Response</strong> should be <em>enabled</em> to get the Commerce response page.</li>
-  <li><strong>Enable the Dynamic Shopper Response</strong> and set the value to be <em>MC_callback</em>. <a href="http://www.worldpay.com/support/kb/bg/paymentresponse/pr5502.html">Worldpay help document</a>.</li>
-  <li>SignatureFields must be set to: <em>@sig</em></li>
-</ul>',
+      '<h4>Installation instructions</h4>
+      <p>For this module to work properly you must configure a few specific options in your RBS WorldPay account under <em>Installation Administration</em> settings:</p>
+      <ul>
+        <li><strong>Payment Response URL</strong> must be set to: <em>@response_url</em></li>
+        <li><strong>Payment Response enabled?</strong> must be <em>enabled</em></li>
+        <li><strong>Enable the Shopper Response</strong> should be <em>enabled</em> to get the Commerce response page.</li>
+        <li><strong>Shopper Redirect URL</strong> and set the value to be <em>MC_callback</em>. !link.</li>
+        <li><strong>SignatureFields must be set to</strong>: <em>@sig</em></li>
+      </ul>',
       array(
-        '@response_url' => '<wpdisplay item=' . C_WORLDPAY_BG_RESPONSE_URL_TOKEN . '-ppe empty="' .
-          url('commerce/worldpay/bg/response', array()) . '">',
+        '@response_url' => '<wpdisplay item=' . C_WORLDPAY_BG_RESPONSE_URL_TOKEN . '-ppe empty="' . $url . '">',
         '@sig' => join(':', _commerce_worldpay_bg_md5_signature_fields()),
+        '!link' => l(t('Worldpay help document'), 'http://www.worldpay.com/support/kb/bg/paymentresponse/pr5502.html', array('absolute' => TRUE, 'external' => TRUE)),
       )
     ),
     '#tree' => FALSE,
@@ -358,7 +341,7 @@ function commerce_worldpay_bg_settings_form($settings = NULL) {
     '#type' => 'checkbox',
     '#title' => t('Show the contact details on the payment page.'),
     '#default_value' => $settings['payment_parameters']['show_contact'],
-    // TODO Should this be disabled and always true if edit contact is FALSE?
+    // @todo Should this be disabled and always true if edit contact is FALSE?
     // '#disabled' => variable_get('wpbg_show_contact', TRUE),
   );
 
@@ -445,7 +428,7 @@ function commerce_worldpay_bg_settings_form($settings = NULL) {
     '#default_value' => $settings['payment_urls']['force_non_ssl_links'],
   );
 
-  // ======
+  // @todo what is the reason for not showing those fields?
   /*
   $form['txn_mode'] = array(
     '#type' => 'radios',
@@ -508,7 +491,7 @@ function commerce_worldpay_bg_settings_form($settings = NULL) {
  *
  * Here we add the card selection stuff if it is enabled.
  *
- * @TODO
+ * @todo
  * Attach a help box for aiding the user in payment method choice.
  */
 function commerce_worldpay_bg_submit_form($payment_method, $pane_values, $checkout_pane, $order) {
@@ -548,13 +531,13 @@ function commerce_worldpay_bg_submit_form($payment_method, $pane_values, $checko
       '#type' => 'container',
       '#attributes' => array(
         'class' => array(
-          'commerce-worldpay-bg-biil-address-help',
+          'commerce-worldpay-bg-bill-address-help',
           'messages',
           'warning',
         ),
       ),
       'content' => array(
-        '#markup' => t('Before proceeding to the next step. Please verify the billing address is the one that belongs to your chosen payment method.'),
+        '#markup' => t('Before proceeding to the next step, please verify that the billing address is the one that belongs to your chosen payment method.'),
       ),
     );
   }
@@ -577,7 +560,7 @@ function commerce_worldpay_bg_submit_form_validate($payment_method, $pane_form,
     form_set_error(implode('][', array_merge($form_parents, array('paymentType'))), t('An invalid WorldPay payment method choice was recived. Please try choosing a payment method again.'));
 
     // Even though the form error is enough to stop the submission of the form,
-    // it's not enough to stop it from a Commerce standpoint because of the
+    // it's not enough to stop it from a Commerce point of view because of the
     // combined validation / submission going on per-pane in the checkout form.
     return FALSE;
   }
@@ -591,7 +574,7 @@ function commerce_worldpay_bg_submit_form_submit($payment_method, $pane_form, $p
 }
 
 /**
- * Build the form to be submited to WorldPay.
+ * Build the form to be submitted to WorldPay.
  *
  * @see commerce_worldpay_bg_redirect_form()
  */
@@ -599,7 +582,7 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
   $order_wrapper = entity_metadata_wrapper('commerce_order', $order);
   $currency_code = $order_wrapper->commerce_order_total->currency_code->value();
   $amount = $order_wrapper->commerce_order_total->amount->value();
-  // TODO Find out which should really be used for the ammount or are they the same?
+  // @todo Find out which should really be used for the ammount or are they the same?
   // $amount = commerce_line_items_total($order_wrapper->commerce_line_items);
 
   // Ensure a default value for the payment_method setting.
@@ -615,7 +598,7 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
   // how the Drupal include files should be loaded?
   require_once DRUPAL_ROOT . '/includes/locale.inc';
   $countries = country_get_list();
-  $country = $countries[$address['country']];
+  $country = !empty($countries[$address['country']]) ? $countries[$address['country']] : '';
 
   // Build the data array that will be translated into hidden form values.
   $data = array();
@@ -638,7 +621,8 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
     }
   }
 
-  // TODO Look into producing a formater for addressfield.
+  // @todo provide a hook to override address_post in order to give other modules a chance to provide this info from elsewhere.
+  // @todo Look into producing a formatter for addressfield.
   $address_post = (!empty($address['thoroughfare']) ? $address['thoroughfare'] . "\n" : '') .
     (!empty($address['premise']) ? $address['premise'] . "\n" : '') .
     (!empty($address['sub_premise']) ? $address['sub_premise'] . "\n" : '') .
@@ -647,7 +631,7 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
     (!empty($address['sub_administrative_area']) ? $address['sub_administrative_area'] . "\n" : '') .
     (!empty($address['administrative_area']) ? $address['administrative_area'] . "\n" : '');
 
-  // Seperate post fields.
+  // Separate post fields.
   if (!empty($address['thoroughfare'])) $data['address1'] = $address['thoroughfare'];
   if (!empty($address['premise'])) $data['address2'] = $address['premise'];
   if (!empty($address['locality'])) $data['town'] = $address['locality'];
@@ -660,8 +644,17 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
   // Invoke the extra post field hook. We do this first so that we can
   // overwrite fields that should not be set by this hook.
   $extra_data = module_invoke_all('commerce_worldpay_bg_post_data', $order, $profile, $settings);
-  if (!is_array($extra_data)) $extra_data = array();
+  if (!is_array($extra_data)) {
+    $extra_data = array();
+  }
 
+  if (!empty($GLOBALS['language']->prefix) && drupal_multilingual()) {
+    $http_host = $_SERVER['HTTP_HOST'] . '/' . !empty($GLOBALS['language']->prefix);
+  }
+  else {
+    $http_host = $_SERVER['HTTP_HOST'];
+  }
+  // @todo wouldn't it be easier to add those values to $data and then do a drupal_alter?
   $data += array_replace($extra_data, array(
     'instId' => $settings['installation_id'],
     'amount' => round(commerce_currency_amount_to_decimal($amount, $currency_code), 2),
@@ -672,11 +665,11 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
     'postcode' => $address['postal_code'],
     'countryString' => $country,
     'email' => $order->mail,
-    // TODO make it possible to select a field to be used for the telephone data
+    // @todo make it possible to select a field to be used for the telephone data
     // 'tel' => $profile->field_telephone,
     'MC_orderId' => $order->order_id,
     'lang' => $settings['payment_parameters']['lang'],
-    'M_http_host' => $_SERVER['HTTP_HOST'],
+    'M_http_host' => $http_host,
     // @see http://www.worldpay.com/support/kb/bg/htmlredirect/rhtml.html
     'signatureFields' => join(':', _commerce_worldpay_bg_md5_signature_fields()),
     'signature' => commerce_worldpay_bg_build_md5(
@@ -703,18 +696,16 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
     $data['paymentType'] = $order->data['commerce_worldpay_bg']['paymentType'];
   }
 
-  // TODO
-  // Implement suppot for authValidFrom and authValidTo in order to prevent
+  // @todo
+  // Implement support for authValidFrom and authValidTo in order to prevent
   // purchases on limited time offers.
 
   // Get the product line item count and build cart description.
   $order_post = '';
-  $order_lines = $order->commerce_line_items[LANGUAGE_NONE];
-  $total_lines = count($order_lines);
+  $commerce_line_items = field_get_items('commerce_order', $order, 'commerce_line_items');
   $prod_count = 0;
-
-  for ($line = 0; $line < $total_lines; $line++) {
-    $line_item = commerce_line_item_load($order_lines[$line]['line_item_id']);
+  foreach ($commerce_line_items as $item) {
+    $line_item = commerce_line_item_load($item['line_item_id']);
     $description = $line_item->line_item_label;
     $quantity = $line_item->quantity;
     //$item_total = $line_item->commerce_unit_price[LANGUAGE_NONE][0]['amount'] / 100;
@@ -744,7 +735,7 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
 
   // Add a custom WorldPay param for product count.
   $data['C_productCount'] = $prod_count;
-  $data['C_lineItemCount'] = $total_lines;
+  $data['C_lineItemCount'] = count($commerce_line_items);
 
   if (!$settings['payment_parameters']['edit_contact']) {
     $data += array(
@@ -773,16 +764,18 @@ function commerce_worldpay_bg_order_form($form, &$form_state, $order, $settings)
   );
 
   if ($settings['debug'] != 'none') {
-    if ($settings['debug'] == 'screen' || $settings['debug'] == 'both')
+    if ($settings['debug'] == 'screen' || $settings['debug'] == 'both') {
       debug($data, 'Post data');
-    if ($settings['debug'] == 'log' || $settings['debug'] == 'both')
-        watchdog(
-          'commerce_worldpay_bg', "Data to be posted for order !order_id:\n <pre>!log</pre>.", 
-          array(
-            '!order_id' => $order->order_id,
-            '!log' => print_r($data, TRUE)
-          ),
-          WATCHDOG_NOTICE);
+    }
+    if ($settings['debug'] == 'log' || $settings['debug'] == 'both') {
+      watchdog(
+        'commerce_worldpay_bg', "Data to be posted for order !order_id:\n <pre>!log</pre>.",
+        array(
+          '!order_id' => $order->order_id,
+          '!log' => print_r($data, TRUE)
+        ),
+        WATCHDOG_NOTICE);
+    }
   }
 
   return $form;
@@ -815,7 +808,8 @@ function commerce_worldpay_bg_redirect_form($form, &$form_state, $order, $paymen
     return array();
   }
 
-  // Disable redirect if debugging - This is a bit of a HACK so probably should go at some point.
+  // Disable redirect if debugging.
+  // @todo This is a bit of a HACK, find a better way for that.
   if ($payment_method['settings']['debug'] == 'screen' || $payment_method['settings']['debug'] == 'both' ) {
     drupal_add_js(';(function($) {Drupal.behaviors.commercePayment = {attach: function (context, settings) {}}})(jQuery);', array('type' => 'inline', 'weight' => 5));
   }
@@ -876,7 +870,7 @@ function commerce_worldpay_bg_valid_url($element, &$form_state, $form) {
  */
 function commerce_worldpay_bg_response_url($method_id = NULL, $https = FALSE) {
   if ($https) {
-    // URL wil fail if https is not of type BOOL
+    // URL will fail if https is not of type BOOL
     $https = TRUE;
   }
   else {
@@ -896,7 +890,7 @@ function commerce_worldpay_bg_response_url($method_id = NULL, $https = FALSE) {
 }
 
 /**
- * Makes sure a password is set if the use password option is checked.
+ * Makes sure a password is set if the "use password" option is checked.
  */
 function _commerce_worldpay_bg_validate_password($element, &$form_state, $form) {
   $values = $form_state['values']['parameter']['payment_method']['settings']['payment_method']['settings'];
@@ -904,7 +898,7 @@ function _commerce_worldpay_bg_validate_password($element, &$form_state, $form)
     if (empty($element['#value'])) {
       form_set_error(
         'parameter][payment_method][settings][payment_method][settings][payment_security][password',
-        t('Please set a password or uncheck "Use WorldPay installation password?" if one is not used.')
+        t('Please set a password or uncheck "Use WorldPay installation password?" if you don\'t use one.')
       );
     }
   }
@@ -917,6 +911,14 @@ function commerce_worldpay_bg_build_md5($wp_sig_fields, $salt) {
   return md5($salt . ':' . join(':', $wp_sig_fields));
 }
 
+/**
+ * @todo document this function
+ *
+ * @param $order_wrapper
+ * @param $installation_id
+ * @param $response_url
+ * @return array
+ */
 function _commerce_worldpay_bg_build_sig_array($order_wrapper, $installation_id, $response_url) {
   // Current fields are: instId, amount, currency, cartId, MC_orderId, C_WORLDPAY_BG_RESPONSE_URL_TOKEN
   $currency_code = $order_wrapper->commerce_order_total->currency_code->value();
diff --git a/includes/commerce_worldpay_bg.page.inc b/includes/commerce_worldpay_bg.page.inc
index 7717d17..6a21c66 100644
--- a/includes/commerce_worldpay_bg.page.inc
+++ b/includes/commerce_worldpay_bg.page.inc
@@ -20,7 +20,6 @@
  * --- Success page or cancel page (resultY.html || resultC.html)
  */
 function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr = array()) {
-  $output = '';
   $order = NULL;
   $skip_process = FALSE;
 
@@ -45,7 +44,7 @@ function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr
       }
     }
 
-    // TODO Is this safe? Can we end up with the wrong payment method from the
+    // @todo Is this safe? Can we end up with the wrong payment method from the
     // Order object?
     if (!$payment_method && !empty($wppr['MC_orderId'])) {
       if ($order = commerce_order_load($wppr['MC_orderId'])) {
@@ -74,9 +73,8 @@ function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr
   }
 
   // If the payment method specifies full IPN logging, do it now.
-  if (!empty($payment_method['settings']['payment_response_logging']) &&
-    $payment_method['settings']['payment_response_logging'] == 'full_wppr'
- ) {
+  if (!empty($payment_method['settings']['payment_response_logging'])
+    && $payment_method['settings']['payment_response_logging'] == 'full_wppr') {
     $full_log = TRUE;
   }
   else {
@@ -91,7 +89,7 @@ function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr
     $ip = ip_address();
 
     if (empty($wppr['transId']) && $wppr['transStatus'] != 'C') {
-      if ($full_log)
+      if ($full_log) {
         watchdog(
           'commerce_worldpay_bg',
           'Request with no transId was sent from <em>@ip</em> with request method <b>@method</b>. Refered by: <b>@referer</b>.',
@@ -101,12 +99,13 @@ function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr
             '@referer' => !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'UNKNOWN',
           ),
           WATCHDOG_NOTICE);
-      return;
+        return;
+      }
     }
 
     if (empty($wppr['MC_orderId'])) {
       drupal_add_http_header('Status', '404 Not Found');
-      if ($full_log)
+      if ($full_log) {
         watchdog(
           'commerce_worldpay_bg',
           'Request with no MC_orderId was sent from <em>@ip</em> with request method <b>@method</b>. Refered by: <b>@referer</b>.',
@@ -116,9 +115,9 @@ function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr
             '@referer' => !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'UNKNOWN'
           ),
           WATCHDOG_NOTICE);
-      return;
+        return;
+      }
     }
-
   }
 
   if ($full_log) {
@@ -156,7 +155,7 @@ function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr
   $order_wrapper = entity_metadata_wrapper('commerce_order', $order);
 
   // Authentication.
-  // TODO Check that the the transId and cartId are part of the same transaction.
+  // @todo Check that the the transId and cartId are part of the same transaction.
   if ($debug_mode && $debug_wppr['skip_auth']) {
     $order->data['payment_redirect_key'] = '123';
   }
@@ -230,13 +229,13 @@ function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr
       $theme_data['settings']['context'] = 'result_cancel';
       if ($prior_wppr) {
         // Don't know if WorldPay ever changes transStatus after its been set
-        // the first time but of it does we update our transaction info
+        // the first time but if it does we update our transaction info
         $tx_data = commerce_worldpay_bg_convert_wppr_to_record($wppr);
         $tx_data = array_replace($prior_wppr, $tx_data);
         commerce_worldpay_bg_txn_save($tx_data);
       }
 
-      // Not totaly sure if this is the right thing to do here?
+      // Not totally sure if this is the right thing to do here?
       commerce_payment_redirect_pane_previous_page($order);
 
       if (!empty($payment_method) and !empty($payment_method['settings']['debug'])) {
@@ -261,14 +260,9 @@ function commerce_worldpay_bg_response_page($payment_method = NULL, $debug_wppr
  */
 function _commerce_worldpay_bg_build_page($theme_data, $type = 'success') {
   drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-  return theme(
-          'commerce_worldpay_bg_html',
-          array(
-            'page' => theme('commerce_worldpay_bg_page', array(
-                'content' => theme('commerce_worldpay_bg_' . $type, $theme_data)
-             ) + $theme_data),
-          ) + $theme_data
-         );
+  $content = theme('commerce_worldpay_bg_' . $type, $theme_data);
+  $page = theme('commerce_worldpay_bg_page', array('content' => $content) + $theme_data);
+  return theme('commerce_worldpay_bg_html', array('page' => $page) + $theme_data);
 }
 
 /**
@@ -287,10 +281,10 @@ function _commerce_worldpay_bg_payment_response_authenticate($order_wrapper, &$w
     }
   }
 
-  // TODO - Is it worth checking the User agent is the one WorldPay uses which is:
+  // @todo - Is it worth checking the User agent is the one WorldPay uses which is:
   // User-Agent: WJHRO/1.0 (WorldPay Java HTTP Request Object).
 
-  // TODO Reverse DNS lookup on IP address.
+  // @todo Reverse DNS lookup on IP address.
 
   if ($failed_authenticaion) {
     drupal_add_http_header('Status', '403 Forbidden');
@@ -338,7 +332,7 @@ function commerce_worldpay_bg_transaction_process($order, $payment_method, &$wpp
   // Set the transaction's statuses based on the IPN's payment_status.
   $transaction->remote_status = $wppr['transStatus'];
 
-  // TODO - Figure out how best to  set status based on SecureCode authentication.
+  // @todo - Figure out how best to  set status based on SecureCode authentication.
   if (isset($wppr['authentication'])) {
     switch ($wppr['authentication']) {
       case 'ARespH.card.authentication.0':
@@ -370,7 +364,7 @@ function commerce_worldpay_bg_transaction_process($order, $payment_method, &$wpp
     // I don't think we should ever see this status at this point but incase
     // we do...
     case 'C':
-      // TODO - Is this a suitable status?
+      // @todo - Is this a suitable status?
       $transaction->status = COMMERCE_PAYMENT_STATUS_FAILURE;
       $transaction->message = t('The user canceled the payment.');
       break;
diff --git a/theme/commerce-worldpay-bg-cancel.tpl.php b/theme/commerce-worldpay-bg-cancel.tpl.php
index dbb3bd4..e8be597 100644
--- a/theme/commerce-worldpay-bg-cancel.tpl.php
+++ b/theme/commerce-worldpay-bg-cancel.tpl.php
@@ -8,9 +8,9 @@
  * tags.
  *
  * We cannot point to any files on this server. They must be uploaded to
- * WorldPay in the installtion control panel and then reference here as:
- *    path="/i/$installtion_id/file.ext"
- * You can optionaly have WorldPay set the installtion_id instead of the one
+ * WorldPay in the installation control panel and then reference here as:
+ *    path="/i/$installation_id/file.ext"
+ * You can optionally have WorldPay set the installation_id instead of the one
  * store in this site by using the WorldPay tag:
  * path="/i/<wpdisplay item=instId>/file.ext">
  * For this reason we do not make use of Drupal's asset attachment features.
@@ -18,13 +18,13 @@
  * @see: http://www.worldpay.com/support/kb/bg/paymentresponse/pr5402.html
  *
  * NOTE this template does not go through the usual theme route so don't
- * expect the same variables availble to html.tpl.php
+ * expect the same variables available to html.tpl.php
  *
  * Variables:
- * - $installtion_id: The WorldPay installtion ID stored in the sites 
- *   Commerece payment settings page.
- * - $order_id: The current Commerec order's ID.
- * - $order_no: The current Commerec order's number.
+ * - $installation_id: The WorldPay installation ID stored in the sites 
+ *   Commerce payment settings page.
+ * - $order_id: The current Commerce order's ID.
+ * - $order_no: The current Commerce order's number.
  * - $content: The rendered content of the page.
  * - $title: The title of the page.
  * - $return_url: The URL to the final page of the Commerce checkout process.
@@ -37,11 +37,11 @@
 ?>
 <header>
   <h1><?php print $title; ?></h1>
-  <p>Payment was cancelled. No funds have been transferred.</p>
+  <p><?php print t('Payment was cancelled. No funds have been transferred.'); ?></p>
   <table>
     <thead>
       <tr>
-        <th>Order No</th>
+        <th><?php print t('Order No'); ?></th>
       </tr>
     </thead>
     <tbody>
@@ -50,5 +50,7 @@
       </tr>
     </tbody>
   </table>
-  <p><a href="<?php print $return_url; ?>">Return to <?php print $site_name ?></a></p>
+  <p>
+    <?php print l(t('Return to') . ' ' . $site_name, $return_url); ?>
+  </p>
 </header>
diff --git a/theme/commerce-worldpay-bg-success.tpl.php b/theme/commerce-worldpay-bg-success.tpl.php
index 0f2164f..a67423f 100644
--- a/theme/commerce-worldpay-bg-success.tpl.php
+++ b/theme/commerce-worldpay-bg-success.tpl.php
@@ -8,9 +8,9 @@
  * tags.
  *
  * We cannot point to any files on this server. They must be uploaded to
- * WorldPay in the installtion control panel and then reference here as:
- *    path="/i/$installtion_id/file.ext"
- * You can optionaly have WorldPay set the installtion_id instead of the one
+ * WorldPay in the installation control panel and then reference here as:
+ *    path="/i/$installation_id/file.ext"
+ * You can optionally have WorldPay set the installation_id instead of the one
  * store in this site by using the WorldPay tag:
  * path="/i/<wpdisplay item=instId>/file.ext">
  * For this reason we do not make use of Drupal's asset attachment features.
@@ -18,13 +18,13 @@
  * @see: http://www.worldpay.com/support/kb/bg/paymentresponse/pr5402.html
  *
  * NOTE this template does not go through the usual theme route so don't
- * expect the same variables availble to html.tpl.php
+ * expect the same variables available to html.tpl.php
  *
  * Variables:
- * - $installtion_id: The WorldPay installtion ID stored in the sites 
- *   Commerece payment settings page.
- * - $order_id: The current Commerec order's ID
- * - $order_no: The current Commerec order's number
+ * - $installation_id: The WorldPay installation ID stored in the sites
+ *   Commerce payment settings page.
+ * - $order_id: The current Commerce order's ID
+ * - $order_no: The current Commerce order's number
  * - $content: The rendered content of the page
  * - $title: The title of the page
  * - $return_url: The URL to the final page of the Commerce checkout process.
@@ -33,16 +33,18 @@
  *   page.
  *
  * @see template_preprocess_commerce_worldpay_bg_success()
+ * @todo find a way to print the merchant id under the transaction id:
+ * <span><?php print t('Merchant\'s Reference:'); ?>&nbsp;</span><span><b></b></span><br>
  */
 ?>
 <header>
   <h1><?php print $title; ?></h1>
-  <p>Your transaction was successfuly recieved by WorldPay. Thank you.</p>
+  <p><?php t('Your transaction was successfuly recieved by WorldPay. Thank you.'); ?></p>
   <table class="bartik">
     <thead>
       <tr>
-        <th>Order No</th>
-        <th>WorldPay transaction code</th>
+        <th><?php print t('Order No'); ?></th>
+        <th><?php print t('WorldPay transaction code'); ?></th>
       </tr>
     </thead>
     <tbody>
@@ -53,7 +55,7 @@
     </tbody>
   </table>
   <?php if (!$settings['theme_debug']): ?>
-  <WPDISPLAY ITEM=banner>
+    <WPDISPLAY ITEM=banner>
   <?php else: ?>
   <table border="0" cellpadding="0" cellspacing="0" class="bannercontainer">
   <tbody>
@@ -61,17 +63,18 @@
     <td>
       <table cellpadding="2" cellspacing="0" class="banner">
         <tbody>
-          <tr valign="top">
-            <td class="bannererror">
-              <span style=" font-family: ; font-size: ;">This was NOT a live transaction - no money has changed hands</span></td>
-            </tr>
+            <?php if (!$settings['theme_debug']): ?>
+              <tr valign="top">
+                <td class="bannererror">
+                  <span><?php print t('This was NOT a live transaction - no money has changed hands'); ?></span>
+                </td>
+              </tr>
+            <?php endif; ?>
             <tr valign="top">
               <td class="banner">
-                <span style=" font-family: ; font-size: ; color: ;">Thank you, your payment was successful</span><br>
-                <span style=" font-family: ; font-size: ; color: ;">Merchant's Reference:&nbsp;</span>
-                <span style=" font-family: ;"><b>5</b></span><br>
-                <span style=" font-family: ; font-size: ; color: ;">WorldPay Transaction ID:&nbsp;</span>
-                <span style=" font-family: ;"><b>128246379</b></span><br>
+                <span><?php print t('Thank you, your payment was successful'); ?></span><br>
+                <span><?php print t('WorldPay Transaction ID:'); ?>&nbsp;</span>
+                <span><b><?php print $wp_txn_id; ?></b></span><br>
               </td>
             </tr>
         </tbody>
@@ -81,6 +84,7 @@
   </tbody>
   </table>
   <?php endif; ?>
-  
-  <p id="return-url"><a href="<?php print $return_url; ?>">Finish your order</a></p>
+  <p id="return-url">
+    <?php print l(t('Finish your order'), $return_url, array('absolute' => TRUE)); ?>
+  </p>
 </header>
