diff --git a/README.txt b/README.txt
index 75dcba3..50c9519 100644
--- a/README.txt
+++ b/README.txt
@@ -23,4 +23,4 @@ Permissions
 You may allow some users/roles to navigate trough the site while being shut
 down.
 To do that, just assign the 'Navigate through shut website' permissions to
-desired role(s).
\ No newline at end of file
+desired role(s).
diff --git a/shutdown.admin.inc b/shutdown.admin.inc
index 7b9d1db..426cea5 100644
--- a/shutdown.admin.inc
+++ b/shutdown.admin.inc
@@ -1,91 +1,107 @@
-<?php
-
-/**
- * Settings page callback.
- */
-function shutdown_settings_form() {
-  $form['shutdown_enable'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Shut down website?'),
-    '#default_value' => variable_get('shutdown_enable', 0),
-    '#description' => t('If you enable this option, your website will be closed for all visitors except those who have adequate permission.'),
-  );
-  $form['shutdown_redirect_page'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Redirect page'),
-    '#default_value' => variable_get('shutdown_redirect_page', ''),
-    '#description' => t('Specify the page to redirect to. This could be a Drupal internal path, an URL or a file relative to drupal directory.'),
-  );
-  $form['shutdown_excluded_paths'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Paths to exclude'),
-    '#default_value' => variable_get('shutdown_excluded_paths', ''),
-    '#description' => t('Specify the paths that should remain accessible. One path per line.'),
-  );
-
-  $form['advanced_settings'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Advanced settings'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-  );
-  $form['advanced_settings']['shutdown_allow_http_cron'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Allow cron.php to be run during website closed?'),
-    '#default_value' => variable_get('shutdown_allow_http_cron', 1),
-    '#description' => t('If you disable this option, cron requests made through cron.php file will be ignored.'),
-  );
-
-  $form['#submit'][] = 'shutdown_settings_form_submit';
-
-  return system_settings_form($form);
-}
-
-/**
- * Validate function for shutdown_settings_form().
- */
-function shutdown_settings_form_validate($form, &$form_state) {
-  $excluded_paths = explode(PHP_EOL, $form_state['values']['shutdown_excluded_paths']);
-  $redirect_page = $form_state['values']['shutdown_redirect_page'];
-
-  // In case website should be shut down, make sure redirect page is not empty.
-  if ($form_state['values']['shutdown_enable'] && empty($redirect_page)) {
-    form_set_error('shutdown_redirect_page', t('Please specify a redirect page'));
-  }
-  // If page is an external URL, make sure it is valid.
-  else if (url_is_external($redirect_page)) {
-    if (!valid_url($redirect_page)) {
-      form_set_error('shutdown_redirect_page', t('%page is not valid.', array('%page' => $redirect_page)));
-    }
-  }
-  // Make sure redirect page is not index.php to avoid infinite redirections.
-  else if ($redirect_page == 'index.php') {
-    form_set_error('shutdown_redirect_page', t('%page cannot be used for page redirection.', array('%page' => $redirect_page)));
-  }
-  // If page is an internal path, make sure it is in excluded paths to avoid
-  // infinite redirections.
-  else if (menu_get_item($redirect_page) && !in_array($redirect_page, $excluded_paths)) {
-    form_set_error('shutdown_redirect_page', t('%page should be added to excluded paths in order to avoid infinte loops.', array('%page' => $redirect_page)));
-  }
-}
-
-/**
- * Submit function for shutdown_settings_form().
- */
-function shutdown_settings_form_submit($form, &$form_state) {
-  // If state did not change, do nothing.
-  if (variable_get('shutdown_enable') == $form_state['values']['shutdown_enable']) {
-    return;
-  }
-
-  switch ($form_state['values']['shutdown_enable']) {
-    case 1:
-      shutdown_shut_website();
-      drupal_set_message(t('Website is now shut down.'), 'warning');
-      break;
-    case 0:
-      shutdown_open_website();
-      drupal_set_message(t('Website is now opened up.'));
-      break;
-  }
-}
+<?php
+
+/**
+ * @file
+ * Shutdown Admin inc File.
+ */
+
+/**
+ * Settings page callback.
+ */
+ shutdown_settings_form() {
+$form['shutdown_enable'] = array(
+  '#type' => 'checkbox',
+  '#title' => t('Shut down website?'),
+  '#default_value' => variable_get('shutdown_enable', 0),
+  '#description' => t('If you enable this option, your website will be closed for all visitors except those who have adequate permission.'),
+);
+$form['shutdown_redirect_page'] = array(
+  '#type' => 'textfield',
+  '#title' => t('Redirect page'),
+  '#default_value' => variable_get('shutdown_redirect_page', ''),
+  '#description' => t('Specify the page to redirect to. This could be a Drupal internal path, an URL or a file relative to drupal directory.'),
+);
+$form['shutdown_excluded_paths'] = array(
+  '#type' => 'textarea',
+  '#title' => t('Paths to exclude'),
+  '#default_value' => variable_get('shutdown_excluded_paths', ''),
+  '#description' => t('Specify the paths that should remain accessible. One path per line.'),
+);
+
+$form['advanced_settings'] = array(
+  '#type' => 'fieldset',
+  '#title' => t('Advanced settings'),
+  '#collapsible' => TRUE,
+  '#collapsed' => TRUE,
+);
+$form['advanced_settings']['shutdown_allow_http_cron'] = array(
+  '#type' => 'checkbox',
+  '#title' => t('Allow cron.php to be run during website closed?'),
+  '#default_value' => variable_get('shutdown_allow_http_cron', 1),
+  '#description' => t('If you disable this option, cron requests made through cron.php file will be ignored.'),
+);
+
+$form['#submit'][] = 'shutdown_settings_form_submit';
+
+return system_settings_form($form);
+}
+
+/**
+ * Validate function for shutdown_settings_form().
+ */
+
+/**
+ * Function shutdown_settings_form_validate.
+ */
+function shutdown_settings_form_validate($form, &$form_state) {
+  $excluded_paths = explode(PHP_EOL, $form_state['values']['shutdown_excluded_paths']);
+  $redirect_page = $form_state['values']['shutdown_redirect_page'];
+
+  // In case website should be shut down, make sure redirect page is not empty.
+  if ($form_state['values']['shutdown_enable'] && empty($redirect_page)) {
+    form_set_error('shutdown_redirect_page', t('Please specify a redirect page'));
+  }
+  // If page is an external URL, make sure it is valid.
+  elseif (url_is_external($redirect_page)) {
+    if (!valid_url($redirect_page)) {
+      form_set_error('shutdown_redirect_page', t('%page is not valid.', array('%page' => $redirect_page)));
+    }
+  }
+  // Make sure redirect page is not index.php to avoid infinite redirections.
+  elseif ($redirect_page == 'index.php') {
+    form_set_error('shutdown_redirect_page', t('%page cannot be used for page redirection.', array('%page' => $redirect_page)));
+  }
+  // If page is an internal path, make sure it is in excluded paths to avoid
+  // Infinite redirections.
+  elseif (menu_get_item($redirect_page) && !in_array($redirect_page, $excluded_paths)) {
+    form_set_error('shutdown_redirect_page', t('%page should be added to excluded paths in order to avoid infinte loops.', array('%page' => $redirect_page)));
+  }
+}
+
+/**
+ * Submit function for shutdown_settings_form().
+ */
+
+/**
+ * Function shutdown_settings_form_submit.
+ */
+function shutdown_settings_form_submit($form, &$form_state) {
+  // If state did not change, do nothing.
+  if (variable_get('shutdown_enable') == $form_state['values']['shutdown_enable']) {
+    return;
+  }
+
+  switch ($form_state['values']['shutdown_enable']) {
+    case 1:
+      shutdown_shut_website();
+      drupal_set_message(t('Website is now shut down.'), 'warning');
+
+      break;
+
+    case 0:
+      shutdown_open_website();
+      drupal_set_message(t('Website is now opened up.'));
+
+      break;
+  }
+}
diff --git a/shutdown.install b/shutdown.install
index 8d3b327..9d6bce4 100644
--- a/shutdown.install
+++ b/shutdown.install
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * @file
  * Install, Uninstall, Update, and Requirements functions for shutdown module.
diff --git a/shutdown.module b/shutdown.module
index 724d6d4..8a325e5 100644
--- a/shutdown.module
+++ b/shutdown.module
@@ -1,92 +1,113 @@
-<?php
-
-/**
- * Implements hook_help().
- */
-function shutdown_help($path, $arg) {
-  switch ($path) {
-    case 'admin/help#shutdown':
-      $output = '';
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('This module allows you to shut down/close a website.') . '</p>';
-      $output .= '<p>' . t('All requests handled by Drupal will be redirected to a specified page, unless it is initiated by a user who has adequate permission to navigate through the site.') . '</p>';
-      return $output;
-  }
-}
-
-/**
- * Implements hook_menu().
- */
-function shutdown_menu() {
-  $items['admin/config/system/shutdown'] = array(
-    'title' => 'Website shutdown',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('shutdown_settings_form'),
-    'access arguments' => array('shut down website'),
-    'type' => MENU_NORMAL_ITEM,
-    'file' => 'shutdown.admin.inc',
-    'description' => 'Configure your website shutdown.',
-  );
-  return $items;
-}
-
-/**
- * Implements hook_permission().
- */
-function shutdown_permission() {
-  return array(
-    'shut down website' => array(
-      'title' => t('Shut down website'),
-      'description' => t('Perform administration tasks for my module.'),
-      'restrict access' => TRUE,
-    ),
-    'navigate shut website' => array(
-      'title' => t('Navigate through shut website'),
-      'description' => t('Allow users to navigate the website while being shut.'),
-    ),
-  );
-}
-
-/**
- * Implements hook_init().
- */
-function shutdown_init() {
-  // If website is shut down, user has not access to shut down website and
-  // request is not intitiated by drush, redirect to the defined page.
-  if (variable_get('shutdown_enable', 0) && !user_access('navigate shut website') && !function_exists('drush_main')) {
-    $excluded_paths = explode(PHP_EOL, variable_get('shutdown_excluded_paths', ''));
-    $redirect_page = variable_get('shutdown_redirect_page', '');
-    // User login and password recovery pages should always be accessible.
-    $excluded_paths_additional = array(
-      'user',
-      'user/login',
-      'user/password',
-    );
-    $excluded_paths = array_merge($excluded_paths, $excluded_paths_additional);
-	// If the request is initiated by cron.php and http cron is allowed, we
-    // don't do anything.
-	if ($_SERVER['SCRIPT_NAME'] == '/cron.php' && variable_get('shutdown_allow_http_cron', 1)) {
-      return;
-	}
-    // Only redirect if current path isn't excluded.
-    if (!in_array(current_path(), $excluded_paths) && !empty($redirect_page)) {
-      drupal_goto($redirect_page, array(), variable_get('shutdown_http_response_code', '307'));
-    }
-  }
-}
-
-/**
- * Performs needed actions to shut down the website.
- */
-function shutdown_shut_website() {
-  variable_set('shutdown_enable', 1);
-  watchdog('shutdown', t('Website has been shut down.'), array(), WATCHDOG_NOTICE);
-}
-
-/**
- * Performs needed actions to open up the website.
- */
-function shutdown_open_website() {
-  variable_set('shutdown_enable', 0);
-  watchdog('shutdown', t('Website has been opened up.'), array(), WATCHDOG_NOTICE);
-}
+<?php
+
+/**
+ * @file
+ * Shutdown Module File.
+ */
+
+/**
+ * Implements hook_help().
+ */
+ shutdown_help($path, $arg) {
+switch ($path) {
+  case 'admin/help#shutdown':
+    $output = '';
+    $output .= '<h3>' . t('About') . '</h3>';
+    $output .= '<p>' . t('This module allows you to shut down/close a website.') . '</p>';
+    $output .= '<p>' . t('All requests handled by Drupal will be redirected to a specified page, unless it is initiated by a user who has adequate permission to navigate through the site.') . '</p>';
+
+    return $output;
+}
+}
+
+/**
+ * Implements hook_menu().
+ */
+
+/**
+ * Function shutdown_menu.
+ */
+function shutdown_menu() {
+  $items['admin/config/system/shutdown'] = array(
+    'title' => 'Website shutdown',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('shutdown_settings_form'),
+    'access arguments' => array('shut down website'),
+    'type' => MENU_NORMAL_ITEM,
+    'file' => 'shutdown.admin.inc',
+    'description' => 'Configure your website shutdown.',
+  );
+  return $items;
+}
+
+/**
+ * Implements hook_permission().
+ */
+
+/**
+ * Function shutdown_permission.
+ */
+function shutdown_permission() {
+  return array(
+    'shut down website' => array(
+      'title' => t('Shut down website'),
+      'description' => t('Perform administration tasks for my module.'),
+      'restrict access' => TRUE,
+    ), 'navigate shut website' => array(
+      'title' => t('Navigate through shut website'),
+      'description' => t('Allow users to navigate the website while being shut.'),
+    ),
+  );
+}
+
+/**
+ * Implements hook_init().
+ */
+
+/**
+ * Function shutdown_init.
+ */
+function shutdown_init() {
+  // If website is shut down, user has not access to shut down website and.
+  // Request is not intitiated by drush, redirect to the defined page.
+  if (variable_get('shutdown_enable', 0) && !user_access('navigate shut website') && !function_exists('drush_main')) {
+    $excluded_paths = explode(PHP_EOL, variable_get('shutdown_excluded_paths', ''));
+    $redirect_page = variable_get('shutdown_redirect_page', '');
+    // User login and password recovery pages should always be accessible.
+    $excluded_paths_additional = array('user', 'user/login', 'user/password');
+    $excluded_paths = array_merge($excluded_paths, $excluded_paths_additional);
+    // If the request is initiated by cron.php and http cron is allowed, we.
+    // don't do anything.
+    if ($_SERVER['SCRIPT_NAME'] == '/cron.php' && variable_get('shutdown_allow_http_cron', 1)) {
+      return;
+    }
+    // Only redirect if current path isn't excluded.
+    if (!in_array(current_path(), $excluded_paths) && !empty($redirect_page)) {
+      drupal_goto($redirect_page, array(), variable_get('shutdown_http_response_code', '307'));
+    }
+  }
+}
+
+/**
+ * Performs needed actions to shut down the website.
+ */
+
+/**
+ * Function shutdown_shut_website.
+ */
+function shutdown_shut_website() {
+  variable_set('shutdown_enable', 1);
+  watchdog('shutdown', t('Website has been shut down.'), array(), WATCHDOG_NOTICE);
+}
+
+/**
+ * Performs needed actions to open up the website.
+ */
+
+/**
+ * Function shutdown_open_website.
+ */
+function shutdown_open_website() {
+  variable_set('shutdown_enable', 0);
+  watchdog('shutdown', t('Website has been opened up.'), array(), WATCHDOG_NOTICE);
+}
diff --git a/shutdown.rules.inc b/shutdown.rules.inc
index 1a6c9a1..3d22c13 100644
--- a/shutdown.rules.inc
+++ b/shutdown.rules.inc
@@ -1,4 +1,10 @@
 <?php
+
+/**
+ * @file
+ * Shutdown module.
+ */
+
 /**
  * Implements hook_rules_action_info().
  */
@@ -16,16 +22,15 @@ function shutdown_rules_action_info() {
 }
 
 /**
- * Default action: shutdown website;
+ * Default action: shutdown website;.
  */
 function shutdown_action_shutdown_website() {
   shutdown_shut_website();
 }
 
 /**
- * Default action: open website;
+ * Default action: open website;.
  */
 function shutdown_action_open_website() {
   shutdown_open_website();
 }
-
