diff --git a/tablegroup.info b/tablegroup.info
index 862ac69..9f07e11 100644
--- a/tablegroup.info
+++ b/tablegroup.info
@@ -1,4 +1,7 @@
 name = Views Table Group
 description = Views style plugin to display Views results as cells in a table, grouping by row and column.
 package = Views
-core = 6.x
+core = 7.x
+
+files[] = tablegroup.views.inc
+files[] = tablegroup_plugin_style_tablegroup.inc
diff --git a/tablegroup.module b/tablegroup.module
index e64d93b..df017bb 100644
--- a/tablegroup.module
+++ b/tablegroup.module
@@ -15,11 +15,11 @@ function tablegroup_views_api() {
 function tablegroup_theme() {
   return array(
     'tablegroup_item' => array(
-      'arguments' => array('item' => NULL),
+      'variables' => array('item' => NULL),
     ),
   );
 }
 
-function theme_tablegroup_item($item) {
-  return '<div class="tablegroup-item">' . $item . '</div>';
+function theme_tablegroup_item($variables) {
+  return '<div class="tablegroup-item">' . $variables['item'] . '</div>';
 }
diff --git a/tablegroup.views.inc b/tablegroup.views.inc
index a38f8a5..03d2613 100644
--- a/tablegroup.views.inc
+++ b/tablegroup.views.inc
@@ -30,5 +30,10 @@ function template_preprocess_tablegroup_view_tablegroup(&$variables) {
     array_unshift($rows[$row_label], array('header' => TRUE, 'data' => $row_label));
   }
 
-  $variables['table'] = theme('table', $header, $rows, array('class' => 'views-plugin-style-tablegroup'));
+  $variables['table'] = theme('table', array(
+    'header' => $header,
+    'rows' => $rows,
+    'attributes' => array('class' => array('views-plugin-style-tablegroup')),
+    )
+  );
 }
diff --git a/tablegroup_plugin_style_tablegroup.inc b/tablegroup_plugin_style_tablegroup.inc
index 298f9d5..f1b9a52 100644
--- a/tablegroup_plugin_style_tablegroup.inc
+++ b/tablegroup_plugin_style_tablegroup.inc
@@ -8,13 +8,14 @@ class tablegroup_plugin_style_tablegroup extends views_plugin_style {
     $options['row_sort'] = array('default' => 0);
     $options['col_grouping'] = array('default' => NULL);
     $options['col_sort'] = array('default' => 0);
+    $options['cell_placeholder'] = array('default' => '&nbsp;');
 
     return $options;
   }
 
   function options_form(&$form, &$form_state) {
     parent::options_form($form, $form_state);
-    
+
     // grabbed from views_plugin_style_table, slight edits {{{
     $handlers = $this->display->handler->get_handlers('field');
     if (empty($handlers)) {
@@ -61,6 +62,11 @@ class tablegroup_plugin_style_tablegroup extends views_plugin_style {
       '#options' => array(0 => 'none', 'asc' => 'asc', 'desc' => 'desc'),
       '#default_value' => $this->options['col_sort'],
     );
+    $form['cell_placeholder'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Cell placeholder'),
+      '#default_value' => $this->options['cell_placeholder'],
+    );
   }
 
   function render() {
@@ -111,18 +117,28 @@ class tablegroup_plugin_style_tablegroup extends views_plugin_style {
                 // being rendered (despite the fact that we are passing in the
                 // object we want rendered!!)
                 $this->view->row_index = $row_index;
-                $table['rows'][$row_header][$col_header] .= theme('tablegroup_item', $this->row_plugin->render($item));
+                if ( !isset($table['rows'][$row_header][$col_header]) ) {
+                  $table['rows'][$row_header][$col_header] = '';
+                }
+                $table['rows'][$row_header][$col_header] .= theme('tablegroup_item', array('item' => $this->row_plugin->render($item)));
               }
             }
             // empty cell, use a placeholder
             else {
-              $table['rows'][$row_header][$col_header] = '&nbsp;';
+              $table['rows'][$row_header][$col_header] = filter_xss_admin($this->options['cell_placeholder']);
             }
           }
         }
 
       // finally, render using the theme function
-      $output .= theme($this->theme_functions(), $this->view, $this->options, $table, $title);
+      $output .= theme($this->theme_functions(),
+        array(
+          'view' => $this->view,
+          'options' => $this->options,
+          'rows' => $table,
+          'title' => $title,
+        )
+      );
     }
 
     unset($this->view->row_index);
