diff --git a/panels_hash_cache.install b/panels_hash_cache.install
index 01317a1..879161b 100644
--- a/panels_hash_cache.install
+++ b/panels_hash_cache.install
@@ -1,22 +1,28 @@
 <?php
 
 /**
- * @file views.install
- * Contains install and update functions for Advanced Panels Cache.
+ * @file
+ * Contains install and update functions for Panels Hash Cache.
  */
 
+/**
+ * Implementation of hook_install().
+ */
 function panels_hash_cache_install() {
   drupal_install_schema('panels_hash_cache');
 }
 
+/**
+ * Implementation of hook_uninstall().
+ */
 function panels_hash_cache_uninstall() {
   drupal_uninstall_schema('panels_hash_cache');
 }
 
 /**
- * Implementation of hook_schemea
+ * Implementation of hook_schema().
  */
 function panels_hash_cache_schema() {
   $schema['panels_hash_cache'] = drupal_get_schema_unprocessed('system', 'cache');
-  return $schema; 
+  return $schema;
 }
\ No newline at end of file
diff --git a/panels_hash_cache.module b/panels_hash_cache.module
index d7d6d69..c894c98 100644
--- a/panels_hash_cache.module
+++ b/panels_hash_cache.module
@@ -3,7 +3,7 @@
 /**
  * @file
  * Hash Cash plugins for Panels.
- * 
+ *
  * Copyright (c) 2010-2011 Board of Trustees, Leland Stanford Jr. University
  * This software is open-source licensed under the GNU Public License Version 2 or later
  * The full license is available at http://www.gnu.org/licenses/gpl-2.0.html
@@ -32,14 +32,14 @@ function panels_hash_cache_menu() {
   return $items;
 }
 
-function panels_hash_cache_admin_settings(){
+function panels_hash_cache_admin_settings() {
   $form = array();
   $form['panels_hash_cache_reset_key'] = array(
-	  '#type' => 'textfield',
-		'#title' => 'Reset Key',
-		'#default_value' => variable_get('panels_hash_cache_reset_key', ''),
-		'#description' => t('Optionally allow us to regenerate the cache from the URL using a key by hitting the page with the query "?panels-hash-cache-reset={key}". This lets us, for example, to automatically re-generate a cache using cron hitting a url. This way users never see uncached content.'),
+    '#type' => 'textfield',
+    '#title' => 'Reset Key',
+    '#default_value' => variable_get('panels_hash_cache_reset_key', ''),
+    '#description' => t('Optionally allow us to regenerate the cache from the URL using a key by hitting the page with the query "?panels-hash-cache-reset={key}". This lets us, for example, to automatically re-generate a cache using cron hitting a url. This way users never see uncached content.'),
   );
-	$form = system_settings_form($form);
+  $form = system_settings_form($form);
   return $form;
 }
\ No newline at end of file
diff --git a/plugins/cache/panels_hash_cache.inc b/plugins/cache/panels_hash_cache.inc
index e5f3c63..dbb594e 100644
--- a/plugins/cache/panels_hash_cache.inc
+++ b/plugins/cache/panels_hash_cache.inc
@@ -4,7 +4,7 @@
 /**
  * @file
  * Provides hash caching for panels
- * 
+ *
  * Copyright (c) 2010-2011 Board of Trustees, Leland Stanford Jr. University
  * This software is open-source licensed under the GNU Public License Version 2 or later
  * The full license is available at http://www.gnu.org/licenses/gpl-2.0.html
@@ -35,22 +35,22 @@ function panels_hash_cache_get_cache($conf, $display, $args, $contexts, $pane =
   if ($key = variable_get('panels_hash_cache_reset_key', FALSE)) {
     if ($_GET['panels-hash-cache-reset'] == $key) return FALSE;
   }
-  
+
   $cid = panels_hash_cache_get_id($conf, $display, $args, $contexts, $pane);
-  
+
   $cache = cache_get($cid, 'cache');
   if (!$cache) {
     return FALSE;
   }
-    
+
   if (!$cache->data) {
     return FALSE;
   }
-  
+
   if ((time() - $cache->created) > $conf['lifetime']) {
     return FALSE;
   }
-  
+
   return $cache->data;
 }
 
@@ -86,13 +86,13 @@ function panels_hash_cache_clear_cache($display) {
  */
 function panels_hash_cache_get_id($conf, $display, $args, $contexts, $pane) {
   $id = 'panels-hash-cache';
-  
+
   // This is used in case this is an in-code display, which means did will be something like 'new-1'.
   if (isset($display->owner) && isset($display->owner->id)) {
     $id .= '-' . $display->owner->id;
   }
   $id .= '-' . $display->did;
-  
+
   if ($pane) {
     $id .= '-' . $pane->pid;
   }
@@ -100,11 +100,11 @@ function panels_hash_cache_get_id($conf, $display, $args, $contexts, $pane) {
   if (user_access('view pane admin links')) {
     $id .= '-admin';
   }
-  
+
   // For each selected ganularity situation, add it to the "hashable-string"
   // This hashable string becomes our cache-key (after it's hashed to shorten it)
   $hashable_string = '';
-  
+
   if ($conf['granularity']['args']) {
     foreach ($args as $arg) {
       $hashable_string .= $arg;
@@ -122,41 +122,41 @@ function panels_hash_cache_get_id($conf, $display, $args, $contexts, $pane) {
     $hashable_string .= implode('/', arg());
   }
   if ($conf['granularity']['url']) {
-    $url = parse_url('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
-    
+    $url = parse_url('http://' . $_SERVER['HTTP_HOST'] . request_uri());
+
     // If panels-hash-cache-reset is set, then unset it from the query to hash
     if ($key = $_GET['panels-hash-cache-reset']) {
-      $url['query'] = str_replace('panels-hash-cache-reset='.$key,'',$url['query']);
-      $url['query'] = trim($url['query'],"&");
+      $url['query'] = str_replace('panels-hash-cache-reset=' . $key, '', $url['query']);
+      $url['query'] = trim($url['query'], "&");
     }
-    
-    $hashable_string = $url['host'].$url['path'].$url['query'];
+
+    $hashable_string = $url['host'] . $url['path'] . $url['query'];
   }
   if ($conf['granularity']['user']) {
     // For the user we hash on their UID, username, email and roles. In D7 we will have an "updated" timestamp to hash on
     global $user;
-    $hashable_string .= $user->uid.$user->name.$user->mail.serialize($user->roles);
+    $hashable_string .= $user->uid . $user->name . $user->mail . serialize($user->roles);
   }
   if ($conf['granularity']['user_role']) {
     global $user;
     $hashable_string .= serialize($user->roles);
   }
-  
+
   if ($hashable_string) {
-    $id .= '-'.sha1($hashable_string);
+    $id .= '-' . sha1($hashable_string);
   }
-  
+
   if (module_exists('locale')) {
     global $language;
     $id .= '-' . $language->language;
   }
-  
-  if($pane->configuration['use_pager'] == 1) {
+
+  if ($pane->configuration['use_pager'] == 1) {
     $id .= '-p' . check_plain($_GET['page']);
   }
-  
+
   dpm($id);
-  
+
   return $id;
 }
 
@@ -184,7 +184,6 @@ function panels_hash_cache_settings_form($conf, $display, $pid) {
     '#description' => t('The methods in which you wish to store and expire the cache. A change in any of these things will result in a new cache being generated. If more than one is selected, a unique cache will be created for that combination and the cache expires upon a change if any of the components.'),
     '#default_value' => $conf['granularity'],
   );
-  
+
   return $form;
 }
-
