diff --git a/HexagonBase/includes/build_settings.inc b/HexagonBase/includes/build_settings.inc
index 65a415c..a7c9bfe 100644
--- a/HexagonBase/includes/build_settings.inc
+++ b/HexagonBase/includes/build_settings.inc
@@ -3,9 +3,6 @@
 /**
  * @file build_settings.inc
  * Builds theme settings. Included by Hexagon's cache system.
- * This isn't cpu intensive but it has been placed into the caching system
- * since theme settings rarely change. Placing it here means not including it
- * on every page load.
  */
 // Calls hex_auto_type()
 include_once HEX_INCLUDES . '/theme_api.inc';
@@ -15,8 +12,7 @@ include_once HEX_INCLUDES . '/theme_api.inc';
  */
 function hex_build_settings($ignore_parent_scope = FALSE) {
 
-  $output = new stdClass();
-  $output->settings = $output->cascade = $output->reverse_cascade = array();
+  $all_settings = array();
 
   // Global and theme specific settings produce the same default set of options.
   $global = variable_get('theme_settings', array());
@@ -28,11 +24,9 @@ function hex_build_settings($ignore_parent_scope = FALSE) {
     foreach (variable_get("theme_{$theme}_settings", $global) as $key => $setting) {
       $settings[hex_fapi_key($key, TRUE)] = $setting;
     }
-    // Name spaced .info settings, e.g. foo.settings[setting_key].
-    foreach ($themes[$theme]->info as $info_key => $info) {
-      if (($pos = strrpos($info_key, '.settings')) !== FALSE) {
-        $settings += array(substr($info_key, 0, $pos) => $info);
-      }
+    // Name spaced .info settings, e.g. foo.settings[...].
+    foreach (preg_grep("/^[_[:alnum:]]+\.settings$/", array_keys($themes[$theme]->info)) as $named) {
+      $settings += array(str_replace('.settings', '', $named) => $themes[$theme]->info[$named]);
     }
     // General .info settings, e.g. settings[setting_key].
     if (isset($themes[$theme]->info['settings'])) {
@@ -54,94 +48,64 @@ function hex_build_settings($ignore_parent_scope = FALSE) {
 
     // Check for the parent conditional ':' values.
     if (!$ignore_parent_scope) {
-      foreach ($settings as $setting_key => $setting) {
-        $parent_key = $setting_key;
-        while (($pos = strrpos($parent_key, ':')) !== FALSE) {
-          $parent_key = substr($parent_key, 0, $pos);
-          if (empty($settings[$parent_key])) {
-            $settings[$setting_key] = NULL;
-            break;
+      foreach (preg_grep("/.+:.+/", array_keys($settings)) as $pcon) {
+        $pkey = $pcon;
+        while (($pos = strrpos($pkey, ':')) !== FALSE) {
+          $pkey = substr($pkey, 0, $pos);
+          if (empty($settings[$pkey])) {
+            unset($settings[$pkey], $settings[$pcon]);
           }
         }
       }
     }
 
-    // Sort named hierarchies. Settings with more sections in its name space
-    // are more specific and must be moved to the top. This is required due to
-    // the way named hierarchies are reconstructed into an array.
-    $sort   = array();
-    $sorted = array();
-    foreach ($settings as $setting_key => $setting) {
-      $sections = explode('.', $setting_key);
-      $root     = array_shift($sections);
-      $weight   = count($sections) . '.' . strlen(implode('.', $sections));
-      $sort[$setting_key] = "$root:$weight";
-    }
-    natsort($sort);
-    foreach (array_keys(array_reverse($sort)) as $setting_key) {
-      $sorted[$setting_key] = $settings[$setting_key];
-    }
-    $settings = $sorted;
+    // Associate settings to theme.
+    $all_settings[$theme] = $settings;
 
-    // Convert '.' named hierarchies into an array structure.
-    reset($settings);
-    while (list($setting_key, $setting) = each($settings)) {
-      if (strrpos($setting_key, '.') !== FALSE) {
-        $child_setting = $setting;
-        $setting_keys  = explode('.', $setting_key);
-        while (($child_key = array_pop($setting_keys)) && !empty($setting_keys)) {
-          $parent_key = implode('.', $setting_keys);
-          // This will overrwite any parent setting if it is not an array.
-          if (!isset($settings[$parent_key]) || !is_array($settings[$parent_key])) {
-            $settings[$parent_key] = array();
-          }
-          $child_setting = array($child_key => $child_setting);
-          $settings[$parent_key] = _hex_merge_settings($settings[$parent_key], $child_setting);
-        }
+    // Find cascade and reverse cascade.
+    foreach ($settings as $key => $setting) {
+      $all_settings[HEX_CASCADE][$key] = $setting;
+      if (!isset($all_settings[HEX_REVERSE_CASCADE][$key])) {
+        $all_settings[HEX_REVERSE_CASCADE][$key] = $setting;
       }
     }
+  }
 
-    // Sort so the output is predictable.
-    ksort($settings);
-
-    // Add to $output
-    $output->settings[$theme] = $settings;
-
-    // Find cascade association.
-    foreach ($settings as $setting_key => $setting) {
-      if (isset($setting)) {
-        $output->cascade[$setting_key] = $theme;
-        if (!isset($output->reverse_cascade[$setting_key])) {
-          $output->reverse_cascade[$setting_key] = $theme;
+  // Convert flat '.' named hierarchies into a multidimensional array.
+  foreach ($all_settings as $source => &$settings) {
+    foreach (preg_grep("/.+\..+/", array_keys($settings)) as $named) {
+      $parent = &$settings;
+      $keys   = explode('.', $named);
+      $last   = array_pop($keys);
+
+      // Create nested arrays
+      $rkeys = array();
+      foreach ($keys as $key) {
+        if (!isset($parent[$key]) || !is_array($parent[$key])) {
+          $parent[$key] = array();
         }
+        // Build nested arrays, e.g.,
+        // - foo
+        //     bar
+        //       baz
+        $parent = &$parent[$key];
+        // Slice out each sub-array, e.g.,
+        // - foo
+        // - foo.bar
+        // - foo.bar.baz
+        $rkeys[] = $key;
+        $settings[implode('.', $rkeys)] = &$parent;
       }
-    }
-  }
-
-  return $output;
-}
 
-/**
- * Helper function. Recursively merges settings.
- */
-function _hex_merge_settings() {
-  $arrays = func_get_args();
-  $merged = array();
-
-  while ($arrays) {
-    $array = array_shift($arrays);
-    foreach ($array as $key => $value) {
-      if (is_string($key) && is_array($value) && isset($merged[$key]) && is_array($merged[$key])) {
-        $merged[$key] = call_user_func(__FUNCTION__, $merged[$key], $value);
-      }
-      elseif (is_string($key)) {
-        $merged[$key] = $value;
-      }
-      else {
-        $merged[] = $value;
+      // Force integer type for numeric strings.
+      if (ctype_digit($last)) {
+        $last = (int) $last;
       }
+      // Insert actual value with the last key.
+      $parent[$last] = $settings[$named];
     }
+
   }
 
-  return $merged;
+  return $all_settings;
 }
diff --git a/HexagonBase/includes/meta_theme.inc b/HexagonBase/includes/meta_theme.inc
index a915453..6254e09 100644
--- a/HexagonBase/includes/meta_theme.inc
+++ b/HexagonBase/includes/meta_theme.inc
@@ -115,7 +115,7 @@ function hex_theme_info($info_key, $default = NULL, $theme = HEX_ACTIVE) {
  * - default theme-specific settings defined in the theme's .info file
  *
  * The list above will cycle through each connected base and sub-themes with
- * sub-themes having priority for their values when the $theme parameter is
+ * sub-themes having priority for their values when the $source parameter is
  * set to HEX_CASCADE (default). HEX_REVERSE_CASCADE is the opposite of
  * HEX_CASCADE. The base theme will have priority.
  *
@@ -142,73 +142,17 @@ function hex_theme_info($info_key, $default = NULL, $theme = HEX_ACTIVE) {
  *    is a master switch for many others.
  * @param $default
  *  The default value if nothing was found.
- * @param $theme
+ * @param $source
  *  Can be a theme key which will restricted it to a specific theme. Other
  *  values allowed are HEX_CASCADE (default), HEX_REVERSE_CASCADE, HEX_ACTIVE
  *  or HEX_THEMEAPI.
  */
-function hex_setting($name = NULL, $default = NULL, $theme = HEX_CASCADE) {
+function hex_setting($name = NULL, $default = NULL, $source = HEX_CASCADE) {
   $cache = hex_cache('settings')->data;
 
-  if ($theme === HEX_ACTIVE || $theme === HEX_THEMEAPI) {
-    $theme = hex_active_theme($theme);
-  }
-  elseif ($theme === HEX_CASCADE && !empty($cache->cascade[$name])) {
-    $theme = $cache->cascade[$name];
-  }
-  elseif ($theme === HEX_REVERSE_CASCADE && !empty($cache->reverse_cascade[$name])) {
-    $theme = $cache->reverse_cascade[$name];
-  }
-
-  return isset($cache->settings[$theme][$name]) ? $cache->settings[$theme][$name] : $default;
-}
-
-/**
- * Retrieve multiple settings from multiple sources or "scopes".
- *
- * Example:
- *
- *  $settings = hex_settings(array(
- *    SETTING_KEY => SCOPE,
- *    'key_1'     => HEX_ACTIVE,
- *    'key_2'     => HEX_ALL_ACTIVE,
- *    'key_3'     => HEX_CASCADE,
- *    'key_4'     => THEMENAME,
- *  ));
- *
- * TODO: document this further.
- *
- * @param $setting_keys
- *  Array of setting keys and their scope.
- */
-function hex_settings($setting_keys) {
-  $cache = hex_cache('settings')->data;
-
-  foreach ($setting_keys as $setting_key => $scope) {
-    $settings[$setting_key] = $scopes = array();
-
-    if ($scope === HEX_ALL_ACTIVE) {
-      $scopes = hex_active_themes();
-    }
-    elseif ($scope === HEX_ACTIVE) {
-      $scopes[] = hex_active_theme();
-    }
-    elseif ($scope === HEX_CASCADE && isset($cache->cascade[$setting_key])) {
-      $scopes[] = $cache->cascade[$setting_key];
-    }
-    elseif ($scope === HEX_REVERSE_CASCADE && isset($cache->reverse_cascade[$setting_key])) {
-      $scopes[] = $cache->reverse_cascade[$setting_key];
-    }
-    elseif (in_array($scope, hex_active_themes())) {
-      $scopes[] = $scope;
-    }
-
-    foreach ($scopes as $scope) {
-      if (isset($cache->settings[$scope][$setting_key])) {
-        $settings[$setting_key][$scope] = $cache->settings[$scope][$setting_key];
-      }
-    }
+  if ($source === HEX_ACTIVE || $source === HEX_THEMEAPI) {
+    $source = hex_active_theme($source);
   }
 
-  return $settings;
+  return isset($cache[$source][$name]) ? $cache[$source][$name] : $default;
 }

