diff --git a/password_encrypt.install b/password_encrypt.install
index bf99683..76277a2 100644
--- a/password_encrypt.install
+++ b/password_encrypt.install
@@ -42,13 +42,13 @@ function password_encrypt_requirements($phase) {
 /**
  * Implements hook_install().
  */
-function password_encrypt_install(){
+function password_encrypt_install() {
   variable_set('password_encrypt_passkey', bin2hex(openssl_random_pseudo_bytes(16)));
 }
 
 /**
  * Implements hook_uninstall().
  */
-function password_encrypt_uninstall(){
+function password_encrypt_uninstall() {
   variable_del('password_encrypt_passkey');
 }
diff --git a/password_encrypt.module b/password_encrypt.module
index bcbe3ee..e58daf7 100644
--- a/password_encrypt.module
+++ b/password_encrypt.module
@@ -42,12 +42,12 @@ function password_encrypt_help($path, $arg) {
  * Implements hook_init().
  */
 function password_encrypt_init() {
-  global $passkey;
-  $passkey = variable_get('password_encrypt_passkey');
+  global $_passkey;
+  $_passkey = variable_get('password_encrypt_passkey');
 
   drupal_add_js([
     'password_encrypt' => [
-      'passkey' => $passkey,
+      'passkey' => $_passkey,
     ],
   ], [
     'type' => 'setting',
@@ -71,10 +71,10 @@ function password_encrypt_init() {
 /**
  * Implements hook_menu().
  */
-function password_encrypt_menu(){
+function password_encrypt_menu() {
   $items = [];
   $items['admin/config/people/password-encrypt'] = [
-    'title' => t('Password encrypt settings'),
+    'title' => 'Password encrypt settings',
     'page callback' => 'drupal_get_form',
     'page arguments' => [
       'password_encrypt_settings_form',
@@ -83,7 +83,7 @@ function password_encrypt_menu(){
       'password encrypt administrator',
     ],
     'type' => MENU_NORMAL_ITEM,
-    'description' => t('Administer the pass key configuration for encryption and decryption of user forms.'),
+    'description' => 'Administer the pass key configuration for encryption and decryption of user forms.',
   ];
 
   return $items;
@@ -117,7 +117,7 @@ function password_encrypt_settings_form() {
 }
 
 /**
- * Implements hook_form_alter()
+ * Implements hook_form_alter().
  */
 function password_encrypt_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == 'user_login' || $form_id == 'user_register_form' || $form_id == 'user_profile_form') {
@@ -129,67 +129,75 @@ function password_encrypt_form_alter(&$form, &$form_state, $form_id) {
  * Called to encrypt user password.
  */
 function password_encrypt_user_decrypt_password($form, &$form_state) {
-  global $passkey;
+  global $_passkey;
   $encrypted_pass = $form_state['values']['pass'];
-  $decrypted_pass = password_encrypt_cryptoJsAesDecrypt($passkey, $encrypted_pass);
+  $decrypted_pass = password_encrypt_crypto_js_aes_decrypt($_passkey, $encrypted_pass);
   $form_state['values']['pass'] = $decrypted_pass;
 }
 
 /**
  * Helper function for CryptoJS AES encryption/decryption.
+ *
  * Allow you to use AES encryption on client side and server side vice versa.
+ *
  * Decrypt data from a CryptoJS json encoding string.
  *
  * @param string $passphrase
+ *   String passphrase.
  * @param string $jsonString
+ *   String jsonString.
  *
  * @return string
+ *   String {@inheritdoc}.
  */
-function password_encrypt_cryptoJsAesDecrypt($passphrase, $jsonString) {
-  $jsondata = json_decode($jsonString, true);
+function password_encrypt_crypto_js_aes_decrypt($passphrase, $jsonString) {
+  $jsondata = json_decode($jsonString, TRUE);
 
   try {
     $salt = hex2bin($jsondata["s"]);
     $iv = hex2bin($jsondata["iv"]);
   }
   catch (Exception $e) {
-    return null;
+    return NULL;
   }
 
   $ct = base64_decode($jsondata["ct"]);
   $concatedPassphrase = $passphrase . $salt;
   $md5 = array();
-  $md5[0] = md5($concatedPassphrase, true);
+  $md5[0] = md5($concatedPassphrase, TRUE);
   $result = $md5[0];
-  for($i = 1; $i < 3; $i ++) {
-    $md5[$i] = md5($md5[$i - 1] . $concatedPassphrase, true);
+  for ($i = 1; $i < 3; $i++) {
+    $md5[$i] = md5($md5[$i - 1] . $concatedPassphrase, TRUE);
     $result .= $md5[$i];
   }
   $key = substr($result, 0, 32);
-  $data = openssl_decrypt($ct, 'aes-256-cbc', $key, true, $iv);
+  $data = openssl_decrypt($ct, 'aes-256-cbc', $key, TRUE, $iv);
 
-  return json_decode($data, true);
+  return json_decode($data, TRUE);
 }
 
 /**
  * Encrypt value to a cryptojs compatiable json encoding string.
  *
  * @param string $passphrase
+ *   String passphrase.
  * @param string $value
+ *   String value.
  *
  * @return string
+ *   String {@inheritdoc}.
  */
-function password_encrypt_cryptoJsAesEncrypt($passphrase, $value) {
+function password_encrypt_crypto_js_aes_encrypt($passphrase, $value) {
   $salt = openssl_random_pseudo_bytes(8);
   $salted = '';
   $dx = '';
   while (strlen($salted) < 48) {
-    $dx = md5($dx . $passphrase . $salt, true);
+    $dx = md5($dx . $passphrase . $salt, TRUE);
     $salted .= $dx;
   }
   $key = substr($salted, 0, 32);
   $iv = substr($salted, 32, 16);
-  $encrypted_data = openssl_encrypt(json_encode($value), 'aes-256-cbc', $key, true, $iv);
+  $encrypted_data = openssl_encrypt(json_encode($value), 'aes-256-cbc', $key, TRUE, $iv);
   $data = [
     "ct" => base64_encode($encrypted_data),
     "iv" => bin2hex($iv),
