diff --git a/recaptcha.module b/recaptcha.module
index e3dfb3e..5530818 100644
--- a/recaptcha.module
+++ b/recaptcha.module
@@ -11,6 +11,8 @@ require_once dirname(__FILE__) . '/recaptcha-php/src/ReCaptcha/RequestParameters
 require_once dirname(__FILE__) . '/recaptcha-php/src/ReCaptcha/Response.php';
 require_once dirname(__FILE__) . '/src/ReCaptcha/RequestMethod/Drupal7Post.php';
 
+use \ReCaptcha;
+
 /**
  * Implements hook_help().
  */
@@ -68,7 +70,7 @@ function recaptcha_permission() {
 /**
  * Implements hook_captcha().
  */
-function recaptcha_captcha($op, $captcha_type = '',  $captcha_sid = '') {
+function recaptcha_captcha($op, $captcha_type = '', $captcha_sid = '') {
   global $language;
 
   switch ($op) {
@@ -101,7 +103,7 @@ function recaptcha_captcha($op, $captcha_type = '',  $captcha_sid = '') {
           }
 
           $attributes = array(
-            'id'=>'g-recaptcha'.$captcha_sid,
+            'id' => 'g-recaptcha' . $captcha_sid,
             'class' => 'g-recaptcha',
             'data-sitekey' => $recaptcha_site_key,
             'data-theme' => variable_get('recaptcha_theme', 'light'),
@@ -150,11 +152,13 @@ JS;
             '#tag' => 'script',
             '#value' => $onload_js,
             '#weight' => -1,
-           );
+          );
           drupal_add_html_head($data, 'recaptcha_onload');
 
-          // @todo: #1664602: D7 does not yet support "async" in drupal_add_js().
-          // drupal_add_js(url('https://www.google.com/recaptcha/api.js', array('query' => array('hl' => $language->language), 'absolute' => TRUE)), array('defer' => TRUE, 'async' => TRUE, 'type' => 'external'));
+          /*
+          @todo: #1664602: D7 does not yet support "async" in drupal_add_js().
+          drupal_add_js(url('https://www.google.com/recaptcha/api.js', array('query' => array('hl' => $language->language), 'absolute' => TRUE)), array('defer' => TRUE, 'async' => TRUE, 'type' => 'external'));
+          */
           $data = array(
             '#tag' => 'script',
             '#value' => '',
@@ -162,13 +166,12 @@ JS;
             '#attributes' => array(
               'src' => url('https://www.google.com/recaptcha/api.js', array(
                 'absolute' => TRUE,
-                  'query' => array(
-                    'hl' => $language->language,
-                    'onload' => 'recaptchaOnLoad',
-                    'render' => 'explicit',
-                  ),
-                )
-              ),
+                'query' => array(
+                  'hl' => $language->language,
+                  'onload' => 'recaptchaOnLoad',
+                  'render' => 'explicit',
+                ),
+              )),
               'async' => 'async',
               'defer' => 'defer',
             ),
@@ -233,5 +236,11 @@ function recaptcha_captcha_validation($solution, $response, $element, $form_stat
 function template_preprocess_recaptcha_widget_noscript(&$variables) {
   $variables['sitekey']  = check_plain($variables['widget']['sitekey']);
   $variables['language'] = check_plain($variables['widget']['language']);
-  $variables['url']      = check_url(url('https://www.google.com/recaptcha/api/fallback', array('query' => array('k' => $variables['widget']['sitekey'], 'hl' => $variables['widget']['language']), 'absolute' => TRUE)));
+  $variables['url']      = check_url(url('https://www.google.com/recaptcha/api/fallback', array(
+    'query' => array(
+      'k' => $variables['widget']['sitekey'],
+      'hl' => $variables['widget']['language']
+    ),
+    'absolute' => TRUE
+  )));
 }
diff --git a/recaptcha.test b/recaptcha.test
index 0d35de6..3e8c1fc 100644
--- a/recaptcha.test
+++ b/recaptcha.test
@@ -4,6 +4,10 @@
  * @file
  * Tests for reCAPTCHA module.
  */
+
+/**
+ * Helper class for ReCaptcha test cases.
+ */
 class ReCaptchaBasicTest extends DrupalWebTestCase {
 
   /**
@@ -21,7 +25,7 @@ class ReCaptchaBasicTest extends DrupalWebTestCase {
   /**
    * {@inheritdoc}
    */
-  function setUp() {
+  public function setUp() {
     parent::setUp('captcha', 'recaptcha');
     module_load_include('inc', 'captcha');
 
@@ -45,7 +49,7 @@ class ReCaptchaBasicTest extends DrupalWebTestCase {
   /**
    * Test access to the administration page.
    */
-  function testReCaptchaAdminAccess() {
+  public function testReCaptchaAdminAccess() {
     $this->drupalLogin($this->admin_user);
     $this->drupalGet('admin/config/people/captcha/recaptcha');
     $this->assertNoText(t('Access denied'), 'Admin users should be able to access the reCAPTCHA admin page', 'reCAPTCHA');
@@ -55,7 +59,7 @@ class ReCaptchaBasicTest extends DrupalWebTestCase {
   /**
    * Test the reCAPTCHA settings form.
    */
-  function testReCaptchaAdminSettingsForm() {
+  public function testReCaptchaAdminSettingsForm() {
     $this->drupalLogin($this->admin_user);
 
     $site_key = $this->randomName(40);
@@ -88,7 +92,7 @@ class ReCaptchaBasicTest extends DrupalWebTestCase {
   /**
    * Testing the protection of the user login form.
    */
-  function testReCaptchaOnLoginForm() {
+  public function testReCaptchaOnLoginForm() {
     global $language;
 
     $site_key = $this->randomName(40);;
@@ -174,7 +178,7 @@ class ReCaptchaBasicTest extends DrupalWebTestCase {
     // Check for error message.
     $this->assertText(t('The answer you entered for the CAPTCHA was not correct.'), 'CAPTCHA should block user login form', 'reCAPTCHA');
 
-    // And make sure that user is not logged in: check for name and password fields on ?q=user
+    // And make sure that user is not logged in: check for name and password fields on ?q=user.
     $this->drupalGet('user');
     $this->assertField('name', t('Username field found.'), 'reCAPTCHA');
     $this->assertField('pass', t('Password field found.'), 'reCAPTCHA');
