diff --git a/variable.inc b/variable.inc
index 6142203..6ecb338 100644
--- a/variable.inc
+++ b/variable.inc
@@ -14,6 +14,7 @@ function variable_build_info($type, $options) {
       return variable_build_list_info($options);
     case 'group':
     case 'type':
+    case 'realm':
       $info = variable_invoke_all('variable_' . $type . '_info');
       drupal_alter('variable_' . $type . '_info', $info);
       return $info;
diff --git a/variable_realm/variable_realm.class.inc b/variable_realm/variable_realm.class.inc
new file mode 100644
index 0000000..8f9cf24
--- /dev/null
+++ b/variable_realm/variable_realm.class.inc
@@ -0,0 +1,149 @@
+<?php
+/**
+ * @file
+ * Variable realm controller
+ */
+
+/**
+ * Realm Controller Interface.
+ */
+interface VariableRealmController {
+  /**
+   * Class constructor.
+   */
+  public function __construct($realm, $key, $variables = NULL);
+
+  /**
+   * Get single variable.
+   *
+   * @param $name
+   *   Variable name
+   * @param $default
+   *   Default value
+   */
+  public function variable_get($name, $default = NULL);
+  /**
+   * Set single variable.
+   *
+   * @param $name
+   *   Variable name
+   * @param $value
+   *   Variable value
+   */
+  public function variable_set($name, $value);
+  /**
+   * Delete single variable.
+   *
+   * @param $name
+   *   Variable name
+   */
+  public function variable_del($name);
+  /**
+   * List all current variable values.
+   */
+  public function variable_list();
+}
+
+/**
+ * Base class, keeps static list of variables.
+ */
+class VariableRealmDefaultController implements VariableRealmController {
+  public $realm;
+  public $key;
+  protected $variables;
+  /**
+   * Class constructor.
+   */
+  public function __construct($realm, $key, $variables = NULL) {
+    $this->realm = $realm;
+    $this->key = $key;
+    $this->variables = $variables;
+  }
+
+  /**
+   * Initialize variables.
+   */
+  public function variable_init() {
+    if (!isset($this->variables)) {
+      $this->variables = array();
+    }
+  }
+  /**
+   * Get single variable.
+   *
+   * @param $name
+   *   Variable name
+   * @param $default
+   *   Default value
+   */
+  public function variable_get($name, $default = NULL) {
+    $this->variable_init();
+    return isset($this->variables[$name]) ? $this->variables[$name] : $default;
+  }
+  /**
+   * Set single variable.
+   *
+   * @param $name
+   *   Variable name
+   * @param $value
+   *   Variable value
+   */
+  public function variable_set($name, $value) {
+    $this->variable_init();
+    $this->variables[$name] = $value;
+  }
+  /**
+   * Delete single variable.
+   *
+   * @param $name
+   *   Variable name
+   */
+  public function variable_del($name) {
+    $this->variable_init();
+    unset($this->variables[$name]);
+  }
+  /**
+   * List all current variable values.
+   */
+  public function variable_list() {
+    $this->variable_init();
+    return $this->variables;
+  }
+
+}
+
+/**
+ * Controller for default system variables.
+ */
+class VariableRealmGlobal extends VariableRealmDefaultController {
+  /**
+   * Initialize variables.
+   */
+  public function variable_init() {
+    if (!isset($this->variables)) {
+      $this->variables = $GLOBALS['conf'];
+    }
+  }
+  /**
+   * Set single variable.
+   *
+   * @param $name
+   *   Variable name
+   * @param $value
+   *   Variable value
+   */
+  public function variable_set($name, $value) {
+    parent::variable_set($name, $value);
+    variable_set($name, $value);
+  }
+  /**
+   * Delete single variable.
+   *
+   * @param $name
+   *   Variable name
+   */
+  public function variable_del($name) {
+    parent::variable_del($name);
+    variable_del($name);
+  }
+}
\ No newline at end of file
diff --git a/variable_realm/variable_realm.features.inc b/variable_realm/variable_realm.features.inc
new file mode 100644
index 0000000..88d2704
--- /dev/null
+++ b/variable_realm/variable_realm.features.inc
@@ -0,0 +1,126 @@
+<?php
+
+/**
+ * @file
+ * Features support for Variable store.
+ */
+
+/**
+ * Implements hook_features_export_options().
+ */
+function variable_realm_features_export_options() {
+  foreach (variable_realm_info() as $name => $realm) {
+    $realm_keys = variable_realm_keys($name);
+    if (count($realm_keys) > 1) {
+      $options[$name] = $realm['title'] . ': ' . t('all');
+    }
+    foreach ($realm_keys as $key => $title) {
+      $options[$name . ':' . $key] = $realm['title'] . ': ' . $title;
+    }
+  }
+  return $options;
+}
+
+/**
+ * Implements hook_features_export().
+ */
+function variable_realm_features_export($data, &$export, $module_name) {
+  $export['dependencies']['variable_realm'] = 'variable_realm';
+  $list = variable_realm_features_selection($data);
+  foreach ($list as $machine_name) {
+    // Add module that provides the exported realm
+    list($realm, $key) = explode(':', $machine_name);
+    if ($realm_info = variable_realm_info($realm)) {
+      $export['dependencies'][$realm_info['module']] = $realm_info['module'];
+    }
+    $export['features']['variable_realm'][$machine_name] = $machine_name;
+  }
+  return array();
+}
+
+/**
+ * Processes export data selections consistently.
+ *
+ * @param $data
+ *   Array of selections from the features component form.
+ *
+ * @return
+ *   An array of realms, keyed by machine_name.
+ */
+function variable_realm_features_selection($data) {
+  $list = array();
+  foreach ($data as $machine_name) {
+    if (strpos($machine_name, ':')) {
+      $list[] = $machine_name;
+    }
+    else {
+      foreach (variable_realm_keys($machine_name) as $key => $title) {
+        $list[] = "$machine_name:$key";
+      }
+    }
+  }
+  return $list;
+}
+
+/**
+ * Implements hook_features_export_render().
+ */
+function variable_realm_features_export_render($module_name, $data, $export = NULL) {
+  variable_realm_features_load($module_name, 'variable_realm_default_variables', FALSE);
+  $code = array();
+  $code[] = '$realm_variables = array();';
+  foreach ($data as $machine_name) {
+    list ($realm, $key) = explode(':', $machine_name);
+    $variable_realm = variable_realm_controller_build($realm, $key);
+    $variables = $variable_realm->variable_list();
+    $code[] = "  \$realm_variables['{$realm}']['{$key}'] = " . features_var_export($variables) .";";
+  }
+  $code[] = "\nreturn \$realm_variables;";
+  $output = implode("\n", $code);
+  return array('variable_realm_default_variables' => $output);
+}
+
+/**
+ * Implements hook_features_revert().
+ */
+function variable_realm_features_revert($module) {
+  return variable_realm_features_rebuild($module);
+}
+
+/**
+ * Implements hook_features_rebuild().
+ */
+function variable_realm_features_rebuild($module) {
+  if ($defaults = variable_realm_features_load($module, 'variable_realm_default_variables', TRUE)) {
+    foreach ($defaults as $realm => $realm_data) {
+      foreach ($realm_data as $key => $variables) {
+        $variable_realm = variable_realm_controller_build($realm, $key);
+        foreach ($variables as $name => $value) {
+          $variable_realm->variable_set($name, $value);
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Features doesn't know how to load custom includes.
+ *
+ * @param $module
+ *  The name of the feature to load.
+ * @param $hook
+ *  The name of the domain hook.
+ * @param $return
+ *  Boolean indicator to return the results of the function.
+ *
+ * @return
+ *  The results of the $hook implemenation, if requested.
+ */
+function variable_realm_features_load($module, $hook, $return = TRUE) {
+  // Features does not handle module loading of custom files.
+  module_load_include('inc', $module, $module . '.variable');
+  $function = $module . '_' . $hook;
+  if ($return && function_exists($function)) {
+    return $function();
+  }
+}
diff --git a/variable_realm/variable_realm.info b/variable_realm/variable_realm.info
index 7945650..49c6ad3 100644
--- a/variable_realm/variable_realm.info
+++ b/variable_realm/variable_realm.info
@@ -2,4 +2,6 @@ name = Variable realm
 description = API to use variable realms from different modules
 dependencies[] = variable
 package = Variable
-core = 7.x
\ No newline at end of file
+core = 7.x
+
+files[] = variable_realm.class.inc
\ No newline at end of file
diff --git a/variable_realm/variable_realm.install b/variable_realm/variable_realm.install
index a285e8f..2e9e6c6 100644
--- a/variable_realm/variable_realm.install
+++ b/variable_realm/variable_realm.install
@@ -11,3 +11,11 @@ function variable_realm_install() {
   // Set module weight for it to run before most modules and initialize variable realms
   db_query("UPDATE {system} SET weight = -1000 WHERE name = 'variable_realm' AND type = 'module'");
 }
+
+/**
+ * Refresh cache so new classes are found.
+ */
+function variable_realm_update_7000() {
+  drupal_flush_all_caches();
+}
+
diff --git a/variable_realm/variable_realm.module b/variable_realm/variable_realm.module
index abe2633..3198b13 100644
--- a/variable_realm/variable_realm.module
+++ b/variable_realm/variable_realm.module
@@ -16,6 +16,65 @@ function variable_realm_boot() {
 }
 
 /**
+ * Implements hook_hook_info().
+ */
+function variable_realm_hook_info() {
+  $hooks['variable_realm_info'] = array(
+    'group' => 'variable',
+  );
+  return $hooks;
+}
+
+/**
+ * Get information about variable realms.
+ */
+function variable_realm_info($realm = NULL) {
+  return _variable_info('realm', $realm);
+}
+
+/**
+ * Get keys for realm
+ */
+function variable_realm_keys($realm) {
+  $info = variable_realm_info($realm);
+  return isset($info['keys']) ? $info['keys'] : array();
+}
+
+/**
+ * Implements hook_variable_realm_controller().
+ */
+function variable_realm_variable_realm_controller() {
+  $realm['global'] = array(
+    'weight' => -10,
+    'class' => 'VariableRealmGlobal',
+  );
+  return $realm;
+}
+
+/**
+ * Get class and weight information for variable realm.
+ */
+function variable_realm_controller_data($realm) {
+  $data = &drupal_static(__FUNCTION__);
+  if (!isset($keys)) {
+    $data = module_invoke_all('variable_realm_controller');
+  }
+  return isset($data[$realm]) ? $data[$realm] : NULL;
+}
+
+/**
+ * Create realm controller object.
+ */
+function variable_realm_controller_build($realm, $key, $variables = NULL) {
+  $info = variable_realm_controller_data($realm);
+  $class = isset($info['class']) ? $info['class'] : 'VariableRealmDefaultController';
+  $weight = isset($info['weight']) ? $info['weight'] : 0;
+  // Set realm weight if not set before.
+  variable_realm_weight($realm, NULL, $weight);
+  return new $class($realm, $key, $variables);
+}
+
+/**
  * Get variable realm data by reference.
  *
  * The first time this function is invoked we initialize the realm system and store global variables
@@ -266,4 +325,21 @@ function variable_realm_variable_delete($variable) {
       }
     }
   }
+}
+
+/**
+ * Implements hook_features_api().
+ */
+function variable_realm_features_api() {
+  $components = array(
+    'variable_realm' => array(
+      'name' => t('Realm variables'),
+      'default_hook' => 'variable_realm_default_variables',
+      'default_file' => FEATURES_DEFAULTS_CUSTOM,
+      'default_filename' => 'variable',
+      'features_source' => TRUE,
+      'file' => drupal_get_path('module', 'variable_realm') .'/variable_realm.features.inc',
+    ),
+  );
+  return $components;
 }
\ No newline at end of file
diff --git a/variable_realm/variable_realm.variable.inc b/variable_realm/variable_realm.variable.inc
new file mode 100644
index 0000000..7c09136
--- /dev/null
+++ b/variable_realm/variable_realm.variable.inc
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @file
+ * Variable hooks.
+ */
+
+/**
+ * Implements hook_variable_realm_info() {
+ */
+function variable_realm_variable_realm_info() {
+  $realm['global'] = array(
+    'title' => t('Global'),
+    'keys' => array(
+      'default' => t('All variables')
+    ),
+  );
+  return $realm;
+}
\ No newline at end of file
diff --git a/variable_store/variable_store.class.inc b/variable_store/variable_store.class.inc
new file mode 100644
index 0000000..cef0014
--- /dev/null
+++ b/variable_store/variable_store.class.inc
@@ -0,0 +1,36 @@
+<?php
+/**
+ * @file
+ * Variable realm controller
+ */
+
+class VariableStoreRealmController extends VariableRealmDefaultController {
+  /**
+   * Initialize realm.
+   */
+  public function variable_init() {
+    if (!isset($this->variables)) {
+      $this->variables = &variable_store($this->realm, $this->key);
+    }
+  }
+  /**
+   * Set single variable.
+   *
+   * @param $name
+   *   Variable name
+   * @param $value
+   *   Variable value
+   */
+  public function variable_set($name, $value) {
+    variable_store_set($this->realm, $this->key, $name, $value);
+  }
+  /**
+   * Delete single variable.
+   *
+   * @param $name
+   *   Variable name
+   */
+  public function variable_del($name) {
+    variable_store_del($this->realm, $this->key, $name);
+  }
+}
\ No newline at end of file
diff --git a/variable_store/variable_store.info b/variable_store/variable_store.info
index d2149e4..2f1b97e 100644
--- a/variable_store/variable_store.info
+++ b/variable_store/variable_store.info
@@ -4,4 +4,5 @@ dependencies[] = variable_realm
 package = Variable
 core = 7.x
 
-files[] = variable_store.test
\ No newline at end of file
+files[] = variable_store.class.inc
+files[] = variable_store.test
