diff --git a/block/flickr_block.module b/block/flickr_block.module
index 9fe167d..46ffa65 100644
--- a/block/flickr_block.module
+++ b/block/flickr_block.module
@@ -82,7 +82,7 @@ function flickr_block_configure($delta = '') {
 
   // Define all elements of the block parameters form.
   $form = array();
-  $default_userid = variable_get('flickr_default_userid', '');
+  $default_userid = variable_get_value('flickr_default_userid');
   $user_id = array_key_exists('user_id', $settings) ? $settings['user_id'] : '';
   $default = $user_id;
   if (!empty($default)) {
@@ -102,7 +102,7 @@ function flickr_block_configure($delta = '') {
     );
   }
   else {
-    $info = flickr_people_get_info(variable_get('flickr_default_userid', ''));
+    $info = flickr_people_get_info(variable_get_value('flickr_default_userid'));
     $form["flickr_block_{$delta}_user_id"] = array(
       '#type' => 'textfield',
       '#title' => t('Flickr User Id'),
@@ -319,7 +319,7 @@ function flickr_block_save($delta = '', $edit = array()) {
         'size' => $edit["flickr_block_{$delta}_size"],
         'media' => $edit["flickr_block_{$delta}_media"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get_value('flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta . '_' . $nsid, 'cache', TRUE);
       break;
 
@@ -345,7 +345,7 @@ function flickr_block_save($delta = '', $edit = array()) {
         'size' => $edit["flickr_block_{$delta}_size"],
         'media' => $edit["flickr_block_{$delta}_media"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get_value('flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta . '_' . $nsid, 'cache', TRUE);
       break;
 
@@ -371,7 +371,7 @@ function flickr_block_save($delta = '', $edit = array()) {
         'size' => $edit["flickr_block_{$delta}_size"],
         'media' => $edit["flickr_block_{$delta}_media"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get_value('flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta . '_' . $nsid, 'cache', TRUE);
       break;
 
@@ -430,7 +430,7 @@ function flickr_block_save($delta = '', $edit = array()) {
         'size' => $edit["flickr_block_{$delta}_size"],
         'media' => $edit["flickr_block_{$delta}_media"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get_value('flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta . '_' . $nsid, 'cache', TRUE);
       break;
 
@@ -468,7 +468,7 @@ function flickr_block_save($delta = '', $edit = array()) {
         'size' => $edit["flickr_block_{$delta}_size"],
         'media' => $edit["flickr_block_{$delta}_media"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get_value('flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta . '_' . $nsid . '_' . $edit["flickr_block_{$delta}_tag"], 'cache', TRUE);
       break;
   }
@@ -499,7 +499,7 @@ function flickr_block_view($delta = '') {
 
   // Get the default user id as a fallback.
   if (empty($settings['user_id'])) {
-    $settings['user_id'] = variable_get('flickr_default_userid');
+    $settings['user_id'] = variable_get_value('flickr_default_userid');
   }
   $settings['user_id'] = flickr_user_find_by_identifier($settings['user_id']);
   $block = array();
diff --git a/field/flickrfield.module b/field/flickrfield.module
index 780b7a5..e3f628a 100644
--- a/field/flickrfield.module
+++ b/field/flickrfield.module
@@ -162,10 +162,10 @@ function flickrfield_form_process_flickrfield($element, $form_state, $form = arr
   $element['nsid'] = array(
     '#type' => 'textfield',
     '#title' => t('User Id'),
-    '#default_value' => !empty($element['#value']['nsid']) ? $element['#value']['nsid'] : variable_get('flickr_default_userid', ''),
+    '#default_value' => !empty($element['#value']['nsid']) ? $element['#value']['nsid'] : variable_get_value('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. !find_id", array(
-      '@id' => variable_get('flickr_default_userid', ''),
+      '@id' => variable_get_value('flickr_default_userid'),
       '!find_id' => $idgettr,
     )),
   );
diff --git a/flickr.admin.inc b/flickr.admin.inc
index 63bee0c..2063e4e 100644
--- a/flickr.admin.inc
+++ b/flickr.admin.inc
@@ -28,7 +28,7 @@ function flickr_admin_settings() {
     '#default_value' => variable_get('flickr_api_secret', ''),
     '#description' => t("API key's secret from Flickr."),
   );
-  $default = variable_get('flickr_default_userid', '');
+  $default = variable_get_value('flickr_default_userid');
   if (!empty($default)) {
     $info = flickr_people_get_info($default);
     $default = $info['username']['_content'];
@@ -64,7 +64,9 @@ function flickr_admin_settings() {
     '#type' => 'textfield',
     '#title' => t('Number of photos per photoset'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_photos_per_page', 20),
+    '#default_value' => variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid'),
     '#description' => t('The number indicates how many photos of a photoset display in your nodes. After saving the configuration <a href="?q=admin/config/development/performance">clear the cache</a>.'),
     '#size' => 3,
     '#maxlength' => 3,
@@ -105,16 +107,16 @@ function flickr_admin_settings() {
     '#title' => t('Flickr info to use'),
   );
   $attribution = l(t('proper attribution'), 'https://www.flickr.com/services/developer/attributions/', array(
-      'attributes' => array(
-        'title' => t('Flickr: The Flickr Developer Guide - Attributions'),
-        'target' => '_blank',
-      ),
+    'attributes' => array(
+      'title' => t('Flickr: The Flickr Developer Guide - Attributions'),
+      'target' => '_blank',
+    ),
   ));
   $form['info_settings']['flickr_title_suppress_on_small'] = array(
     '#type' => 'textfield',
     '#title' => t('Minimum image width to display a title caption'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_title_suppress_on_small', '100'),
+    '#default_value' => variable_get_value('flickr_title_suppress_on_small'),
     '#description' => t("Small images have liitle space for a title caption. Replace it with the text 'Flickr' that links to the photo page on Flickr to comply with their <a href='https://www.flickr.com/guidelines.gne' title='Flickr Community Guidelines' target='_blank'>Guidelines</a>.<br />Set it to '0 px' to always include or '999 px' to always exclude. To give !attribution this should be included (space allowing). After saving the configuration <a href='?q=admin/config/development/performance'>clear the cache</a>.", array('!attribution' => $attribution)),
     '#field_suffix' => t('px'),
     '#size' => 3,
@@ -124,7 +126,7 @@ function flickr_admin_settings() {
     '#type' => 'textfield',
     '#title' => t('Minimum image width to display date, location, photographer and optionally license info under the caption'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_metadata_suppress_on_small', '150'),
+    '#default_value' => variable_get_value('flickr_metadata_suppress_on_small'),
     '#description' => t("Suppress extra info on small images. Set it to '0 px' to always include or '999 px' to always exclude. To give !attribution this should be included (space allowing). After saving the configuration <a href='?q=admin/config/development/performance'>clear the cache</a>.", array('!attribution' => $attribution)),
     '#field_suffix' => t('px'),
     '#size' => 3,
@@ -133,7 +135,7 @@ function flickr_admin_settings() {
   $form['info_settings']['flickr_license'] = array(
     '#type' => 'checkbox',
     '#title' => t('License info in caption'),
-    '#default_value' => variable_get('flickr_license', 0),
+    '#default_value' => variable_get_value('flickr_license'),
     '#description' => t("To give !attribution. Depends on 'Minimum image width' above. After saving the configuration <a href='?q=admin/config/development/performance'>clear the cache</a>.", array('!attribution' => $attribution)),
   );
   $form['info_settings']['flickr_caption_padding'] = array(
@@ -149,12 +151,7 @@ function flickr_admin_settings() {
   $form['info_settings']['flickr_info_overlay'] = array(
     '#type' => 'checkboxes',
     '#title' => t('Info to include when enlarging the image'),
-    '#default_value' => variable_get('flickr_info_overlay', array(
-      'title' => 'title',
-      'metadata' => 'metadata',
-      'description' => 'description',
-      'license' => 0,
-    )),
+    '#default_value' => variable_get_value('flickr_info_overlay'),
     '#description' => t("To give !attribution all marked * should be checked. After saving the configuration <a href='?q=admin/config/development/performance'>clear the cache</a>.", array('!attribution' => $attribution)),
     '#options' => array(
       'title' => t('Title *'),
diff --git a/flickr.api.inc b/flickr.api.inc
index d8af7e3..2fbc6c7 100644
--- a/flickr.api.inc
+++ b/flickr.api.inc
@@ -68,7 +68,9 @@ function flickr_photos_search($nsid, $page = 1, $other_args = array()) {
   );
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 20);
+    $args['per_page'] = variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid');
   }
 
   $response = flickr_request('flickr.photos.search', array_merge($args, $other_args));
@@ -99,7 +101,9 @@ function flickr_favorites_get_public_list($nsid, $page = 1, $other_args = array(
 
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 20);
+    $args['per_page'] = variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid');
   }
 
   $response = flickr_request('flickr.favorites.getPublicList', array_merge($args, $other_args));
@@ -141,7 +145,9 @@ function flickr_photoset_get_info($photoset_id) {
  *   (http://www.flickr.com/services/api/flickr.photosets.getList.html)
  */
 function flickr_photoset_get_list($nsid, $page = NULL) {
-  $per_page = (!empty($page)) ? variable_get('flickr_photos_per_page', 20) : '';
+  $per_page = (!empty($page)) ? variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid') : '';
   $response = flickr_request(
     'flickr.photosets.getList',
     array(
@@ -174,7 +180,9 @@ function flickr_photosets_getphotos($photoset_id, $other_args = array(), $page =
 
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 20);
+    $args['per_page'] = variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid');
   }
 
   $response = flickr_request('flickr.photosets.getPhotos', array_merge($args, $other_args));
@@ -313,7 +321,9 @@ function flickr_get_group_photos($nsid, $page = 1, $other_args = array()) {
 
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-//    $args['per_page'] = variable_get('flickr_photos_per_page', 20);
+//    $args['per_page'] = variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid');
   }
 
   $response = flickr_request('flickr.groups.pools.getPhotos', array_merge($args, $other_args));
@@ -341,7 +351,9 @@ function flickr_people_getpublicphotos($nsid, $page = 1, $other_args = array())
 
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 20);
+    $args['per_page'] = variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid');
   }
 
   $response = flickr_request('flickr.people.getPublicPhotos', array_merge($args, $other_args));
diff --git a/flickr.install b/flickr.install
index de34b77..31fa187 100644
--- a/flickr.install
+++ b/flickr.install
@@ -14,15 +14,8 @@ function flickr_uninstall() {
   variable_del('flickr_class');
   variable_del('flickr_css');
   variable_del('flickr_default_size');
-  variable_del('flickr_default_userid');
   variable_del('flickr_opening_size');
-  variable_del('flickr_photos_per_page');
   variable_del('flickr_rel');
-  variable_del('flickr_title_suppress_on_small');
-  variable_del('flickr_metadata_suppress_on_small');
-  variable_del('flickr_info_overlay');
-  variable_del('flickr_caption_padding');
-  variable_del('flickr_license');
 }
 
 /**
@@ -60,7 +53,7 @@ function flickr_schema() {
  */
 function flickr_update_7001() {
   // Create new index on variable 'flickr_info_overlay' without altering others.
-  $overlay = variable_get('flickr_info_overlay', array(
+  $overlay = variable_get_value('flickr_info_overlay', array(
     'title' => 'title',
     'metadata' => 'metadata',
     'description' => 'description',
@@ -72,3 +65,16 @@ function flickr_update_7001() {
     'license' => 0,
   ));
 }
+
+/**
+ * Implements hook_update().
+ */
+function flickr_update_7002() {
+  // Deletes unused variables.
+  variable_del('flickr_default_userid');
+  variable_del('flickr_photos_per_page');
+  variable_del('flickr_title_suppress_on_small');
+  variable_del('flickr_metadata_suppress_on_small');
+  variable_del('flickr_info_overlay');
+  variable_del('flickr_license');
+}
diff --git a/flickr.module b/flickr.module
index 4c54ebc..148d63d 100644
--- a/flickr.module
+++ b/flickr.module
@@ -175,7 +175,7 @@ function flickr_photos($user = NULL) {
   $pager_page_array[$element] = empty($_GET['page']) ? 0 : (int) $_GET['page'];
 
   if ($user === NULL) {
-    $nsid = variable_get('flickr_default_userid');
+    $nsid = variable_get_value('flickr_default_userid');
     if (!$nsid) {
       drupal_set_message(t('No default Flickr user id has been set.'));
       return FALSE;
@@ -347,7 +347,7 @@ function theme_flickr_photo($variables) {
   $people = flickr_get_user_info($info['owner']['nsid']);
   $title = is_array($photo['title']) ? $photo['title']['_content'] : $photo['title'];
   // Image width < 100 px is too small for most titles. Can be set differently.
-  if ($width < variable_get('flickr_title_suppress_on_small', '100')) {
+  if ($width < variable_get_value('flickr_title_suppress_on_small')) {
     $credit = t('Flickr');
   }
   else {
@@ -422,18 +422,18 @@ function theme_flickr_photo($variables) {
       $licenselong = t('Copyright and Other Rights Pertaining to U.S. Government Works | USA.gov');
       break;
   }
-  if (variable_get('flickr_license', 0) == 0) {
+  if (variable_get_value('flickr_license') == 0) {
     $license = '';
   }
   // Compose extra Flickr info as HTML to render.
   $metadata = $taken . $location . ' ' . t('by') . ' ' . $username;
   // Image width < 100 px is too small for most titles. Can be set differently.
   $notitle = (variable_get('flickr_class') == NULL && variable_get('flickr_rel') == NULL) ? '' : '<span class="flickr-no-title">' . t('Flickr') . '</span><br />';
-  $credit = $width < variable_get('flickr_title_suppress_on_small', '100') ? $notitle : '<span class="flickr-title">' . $title . '</span><br />';
+  $credit = $width < variable_get_value('flickr_title_suppress_on_small') ? $notitle : '<span class="flickr-title">' . $title . '</span><br />';
   // Image width < 150 px is too small for extra info. Can be set differently.
-  $metadatacaption = $width < variable_get('flickr_metadata_suppress_on_small', '150') ? '' : '<span class="flickr-metadata">' . $metadata . $license . '</span>';
+  $metadatacaption = $width < variable_get_value('flickr_metadata_suppress_on_small') ? '' : '<span class="flickr-metadata">' . $metadata . $license . '</span>';
   // Determine what info goes with the enlarged version of the image.
-  $overlay = variable_get('flickr_info_overlay', array(
+  $overlay = variable_get_value('flickr_info_overlay', array(
     'title' => 'title',
     'metadata' => 'metadata',
     'description' => 'description',
@@ -446,7 +446,7 @@ function theme_flickr_photo($variables) {
   $overlayhtml = $overlaytitle . $metadata . $description . $licenselong;
   // Final step when NO overlay browser is used that generates the image that
   // links to the Flickr page to comply with the TOS of Flickr.
-  if (variable_get('flickr_class') == NULL && variable_get('flickr_rel') == NULL && $width < variable_get('flickr_title_suppress_on_small', '100') && $width < variable_get('flickr_metadata_suppress_on_small', '150')) {
+  if (variable_get('flickr_class') == NULL && variable_get('flickr_rel') == NULL && $width < variable_get_value('flickr_title_suppress_on_small') && $width < variable_get_value('flickr_metadata_suppress_on_small')) {
     return '<span class="flickr-wrap' . $class_float . '"' . $style_float . '>' . l($img, $photo_url, array(
       'attributes' => array(
         'title' => $title,
@@ -630,3 +630,34 @@ function theme_flickr_flickrcomslideshow_simple($variables) {
   }
   return '<div class="flickr-slideshow"><object type="text/html" data="' . $src . '"></object></div>';
 }
+
+/**
+ * @file
+ * Variable hooks for domain_variable.
+ */
+
+
+/**
+ * Implements hook_variable_info_alter().
+ *
+ * Only variables which have the "multidomain" property set to TRUE, can be
+ * used as domain specific variables. Here we set this property for a set of
+ * basic_cart variables.
+ *
+ * @see _domain_variable_variable_realm_list()
+ */
+function flickr_domain_variable_info_alter(&$variables, $options) {
+  $list = array(
+    flickr_default_userid,
+    flickr_photos_per_page,
+    flickr_title_suppress_on_small,
+    flickr_metadata_suppress_on_small,
+    flickr_info_overlay,
+    flickr_license,
+  );
+  foreach ($list as $name) {
+    if (isset($variables[$name])) {
+      $variables[$name]['multidomain'] = TRUE;
+    }
+  }
+}
diff --git a/sets/flickr_sets.module b/sets/flickr_sets.module
index f34f237..dfdb35a 100644
--- a/sets/flickr_sets.module
+++ b/sets/flickr_sets.module
@@ -63,10 +63,14 @@ function flickr_sets_photosets($account, $nsid = NULL) {
   // Set this to something else if you want multiple pagers.
   $element = 0;
   $pager_page_array[$element] = empty($_GET['page']) ? 0 : (int) $_GET['page'];
-  $per_page = variable_get('flickr_photos_per_page', 20);
+  $per_page = variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid');
   // First we need the complete list of sets just for the pager info.
   $set_response = flickr_photoset_get_list($nsid);
-  $pager_total[$element] = ceil(count($set_response) / variable_get('flickr_photos_per_page', 20));
+  $pager_total[$element] = ceil(count($set_response) / variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid'));
   $pager_total_items[$element] = count($set_response);
   // Now we only get the sets for the corresponding page.
   $set_response = flickr_photoset_get_list($nsid, $pager_page_array[$element] + 1);
@@ -109,7 +113,9 @@ function flickr_sets_photoset($account, $set) {
   // Set this to something else if you want multiple pagers.
   $element = 0;
   $pager_page_array[$element] = empty($_GET['page']) ? 0 : (int) $_GET['page'];
-  $per_page = variable_get('flickr_photos_per_page', 20);
+  $per_page = variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid');
 
   // Request set of photos.
   $set_response = flickr_photosets_getphotos($id, $other_args = NULL, $pager_page_array[$element] + 1);
@@ -164,7 +170,9 @@ function theme_flickr_sets_photosets($variables) {
   $nsid = $variables['nsid'];
   $photosets = $variables['photosets'];
 
-  $output = theme('pager', array('quantity' => variable_get('flickr_photos_per_page', 20)));
+  $output = theme('pager', array('quantity' => variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid')));
   $output .= "<div class='flickr-photosets'>\n";
   foreach ((array) $photosets as $photoset) {
     $output .= theme('flickr_sets_photoset_box', array(
@@ -175,7 +183,9 @@ function theme_flickr_sets_photosets($variables) {
     ));
   }
   $output .= '</div>';
-  $output .= theme('pager', array('quantity' => variable_get('flickr_photos_per_page', 20)));
+  $output .= theme('pager', array('quantity' => variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid')));
   return $output;
 }
 
@@ -188,7 +198,9 @@ function theme_flickr_sets_photoset($variables) {
   $photo_arr = $variables['photo_arr'];
   $set_info = $variables['set_info'];
 
-  $output = theme('pager', array('quantity' => variable_get('flickr_photos_per_page', 20)));
+  $output = theme('pager', array('quantity' => variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid')));
   $output .= "<div class='flickr-photoset'>\n";
   foreach ((array) $photo_arr['photoset']['photo'] as $photo) {
     // Insert owner into $photo because
@@ -200,7 +212,9 @@ function theme_flickr_sets_photoset($variables) {
     ));
   }
   $output .= '</div>';
-  $output .= theme('pager', array('quantity' => variable_get('flickr_photos_per_page', 20)));
+  $output .= theme('pager', array('quantity' => variable_get_value('flickr_photos_per_page')
+   67:     '#default_value' => variable_get_value('flickr_photos_per_page', 20),
+variable_get_value('flickr_default_userid')));
 
   return $output;
 }
