diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 4d70102..ccccd68 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -284,7 +284,7 @@ function _aggregator_category_title($category) {
  *   TRUE if there is at least one category and the user has access to them, FALSE otherwise.
  */
 function _aggregator_has_categories() {
-  return user_access('access news feeds') && db_query('SELECT COUNT(*) FROM {aggregator_category}')->fetchField();
+  return user_access('access news feeds') && db_query('SELECT cid FROM {aggregator_category}')->fetchField();
 }
 
 /**
diff --git a/modules/aggregator/aggregator.pages.inc b/modules/aggregator/aggregator.pages.inc
index 3ea5935..2d03d63 100644
--- a/modules/aggregator/aggregator.pages.inc
+++ b/modules/aggregator/aggregator.pages.inc
@@ -62,7 +62,7 @@ function aggregator_page_source_form($form, $form_state, $feed) {
  *   The category for which to list all the aggregated items.
  *
  * @return
-*   The rendered list of items for a category.
+ *   The rendered list of items for a category.
  */
 function aggregator_page_category($category) {
   drupal_add_feed('aggregator/rss/' . $category['cid'], variable_get('site_name', 'Drupal') . ' ' . t('aggregator - @title', array('@title' => $category['title'])));
@@ -81,7 +81,7 @@ function aggregator_page_category($category) {
  *   The category for which to list all the aggregated items.
  *
  * @return
-*   The rendered list of items for a category.
+ *   The rendered list of items for a category.
  *
  * @see aggregator_page_category()
  */
diff --git a/modules/aggregator/aggregator.parser.inc b/modules/aggregator/aggregator.parser.inc
index 4b1ff20..19e28da 100644
--- a/modules/aggregator/aggregator.parser.inc
+++ b/modules/aggregator/aggregator.parser.inc
@@ -173,7 +173,7 @@ function aggregator_parse_feed(&$data, $feed) {
 function aggregator_element_start($parser, $name, $attributes) {
   global $item, $element, $tag, $items, $channel;
 
-  $name = strtolower($name);
+  $name = drupal_strtolower($name);
   switch ($name) {
     case 'image':
     case 'textinput':
diff --git a/modules/block/block.admin.inc b/modules/block/block.admin.inc
index 5902c20..1dd2eb0 100644
--- a/modules/block/block.admin.inc
+++ b/modules/block/block.admin.inc
@@ -145,7 +145,7 @@ function block_admin_display_form($form, &$form_state, $blocks, $theme, $block_r
         '#type' => 'link',
         '#title' => t('delete'),
         '#href' => 'admin/structure/block/manage/' . $block['module'] . '/' . $block['delta'] . '/delete',
-     );
+      );
     }
   }
   // Do not allow disabling the main system content block when it is present.
diff --git a/modules/block/block.api.php b/modules/block/block.api.php
index 7b2ce05..b135187 100644
--- a/modules/block/block.api.php
+++ b/modules/block/block.api.php
@@ -223,7 +223,8 @@ function hook_block_view($delta = '') {
           $block['content'] = theme('node_recent_block', array(
             'nodes' => $nodes,
           ));
-        } else {
+        }
+        else {
           $block['content'] = t('No content available.');
         }
       }
diff --git a/modules/color/color.module b/modules/color/color.module
index d94cadc..22a2a46 100644
--- a/modules/color/color.module
+++ b/modules/color/color.module
@@ -244,11 +244,11 @@ function theme_color_scheme_form($variables) {
   $info = $form['info']['#value'];
   $path = drupal_get_path('theme', $theme) . '/';
   drupal_add_css($path . $info['preview_css']);
-  
+
   $preview_js_path = isset($info['preview_js']) ? $path . $info['preview_js'] : drupal_get_path('module', 'color') . '/' . 'preview.js';
   // Add the JS at a weight below color.js.
   drupal_add_js($preview_js_path, array('weight' => -1));
-    
+
   $output  = '';
   $output .= '<div class="color-form clearfix">';
   // Color schemes
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 78d35c0..bdce888 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1200,7 +1200,7 @@ function comment_form_node_form_alter(&$form, $form_state) {
     ),
     '#attached' => array(
       'js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
-     ),
+    ),
     '#weight' => 30,
   );
   $comment_count = isset($node->nid) ? db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField() : 0;
@@ -1489,7 +1489,7 @@ function comment_save($comment) {
       db_ignore_slave();
 
       // Update the {node_comment_statistics} table prior to executing hooks.
-       _comment_update_node_statistics($comment->nid);
+      _comment_update_node_statistics($comment->nid);
 
       field_attach_update('comment', $comment);
       // Allow modules to respond to the updating of a comment.
diff --git a/modules/comment/comment.tokens.inc b/modules/comment/comment.tokens.inc
index 2375cfb..1e68996 100644
--- a/modules/comment/comment.tokens.inc
+++ b/modules/comment/comment.tokens.inc
@@ -226,7 +226,7 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
     $node = $data['node'];
 
     foreach ($tokens as $name => $original) {
-      switch($name) {
+      switch ($name) {
         case 'comment-count':
           $replacements[$original] = $node->comment_count;
           break;
