diff --git a/galleria-container.tpl.php b/galleria-container.tpl.php
index 5a416ea..54bbf7a 100644
--- a/galleria-container.tpl.php
+++ b/galleria-container.tpl.php
@@ -1,20 +1,11 @@
 <?php
-// $Id $
-
 /**
  * @file
  * Default output for a galleria node.
 */
 ?>
-<?php if ((count($images) > 0) && isset($path)): ?>
-  <div class="galleria-content">
-      <ul class="gallery">
-      <?php foreach($images as $key => $val): ?>
-        <li>
-          <img src="<?php echo $path . $images[$key]['#item']['filename'] ?>"
-               title="<?php echo $images[$key]['#item']['title'] ?>" />
-        </li>
-      <?php endforeach; ?>
-      </ul>
-  </div>
-<?php endif; ?>
\ No newline at end of file
+<div class="galleria-content clearfix">
+  <?php foreach ($items as $delta => $item) : ?>
+    <div class="field-item"><?php print render($item); ?></div>
+  <?php endforeach; ?>
+</div>
diff --git a/galleria-insert-image.tpl.php b/galleria-insert-image.tpl.php
deleted file mode 100644
index 6172dd8..0000000
--- a/galleria-insert-image.tpl.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-/**
- * @file
- * Template file for Colorbox content inserted via the Insert module.
- *
- * Available variables:
- * - $item: The complete item being inserted.
- * - $image_path: The URL to the image.
- * - $link_path: The URL to the image that Colorbox should open.
- * - $style_name: The ImageCache preset being used.
- * - $gallery_id: The ID of the Colorbox gallery.
- *
- * Note that ALT and Title fields should not be filled in here, instead they
- * should use placeholders that will be updated through JavaScript when the
- * image is inserted.
- *
- * Available placeholders:
- * - __alt__: The ALT text, intended for use in the <img> tag.
- * - __title__: The Title text, intended for use in the <img> tag.
- * - __description__: A description of the image, sometimes used as a caption.
- */
-?>
-<img src="<?php print $image_path; ?>" alt="__alt__" title="__title__" class="imagecache imagecache-<?php print $style_name; ?>" />
\ No newline at end of file
diff --git a/galleria.module b/galleria.module
index 7304f43..21fdfa9 100644
--- a/galleria.module
+++ b/galleria.module
@@ -91,36 +91,32 @@ function galleria_field_formatter_settings_summary($field, $instance, $view_mode
  * Prepares a renderable array of images and adds the neccessary JS and CSS
  */
 function galleria_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
- 
-  $slides = array();
+  $element = array();
   
-  // stores data for all images in $slides
+  if (count($items) > 0) {
+    $element['#theme'] = 'galleria_container';
+    galleria_includes();
+  }
+ 
   foreach ($items as $delta => $item) {
-    $slides[$delta] = array(
-      '#theme' => 'galleria_image_formatter_item',
+    if (empty($display['settings']['galleria_zoom_style'])) {
+       $zoom_url = file_create_url($item['uri']);
+    } else {
+       $zoom_url = image_style_url($display['settings']['galleria_zoom_style'], $item['uri']);
+    }
+
+    $element['#items'][$delta] = array(
+      '#theme' => 'image_formatter',
       '#item' => $item,
-      '#node' => $entity,
-      '#field' => $field,
-      '#galleria_zoom_style' => $display['settings']['galleria_zoom_style'],
-      '#galleria_thumb_style' => $display['settings']['galleria_thumb_style'],
+      '#image_style' => $display['settings']['galleria_thumb_style'],
+      '#path' => array(
+         'path' => $zoom_url,
+         'options' => array(),
+      ),
     );
   }
-  
-  // if there are images init the galleria
-  if (count($slides) > 0) {
-    galleria_includes();
-   
-    $element = array(
-      '#theme' => 'galleria_container',
-      '#images' => $slides,
-    );
     
-    return $element;
-  }
-  else {
-    // no images to show, therefore cancel display
-    return;
-  }
+  return $element;
 }
 
 /*
@@ -150,42 +146,11 @@ function galleria_theme() {
  
   return array(
   
-    'galleria_imagefield' => array(
-      'variables' => array(
-        'image' => array(),
-        'path' => NULL,
-        'title' => NULL,
-        'galleria_zoom_style' => NULL,
-        'galleria_thumb_style' => NULL,
-      ),
-      'file' => 'galleria.theme.inc',
-    ),
-
-    'galleria_insert_image' => array(
-      'variables' => array(
-        'item' => NULL,
-      ),
-      'template' => 'galleria-insert-image',
-      'file' => 'galleria.theme.inc',
-    ),
-
-    'galleria_image_formatter_item' => array(
-      'variables' => array(
-        'item' => NULL,
-        'node' => NULL,
-        'field' => array(),
-        'galleria_zoom_style' => NULL,
-        'galleria_thumb_style' => NULL,
-      ),
-      'file' => 'galleria.theme.inc',
-    ),
-    
    'galleria_container' => array(
       'variables' => array(
-        'images' => NULL,
+        'items' => NULL,
       ),
       'template' => 'galleria-container',
-      'file' => 'galleria.theme.inc',
     ),
   );
 }
@@ -214,11 +179,11 @@ function galleria_theme() {
     'effects' => array(
       array(
         'name' => 'image_scale',
-        'data' => array('width' => 50, 'height' => 30, 'upscale' => 1),
+        'data' => array('width' => 50, 'height' => 40, 'upscale' => 1),
         'weight' => 0,
       ),
     )
   );
 
   return $styles;
-}
\ No newline at end of file
+}
diff --git a/galleria.theme.inc b/galleria.theme.inc
deleted file mode 100644
index 8615bf1..0000000
--- a/galleria.theme.inc
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-// $Id $
-
-/**
- * @file
- * Galleria theme functions.
- */
- 
-/**
- * Returns HTML for a Galleria image field formatter image element.
- *
- * @param $variables
- *   An associative array containing:
- *   - item: An array of image data.
- *   - image_style: An optional image style.
- *   - path: An array containing the link 'path' and link 'options'.
- *
- * @ingroup themeable
- */
-function theme_galleria_image_formatter_item($variables) {
-  $item = $variables['item'];
-  $node = $variables['node'];
-  
-  $image = array(
-    'path' => $item['uri'],
-    'alt' => $item['alt'],
-    'title' => $item['title'],
-    'style_name' => $variables['galleria_zoom_style'],
-  );
-  
-  // If the title is empty use alt or the node title in that order.
-  if (empty($image['title'])) {
-    if (!empty($image['alt'])) {
-      $image['title'] = $image['alt'];
-    }
-    elseif (!empty($node->title)) {
-      $image['title'] = $node->title;
-    }
-  }
-
-  return theme('galleria_imagefield', array('image' => $image, 'path' => $path, 'title' => $image['title'],));
-}
-
-/**
- * Returns HTML for an image using a specific Colorbox image style.
- *
- * @param $variables
- *   An associative array containing:
- *   - style_name: The name of the style to be used to alter the original image.
- *   - path: The path of the image file relative to the Drupal files directory.
- *     This function does not work with images outside the files directory nor
- *     with remotely hosted images.
- *   - alt: The alternative text for text-based browsers.
- *   - title: The title text is displayed when the image is hovered in some
- *     popular browsers.
- *   - gid: Gallery id.
- *   - attributes: Associative array of attributes to be placed in the img tag.
- *   - getsize: If set to TRUE, the image's dimension are fetched and added as
- *     width/height attributes.
- *
- * @ingroup themeable
- */
-function theme_galleria_imagefield($variables) { 
-
-  if (!empty($variables['image']['style_name'])) {
-    $image = theme('image_style', $variables['image']);
-  }
-  else {
-    $image = theme('image', $variables['image']);
-  }
-
-  return $image;
-}
-
-/**
- * Preprocess variables for the galleria-insert-image.tpl.php file.
- * 
- * @param $variables
- *   An associative array containing:
- *   - item: The complete item being inserted.
-*/
-function template_preprocess_galleria_insert_image(&$variables) {
-  $variables['file'] = file_load($variables['fid']);
-  $variables['image_path'] = image_style_url($variables['style_name'], $variables['file']->uri);
-}
-
-/**
- * Preprocess variables for the galleria-container.tpl.php file.
- * 
- * @param $variables
- *   An associative array containing:
- *   - images: array of image data containing all images of the node
- */
-function template_preprocess_galleria_container(&$variables) {
-  // get the path of the public files dir
-  $basepath = '/' . variable_get('file_public_path', '/sites/default/files') . '/';
- 
-  // get the subdir if image files are stored in one
-  $filepath = substr($variables['images'][0]['#item']['uri'], 9);
-  $lastpos = strrpos($filepath, '/');
-  $filepath = substr($filepath, 0, $lastpos);
-  $path = $basepath;
-  
-  // don't add a 2nd trailing slash if no subdir was configured 
-  $path .= (!empty($filepath)) ? $filepath . '/' : '';
-  $variables['path'] = $path;
-}
\ No newline at end of file
-- 
1.7.1.1

