diff --git a/field/flickrfield.module b/field/flickrfield.module
index d4da09f..15283f0 100644
--- a/field/flickrfield.module
+++ b/field/flickrfield.module
@@ -8,19 +8,12 @@
  */
 
 /**
- * Include css unconditionally.
- */
-function flickrfield_init() {
-  drupal_add_css(drupal_get_path('module', 'flickr') . '/flickr.css');
-}
-
-/**
  * Implements hook_help().
  */
 function flickrfield_help($section, $arg) {
   switch ($section) {
     case 'admin/help#flickrfield':
-      return t('Flickrfields display Flickr photos or photosets. Input the user id of the photo owner and the photo or photoset id. The id is visible in the url when you view the photo or photoset on Flickr.');
+      return t('Flickr fields display Flickr photos or photosets. Input the user id of the photo owner and the photo or photoset ID. The ID is visible in the url when you view the photo or photoset on Flickr.');
   }
 }
 
@@ -30,17 +23,17 @@ function flickrfield_help($section, $arg) {
 function flickrfield_field_info() {
   $sizes = array_keys(flickr_photo_sizes());
   return array(
-    'flickrfield' => array(
+    'flickrfield_photo' => array(
       'label' => 'Flickr Photo',
-      'description' => t('Store Flickr Photo or Photoset ids and display the photos in nodes and views.'),
-  		'default_widget' => 'flickrfield',
-  		'default_formatter' => $sizes[0],
+      'description' => t('Stores a Flickr Photo.'),
+      'default_widget' => 'flickrfield_manual',
+      'default_formatter' => 'flickrfield_photo',
     ),
     'flickrfield_photoset' => array(
-      'label' => 'Flickr photo set',
-      'description' => t('Field for storing a reference to a Flickr photo set.'),
-  		'default_widget' => 'flickrfield_flickrid',
-  		'default_formatter' => 'photoset_primaryphoto_size' . $sizes[0] . '_nolink',
+      'label' => 'Flickr Photoset',
+      'description' => t('Stores a Flickr Photoset.'),
+      'default_widget' => 'flickrfield_manual',
+      'default_formatter' => 'flickrfield_photoset',
     ),
   );
 }
@@ -49,19 +42,37 @@ function flickrfield_field_info() {
  * Implements hook_field_schema().
  */
 function flickrfield_field_schema($field) {
-  if ($field['type'] == 'flickrfield') {
-  $columns = array(
-    'id' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'sortable' => TRUE),
-    'type' => array('type' => 'varchar', 'length' => 10, 'not null' => FALSE, 'sortable' => TRUE),
-    'nsid' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'sortable' => TRUE),
-  );
-  }
-  else if ($field['type'] == 'flickrfield_photoset') {
-    $columns = array(
-      'flickrid' => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'sortable' => TRUE),
-    );
+  $columns = array();
+  
+  switch ($field['type']) {
+    case 'flickrfield_photo':
+    case 'flickrfield_photoset':
+      $columns += array(
+        'id' => array(
+          'type' => 'varchar',
+          'length' => 64,
+          'not null' => FALSE,
+          'sortable' => TRUE
+        ),
+        'type' => array(
+          'type' => 'varchar',
+          'length' => 10,
+          'not null' => FALSE,
+          'sortable' => TRUE
+        ),
+        'nsid' => array(
+          'type' => 'varchar',
+          'length' => 64,
+          'not null' => FALSE,
+          'sortable' => TRUE
+        ),
+      );
+      break;
   }
-  return array('columns' => $columns);
+  
+  return array(
+    'columns' => $columns,
+  );
 }
 
 /**
@@ -69,43 +80,16 @@ function flickrfield_field_schema($field) {
  */
 function flickrfield_field_widget_info() {
   return array(
-    'flickrfield' => array(
-      'label' => 'Flickr Photo',
-      'field types' => array('flickrfield'),
-  		'behaviors' => array(
-  			'multiple values' => FIELD_BEHAVIOR_DEFAULT,
-        'default value' => FIELD_BEHAVIOR_DEFAULT,
-  		),
-    ),
-    'flickrfield_flickrid' => array(
-      'label' => 'Flickr Id',
-      'field types' => array('flickrfield_photoset'),
-  		'behaviors' => array(
-  			'multiple values' => FIELD_BEHAVIOR_DEFAULT,
+    'flickrfield_manual' => array(
+      'label' => 'Flickr Manual',
+      'field types' => array(
+        'flickrfield_photo',
+        'flickrfield_photoset'
+      ),
+      'behaviors' => array(
+        'multiple values' => FIELD_BEHAVIOR_DEFAULT,
         'default value' => FIELD_BEHAVIOR_DEFAULT,
-  		),
-    ),
-  );
-}
-
-/**
- * Implements hook_element_info().
- *
-  * @todo - #columns is not mentioned as a possible attribute on http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_element_info/7
- */
-function flickrfield_element_info() {
-  return array(
-    'flickrfield' => array(
-      '#input' => TRUE,
-      '#columns' => array('type', 'id', 'uid'),
-      '#process' => array('flickrfield_form_process_flickrfield'),
-  		//'#theme' => array('theme_flickrfield'),
-    ),
-    'flickrfield_flickrid' => array(
-      '#input' => TRUE,
-      '#columns' => array('flickrid'),
-      '#process' => array('flickrfield_form_process_flickrfield_flickrid'),
-  		//'#theme' => array('theme_flickrfield_flickrid'),
+      ),
     ),
   );
 }
@@ -114,56 +98,49 @@ function flickrfield_element_info() {
  * Implements hook_field_widget_form().
  */
 function flickrfield_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
-	$element = array(
-    '#type' => $instance['widget']['type'],
-    '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
-  );
-  return $element;
-}
-
-/**
- * Form process callback for flickr photo fields.
- */
-function flickrfield_form_process_flickrfield($element, $form_state, $form = array()) {
-  $options = array();
-  $options['photo_id'] = t("Photo");
-  $options['set_id'] = t("Photoset");
-  $element['type'] = array(
-    '#type' => 'select',
-    '#title' => t('Item Type'),
-    '#default_value' => !empty($element['#value']['type']) ? $element['#value']['type'] : '',
-    '#options' => $options,
-  );
-  $element['id'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Item id'),
-    '#default_value' => !empty($element['#value']['id']) ? $element['#value']['id'] : '',
-  );
-  $element['nsid'] = array(
-    '#type' => 'textfield',
-    '#title' => t('User Id'),
-    '#default_value' => !empty($element['#value']['nsid']) ? $element['#value']['nsid'] : variable_get('flickr_default_userid', ''),
-    '#required' => $element['#required'],
-    '#description' => t("The user id of the Flickr user who owns the photos. If this is left blank, the sites's default user will be used. Current default id is @id.", array('@id' => variable_get('flickr_default_userid', ''))),
-  );
-  return $element;
-}
-
-/**
- * Form process callback for flickr photoset fields.
- */
-function flickrfield_form_process_flickrfield_flickrid($element, $form_state, $form) {
-  $element['flickrid'] = array(
-    '#type' => 'textfield',
-    '#title' => !empty($element['#title']) ? $element['#title'] : '',
-    '#description' => !empty($element['#description']) ? $element['#description'] : '',
-    '#required' => FALSE || $element['#required'],
-    '#field_prefix' => t('Flickr ID: '),
-    '#default_value' => !empty($element['#value']['flickrid']) ? $element['#value']['flickrid'] : '',
-    '#size' => 20,
-    '#maxlength' => 20,
-    '#attributes' => array('class' => array('flickrfield_flickrid')),
-  );
+  switch ($instance['widget']['type']) {
+    case 'flickrfield_manual':
+      // Get values
+      $field_type = explode('_', $field['type']);
+      
+      $id = isset($items[$delta]['id']) ? $items[$delta]['id'] : NULL;
+      $type = isset($items[$delta]['type']) ? $items[$delta]['type'] : $field_type[1];
+      $nsid = isset($items[$delta]['nsid']) ? $items[$delta]['nsid'] : variable_get('flickr_default_userid', '');
+      
+      if ($field_type[1] == 'photo') {
+        $title = 'Photo';
+      }
+      else {
+        $title = 'Photoset';
+      }
+      
+      $required = $element['#required'];
+      
+      $element += array(
+        '#type' => 'fieldset',
+        '#title' => 'Flickr',
+        '#collapsible' => TRUE,
+        'id' => array(
+          '#type' => 'textfield',
+          '#title' => t('!title ID', array('!title' => $title)),
+          '#default_value' => $id,
+          '#required' => $required,
+        ),
+        'type' => array(
+          '#type' => 'value',
+          '#value' => $type,
+        ),
+        'nsid' => array(
+          '#type' => 'textfield',
+          '#title' => t('User ID'),
+          '#default_value' => $nsid,
+          '#required' => $required,
+        ),
+      );
+      
+      break;
+  }
+  
   return $element;
 }
 
@@ -171,11 +148,13 @@ function flickrfield_form_process_flickrfield_flickrid($element, $form_state, $f
  * Implements hook_field_is_empty().
  */
 function flickrfield_field_is_empty($item, $field) {
-  if ($field['type'] == 'flickrfield') {
-    return empty($item['id']);
-  }
-  else if ($field['type'] == 'flickrfield_photoset') {
-    return empty($item['flickrid']);
+  switch($field['type']) {
+    case 'flickrfield_photo':
+      return empty($item['id']);
+      break;
+    case 'flickrfield_photoset':
+      return empty($item['id']);
+      break;
   }
 }
 
@@ -184,318 +163,204 @@ function flickrfield_field_is_empty($item, $field) {
  */
 function flickrfield_field_formatter_info() {
   require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'flickr') . '/flickr.inc';
-  $sizes = flickr_photo_sizes();
-  // Formatters for general Flickr CCK field.
-  foreach ($sizes as $size => $info) {
-    $formatters[$size] = array(
-      'label' => $info['label'],
-      'field types' => array('flickrfield'),
-    );
-  }
+  $sizes = array_keys(flickr_photo_sizes());
   
-  // Formatters for Flickr photoset field.
-  foreach ($sizes as $size => $info) {
-    $formatters['photoset_primaryphoto_size' . $size . '_nolink'] = array(
-      'label' => t('Primary set photo at size "@size"', array('@size' => $info['label'])),
-      'field types' => array('flickrfield_photoset'),
-    );
-    $formatters['photoset_primaryphoto_size' . $size . '_linknode'] = array(
-      'label' => t('Primary set photo at size "@size" with link to node', array('@size' => $info['label'])),
-      'field types' => array('flickrfield_photoset'),
-    );
-    $formatters['photoset_primaryphoto_size' . $size . '_linkflickrcomset'] = array(
-      'label' => t('Primary set photo at size "@size" with link to set on Flickr.com', array('@size' => $info['label'])),
-      'field types' => array('flickrfield_photoset'),
-    );
-  }
-  $formatters['photoset_flickrcomslideshow'] = array(
-    'label' => 'Embedded Flickr.com flash slideshow',
-    'field types' => array('flickrfield_photoset'),
-  );
-  $formatters['photoset_flickrcomsetlink'] = array(
-    'label' => 'Link to photo set on Flickr.com',
-    'field types' => array('flickrfield_photoset'),
-  );
-  return $formatters;
-}
-
-/**
- * Implements hook_field_formatter_view().
- * @todo: the theme definitions for our field-formatters should be removed from flickrfield_theme() and implemented here
- * @see http://drupal.org/node/728792 (section "Changed! Hook Formatter")
- */
-function flickrfield_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
-	$element = array();
-	$sizes = array_keys(flickr_photo_sizes());
-	foreach ($items as $delta => $item) {
-		$variables = array(
-			'#node' => $entity,
-			'#item' => $item,
-			'#formatter' => $display['type'], 
-			'#field_name' => $field['field_name'],
-		);
-		$element[$delta]['#markup'] = theme('flickrfield_formatter_' . $display['type'], $variables);
-	}
-  return $element;
-}
-
-/**
- * Implements hook_theme().
- * @todo: the theme definitions for our field-formatters should go in flickrfield_field_formatter_view()
- * @see http://drupal.org/node/728792 (section "Changed! Hook Formatter")
- */
-function flickrfield_theme() {
-  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'flickr') . '/flickr.inc';
-  $themes = array();
-  foreach (flickr_photo_sizes() as $size => $info) {
-    $themes['flickrfield_formatter_' . $size] = array(
-      'variables' => array('element'),
-      'function' => 'theme_flickrfield_field_formatter',
-    );
-    // Theme function for the primary photo formatters of a Flickr photo set.
-    $themes['flickrfield_formatter_photoset_primaryphoto_size' . $size . '_nolink'] = array(
-      'variables' => array('element'),
-      'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
-    );
-    $themes['flickrfield_formatter_photoset_primaryphoto_size' . $size . '_linknode'] = array(
-      'variables' => array('element'),
-      'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
-    );
-    $themes['flickrfield_formatter_photoset_primaryphoto_size' . $size . '_linkflickrcomset'] = array(
-      'variables' => array('element'),
-      'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
-    );
-  }
-  return $themes + array(
+  return array(
     'flickrfield_photo' => array(
-      'variables' => array('img', 'photo_url', 'formatter', 'photo_data', 'node'),
+      'label' => t('Flickr Photo'),
+      'field types' => array('flickrfield_photo'),
+      'description' => t('Display a single Flickr photo.'),
+      'settings' => array(
+        'size' => $sizes[0],
+        'link' => 'none',
+      ),
     ),
     'flickrfield_photoset' => array(
-      'variables' => array('img', 'photo_url', 'formatter', 'photo_data', 'node'),
-    ),
-    'flickrfield' => array(
-      'variables' => array('element'),
-    ),
-    'flickrfield_flickrid' => array(
-      'variables' => array('element'),
-    ),
-    'flickrfield_photoset_primaryphoto' => array(
-      'variables' => array('element'),
-    ),
-    'flickrfield_formatter_photoset_flickrcomslideshow' => array(
-      'variables' => array('element'),
-    ),
-    'flickrfield_formatter_photoset_flickrcomsetlink' => array(
-      'variables' => array('element'),
+      'label' => t('Flickr Photo Set'),
+      'field types' => array('flickrfield_photoset'),
+      'description' => t('Display a Flickr photoset.'),
+      'settings' => array(
+        'size' => $sizes[0],
+        'photos' => 5,
+        'link' => 'none',
+      ),
     ),
   );
 }
 
 /**
- * Basic flickrfield formatter.
+ * Helper function to supply an array of size options or return a label for a key given
  */
-function theme_flickrfield_field_formatter($element) {
+function flickrfield_size_options($size = NULL) {
+  $options = array();
+  
   require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'flickr') . '/flickr.inc';
-  $item = $element['#item'];
-  if (empty($item['id'])) {
-    return;
-  }
-  $node = $element['#node'];
-  $formatter = $element['#formatter'];
-  $field_name = $element['#field_name'];
-  switch ($item['type']) {
-    case 'photo_id':
-      $photo_data = flickr_photo_get_info($item['id']);
-      $img = flickr_img($photo_data, $formatter);
-      $photo_url = flickr_photo_page_url($photo_data['owner'], $photo_data['id']);
-      return theme('flickrfield_photo', array('0' => $img, '1' => $photo_url, '2' => $formatter, '3' => $photo_data, '4' => $node));
-    case 'set_id':
-      $photo_data = flickr_photoset_get_info($item['id']);
-      $img = flickr_img($photo_data, $formatter);
-      $photo_url = flickr_photoset_page_url($photo_data['owner'], $photo_data['id']);
-      return theme('flickrfield_photoset', array('0' => $img, '1' => $photo_url, '2' => $formatter, '3' => $photo_data, '4' => $node));
+  $sizes = flickr_photo_sizes();
+  
+  foreach($sizes as $key => $data) {
+    $options[$key] = $data['label'];
   }
-}
-
-/**
- * Theme a Flickr photo set as the primary photo of that set.
- */
-function theme_flickrfield_formatter_photoset_primaryphoto($element) {
-  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'flickr') . '/flickr.inc';
-  if (empty($element['#item']['flickrid'])) {
-    return;
+  
+  if ($size != NULL) {
+    return $options[$size];
   }
-  $formatter_info = explode('_', $element['#formatter']);
-  $set_data = flickr_photoset_get_info($element['#item']['flickrid']);
-  $set_url = flickr_photoset_page_url($set_data['owner'], $set_data['id']);
-  $size = substr($formatter_info[2], -1);
-  $img = flickr_img($set_data, $size);
-  switch ($formatter_info[3]) {
-    case 'linknode':
-      $link = 'node/' . $element['#node']->nid;
-      break;
-    case 'linkflickrcomset':
-      $link = $set_url;
-      break;
-    default:
-      $link = NULL;
-      break;
+  else {
+    return $options;
   }
-  $title = is_array($set_data['title']) ? $set_data['title']['_content'] : $set_data['title'];
-
-  $vars = array($img, $link, $set_url, $size, $title);
-  return theme('flickrfield_photoset_primaryphoto', $vars);
 }
 
 /**
- * Theme a Flickr photo set as an embedded Flickr.com flash slideshow.
+ * Helper function to supply an array of link options or return a label for a key given
  */
-function theme_flickrfield_formatter_photoset_flickrcomslideshow($variables) {
+function flickrfield_link_options($link = NULL) {
+  $options = array(
+    'none' => t('Nothing'),
+    'node' => t('Node'),
+    'flickr' => t('Flickr.com'),
+  );
+  
   require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'flickr') . '/flickr.inc';
-  if (empty($variables['#item']['flickrid'])) {
-    return;
+  $sizes = flickr_photo_sizes();
+  
+  foreach($sizes as $key => $data) {
+    $options[$key] = $data['label'] . ' ' . t('Photo URL');
   }
-  $set_id = $variables['#item']['flickrid'];
-  $src = 'http://www.flickr.com/slideShow/index.gne?set_id=' . $set_id;
-  return '<div class="flickr-photoset-slideshow">'
-    . '<iframe align="center" src="' . $src . '" frameBorder="0" width="500" scrolling="no" height="500"></iframe>'
-    . '</div>';
-}
-
-/**
- * Theme a Flickr photo set as a simple link to the photo set page on Flickr.com.
- */
-function theme_flickrfield_formatter_photoset_flickrcomsetlink($variables) {
-  $set_data = flickr_photoset_get_info($variables['#item']['flickrid']);
-  $set_url = flickr_photoset_page_url($set_data['owner'], $set_data['id']);
-  return l($set_url, $set_url);
-}
-
-/**
- * Flickrfield photo themes.
- *
- * If we are not on the node, make the photo link back to the node,
- * otherwise just display the image. To comply with Flickr terms of service
- * add a link back to the Flickr page.
- */
-function theme_flickrfield_photo($variables) {
-  $img = $variables['0'];
-  $photo_url = $variables['1'];
-  $formatter = $variables['2'];
-  $photo_data = $variables['3'];
-  $node = $variables['4'];
-  $title = is_array($photo_data['title']) ? $photo_data['title']['_content'] : $photo_data['title'];
-  if (arg(0) == 'node' && arg(1) == $node->nid) {
-    $output = '<div class="flickr-photo-img">' . $img . '</div>';
+  
+  if ($link != NULL) {
+    return $options[$link];
   }
   else {
-    $output = '<div class="flickr-photo-img">' . l($img, 'node/' . $node->nid, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE)) . '</div>';
+    return $options;
   }
-  $output .= '<div class="flickr-citation"><cite>' . l(t('Source: Flickr'), $photo_url) . '</cite></div>';
-  return $output;
 }
 
 /**
- * Theme function for showing a photo set.
+ * Implements hook_field_formatter_settings_form().
  */
-function theme_flickrfield_photoset($variables) {
-  $img = $variables['0'];
-  $photo_url = $variables['1'];
-  $formatter = $variables['2'];
-  $photo_data = $variables['3'];
-  $node = $variables['4'];
-  $output = '<div class="flickr-photoset">';
-
-  if (module_exists('flickr_sets')) {
-    $photos = flickr_set_load($photo_data['id']);
-
-    foreach ((array) $photos['photoset']['photo'] as $photo) {
-      //insert owner into $photo because theme_flickr_photo needs it
-      $photo['owner'] = $photos['photoset']['owner'];
-      $title = is_array($photo['title']) ? $photo['title']['_content'] : $photo['title'];
-      $img = flickr_img($photo, $formatter);
-      $original = flickr_photo_img($photo);
-
-      if (arg(0) == 'node' && arg(1) == $node->nid) {
-        $output .= '<div class="flickr-photoset-img flickr-photoset-img-' . $formatter . '">' . l($img, $original, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE)) . '</div>';
-      }
-      else {
-        $output .= '<div class="flickr-photoset-img flickr-photoset-img-' . $formatter . '">' . l($img, 'node/' . $node->nid, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE)) . '</div>';
-      }
-    }
+function flickrfield_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
+  $display = $instance['display'][$view_mode];
+  $settings = $display['settings'];
+  
+  $form = array();
+  
+  if($display['type'] == 'flickrfield_photo' || $display['type'] == 'flickrfield_photoset') {
+    $form['size'] = array(
+      '#title' => t('Size'),
+      '#type' => 'select',
+      '#options' => flickrfield_size_options(),
+      '#default_value' => $settings['size'],
+    );
+    
+    $form['link'] = array(
+      '#title' => t('Link'),
+      '#type' => 'select',
+      '#options' => flickrfield_link_options(),
+      '#default_value' => $settings['link'],
+    );
   }
-  else {
-    $title = is_array($photo_data['title']) ? $photo_data['title']['_content'] : $photo_data['title'];
-
-    if (arg(0) == 'node' && arg(1) == $node->nid) {
-      $output .= '<div class="flickr-photoset-img">' . $img . '</div>';
-    }
-    else {
-      $output .= '<div class="flickr-photoset-img">' . l($img, 'node/' . $node->nid, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE)) . '</div>';
-    }
-
+  
+  if($display['type'] == 'flickrfield_photoset') {
+    $form['photos'] = array(
+      '#title' => t('Photos'),
+      '#type' => 'textfield',
+      '#maxlength' => 2,
+      '#size' => 2,
+      '#default_value' => $settings['photos'],
+    );
   }
-  $output .= '</div>';
-  $output .= '<div class="flickr-photoset-meta">';
-  $output .= '<p>' . $photo_data['description']['_content'] . '</p>';
-  $output .= '<cite>' . l(t('Source: Flickr'), $photo_url) . '</cite>';
-  $output .= '</div>';
-  return $output;
+  
+  return $form;
 }
 
 /**
- * Theme function for showing a primary photo of a photo set with optional link.
- * Also includes a link to Flickr.com photo set page to comply with terms of service.
- * @param $img HTML code for image
- * @param $link link to which the image should link to
- * @param $set_url url of the photo set on Flickr.com
- * @param $size the flickr size of the image
- * @param $title title to use for the link
- * @return unknown_type
+ * Implements hook_field_formatter_settings_summary().
  */
-function theme_flickrfield_photoset_primaryphoto($variables) {
-  $img = $variables['0'];
-  $link = $variables['1'];
-  $set_url = $variables['2'];
-  $size = $variables['3'];
-  $title = $variables['4'];
-  if ($link) {
-    $output = '<div class="flickr-photoset-img">' . l($img, $link, array('attributes' => array('title' => $title), 'html' => TRUE)) . '</div>';
+function flickrfield_field_formatter_settings_summary($field, $instance, $view_mode) {
+  $display = $instance['display'][$view_mode];
+  $settings = $display['settings'];
+  
+  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'flickr') . '/flickr.inc';
+  $sizes = flickr_photo_sizes();
+  
+  if ($display['type'] == 'flickrfield_photo') {
+    $summary = t('!size Photo linked to !link', array('!size' => flickrfield_size_options($settings['size']), '!link' => flickrfield_link_options($settings['link'])));
+  }
+  else if ($display['type'] == 'flickrfield_photoset') {
+    $summary = t('!size Photoset with !num photos linked to !link', array('!size' => flickrfield_size_options($settings['size']), '!num' => $settings['photos'], '!link' => flickrfield_link_options($settings['link'])));
   }
   else {
-    $output = '<div class="flickr-photoset-img">' . $img . '</div>';
+    $summar = NULL;
   }
-  $output .= '<div class="flickr-citation">' . l(t('Source: Flickr'), $set_url) . '</div>';
-  return $output;
-}
-
-/**
- * Theme for the form element.
- *
- * The form is already rendered by the child elements by the time it comes back here,
- * just group each delta grouping into its own fieldset.
- */
-function theme_flickrfield($variables) {
-  $element = $variables['0'];
-  $field = field_info_field($element['#field_name']);
-  $fieldset = array(
-    '#title' => $field['widget']['label'] . ' ' . ($element['#delta'] > 0 ? intval($element['#delta'] + 1) : ''),
-    '#value' => $element['#children'],
-    '#collapsible' => FALSE,
-    '#collapsed' => FALSE,
-    '#description' => $element['#description'],
-    '#attributes' => array(),
-  );
-  return theme('fieldset', $fieldset);
+  
+  return $summary;
 }
 
 /**
- * Theme function for the Flickr ID form element.
- *
- * The textfield is already rendered by the textfield theme
- * and the html output lives in $element['#children'].
+ * Implements hook_field_formatter_view().
  */
-function theme_flickrfield_flickrid($variables) {
-  $element = $variables['0'];
-  return $element['#children'];
-}
+function flickrfield_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  $element = array();
+  $settings = $display['settings'];
+  $formatter = $display['type'];
+  
+  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'flickr') . '/flickr.inc';
+  $sizes = flickr_photo_sizes();
+  
+  switch ($formatter) {
+    case 'flickrfield_photo':
+      foreach ($items as $delta => $item) {
+        $photo = flickr_photo_get_info($item['id']);
+        $img = flickr_img($photo, $settings['size'], NULL);
+        $photo_url = flickr_photo_page_url($photo['owner'], $photo['id']);
+        
+        switch($settings['link']) {
+          case 'flickr':
+            $element[$delta] = array('#markup' => l($img, $photo_url, array('absolute' => TRUE, 'html' => TRUE)));
+            break;
+          case 'node':
+            $element[$delta] = array('#markup' => l($img, 'node/' . $entity->nid, array('html' => TRUE)));
+            break;
+          case 'none':
+            $element[$delta] = array('#markup' => $img);
+            break;
+          default:
+            $linked_photo_url = flickr_photo_img($photo, $settings['link']);
+            $element[$delta] = array('#markup' => l($img, $linked_photo_url, array('absolute' => TRUE, 'html' => TRUE)));
+            break;
+        }
+      }
+      break;
+    case 'flickrfield_photoset':
+      foreach ($items as $delta => $item) {
+        $photoset = flickr_photoset_get_photos($item['id'], array('extras' => NULL, 'privacy_filter' => 1, 'per_page' => $settings['photos'], 'page' => 1, 'media' => 'photos'));
+        
+        $photos = array();
+        
+        foreach($photoset['photo'] as $photo) {
+          $img = flickr_img($photo, $settings['size'], NULL);
+          $photo_url = flickr_photoset_page_url($photoset['owner'], $photo['id']);
+          
+          switch($settings['link']) {
+            case 'flickr':
+              $photos[] = l($img, $photo_url, array('absolute' => TRUE, 'html' => TRUE));
+              break;
+            case 'node':
+              $photos[] = l($img, 'node/' . $entity->nid, array('html' => TRUE));
+              break;
+            case 'none':
+              $photos[] = $img;
+              break;
+            default:
+              $linked_photo_url = flickr_photo_img($photo, $settings['link']);
+              $photos[] = l($img, $linked_photo_url, array('absolute' => TRUE, 'html' => TRUE));
+              break;
+          }
+        }
+        
+        $element[$delta] = array('#markup' => theme('item_list', array('items' => $photos, 'attributes' => array('class' => 'flickr-photoset'))));
+      }
+      break;
+  }
+  
+  return $element;
+}
\ No newline at end of file
diff --git a/flickr.inc b/flickr.inc
index 93b9eeb..c50cf90 100644
--- a/flickr.inc
+++ b/flickr.inc
@@ -224,8 +224,12 @@ function flickr_photo_img($photo, $size = NULL, $format = NULL) {
   // photoset's use primary instead of id to specify the image.
   $id = isset($photo['primary']) ? $photo['primary'] : $photo['id'];
   $secret = $photo['secret'];
-
-  return "http://farm{$farm}.static.flickr.com/{$server}/{$id}_{$secret}" . ($size ? "_$size." : '.') . ($size == 'o' ? $format : 'jpg');
+  
+  if ($size == '-') {
+    $size = NULL;
+  }
+  
+  return "http://farm{$farm}.static.flickr.com/{$server}/{$id}_{$secret}" . ($size ? "_$size." : '.') . ($size == 'o' ? $photo['originalformat'] : 'jpg');
 }
 
 /**
@@ -343,6 +347,32 @@ function flickr_photoset_get_list($nsid) {
 }
 
 /**
+ * @param $photoset_id
+ *   id of the photoset to get information about
+ *
+ * @return
+ *   response from the flickr method flickr.photosets.getPhotos
+ *   (http://www.flickr.com/services/api/flickr.photosets.getPhotos.html)
+ */
+function flickr_photoset_get_photos($photoset_id, $vars = array('extras' => NULL, 'privacy_filter' => 1, 'per_page' => 10, 'page' => 1, 'media' => 'all')) {
+  $response = flickr_request(
+    'flickr.photosets.getPhotos',
+    array(
+      'photoset_id' => $photoset_id,
+      'extras' => $vars['extras'],
+      'privacy_filter' => $vars['privacy_filter'],
+      'per_page' => $vars['per_page'],
+      'page' => $vars['page'],
+      'media' => $vars['media']
+    )
+  );
+  if ($response) {
+    return $response['photoset'];
+  }
+  return FALSE;
+}
+
+/**
  * @param $nsid The Flickr user's NSID
  *
  * @return

