diff --git a/edit.module b/edit.module
index 2af7261..0f3e7cb 100644
--- a/edit.module
+++ b/edit.module
@@ -175,20 +175,20 @@ function edit_field_formatter_info_alter(&$info) {
 /**
  * Implements of hook_preprocess_HOOK().
  */
-function edit_preprocess_page(&$var) {
+function edit_preprocess_page(&$variables) {
   // Special case: on node pages, the title of the node becomes the page title.
-  if (array_key_exists('node', $var) && entity_access('update', 'node', $var['node'])) {
+  if (array_key_exists('node', $variables) && entity_access('update', 'node', $variables['node'])) {
     // Pseudofield: title.
-    $node_type = node_type_get_type($var['node']->type);
+    $node_type = node_type_get_type($variables['node']->type);
     if ($node_type->has_title) {
-      $id = $var['node']->nid;
+      $id = $variables['node']->nid;
       $attributes = array(
-        'class' => 'edit-pseudofield edit-field edit-allowed edit-type-direct',
+        'class' => array('edit-pseudofield', 'edit-field', 'edit-allowed', 'edit-type-direct'),
         'data-edit-field-label' => $node_type->title_label,
         'data-edit-id'          => "node:$id:title",
       );
-      $var['title_prefix']['edit']['#markup'] = '<div ' . drupal_attributes($attributes) . '">';
-      $var['title_suffix']['edit']['#markup'] = '</div>';
+      $variables['title_prefix']['edit']['#markup'] = '<div ' . drupal_attributes($attributes) . '">';
+      $variables['title_suffix']['edit']['#markup'] = '</div>';
     }
   }
 }
@@ -196,9 +196,9 @@ function edit_preprocess_page(&$var) {
 /**
  * Implements of hook_preprocess_HOOK().
  */
-function edit_preprocess_node(&$var) {
-  $entity_type = $var['elements']['#entity_type'];
-  $entity      = $var['elements']['#node'];
+function edit_preprocess_node(&$variables) {
+  $entity_type = $variables['elements']['#entity_type'];
+  $entity      = $variables['elements']['#node'];
 
   if (entity_access('update', $entity_type, $entity)) {
     list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
@@ -210,30 +210,37 @@ function edit_preprocess_node(&$var) {
       'data-edit-entity-label'    => $i['bundles'][$bundle]['label'],
       'data-edit-entity-edit-url' => url("node/$id/edit"),
     );
-    $var['attributes_array'] += $data_attributes;
+    $variables['attributes_array'] += $data_attributes;
 
     // Mark this entity as editable.
-    $var['classes_array'][] = 'edit-entity edit-allowed';
+    $entity_classes = array('edit-entity', 'edit-allowed');
+    $variables['classes_array'] += $entity_classes;
 
     // Pseudofield: title.
     $node_type = node_type_get_type($bundle);
     if ($node_type->has_title) {
-      $var['title_attributes_array']['class'] = 'edit-pseudofield edit-field edit-allowed edit-type-direct';
-      $var['title_attributes_array']['data-edit-field-label'] = $node_type->title_label;
-      $var['title_attributes_array']['data-edit-id'] = "node:$id:title";
+      $title_classes = array('edit-pseudofield', 'edit-field', 'edit-allowed', 'edit-type-direct');
+      if (isset($variables['title_attributes_array']['class'])) {
+        $variables['title_attributes_array']['class'] = array_merge($variables['title_attributes_array']['class'], $title_classes);
+      }
+      else {
+        $variables['title_attributes_array']['class'] = $title_classes;
+      }
+      $variables['title_attributes_array']['data-edit-field-label'] = $node_type->title_label;
+      $variables['title_attributes_array']['data-edit-id'] = "node:$id:title";
     }
 
     // Pseudofields: author ("name") & created (authoring date, "date").
-    if ($var['display_submitted']) {
-      $var['name'] = edit_node_wrap_name($var['name'], $id);
-      $var['date'] = edit_node_wrap_date($var['date'], $id);
-      $var['submitted'] = edit_node_render_submitted($var['name'], $var['date']);
+    if ($variables['display_submitted']) {
+      $variables['name'] = edit_node_wrap_name($variables['name'], $id);
+      $variables['date'] = edit_node_wrap_date($variables['date'], $id);
+      $variables['submitted'] = edit_node_render_submitted($variables['name'], $variables['date']);
     }
   }
 }
 
 function edit_node_wrap_name($name, $node_id) {
-  $classes = 'edit-pseudofield edit-field edit-allowed edit-type-form';
+  $classes = array('edit-pseudofield', 'edit-field', 'edit-allowed', 'edit-type-form');
   return theme('edit_spanned_field', array(
     'value' => $name,
     'label' => t('Author'),
@@ -243,7 +250,7 @@ function edit_node_wrap_name($name, $node_id) {
 }
 
 function edit_node_wrap_date($date, $node_id) {
-  $classes = 'edit-pseudofield edit-field edit-allowed edit-type-form';
+  $classes = array('edit-pseudofield', 'edit-field', 'edit-allowed', 'edit-type-form');
   return theme('edit_spanned_field', array(
     'value' => $date,
     'label' => t('Authoring date'),
@@ -266,11 +273,11 @@ function edit_node_render_submitted($author, $created) {
 /**
  * Implements of hook_preprocess_HOOK().
  */
-function edit_preprocess_field(&$var) {
-  $entity_type = $var['element']['#entity_type'];
-  $entity      = $var['element']['#object'];
-  $field_name  = $var['element']['#field_name'];
-  $formatter   = $var['element']['#formatter'];
+function edit_preprocess_field(&$variables) {
+  $entity_type = $variables['element']['#entity_type'];
+  $entity      = $variables['element']['#object'];
+  $field_name  = $variables['element']['#field_name'];
+  $formatter   = $variables['element']['#formatter'];
 
   $formatter_info = field_info_formatter_types($formatter);
   if (!array_key_exists('edit', $formatter_info)) {
@@ -301,12 +308,18 @@ function edit_preprocess_field(&$var) {
       'data-edit-field-label'    => $fi['label'],
       'data-edit-id'             => "$entity_type:$id:$field_name",
     );
-    if (!array_key_exists('attributes_array', $var)) {
-      $var['attributes_array'] = array();
+    if (!array_key_exists('attributes_array', $variables)) {
+      $variables['attributes_array'] = array();
     }
-    $var['attributes_array'] += $data_attributes;
+    $variables['attributes_array'] += $data_attributes;
 
     // Mark this field as editable.
-    $var['classes_array'][] = "edit-field edit-allowed edit-type-$edit_ability";
+    $field_classes = array('edit-field', 'edit-allowed' ,"edit-type-$edit_ability");
+    if (isset($variables['classes_array'])) {
+      $variables['classes_array'] = array_merge($variables['classes_array'], $field_classes);
+    }
+    else {
+      $variables['classes_array'] = $field_classes;
+    }
   }
 }
diff --git a/includes/theme.inc b/includes/theme.inc
index 404d094..5a99cc5 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -14,9 +14,10 @@
  * Format a Field wrapped in a span with metadata for the Edit module.
  */
 function theme_edit_spanned_field($variables) {
+
   $output = '';
 
-  $output .= '<span class="' . $variables['classes'] . '"';
+  $output .= '<span class="' . implode(' ', (array) $variables['classes']) . '"';
   $output .= ' data-edit-id="' . $variables['edit_id'] . '"';
   $output .= ' data-edit-field-label="' . $variables['label'] . '">';
   $output .= $variables['value']; // The field value.
