diff --git a/protected_node.install b/protected_node.install
index 2a58a6a..0421d30 100644
--- a/protected_node.install
+++ b/protected_node.install
@@ -103,12 +103,13 @@ function protected_node_update_7100() {
  */
 function protected_node_update_7101() {
   db_change_field('protected_nodes', 'protected_node_passwd', 'protected_node_passwd', array(
-    'description' => 'The sha1/sha256 hashed password for the given node.',
-    'type' => 'char',
-    'length' => 128,
-    'not null' => TRUE,
-    'default' => '',
-  ));
+      'description' => 'The sha1/sha256 hashed password for the given node.',
+      'type' => 'char',
+      'length' => 128,
+      'not null' => TRUE,
+      'default' => '',
+    )
+  );
 }
 
 /**
diff --git a/protected_node.module b/protected_node.module
index 90711f2..af4bacb 100644
--- a/protected_node.module
+++ b/protected_node.module
@@ -229,7 +229,7 @@ function protected_node_init() {
  * @param string $op
  *   Operation: 'access', 'view', 'edit', or 'delete'.
  *
- * @return false
+ * @return FALSE
  *   if the node is not protected for the current user.
  *   Return TRUE if it is protected and cannot be viewed by the current user.
  *   Return $nid if the user has a chance to unlock this protected node by
@@ -731,6 +731,7 @@ function protected_node_protected_node_hide(&$node) {
   }
 }
 
+
 /**
  * Implements hook_file_download().
  */
@@ -1183,22 +1184,22 @@ function protected_node_set_protected($param, $passwd = NULL) {
       if (empty($passwd)) {
         // In this case, an empty password is fine.
         $result = db_update('protected_nodes')
-          ->fields(array(
-            'protected_node_is_protected' => 1,
-          ))
-          ->condition('nid', $node->nid)
-          ->execute() !== FALSE;
+            ->fields(array(
+              'protected_node_is_protected' => 1,
+            ))
+            ->condition('nid', $node->nid)
+            ->execute() !== FALSE;
       }
       else {
         // We have to also update the password in this case.
         $result = db_update('protected_nodes')
-          ->fields(array(
-            'protected_node_is_protected' => 1,
-            'protected_node_passwd' => hash('sha256', $passwd),
-            'protected_node_passwd_changed' => REQUEST_TIME,
-          ))
-          ->condition('nid', $node->nid)
-          ->execute() !== FALSE;
+            ->fields(array(
+              'protected_node_is_protected' => 1,
+              'protected_node_passwd' => hash('sha256', $passwd),
+              'protected_node_passwd_changed' => REQUEST_TIME,
+            ))
+            ->condition('nid', $node->nid)
+            ->execute() !== FALSE;
       }
     }
     else {
@@ -1210,13 +1211,13 @@ function protected_node_set_protected($param, $passwd = NULL) {
         $passwd = hash('sha256', $passwd);
       }
       $result = db_insert('protected_nodes')
-        ->fields(array(
-          'nid' => $node->nid,
-          'protected_node_is_protected' => 1,
-          'protected_node_passwd' => $passwd,
-          'protected_node_show_title' => variable_get('protected_node_show_node_titles', FALSE),
-        ))
-        ->execute() !== FALSE;
+          ->fields(array(
+            'nid' => $node->nid,
+            'protected_node_is_protected' => 1,
+            'protected_node_passwd' => $passwd,
+            'protected_node_show_title' => variable_get('protected_node_show_node_titles', FALSE),
+          ))
+          ->execute() !== FALSE;
     }
   }
   else {
@@ -1227,12 +1228,12 @@ function protected_node_set_protected($param, $passwd = NULL) {
     }
 
     $result = db_update('protected_nodes')
-      ->fields(array(
-        'protected_node_passwd' => hash('sha256', $passwd),
-        'protected_node_passwd_changed' => REQUEST_TIME,
-      ))
-      ->condition('nid', $node->nid)
-      ->execute() !== FALSE;
+        ->fields(array(
+          'protected_node_passwd' => hash('sha256', $passwd),
+          'protected_node_passwd_changed' => REQUEST_TIME,
+        ))
+        ->condition('nid', $node->nid)
+        ->execute() !== FALSE;
   }
 
   return $result;
@@ -1259,10 +1260,10 @@ function protected_node_set_protected($param, $passwd = NULL) {
  */
 function protected_node_unset_protected($nid) {
   $result = db_select('protected_nodes')
-    ->fields('protected_nodes', array('protected_node_is_protected'))
-    ->condition('nid', $nid)
-    ->execute()
-    ->fetchField() == 1;
+      ->fields('protected_nodes', array('protected_node_is_protected'))
+      ->condition('nid', $nid)
+      ->execute()
+      ->fetchField() == 1;
 
   db_update('protected_nodes')
     ->fields(array(
@@ -1293,10 +1294,10 @@ function protected_node_isset_protected($nid) {
   }
 
   $result = db_select('protected_nodes')
-    ->fields('protected_nodes', array('protected_node_is_protected'))
-    ->condition('nid', $nid)
-    ->execute()
-    ->fetchField() == 1;
+      ->fields('protected_nodes', array('protected_node_is_protected'))
+      ->condition('nid', $nid)
+      ->execute()
+      ->fetchField() == 1;
 
   return $result;
 }
@@ -1425,6 +1426,7 @@ function _protected_node_get_failed_password_ip_limit_options() {
   ));
 }
 
+
 /**
  * Helper function.
  *
diff --git a/protected_node.settings.inc b/protected_node.settings.inc
index e1f7c8f..eeda66b 100644
--- a/protected_node.settings.inc
+++ b/protected_node.settings.inc
@@ -67,13 +67,85 @@ function protected_node_menu_array() {
     'file' => 'protected_node.admin.inc',
     'weight' => -9,
   );
+  $tab_weight = 0;
   $items['admin/config/content/protected_node'] = array(
     'title' => 'Protected node',
     'description' => 'Edit the global Protected node settings',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('protected_node_admin_settings'),
+    'page arguments' => array('protected_node_admin_settings_statistics'),
     'access arguments' => array('administer site configuration'),
     'file' => 'protected_node.settings.inc',
+    'weight' => $tab_weight++,
+  );
+  $items['admin/config/content/protected_node/statistics'] = array(
+    'title' => 'Protected node',
+    'description' => 'Edit the global Protected node settings',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('protected_node_admin_settings_statistics'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'protected_node.settings.inc',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'weight' => $tab_weight++,
+  );
+  $items['admin/config/content/protected_node/security'] = array(
+    'title' => 'Security',
+    'description' => 'Edit the global Protected node security settings',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('protected_node_admin_settings_security'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'protected_node.settings.inc',
+    'type' => MENU_LOCAL_TASK,
+    'weight' => $tab_weight++,
+  );
+  $items['admin/config/content/protected_node/auto_email'] = array(
+    'title' => 'Auto Email',
+    'description' => 'Edit the global Protected node auto email settings',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('protected_node_admin_settings_auto_email'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'protected_node.settings.inc',
+    'type' => MENU_LOCAL_TASK,
+    'weight' => $tab_weight++,
+  );
+  $items['admin/config/content/protected_node/form'] = array(
+    'title' => 'Form',
+    'description' => 'Edit the global Protected node form settings',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('protected_node_admin_settings_form'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'protected_node.settings.inc',
+    'type' => MENU_LOCAL_TASK,
+    'weight' => $tab_weight++,
+  );
+  $items['admin/config/content/protected_node/token'] = array(
+    'title' => 'Token',
+    'description' => 'Edit the global Protected node form settings',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('protected_node_admin_settings_token'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'protected_node.settings.inc',
+    'type' => MENU_LOCAL_TASK,
+    'weight' => $tab_weight++,
+  );
+  $items['admin/config/content/protected_node/flood_control'] = array(
+    'title' => 'Flood Control',
+    'description' => 'Edit the global Protected node flood control settings',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('protected_node_admin_settings_flood_control'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'protected_node.settings.inc',
+    'type' => MENU_LOCAL_TASK,
+    'weight' => $tab_weight++,
+  );
+  $items['admin/config/content/protected_node/view_modes'] = array(
+    'title' => 'View Modes',
+    'description' => 'Edit the global Protected node view modes settings',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('protected_node_admin_settings_view_modes'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'protected_node.settings.inc',
+    'type' => MENU_LOCAL_TASK,
+    'weight' => $tab_weight++,
   );
   $items['protected-node'] = array(
     'title' => 'Protected page - Enter Password',
@@ -284,7 +356,7 @@ function protected_node_node_form_alter(&$form) {
  * @return array
  *   $form The settings form
  */
-function protected_node_admin_settings() {
+function protected_node_admin_settings_statistics() {
 
   // Total.
   $total_count = db_select('node')
@@ -329,7 +401,6 @@ function protected_node_admin_settings() {
     $form['protected_node_stats'] = array(
       '#type' => 'fieldset',
       '#title' => t('Protected node statistics'),
-      '#collapsible' => TRUE,
     );
 
     $column_labels = array(
@@ -428,11 +499,111 @@ function protected_node_admin_settings() {
     );
   }
 
+  // Clear Sessions button.
+  $form['protected_node_clear_sessions'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Clear sessions'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => t('Click on this button to reset all the Protected Node password sessions of your website. This means all the users who entered a password in the past will now have to log back in to review their node protection.'),
+  );
+  $form['protected_node_clear_sessions']['protected_node_clear_sessions_button'] = array(
+    '#type' => 'submit',
+    '#value' => t('Clear sessions'),
+    '#submit' => array('protected_node_action_clear_sessions'),
+  );
+
+  // Reset passwords button.
+  $form['protected_node_reset_passwords'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Reset passwords'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => t('WARNING: this feature sets a password on nodes that were otherwise expected to use the global password.'),
+  );
+  $form['protected_node_reset_passwords']['protected_node_reset_passwords_password'] = array(
+    '#type' => 'password_confirm',
+    '#title' => t('New Protected Nodes password'),
+    '#description' => t('Enter the new password that will be assigned to all existing protected nodes.'),
+  );
+  $form['protected_node_reset_passwords']['protected_node_reset_passwords_button'] = array(
+    '#type' => 'submit',
+    '#value' => t('Reset all existing passwords'),
+    '#submit' => array('protected_node_action_reset_passwords'),
+  );
+
+  // Remove passwords button.
+  $form['protected_node_remove_passwords'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Use global password'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => '<span style="color: red;">' . t('WARNING: this function deletes all the individual passwords. Make sure you have authorized the use of global password.') . '</span>',
+  );
+  $form['protected_node_remove_passwords']['protected_node_remove_passwords_button'] = array(
+    '#type' => 'submit',
+    '#value' => t('Use global password on ALL nodes'),
+    '#submit' => array('protected_node_action_remove_passwords'),
+  );
+
+  // Remove protection button.
+  $form['protected_node_remove_protection'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Remove protection'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => '<span style="color: red;">' . t('WARNING: this function unprotects all your currently protected nodes! The password is not modifiable.') . '</span>',
+  );
+  $form['protected_node_remove_protection']['protected_node_remove_protection_button'] = array(
+    '#type' => 'submit',
+    '#value' => t('Remove password protection from all nodes'),
+    '#submit' => array('protected_node_action_unprotected_all'),
+  );
+
+  // Protect ALL nodes buttons.
+  $form['protected_node_protect_nodes'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Protect nodes'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => t('WARNING: this function protects ALL your nodes making them accessible only when the password is known. Nodes that do not yet have a password will make use of the global password. You may use the Reset password feature to change that password afterwards.'),
+  );
+  $form['protected_node_protect_nodes']['protected_node_protect_all_nodes_button'] = array(
+    '#type' => 'submit',
+    '#value' => t('Protect ALL nodes'),
+    '#submit' => array('protected_node_action_protect_all_nodes'),
+  );
+
+  // Re-protect nodes buttons.
+  $form['protected_node_protect_password'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Restore protection'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => t('WARNING: this function re-protects the nodes that had a password and got unprotected.'),
+  );
+  $form['protected_node_protect_password']['protected_node_protect_nodes_with_password_button'] = array(
+    '#type' => 'submit',
+    '#value' => t('Protect nodes that already have a password'),
+    '#submit' => array('protected_node_action_protect_nodes_with_password'),
+  );
+
+  
+  return $form;
+}
+
+/**
+ * Define the settings form.
+ *
+ * @return array
+ *   $form The settings form
+ */
+function protected_node_admin_settings_security() {
+
   // Security related options.
   $form['protected_node_security'] = array(
     '#type' => 'fieldset',
     '#title' => t('Protected node security'),
-    '#collapsible' => TRUE,
   );
 
   $form['protected_node_security']['protected_node_use_global_password'] = array(
@@ -475,11 +646,60 @@ function protected_node_admin_settings() {
     '#description' => t('By default, the password is kept as secret as possible. This option allows the author to enter a hint about the password of a node. The hint can later be shown using the [node:password-hint] token.'),
   );
 
+  $form['#validate'][] = '_protected_node_admin_settings_security_validate';
+  $form['#submit'][] = '_protected_node_admin_settings_security_submit';
+
+  return system_settings_form($form);
+}
+
+/**
+ * Validate the submitted security settings form.
+ *
+ * This function verifies that a global password is defined if the user
+ * defines that the global password should be used by default.
+ */
+function _protected_node_admin_settings_security_validate($form, &$form_state) {
+  // Make sure that a password is included if a global password is required
+  // and none was ever submitted before.
+  switch ($form_state['values']['protected_node_use_global_password']) {
+    case PROTECTED_NODE_PER_NODE_AND_GLOBAL_PASSWORD:
+    case PROTECTED_NODE_GLOBAL_PASSWORD:
+      if (!$form_state['values']['protected_node_global_password_field']
+       && !variable_get('protected_node_global_password', '')) {
+        form_error($form['protected_node_security']['protected_node_global_password_field'],
+          t('A global password is required to make use of the global password functionality.'));
+      }
+      break;
+  }
+}
+
+/**
+ * Security form submit handler.
+ *
+ * Submitting the form requires a little bit of work for the password.
+ * We need to encrypt it.
+ */
+function _protected_node_admin_settings_security_submit($form, &$form_state) {
+  $passwd = $form_state['values']['protected_node_global_password_field'];
+  if ($passwd) {
+    variable_set('protected_node_global_password', hash('sha256', $passwd));
+    unset($form_state['values']['protected_node_global_password_field']);
+    variable_del('protected_node_global_password_field');
+  }
+  // Never reset the password...
+}
+
+/**
+ * Define the settings form.
+ *
+ * @return array
+ *   $form The settings form
+ */
+function protected_node_admin_settings_auto_email() {
   $form['protected_node_auto_email'] = array(
     '#type' => 'fieldset',
     '#title' => t('Protected node email support'),
     '#description' => t('This setting allows users who have access to protect a node to send an email about the protected node.'),
-    '#collapsible' => TRUE,
   );
 
   $form['protected_node_auto_email']['protected_node_email_activation'] = array(
@@ -564,10 +784,57 @@ function protected_node_admin_settings() {
     ),
   );
 
+  $form['#validate'][] = '_protected_node_admin_settings_auto_email_validate';
+
+  return system_settings_form($form);
+}
+
+/**
+ * Validate the submitted auto email settings form.
+ *
+ */
+function _protected_node_admin_settings_auto_email_validate($form, &$form_state) {
+
+  // Email box width.
+  $width = $form_state['values']['protected_node_email_box_width'];
+  if (!is_numeric($width)) {
+    form_set_error('protected_node_email_box_width', t('You must enter a number for the width of the email box.'));
+  }
+  else {
+    if ($width < 0) {
+      form_set_error('protected_node_email_box_width', t('The width of the email box must be positive.'));
+    }
+  }
+
+  // Email box height.
+  $height = $form_state['values']['protected_node_email_box_height'];
+  if (!is_numeric($height)) {
+    form_set_error('protected_node_email_box_height', t('You must enter a number for the height of the email box.'));
+  }
+  else {
+    if ($height < 0) {
+      form_set_error('protected_node_email_box_height', t('The height of the email box must be positive.'));
+    }
+  }
+
+  if ($form_state['values']['protected_node_email_from']) {
+    if (!valid_email_address($form_state['values']['protected_node_email_from'])) {
+      form_error($form['protected_node_auto_email']['protected_node_email_from'],
+        t('The From email address is not valid.'));
+    }
+  }
+}
+
+/**
+ * Define the settings form.
+ *
+ * @return array
+ *   $form The settings form
+ */
+function protected_node_admin_settings_form() {
   $form['protected_node_form'] = array(
     '#type' => 'fieldset',
     '#title' => t('Protected node form'),
-    '#collapsible' => TRUE,
   );
 
   $form['protected_node_form']['protected_node_cancel'] = array(
@@ -605,6 +872,17 @@ function protected_node_admin_settings() {
     '#description' => t('Enter the text for the password label appearing on the password page. The default (when empty) is the node type name followed by the word "password". You can use tokens provided by the token module if installed.'),
   );
 
+  return system_settings_form($form);
+
+}
+
+/**
+ * Define the token settings form.
+ *
+ * @return array
+ *   $form The settings form
+ */
+function protected_node_admin_settings_token() {
   if (module_exists('token')) {
     $vars = array(
       'token_types' => array('global', 'node', 'user'),
@@ -614,12 +892,25 @@ function protected_node_admin_settings() {
       '#description' => t("WARNING: the user tokens should only be used if anonymous users cannot access protected nodes; otherwise the result may not be what you'd expect."),
     );
   }
+  else {
+    $form['#markup'] = t('Token module not installed.');
+  }
+
+  return system_settings_form($form);
+}
+
+/**
+ * Define the settings form.
+ *
+ * @return array
+ *   $form The settings form
+ */
+function protected_node_admin_settings_flood_control() {
 
   // Flood control options.
   $form['protected_node_flood_control'] = array(
     '#type' => 'fieldset',
     '#title' => t('Protected node flood control'),
-    '#collapsible' => TRUE,
   );
 
   $form['protected_node_flood_control']['protected_node_failed_password_ip_limit'] = array(
@@ -638,6 +929,16 @@ function protected_node_admin_settings() {
     '#description' => t('Defines the time window (in seconds) for the allowed number of attempts.'),
   );
 
+  return system_settings_form($form);
+}
+
+/**
+ * Define the settings form.
+ *
+ * @return array
+ *   $form The settings form
+ */
+function protected_node_admin_settings_view_modes() {
   // View modes.
   $node_info = entity_get_info('node');
   $view_modes = array();
@@ -648,7 +949,6 @@ function protected_node_admin_settings() {
 
   $form['protected_node_view_modes'] = array(
     '#type' => 'fieldset',
-    '#collapsible' => TRUE,
     '#title' => t('Display Suite view modes'),
   );
   $form['protected_node_view_modes']['protected_node_checked_view_modes'] = array(
@@ -660,177 +960,10 @@ function protected_node_admin_settings() {
     '#default_value' => variable_get('protected_node_checked_view_modes', _protected_node_get_default_checked_view_modes()),
   );
 
-  // A few actions to do some "mass work".
-  $form['protected_node_actions'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Protected node actions'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-  );
-
-  // Clear Sessions button.
-  $form['protected_node_actions']['protected_node_clear_sessions'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Clear sessions'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-    '#description' => t('Click on this button to reset all the Protected Node password sessions of your website. This means all the users who entered a password in the past will now have to log back in to review their node protection.'),
-  );
-  $form['protected_node_actions']['protected_node_clear_sessions']['protected_node_clear_sessions_button'] = array(
-    '#type' => 'submit',
-    '#value' => t('Clear sessions'),
-    '#submit' => array('protected_node_action_clear_sessions'),
-  );
-
-  // Reset passwords button.
-  $form['protected_node_actions']['protected_node_reset_passwords'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Reset passwords'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-    '#description' => t('WARNING: this feature sets a password on nodes that were otherwise expected to use the global password.'),
-  );
-  $form['protected_node_actions']['protected_node_reset_passwords']['protected_node_reset_passwords_password'] = array(
-    '#type' => 'password_confirm',
-    '#title' => t('New Protected Nodes password'),
-    '#description' => t('Enter the new password that will be assigned to all existing protected nodes.'),
-  );
-  $form['protected_node_actions']['protected_node_reset_passwords']['protected_node_reset_passwords_button'] = array(
-    '#type' => 'submit',
-    '#value' => t('Reset all existing passwords'),
-    '#submit' => array('protected_node_action_reset_passwords'),
-  );
-
-  // Remove passwords button.
-  $form['protected_node_actions']['protected_node_remove_passwords'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Use global password'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-    '#description' => '<span style="color: red;">' . t('WARNING: this function deletes all the individual passwords. Make sure you have authorized the use of global password.') . '</span>',
-  );
-  $form['protected_node_actions']['protected_node_remove_passwords']['protected_node_remove_passwords_button'] = array(
-    '#type' => 'submit',
-    '#value' => t('Use global password on ALL nodes'),
-    '#submit' => array('protected_node_action_remove_passwords'),
-  );
-
-  // Remove protection button.
-  $form['protected_node_actions']['protected_node_remove_protection'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Remove protection'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-    '#description' => '<span style="color: red;">' . t('WARNING: this function unprotects all your currently protected nodes! The password is not modifiable.') . '</span>',
-  );
-  $form['protected_node_actions']['protected_node_remove_protection']['protected_node_remove_protection_button'] = array(
-    '#type' => 'submit',
-    '#value' => t('Remove password protection from all nodes'),
-    '#submit' => array('protected_node_action_unprotected_all'),
-  );
-
-  // Protect ALL nodes buttons.
-  $form['protected_node_actions']['protected_node_protect_nodes'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Protect nodes'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-    '#description' => t('WARNING: this function protects ALL your nodes making them accessible only when the password is known. Nodes that do not yet have a password will make use of the global password. You may use the Reset password feature to change that password afterwards.'),
-  );
-  $form['protected_node_actions']['protected_node_protect_nodes']['protected_node_protect_all_nodes_button'] = array(
-    '#type' => 'submit',
-    '#value' => t('Protect ALL nodes'),
-    '#submit' => array('protected_node_action_protect_all_nodes'),
-  );
-
-  // Re-protect nodes buttons.
-  $form['protected_node_actions']['protected_node_protect_password'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Restore protection'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-    '#description' => t('WARNING: this function re-protects the nodes that had a password and got unprotected.'),
-  );
-  $form['protected_node_actions']['protected_node_protect_password']['protected_node_protect_nodes_with_password_button'] = array(
-    '#type' => 'submit',
-    '#value' => t('Protect nodes that already have a password'),
-    '#submit' => array('protected_node_action_protect_nodes_with_password'),
-  );
-
-  $form['#validate'][] = '_protected_node_admin_settings_validate';
-  $form['#submit'][] = '_protected_node_admin_settings_submit';
-
   return system_settings_form($form);
 }
 
 /**
- * Validate the submitted settings form from.
- *
- * This function verifies that a global password is defined if the user
- * defines that the global password should be used by default.
- */
-function _protected_node_admin_settings_validate($form, &$form_state) {
-  // Make sure that a password is included if a global password is required
-  // and none was ever submitted before.
-  switch ($form_state['values']['protected_node_use_global_password']) {
-    case PROTECTED_NODE_PER_NODE_AND_GLOBAL_PASSWORD:
-    case PROTECTED_NODE_GLOBAL_PASSWORD:
-      if (!$form_state['values']['protected_node_global_password_field']
-       && !variable_get('protected_node_global_password', '')) {
-        form_error($form['protected_node_security']['protected_node_global_password_field'],
-          t('A global password is required to make use of the global password functionality.'));
-      }
-      break;
-
-  }
-
-  // Email box width.
-  $width = $form_state['values']['protected_node_email_box_width'];
-  if (!is_numeric($width)) {
-    form_set_error('protected_node_email_box_width', t('You must enter a number for the width of the email box.'));
-  }
-  else {
-    if ($width < 0) {
-      form_set_error('protected_node_email_box_width', t('The width of the email box must be positive.'));
-    }
-  }
-
-  // Email box height.
-  $height = $form_state['values']['protected_node_email_box_height'];
-  if (!is_numeric($height)) {
-    form_set_error('protected_node_email_box_height', t('You must enter a number for the height of the email box.'));
-  }
-  else {
-    if ($height < 0) {
-      form_set_error('protected_node_email_box_height', t('The height of the email box must be positive.'));
-    }
-  }
-
-  if ($form_state['values']['protected_node_email_from']) {
-    if (!valid_email_address($form_state['values']['protected_node_email_from'])) {
-      form_error($form['protected_node_auto_email']['protected_node_email_from'],
-        t('The From email address is not valid.'));
-    }
-  }
-}
-
-/**
- * Submit handler.
- *
- * Submitting the form requires a little bit of work for the password.
- * We need to encrypt it.
- */
-function _protected_node_admin_settings_submit($form, &$form_state) {
-  $passwd = $form_state['values']['protected_node_global_password_field'];
-  if ($passwd) {
-    variable_set('protected_node_global_password', hash('sha256', $passwd));
-    unset($form_state['values']['protected_node_global_password_field']);
-    variable_del('protected_node_global_password_field');
-  }
-  // Never reset the password...
-}
-
-/**
  * Clear all the sessions.
  *
  * This function sets the session variable date to now. Any session that was
@@ -877,6 +1010,7 @@ function protected_node_action_remove_passwords($form, &$form_state) {
     ))
     ->condition('protected_node_passwd', '', '<>')
     ->execute();
+  drupal_set_message(t('All nodes are now using Global Password.'));
 }
 
 /**
@@ -891,6 +1025,7 @@ function protected_node_action_unprotected_all($form, &$form_state) {
     ))
     ->condition('protected_node_is_protected', 1)
     ->execute();
+  drupal_set_message(t('Protection has been removed from all nodes.'));
 }
 
 /**
@@ -928,11 +1063,12 @@ function protected_node_action_protect_all_nodes($form, &$form_state) {
         ->fields(array(
           'nid' => $nid,
           'protected_node_is_protected' => '1',
-          'protected_node_show_title' => $form_state['values']['protected_node_show_node_titles'],
+          'protected_node_show_title' => variable_get('protected_node_show_node_titles'),
         ))
         ->execute();
     }
   }
+  drupal_set_message(t('All nodes are now protected.'));
 }
 
 /**
diff --git a/protected_node.variable.inc b/protected_node.variable.inc
index a960c3f..9f561ba 100644
--- a/protected_node.variable.inc
+++ b/protected_node.variable.inc
@@ -29,7 +29,8 @@ function protected_node_variable_info($options) {
   $variables['protected_node_use_global_password'] = array(
     'type' => 'select',
     'title' => t('Global password handling', array(), $options),
-    'description' => t("Selecting the global password option makes it possible to protect nodes using one password which must be provided in the 'Global password' fields below.", array(), $options) . t('<br><strong>WARNING:</strong> Removing the global password after it has been assigned to nodes will make those nodes inaccessible except for the user with UID: 1 and the author of the node.', array(), $options),
+    'description' => t("Selecting the global password option makes it possible to protect nodes using one password which must be provided in the 'Global password' fields below.", array(), $options) .
+      t('<br><strong>WARNING:</strong> Removing the global password after it has been assigned to nodes will make those nodes inaccessible except for the user with UID: 1 and the author of the node.', array(), $options),
     'option' => array(
       PROTECTED_NODE_PER_NODE_PASSWORD => t('Per node password', array(), $options),
       PROTECTED_NODE_PER_NODE_AND_GLOBAL_PASSWORD => t('Per node password or Global password', array(), $options),
diff --git a/protected_node_rules/protected_node_rules.rules.inc b/protected_node_rules/protected_node_rules.rules.inc
index d9406df..a9c419d 100644
--- a/protected_node_rules/protected_node_rules.rules.inc
+++ b/protected_node_rules/protected_node_rules.rules.inc
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * @file
  * Rules integration for the protected_node module.
diff --git a/tests/protected_node.bulk.test b/tests/protected_node.bulk.test
index b6209ac..630ce06 100644
--- a/tests/protected_node.bulk.test
+++ b/tests/protected_node.bulk.test
@@ -279,7 +279,7 @@ class ProtectedNodeBulkPassword extends ProtectedNodeBaseTestCase {
    * @param string $password
    *   A password.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createByNodeProtectedNode($password) {
diff --git a/tests/protected_node.field_collection.test b/tests/protected_node.field_collection.test
index 1d466dd..9d1b41a 100644
--- a/tests/protected_node.field_collection.test
+++ b/tests/protected_node.field_collection.test
@@ -210,7 +210,7 @@ class ProtectedNodeFieldCollection extends ProtectedNodeBaseTestCase {
    * @param string $password
    *   A password.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createProtectedNode($password) {
@@ -237,12 +237,13 @@ class ProtectedNodeFieldCollection extends ProtectedNodeBaseTestCase {
    * @param string $password
    *   A password.
    *
-   * @return array
+   * @return array.
    *   An array containing the node and the field_collection_item object.
    */
   protected function createProtectedNodeWithFieldCollection($password) {
     $node = $this->createProtectedNode($password);
     // Retrieve the field collection item.
+
     $field_collection_item_id = $node->{$this->field_collection_field_name}[LANGUAGE_NONE][0]['value'];
     $field_collection_items = entity_load('field_collection_item', array($field_collection_item_id));
     $field_collection_item = array_shift($field_collection_items);
diff --git a/tests/protected_node.fork.test b/tests/protected_node.fork.test
index 48067db..07a75dc 100644
--- a/tests/protected_node.fork.test
+++ b/tests/protected_node.fork.test
@@ -149,7 +149,7 @@ class ProtectedNodeFork extends ProtectedNodeBaseTestCase {
    * @param string $password
    *   A password.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createProtectedNode($password) {
diff --git a/tests/protected_node.mail_test.test b/tests/protected_node.mail_test.test
index efb0b2a..b06bceb 100644
--- a/tests/protected_node.mail_test.test
+++ b/tests/protected_node.mail_test.test
@@ -103,7 +103,7 @@ class ProtectedNodeMail extends ProtectedNodeBaseTestCase {
    * @param string $to
    *   An email recipient.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createProtectedNode($password, $to) {
diff --git a/tests/protected_node.page_text.test b/tests/protected_node.page_text.test
index 874969e..db20fa8 100644
--- a/tests/protected_node.page_text.test
+++ b/tests/protected_node.page_text.test
@@ -170,7 +170,7 @@ class ProtectedNodePageDisplay extends ProtectedNodeBaseTestCase {
    *   Whether to show the node title or not. Has no effect if
    *   $show_title_option_available is FALSE.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createProtectedNode($show_title_option_available, $show_title = FALSE) {
diff --git a/tests/protected_node.per_node.test b/tests/protected_node.per_node.test
index b441885..113df6b 100644
--- a/tests/protected_node.per_node.test
+++ b/tests/protected_node.per_node.test
@@ -139,7 +139,7 @@ class ProtectedNodePerNodePassword extends ProtectedNodeBaseTestCase {
    * @param string $password
    *   A password.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createProtectedNode($password) {
diff --git a/tests/protected_node.per_type.test b/tests/protected_node.per_type.test
index 054a00d..1bc8099 100644
--- a/tests/protected_node.per_type.test
+++ b/tests/protected_node.per_type.test
@@ -140,7 +140,7 @@ class ProtectedNodePerTypePassword extends ProtectedNodeBaseTestCase {
    * Please make sure the user has the permission to create the node before
    * calling the method.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createProtectedNode() {
diff --git a/tests/protected_node.private_file.test b/tests/protected_node.private_file.test
index c4569b3..140d0b2 100644
--- a/tests/protected_node.private_file.test
+++ b/tests/protected_node.private_file.test
@@ -46,6 +46,7 @@ class ProtectedNodePrivateFile extends ProtectedNodeBaseTestCase {
       'uri_scheme' => 'private',
     ));
 
+
     // Get files to upload.
     $this->text_file = current($this->drupalGetTestFiles('text'));
     $this->image_file = current($this->drupalGetTestFiles('image'));
@@ -269,7 +270,7 @@ class ProtectedNodePrivateFile extends ProtectedNodeBaseTestCase {
    * @param string $password
    *   A password.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createProtectedNode($password) {
@@ -308,7 +309,7 @@ class ProtectedNodePrivateFile extends ProtectedNodeBaseTestCase {
    * @return array
    *   The $instance array with the id property filled in.
    */
-  public function createImageField($name, $type_name, array $field_settings = array(), array $instance_settings = array(), array $widget_settings = array()) {
+  public function createImageField($name, $type_name, $field_settings = array(), $instance_settings = array(), $widget_settings = array()) {
     $field = array(
       'field_name' => $name,
       'type' => 'image',
diff --git a/tests/protected_node.view_mode.test b/tests/protected_node.view_mode.test
index 5f94794..51ea619 100644
--- a/tests/protected_node.view_mode.test
+++ b/tests/protected_node.view_mode.test
@@ -94,7 +94,7 @@ class ProtectedNodeViewMode extends ProtectedNodeBaseTestCase {
    * @param string $password
    *   A password.
    *
-   * @return object
+   * @return object.
    *   A node object.
    */
   public function createPromotedProtectedNode($password) {
