diff --git a/views-summarize-views-tablesummarized.tpl.php b/views-summarize-views-tablesummarized.tpl.php
index 1405104..da99b92 100644
--- a/views-summarize-views-tablesummarized.tpl.php
+++ b/views-summarize-views-tablesummarized.tpl.php
@@ -7,6 +7,7 @@
  * - $header: An array of header labels keyed by field id.
  * - $header_classes: An array of header classes keyed by field id.
  * - $fields: An array of CSS IDs to use for each field id.
+ * - $summarized: An array of the summarized fields.
  * - $classes: A class or classes to apply to the table, based on settings.
  * - $row_classes: An array of classes to apply to each row, indexed by row
  *   number. This matches the index in $rows.
@@ -44,9 +45,11 @@
   </tbody>
   <?php endif; ?>
   <tfoot>
-    <tr class="summary">
+    <tr class="summary <?php print implode(' ', $row_classes[$count]); ?>">
       <?php foreach ($header as $field => $label): ?>
-        <td><?php if (!empty($summarized[$field])) { echo $summarized[$field]; } ?></td>
+        <td <?php if ($field_classes[$field][$count]) print 'class="'. $field_classes[$field][$count] . '" '; ?>>
+          <?php if (!empty($summarized[$field])) echo $summarized[$field]; ?>
+        </td>
       <?php endforeach; ?>
     </tr>
   </tfoot>
diff --git a/views_summarize.css b/views_summarize.css
new file mode 100644
index 0000000..c0df3e1
--- /dev/null
+++ b/views_summarize.css
@@ -0,0 +1,8 @@
+.views-table tfoot > tr > td {
+  vertical-align: top;
+  padding: 0;
+}
+
+.views-table tfoot > tr > td > table {
+  margin: 0;
+}
diff --git a/views_summarize.info b/views_summarize.info
index 0a87c10..dc220db 100644
--- a/views_summarize.info
+++ b/views_summarize.info
@@ -6,3 +6,4 @@ php = 5.1
 dependencies[] = views
 
 files[] = views_summarize_plugin_style_tablesummarized.inc
+stylesheets[all][] = views_summarize.css
diff --git a/views_summarize.module b/views_summarize.module
index 180637e..ec7eb4e 100644
--- a/views_summarize.module
+++ b/views_summarize.module
@@ -24,6 +24,9 @@ function views_summarize_theme() {
     'views_summarize_type_count' => array(
       'variables' => array('data' => array()),
     ),
+    'views_summarize_type_count_unique' => array(
+      'variables' => array('data' => array()),
+    ),
     'views_summarize_type_range' => array(
       'variables' => array('data' => array()),
     ),
@@ -33,9 +36,6 @@ function views_summarize_theme() {
     'views_summarize_type_total' => array(
       'variables' => array('data' => array()),
     ),
-    'views_summarize_type_currency' => array(
-      'variables' => array('data' => array()),
-    ),
     'views_summarize_type_average' => array(
       'variables' => array('data' => array()),
     ),
@@ -53,9 +53,9 @@ function views_summarize_get_handlers() {
   return array(
     'none'     => t('None'),
     'count'    => t('Count'),
+    'count_unique'       => t('Unique'),
     'range'    => t('Range'),
     'total'    => t('Total'),
-    'currency' => t('Total (Currency)'),
     'average'  => t('Average (include empty values)'),
     'average_no_empties' => t('Average (exclude empty values)'),
     'spread'   => t('Spread'),
@@ -91,7 +91,17 @@ function template_preprocess_views_summarize_views_tablesummarized(&$vars) {
   foreach ($opts as $field => $settings) {
     if (isset($data[$field])) {
       $theme = 'views_summarize_type_' . $settings['summarize'];
-      $vars['summarized'][$field] = theme($theme, array('data' => $data[$field]));
+      $vars['summarized'][$field] = theme($theme, array(
+        'data'    => $data[$field],
+        'options' => array(
+          'field'     => $field,
+          'prefix'    => $vars['view']->style_plugin->options['info'][$field]['prefix'],
+          'suffix'    => $vars['view']->style_plugin->options['info'][$field]['suffix'],
+          'precision' => $vars['view']->style_plugin->options['precision'],
+          'decimal'   => $vars['view']->style_plugin->options['decimal'],
+          'thousand'  => $vars['view']->style_plugin->options['thousand'],
+        ),
+      ));
     }
   }
 }
@@ -113,6 +123,8 @@ function theme_views_summarize_plugin_style_tablesummarized($variables) {
     t('Align'),
     t('Summarize'),
     t('Separator'),
+    t('Prefix'),
+    t('Suffix'),
     array(
       'data' => t('Sortable'),
       'align' => 'center',
@@ -138,6 +150,8 @@ function theme_views_summarize_plugin_style_tablesummarized($variables) {
     $row[] = drupal_render($form['info'][$id]['align']);
     $row[] = drupal_render($form['info'][$id]['summarize']);
     $row[] = drupal_render($form['info'][$id]['separator']);
+    $row[] = drupal_render($form['info'][$id]['prefix']);
+    $row[] = drupal_render($form['info'][$id]['suffix']);
     if (!empty($form['info'][$id]['sortable'])) {
       $row[] = array(
         'data' => drupal_render($form['info'][$id]['sortable']),
@@ -165,7 +179,7 @@ function theme_views_summarize_plugin_style_tablesummarized($variables) {
   }
 
   // Add the special 'None' row.
-  $rows[] = array(t('None'), '', '', '', '', '', '', array('align' => 'center', 'data' => drupal_render($form['default'][-1])), '');
+  $rows[] = array(t('None'), '', '', '', '', '', '', '', '', array('align' => 'center', 'data' => drupal_render($form['default'][-1])), '');
 
   $output .= theme('table', array('header' => $header, 'rows' => $rows));
   $output .= drupal_render_children($form);
@@ -185,54 +199,144 @@ function theme_views_summarize_type_none($variables) {
  */
 function theme_views_summarize_type_count($variables) {
   $data = $variables['data'];
-  return '<div class="label">' . t('Count:') . '</div>' .
-    count(array_filter($data));
-}
+  $options = $variables['options'];
+
+  foreach ($data as $val) {
+    $data2[] = strip_tags($val);
+  }
+
+  $result = count(array_filter($data2));
 
+  if (isset($options['prefix'])) {
+    $result = $options['prefix'] . $result;
+  }
+  if (isset($options['suffix'])) {
+    $result .= $options['suffix'];
+  }
+
+  return theme('table', array(
+    'header' => array(array('data' => t('Count'))),
+    'rows'   => array(array($result))
+  ));
+}
 
 /**
- * Theme: Maximum and minimum values in this column
+ * Theme: Total number of unique non-empty values in this column
  */
-function theme_views_summarize_type_range($variables) {
+function theme_views_summarize_type_count_unique($variables) {
   $data = $variables['data'];
-  $rows = array(
-    array(t('Min'), min($data)),
-    array(t('Max'), max($data)),
-  );
-  $header = array(array('data' => t('Range'), 'colspan' => 2));
-  return theme('table', array('header' => $header, 'rows' => $rows));
+  $options = $variables['options'];
+
+  foreach ($data as $val) {
+    $data2[] = strip_tags($val);
+  }
+
+  $result = count(array_unique(array_filter($data2)));
+
+  if (isset($options['prefix'])) {
+    $result = $options['prefix'] . $result;
+  }
+  if (isset($options['suffix'])) {
+    $result .= $options['suffix'];
+  }
+
+  return theme('table', array(
+    'header' => array(array('data' => t('Unique'))),
+    'rows'   => array(array($result))
+  ));
 }
 
 
 /**
- * Theme: Total value for a currency amount
+ * Theme: Maximum and minimum values in this column
  */
-function theme_views_summarize_type_currency($variables) {
+function theme_views_summarize_type_range($variables) {
   $data = $variables['data'];
-  $total = 0;
-  foreach ($data as $val) {
-    // This allows for negative values and values w/commas to be added
-    // correctly.
-    $total += (float) preg_replace('/[^0-9\,\.\-]/', '', $val);
+  $options = $variables['options'];
+
+  if (isset($options['decimal']) && isset($options['thousand'])) {
+    foreach ($data as $val) {
+      $data2[] = floatval(
+        str_replace($options['decimal'], '.',
+        str_replace($options['thousand'], '',
+        preg_replace('/[^0-9\.\,\-]/', '', $val))));
+    }
+
+    $min = number_format(
+      min($data2),
+      $options['precision'],
+      $options['decimal'],
+      $options['thousand']
+    );
+    $max = number_format(
+      max($data2),
+      $options['precision'],
+      $options['decimal'],
+      $options['thousand']
+    );
+  } else {
+    $min = min($data);
+    $max = max($data);
+  }
+
+  if (isset($options['prefix'])) {
+    $min = $options['prefix'] . $min;
+    $max = $options['prefix'] . $max;
+  }
+  if (isset($options['suffix'])) {
+    $min .= $options['suffix'];
+    $max .= $options['suffix'];
   }
-  return '<div class="label">' . t('Total:') . '</div>$' .
-    number_format($total, 2);
+
+  return theme('table', array(
+    'header' => array(array('data' => t('Range'), 'colspan' => 2)),
+    'rows'   => array(
+      array(t('Min'), $min),
+      array(t('Max'), $max),
+    )
+  ));
 }
 
 
 /**
- * Theme: Total value for a numeric column
+ * Theme: Total value for an amount
  */
 function theme_views_summarize_type_total($variables) {
   $data = $variables['data'];
+  $options = $variables['options'];
   $total = 0;
-  foreach ($data as $val) {
-    // This allows for negative values and values w/commas to be added
-    // correctly.
-    $total += (float) preg_replace('/[^0-9\,\.\-]/', '', $val);
+  if (isset($options['decimal']) && isset($options['thousand'])) {
+    foreach ($data as $val) {
+      $total += floatval(
+        str_replace($options['decimal'], '.',
+        str_replace($options['thousand'], '',
+        preg_replace('/[^0-9\.\,\-]/', '', $val))));
+    }
+    $result = number_format(
+      $total,
+      $options['precision'],
+      $options['decimal'],
+      $options['thousand']
+    );
+  }
+  else {
+    foreach ($data as $val) {
+      $total += (float) preg_replace('/[^0-9\.\-]/', '', $val);
+    }
+    $result = $total;
+  }
+
+  if (isset($options['prefix'])) {
+    $result = $options['prefix'] . $result;
   }
-  return '<div class="label">' . t('Total:') . '</div>' .
-    $total;
+  if (isset($options['suffix'])) {
+    $result .= $options['suffix'];
+  }
+
+  return theme('table', array(
+    'header' => array(array('data' => t('Total'))),
+    'rows'   => array(array($result))
+  ));
 }
 
 
@@ -241,12 +345,40 @@ function theme_views_summarize_type_total($variables) {
  */
 function theme_views_summarize_type_average($variables) {
   $data = $variables['data'];
+  $options = $variables['options'];
   $total = 0;
-  foreach ($data as $val) {
-    $total += (float) preg_replace('/[^0-9\,\.\-]/', '', $val);
+  if (isset($options['decimal']) && isset($options['thousand'])) {
+    foreach ($data as $val) {
+      $total += floatval(
+        str_replace($options['decimal'], '.',
+        str_replace($options['thousand'], '',
+        preg_replace('/[^0-9\.\,\-]/', '', $val))));
+    }
+    $result = number_format(
+      $total / count($data),
+      $options['precision'],
+      $options['decimal'],
+      $options['thousand']
+    );
+  }
+  else {
+    foreach ($data as $val) {
+      $total += (float) preg_replace('/[^0-9\.\-]/', '', $val);
+    }
+    $result = $total / count($data);
   }
-  return '<div class="label">' . t('Average (including empty values):') . '</div>' .
-    sprintf("%.2f", $total / count($data));
+
+  if (isset($options['prefix'])) {
+    $result = $options['prefix'] . $result;
+  }
+  if (isset($options['suffix'])) {
+    $result .= $options['suffix'];
+  }
+
+  return theme('table', array(
+    'header' => array(array('data' => t('Average (including empty values)'))),
+    'rows'   => array(array($result))
+  ));
 }
 
 
@@ -255,22 +387,57 @@ function theme_views_summarize_type_average($variables) {
  */
 function theme_views_summarize_type_average_no_empties($variables) {
   $data = $variables['data'];
+  $options = $variables['options'];
   $total = 0;
   $count = 0;
-  foreach ($data as $val) {
-    if (isset($val) && $val != '') {
-      $total += (float) preg_replace('/[^0-9\,\.\-]/', '', $val);
-      $count++;
+  if (isset($options['decimal']) && isset($options['thousand'])) {
+    foreach ($data as $val) {
+      if (isset($val) && $val != '') {
+        $total += floatval(
+          str_replace($options['decimal'], '.',
+          str_replace($options['thousand'], '',
+          preg_replace('/[^0-9\.\,\-]/', '', $val))));
+        $count++;
+      }
     }
   }
+  else {
+    foreach ($data as $val) {
+      if (isset($val) && $val != '') {
+        $total += (float) preg_replace('/[^0-9\.\-]/', '', $val);
+        $count++;
+      }
+    }
+  }
+
   if ($total != 0 && $count != 0) {
-    return '<div class="label">' . t('Average (excluding empty values):') . '</div>' .
-      sprintf("%.2f", $total / $count);
+    if (isset($options['decimal']) && isset($options['thousand'])) {
+      $result = number_format(
+        $total / $count,
+        $options['precision'],
+        $options['decimal'],
+        $options['thousand']
+      );
+    }
+    else {
+      $result = $total / $count;
+    }
   }
   else {
-    return '<div class="label">' . t('Average (excluding empty values):') . '</div>' .
-      sprintf("%.2f", '0');
+    $result = 0;
   }
+
+  if (isset($options['prefix'])) {
+    $result = $options['prefix'] . $result;
+  }
+  if (isset($options['suffix'])) {
+    $result .= $options['suffix'];
+  }
+
+  return theme('table', array(
+    'header' => array(array('data' => t('Average (excluding empty values)'))),
+    'rows'   => array(array($result))
+  ));
 }
 
 
@@ -279,8 +446,10 @@ function theme_views_summarize_type_average_no_empties($variables) {
  */
 function theme_views_summarize_type_spread($variables) {
   $data = $variables['data'];
+  $options = $variables['options'];
   $hist = array();
   foreach ($data as $val) {
+    $val = strip_tags($val);
     if (!isset($hist[$val])) {
       $hist[$val] = 0;
     }
@@ -303,6 +472,8 @@ function theme_views_summarize_type_spread($variables) {
     ksort($rows);
   }
 
-  $header = array(array('data' => t('Spread'), 'colspan' => 2));
-  return theme('table', array('header' => $header, 'rows' => $rows));
+  return theme('table', array(
+    'header' => array(array('data' => t('Spread'), 'colspan' => 2)),
+    'rows'   => $rows
+  ));
 }
diff --git a/views_summarize.views.inc b/views_summarize.views.inc
index c3c06d7..9bbea7e 100644
--- a/views_summarize.views.inc
+++ b/views_summarize.views.inc
@@ -12,7 +12,7 @@ function views_summarize_views_plugins() {
         'handler' => 'views_summarize_plugin_style_tablesummarized',
         'parent' => 'table',
         'theme' => 'views_summarize_views_tablesummarized',
-/*         'theme path' => drupal_get_path('module', 'views_summarize') . '/theme', */
+/*      'theme path' => drupal_get_path('module', 'views_summarize') . '/theme', */
         'uses row plugin' => FALSE,
         'uses row class' => TRUE,
         'uses fields' => TRUE,
diff --git a/views_summarize_plugin_style_tablesummarized.inc b/views_summarize_plugin_style_tablesummarized.inc
index 573eb84..594d150 100644
--- a/views_summarize_plugin_style_tablesummarized.inc
+++ b/views_summarize_plugin_style_tablesummarized.inc
@@ -20,12 +20,45 @@ class views_summarize_plugin_style_tablesummarized extends views_plugin_style_ta
         '#default_value' => !empty($this->options['info'][$field]['summarize']) ? $this->options['info'][$field]['summarize'] : 'none',
         '#dependency' => array($id => array($field)),
       );
+      $form['info'][$field]['prefix'] = array(
+        '#type' => 'textfield',
+        '#default_value' => isset($this->options['info'][$field]['prefix']) ? $this->options['info'][$field]['prefix'] : '',
+        '#size' => 10,
+      );
+      $form['info'][$field]['suffix'] = array(
+        '#type' => 'textfield',
+        '#default_value' => isset($this->options['info'][$field]['suffix']) ? $this->options['info'][$field]['suffix'] : '',
+        '#size' => 10,
+      );
     }
+
     $form['summary_only'] = array(
       '#title' => t('Display the summary row only'),
       '#description' => t('If checked only the summary row will be displayed,'),
       '#type' => 'checkbox',
       '#default_value' => !empty($this->options['summary_only']),
-    );    
+    );
+    $form['precision'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Default precision'),
+      '#default_value' => isset($this->options['precision']) ? $this->options['precision'] : '2',
+      '#description' => t('Specify how many digits to print after the decimal point in calculated values, if not specified in the field settings.'),
+      '#dependency' => array('edit-options-set-precision' => array(TRUE)),
+      '#size' => 2,
+    );
+    $form['decimal'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Default decimal point'),
+      '#default_value' => isset($this->options['decimal']) ? $this->options['decimal'] : '.',
+      '#description' => t('What single character to use as a decimal point in calculated values, if not specified in the field settings.'),
+      '#size' => 2,
+    );
+    $form['thousand'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Default thousands marker'),
+      '#default_value' => isset($this->options['thousand']) ? $this->options['thousand'] : ',',
+      '#description' => t('What single character to use as the thousands separator in calculated values, if not specified in the field settings.'),
+      '#size' => 2,
+    );
   }
 }
