diff --git a/includes/mobile_jquery.inc b/includes/mobile_jquery.inc
index 68eebc9..0667b4b 100644
--- a/includes/mobile_jquery.inc
+++ b/includes/mobile_jquery.inc
@@ -2,47 +2,55 @@
 
 /**
  * A wrapper function for mobile_jquery_theme_get_settings().
- * 
+ *
  * @param $name
- *   The name of the setting that you want to retrieve. 
+ *   The name of the setting that you want to retrieve.
  * @param $default (optional)
  *   The name (key) of the theme that you want to fetch the
- *   setting for. Defaults to NULL.   
+ *   setting for. Defaults to NULL.
  * @param $theme (optional)
  *   The key (machin-readable name) of a theme. Defaults to the key of the
  *   current theme if not defined.
- *   
- * @see 
+ *
+ * @see
  *   mobile_jquery_theme_get_setting().
  */
 function mobile_jquery_theme_get_setting($name, $theme = NULL) {
-	switch($name){
-		case 'exclude':
-			$setting = mobile_jquery_theme_get_info($name, $theme);
-			break;
-		default:
-		  $setting = theme_get_setting($name, $theme);
-			break;
+  switch ($name) {
+    case 'exclude':
+      $setting = mobile_jquery_theme_get_info($name, $theme);
+      break;
+    default:
+      $setting = theme_get_setting($name, $theme);
+      break;
   }
 
-  return isset($setting) ? $setting : NULL; 
+  return isset($setting) ? $setting : NULL;
 }
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_get_settings($theme = NULL) {
 
   if (!isset($theme)) {
     $theme = !empty($GLOBALS['theme_key']) ? $GLOBALS['theme_key'] : '';
   }
-	if($theme) {
-		$themes = list_themes();
+  if ($theme) {
+    $themes = list_themes();
     $theme_object = $themes[$theme];
-	}
-	return $theme_object->info['settings'];
+  }
+  return $theme_object->info['settings'];
 }
 
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_theme_get_info($setting_name, $theme = NULL) {
-// If no key is given, use the current theme if we can determine it.
+  // If no key is given, use the current theme if we can determine it.
   if (!isset($theme)) {
     $theme = !empty($GLOBALS['theme_key']) ? $GLOBALS['theme_key'] : '';
   }
@@ -67,7 +75,7 @@ function mobile_jquery_theme_get_info($setting_name, $theme = NULL) {
       }
     }
   }
-  
+
   return $output;
 }
 
diff --git a/includes/modules/aggregator.inc b/includes/modules/aggregator.inc
index abf0a86..4216ee0 100644
--- a/includes/modules/aggregator.inc
+++ b/includes/modules/aggregator.inc
@@ -12,11 +12,11 @@
  */
 function mobile_jquery_aggregator_block_item($vars) {
   // Display the external link to the item.
-  
+
   $attributes = array(
-	  'rel' => 'external',
+    'rel' => 'external',
   );
-  
+
   return l(check_plain($vars['item']->title), check_url($vars['item']->link), array('attributes' => $attributes));
 }
 
diff --git a/includes/modules/book.inc b/includes/modules/book.inc
index e33d618..57d3852 100644
--- a/includes/modules/book.inc
+++ b/includes/modules/book.inc
@@ -13,7 +13,10 @@
 function mobile_jquery_book_admin_table($vars) {
   $form = $vars['form'];
 
-  $header = array(t('Title'), t('Weight'), t('Parent'), array('data' => t('Operations'), 'colspan' => '3'));
+  $header = array(t('Title'), t('Weight'), t('Parent'), array(
+      'data' => t('Operations'),
+      'colspan' => '3',
+    ));
 
   $rows = array();
   $destination = drupal_get_destination();
@@ -28,7 +31,7 @@ function mobile_jquery_book_admin_table($vars) {
     $form[$key]['weight']['#attributes']['class'] = array('book-weight');
 
     $data = array(
-      theme('indentation', array('size' => $form[$key]['depth']['#value'] - 2)) . drupal_render($form[$key]['title']),
+      theme('indentation', array('size' => array('size' => $form[$key]['depth']['#value'] - 2))) . drupal_render($form[$key]['title']),
       drupal_render($form[$key]['weight']),
       drupal_render($form[$key]['plid']) . drupal_render($form[$key]['mlid']),
       l(t('view'), $href, array('attributes' => array('data-role' => 'button', 'data-icon' => 'view', 'data-iconpos' => 'notext'))),
@@ -39,11 +42,15 @@ function mobile_jquery_book_admin_table($vars) {
     if (isset($form[$key]['#attributes'])) {
       $row = array_merge($row, $form[$key]['#attributes']);
     }
-    
+
     $rows[] = $row;
   }
 
-  return theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'book-outline')));
+  return theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'attributes' => array('id' => 'book-outline'),
+    )));
 }
 
 /**
diff --git a/includes/modules/comment.inc b/includes/modules/comment.inc
index 904c63e..017c339 100644
--- a/includes/modules/comment.inc
+++ b/includes/modules/comment.inc
@@ -5,7 +5,7 @@
  *
  * @ingroup themeable
  */
-function mobile_jquery_comment_block() {
+function mobile_jquery_comment_block_view() {
   $items = array();
   $number = variable_get('comment_block_count', 10);
   foreach (comment_get_recent($number) as $comment) {
@@ -13,7 +13,10 @@ function mobile_jquery_comment_block() {
   }
 
   if ($items) {
-    return theme('item_list', array('items' => $items, 'title' => 'Recent Comments'));
+    return theme('item_list', array('items' => array(
+        'items' => $items,
+        'title' => 'Recent Comments',
+      )));
   }
   else {
     return t('No comments available.');
@@ -49,10 +52,10 @@ function mobile_jquery_comment_post_forbidden($vars) {
       // We cannot use drupal_get_destination() because these links
       // sometimes appear on /node and taxonomy listing pages.
       if (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW) == COMMENT_FORM_SEPARATE_PAGE) {
-        $destination = array('destination' => "comment/reply/$node->nid");//#comment-form");
+        $destination = array('destination' => "comment/reply/$node->nid"); //#comment-form");
       }
       else {
-        $destination = array('destination' => "node/$node->nid");//#comment-form");
+        $destination = array('destination' => "node/$node->nid"); //#comment-form");
       }
 
       if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
diff --git a/includes/modules/dashboard.inc b/includes/modules/dashboard.inc
index 289114a..f413e59 100644
--- a/includes/modules/dashboard.inc
+++ b/includes/modules/dashboard.inc
@@ -67,7 +67,7 @@ function mobile_jquery_dashboard_disabled_blocks($vars) {
   $output = '<div class="canvas-content"><p>' . t('Drag and drop these blocks to the columns below. Changes are automatically saved. More options are available on the <a href="@dashboard-url">configuration page</a>.', array('@dashboard-url' => url('admin/dashboard/configure'))) . '</p>';
   $output .= '<div id="disabled-blocks"><div class="region disabled-blocks clearfix">';
   foreach ($blocks as $block) {
-    $output .= theme('dashboard_disabled_block', array('block' => $block));
+    $output .= theme('dashboard_disabled_block', array('block' => array('block' => $block)));
   }
   $output .= '<div class="clearfix"></div>';
   $output .= '<p class="dashboard-add-other-blocks">' . l(t('Add other blocks'), 'admin/dashboard/configure') . '</p>';
@@ -84,7 +84,7 @@ function mobile_jquery_dashboard_disabled_blocks($vars) {
  *
  * @ingroup themeable
  */
-function mobile_jquery_dashboard_disabled_block($vars) {
+function mobile_jquery_dashboard_disabled_block_view($vars) {
   extract($vars);
   $output = "";
   if (isset($block)) {
diff --git a/includes/modules/dblog.inc b/includes/modules/dblog.inc
index 71c562e..b669294 100644
--- a/includes/modules/dblog.inc
+++ b/includes/modules/dblog.inc
@@ -30,4 +30,4 @@ function mobile_jquery_dblog_message($vars) {
     }
   }
   return $output;
-}
\ No newline at end of file
+}
diff --git a/includes/modules/file.inc b/includes/modules/file.inc
index 485a6a8..dd74cf3 100644
--- a/includes/modules/file.inc
+++ b/includes/modules/file.inc
@@ -16,7 +16,10 @@ function mobile_jquery_file_link($vars) {
   $icon_directory = $vars['icon_directory'];
 
   $url = file_create_url($file->uri);
-  $icon = theme('file_icon', array('file' => $file, 'icon_directory' => $icon_directory));
+  $icon = theme('file_icon', array('file' => array(
+      'file' => $file,
+      'icon_directory' => $icon_directory,
+    )));
 
   // Set options as per anchor format described at
   // http://microformats.org/wiki/file-format-examples
@@ -36,4 +39,4 @@ function mobile_jquery_file_link($vars) {
   }
 
   return '<span class="file">' . $icon . ' ' . l($link_text, $url, $options) . '</span>';
-}
\ No newline at end of file
+}
diff --git a/includes/modules/filter.inc b/includes/modules/filter.inc
index 8799c9f..f6a0cfd 100644
--- a/includes/modules/filter.inc
+++ b/includes/modules/filter.inc
@@ -7,12 +7,12 @@
  */
 function mobile_jquery_filter_tips_more_info() {
   $options = array(
-	  'attributes' => array(
-	    'data-rel' => 'dialog',
-	    'data-transition' => 'pop',
-	    'data-role' => 'button',
-	    'data-inline' => 'true',
-    ), 
+    'attributes' => array(
+      'data-rel' => 'dialog',
+      'data-transition' => 'pop',
+      'data-role' => 'button',
+      'data-inline' => 'true',
+    ),
   );
   return '<p>' . l(t('More information about text formats'), 'filter/tips', $options) . '</p>';
 }
@@ -43,7 +43,7 @@ function mobile_jquery_filter_tips_more_info() {
  * @see _filter_tips()
  * @ingroup themeable
  */
-function mobile_jquery_filter_tips($vars) {
+function mobile_jquery_filter_info($vars) {
   $tips = $vars['tips'];
   $long = $vars['long'];
   $output = '';
@@ -98,7 +98,7 @@ function mobile_jquery_filter_guidelines($vars) {
   $attributes['class'][] = 'filter-guidelines-' . $format->format;
   $output = '<div' . drupal_attributes($attributes) . '>';
   $output .= '<h3>' . check_plain($format->name) . '</h3>';
-  $output .= theme('filter_tips', array('tips' => _filter_tips($format->format, FALSE)));
+  $output .= theme('filter_tips', array('tips' => array('tips' => _filter_tips($format->format, FALSE))));
   $output .= '</div>';
   return $output;
 }
@@ -118,8 +118,16 @@ function mobile_jquery_filter_admin_overview($vars) {
   $rows = array();
   foreach (element_children($form['formats']) as $id) {
     $form['formats'][$id]['weight']['#attributes']['class'] = array('text-format-order-weight');
-    $form['formats'][$id]['configure']['#attributes'] += array('data-role' => 'button', 'data-icon' => 'configure', 'data-iconpos' => 'notext');
-    $form['formats'][$id]['disable']['#attributes'] += array('data-role' => 'button', 'data-icon' => 'delete', 'data-iconpos' => 'notext');
+    $form['formats'][$id]['configure']['#attributes'] += array(
+      'data-role' => 'button',
+      'data-icon' => 'configure',
+      'data-iconpos' => 'notext',
+    );
+    $form['formats'][$id]['disable']['#attributes'] += array(
+      'data-role' => 'button',
+      'data-icon' => 'delete',
+      'data-iconpos' => 'notext',
+    );
     $rows[] = array(
       'data' => array(
         drupal_render($form['formats'][$id]['name']),
@@ -128,14 +136,21 @@ function mobile_jquery_filter_admin_overview($vars) {
         drupal_render($form['formats'][$id]['configure']),
         drupal_render($form['formats'][$id]['disable']),
       ),
-/*       'class' => array('draggable'), */
+      /*       'class' => array('draggable'), */
     );
   }
-  $header = array(t('Name'), t('Roles'), t('Weight'), array('data' => t('Operations'), 'colspan' => 2));
-  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'text-format-order')));
+  $header = array(t('Name'), t('Roles'), t('Weight'), array(
+      'data' => t('Operations'),
+      'colspan' => 2,
+    ));
+  $output = theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'attributes' => array('id' => 'text-format-order'),
+    )));
   $output .= drupal_render_children($form);
 
-/*   drupal_add_tabledrag('text-format-order', 'order', 'sibling', 'text-format-order-weight'); */
+  /*   drupal_add_tabledrag('text-format-order', 'order', 'sibling', 'text-format-order-weight'); */
 
   return $output;
 }
@@ -161,12 +176,15 @@ function mobile_jquery_filter_admin_format_filter_order($vars) {
         drupal_render($element[$name]['filter']),
         drupal_render($element[$name]['weight']),
       ),
-/*       'class' => array('draggable'), */
+      /*       'class' => array('draggable'), */
     );
   }
   $output = drupal_render_children($element);
-  $output .= theme('table', array('rows' => $rows, 'attributes' => array('id' => 'filter-order')));
-/*   drupal_add_tabledrag('filter-order', 'order', 'sibling', 'filter-order-weight', NULL, NULL, TRUE); */
+  $output .= theme('table', array('header' => array(
+      'rows' => $rows,
+      'attributes' => array('id' => 'filter-order'),
+    )));
+  /*   drupal_add_tabledrag('filter-order', 'order', 'sibling', 'filter-order-weight', NULL, NULL, TRUE); */
 
   return $output;
 }
@@ -190,4 +208,4 @@ function mobile_jquery_text_format_wrapper($vars) {
   $output .= "</div>\n";
 
   return $output;
-}
\ No newline at end of file
+}
diff --git a/includes/modules/form.inc b/includes/modules/form.inc
index 77e5ff7..6ec136b 100644
--- a/includes/modules/form.inc
+++ b/includes/modules/form.inc
@@ -37,14 +37,14 @@ function mobile_jquery_fieldset($vars) {
   $element = $vars['element'];
   element_set_attributes($element, array('id'));
   _form_set_class($element, array('form-wrapper'));
-  
+
   if (!empty($element['#collapsible'])) {
     $element['#attributes']['data-role'] = 'collapsible';
     $element['#attributes']['class'][] = 'collapsible';
-    
+
     if (!empty($element['#collapsed'])) {
       $element['#attributes']['class'][] = 'collapsed';
-      $element['#attributes']['data-collapsed'] = 'true';      
+      $element['#attributes']['data-collapsed'] = 'true';
     }
   }
 
@@ -63,7 +63,7 @@ function mobile_jquery_fieldset($vars) {
   }
   $output .= '</div>';
   $output .= "</div>\n";
-  
+
   return $output;
 }
 
@@ -183,12 +183,12 @@ function mobile_jquery_checkboxes($vars) {
   if (!empty($element['#attributes']['class'])) {
     $attributes['class'] = array_merge($attributes['class'], $element['#attributes']['class']);
   }
-  
-  if(isset($element['#title'])) {
-	  $title = $element['#title'];
+
+  if (isset($element['#title'])) {
+    $title = $element['#title'];
   }
   else {
-	  $title = '';
+    $title = '';
   }
   return '<div' . drupal_attributes($attributes) . '><fieldset data-role="controlgroup"><legend>' . $title . '</legend>' . (!empty($element['#children']) ? $element['#children'] : '') . '</fieldset></div>';
 }
@@ -291,7 +291,12 @@ function mobile_jquery_tableselect($vars) {
     }
 
   }
-  return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => $element['#empty'], 'attributes' => $element['#attributes']));
+  return theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'empty' => $element['#empty'],
+      'attributes' => $element['#attributes'],
+    )));
 }
 
 
@@ -310,7 +315,7 @@ function mobile_jquery_vertical_tabs($vars) {
 
   $output = '<h2 class="element-invisible">' . t('Vertical Tabs') . '</h2>';
   $output .= '<div data-role="collapsible-set">' . $element['#children'] . '</div>';
-  
+
   return $output;
 }
 
@@ -605,8 +610,8 @@ function mobile_jquery_form_element($vars) {
     $attributes['class'][] = 'form-disabled';
   }
 
-	$output = '';
-	
+  $output = '';
+
   // If #title is not set, we don't display any label or required marker.
   if (!isset($element['#title'])) {
     $element['#title_display'] = 'none';
@@ -636,7 +641,7 @@ function mobile_jquery_form_element($vars) {
   if (!empty($element['#description'])) {
     $output .= '<div class="description">' . $element['#description'] . "</div>\n";
   }
-  
+
   return $output;
 }
 
@@ -665,9 +670,9 @@ function mobile_jquery_form_element($vars) {
  */
 function mobile_jquery_form_element_label($vars) {
   $element = $vars['element'];
-  
-  if($element['#type'] == 'radios' || $element['#type'] == 'checkboxes') {
-	  return;
+
+  if ($element['#type'] == 'radios' || $element['#type'] == 'checkboxes') {
+    return;
   }
   // This is also used in the installer, pre-database setup.
   $t = get_t();
@@ -686,8 +691,8 @@ function mobile_jquery_form_element_label($vars) {
   // Show label only to screen readers to avoid disruption in visual flows.
   elseif ($element['#title_display'] == 'invisible') {
     $title = '&nbsp;';
-    if($element['#type'] == 'select'){
-	    $attributes['class'][] = 'element-invisible';
+    if ($element['#type'] == 'select') {
+      $attributes['class'][] = 'element-invisible';
     }
   }
 
diff --git a/includes/modules/image.inc b/includes/modules/image.inc
index 95c9323..83952d1 100644
--- a/includes/modules/image.inc
+++ b/includes/modules/image.inc
@@ -14,7 +14,10 @@
 function mobile_jquery_image_style_list($vars) {
   $styles = $vars['styles'];
 
-  $header = array(t('Style name'), t('Settings'), array('data' => t('Operations'), 'colspan' => 3));
+  $header = array(t('Style name'), t('Settings'), array(
+      'data' => t('Operations'),
+      'colspan' => 3,
+    ));
   $rows = array();
   foreach ($styles as $style) {
     $row = array();
@@ -44,12 +47,15 @@ function mobile_jquery_image_style_list($vars) {
 
   if (empty($rows)) {
     $rows[] = array(array(
-      'colspan' => 4,
-      'data' => t('There are currently no styles. <a href="!url">Add a new one</a>.', array('!url' => url('admin/config/media/image-styles/add'))),
-    ));
+        'colspan' => 4,
+        'data' => t('There are currently no styles. <a href="!url">Add a new one</a>.', array('!url' => url('admin/config/media/image-styles/add'))),
+      ));
   }
 
-  return theme('table', array('header' => $header, 'rows' => $rows));
+  return theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+    )));
 }
 
 /**
@@ -80,7 +86,10 @@ function mobile_jquery_image_style_effects($vars) {
       // Add the row for adding a new image effect.
       $row[] = '<div class="image-style-new">' . drupal_render($form['new']['new']) . drupal_render($form['new']['add']) . '</div>';
       $row[] = drupal_render($form['new']['weight']);
-      $row[] = array('data' => '', 'colspan' => 2);
+      $row[] = array(
+        'data' => '',
+        'colspan' => 2,
+      );
     }
 
     if (!isset($form[$key]['#access']) || $form[$key]['#access']) {
@@ -94,18 +103,25 @@ function mobile_jquery_image_style_effects($vars) {
   $header = array(
     t('Effect'),
     t('Weight'),
-    array('data' => t('Operations'), 'colspan' => 2),
+    array(
+      'data' => t('Operations'),
+      'colspan' => 2,
+    ),
   );
 
   if (count($rows) == 1 && $form['new']['#access']) {
     array_unshift($rows, array(array(
-      'data' => t('There are currently no effects in this style. Add one by selecting an option below.'),
-      'colspan' => 4,
-    )));
+        'data' => t('There are currently no effects in this style. Add one by selecting an option below.'),
+        'colspan' => 4,
+      )));
   }
 
-  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'image-style-effects')));
-/*   drupal_add_tabledrag('image-style-effects', 'order', 'sibling', 'image-effect-order-weight'); */
+  $output = theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'attributes' => array('id' => 'image-style-effects'),
+    )));
+  /*   drupal_add_tabledrag('image-style-effects', 'order', 'sibling', 'image-effect-order-weight'); */
   return $output;
 }
 
@@ -164,7 +180,12 @@ function mobile_jquery_image_style_preview($vars) {
   $output .= '<div class="preview-image-wrapper">';
   $output .= t('original') . ' (' . l(t('view actual size'), $original_url) . ')';
   $output .= '<div class="preview-image original-image" style="' . $original_attributes['style'] . '">';
-  $output .= '<a href="' . $original_url . '">' . theme('image', array('path' => $original_path, 'alt' => t('Sample original image'), 'title' => '', 'attributes' => $original_attributes)) . '</a>';
+  $output .= '<a href="' . $original_url . '">' . theme('image', array('path' => array(
+      'path' => $original_path,
+      'alt' => t('Sample original image'),
+      'title' => '',
+      'attributes' => $original_attributes,
+    ))) . '</a>';
   $output .= '<div class="height" style="height: ' . $original_height . 'px"><span>' . $original_image['height'] . 'px</span></div>';
   $output .= '<div class="width" style="width: ' . $original_width . 'px"><span>' . $original_image['width'] . 'px</span></div>';
   $output .= '</div>'; // End preview-image.
@@ -173,9 +194,14 @@ function mobile_jquery_image_style_preview($vars) {
   // Build the preview of the image style.
   $preview_url = file_create_url($preview_file) . '?cache_bypass=' . REQUEST_TIME;
   $output .= '<div class="preview-image-wrapper">';
-  $output .= check_plain($style['name']) . ' (' . l(t('view actual size'), file_create_url($preview_file) . '?' . time()) . ')';
+  $output .= check_plain($style['name']) . ' (' . l(t('view actual size'), file_create_url($preview_file) . '?' . REQUEST_TIME) . ')';
   $output .= '<div class="preview-image modified-image" style="' . $preview_attributes['style'] . '">';
-  $output .= '<a href="' . file_create_url($preview_file) . '?' . time() . '">' . theme('image', array('path' => $preview_url, 'alt' => t('Sample modified image'), 'title' => '', 'attributes' => $preview_attributes)) . '</a>';
+  $output .= '<a href="' . file_create_url($preview_file) . '?' . REQUEST_TIME . '">' . theme('image', array('path' => array(
+      'path' => $preview_url,
+      'alt' => t('Sample modified image'),
+      'title' => '',
+      'attributes' => $preview_attributes,
+    ))) . '</a>';
   $output .= '<div class="height" style="height: ' . $preview_height . 'px"><span>' . $preview_image['height'] . 'px</span></div>';
   $output .= '<div class="width" style="width: ' . $preview_width . 'px"><span>' . $preview_image['width'] . 'px</span></div>';
   $output .= '</div>'; // End preview-image.
@@ -210,7 +236,11 @@ function mobile_jquery_image_anchor($vars) {
     }
   }
 
-  return theme('table', array('header' => array(), 'rows' => $rows, 'attributes' => array('class' => array('image-anchor'))));
+  return theme('table', array('header' => array(
+      'header' => array(),
+      'rows' => $rows,
+      'attributes' => array('class' => array('image-anchor')),
+    )));
 }
 
 /**
@@ -244,7 +274,7 @@ function mobile_jquery_image_resize_summary($vars) {
  */
 function mobile_jquery_image_scale_summary($vars) {
   $data = $vars['data'];
-  return theme('image_resize_summary', array('data' => $data)) . ' ' . ($data['upscale'] ? '(' . t('upscaling allowed') . ')' : '');
+  return theme('image_resize_summary', array('data' => array('data' => $data))) . ' ' . ($data['upscale'] ? '(' . t('upscaling allowed') . ')' : '');
 }
 
 /**
@@ -257,7 +287,7 @@ function mobile_jquery_image_scale_summary($vars) {
  * @ingroup themeable
  */
 function mobile_jquery_image_crop_summary($vars) {
-  return theme('image_resize_summary', $vars);
+  return theme('image_resize_summary', array('data' => $vars));
 }
 
 /**
@@ -329,10 +359,10 @@ function mobile_jquery_image_formatter($vars) {
 
   if ($vars['image_style']) {
     $image['style_name'] = $vars['image_style'];
-    $output = theme('image_style', $image);
+    $output = theme('image_style', array('style_name' => $image));
   }
   else {
-    $output = theme('image', $image);
+    $output = theme('image', array('path' => $image));
   }
 
   if (!empty($vars['path']['path'])) {
@@ -364,5 +394,5 @@ function mobile_jquery_image_formatter($vars) {
  */
 function mobile_jquery_image_style($vars) {
   $vars['path'] = image_style_url($vars['style_name'], $vars['path']);
-  return theme('image', $vars);
-}
\ No newline at end of file
+  return theme('image', array('path' => $vars));
+}
diff --git a/includes/modules/menu.inc b/includes/modules/menu.inc
index 45131c7..3de0b0e 100644
--- a/includes/modules/menu.inc
+++ b/includes/modules/menu.inc
@@ -13,8 +13,8 @@
 function mobile_jquery_menu_tree($vars) {
   $attributes = $vars['attributes'];
 
-  $attributes['data-role'] = 'listview'; 
-  $attributes['data-inset'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_inset') : mobile_jquery_theme_get_setting('menu_item_inset'); 
+  $attributes['data-role'] = 'listview';
+  $attributes['data-inset'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_inset') : mobile_jquery_theme_get_setting('menu_item_inset');
   $attributes['data-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_theme');
   $attributes['data-divider-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_dividertheme');
   $attributes['data-count-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_counttheme');
@@ -34,12 +34,16 @@ function mobile_jquery_menu_tree($vars) {
  * @ingroup themeable
  */
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_menu_link(array $vars) {
 
   $element = $vars['element'];
   $sub_menu = '';
   if (module_exists('jquerymobile_ui')) {
-	  $element['#attributes'] = array_merge($element['#attributes'], jquerymobile_ui_get_link_attributes($element['#original_link']));
+    $element['#attributes'] = array_merge($element['#attributes'], jquerymobile_ui_get_link_attributes($element['#original_link']));
   }
 
   if ($element['#below']) {
@@ -134,10 +138,14 @@ function mobile_jquery_menu_local_tasks(&$vars) {
   return $output;
 }
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_menu_breadcrumb_alter(&$active_trail, $item) {
-	foreach($active_trail as $trail => $crumb) {
-		$active_trail[$trail]['localized_options']['attributes']['data-role'] = 'button';
-	}
+  foreach ($active_trail as $trail => $crumb) {
+    $active_trail[$trail]['localized_options']['attributes']['data-role'] = 'button';
+  }
 }
 
 /**
@@ -157,9 +165,15 @@ function mobile_jquery_menu_overview_form($vars) {
 
   $header = array(
     t('Menu link'),
-    array('data' => t('Enabled'), 'class' => array('checkbox')),
+    array(
+      'data' => t('Enabled'),
+      'class' => array('checkbox'),
+    ),
     t('Weight'),
-    array('data' => t('Operations'), 'colspan' => '3'),
+    array(
+      'data' => t('Operations'),
+      'colspan' => '3',
+    ),
   );
 
   $rows = array();
@@ -169,10 +183,13 @@ function mobile_jquery_menu_overview_form($vars) {
       // Build a list of operations.
       $operations = array();
       foreach (element_children($element['operations']) as $op) {
-	      $element['operations'][$op]['#attributes']['data-role'] = 'button';
-	      $element['operations'][$op]['#attributes']['data-icon'] = $op;
-	      $element['operations'][$op]['#attributes']['data-iconpos'] = 'notext';
-        $operations[] = array('data' => drupal_render($element['operations'][$op]), 'class' => array('menu-operations'));
+        $element['operations'][$op]['#attributes']['data-role'] = 'button';
+        $element['operations'][$op]['#attributes']['data-icon'] = $op;
+        $element['operations'][$op]['#attributes']['data-iconpos'] = 'notext';
+        $operations[] = array(
+          'data' => drupal_render($element['operations'][$op]),
+          'class' => array('menu-operations'),
+        );
       }
       while (count($operations) < 2) {
         $operations[] = '';
@@ -187,21 +204,31 @@ function mobile_jquery_menu_overview_form($vars) {
       $element['plid']['#type'] = 'hidden';
 
       $row = array();
-      $row[] = theme('indentation', array('size' => $element['#item']['depth'] - 1)) . drupal_render($element['title']);
-      $row[] = array('data' => drupal_render($element['hidden']), 'class' => array('checkbox', 'menu-enabled'));
+      $row[] = theme('indentation', array('size' => array('size' => $element['#item']['depth'] - 1))) . drupal_render($element['title']);
+      $row[] = array(
+        'data' => drupal_render($element['hidden']),
+        'class' => array('checkbox', 'menu-enabled'),
+      );
       $row[] = drupal_render($element['weight']) . drupal_render($element['plid']) . drupal_render($element['mlid']);
       $row = array_merge($row, $operations);
 
       $row = array_merge(array('data' => $row), $element['#attributes']);
-/*       $row['class'][] = 'draggable'; */
+      /*       $row['class'][] = 'draggable'; */
       $rows[] = $row;
     }
   }
   $output = '';
   if (empty($rows)) {
-    $rows[] = array(array('data' => $form['#empty_text'], 'colspan' => '7'));
+    $rows[] = array(array(
+        'data' => $form['#empty_text'],
+        'colspan' => '7',
+      ));
   }
-  $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'menu-overview')));
+  $output .= theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'attributes' => array('id' => 'menu-overview'),
+    )));
   $output .= drupal_render_children($form);
   return $output;
 }
diff --git a/includes/modules/node.inc b/includes/modules/node.inc
index 581ec46..e824c89 100644
--- a/includes/modules/node.inc
+++ b/includes/modules/node.inc
@@ -10,15 +10,22 @@
  *
  * @ingroup themeable
  */
-function mobile_jquery_node_recent_block($vars) {
+function mobile_jquery_node_recent_block_view($vars) {
   $rows = array();
   $output = '';
 
-  $l_options = array('query' => drupal_get_destination(), 'attributes' => array('data-role' => 'button', 'data-icon' => '', 'data-iconpos' => 'notext'));
+  $l_options = array(
+    'query' => drupal_get_destination(),
+    'attributes' => array(
+      'data-role' => 'button',
+      'data-icon' => '',
+      'data-iconpos' => 'notext',
+    ),
+  );
   foreach ($vars['nodes'] as $node) {
     $row = array();
     $row[] = array(
-      'data' => theme('node_recent_content', array('node' => $node)),
+      'data' => theme('node_recent_content', array('node' => array('node' => $node))),
       'class' => 'title-author',
     );
     $l_options['attributes']['data-icon'] = 'edit';
@@ -35,9 +42,12 @@ function mobile_jquery_node_recent_block($vars) {
   }
 
   if ($rows) {
-    $output = theme('table', array('rows' => $rows));
+    $output = theme('table', array('header' => array('rows' => $rows)));
     if (user_access('access content overview')) {
-      $output .= theme('more_link', array('url' => 'admin/content', 'title' => t('Show more content')));
+      $output .= theme('more_link', array('url' => array(
+          'url' => 'admin/content',
+          'title' => t('Show more content'),
+        )));
     }
   }
 
@@ -52,6 +62,10 @@ function mobile_jquery_node_recent_block($vars) {
  *
  * @ingroup themeable
  */
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_node_preview($vars) {
   $node = $vars['node'];
 
@@ -59,9 +73,9 @@ function mobile_jquery_node_preview($vars) {
 
   $preview_trimmed_version = FALSE;
 
-  $elements = node_view(clone $node, 'teaser');
+  $elements = node_build_content(clone $node, 'teaser');
   $trimmed = drupal_render($elements);
-  $elements = node_view($node, 'full');
+  $elements = node_build_content($node, 'full');
   $full = drupal_render($elements);
 
   // Do we need to preview trimmed version of post as well as full version?
diff --git a/includes/modules/pager.inc b/includes/modules/pager.inc
index 7b1362b..5540acb 100644
--- a/includes/modules/pager.inc
+++ b/includes/modules/pager.inc
@@ -51,12 +51,30 @@ function mobile_jquery_pager($vars) {
     $i = 1;
   }
   // End of generation loop preparation.
- 
 
-  $li_first = theme('pager_first', array('text' => (isset($tags[0]) ? $tags[0] : t('«')), 'element' => $element, 'parameters' => $parameters));
-  $li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('‹')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));
-  $li_next = theme('pager_next', array('text' => (isset($tags[3]) ? $tags[3] : t('›')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));
-  $li_last = theme('pager_last', array('text' => (isset($tags[4]) ? $tags[4] : t('»')), 'element' => $element, 'parameters' => $parameters));
+
+  $li_first = theme('pager_first', array('text' => array(
+      'text' => (isset($tags[0]) ? $tags[0] : t('«')),
+      'element' => $element,
+      'parameters' => $parameters,
+    )));
+  $li_previous = theme('pager_previous', array('text' => array(
+      'text' => (isset($tags[1]) ? $tags[1] : t('‹')),
+      'element' => $element,
+      'interval' => 1,
+      'parameters' => $parameters,
+    )));
+  $li_next = theme('pager_next', array('text' => array(
+      'text' => (isset($tags[3]) ? $tags[3] : t('›')),
+      'element' => $element,
+      'interval' => 1,
+      'parameters' => $parameters,
+    )));
+  $li_last = theme('pager_last', array('text' => array(
+      'text' => (isset($tags[4]) ? $tags[4] : t('»')),
+      'element' => $element,
+      'parameters' => $parameters,
+    )));
 
   if ($pager_total[$element] > 1) {
     if ($li_first) {
@@ -85,7 +103,12 @@ function mobile_jquery_pager($vars) {
         if ($i < $pager_current) {
           $items[] = array(
             'class' => array('pager-item'),
-            'data' => theme('pager_previous', array('text' => $i, 'element' => $element, 'interval' => ($pager_current - $i), 'parameters' => $parameters)),
+            'data' => theme('pager_previous', array('text' => array(
+                'text' => $i,
+                'element' => $element,
+                'interval' => ($pager_current - $i),
+                'parameters' => $parameters,
+              ))),
           );
         }
         if ($i == $pager_current) {
@@ -97,7 +120,12 @@ function mobile_jquery_pager($vars) {
         if ($i > $pager_current) {
           $items[] = array(
             'class' => array('pager-item'),
-            'data' => theme('pager_next', array('text' => $i, 'element' => $element, 'interval' => ($i - $pager_current), 'parameters' => $parameters)),
+            'data' => theme('pager_next', array('text' => array(
+                'text' => $i,
+                'element' => $element,
+                'interval' => ($i - $pager_current),
+                'parameters' => $parameters,
+              ))),
           );
         }
       }
@@ -127,7 +155,7 @@ function mobile_jquery_pager($vars) {
       $output .= $items[$key]['data'];
     }
     $output .= '</div>';
-    
+
     return $output;
   }
 }
@@ -192,8 +220,8 @@ function mobile_jquery_pager_link($vars) {
       $attributes['title'] = t('Go to page @number', array('@number' => $text));
     }
   }
-  
+
   $attributes['data-role'] = "button";
 
   return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => $query));
-}
\ No newline at end of file
+}
diff --git a/includes/modules/poll.inc b/includes/modules/poll.inc
index f9e326c..96e6b08 100644
--- a/includes/modules/poll.inc
+++ b/includes/modules/poll.inc
@@ -12,7 +12,7 @@
 function mobile_jquery_poll_choices($vars) {
   $form = $vars['form'];
 
-  $is_admin= user_access('administer nodes');
+  $is_admin = user_access('administer nodes');
   $delta = 0;
   $rows = array();
   $headers = array('', t('Choice'));
@@ -46,7 +46,11 @@ function mobile_jquery_poll_choices($vars) {
     $rows[] = $row;
   }
 
-  $output = theme('table', array('header' => $headers, 'rows' => $rows, 'attributes' => array('id' => 'poll-choice-table')));
+  $output = theme('table', array('header' => array(
+      'header' => $headers,
+      'rows' => $rows,
+      'attributes' => array('id' => 'poll-choice-table'),
+    )));
   $output .= drupal_render_children($form);
   return $output;
 }
diff --git a/includes/modules/search.inc b/includes/modules/search.inc
index 8c3eae0..3d7b236 100644
--- a/includes/modules/search.inc
+++ b/includes/modules/search.inc
@@ -1,10 +1,14 @@
 <?php
 
 /**
-  * Implementation of hook form alter
-  */
+ * Implementation of hook form alter
+ */
 
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_form_search_block_form_alter(&$form, &$form_state) {
-    $form['search_block_form']['#attributes']['data-type'] = 'search';
+  $form['search_block_form']['#attributes']['data-type'] = 'search';
 }
diff --git a/includes/modules/shortcut.inc b/includes/modules/shortcut.inc
index 1ceba49..b1791ee 100644
--- a/includes/modules/shortcut.inc
+++ b/includes/modules/shortcut.inc
@@ -12,19 +12,22 @@
  */
 function mobile_jquery_shortcut_set_customize($vars) {
   $form = $vars['form'];
-  $map = array('disabled' => t('Disabled'), 'enabled' => t('Enabled'));
+  $map = array(
+    'disabled' => t('Disabled'),
+    'enabled' => t('Enabled'),
+  );
 
   $rows = array();
   foreach (array('enabled', 'disabled') as $status) {
-/*
-    drupal_add_tabledrag('shortcuts', 'match', 'sibling', 'shortcut-status-select');
-    drupal_add_tabledrag('shortcuts', 'order', 'sibling', 'shortcut-weight');
-*/
+    /*
+     drupal_add_tabledrag('shortcuts', 'match', 'sibling', 'shortcut-status-select');
+     drupal_add_tabledrag('shortcuts', 'order', 'sibling', 'shortcut-weight');
+     */
     $rows[] = array(
       'data' => array(array(
-        'colspan' => 5,
-        'data' => '<strong>' . $map[$status] . '</strong>',
-      )),
+          'colspan' => 5,
+          'data' => '<strong>' . $map[$status] . '</strong>',
+        )),
       'class' => array('shortcut-status', 'shortcut-status-' . $status),
     );
 
@@ -46,9 +49,9 @@ function mobile_jquery_shortcut_set_customize($vars) {
       for ($i = 0; $i < shortcut_max_slots(); $i++) {
         $rows['empty-' . $i] = array(
           'data' => array(array(
-            'colspan' => 5,
-            'data' => '<em>' . t('Empty') . '</em>',
-          )),
+              'colspan' => 5,
+              'data' => '<em>' . t('Empty') . '</em>',
+            )),
           'class' => array('shortcut-slot-empty'),
         );
       }
@@ -61,9 +64,16 @@ function mobile_jquery_shortcut_set_customize($vars) {
     }
   }
 
-  $header = array(t('Name'), t('Weight'), t('Status'), array('data' => t('Operations'), 'colspan' => 2));
-  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'shortcuts')));
+  $header = array(t('Name'), t('Weight'), t('Status'), array(
+      'data' => t('Operations'),
+      'colspan' => 2,
+    ));
+  $output = theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'attributes' => array('id' => 'shortcuts'),
+    )));
   $output .= drupal_render($form['actions']);
   $output = drupal_render_children($form) . $output;
   return $output;
-}
\ No newline at end of file
+}
diff --git a/includes/modules/system.inc b/includes/modules/system.inc
index 344012d..f1748d9 100644
--- a/includes/modules/system.inc
+++ b/includes/modules/system.inc
@@ -22,13 +22,20 @@ function mobile_jquery_system_date_time_settings($vars) {
     $row = array();
     $row[] = $form['format'][$key]['#title'];
     $form['format'][$key]['#title_display'] = 'invisible';
-    $form['delete'][$delete_key]['#attributes'] = array('data-role' => 'button', 'data-icon' => 'delete');
+    $form['delete'][$delete_key]['#attributes'] = array(
+      'data-role' => 'button',
+      'data-icon' => 'delete',
+    );
     $row[] = array('data' => drupal_render($form['format'][$key]));
     $row[] = array('data' => drupal_render($form['delete'][$delete_key]));
     $rows[] = $row;
   }
 
-  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'system-date-types')));
+  $output = theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'attributes' => array('id' => 'system-date-types'),
+    )));
   $output .= drupal_render_children($form);
 
   return $output;
@@ -48,7 +55,7 @@ function mobile_jquery_system_date_time_settings($vars) {
  *
  * @ingroup themeable
  */
-function mobile_jquery_admin_block($vars) {
+function mobile_jquery_admin_block_view($vars) {
   $block = $vars['block'];
   $output = '';
 
@@ -87,11 +94,11 @@ function mobile_jquery_admin_block($vars) {
 function mobile_jquery_admin_block_content($vars) {
   $content = $vars['content'];
   $output = '';
-  
+
   $attributes = array();
 
-  $attributes['data-role'] = 'listview'; 
-  $attributes['data-inset'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_inset') : mobile_jquery_theme_get_setting('menu_item_inset'); 
+  $attributes['data-role'] = 'listview';
+  $attributes['data-inset'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_inset') : mobile_jquery_theme_get_setting('menu_item_inset');
   $attributes['data-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_theme');
   $attributes['data-divider-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_dividertheme');
   $attributes['data-count-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_counttheme');
@@ -105,20 +112,20 @@ function mobile_jquery_admin_block_content($vars) {
       $class .= ' compact';
     }
 
-		$output = '<ul ' . drupal_attributes($attributes) .  '>';
+    $output = '<ul ' . drupal_attributes($attributes) .  '>';
 
     foreach ($content as $item) {
-	    $item['localized_options']['html'] = TRUE;
+      $item['localized_options']['html'] = TRUE;
       $link = '<h3>' . $item['title'] . '</h3>';
       if (!$compact && isset($item['description'])) {
         $link .= '<p>' . filter_xss_admin(strip_tags($item['description'])) . '</p>';
       }
       $output .= '<li>' . l($link, $item['href'], $item['localized_options']) . '</li>';
     }
-    
+
     $output .= '</ul>';
   }
-  
+
   return $output;
 }
 
@@ -141,7 +148,7 @@ function mobile_jquery_admin_page($vars) {
   $container = array();
 
   foreach ($blocks as $block) {
-    if ($block_output = theme('admin_block', array('block' => $block))) {
+    if ($block_output = theme('admin_block', array('block' => array('block' => $block)))) {
       if (empty($block['position'])) {
         // perform automatic striping.
         $block['position'] = ++$stripe % 2 ? 'left' : 'right';
@@ -178,8 +185,14 @@ function mobile_jquery_system_admin_index($vars) {
   $menu_items = $vars['menu_items'];
 
   $stripe = 0;
-  $container = array('left' => '', 'right' => '');
-  $flip = array('left' => 'right', 'right' => 'left');
+  $container = array(
+    'left' => '',
+    'right' => '',
+  );
+  $flip = array(
+    'left' => 'right',
+    'right' => 'left',
+  );
   $position = 'left';
 
   // Iterate over all modules.
@@ -190,11 +203,11 @@ function mobile_jquery_system_admin_index($vars) {
     if (count($items)) {
       $block = array();
       $block['title'] = $module;
-      $block['content'] = theme('admin_block_content', array('content' => $items));
+      $block['content'] = theme('admin_block_content', array('content' => array('content' => $items)));
       $block['description'] = t($description);
       $block['show'] = TRUE;
 
-      if ($block_output = theme('admin_block', array('block' => $block))) {
+      if ($block_output = theme('admin_block', array('block' => array('block' => $block)))) {
         if (!isset($block['position'])) {
           // Perform automatic striping.
           $block['position'] = $position;
@@ -281,7 +294,7 @@ function mobile_jquery_system_modules_fieldset($vars) {
   $form = $vars['form'];
 
   $output = '<div class="ui-grid-b">';
-  
+
   // Iterate through all the modules, which are
   // children of this fieldset.
   foreach (element_children($form) as $key) {
@@ -291,19 +304,19 @@ function mobile_jquery_system_modules_fieldset($vars) {
     //unset($module['enable']['#title']);
     //$module['enable']['#title'] = $module['name'];
     $mod = array();
-    
-    foreach($module['enable'] as $key => $value) {
-	    if($key === '#title') {
-				$mod[$key] = $module['name']['#markup'];
-	    }
-	    else {
-		    $mod[$key] = $value;
-	    }
+
+    foreach ($module['enable'] as $key => $value) {
+      if ($key === '#title') {
+        $mod[$key] = $module['name']['#markup'];
+      }
+      else {
+        $mod[$key] = $value;
+      }
     }
 
     $output .= '<div class="ui-block-a checkbox">' . drupal_render($mod) . '</div>';
-    
-    
+
+
     // Add the description, along with any modules it requires.
     $description = drupal_render($module['description']);
     if ($module['#requires']) {
@@ -314,17 +327,21 @@ function mobile_jquery_system_modules_fieldset($vars) {
     }
     $description .= '<div class="admin-version">' . t('Version') . ': ' . drupal_render($module['version']) . '</div>';
     $output .= '<div class="ui-block-b"><div class="description">' . $description . '</div></div>';
-    
+
     // Display links (such as help or permissions) in their own columns.
     $links = '';
     foreach (array('help', 'permissions', 'configure') as $key) {
-	    $module['links'][$key]['#attributes'] = array('data-role' => 'button', 'data-icon' => $key, 'data-iconpos' => 'notext');
+      $module['links'][$key]['#attributes'] = array(
+        'data-role' => 'button',
+        'data-icon' => $key,
+        'data-iconpos' => 'notext',
+      );
       $links .= drupal_render($module['links'][$key]);
     }
     $output .= '<div class="ui-block-c">' . $links . '</div>';
   }
 
-	$output .=  '</div>';
+  $output .=  '</div>';
   return $output;
 }
 
@@ -347,7 +364,7 @@ function mobile_jquery_system_modules_uninstall($vars) {
 
   // Table headers.
   $header = array(
-	  t('Uninstall'),
+    t('Uninstall'),
     t('Name'),
     t('Description'),
   );
@@ -365,15 +382,25 @@ function mobile_jquery_system_modules_uninstall($vars) {
     else {
       $disabled_message = '';
     }
-    
+
     $rows[] = array(
-      array('data' => drupal_render($form['uninstall'][$module]), 'align' => 'center'),
+      array(
+        'data' => drupal_render($form['uninstall'][$module]),
+        'align' => 'center',
+      ),
       '<strong>' . drupal_render($form['modules'][$module]['name']) . '</strong>',
-      array('data' => drupal_render($form['modules'][$module]['description']) . $disabled_message, 'class' => array('description')),
+      array(
+        'data' => drupal_render($form['modules'][$module]['description']) . $disabled_message,
+        'class' => array('description'),
+      ),
     );
   }
 
-  $output  = theme('table', array('header' => $header, 'rows' => $rows, 'empty' => t('No modules are available to uninstall.')));
+  $output  = theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'empty' => t('No modules are available to uninstall.'),
+    )));
   $output .= drupal_render_children($form);
 
   return $output;
@@ -399,17 +426,17 @@ function mobile_jquery_system_themes_page($vars) {
       continue;
     }
     // Start new theme group.
-    $attributes = array('class' => array('system-themes-list', 'system-themes-list-'. $state, 'clearfix'));
+    $attributes = array('class' => array('system-themes-list', 'system-themes-list-' . $state, 'clearfix'));
     $attributes['data-role'] = "collapsible";
-    if($state != 'enabled') {
-	    $attributes['data-collapsed'] = "true";
+    if ($state != 'enabled') {
+      $attributes['data-collapsed'] = "true";
     }
-    $output .= '<div ' . drupal_attributes($attributes) . '><h2>'. $title .'</h2>';
+    $output .= '<div ' . drupal_attributes($attributes) . '><h2>' . $title . '</h2>';
 
     foreach ($theme_groups[$state] as $theme) {
 
       // Theme the screenshot.
-      $screenshot = $theme->screenshot ? theme('image', $theme->screenshot) : '<div class="no-screenshot">' . t('no screenshot') . '</div>';
+      $screenshot = $theme->screenshot ? theme('image', array('path' => $theme->screenshot)) : '<div class="no-screenshot">' . t('no screenshot') . '</div>';
 
       // Localize the theme description.
       $description = t($theme->info['description']);
@@ -418,7 +445,7 @@ function mobile_jquery_system_themes_page($vars) {
       $notes = count($theme->notes) ? ' (' . join(', ', $theme->notes) . ')' : '';
       $theme->classes[] = 'theme-selector';
       $theme->classes[] = 'clearfix';
-      $output .= '<div class="'. join(' ', $theme->classes) .'"><div class="theme-info"><h3>' . $theme->info['name'] . ' ' . (isset($theme->info['version']) ? $theme->info['version'] : '') . $notes . '</h3><div class="theme-description">' . $description . '</div>';
+      $output .= '<div class="' . join(' ', $theme->classes) . '"><div class="theme-info"><h3>' . $theme->info['name'] . ' ' . (isset($theme->info['version']) ? $theme->info['version'] : '') . $notes . '</h3><div class="theme-description">' . $description . '</div>';
       $output .= '<div>' . $screenshot . '</div>';
 
       // Make sure to provide feedback on compatibility.
@@ -433,9 +460,9 @@ function mobile_jquery_system_themes_page($vars) {
       }
       else {
         $output .= '<div data-role="controlgroup" data-type="horizontal">';
-        foreach($theme->operations as $key => $value) {
-	        $theme->operations[$key]['attributes']['data-role'] = 'button';
-	        $output .= l($theme->operations[$key]['title'], $theme->operations[$key]['href'], array('attributes' => $theme->operations[$key]['attributes']));
+        foreach ($theme->operations as $key => $value) {
+          $theme->operations[$key]['attributes']['data-role'] = 'button';
+          $output .= l($theme->operations[$key]['title'], $theme->operations[$key]['href'], array('attributes' => $theme->operations[$key]['attributes']));
         }
         //$output .= theme('links', array('links' => $theme->operations, 'attributes' => array('class' => array('operations', 'clearfix'))));
 
@@ -490,11 +517,11 @@ function mobile_jquery_system_powered_by() {
  * @ingroup themeable
  */
 function mobile_jquery_confirm_form($vars) {
-	$form = $vars['form'];
-	
-	$form['actions']['cancel']['#attributes'] += array(
-		'data-role' => 'button',
-	);
+  $form = $vars['form'];
+
+  $form['actions']['cancel']['#attributes'] += array(
+    'data-role' => 'button',
+  );
 
   return drupal_render_children($form);
 }
@@ -536,7 +563,10 @@ function mobile_jquery_exposed_filters($vars) {
     foreach (element_children($form['current']) as $key) {
       $items[] = drupal_render($form['current'][$key]);
     }
-    $output .= theme('item_list', array('items' => $items, 'attributes' => array('class' => array('clearfix', 'current-filters'))));
+    $output .= theme('item_list', array('items' => array(
+        'items' => $items,
+        'attributes' => array('class' => array('clearfix', 'current-filters')),
+      )));
   }
 
   $output .= drupal_render_children($form);
diff --git a/includes/modules/taxonomy.inc b/includes/modules/taxonomy.inc
index 9523a74..1796436 100644
--- a/includes/modules/taxonomy.inc
+++ b/includes/modules/taxonomy.inc
@@ -25,14 +25,29 @@ function mobile_jquery_taxonomy_overview_vocabularies($vars) {
         $vocabulary['weight']['#attributes']['class'] = array('vocabulary-weight');
         $row[] = drupal_render($vocabulary['weight']);
       }
-      $vocabulary['edit']['#attributes'] += array('data-role' => 'button', 'data-icon' => 'edit', 'data-iconpos' => 'notext');
-			$vocabulary['list']['#attributes'] += array('data-role' => 'button', 'data-icon' => 'list', 'data-iconpos' => 'notext');
-      $vocabulary['add']['#attributes'] += array('data-role' => 'button', 'data-icon' => 'add', 'data-iconpos' => 'notext');
+      $vocabulary['edit']['#attributes'] += array(
+        'data-role' => 'button',
+        'data-icon' => 'edit',
+        'data-iconpos' => 'notext',
+      );
+      $vocabulary['list']['#attributes'] += array(
+        'data-role' => 'button',
+        'data-icon' => 'list',
+        'data-iconpos' => 'notext',
+      );
+      $vocabulary['add']['#attributes'] += array(
+        'data-role' => 'button',
+        'data-icon' => 'add',
+        'data-iconpos' => 'notext',
+      );
 
       $row[] = drupal_render($vocabulary['edit']);
       $row[] = drupal_render($vocabulary['list']);
       $row[] = drupal_render($vocabulary['add']);
-      $rows[] = array('data' => $row, 'class' => array(/* 'draggable' */));
+      $rows[] = array(
+        'data' => $row,
+        'class' => array(/* 'draggable' */),
+      );
     }
   }
 
@@ -40,8 +55,16 @@ function mobile_jquery_taxonomy_overview_vocabularies($vars) {
   if (isset($form['actions'])) {
     $header[] = t('Weight');
   }
-  $header[] = array('data' => t('Operations'), 'colspan' => '3');
-  return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => t('No vocabularies available. <a href="@link">Add vocabulary</a>.', array('@link' => url('admin/structure/taxonomy/add'))), 'attributes' => array('id' => 'taxonomy'))) . drupal_render_children($form);
+  $header[] = array(
+    'data' => t('Operations'),
+    'colspan' => '3',
+  );
+  return theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'empty' => t('No vocabularies available. <a href="@link">Add vocabulary</a>.', array('@link' => url('admin/structure/taxonomy/add'))),
+      'attributes' => array('id' => 'taxonomy'),
+    ))) . drupal_render_children($form);
 }
 
 /**
@@ -67,7 +90,7 @@ function mobile_jquery_taxonomy_overview_terms($vars) {
     drupal_add_tabledrag('taxonomy', 'match', 'parent', 'term-parent', 'term-parent', 'term-id', FALSE);
     drupal_add_tabledrag('taxonomy', 'depth', 'group', 'term-depth', NULL, NULL, FALSE);
     drupal_add_js(drupal_get_path('module', 'taxonomy') . '/taxonomy.js');
-    drupal_add_js(array('taxonomy' => array('backStep' => $back_step, 'forwardStep' => $forward_step)), 'setting');
+    drupal_add_js(array('taxonomy' => array('backStep' => $back_step, 'forwardStep' => $forward_step)), array('type' => 'setting', 'scope' => JS_DEFAULT));
     drupal_add_css(drupal_get_path('module', 'taxonomy') . '/taxonomy.css');
   }
   drupal_add_tabledrag('taxonomy', 'order', 'sibling', 'term-weight');
@@ -79,7 +102,7 @@ function mobile_jquery_taxonomy_overview_terms($vars) {
       $term = &$form[$key];
 
       $row = array();
-      $row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', array('size' => $term['#term']['depth'])) : ''). drupal_render($term['view']);
+      $row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', array('size' => array('size' => $term['#term']['depth']))) : '') . drupal_render($term['view']);
       if ($form['#parent_fields']) {
         $term['tid']['#attributes']['class'] = array('term-id');
         $term['parent']['#attributes']['class'] = array('term-parent');
@@ -126,12 +149,20 @@ function mobile_jquery_taxonomy_overview_terms($vars) {
   }
 
   if (empty($rows)) {
-    $rows[] = array(array('data' => $form['#empty_text'], 'colspan' => '3'));
+    $rows[] = array(array(
+        'data' => $form['#empty_text'],
+        'colspan' => '3',
+      ));
   }
 
   $header = array(t('Name'), t('Weight'), t('Operations'));
-  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'taxonomy')));
+  $output = theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'attributes' => array('id' => 'taxonomy'),
+    )));
   $output .= drupal_render_children($form);
+  // TODO Please change this theme call to use an associative array for the $variables parameter.
   $output .= theme('pager');
 
   return $output;
diff --git a/includes/modules/theme.inc b/includes/modules/theme.inc
index b28f8bf..2626485 100644
--- a/includes/modules/theme.inc
+++ b/includes/modules/theme.inc
@@ -19,10 +19,10 @@ function mobile_jquery_item_list($vars) {
   $items = $vars['items'];
   $title = $vars['title'];
   $type = $vars['type'];
-  
+
   $attributes = $vars['attributes'];
-  $attributes['data-role'] = 'listview'; 
-  $attributes['data-inset'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_inset') : mobile_jquery_theme_get_setting('list_item_inset'); 
+  $attributes['data-role'] = 'listview';
+  $attributes['data-inset'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_inset') : mobile_jquery_theme_get_setting('list_item_inset');
   $attributes['data-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('list_item_theme');
   $attributes['data-divider-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('list_item_dividertheme');
   $attributes['data-count-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('list_item_counttheme');
@@ -58,9 +58,9 @@ function mobile_jquery_item_list($vars) {
       else {
         $data = $item;
       }
-      
+
       $list_attributes['data-icon'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_icon') : mobile_jquery_theme_get_setting('list_item_icon');
-      
+
       if (count($children) > 0) {
         // Render nested list.
         $data .= theme_item_list(array('items' => $children, 'title' => NULL, 'type' => $type, 'attributes' => $list_attributes));
@@ -71,7 +71,7 @@ function mobile_jquery_item_list($vars) {
       if ($i == $num_items - 1) {
         $list_attributes['class'][] = 'last';
       }
-      
+
       $output .= '<li' . drupal_attributes($list_attributes) . '>' . $data . "</li>\n";
     }
     $output .= "</$type>";
@@ -119,7 +119,7 @@ function mobile_jquery_more_help_link($vars) {
  *   - title: A descriptive verb for the link, like 'Read more'.
  */
 function mobile_jquery_more_link($variables) {
-  return '<div class="more-link">' . l(t('More'), $variables['url'], array('attributes' => array('title' => $variables['title'],'data-role' => 'button', 'data-icon' => 'arrow-r', 'data-iconpos' => 'right'))) . '</div>';
+  return '<div class="more-link">' . l(t('More'), $variables['url'], array('attributes' => array('title' => $variables['title'], 'data-role' => 'button', 'data-icon' => 'arrow-r', 'data-iconpos' => 'right'))) . '</div>';
 }
 
 /**
@@ -216,9 +216,14 @@ function mobile_jquery_status_messages($vars) {
  * @see l()
  */
 function mobile_jquery_link($vars) {
+  // TODO The second parameter to this function call should be an array.
   return '<a href="' . check_plain(url($vars['path'], $vars['options'])) . '"' . drupal_attributes($vars['options']['attributes']) . '>' . ($vars['options']['html'] ? $vars['text'] : check_plain($vars['text'])) . '</a>';
 }
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_links($vars) {
   global $language_url;
 
@@ -226,8 +231,8 @@ function mobile_jquery_links($vars) {
   $heading = $vars['heading'];
   $attributes = $vars['attributes'];
 
-  $attributes['data-role'] = 'listview'; 
-  $attributes['data-inset'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_inset') : mobile_jquery_theme_get_setting('menu_item_inset'); 
+  $attributes['data-role'] = 'listview';
+  $attributes['data-inset'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_inset') : mobile_jquery_theme_get_setting('menu_item_inset');
   $attributes['data-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_theme');
   $attributes['data-divider-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_dividertheme');
   $attributes['data-count-theme'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_theme') : mobile_jquery_theme_get_setting('menu_item_counttheme');
@@ -235,7 +240,7 @@ function mobile_jquery_links($vars) {
   $attributes['data-split-icon'] = mobile_jquery_theme_get_setting('use_global') ? mobile_jquery_theme_get_setting('global_icon') : mobile_jquery_theme_get_setting('menu_item_spliticon');
 
   $output = '';
-  
+
   // Treat the heading first if it is present to prepend it to the
   // list of links.
   if (!empty($heading)) {
@@ -257,7 +262,7 @@ function mobile_jquery_links($vars) {
   if (count($links) > 0) {
 
     $output .= '<ul' . drupal_attributes($attributes) . '>';
-    
+
     $num_links = count($links);
     $i = 1;
 
@@ -274,7 +279,7 @@ function mobile_jquery_links($vars) {
         $class[] = 'last';
       }
       if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))
-          && (empty($link['language']) || $link['language']->language == $language_url->language)) {
+           && (empty($link['language']) || $link['language']->language == $language_url->language)) {
         $class[] = 'active';
       }
       $list_attributes['class'] = $class;
@@ -307,71 +312,87 @@ function mobile_jquery_links($vars) {
 }
 
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_links__node($vars) {
-	$links = $vars['links'];
-	$output = '<div data-role="controlgroup" data-type="horizontal">';
-
-	foreach($links as $link => $value) {
-		if(!isset($links[$link]['attributes'])) {
-			$links[$link]['attributes'] = array();
-		}
-		if($link != 'comment_forbidden') {
-			$links[$link]['attributes']['data-role'] = 'button';
-			$links[$link]['attributes']['data-icon'] = $link;
-		}
-		
-		$output .= l($links[$link]['title'], $links[$link]['href'], array('attributes' => $links[$link]['attributes'], 'html' => TRUE));
-	}
-	
-	$output .= '</div>';
-	
-	return $output;
+  $links = $vars['links'];
+  $output = '<div data-role="controlgroup" data-type="horizontal">';
+
+  foreach ($links as $link => $value) {
+    if (!isset($links[$link]['attributes'])) {
+      $links[$link]['attributes'] = array();
+    }
+    if ($link != 'comment_forbidden') {
+      $links[$link]['attributes']['data-role'] = 'button';
+      $links[$link]['attributes']['data-icon'] = $link;
+    }
+
+    $output .= l($links[$link]['title'], $links[$link]['href'], array('attributes' => $links[$link]['attributes'], 'html' => TRUE));
+  }
+
+  $output .= '</div>';
+
+  return $output;
 }
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_links__contextual($vars) {
-	$output = '';
-	$links = $vars['links'];
-	
-	foreach($links as $link => $value) {
-		$path = explode('/', $links[$link]['href']);
-		$icon = $path[count($path)-1];
-		
-		$attributes = array(
-			'data-role' => 'button', 
-			'data-iconpos' => 'notext', 
-			'data-icon' => $icon,
-		);
-		if($icon == 'delete') {
-			$attributes['data-rel'] = 'dialog';
-		}
-		$output .= l($links[$link]['title'], $links[$link]['href'], array('title' => $links[$link]['title'],'attributes' => $attributes));
-	}
-	
-	return $output;
+  $output = '';
+  $links = $vars['links'];
+
+  foreach ($links as $link => $value) {
+    $path = explode('/', $links[$link]['href']);
+    $icon = $path[count($path) -1];
+
+    $attributes = array(
+      'data-role' => 'button',
+      'data-iconpos' => 'notext',
+      'data-icon' => $icon,
+    );
+    if ($icon == 'delete') {
+      $attributes['data-rel'] = 'dialog';
+    }
+    $output .= l($links[$link]['title'], $links[$link]['href'], array('title' => $links[$link]['title'], 'attributes' => $attributes));
+  }
+
+  return $output;
 }
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_links__comment($vars) {
-	$links = $vars['links'];
-	$output = '<div data-role="controlgroup" data-type="horizontal">';
-	print_r($links);
-	foreach($links as $link => $value) {
-		if(!isset($links[$link]['attributes'])) {
-			$links[$link]['attributes'] = array();
-		}
-
-		if($link != 'comment_forbidden') {
-			$icon = explode('-', $link);
-			$links[$link]['attributes']['data-role'] = 'button';
-			$links[$link]['attributes']['data-icon'] = $icon[1];
-		}
-		$output .= l($links[$link]['title'], $links[$link]['href'], array('attributes' => $links[$link]['attributes'], 'html' => TRUE));
-	}
-	
-	$output .= '</div>';
-	
-	return $output;
+  $links = $vars['links'];
+  $output = '<div data-role="controlgroup" data-type="horizontal">';
+  print_r($links);
+  foreach ($links as $link => $value) {
+    if (!isset($links[$link]['attributes'])) {
+      $links[$link]['attributes'] = array();
+    }
+
+    if ($link != 'comment_forbidden') {
+      $icon = explode('-', $link);
+      $links[$link]['attributes']['data-role'] = 'button';
+      $links[$link]['attributes']['data-icon'] = $icon[1];
+    }
+    $output .= l($links[$link]['title'], $links[$link]['href'], array('attributes' => $links[$link]['attributes'], 'html' => TRUE));
+  }
+
+  $output .= '</div>';
+
+  return $output;
 }
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_links__poll_results($vars) {
 
 }
@@ -520,7 +541,11 @@ function mobile_jquery_table($vars) {
         $header_count++;
       }
     }
-    $rows[] = array(array('data' => $empty, 'colspan' => $header_count, 'class' => array('empty', 'message')));
+    $rows[] = array(array(
+        'data' => $empty,
+        'colspan' => $header_count,
+        'class' => array('empty', 'message'),
+      ));
   }
 
   // Format the table header:
@@ -543,7 +568,10 @@ function mobile_jquery_table($vars) {
   // Format the table rows:
   if (count($rows)) {
     $output .= "<tbody>\n";
-    $flip = array('even' => 'odd', 'odd' => 'even');
+    $flip = array(
+      'even' => 'odd',
+      'odd' => 'even',
+    );
     $class = 'even';
     foreach ($rows as $number => $row) {
       $attributes = array();
@@ -595,10 +623,22 @@ function mobile_jquery_table($vars) {
  */
 function mobile_jquery_tablesort_indicator($vars) {
   if ($vars['style'] == "asc") {
-    return theme('image', array('path' => 'misc/arrow-asc.png', 'width' => 13, 'height' => 13, 'alt' => t('sort ascending'), 'title' => t('sort ascending')));
+    return theme('image', array('path' => array(
+        'path' => 'misc/arrow-asc.png',
+        'width' => 13,
+        'height' => 13,
+        'alt' => t('sort ascending'),
+        'title' => t('sort ascending'),
+      )));
   }
   else {
-    return theme('image', array('path' => 'misc/arrow-desc.png', 'width' => 13, 'height' => 13, 'alt' => t('sort descending'), 'title' => t('sort descending')));
+    return theme('image', array('path' => array(
+        'path' => 'misc/arrow-desc.png',
+        'width' => 13,
+        'height' => 13,
+        'alt' => t('sort descending'),
+        'title' => t('sort descending'),
+      )));
   }
 }
 
@@ -613,29 +653,42 @@ function mobile_jquery_tablesort_indicator($vars) {
  */
 function mobile_jquery_feed_icon($vars) {
   $text = t('Subscribe to @feed-title', array('@feed-title' => $vars['title']));
-  if ($image = theme('image', array('path' => 'misc/feed.png', 'width' => 16, 'height' => 16, 'alt' => $text))) {
+  if ($image = theme('image', array('path' => array(
+      'path' => 'misc/feed.png',
+      'width' => 16,
+      'height' => 16,
+      'alt' => $text,
+    )))) {
     return l($image, $vars['url'], array('html' => TRUE, 'attributes' => array('class' => array('feed-icon'), 'title' => $text)));
   }
 }
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_css_alter(&$css) {
-	$excludes = _mobile_jquery_alter(mobile_jquery_theme_get_info('exclude'), 'css');
+  $excludes = _mobile_jquery_alter(mobile_jquery_theme_get_info('exclude'), 'css');
   $css = array_diff_key($css, $excludes);
 }
- 
 
+
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_js_alter(&$js) {
-	$excludes = _mobile_jquery_alter(mobile_jquery_theme_get_info('exclude'), 'js');
+  $excludes = _mobile_jquery_alter(mobile_jquery_theme_get_info('exclude'), 'js');
   $js = array_diff_key($js, $excludes);
 }
 
 
 function _mobile_jquery_alter($files, $type) {
-	$output = array();
-  foreach($files as $key => $value) {
-	  foreach($files[$key][$type] as $file => $name) {
-		  $output[$name] = FALSE;
-	  }
+  $output = array();
+  foreach ($files as $key => $value) {
+    foreach ($files[$key][$type] as $file => $name) {
+      $output[$name] = FALSE;
+    }
   }
   return $output;
 }
diff --git a/includes/modules/trigger.inc b/includes/modules/trigger.inc
index 9d98af0..1d42e9c 100644
--- a/includes/modules/trigger.inc
+++ b/includes/modules/trigger.inc
@@ -20,16 +20,19 @@ function mobile_jquery_trigger_display($vars) {
     foreach ($element['assigned']['#value'] as $aid => $info) {
       $rows[] = array(
         check_plain($info['label']),
-        $info['link']
+        $info['link'],
       );
     }
   }
 
   if (count($rows)) {
-    $output = theme('table', array('header' => $header, 'rows' => $rows)) . drupal_render_children($element);
+    $output = theme('table', array('header' => array(
+        'header' => $header,
+        'rows' => $rows,
+      ))) . drupal_render_children($element);
   }
   else {
     $output = drupal_render_children($element);
   }
   return $output;
-}
\ No newline at end of file
+}
diff --git a/includes/modules/user.inc b/includes/modules/user.inc
index 907a232..fd78d61 100644
--- a/includes/modules/user.inc
+++ b/includes/modules/user.inc
@@ -18,10 +18,13 @@ function mobile_jquery_user_list($vars) {
 
   if (!empty($users)) {
     foreach ($users as $user) {
-      $items[] = theme('username', array('account' => $user));
+      $items[] = theme('username', array('account' => array('account' => $user)));
     }
   }
-  return theme('item_list', array('items' => $items, 'title' => $title));
+  return theme('item_list', array('items' => array(
+      'items' => $items,
+      'title' => $title,
+    )));
 }
 
 /**
@@ -35,76 +38,80 @@ function mobile_jquery_user_list($vars) {
  */
 function mobile_jquery_user_admin_permissions($vars) {
   $form = $vars['form'];
-  
-  if(count($vars['form']['role_names']['#value']) == 1) {
-	  $output = mobile_jquery_user_admin_permissions_role($form);
+
+  if (count($vars['form']['role_names']['#value']) == 1) {
+    $output = mobile_jquery_user_admin_permissions_role($form);
   }
-	else {
-	  $roles = user_roles();
-	  $output = '';
-	  $idx = 0;
-	  foreach (element_children($form['permission']) as $key) {
-		  if (is_numeric($key)) {
-  		  if ($idx > 0) {
-				  $output .= '</div>';
-			  }
-				$output .= '<div data-role="collapsible" data-collapsed="true">';
-			  $output .= '<h3>' . drupal_render($form['permission'][$key]) . '</h3>';
-		  }
-		  else {
-		    $output .= '<div data-role="collapsible" data-collapsed="true">';
-	
-			  $output .= '<h3>' . strip_tags($form['permission'][$key]['#markup']) . '</h3>';
-	      foreach (element_children($form['checkboxes']) as $rid) {
-	        $form['checkboxes'][$rid][$key]['#title'] = $roles[$rid] . ': ' . strip_tags($form['permission'][$key]['#markup']);
-	        $output .= drupal_render($form['checkboxes'][$rid][$key]);
-	        
-	      }
-		    $output .= '</div>';
-		  }
-	  $idx++;
-	  }
-  $output .= '</div>';
+  else {
+    $roles = user_roles();
+    $output = '';
+    $idx = 0;
+    foreach (element_children($form['permission']) as $key) {
+      if (is_numeric($key)) {
+        if ($idx > 0) {
+          $output .= '</div>';
+        }
+        $output .= '<div data-role="collapsible" data-collapsed="true">';
+        $output .= '<h3>' . drupal_render($form['permission'][$key]) . '</h3>';
+      }
+      else {
+        $output .= '<div data-role="collapsible" data-collapsed="true">';
+
+        $output .= '<h3>' . strip_tags($form['permission'][$key]['#markup']) . '</h3>';
+        foreach (element_children($form['checkboxes']) as $rid) {
+          $form['checkboxes'][$rid][$key]['#title'] = $roles[$rid] . ': ' . strip_tags($form['permission'][$key]['#markup']);
+          $output .= drupal_render($form['checkboxes'][$rid][$key]);
+
+        }
+        $output .= '</div>';
+      }
+      $idx++;
+    }
+    $output .= '</div>';
   }
   // We've rendered these already, no need to do it again.
   unset($form['permission']);
   unset($form['checkboxes']);
   unset($form['role_names']);
-  
+
   // Render the rest of the form
   $output .= drupal_render_children($form);
 
   return $output;
-  
+
 }
 
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
 function mobile_jquery_user_admin_permissions_role($form) {
-	$roles = user_roles();
-	
+  $roles = user_roles();
+
   $output = '';
-$idx = 0;
+  $idx = 0;
   foreach (element_children($form['permission']) as $key) {
 
-	  if (is_numeric($key)) {
-		  if ($idx > 0) {
-			  $output .= '</div>';
-		  }
-	    $output .= '<div data-role="collapsible" data-collapsed="true">';
+    if (is_numeric($key)) {
+      if ($idx > 0) {
+        $output .= '</div>';
+      }
+      $output .= '<div data-role="collapsible" data-collapsed="true">';
 
-		  $output .= '<h3>' . $form['permission'][$key]['#markup'] . '</h3>';
-	  }
-	  else {
+      $output .= '<h3>' . $form['permission'][$key]['#markup'] . '</h3>';
+    }
+    else {
       foreach (element_children($form['checkboxes']) as $rid) {
         $form['checkboxes'][$rid][$key]['#title'] = strip_tags($form['permission'][$key]['#markup']);
         $output .= '<div>' . drupal_render($form['checkboxes'][$rid][$key]) . '</div>';
-        
+
       }
 
-	  }
-	  $idx++;
+    }
+    $idx++;
   }
   $output .= '</div>';
-	  
+
   return $output;
 }
 
@@ -151,7 +158,10 @@ function mobile_jquery_user_permission_description($vars) {
 function mobile_jquery_user_admin_roles($vars) {
   $form = $vars['form'];
 
-  $header = array(t('Name'), t('Weight'), array('data' => t('Operations'), 'colspan' => 2));
+  $header = array(t('Name'), t('Weight'), array(
+      'data' => t('Operations'),
+      'colspan' => 2,
+    ));
   foreach (element_children($form['roles']) as $rid) {
     $name = $form['roles'][$rid]['#role']->name;
     $row = array();
@@ -167,13 +177,24 @@ function mobile_jquery_user_admin_roles($vars) {
       $row[] = l(t('edit role'), 'admin/people/permissions/roles/edit/' . $rid, array('attributes' => array('data-role' => 'button', 'data-icon' => 'edit', 'data-iconpos' => 'notext')));
       $row[] = l(t('edit permissions'), 'admin/people/permissions/' . $rid, array('attributes' => array('data-role' => 'button', 'data-icon' => 'permissions', 'data-iconpos' => 'notext')));
     }
-    $rows[] = array('data' => $row, 'class' => array(/* 'draggable' */));
+    $rows[] = array(
+      'data' => $row,
+      'class' => array(/* 'draggable' */),
+    );
   }
-  $rows[] = array(array('data' => drupal_render($form['name']) . drupal_render($form['add']), 'colspan' => 4, 'class' => 'edit-name'));
+  $rows[] = array(array(
+      'data' => drupal_render($form['name']) . drupal_render($form['add']),
+      'colspan' => 4,
+      'class' => 'edit-name',
+    ));
 
-/*   drupal_add_tabledrag('user-roles', 'order', 'sibling', 'role-weight'); */
+  /*   drupal_add_tabledrag('user-roles', 'order', 'sibling', 'role-weight'); */
 
-  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'user-roles')));
+  $output = theme('table', array('header' => array(
+      'header' => $header,
+      'rows' => $rows,
+      'attributes' => array('id' => 'user-roles'),
+    )));
   $output .= drupal_render_children($form);
 
   return $output;
diff --git a/mobile_jquery.info b/mobile_jquery.info
index 1f8585f..774097d 100644
--- a/mobile_jquery.info
+++ b/mobile_jquery.info
@@ -1,5 +1,5 @@
 name = mobile_jquery
-description = mobile_jquery.
+description = Theme for Mobile Jquery.
 package = Mobile
 version = 7.x-1.x
 core = 7.x
@@ -83,7 +83,7 @@ exclude[css][] = 'modules/user/user.css'
 
 ; Information added by drupal.org packaging script on 2011-09-23
 version = "7.x-1.0-beta1"
-core = "7.x"
+core = 7.x
 project = "mobile_jquery"
 datestamp = "1316796407"
 
diff --git a/screenshot.png b/screenshot.png
old mode 100755
new mode 100644
diff --git a/scripts/mobile_jquery.js b/scripts/mobile_jquery.js
index 7fd5287..c64c5a4 100644
--- a/scripts/mobile_jquery.js
+++ b/scripts/mobile_jquery.js
@@ -1,18 +1,21 @@
-var $jqm = jQuery.noConflict();
 
-$jqm(document).bind("mobileinit", function() {
-  $jqm.mobile.ns = '';
-  $jqm.mobile.autoInitializePage = true;
-  $jqm.mobile.subPageUrlKey = 'ui-page';
-  $jqm.mobile.activePageClass = 'ui-page-active';
-  $jqm.mobile.activeBtnClass = 'ui-btn-active'; 
-  $jqm.mobile.ajaxEnabled = true;
-  $jqm.mobile.hashListeningEnabled = true;
-  $jqm.mobile.defaultPageTransition = 'slide';
-  $jqm.mobile.defaultDialogTransition = 'pop';
-  $jqm.mobile.minScrollBack = '150';
-  $jqm.mobile.loadingMessage = 'loading';
-  $jqm.mobile.pageLoadErrorMessage = 'Error';
-});
+(function ($) {
 
+  var $jqm = jQuery.noConflict();
 
+  $jqm(document).bind("mobileinit", function() {
+    $jqm.mobile.ns = '';
+    $jqm.mobile.autoInitializePage = true;
+    $jqm.mobile.subPageUrlKey = 'ui-page';
+    $jqm.mobile.activePageClass = 'ui-page-active';
+    $jqm.mobile.activeBtnClass = 'ui-btn-active';
+    $jqm.mobile.ajaxEnabled = true;
+    $jqm.mobile.hashListeningEnabled = true;
+    $jqm.mobile.defaultPageTransition = 'slide';
+    $jqm.mobile.defaultDialogTransition = 'pop';
+    $jqm.mobile.minScrollBack = '150';
+    $jqm.mobile.loadingMessage = 'loading';
+    $jqm.mobile.pageLoadErrorMessage = 'Error';
+  });
+
+})(jQuery);
diff --git a/scripts/mobile_jquery.settings.js b/scripts/mobile_jquery.settings.js
index b62cf04..a605ba9 100644
--- a/scripts/mobile_jquery.settings.js
+++ b/scripts/mobile_jquery.settings.js
@@ -1,3 +1,6 @@
+
+(function ($) {
+
 /*
 jQuery(document).ready(function() {
   jQuery("#edit-use-global").change(function () {
@@ -23,3 +26,5 @@ function changeOptions() {
   }
 }
 */
+
+})(jQuery);
diff --git a/scripts/script.js b/scripts/script.js
old mode 100755
new mode 100644
diff --git a/template.php b/template.php
index 4fedafa..d1d4cd0 100644
--- a/template.php
+++ b/template.php
@@ -148,7 +148,7 @@ function mobile_jquery_preprocess_maintenance_page(&$vars) {
 
 }
 
-function mobile_jquery_preprocess_block(&$vars) {
+function mobile_jquery_preprocess_block_view(&$vars) {
 
 }
 
@@ -258,7 +258,7 @@ function mobile_jquery_preprocess_aggregator_feed_source(&$vars) {
  *
  * @see book-navigation.tpl.php
  */
-function mobile_jquery_preprocess_book_all_books_block(&$vars) {
+function mobile_jquery_preprocess_book_all_books_block_view(&$vars) {
 
 }
 
diff --git a/templates/page--node--delete.tpl.php b/templates/page--node--delete.tpl.php
index 49dc529..29d1864 100644
--- a/templates/page--node--delete.tpl.php
+++ b/templates/page--node--delete.tpl.php
@@ -1,3 +1,4 @@
+
 <?php $page['attributes_array']['page']['data-role'] = 'dialog'; ?>
 <div <?php print drupal_attributes($page['attributes_array']['page']); ?>>
     <div class="header" <?php print drupal_attributes($page['attributes_array']['header']); ?>>
diff --git a/templates/page.tpl.php b/templates/page.tpl.php
index e0f8b0f..0fb8c14 100644
--- a/templates/page.tpl.php
+++ b/templates/page.tpl.php
@@ -1,3 +1,4 @@
+
 <div <?php print drupal_attributes($page['attributes_array']['page']); ?>>
     <div class="header" <?php print drupal_attributes($page['attributes_array']['header']); ?>>
       <?php if ($site_name): ?>
