diff --git a/theme/icons.inc b/theme/icons.inc
index bc6136f..86711db 100755
--- a/theme/icons.inc
+++ b/theme/icons.inc
@@ -21,7 +21,12 @@ function bootstrap_icon_providers() {
  * Implements hook_icon_bundles().
  */
 function bootstrap_icon_bundles() {
-  $theme = variable_get('theme_default', $GLOBALS['theme']);
+  $config = \Drupal::config('system.theme');
+  $theme_default = $config->get('default');
+  if (empty($theme_default)) {
+    $theme_default = $GLOBALS['theme'];
+  }
+  $theme = $theme_default;
   $cdn = theme_get_setting('bootstrap_cdn', $theme);
   $bundles = array();
   if ($cdn || (!$cdn && file_exists(drupal_get_path('theme', $theme) . '/bootstrap/fonts/glyphicons-halflings-regular.ttf'))) {
diff --git a/theme/system/page.vars.php b/theme/system/page.vars.php
index 727a517..67e5fd5 100755
--- a/theme/system/page.vars.php
+++ b/theme/system/page.vars.php
@@ -23,9 +23,14 @@ function bootstrap_preprocess_page(&$variables) {
 
   // Primary nav.
   $variables['primary_nav'] = FALSE;
+  $config = \Drupal::config('menu.settings');
   if ($variables['main_menu']) {
     // Build links.
-    $variables['primary_nav'] = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
+    $main_nav = $config->get('main_links');
+    if (empty($main_nav)) {
+      $main_nav = 'main-menu';
+    }
+    $variables['primary_nav'] = menu_tree($main_nav);
     // Provide default theme wrapper function.
     $variables['primary_nav']['#theme_wrappers'] = array('menu_tree__primary');
   }
@@ -34,7 +39,11 @@ function bootstrap_preprocess_page(&$variables) {
   $variables['secondary_nav'] = FALSE;
   if ($variables['secondary_menu']) {
     // Build links.
-    $variables['secondary_nav'] = menu_tree(variable_get('menu_secondary_links_source', 'user-menu'));
+    $secondary_nav = $config->get('secondary_links');
+    if (empty($secondary_nav)) {
+      $secondary_nav = 'user-menu';
+    }
+    $variables['secondary_nav'] = menu_tree($secondary_nav);
     // Provide default theme wrapper function.
     $variables['secondary_nav']['#theme_wrappers'] = array('menu_tree__secondary');
   }
