diff --git a/disqus_backup.info b/disqus_backup.info
index ad9a55c..780f6a8 100644
--- a/disqus_backup.info
+++ b/disqus_backup.info
@@ -1,6 +1,6 @@
 name = disqus backup
 description = disqus backup
-package = Database
+package = Other
 core = 6.x
 
 
diff --git a/disqus_backup.js b/disqus_backup.js
deleted file mode 100644
index 8ee1f85..0000000
--- a/disqus_backup.js
+++ /dev/null
@@ -1 +0,0 @@
-jQuery(document).ready(function(){jQuery('#comments-disqus-backup').hide();})
\ No newline at end of file
diff --git a/disqus_backup.module b/disqus_backup.module
index afc2b90..910ef45 100644
--- a/disqus_backup.module
+++ b/disqus_backup.module
@@ -1,6 +1,7 @@
 <?php
+
 /**
- * Implementation of hook_menu().
+ * Implements of hook_menu().
  */
 function disqus_backup_menu() {
   $items = array();
@@ -32,22 +33,25 @@ function _disqus_backup_get_links($public_key, $forum) {
   return $b;
 }
 
+/**
+ * Implements hook_cron().
+ */
 function disqus_backup_cron() {
+  $cron_time = time() - variable_get('disqus_backup_last_cron', 0);
 
-  // no cron needed
-  $cron_time = time() - variable_get('disqus_backup_last_cron', 0);  
-  if ($cron_time < (variable_get('disqus_api_cron_time', 60*60*24))) return ;  
+  if ($cron_time < (variable_get('disqus_api_cron_time', 60*60*24))) {
+    return; // cron task not needed to run at this time. 
+  }  
 
   $public_key = variable_get('disqus_api_public_key', '');
   $forum = variable_get('disqus_api_overwrite_forum', variable_get('disqus_domain', ''));
 
   if ($public_key == '' OR $forum == '') {
-    watchdog('disqus_backup', 'Error need public_key and forum id', WATCHDOG_ERROR);
+    watchdog('disqus backup', 'Error need public_key and forum id', NULL, WATCHDOG_ERROR);
     return ;
   }
 
   $url = "http://disqus.com/api/3.0/forums/listPosts.json?api_key=$public_key&forum=$forum&limit=100";
-  
   $threads = _disqus_backup_get_links($public_key, $forum);
   
   // get disqus comments as json and convert to array
@@ -56,46 +60,39 @@ function disqus_backup_cron() {
   $dec = json_decode($content);
   
   foreach($dec->response as $mes) {
-
     $int = $threads[$mes->thread];
-    //$nid = str_replace('node/', '', $mes->thread->identifier[0]);
     $nid = str_replace('node/', '', $int);
-    
     $created_at = strtotime($mes->createdAt);
-    
-    $ar=array();
+    $ar = array();
     $ar[] = $nid;
     $ar[] = $mes->message;
     $ar[] = $created_at;
     $ar[] = ($mes->isApproved) ? 'approved' : '';
-
     $ar[] = $mes->author->name;
     $ar[] = isset($mes->author->emailHash) ? $mes->author->emailHash : '';
-    $ar[] = isset($mes->author->url) ? $mes->author->url : '';
-    
+    $ar[] = isset($mes->author->url) ? $mes->author->url : '';    
     $ar[] = $mes->id; 
 
-
     db_query("UPDATE {disqus_backup} SET nid = %d, message = '%s', created_at = %d, status = '%s', author_name = '%s', author_mail = '%s', author_url = '%s' WHERE did = %d", $ar);
     if (!db_affected_rows()) @db_query("INSERT INTO {disqus_backup} (nid, message,  created_at, status, author_name, author_mail, author_url, did) VALUES (%d, '%s', %d,'%s','%s','%s','%s', %d)", $ar);
   }
-  
+   
   variable_set('disqus_backup_last_cron', time());
-  watchdog('disqus_backup', 'Imported or updated %count Disqus comments', array('%count' => count($dec->response)) );
+  watchdog('disqus backup', 'Imported or updated %count Disqus comments', array('%count' => count($dec->response)));
 }
 
 /**
- * Implementation of hook_nodeapi().
+ * Implements hook_nodeapi().
  */
 function disqus_backup_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
   switch ($op) {
     case 'view':
       // See if we are to display Disqus in the current context.
       if (!$a3 && $a4 && isset($node->disqus)) {
-        if (user_access('view disqus comments')) { //&& variable_get('disqus_location', 'content_area') == 'content_area') {
+        if (user_access('view disqus comments')) {
           // Inject the comments into the node content area.
           $node->content['disqus_backup'] = array(
-            '#value' => disqus_backup_get_comments($node->nid), //theme('disqus_comments', $node->disqus),
+            '#value' => disqus_backup_get_comments($node->nid),
             '#weight' => variable_get('disqus_weight', 50) + 1,
           );
         }
@@ -105,7 +102,7 @@ function disqus_backup_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
 }
 
 /**
- * Implementation of hook_theme().
+ * Implements hook_theme().
  */
 function disqus_backup_theme() {
   return array(
@@ -116,9 +113,11 @@ function disqus_backup_theme() {
   );
 }
 
-function template_preprocess_disqus_backup_comment(&$variables) {
+/**
+ * Implements hook_preprocess_disqus_backup_comment().
+ */
+function disqus_backup_preprocess_disqus_backup_comment(&$variables) {
   $comment = $variables['comment'];
-  //$variables = $variables['comment'];
   $variables['did'] = $comment->did;
   $variables['content'] = check_markup($comment->message);
   $variables['date'] = format_date($comment->created_at);
@@ -131,6 +130,11 @@ function template_preprocess_disqus_backup_comment(&$variables) {
     ));
 }
 
+/**
+ * Returns the comments retrieved from the database
+ * Parses the data through helper function to return
+ * a themed list of comments.
+ */
 function disqus_backup_get_comments($nid) {
   //$nid = 137;
   $rows = array();
@@ -138,32 +142,25 @@ function disqus_backup_get_comments($nid) {
   while ($r = db_fetch_object($q)) {
     $rows[] = $r;
   }
-
   return _disqus_backup_getlist($rows);
 }
 
-
-
-
+/**
+ * Helper function that returns the formatted and themed list of comments.
+ * Adds a javascript function to hide the comments. This ensures comments
+ * will only be visible to those who have javascript disabled.
+ */
 function _disqus_backup_getlist($ar) {
-
-  if (!count($ar) > 0) return '';
-  
+  if (!count($ar) > 0) {
+    return '';
+  }
   $output = '';
-  
-  //drupal_add_js("jQuery(document).ready(function(){jQuery('#comments-disqus-backup').hide();})", 'inline');
-  //drupal_add_js("jQuery(document).ready(function(){jQuery('#comments-disqus-backup').hide();})");
-  
+  // Hide the comments
+  drupal_add_js("jQuery(document).ready(function(){jQuery('#comments-disqus-backup').hide();})", 'inline');
   $output .= '<div id="comments-disqus-backup"><h2 id="comments-title">'. t('Disqus - noscript') .'</h2>';
   foreach($ar as $line) {
     $output .= theme('disqus_backup_comment', $line);
   }
   $output .= '</div>';
-  
-
   return $output;
-}
-
-
-
-?>
\ No newline at end of file
+}
\ No newline at end of file
