diff -up -r dbtuner/dbtuner.admin.inc dbtuner/dbtuner.admin.inc
--- dbtuner/dbtuner.admin.inc	2011-03-11 19:44:14.000000000 -0600
+++ dbtuner/dbtuner.admin.inc	2011-11-04 18:27:08.000000000 -0500
@@ -79,7 +79,10 @@ function dbtuner_collation_configuration
     '#options' => $settings,
     '#description' => 'Collations in use: ' . implode(', ', array_keys($collations)),
   );
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Change Database Collation'));
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Change Database Collation'),
+  );
   $form['#submit'][] = 'dbtuner_collation_configuration_submit';
   return $form;
 }
@@ -89,11 +92,11 @@ function dbtuner_collation_configuration
  */
 function dbtuner_collation_configuration_submit($form, &$form_state) {
   // Example Database Query
-  //  ALTER DATABASE drupal DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
+//  ALTER DATABASE drupal DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
   // Example Table Query
-  //  ALTER TABLE access DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
+//  ALTER TABLE access DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
   // Example Field Query
-  //  ALTER TABLE access CHANGE `mask` `mask` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
+//  ALTER TABLE access CHANGE `mask` `mask` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
 
   // Get selected collation
   $collation = $form_state['values']['db_collation'];
@@ -194,7 +197,10 @@ function dbtuner_engine_configuration() 
     '#options' => $engines,
     '#description' => 'Engines in use: ' . implode(', ', array_keys($tables)),
   );
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Change Database Engine'));
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Change Database Engine'),
+  );
   $form['#submit'][] = 'dbtuner_engine_configuration_submit';
   return $form;
 }
@@ -227,16 +233,16 @@ function dbtuner_index_configuration() {
       $options = $indexes['options'];
 
       $form['views'] = array(
-        '#type'           => 'fieldset',
-        '#title'          => t('Indexes for Views'),
-        '#description'    => t('If a CCK field is used in a view filter it can be quite slow due to the database not using an index. This will add an index to these fields. Checked means its indexed.'),
+        '#type' => 'fieldset',
+        '#title' => t('Indexes for Views'),
+        '#description' => t('If a CCK field is used in a view filter it can be quite slow due to the database not using an index. This will add an index to these fields. Checked means its indexed.'),
       );
       $form['views']['view-indexes'] = array(
-        '#type'           => 'checkboxes',
-        '#title'          => t('Select the fields you wish to be indexed by the database.'),
-        '#description'    => t('DB fields that could use an index detected by loading all views and looking at what filters and relationships are used.'),
-        '#default_value'  => $defaults,
-        '#options'        => $options,
+        '#type' => 'checkboxes',
+        '#title' => t('Select the fields you wish to be indexed by the database.'),
+        '#description' => t('DB fields that could use an index detected by loading all views and looking at what filters and relationships are used.'),
+        '#default_value' => $defaults,
+        '#options' => $options,
       );
     }
   }
@@ -246,16 +252,16 @@ function dbtuner_index_configuration() {
     $defaults = $indexes['defaults'];
     $options = $indexes['options'];
     $form['core'] = array(
-      '#type'           => 'fieldset',
-      '#title'          => t('Indexes for Core modules'),
-      '#description'    => t('Core could really use indexes on these fields.'),
+      '#type' => 'fieldset',
+      '#title' => t('Indexes for Core modules'),
+      '#description' => t('Core could really use indexes on these fields.'),
     );
     $form['core']['core-indexes'] = array(
-      '#type'           => 'checkboxes',
-      '#title'          => t('Select the fields you wish to be indexed by the database.'),
-      '#description'    => t('DB fields that could use an index.'),
-      '#default_value'  => $defaults,
-      '#options'        => $options,
+      '#type' => 'checkboxes',
+      '#title' => t('Select the fields you wish to be indexed by the database.'),
+      '#description' => t('DB fields that could use an index.'),
+      '#default_value' => $defaults,
+      '#options' => $options,
     );
   }
 
@@ -264,22 +270,25 @@ function dbtuner_index_configuration() {
     $defaults = $indexes['defaults'];
     $options = $indexes['options'];
     $form['experimental'] = array(
-      '#type'           => 'fieldset',
-      '#collapsible'   => TRUE,
-      '#collapsed'     => TRUE,
-      '#title'          => t('Experimental Indexes for Core modules'),
-      '#description'    => t('Unproven indexes; may hurt or help performance.'),
+      '#type' => 'fieldset',
+      '#collapsible' => TRUE,
+      '#collapsed' => TRUE,
+      '#title' => t('Experimental Indexes for Core modules'),
+      '#description' => t('Unproven indexes; may hurt or help performance.'),
     );
     $form['experimental']['experimental-indexes'] = array(
-      '#type'           => 'checkboxes',
-      '#title'          => t('Select the fields you wish to be indexed by the database.'),
-      '#description'    => t('DB fields that could use an index.'),
-      '#default_value'  => $defaults,
-      '#options'        => $options,
+      '#type' => 'checkboxes',
+      '#title' => t('Select the fields you wish to be indexed by the database.'),
+      '#description' => t('DB fields that could use an index.'),
+      '#default_value' => $defaults,
+      '#options' => $options,
     );
   }
 
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Set Index Configuration'));
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Set Index Configuration'),
+  );
   $form['#validate'][] = 'dbtuner_index_configuration_validate';
   return $form;
 }
@@ -419,9 +428,9 @@ function dbtuner_empty_index($table, $in
     // Selecting a db schema table, don't put pg_indexes inside {}
     //$result = db_query("SELECT * FROM pg_indexes WHERE tablename = '{%s}'", $table);
     //while ($name = db_fetch_array($result)) {
-      //if (stristr($name['indexname'], $index)) {
-        //return TRUE;
-      //}
+    //if (stristr($name['indexname'], $index)) {
+    //return TRUE;
+    //}
     //}
   }
   // MySQL
@@ -598,17 +607,29 @@ function dbtuner_views_filters_relations
 
       // Not a cck field
       if (db_table_exists($table)) {
-        $return[$table . ' ' . $field] = array('table' => $table, 'index' => $field);
+        $return[$table . ' ' . $field] = array(
+          'table' => $table,
+          'index' => $field,
+        );
         if ($extra['relationship'] != 'none') {
-          $return[$table . ' ' . $extra['relationship']] = array('table' => $table, 'index' => $extra['relationship']);
+          $return[$table . ' ' . $extra['relationship']] = array(
+            'table' => $table,
+            'index' => $extra['relationship'],
+          );
         }
       }
 
       // CCK field with own table
       elseif (db_table_exists($cck_table)) {
-        $return[$cck_table . ' ' . $field] = array('table' => $cck_table, 'index' => $field);
+        $return[$cck_table . ' ' . $field] = array(
+          'table' => $cck_table,
+          'index' => $field,
+        );
         if ($extra['relationship'] != 'none') {
-          $return[$cck_table . ' ' . $extra['relationship']] = array('table' => $cck_table, 'index' => $extra['relationship']);
+          $return[$cck_table . ' ' . $extra['relationship']] = array(
+            'table' => $cck_table,
+            'index' => $extra['relationship'],
+          );
         }
       }
 
@@ -617,18 +638,30 @@ function dbtuner_views_filters_relations
         foreach ($cck_content_types as $cck_content_table) {
           // Place index on all content_type tables
           if (!empty($extra['node-type']['-1']) && $extra['node-type']['-1'] == 'all') {
-            $return[$cck_content_table . ' ' . $field] = array('table' => $cck_content_table, 'index' => $field);
+            $return[$cck_content_table . ' ' . $field] = array(
+              'table' => $cck_content_table,
+              'index' => $field,
+            );
             if ($extra['relationship'] != 'none') {
-              $return[$cck_content_table . ' ' . $extra['relationship']] = array('table' => $cck_content_table, 'index' => $extra['relationship']);
+              $return[$cck_content_table . ' ' . $extra['relationship']] = array(
+                'table' => $cck_content_table,
+                'index' => $extra['relationship'],
+              );
             }
           }
 
           // Place index only where needed
           elseif (!empty($extra['node-type']) && is_array($extra['node-type'])) {
             foreach ($extra['node-type'] as $nodetype) {
-              $return['content_type_' . $nodetype . ' ' . $field] = array('table' => 'content_type_' . $nodetype, 'index' => $field);
+              $return['content_type_' . $nodetype . ' ' . $field] = array(
+                'table' => 'content_type_' . $nodetype,
+                'index' => $field,
+              );
               if ($extra['relationship'] != 'none') {
-                $return['content_type_' . $nodetype . ' ' . $extra['relationship']] = array('table' => 'content_type_' . $nodetype, 'index' => $extra['relationship']);
+                $return['content_type_' . $nodetype . ' ' . $extra['relationship']] = array(
+                  'table' => 'content_type_' . $nodetype,
+                  'index' => $extra['relationship'],
+                );
               }
             }
           }
@@ -648,9 +681,18 @@ function dbtuner_views_filters_relations
  */
 function dbtuner_core_indexes() {
   $return = array();
-  $return['node_counter totalcount'] = array('table' => 'node_counter', 'index' => 'totalcount');
-  $return['node_counter daycount'] = array('table' => 'node_counter', 'index' => 'daycount');
-  $return['node_counter timestamp'] = array('table' => 'node_counter', 'index' => 'timestamp');
+  $return['node_counter totalcount'] = array(
+    'table' => 'node_counter',
+    'index' => 'totalcount',
+  );
+  $return['node_counter daycount'] = array(
+    'table' => 'node_counter',
+    'index' => 'daycount',
+  );
+  $return['node_counter timestamp'] = array(
+    'table' => 'node_counter',
+    'index' => 'timestamp',
+  );
   //$return[' '] = array('table' => '', 'index' => '');
   ksort($return);
   return $return;
@@ -664,27 +706,90 @@ function dbtuner_core_indexes() {
  */
 function dbtuner_expermental_core_indexes() {
   $return = array();
-  $return['access type'] = array('table' => 'access', 'index' => 'type');
-  $return['access mask'] = array('table' => 'access', 'index' => 'mask');
-  $return['access status'] = array('table' => 'access', 'index' => 'status');
-  $return['comments timestamp'] = array('table' => 'comments', 'index' => 'timestamp');
-  $return['node_comment_statistics comment_count'] = array('table' => 'node_comment_statistics', 'index' => 'comment_count');
-  $return['menu_links external'] = array('table' => 'menu_links', 'index' => 'external');
-  $return['menu_links updated'] = array('table' => 'menu_links', 'index' => 'updated');
-  $return['menu_links customized'] = array('table' => 'menu_links', 'index' => 'customized');
-  $return['menu_links depth'] = array('table' => 'menu_links', 'index' => 'depth');
-  $return['menu_custom title'] = array('table' => 'menu_custom', 'index' => 'title');
-  $return['users pass'] = array('table' => 'users', 'index' => 'pass');
-  $return['users status'] = array('table' => 'users', 'index' => 'status');
-  $return['filter_formats roles'] = array('table' => 'filter_formats', 'index' => 'roles');
-  $return['term_data name'] = array('table' => 'term_data', 'index' => 'name');
-  $return['blocks module'] = array('table' => 'blocks', 'index' => 'module');
-  $return['blocks delta'] = array('table' => 'blocks', 'index' => 'delta');
-  $return['system name'] = array('table' => 'system', 'index' => 'name');
-  $return['system status'] = array('table' => 'system', 'index' => 'status');
-  $return['system type'] = array('table' => 'system', 'index' => 'type');
-  $return['date_format_types title'] = array('table' => 'date_format_types', 'index' => 'title');
-  $return['files filepath'] = array('table' => 'files', 'index' => 'filepath');
+  $return['access type'] = array(
+    'table' => 'access',
+    'index' => 'type',
+  );
+  $return['access mask'] = array(
+    'table' => 'access',
+    'index' => 'mask',
+  );
+  $return['access status'] = array(
+    'table' => 'access',
+    'index' => 'status',
+  );
+  $return['comments timestamp'] = array(
+    'table' => 'comments',
+    'index' => 'timestamp',
+  );
+  $return['node_comment_statistics comment_count'] = array(
+    'table' => 'node_comment_statistics',
+    'index' => 'comment_count',
+  );
+  $return['menu_links external'] = array(
+    'table' => 'menu_links',
+    'index' => 'external',
+  );
+  $return['menu_links updated'] = array(
+    'table' => 'menu_links',
+    'index' => 'updated',
+  );
+  $return['menu_links customized'] = array(
+    'table' => 'menu_links',
+    'index' => 'customized',
+  );
+  $return['menu_links depth'] = array(
+    'table' => 'menu_links',
+    'index' => 'depth',
+  );
+  $return['menu_custom title'] = array(
+    'table' => 'menu_custom',
+    'index' => 'title',
+  );
+  $return['users pass'] = array(
+    'table' => 'users',
+    'index' => 'pass',
+  );
+  $return['users status'] = array(
+    'table' => 'users',
+    'index' => 'status',
+  );
+  $return['filter_formats roles'] = array(
+    'table' => 'filter_formats',
+    'index' => 'roles',
+  );
+  $return['term_data name'] = array(
+    'table' => 'term_data',
+    'index' => 'name',
+  );
+  $return['blocks module'] = array(
+    'table' => 'blocks',
+    'index' => 'module',
+  );
+  $return['blocks delta'] = array(
+    'table' => 'blocks',
+    'index' => 'delta',
+  );
+  $return['system name'] = array(
+    'table' => 'system',
+    'index' => 'name',
+  );
+  $return['system status'] = array(
+    'table' => 'system',
+    'index' => 'status',
+  );
+  $return['system type'] = array(
+    'table' => 'system',
+    'index' => 'type',
+  );
+  $return['date_format_types title'] = array(
+    'table' => 'date_format_types',
+    'index' => 'title',
+  );
+  $return['files filepath'] = array(
+    'table' => 'files',
+    'index' => 'filepath',
+  );
   //$return[' '] = array('table' => '', 'index' => '');
   ksort($return);
   return $return;
diff -up -r dbtuner/dbtuner.explain.inc dbtuner/dbtuner.explain.inc
--- dbtuner/dbtuner.explain.inc	2011-03-11 19:44:14.000000000 -0600
+++ dbtuner/dbtuner.explain.inc	2011-11-04 18:27:08.000000000 -0500
@@ -78,17 +78,16 @@ function dbtuner_explain_get_views() {
         array_unshift($data, array($hash => array(
             'time-build' => $view->build_time,
             'time-run' => $view->execute_time,
-          )
-        ));
+          )));
         continue;
       }
-  //     if (empty($query) && count($view_arguments) < 1) {
-  //       //array_unshift($data, array($hash => array('query' => 'NOT FOUND. Check View! Still working on view arguments... known issue with false positives.')));
-  //       continue;
-  //     }
-  //     if (count($view_arguments) > 0) {
-  //       continue;
-  //     }
+//     if (empty($query) && count($view_arguments) < 1) {
+//       //array_unshift($data, array($hash => array('query' => 'NOT FOUND. Check View! Still working on view arguments... known issue with false positives.')));
+//       continue;
+//     }
+//     if (count($view_arguments) > 0) {
+//       continue;
+//     }
 
       $data[$hash]['time-build'] = $view->build_time;
       $data[$hash]['time-run'] = $view->execute_time;
@@ -98,7 +97,7 @@ function dbtuner_explain_get_views() {
       // Add hash to query incase something goes wrong; you can figure out what view caused the error.
       $query .= ' /* ' . $hash . '*/';
       $explain = db_query('EXPLAIN ' . $query, $query_args);
-      while($value = db_fetch_array($explain)) {
+      while ($value = db_fetch_array($explain)) {
         $data[$hash][] = $value;
       }
     }
diff -up -r dbtuner/dbtuner.mysqltuner.inc dbtuner/dbtuner.mysqltuner.inc
--- dbtuner/dbtuner.mysqltuner.inc	2011-03-11 19:44:14.000000000 -0600
+++ dbtuner/dbtuner.mysqltuner.inc	2011-11-04 18:27:08.000000000 -0500
@@ -87,7 +87,7 @@ function dbtuner_mysqltuner_process_data
     // Output results
     $output .= $label . ': ' . $compval . '<br \>';
     if ($condition) {
-      $output .= '<strong>' . $msg . '</strong><br \><em>' . '&nbsp;&nbsp;&nbsp;&nbsp;(' . $expr . ' ' . $comp . ')' . '<br \>&nbsp;&nbsp;&nbsp;&nbsp;(' . $parsedexpr . ' ' . $parsedcomp . ')'. '</em><br \>';
+      $output .= '<strong>' . $msg . '</strong><br \><em>' . '&nbsp;&nbsp;&nbsp;&nbsp;(' . $expr . ' ' . $comp . ')' . '<br \>&nbsp;&nbsp;&nbsp;&nbsp;(' . $parsedexpr . ' ' . $parsedcomp . ')' . '</em><br \>';
     }
 
     // Debug Output
@@ -150,7 +150,7 @@ function dbtuner_perl_to_php_comp($strin
     $values = explode('!== ', $string);
     return "'" . $values[0] . "' !== " .  $values[1];
   }
-    if (stristr($string, '!== "5.1"')) {
+  if (stristr($string, '!== "5.1"')) {
     $values = explode('!== ', $string);
     return "'" . $values[0] . "' !== " .  $values[1];
   }
@@ -159,8 +159,8 @@ function dbtuner_perl_to_php_comp($strin
 }
 
 function dbtuner_stristr($haystack, $arr) {
-  foreach($arr as $key => $search_needle) {
-    if(stristr($haystack, $search_needle) != FALSE) {
+  foreach ($arr as $key => $search_needle) {
+    if (stristr($haystack, $search_needle) != FALSE) {
       return TRUE;
     }
   }
@@ -168,8 +168,8 @@ function dbtuner_stristr($haystack, $arr
 }
 
 function dbtuner_strnistr($haystack, $arr) {
-  foreach($arr as $key => $search_needle) {
-    if(stristr($haystack, $search_needle) != FALSE) {
+  foreach ($arr as $key => $search_needle) {
+    if (stristr($haystack, $search_needle) != FALSE) {
       return FALSE;
     }
   }
@@ -198,20 +198,20 @@ function dbtuner_pretty_uptime($uptime) 
 }
 
 function dbtuner_hr_bytime($num) {
- $per = '';
+  $per = '';
   if ($num >= 1) { # per second
     $per = "per second";
   }
-  elseif ($num*60 >= 1) { # per minute
-    $num = $num*60;
+  elseif ($num * 60 >= 1) { # per minute
+    $num = $num * 60;
     $per = "per minute";
   }
-  elseif ($num*60*60 >=1 ) { # per hour
-    $num = $num*60*60;
+  elseif ($num * 60 * 60 >= 1 ) { # per hour
+    $num = $num * 60 * 60;
     $per = "per hour";
   }
   else {
-    $num = $num*60*60*24;
+    $num = $num * 60 * 60 * 24;
     $per = "per day";
   }
   $num = dbtuner_round2($num);
@@ -221,7 +221,7 @@ function dbtuner_hr_bytime($num) {
 function dbtuner_round2($num) {
   # if the result is a number with a decimal point, round to the nearest 0.01
   //~ if ($num=~/^-?\d+\.?\d*(e.\d+)?$/ && $expr !~ /version/i) {
-    //~ $num=sprintf("%.2f",$num);
+  //~ $num=sprintf("%.2f",$num);
   //~ }
   //~ return round($num, 2);
   return $num;
@@ -229,13 +229,13 @@ function dbtuner_round2($num) {
 
 function dbtuner_hr_num($num) {
   if ($num >= (pow(1000, 3))) { # Billions
-    return floor(($num/pow(1000, 3))) . " Billion";
+    return floor(($num / pow(1000, 3))) . " Billion";
   }
   elseif ($num >= pow(1000, 2)) { # Millions
-    return floor(($num/pow(1000, 2))) . " Million";
+    return floor(($num / pow(1000, 2))) . " Million";
   }
   elseif ($num >= 1000) { # Thousands
-    return floor(($num/1000)) . " Thousand";
+    return floor(($num / 1000)) . " Thousand";
   }
   else {
     return $num;
@@ -244,15 +244,15 @@ function dbtuner_hr_num($num) {
 
 function dbtuner_hr_bytes($num) {
   if ($num >= pow(1024, 3)) { #GB
-    return sprintf("%.1f",($num/pow(1024, 3)))." Gb";
+    return sprintf("%.1f", ($num / pow(1024, 3))) . " Gb";
   }
   elseif ($num >= pow(1024, 2)) { #MB
-    return sprintf("%.1f",($num/pow(1024, 2)))." Mb";
+    return sprintf("%.1f", ($num / pow(1024, 2))) . " Mb";
   }
   elseif ($num >= 1024) { #KB
-    return sprintf("%.1f",($num/1024))." Kb";
+    return sprintf("%.1f", ($num / 1024)) . " Kb";
   }
   else {
-    return $num." bytes";
+    return $num . " bytes";
   }
 }
diff -up -r dbtuner/dbtuner.views.inc dbtuner/dbtuner.views.inc
--- dbtuner/dbtuner.views.inc	2011-03-11 19:44:14.000000000 -0600
+++ dbtuner/dbtuner.views.inc	2011-11-04 18:27:08.000000000 -0500
@@ -4,7 +4,7 @@
  * Implementation of hook_views_preview_info_alter.
  */
 function dbtuner_views_preview_info_alter(&$rows, $view) {
-  $replacements = module_invoke_all('views_query_substitutions', $view); 
+  $replacements = module_invoke_all('views_query_substitutions', $view);
   $query = str_replace(array_keys($replacements), $replacements, $view->build_info['query']);
   $results = db_query("EXPLAIN " . $query, $view->build_info['query_args']);
 
@@ -15,7 +15,10 @@ function dbtuner_views_preview_info_alte
     }
     $explain_rows[] = array_values($explain);
   }
-  $rows[] = array(array('data' => '<strong>Explain</strong>' . theme('table', $explain_headers, $explain_rows), 'colspan' => 2));
+  $rows[] = array(array(
+      'data' => '<strong>Explain</strong>' . theme('table', $explain_headers, $explain_rows),
+      'colspan' => 2,
+    ));
 }
 
 
