diff --git a/includes/recurly.admin.inc b/includes/recurly.admin.inc
index 2e0231e..36a8ecd 100644
--- a/includes/recurly.admin.inc
+++ b/includes/recurly.admin.inc
@@ -12,7 +12,7 @@ function recurly_settings_form($form, &$form_state) {
   // Recommend setting some subscription plans if not enabled.
   $plan_options = array_filter(variable_get('recurly_subscription_plans', array()));
   if (empty($plan_options) && variable_get('recurly_private_api_key', '') && variable_get('recurly_pages', '1')) {
-    drupal_set_message(t('Recurly built-in pages are enabled, but no plans have yet been enabled. Enable plans on the <a href="!url">Subscription Plans page</a>.', array('!url' => url('admin/config/services/recurly/subscription-plans'))), 'warning', FALSE);
+    drupal_set_message(check_plain('Recurly built-in pages are enabled, but no plans have yet been enabled. Enable plans on the <a href="!url">Subscription Plans page</a>.', array('!url' => url('admin/config/services/recurly/subscription-plans'))), 'warning', FALSE);
   }
 
   // Add form elements to collect default account information.
diff --git a/includes/recurly.pages.inc b/includes/recurly.pages.inc
index 22af586..73bd56e 100644
--- a/includes/recurly.pages.inc
+++ b/includes/recurly.pages.inc
@@ -665,7 +665,7 @@ function recurly_subscription_cancel_confirm($form, $form_state, $entity_type, $
   );
   $form['cancel']['description'] = array(
     '#type' => 'markup',
-    '#markup' => '<p>' . t('Canceling a subscription will cause it not to renew. If you cancel the subscription, it will continue until <strong>@date</strong>. On that date, the subscription will expire and not be invoiced again. The subscription can be reactivated before it expires.', array('@date' => recurly_format_date($subscription->current_period_ends_at)))  . '</p>',
+    '#markup' => '<p>' . t('Canceling a subscription will cause it not to renew. If you cancel the subscription, it will continue until <strong>@date</strong>. On that date, the subscription will expire and not be invoiced again. The subscription can be reactivated before it expires.', array('@date' => recurly_format_date($subscription->current_period_ends_at))) . '</p>',
   );
   $form['cancel']['actions'] = array(
     '#type' => 'actions',
@@ -1042,7 +1042,7 @@ function recurly_subscription_redeem_coupon_submit($form, &$form_state) {
   if ($account && $coupon && $account->redemption) {
     // If the user already has a coupon, rebuild the form and ask confirmation.
     if (empty($form_state['confirmed'])) {
-      drupal_set_message('You already have an active coupon, are you sure you want to replace it?', 'warning');
+      drupal_set_message(t('You already have an active coupon, are you sure you want to replace it?', 'warning'));
       $form_state['confirm'] = TRUE;
       $form_state['rebuild'] = TRUE;
       return;
@@ -1063,7 +1063,7 @@ function recurly_subscription_redeem_coupon_submit($form, &$form_state) {
     drupal_set_message(t('Unable to redeem the coupon @code, the coupon may no longer be valid.', array('@code' => $coupon->coupon_code)), 'error');
   }
   else {
-    drupal_set_message(t('The coupon !coupon has been applied to your account and will be redeemed the next time your subscription renews.', array('!coupon' => recurly_format_coupon($coupon, $form_state['values']['coupon_currency']))));
+    drupal_set_message(check_plain('The coupon !coupon has been applied to your account and will be redeemed the next time your subscription renews.', array('!coupon' => recurly_format_coupon($coupon, $form_state['values']['coupon_currency']))));
   }
 }
 
diff --git a/recurly.module b/recurly.module
index 94ef60c..b4e6f0e 100644
--- a/recurly.module
+++ b/recurly.module
@@ -614,7 +614,7 @@ function recurly_client_initialize($settings = NULL, $reset = FALSE) {
     require_once $path . '/lib/recurly.php';
 
     // Required for the API.
-    Recurly_Client::$apiKey = $settings['api_key'];
+    Recurly_Client::$apikey = $settings['api_key'];
   }
   else {
     watchdog('recurly', 'Could not find the Recurly PHP client library in sites/all/libraries/recurly.', array(), WATCHDOG_ERROR);
