diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index eac2f97..98f043d 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2172,13 +2172,16 @@ function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
  */
 function drupal_get_user_timezone() {
   global $user;
-  if (variable_get('configurable_timezones', 1) && $user->uid && $user->timezone) {
+  $config = config('system.date');
+
+  if ($config->get('timezone.user.configurable') && $user->uid && $user->timezone) {
     return $user->timezone;
   }
   else {
     // Ignore PHP strict notice if time zone has not yet been set in the php.ini
     // configuration.
-    return variable_get('date_default_timezone', @date_default_timezone_get());
+    $config_data_default_timezone = $config->get('timezone.default');
+    return !empty($config_data_default_timezone) ? $config_data_default_timezone : @date_default_timezone_get();
   }
 }
 
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 4c86953..a88f1df 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -1899,7 +1899,7 @@ function format_interval($interval, $granularity = 2, $langcode = NULL) {
  *   A UNIX timestamp to format.
  * @param $type
  *   (optional) The format to use, one of:
- *   - One of the built-in formats: 'short', 'medium', 'long', 'html_datetime',
+ *   - One of the built-in formats: 'system_short', 'system_medium', 'system_long', 'html_datetime',
  *     'html_date', 'html_time', 'html_yearless_date', 'html_week',
  *     'html_month', 'html_year'.
  *   - The name of a date type defined by a module in hook_date_format_types(),
@@ -1922,7 +1922,7 @@ function format_interval($interval, $granularity = 2, $langcode = NULL) {
  * @return
  *   A translated date string in the requested format.
  */
-function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL) {
+function format_date($timestamp, $type = 'system_medium', $format = '', $timezone = NULL, $langcode = NULL) {
   // Use the advanced drupal_static() pattern, since this is called very often.
   static $drupal_static_fast;
   if (!isset($drupal_static_fast)) {
@@ -1943,58 +1943,15 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
     $langcode = language(LANGUAGE_TYPE_INTERFACE)->langcode;
   }
 
-  switch ($type) {
-    case 'short':
-      $format = variable_get('date_format_short', 'm/d/Y - H:i');
-      break;
-
-    case 'long':
-      $format = variable_get('date_format_long', 'l, F j, Y - H:i');
-      break;
-
-    case 'html_datetime':
-      $format = variable_get('date_format_html_datetime', 'Y-m-d\TH:i:sO');
-      break;
-
-    case 'html_date':
-      $format = variable_get('date_format_html_date', 'Y-m-d');
-      break;
-
-    case 'html_time':
-      $format = variable_get('date_format_html_time', 'H:i:s');
-      break;
-
-    case 'html_yearless_date':
-      $format = variable_get('date_format_html_yearless_date', 'm-d');
-      break;
-
-    case 'html_week':
-      $format = variable_get('date_format_html_week', 'Y-\WW');
-      break;
-
-    case 'html_month':
-      $format = variable_get('date_format_html_month', 'Y-m');
-      break;
-
-    case 'html_year':
-      $format = variable_get('date_format_html_year', 'Y');
-      break;
-
-    case 'custom':
-      // No change to format.
-      break;
-
-    case 'medium':
-    default:
-      // Retrieve the format of the custom $type passed.
-      if ($type != 'medium') {
-        $format = variable_get('date_format_' . $type, '');
-      }
-      // Fall back to 'medium'.
-      if ($format === '') {
-        $format = variable_get('date_format_medium', 'D, m/d/Y - H:i');
-      }
-      break;
+  // if we have an incoming custom date format use the provided date format pattern.
+  if ($type != 'custom') {
+    $format = config('system.date')->get('formats.' . $type . '.pattern');
+    // Fall back too system_medium if a value was not found.
+    if (!isset($format)) {
+      $format = config('system.date')->get('formats.system_medium.pattern');
+    }
+    // Use the appropriate server pattern.
+    $format = system_get_date_format_pattern($format);
   }
 
   // Create a DateTime object from the timestamp.
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 6956f04..9a73342 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -2963,7 +2963,8 @@ function form_process_date($element) {
   $element['#tree'] = TRUE;
 
   // Determine the order of day, month, year in the site's chosen date format.
-  $format = variable_get('date_format_short', 'm/d/Y - H:i');
+  $format = config('system.date')->get('formats.system_short.pattern');
+  $format = system_get_date_format_pattern($format);
   $sort = array();
   $sort['day'] = max(strpos($format, 'd'), strpos($format, 'j'));
   $sort['month'] = max(strpos($format, 'm'), strpos($format, 'M'));
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 3968682..3530864 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1933,7 +1933,7 @@ function _install_configure_form($form, &$form_state, &$install_state) {
     '#type' => 'select',
     '#title' => st('Default country'),
     '#empty_value' => '',
-    '#default_value' => variable_get('site_default_country', NULL),
+    '#default_value' => config('system.date')->get('country.default'),
     '#options' => $countries,
     '#description' => st('Select the default country for the site.'),
     '#weight' => 0,
@@ -1999,8 +1999,10 @@ function install_configure_form_submit($form, &$form_state) {
     ->set('mail', $form_state['values']['site_mail'])
     ->save();
 
-  variable_set('date_default_timezone', $form_state['values']['date_default_timezone']);
-  variable_set('site_default_country', $form_state['values']['site_default_country']);
+  config('system.date')
+    ->set('timezone.default', $form_state['values']['date_default_timezone'])
+    ->set('country.default', $form_state['values']['site_default_country'])
+    ->save();
 
   // Enable update.module if this option was selected.
   if ($form_state['values']['update_status_module'][1]) {
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 0c35b90..cc29a98 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1721,9 +1721,7 @@ function theme_links($variables) {
  *     the dropbutton menu. Properties used: #children.
  */
 function theme_dropbutton_wrapper($variables) {
-  if (!empty($variables['element']['#children'])) {
-    return '<div class="dropbutton-wrapper"><div class="dropbutton-widget">' . $variables['element']['#children'] . '</div></div>';
-  }
+  return '<div class="dropbutton-wrapper"><div class="dropbutton-widget">' . $variables['element']['#children'] . '</div></div>';
 }
 
 /**
diff --git a/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php
index 1e22fdc..78a1af6 100644
--- a/core/lib/Drupal/Core/Config/FileStorage.php
+++ b/core/lib/Drupal/Core/Config/FileStorage.php
@@ -53,7 +53,7 @@ public function __construct($directory) {
    *   The path to the configuration file.
    */
   public function getFilePath($name) {
-    return $this->directory . '/' . $name . '.' . static::getFileExtension();
+    return $this->directory . '/' . $name . '.' . self::getFileExtension();
   }
 
   /**
@@ -189,7 +189,7 @@ public function listAll($prefix = '') {
     if (!file_exists($this->directory)) {
       throw new StorageException($this->directory . '/ not found.');
     }
-    $extension = '.' . static::getFileExtension();
+    $extension = '.' . self::getFileExtension();
     $files = glob($this->directory . '/' . $prefix . '*' . $extension);
     $clean_name = function ($value) use ($extension) {
       return basename($value, $extension);
diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php
index eceef01..f232f63 100644
--- a/core/lib/Drupal/Core/Config/InstallStorage.php
+++ b/core/lib/Drupal/Core/Config/InstallStorage.php
@@ -44,7 +44,7 @@ public function getFilePath($name) {
     $path = FALSE;
     foreach (array('profile', 'module', 'theme') as $type) {
       if ($path = drupal_get_path($type, $owner)) {
-        $file = $path . '/config/' . $name . '.' . static::getFileExtension();
+        $file = $path . '/config/' . $name . '.' . self::getFileExtension();
         if (file_exists($file)) {
           return $file;
         }
diff --git a/core/lib/Drupal/Core/ExceptionController.php b/core/lib/Drupal/Core/ExceptionController.php
index 332d4b9..6b073a7 100644
--- a/core/lib/Drupal/Core/ExceptionController.php
+++ b/core/lib/Drupal/Core/ExceptionController.php
@@ -86,7 +86,7 @@ public function execute(FlattenException $exception, Request $request) {
    *   The request object that triggered this exception.
    */
   public function on405Html(FlattenException $exception, Request $request) {
-    return new Response('Method Not Allowed', 405);
+    $event->setResponse(new Response('Method Not Allowed', 405));
   }
 
   /**
diff --git a/core/misc/dropbutton/dropbutton.base-rtl.css b/core/misc/dropbutton/dropbutton.base-rtl.css
index d677c84..917c2a8 100644
--- a/core/misc/dropbutton/dropbutton.base-rtl.css
+++ b/core/misc/dropbutton/dropbutton.base-rtl.css
@@ -7,6 +7,10 @@
 /**
  * The dropbutton arrow.
  */
+.dropbutton-widget {
+  left: 0;
+  right: auto;
+}
 .dropbutton-toggle {
   left: 0;
   right: auto;
@@ -15,7 +19,7 @@
   left: 0.6667em;
   right: auto;
 }
-.js .dropbutton-multiple .dropbutton-widget {
+.dropbutton-multiple .dropbutton-widget {
   padding-left: 2em;
   padding-right: 0;
 }
diff --git a/core/misc/dropbutton/dropbutton.base.css b/core/misc/dropbutton/dropbutton.base.css
index e0aefeb..307484e 100644
--- a/core/misc/dropbutton/dropbutton.base.css
+++ b/core/misc/dropbutton/dropbutton.base.css
@@ -13,28 +13,28 @@
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
-.js .dropbutton-wrapper {
+.dropbutton-wrapper {
   display: block;
   min-height: 2em;
   position: relative;
 }
-.js .dropbutton-wrapper,
-.js .dropbutton-widget {
-  max-width: 100%;
-}
-.js .dropbutton-widget {
+.dropbutton-widget {
   position: absolute;
+  right: 0; /* LTR */
+}
+.dropbutton-wrapper,
+.dropbutton-widget {
+  max-width: 100%;
 }
 /* UL styles are over-scoped in core, so this selector needs weight parity. */
-.js .dropbutton-widget .dropbutton {
+.dropbutton-widget .dropbutton {
   list-style-image: none;
   list-style-type: none;
   margin: 0;
-  overflow: hidden;
   padding: 0;
 }
-.js .dropbutton li,
-.js .dropbutton a {
+.dropbutton li,
+.dropbutton a {
   display: block;
 }
 
@@ -48,7 +48,7 @@
  * The arrow is created using border on a zero-width, zero-height span.
  * The arrow inherits the link color, but can be overridden with border colors.
  */
-.js .dropbutton-multiple .dropbutton-widget {
+.dropbutton-multiple .dropbutton-widget {
   padding-right: 2em; /* LTR */
 }
 .dropbutton-multiple.open,
@@ -97,7 +97,6 @@
   right: 40%; /* 0.6667em; */ /* LTR */
   top: 0.9em;
   width: 0;
-  overflow: hidden;
 }
 .dropbutton-multiple.open .dropbutton-arrow {
   border-bottom: 0.3333em solid;
diff --git a/core/misc/dropbutton/dropbutton.js b/core/misc/dropbutton/dropbutton.js
index daebca2..2bd9cda 100644
--- a/core/misc/dropbutton/dropbutton.js
+++ b/core/misc/dropbutton/dropbutton.js
@@ -59,7 +59,7 @@ function DropButton (dropbutton, settings) {
     var $primary = this.$actions.slice(0,1);
     // Identify the secondary actions.
     var $secondary = this.$actions.slice(1);
-    $secondary.addClass('secondary-action');
+    $($secondary).addClass('secondary-action');
     // Add toggle link.
     $primary.after(Drupal.theme('dropbuttonToggle', options));
     // Bind mouse events.
@@ -73,12 +73,7 @@ function DropButton (dropbutton, settings) {
         /**
          * Clears timeout when mouseout of the dropdown.
          */
-        'mouseenter.dropbutton': $.proxy(this.hoverIn, this),
-        /**
-         * Similar to mouseleave/mouseenter, but for keyboard navigation.
-         */
-        'focusout.dropbutton': $.proxy(this.focusOut, this),
-        'focusin.dropbutton': $.proxy(this.focusIn, this)
+        'mouseenter.dropbutton': $.proxy(this.hoverIn, this)
       });
   }
 }
@@ -130,14 +125,6 @@ $.extend(DropButton.prototype, {
 
   close: function () {
     this.toggle(false);
-  },
-
-  focusOut: function(e) {
-    this.hoverOut.call(this, e);
-  },
-
-  focusIn: function(e) {
-    this.hoverIn.call(this, e);
   }
 });
 
diff --git a/core/misc/dropbutton/dropbutton.theme.css b/core/misc/dropbutton/dropbutton.theme.css
index c0a347f..041724b 100644
--- a/core/misc/dropbutton/dropbutton.theme.css
+++ b/core/misc/dropbutton/dropbutton.theme.css
@@ -4,11 +4,14 @@
  * General styles for dropbuttons.
  */
 
-.js .dropbutton-widget {
+.dropbutton-wrapper {
+  cursor: pointer;
+}
+.dropbutton-widget {
   background-color: white;
   border: 1px solid #cccccc;
 }
-.js .dropbutton-widget:hover {
+.dropbutton-widget:hover {
   border-color: #b8b8b8;
 }
 .dropbutton .dropbutton-action > * {
diff --git a/core/misc/normalize/CHANGELOG.md b/core/misc/normalize/CHANGELOG.md
deleted file mode 100644
index e8a6349..0000000
--- a/core/misc/normalize/CHANGELOG.md
+++ /dev/null
@@ -1,29 +0,0 @@
-== 2.0.1 (August 20, 2012)
-
-* Remove stray IE 6/7 `inline-block` hack from HTML5 display settings.
-
-== 2.0.0 (August 19, 2012)
-
-* Remove legacy browser form normalizations.
-* Remove all list normalizations.
-* Add `quotes` normalizations.
-* Remove all heading normalizations except `h1` font size.
-* Form elements automatically inherit `font-family` from ancestor.
-* Drop support for IE 6/7, Firefox < 4, and Safari < 5.
-
-== 1.0.1 (August 19, 2012)
-
-* Adjust `small` font size normalization.
-
-== 1.0.0 (August 14, 2012)
-
-(Only the notable changes since public release)
-
-* Add MIT License.
-* Hide `audio` elements without controls in iOS 5 (#69).
-* Normalize heading margins and font size.
-* Move font-family normalization from `body` to `html` (#62).
-* Remove scrollbar normalization (#64 #65).
-* Remove excess padding from checkbox and radio inputs in IE 7 (#42).
-* Add IE9 correction for SVG overflow (#16).
-* Add fix for legend not inheriting color in IE 6/7/8/9.
diff --git a/core/misc/normalize/LICENSE.md b/core/misc/normalize/LICENSE.md
deleted file mode 100644
index c6bcc9b..0000000
--- a/core/misc/normalize/LICENSE.md
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) Nicolas Gallagher and Jonathan Neal
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/core/misc/normalize/README.md b/core/misc/normalize/README.md
deleted file mode 100644
index 82f9f5d..0000000
--- a/core/misc/normalize/README.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# normalize.css v2.0.1
-
-Normalize.css is a customisable CSS file that makes browsers render all
-elements more consistently and in line with modern standards. We researched the
-differences between default browser styles in order to precisely target only
-the styles that need normalizing.
-
-[Check out the demo](http://necolas.github.com/normalize.css/2.0.1/test.html)
-
-## What does it do?
-
-* Preserves useful defaults, unlike many CSS resets.
-* Normalizes styles for a wide range of elements.
-* Corrects bugs and common browser inconsistencies.
-* Improves usability with subtle improvements.
-* Explains what code does using detailed comments.
-
-## How to use it
-
-Normalize.css is intended to be used as an alternative to CSS resets.
-
-It's suggested that you read the `normalize.css` file and consider customising
-it to meet your needs. Alternatively, include the file in your project and
-override the defaults later in your CSS.
-
-## Browser support
-
-* Google Chrome
-* Mozilla Firefox 4+
-* Apple Safari 5+
-* Opera 12+
-* Internet Explorer 8+
-
-## Contribute
-
-Please read my [issue
-guidelines](https://github.com/necolas/issue-guidelines).
-
-## Acknowledgements
-
-Normalize.css is a project by [Nicolas Gallagher](http://github.com/necolas)
-and [Jonathan Neal](http://github.com/jonathantneal).
diff --git a/core/misc/normalize/component.json b/core/misc/normalize/component.json
deleted file mode 100644
index 393f61e..0000000
--- a/core/misc/normalize/component.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "name": "normalize-css",
-    "version": "2.0.1",
-    "author": "Nicolas Gallagher",
-    "homepage": "http://necolas.github.com/normalize.css/",
-    "styles": ["normalize.css"],
-    "repository": {
-        "type": "git",
-        "url": "https://github.com/necolas/normalize.css.git"
-    },
-    "licenses": [{
-        "type": "MIT",
-        "url": "http://opensource.org/licenses/MIT"
-    }]
-}
diff --git a/core/misc/normalize/normalize.css b/core/misc/normalize/normalize.css
deleted file mode 100644
index 57b5d26..0000000
--- a/core/misc/normalize/normalize.css
+++ /dev/null
@@ -1,375 +0,0 @@
-/*! normalize.css v2.0.1 | MIT License | git.io/normalize */
-
-/* ==========================================================================
-   HTML5 display definitions
-   ========================================================================== */
-
-/*
- * Corrects `block` display not defined in IE 8/9.
- */
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section,
-summary {
-    display: block;
-}
-
-/*
- * Corrects `inline-block` display not defined in IE 8/9.
- */
-
-audio,
-canvas,
-video {
-    display: inline-block;
-}
-
-/*
- * Prevents modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-
-audio:not([controls]) {
-    display: none;
-    height: 0;
-}
-
-/*
- * Addresses styling for `hidden` attribute not present in IE 8/9.
- */
-
-[hidden] {
-    display: none;
-}
-
-/* ==========================================================================
-   Base
-   ========================================================================== */
-
-/*
- * 1. Sets default font family to sans-serif.
- * 2. Prevents iOS text size adjust after orientation change, without disabling
- *    user zoom.
- */
-
-html {
-    font-family: sans-serif; /* 1 */
-    -webkit-text-size-adjust: 100%; /* 2 */
-    -ms-text-size-adjust: 100%; /* 2 */
-}
-
-/*
- * Removes default margin.
- */
-
-body {
-    margin: 0;
-}
-
-/* ==========================================================================
-   Links
-   ========================================================================== */
-
-/*
- * Addresses `outline` inconsistency between Chrome and other browsers.
- */
-
-a:focus {
-    outline: thin dotted;
-}
-
-/*
- * Improves readability when focused and also mouse hovered in all browsers.
- */
-
-a:active,
-a:hover {
-    outline: 0;
-}
-
-/* ==========================================================================
-   Typography
-   ========================================================================== */
-
-/*
- * Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
- * Safari 5, and Chrome.
- */
-
-h1 {
-    font-size: 2em;
-}
-
-/*
- * Addresses styling not present in IE 8/9, Safari 5, and Chrome.
- */
-
-abbr[title] {
-    border-bottom: 1px dotted;
-}
-
-/*
- * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
- */
-
-b,
-strong {
-    font-weight: bold;
-}
-
-/*
- * Addresses styling not present in Safari 5 and Chrome.
- */
-
-dfn {
-    font-style: italic;
-}
-
-/*
- * Addresses styling not present in IE 8/9.
- */
-
-mark {
-    background: #ff0;
-    color: #000;
-}
-
-
-/*
- * Corrects font family set oddly in Safari 5 and Chrome.
- */
-
-code,
-kbd,
-pre,
-samp {
-    font-family: monospace, serif;
-    font-size: 1em;
-}
-
-/*
- * Improves readability of pre-formatted text in all browsers.
- */
-
-pre {
-    white-space: pre;
-    white-space: pre-wrap;
-    word-wrap: break-word;
-}
-
-/*
- * Sets consistent quote types.
- */
-
-q {
-    quotes: "\201C" "\201D" "\2018" "\2019";
-}
-
-/*
- * Addresses inconsistent and variable font size in all browsers.
- */
-
-small {
-    font-size: 80%;
-}
-
-/*
- * Prevents `sub` and `sup` affecting `line-height` in all browsers.
- */
-
-sub,
-sup {
-    font-size: 75%;
-    line-height: 0;
-    position: relative;
-    vertical-align: baseline;
-}
-
-sup {
-    top: -0.5em;
-}
-
-sub {
-    bottom: -0.25em;
-}
-
-/* ==========================================================================
-   Embedded content
-   ========================================================================== */
-
-/*
- * Removes border when inside `a` element in IE 8/9.
- */
-
-img {
-    border: 0;
-}
-
-/*
- * Corrects overflow displayed oddly in IE 9.
- */
-
-svg:not(:root) {
-    overflow: hidden;
-}
-
-/* ==========================================================================
-   Figures
-   ========================================================================== */
-
-/*
- * Addresses margin not present in IE 8/9 and Safari 5.
- */
-
-figure {
-    margin: 0;
-}
-
-/* ==========================================================================
-   Forms
-   ========================================================================== */
-
-/*
- * Define consistent border, margin, and padding.
- */
-
-fieldset {
-    border: 1px solid #c0c0c0;
-    margin: 0 2px;
-    padding: 0.35em 0.625em 0.75em;
-}
-
-/*
- * 1. Corrects color not being inherited in IE 8/9.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- */
-
-legend {
-    border: 0; /* 1 */
-    padding: 0; /* 2 */
-}
-
-/*
- * 1. Corrects font family not being inherited in all browsers.
- * 2. Corrects font size not being inherited in all browsers.
- * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
- */
-
-button,
-input,
-select,
-textarea {
-    font-family: inherit; /* 1 */
-    font-size: 100%; /* 2 */
-    margin: 0; /* 3 */
-}
-
-/*
- * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
- */
-
-button,
-input {
-    line-height: normal;
-}
-
-/*
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- *    and `video` controls.
- * 2. Corrects inability to style clickable `input` types in iOS.
- * 3. Improves usability and consistency of cursor style between image-type
- *    `input` and others.
- */
-
-button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
-    -webkit-appearance: button; /* 2 */
-    cursor: pointer; /* 3 */
-}
-
-/*
- * Re-set default cursor for disabled elements.
- */
-
-button[disabled],
-input[disabled] {
-    cursor: default;
-}
-
-/*
- * 1. Addresses box sizing set to `content-box` in IE 8/9.
- * 2. Removes excess padding in IE 8/9.
- */
-
-input[type="checkbox"],
-input[type="radio"] {
-    box-sizing: border-box; /* 1 */
-    padding: 0; /* 2 */
-}
-
-/*
- * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
- * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
- *    (include `-moz` to future-proof).
- */
-
-input[type="search"] {
-    -webkit-appearance: textfield; /* 1 */
-    -moz-box-sizing: content-box;
-    -webkit-box-sizing: content-box; /* 2 */
-    box-sizing: content-box;
-}
-
-/*
- * Removes inner padding and search cancel button in Safari 5 and Chrome
- * on OS X.
- */
-
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
-    -webkit-appearance: none;
-}
-
-/*
- * Removes inner padding and border in Firefox 4+.
- */
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-    border: 0;
-    padding: 0;
-}
-
-/*
- * 1. Removes default vertical scrollbar in IE 8/9.
- * 2. Improves readability and alignment in all browsers.
- */
-
-textarea {
-    overflow: auto; /* 1 */
-    vertical-align: top; /* 2 */
-}
-
-/* ==========================================================================
-   Tables
-   ========================================================================== */
-
-/*
- * Remove most spacing between table cells.
- */
-
-table {
-    border-collapse: collapse;
-    border-spacing: 0;
-}
diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc
index 78ca5bc..aacdbd2 100644
--- a/core/modules/aggregator/aggregator.pages.inc
+++ b/core/modules/aggregator/aggregator.pages.inc
@@ -335,7 +335,8 @@ function template_preprocess_aggregator_item(&$variables) {
     $variables['source_date'] = t('%ago ago', array('%ago' => format_interval(REQUEST_TIME - $item->timestamp)));
   }
   else {
-    $variables['source_date'] = format_date($item->timestamp, 'custom', variable_get('date_format_medium', 'D, m/d/Y - H:i'));
+    $format = config('system.date')->get('formats.system_medium.pattern');
+    $variables['source_date'] = format_date($item->timestamp, 'custom', system_get_date_format_pattern($format));
   }
 
   $variables['categories'] = array();
diff --git a/core/modules/comment/comment.admin.inc b/core/modules/comment/comment.admin.inc
index 26e9c8b..2736e7d 100644
--- a/core/modules/comment/comment.admin.inc
+++ b/core/modules/comment/comment.admin.inc
@@ -128,7 +128,7 @@ function comment_admin_overview($form, &$form_state, $arg) {
           '#href' => 'node/' . $comment->nid,
         ),
       ),
-      'changed' => format_date($comment->changed, 'short'),
+      'changed' => format_date($comment->changed, 'system_short'),
     );
     $links = array();
     $links['edit'] = array(
diff --git a/core/modules/comment/comment.tokens.inc b/core/modules/comment/comment.tokens.inc
index c77cb67..b15d79e 100644
--- a/core/modules/comment/comment.tokens.inc
+++ b/core/modules/comment/comment.tokens.inc
@@ -186,11 +186,11 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
           break;
 
         case 'created':
-          $replacements[$original] = format_date($comment->created, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($comment->created, 'system_medium', '', NULL, $langcode);
           break;
 
         case 'changed':
-          $replacements[$original] = format_date($comment->changed, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($comment->changed, 'system_medium', '', NULL, $langcode);
           break;
 
         case 'node':
diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc
index 3b56f45..2f45565 100644
--- a/core/modules/dblog/dblog.admin.inc
+++ b/core/modules/dblog/dblog.admin.inc
@@ -63,7 +63,7 @@ function dblog_overview() {
         // Cells
         array('class' => 'icon'),
         t($dblog->type),
-        format_date($dblog->timestamp, 'short'),
+        format_date($dblog->timestamp, 'system_short'),
         theme('dblog_message', array('event' => $dblog, 'link' => TRUE)),
         theme('username', array('account' => $dblog)),
         filter_xss($dblog->link),
@@ -162,7 +162,7 @@ function dblog_event($id) {
       ),
       array(
         array('data' => t('Date'), 'header' => TRUE),
-        format_date($dblog->timestamp, 'long'),
+        format_date($dblog->timestamp, 'system_long'),
       ),
       array(
         array('data' => t('User'), 'header' => TRUE),
diff --git a/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php b/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
index 44023ce..0abb5d9 100644
--- a/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
+++ b/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
@@ -69,7 +69,6 @@ public function execute() {
     $entity_tables[$base_table] = drupal_get_schema($base_table);
     $sqlQuery = $this->connection->select($base_table, 'base_table', array('conjunction' => $this->conjunction));
     $sqlQuery->addMetaData('configurable_fields', $configurable_fields);
-    $sqlQuery->addMetaData('entity_type', $entity_type);
     // Determines the key of the column to join on. This is either the entity
     // id key or the revision id key, depending on whether the entity type
     // supports revisions.
diff --git a/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php b/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php
index 7ba89b3..068b26c 100644
--- a/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php
+++ b/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php
@@ -129,8 +129,7 @@ protected function ensureFieldTable(&$field_name, $type, $langcode) {
       if ($field['cardinality'] != 1) {
         $this->sqlQuery->addMetaData('simple_query', FALSE);
       }
-      $entity_type = $this->sqlQuery->getMetaData('entity_type');
-      $this->fieldTables[$field_name] = $this->addJoin($type, $table, "%alias.$field_id_field = base_table.$entity_id_field AND %alias.entity_type = '$entity_type'", $langcode);
+      $this->fieldTables[$field_name] = $this->addJoin($type, $table, "%alias.$field_id_field = base_table.$entity_id_field", $langcode);
     }
     return $this->fieldTables[$field_name];
   }
diff --git a/core/modules/file/lib/Drupal/file/Tests/FileTokenReplaceTest.php b/core/modules/file/lib/Drupal/file/Tests/FileTokenReplaceTest.php
index 4d56b7b..187c41e 100644
--- a/core/modules/file/lib/Drupal/file/Tests/FileTokenReplaceTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/FileTokenReplaceTest.php
@@ -56,8 +56,8 @@ function testFileTokenReplacement() {
     $tests['[file:mime]'] = check_plain($file->filemime);
     $tests['[file:size]'] = format_size($file->filesize);
     $tests['[file:url]'] = check_plain(file_create_url($file->uri));
-    $tests['[file:timestamp]'] = format_date($file->timestamp, 'medium', '', NULL, $language_interface->langcode);
-    $tests['[file:timestamp:short]'] = format_date($file->timestamp, 'short', '', NULL, $language_interface->langcode);
+    $tests['[file:timestamp]'] = format_date($file->timestamp, 'system_medium', '', NULL, $language_interface->langcode);
+    $tests['[file:timestamp:short]'] = format_date($file->timestamp, 'system_short', '', NULL, $language_interface->langcode);
     $tests['[file:owner]'] = check_plain(user_format_name($this->admin_user));
     $tests['[file:owner:uid]'] = $file->uid;
 
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 3ebe97d..a7587a7 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -573,7 +573,7 @@ function locale_library_info_alter(&$libraries, $module) {
           'ui' => array(
             'datepicker' => array(
               'isRTL' => $language_interface->direction == LANGUAGE_RTL,
-              'firstDay' => variable_get('date_first_day', 0),
+              'firstDay' => config('system.date')->get('first_day'),
             ),
           ),
         ),
diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php b/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php
index fec2bfe..af28e1a 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php
@@ -250,7 +250,7 @@ protected function build_filters(&$form, &$form_state) {
     parent::build_filters($form, $form_state);
     $entity_info = $this->entity_info;
 
-    $selected_bundle = static::getSelected($form_state, array('show', 'type'), 'all', $form['displays']['show']['type']);
+    $selected_bundle = views_ui_get_selected($form_state, array('show', 'type'), 'all', $form['displays']['show']['type']);
 
     // Add the "tagged with" filter to the view.
 
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php
index 592ab99..299a00c 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php
@@ -196,7 +196,7 @@ function testNodeQueryAlterOverride() {
     // $account instead of the global $user, we will log in as
     // noAccessUser2.
     $this->drupalLogin($this->noAccessUser2);
-    state()->set('node_access_test.no_access_uid', $this->noAccessUser->uid);
+    variable_set('node_test_node_access_all_uid', $this->noAccessUser->uid);
     drupal_static_reset('node_access_view_all_nodes');
     try {
       $query = db_select('node', 'mytab')
@@ -211,6 +211,6 @@ function testNodeQueryAlterOverride() {
     catch (Exception $e) {
       $this->fail(t('Altered query is malformed'));
     }
-    state()->delete('node_access_test.no_access_uid');
+    variable_del('node_test_node_access_all_uid');
   }
 }
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc
index 2ca2d3e..ca80d2c 100644
--- a/core/modules/node/node.admin.inc
+++ b/core/modules/node/node.admin.inc
@@ -539,7 +539,7 @@ function node_admin_nodes() {
       'type' => check_plain(node_get_type_label($node)),
       'author' => theme('username', array('account' => $node)),
       'status' => $node->status ? t('published') : t('not published'),
-      'changed' => format_date($node->changed, 'short'),
+      'changed' => format_date($node->changed, 'system_short'),
     );
     if ($multilingual) {
       $options[$node->nid]['language_name'] = language_name($node->langcode);
diff --git a/core/modules/node/node.install b/core/modules/node/node.install
index 9e1ee1b..fa88007 100644
--- a/core/modules/node/node.install
+++ b/core/modules/node/node.install
@@ -485,7 +485,7 @@ function node_uninstall() {
   variable_del('node_rank_recent');
 
   // Delete remaining general module variables.
-  state()->delete('node.node_access_needs_rebuild');
+  variable_del('node_access_needs_rebuild');
   variable_del('node_admin_theme');
   variable_del('node_cron_last');
   variable_del('node_recent_block_count');
@@ -720,15 +720,6 @@ function node_update_8009() {
 }
 
 /**
- * Moves node_access_needs_rebuild from variable to state.
- *
- * @ingroup config_upgrade
- */
-function node_update_8010() {
-  update_variables_to_state(array('node_access_needs_rebuild' => 'node.node_access_needs_rebuild'));
-}
-
-/**
  * @} End of "addtogroup updates-7.x-to-8.x"
  * The next series of updates should start at 9000.
  */
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 5c11424..e44f43c 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -3219,13 +3219,13 @@ function _node_access_write_grants(Node $node, $grants, $realm = NULL, $delete =
  */
 function node_access_needs_rebuild($rebuild = NULL) {
   if (!isset($rebuild)) {
-    return state()->get('node.node_access_needs_rebuild') ?: FALSE;
+    return variable_get('node_access_needs_rebuild', FALSE);
   }
   elseif ($rebuild) {
-    state()->set('node.node_access_needs_rebuild', TRUE);
+    variable_set('node_access_needs_rebuild', TRUE);
   }
   else {
-    state()->delete('node.node_access_needs_rebuild');
+    variable_del('node_access_needs_rebuild');
   }
 }
 
diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc
index eef3d42..b5571bb 100644
--- a/core/modules/node/node.pages.inc
+++ b/core/modules/node/node.pages.inc
@@ -269,13 +269,13 @@ function node_revision_overview($node) {
   foreach ($revisions as $revision) {
     $row = array();
     if ($revision->current_vid > 0) {
-      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid"), '!username' => theme('username', array('account' => $revision))))
+      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'system_short'), "node/$node->nid"), '!username' => theme('username', array('account' => $revision))))
                                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : ''),
                      'class' => array('revision-current'));
       $row[] = array('data' => drupal_placeholder(t('current revision')), 'class' => array('revision-current'));
     }
     else {
-      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision))))
+      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'system_short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision))))
                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : '');
       if ($revert_permission) {
         $links['revert'] = array(
diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc
index 0bd1000..09aa1c6 100644
--- a/core/modules/node/node.tokens.inc
+++ b/core/modules/node/node.tokens.inc
@@ -163,11 +163,11 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
           break;
 
         case 'created':
-          $replacements[$original] = format_date($node->created, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($node->created, 'system_medium', '', NULL, $langcode);
           break;
 
         case 'changed':
-          $replacements[$original] = format_date($node->changed, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($node->changed, 'system_medium', '', NULL, $langcode);
           break;
       }
     }
diff --git a/core/modules/node/tests/modules/node_access_test/node_access_test.module b/core/modules/node/tests/modules/node_access_test/node_access_test.module
index 0fbbdc9..ed665c4 100644
--- a/core/modules/node/tests/modules/node_access_test/node_access_test.module
+++ b/core/modules/node/tests/modules/node_access_test/node_access_test.module
@@ -19,9 +19,7 @@ function node_access_test_node_grants($account, $op) {
   if ($op == 'view' && user_access('node test view', $account)) {
     $grants['node_access_test'] = array(8888, 8889);
   }
-
-  $no_access_uid = state()->get('node_access_test.no_access_uid') ?: 0;
-  if ($op == 'view' && $account->uid == $no_access_uid) {
+  if ($op == 'view' && $account->uid == variable_get('node_test_node_access_all_uid', 0)) {
     $grants['node_access_all'] = array(0);
   }
   return $grants;
diff --git a/core/modules/openid/lib/Drupal/openid/Tests/OpenIDRegistrationTest.php b/core/modules/openid/lib/Drupal/openid/Tests/OpenIDRegistrationTest.php
index debb9cd..9822ff9 100644
--- a/core/modules/openid/lib/Drupal/openid/Tests/OpenIDRegistrationTest.php
+++ b/core/modules/openid/lib/Drupal/openid/Tests/OpenIDRegistrationTest.php
@@ -41,8 +41,11 @@ function setUp() {
    */
   function testRegisterUserWithEmailVerification() {
     config('user.settings')->set('verify_mail', TRUE)->save();
-    variable_get('configurable_timezones', 1);
-    variable_set('date_default_timezone', 'Europe/Brussels');
+
+    config('system.date')
+      ->set('timezone.user.configurable', 1)
+      ->set('timezone.default', 'Europe/Brussels')
+      ->save();
 
     // Tell openid_test.module to respond with these SREG fields.
     variable_set('openid_test_response', array(
@@ -98,8 +101,11 @@ function testRegisterUserWithEmailVerification() {
    */
   function testRegisterUserWithoutEmailVerification() {
     config('user.settings')->set('verify_mail', FALSE)->save();
-    variable_get('configurable_timezones', 1);
-    variable_set('date_default_timezone', 'Europe/Brussels');
+
+    config('system.date')
+      ->set('timezone.user.configurable', 1)
+      ->set('timezone.default', 'Europe/Brussels')
+      ->save();
 
     // Tell openid_test.module to respond with these SREG fields.
     variable_set('openid_test_response', array(
@@ -139,8 +145,10 @@ function testRegisterUserWithoutEmailVerification() {
    * information (a username that is already taken, and no e-mail address).
    */
   function testRegisterUserWithInvalidSreg() {
-    variable_get('configurable_timezones', 1);
-    variable_set('date_default_timezone', 'Europe/Brussels');
+    config('system.date')
+      ->set('timezone.user.configurable', 1)
+      ->set('timezone.default', 'Europe/Brussels')
+      ->save();
 
     // Tell openid_test.module to respond with these SREG fields.
     $web_user = $this->drupalCreateUser(array());
@@ -190,7 +198,6 @@ function testRegisterUserWithInvalidSreg() {
    * information (i.e. no username or e-mail address).
    */
   function testRegisterUserWithoutSreg() {
-    variable_get('configurable_timezones', 1);
 
     // Load the front page to get the user login block.
     $this->drupalGet('');
@@ -230,7 +237,9 @@ function testRegisterUserWithoutSreg() {
    */
   function testRegisterUserWithAXButNoSREG() {
     config('user.settings')->set('verify_mail', FALSE)->save();
-    variable_set('date_default_timezone', 'Europe/Brussels');
+    config('system.date')
+      ->set('timezone.default', 'Europe/Brussels')
+      ->save();
 
     // Tell openid_test.module to respond with these AX fields.
     variable_set('openid_test_response', array(
diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc
index b6a1930..9d99063 100644
--- a/core/modules/search/search.pages.inc
+++ b/core/modules/search/search.pages.inc
@@ -122,7 +122,7 @@ function template_preprocess_search_result(&$variables) {
     $info['user'] = $result['user'];
   }
   if (!empty($result['date'])) {
-    $info['date'] = format_date($result['date'], 'short');
+    $info['date'] = format_date($result['date'], 'system_short');
   }
   if (isset($result['extra']) && is_array($result['extra'])) {
     $info = array_merge($info, $result['extra']);
diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php
index 0b5909d..dd25d52 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php
@@ -46,7 +46,7 @@ function testStatisticsTokenReplacement() {
     $tests['[node:total-count]'] = 1;
     $tests['[node:day-count]'] = 1;
     $tests['[node:last-view]'] = format_date($statistics['timestamp']);
-    $tests['[node:last-view:short]'] = format_date($statistics['timestamp'], 'short');
+    $tests['[node:last-view:short]'] = format_date($statistics['timestamp'], 'system_short');
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
diff --git a/core/modules/system/config/system.date.yml b/core/modules/system/config/system.date.yml
new file mode 100644
index 0000000..3565022
--- /dev/null
+++ b/core/modules/system/config/system.date.yml
@@ -0,0 +1,60 @@
+first_day: '0'
+country:
+  default: ''
+timezone:
+  default: ''
+  user:
+    configurable: '1'
+    default: '0'
+    warn: '0'
+formats:
+  system_long:
+    name: 'Default Long Date'
+    pattern:
+      php: 'l, F j, Y - H:i'
+    locked: 0
+  system_medium:
+    name: 'Default Medium Date'
+    pattern:
+      php: 'D, m/d/Y - H:i'
+    locked: 0
+  system_short:
+    name: 'Default Short Date'
+    pattern:
+      php: 'm/d/Y - H:i'
+    locked: 0
+  html_datetime:
+    name: 'HTML Datetime'
+    pattern:
+      php: 'Y-m-d\TH:i:sO'
+    locked: 1
+  html_date:
+    name: 'HTML Date'
+    pattern:
+      php: 'Y-m-d'
+    locked: 1
+  html_time:
+    name: 'HTML Time'
+    pattern:
+      php: 'H:i:s'
+    locked: 1
+  html_yearless_date:
+    name: 'HTML Yearless date'
+    pattern:
+      php: 'm-d'
+    locked: 1
+  html_week:
+    name: 'HTML Week'
+    pattern:
+      php: 'Y-\WW'
+    locked: 1
+  html_month:
+    name: 'HTML Month'
+    pattern:
+      php: 'Y-m'
+    locked: 1
+  html_year:
+    name: 'HTML Year'
+    pattern:
+     php: 'Y'
+    locked: 1
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
index d3cd9e6..5b73eac 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
@@ -35,15 +35,19 @@ public static function getInfo() {
   }
 
   function setUp() {
-    parent::setUp();
-    variable_set('configurable_timezones', 1);
-    variable_set('date_format_long', 'l, j. F Y - G:i');
-    variable_set('date_format_medium', 'j. F Y - G:i');
-    variable_set('date_format_short', 'Y M j - g:ia');
+    parent::setUp('language');
+    config('system.date')
+      ->set('timezone.user.configurable', 1)
+      ->set('formats.system_long.pattern.php', 'l, j. F Y - G:i')
+      ->set('formats.system_medium.pattern.php', 'j. F Y - G:i')
+      ->set('formats.system_short.pattern.php', 'Y M j - g:ia')
+      ->save();
+
     variable_set('locale_custom_strings_' . self::LANGCODE, array(
       '' => array('Sunday' => 'domingo'),
       'Long month name' => array('March' => 'marzo'),
     ));
+
     $this->refreshVariables();
   }
 
@@ -57,20 +61,16 @@ function testAdminDefinedFormatDate() {
 
     // Add new date format.
     $admin_date_format = 'j M y';
-    $edit = array('date_format' => $admin_date_format);
-    $this->drupalPost('admin/config/regional/date-time/formats/add', $edit, 'Add format');
-
-    // Add new date type.
     $edit = array(
-      'date_type' => 'Example Style',
-      'machine_name' => 'example_style',
-      'date_format' => $admin_date_format,
+      'date_format_id' => 'example_style',
+      'date_format_name' => 'Example Style',
+      'date_format_pattern' => $admin_date_format,
     );
-    $this->drupalPost('admin/config/regional/date-time/types/add', $edit, 'Add date type');
+    $this->drupalPost('admin/config/regional/date-time/formats/add', $edit, t('Add format'));
 
     $timestamp = strtotime('2007-03-10T00:00:00+00:00');
     $this->assertIdentical(format_date($timestamp, 'example_style', '', 'America/Los_Angeles'), '9 Mar 07', 'Test format_date() using an admin-defined date type.');
-    $this->assertIdentical(format_date($timestamp, 'undefined_style'), format_date($timestamp, 'medium'), 'Test format_date() defaulting to medium when $type not found.');
+    $this->assertIdentical(format_date($timestamp, 'undefined_style'), format_date($timestamp, 'system_medium'), 'Test format_date() defaulting to medium when $type not found.');
   }
 
   /**
@@ -123,9 +123,9 @@ function testFormatDate() {
     $this->assertIdentical(format_date($timestamp, 'custom', 'l, d-M-y H:i:s T', 'America/Los_Angeles', 'en'), 'Sunday, 25-Mar-07 17:00:00 PDT', 'Test a different language.');
     $this->assertIdentical(format_date($timestamp, 'custom', 'l, d-M-y H:i:s T', 'Europe/London'), 'Monday, 26-Mar-07 01:00:00 BST', 'Test a different time zone.');
     $this->assertIdentical(format_date($timestamp, 'custom', 'l, d-M-y H:i:s T'), 'domingo, 25-Mar-07 17:00:00 PDT', 'Test custom date format.');
-    $this->assertIdentical(format_date($timestamp, 'long'), 'domingo, 25. marzo 2007 - 17:00', 'Test long date format.');
-    $this->assertIdentical(format_date($timestamp, 'medium'), '25. marzo 2007 - 17:00', 'Test medium date format.');
-    $this->assertIdentical(format_date($timestamp, 'short'), '2007 Mar 25 - 5:00pm', 'Test short date format.');
+    $this->assertIdentical(format_date($timestamp, 'system_long'), 'domingo, 25. marzo 2007 - 17:00', 'Test long date format.');
+    $this->assertIdentical(format_date($timestamp, 'system_medium'), '25. marzo 2007 - 17:00', 'Test medium date format.');
+    $this->assertIdentical(format_date($timestamp, 'system_short'), '2007 Mar 25 - 5:00pm', 'Test short date format.');
     $this->assertIdentical(format_date($timestamp), '25. marzo 2007 - 17:00', 'Test default date format.');
     // Test HTML time element formats.
     $this->assertIdentical(format_date($timestamp, 'html_datetime'), '2007-03-25T17:00:00-0700', 'Test html_datetime date format.');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php
index a7afcc6..d146494 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php
@@ -367,37 +367,6 @@ protected function testTableSort() {
     $this->assertResult(range(15, 1));
   }
 
-  /**
-   * Test entity count query.
-   */
-  protected function testCount() {
-    // Attach the existing 'figures' field to a second entity type so that we
-    // can test whether cross entity type fields produce the correct query.
-    $field_name = $this->figures;
-    $bundle = $this->randomName();
-    $instance = array(
-      'field_name' => $field_name,
-      'entity_type' => 'test_entity_bundle',
-      'bundle' => $bundle,
-    );
-    field_create_instance($instance);
-
-    $entity = entity_create('test_entity_bundle', array(
-      'ftid' => 1,
-      'fttype' => $bundle,
-    ));
-    $entity->enforceIsNew();
-    $entity->setNewRevision();
-    $entity->save();
-    // As the single entity of this type we just saved does not have a value
-    // in the color field, the result should be 0.
-    $count = $this->factory->get('test_entity_bundle')
-      ->exists("$field_name.color")
-      ->count()
-      ->execute();
-     $this->assertFalse($count);
-  }
-
   protected function assertResult() {
     $assert = array();
     $expected = func_get_args();
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php b/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php
index 10f49b9..172973d 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php
@@ -19,7 +19,7 @@ class DateFormatsLanguageTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('node', 'language');
+  public static $modules = array('node', 'locale');
 
   public static function getInfo() {
     return array(
@@ -57,20 +57,39 @@ function testLocalizeDateFormats() {
     );
     $this->drupalPost('admin/config/regional/language/detection', $edit, t('Save settings'));
 
+    // Add new date format for French.
+    $edit = array(
+      'date_format_id' => 'example_style_fr',
+      'date_format_name' => 'Example Style',
+      'date_format_pattern' => 'd.m.Y - H:i',
+      'date_langcode[]' => array('fr'),
+    );
+    $this->drupalPost('admin/config/regional/date-time/formats/add', $edit, t('Add format'));
+
+    // Add new date format for English.
+    $edit = array(
+      'date_format_id' => 'example_style_en',
+      'date_format_name' => 'Example Style',
+      'date_format_pattern' => 'j M Y - g:ia',
+      'date_langcode[]' => array('en'),
+    );
+    $this->drupalPost('admin/config/regional/date-time/formats/add', $edit, t('Add format'));
+
     // Configure date formats.
     $this->drupalGet('admin/config/regional/date-time/locale');
     $this->assertText('French', 'Configured languages appear.');
     $edit = array(
-      'date_format_long' => 'd.m.Y - H:i',
-      'date_format_medium' => 'd.m.Y - H:i',
-      'date_format_short' => 'd.m.Y - H:i',
+      'date_format_system_long' => 'example_style_fr',
+      'date_format_system_medium' => 'example_style_fr',
+      'date_format_system_short' => 'example_style_fr',
     );
     $this->drupalPost('admin/config/regional/date-time/locale/fr/edit', $edit, t('Save configuration'));
     $this->assertText(t('Configuration saved.'), 'French date formats updated.');
+
     $edit = array(
-      'date_format_long' => 'j M Y - g:ia',
-      'date_format_medium' => 'j M Y - g:ia',
-      'date_format_short' => 'j M Y - g:ia',
+      'date_format_system_long' => 'example_style_en',
+      'date_format_system_medium' => 'example_style_en',
+      'date_format_system_short' => 'example_style_en',
     );
     $this->drupalPost('admin/config/regional/date-time/locale/en/edit', $edit, t('Save configuration'));
     $this->assertText(t('Configuration saved.'), 'English date formats updated.');
@@ -85,5 +104,10 @@ function testLocalizeDateFormats() {
     $this->drupalGet('fr/node/' . $node->nid);
     $french_date = format_date($node->created, 'custom', 'd.m.Y');
     $this->assertText($french_date, 'French date format appears');
+
+    // Make sure we can reset dates back to default.
+    $this->drupalPost('admin/config/regional/date-time/locale/en/reset', array(), t('Reset'));
+    $this->drupalGet('node/' . $node->nid);
+    $this->assertNoText($english_date, 'English date format does not appear');
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php
index 8483da2..53dccbe 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php
@@ -38,15 +38,16 @@ function setUp() {
     $this->drupalLogin($this->admin_user);
   }
 
-
   /**
    * Test time zones and DST handling.
    */
   function testTimeZoneHandling() {
     // Setup date/time settings for Honolulu time.
-    variable_set('date_default_timezone', 'Pacific/Honolulu');
-    variable_set('configurable_timezones', 0);
-    variable_set('date_format_medium', 'Y-m-d H:i:s O');
+    $config = config('system.date')
+      ->set('timezone.default', 'Pacific/Honolulu')
+      ->set('timezone.user.configurable', 0)
+      ->set('formats.system_medium.pattern.php', 'Y-m-d H:i:s O')
+      ->save();
 
     // Create some nodes with different authored-on dates.
     $date1 = '2007-01-31 21:00:00 -1000';
@@ -61,7 +62,7 @@ function testTimeZoneHandling() {
     $this->assertText('2007-07-31 21:00:00 -1000', 'Date should be identical, with GMT offset of -10 hours.');
 
     // Set time zone to Los Angeles time.
-    variable_set('date_default_timezone', 'America/Los_Angeles');
+    $config->set('timezone.default', 'America/Los_Angeles')->save();
 
     // Confirm date format and time zone.
     $this->drupalGet("node/$node1->nid");
@@ -71,64 +72,33 @@ function testTimeZoneHandling() {
   }
 
   /**
-   * Test date type configuration.
-   */
-  function testDateTypeConfiguration() {
-    // Confirm system date types appear.
-    $this->drupalGet('admin/config/regional/date-time');
-    $this->assertText(t('Medium'), 'System date types appear in date type list.');
-    $this->assertNoRaw('href="/admin/config/regional/date-time/types/medium/delete"', 'No delete link appear for system date types.');
-
-    // Add custom date type.
-    $this->clickLink(t('Add date type'));
-    $date_type = strtolower($this->randomName(8));
-    $machine_name = 'machine_' . $date_type;
-    $date_format = 'd.m.Y - H:i';
-    $edit = array(
-      'date_type' => $date_type,
-      'machine_name' => $machine_name,
-      'date_format' => $date_format,
-    );
-    $this->drupalPost('admin/config/regional/date-time/types/add', $edit, t('Add date type'));
-    $this->assertEqual($this->getUrl(), url('admin/config/regional/date-time', array('absolute' => TRUE)), 'Correct page redirection.');
-    $this->assertText(t('New date type added successfully.'), 'Date type added confirmation message appears.');
-    $this->assertText($date_type, 'Custom date type appears in the date type list.');
-    $this->assertText(t('delete'), 'Delete link for custom date type appears.');
-
-    // Delete custom date type.
-    $this->clickLink(t('delete'));
-    $this->drupalPost('admin/config/regional/date-time/types/' . $machine_name . '/delete', array(), t('Remove'));
-    $this->assertEqual($this->getUrl(), url('admin/config/regional/date-time', array('absolute' => TRUE)), 'Correct page redirection.');
-    $this->assertText(t('Removed date type ' . $date_type), 'Custom date type removed.');
-  }
-
-  /**
    * Test date format configuration.
    */
   function testDateFormatConfiguration() {
     // Confirm 'no custom date formats available' message appears.
     $this->drupalGet('admin/config/regional/date-time/formats');
-    $this->assertText(t('No custom date formats available.'), 'No custom date formats message appears.');
 
     // Add custom date format.
     $this->clickLink(t('Add format'));
+    $date_format_id = strtolower($this->randomName(8));
+    $name = ucwords($date_format_id);
+    $date_format = 'd.m.Y - H:i';
     $edit = array(
-      'date_format' => 'Y',
+      'date_format_id' => $date_format_id,
+      'date_format_name' => $name,
+      'date_format_pattern' => $date_format,
     );
     $this->drupalPost('admin/config/regional/date-time/formats/add', $edit, t('Add format'));
     $this->assertEqual($this->getUrl(), url('admin/config/regional/date-time/formats', array('absolute' => TRUE)), 'Correct page redirection.');
-    $this->assertNoText(t('No custom date formats available.'), 'No custom date formats message does not appear.');
-    $this->assertText(t('Custom date format added.'), 'Custom date format added.');
-
-    // Ensure custom date format appears in date type configuration options.
-    $this->drupalGet('admin/config/regional/date-time');
-    $this->assertRaw('<option value="Y">', 'Custom date format appears in options.');
+    $this->assertText(t('Custom date format updated.'), 'Date format added confirmation message appears.');
+    $this->assertText($date_format_id, 'Custom date format appears in the date format list.');
+    $this->assertText(t('delete'), 'Delete link for custom date format appears.');
 
     // Edit custom date format.
     $this->drupalGet('admin/config/regional/date-time/formats');
     $this->clickLink(t('edit'));
     $edit = array(
-      'date_format' => 'Y m',
+      'date_format_pattern' => 'Y m',
     );
     $this->drupalPost($this->getUrl(), $edit, t('Save format'));
     $this->assertEqual($this->getUrl(), url('admin/config/regional/date-time/formats', array('absolute' => TRUE)), 'Correct page redirection.');
@@ -136,80 +106,37 @@ function testDateFormatConfiguration() {
 
     // Delete custom date format.
     $this->clickLink(t('delete'));
-    $this->drupalPost($this->getUrl(), array(), t('Remove'));
+    $this->drupalPost('admin/config/regional/date-time/formats/' . $date_format_id . '/delete', array(), t('Remove'));
     $this->assertEqual($this->getUrl(), url('admin/config/regional/date-time/formats', array('absolute' => TRUE)), 'Correct page redirection.');
-    $this->assertText(t('Removed date format'), 'Custom date format removed successfully.');
+    $this->assertText(t('Removed date format ' . $name), 'Custom date format removed.');
+
+    // Make sure the date does not exist in config.
+    $date_format = config('system.date')->get('formats.' . $date_format_id);
+    $this->assertIdentical($date_format, NULL);
   }
 
   /**
    * Test if the date formats are stored properly.
    */
   function testDateFormatStorage() {
-    $date_format = array(
-      'type' => 'short',
-      'format' => 'dmYHis',
-      'locked' => 0,
-      'is_new' => 1,
+    $date_format_info = array(
+      'name' => 'testDateFormatStorage Short Format',
+      'pattern' => array('php' => 'dmYHis'),
     );
-    system_date_format_save($date_format);
-
-    $format = db_select('date_formats', 'df')
-      ->fields('df', array('format'))
-      ->condition('type', 'short')
-      ->condition('format', 'dmYHis')
-      ->execute()
-      ->fetchField();
-    $this->verbose($format);
-    $this->assertEqual('dmYHis', $format, 'Unlocalized date format resides in general table.');
-
-    $format = db_select('date_format_locale', 'dfl')
-      ->fields('dfl', array('format'))
-      ->condition('type', 'short')
-      ->condition('format', 'dmYHis')
-      ->execute()
-      ->fetchField();
-    $this->assertFalse($format, 'Unlocalized date format resides not in localized table.');
-
-    // Enable German language
-    $language = new Language(array(
-      'langcode' => 'de',
-      'default' => TRUE,
-    ));
-    language_save($language);
-
-    $date_format = array(
-      'type' => 'short',
-      'format' => 'YMDHis',
-      'locales' => array('de', 'tr'),
-      'locked' => 0,
-      'is_new' => 1,
-    );
-    system_date_format_save($date_format);
-
-    $format = db_select('date_format_locale', 'dfl')
-      ->fields('dfl', array('format'))
-      ->condition('type', 'short')
-      ->condition('format', 'YMDHis')
-      ->condition('language', 'de')
-      ->execute()
-      ->fetchField();
-    $this->assertEqual('YMDHis', $format, 'Localized date format resides in localized table.');
-
-    $format = db_select('date_formats', 'df')
-      ->fields('df', array('format'))
-      ->condition('type', 'short')
-      ->condition('format', 'YMDHis')
-      ->execute()
-      ->fetchField();
-    $this->assertEqual('YMDHis', $format, 'Localized date format resides in general table too.');
-
-    $format = db_select('date_format_locale', 'dfl')
-      ->fields('dfl', array('format'))
-      ->condition('type', 'short')
-      ->condition('format', 'YMDHis')
-      ->condition('language', 'tr')
-      ->execute()
-      ->fetchColumn();
-    $this->assertFalse($format, 'Localized date format for disabled language is ignored.');
+
+    system_date_format_save('test_short', $date_format_info);
+
+    $format = config('system.date')->get('formats.test_short.pattern.php');
+    $this->assertEqual('dmYHis', $format, 'Unlocalized date format resides in general config.');
+
+    $date_format_info['locales'] = array('en');
+
+    system_date_format_save('test_short_en', $date_format_info);
+
+    $format = config('system.date')->get('formats.test_short_en.pattern.php');
+    $this->assertEqual('dmYHis', $format, 'Localized date format resides in general config too.');
+
+    $format = config('locale.config.en.system.date')->get('formats.test_short_en.pattern.php');
+    $this->assertEqual('dmYHis', $format, 'Localized date format resides in localized config.');
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/ExceptionControllerTest.php b/core/modules/system/lib/Drupal/system/Tests/System/ExceptionControllerTest.php
deleted file mode 100644
index 37c8403..0000000
--- a/core/modules/system/lib/Drupal/system/Tests/System/ExceptionControllerTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/**
- * Definition of Drupal\system\Tests\System\ExceptionControllerTest.
- */
-
-namespace Drupal\system\Tests\System;
-
-use \Drupal\Core\ContentNegotiation;
-use \Drupal\Core\ExceptionController;
-use \Drupal\simpletest\UnitTestBase;
-use \Symfony\Component\HttpFoundation\Request;
-use \Symfony\Component\HttpKernel\Exception\FlattenException;
-
-/**
- * Tests exception controller.
- */
-class ExceptionControllerTest extends UnitTestBase {
-
-  public static function getInfo() {
-    return array(
-      'name' => 'Exception controller',
-      'description' => 'Performs tests on the exception handler controller class.',
-      'group' => 'System',
-    );
-  }
-
-  /**
-   * Ensure the execute() method returns a valid response on 405 exceptions.
-   */
-  public function test405HTML() {
-    $exception = new \Exception('Test exception');
-    $flat_exception = FlattenException::create($exception, 405);
-    $exception_controller = new ExceptionController(new ContentNegotiation());
-    $response = $exception_controller->execute($flat_exception, new Request());
-    $this->assertEqual($response->getStatusCode(), 405, 'HTTP status of response is correct.');
-    $this->assertEqual($response->getContent(), 'Method Not Allowed', 'HTTP response body is correct.');
-  }
-}
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
index 3859041..1c367fb 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
@@ -44,7 +44,7 @@ function testTokenReplacement() {
     $target .= check_plain($account->name);
     $target .= format_interval(REQUEST_TIME - $node->created, 2, $language_interface->langcode);
     $target .= check_plain($user->name);
-    $target .= format_date(REQUEST_TIME, 'short', '', NULL, $language_interface->langcode);
+    $target .= format_date(REQUEST_TIME, 'system_short', '', NULL, $language_interface->langcode);
 
     // Test that the clear parameter cleans out non-existent tokens.
     $result = token_replace($source, array('node' => $node), array('langcode' => $language_interface->langcode, 'clear' => TRUE));
@@ -154,9 +154,9 @@ function testSystemDateTokenReplacement() {
 
     // Generate and test tokens.
     $tests = array();
-    $tests['[date:short]'] = format_date($date, 'short', '', NULL, $language_interface->langcode);
-    $tests['[date:medium]'] = format_date($date, 'medium', '', NULL, $language_interface->langcode);
-    $tests['[date:long]'] = format_date($date, 'long', '', NULL, $language_interface->langcode);
+    $tests['[date:short]'] = format_date($date, 'system_short', '', NULL, $language_interface->langcode);
+    $tests['[date:medium]'] = format_date($date, 'system_medium', '', NULL, $language_interface->langcode);
+    $tests['[date:long]'] = format_date($date, 'system_long', '', NULL, $language_interface->langcode);
     $tests['[date:custom:m/j/Y]'] = format_date($date, 'custom', 'm/j/Y', NULL, $language_interface->langcode);
     $tests['[date:since]'] = format_interval((REQUEST_TIME - $date), 2, $language_interface->langcode);
     $tests['[date:raw]'] = filter_xss($date);
diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/StateSystemUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/StateSystemUpgradePathTest.php
index fbd754f..5537083 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/StateSystemUpgradePathTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/StateSystemUpgradePathTest.php
@@ -35,10 +35,6 @@ public function testSystemVariableUpgrade() {
 
     $expected_state = array();
 
-    $expected_state['node.node_access_needs_rebuild'] = array(
-      'value' => TRUE,
-      'variable_name' => 'node_access_needs_rebuild',
-    );
     $expected_state['update.last_check'] = array(
       'value' => 1304208000,
       'variable_name' => 'update_last_check',
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index c55289c..4096665 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -1852,11 +1852,12 @@ function system_rss_feeds_settings_submit($form, &$form_state) {
  * Form builder; Configure the site regional settings.
  *
  * @ingroup forms
- * @see system_settings_form()
+ * @see system_config_form()
  * @see system_regional_settings_submit()
  */
-function system_regional_settings() {
+function system_regional_settings($form, &$form_state) {
   $countries = country_get_list();
+  $system_date = config('system.date');
 
   // Date settings:
   $zones = system_time_zones();
@@ -1870,7 +1871,7 @@ function system_regional_settings() {
     '#type' => 'select',
     '#title' => t('Default country'),
     '#empty_value' => '',
-    '#default_value' => variable_get('site_default_country', ''),
+    '#default_value' => $system_date->get('country.default'),
     '#options' => $countries,
     '#attributes' => array('class' => array('country-detect')),
   );
@@ -1878,7 +1879,7 @@ function system_regional_settings() {
   $form['locale']['date_first_day'] = array(
     '#type' => 'select',
     '#title' => t('First day of week'),
-    '#default_value' => variable_get('date_first_day', 0),
+    '#default_value' => $system_date->get('first_day'),
     '#options' => array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday')),
   );
 
@@ -1887,14 +1888,15 @@ function system_regional_settings() {
     '#title' => t('Time zones'),
   );
 
+  $date_default_timezone = $system_date->get('timezone.default');
   $form['timezone']['date_default_timezone'] = array(
     '#type' => 'select',
     '#title' => t('Default time zone'),
-    '#default_value' => variable_get('date_default_timezone', date_default_timezone_get()),
+    '#default_value' => isset($date_default_timezone) ? $date_default_timezone : date_default_timezone_get(),
     '#options' => $zones,
   );
 
-  $configurable_timezones = variable_get('configurable_timezones', 1);
+  $configurable_timezones = $system_date->get('timezone.user.configurable');
   $form['timezone']['configurable_timezones'] = array(
     '#type' => 'checkbox',
     '#title' => t('Users may set their own time zone.'),
@@ -1914,14 +1916,14 @@ function system_regional_settings() {
   $form['timezone']['configurable_timezones_wrapper']['empty_timezone_message'] = array(
     '#type' => 'checkbox',
     '#title' => t('Remind users at login if their time zone is not set.'),
-    '#default_value' => variable_get('empty_timezone_message', 0),
+    '#default_value' => $system_date->get('timezone.user.warn'),
     '#description' => t('Only applied if users may set their own time zone.')
   );
 
   $form['timezone']['configurable_timezones_wrapper']['user_default_timezone'] = array(
     '#type' => 'radios',
     '#title' => t('Time zone for new users'),
-    '#default_value' => variable_get('user_default_timezone', DRUPAL_USER_TIMEZONE_DEFAULT),
+    '#default_value' => $system_date->get('timezone.user.default'),
     '#options' => array(
       DRUPAL_USER_TIMEZONE_DEFAULT => t('Default time zone.'),
       DRUPAL_USER_TIMEZONE_EMPTY   => t('Empty time zone.'),
@@ -1930,7 +1932,24 @@ function system_regional_settings() {
     '#description' => t('Only applied if users may set their own time zone.')
   );
 
-  return system_settings_form($form);
+  return system_config_form($form, $form_state);
+}
+
+/**
+ * Form builder submit handler; Handle submission for regional settings.
+ *
+ * @ingroup forms
+ * @see system_regional_settings()
+ */
+function system_regional_settings_submit($form, &$form_state) {
+  config('system.date')
+    ->set('country.default', $form_state['values']['site_default_country'])
+    ->set('first_day', $form_state['values']['date_first_day'])
+    ->set('timezone.default', $form_state['values']['date_default_timezone'])
+    ->set('timezone.user.configurable', $form_state['values']['configurable_timezones'])
+    ->set('timezone.user.warn', $form_state['values']['empty_timezone_message'])
+    ->set('timezone.user.default', $form_state['values']['user_default_timezone'])
+    ->save();
 }
 
 /**
@@ -1940,76 +1959,33 @@ function system_regional_settings() {
  * @see system_settings_form()
  */
 function system_date_time_settings() {
-  // Get list of all available date types.
-  drupal_static_reset('system_get_date_types');
-  $format_types = system_get_date_types();
-
-  // Get list of all available date formats.
-  $all_formats = array();
-  drupal_static_reset('system_get_date_formats');
-  $date_formats = system_get_date_formats(); // Call this to rebuild the list, and to have default list.
-  foreach ($date_formats as $type => $format_info) {
-    $all_formats = array_merge($all_formats, $format_info);
-  }
-  $custom_formats = system_get_date_formats('custom');
-  if (!empty($format_types)) {
-    foreach ($format_types as $type => $type_info) {
-      // If a system type, only show the available formats for that type and
-      // custom ones.
-      if ($type_info['locked'] == 1) {
-        $formats = system_get_date_formats($type);
-        if (empty($formats)) {
-          $formats = $all_formats;
-        }
-        elseif (!empty($custom_formats)) {
-          $formats = array_merge($formats, $custom_formats);
-        }
-      }
-      // If a user configured type, show all available date formats.
-      else {
-        $formats = $all_formats;
-      }
+  // Display any user-defined date formats.
+  $date_formats = system_get_date_formats();
 
-      $choices = array();
-      foreach ($formats as $f => $format) {
-        $choices[$f] = format_date(REQUEST_TIME, 'custom', $f);
-      }
-      reset($formats);
-      $default = variable_get('date_format_' . $type, key($formats));
-
-      // Get date type info for this date type.
-      $type_info = system_get_date_types($type);
-      $form['formats']['#theme'] = 'system_date_time_settings';
-
-      // Show date format select list.
-      $form['formats']['format']['date_format_' . $type] = array(
-        '#type' => 'select',
-        '#title' => check_plain($type_info['title']),
-        '#attributes' => array('class' => array('date-format')),
-        '#default_value' => (isset($choices[$default]) ? $default : 'custom'),
-        '#options' => $choices,
-      );
+  $header = array(
+    'machine_name' => array('data' => t('Machine name')),
+    'name' => array('data' => t('Name')),
+    'pattern' => array('data' => t('Date format')),
+    'example' => array('data' => t('Example of use')),
+  );
 
-      $links = array();
-      // If this isn't a system provided type, allow the user to remove it from
-      // the system.
-      if ($type_info['locked'] == 0) {
-        $links['delete'] = array(
-          'title' => t('delete'),
-          'href' => "admin/config/regional/date-time/types/$type/delete",
-        );
-      }
-      $form['formats']['operations']["date_format_$type"] = array(
-        '#type' => 'operations',
-        '#links' => $links,
-      );
-    }
+  $rows = array();
+  foreach ($date_formats as $date_format_id => $format_info) {
+    $pattern = system_get_date_format_pattern($format_info['pattern']);
+    $rows[] = array(
+      $date_format_id,
+      $format_info['name'],
+      $pattern,
+      format_date(REQUEST_TIME, 'custom', $pattern),
+    );
   }
 
-  // Display a message if no date types configured.
-  $form['#empty_text'] = t('No date types available. <a href="@link">Add date type</a>.', array('@link' => url('admin/config/regional/date-time/types/add')));
+  $variables = array(
+    'header' => $header,
+    'rows' => $rows,
+  );
 
-  return system_settings_form($form);
+  return theme('table', $variables);
 }
 
 /**
@@ -2044,97 +2020,6 @@ function theme_system_date_time_settings($variables) {
   return $output;
 }
 
-
-/**
- * Add new date type.
- *
- * @ingroup forms
- * @ingroup system_add_date_format_type_form_validate()
- * @ingroup system_add_date_format_type_form_submit()
- */
-function system_add_date_format_type_form($form, &$form_state) {
-  $form['date_type'] = array(
-    '#title' => t('Date type'),
-    '#type' => 'textfield',
-    '#required' => TRUE,
-  );
-  $form['machine_name'] = array(
-    '#type' => 'machine_name',
-    '#machine_name' => array(
-      'exists' => 'system_get_date_types',
-      'source' => array('date_type'),
-    ),
-  );
-
-  // Get list of all available date formats.
-  $formats = array();
-  drupal_static_reset('system_get_date_formats');
-  $date_formats = system_get_date_formats(); // Call this to rebuild the list, and to have default list.
-  foreach ($date_formats as $type => $format_info) {
-    $formats = array_merge($formats, $format_info);
-  }
-  $custom_formats = system_get_date_formats('custom');
-  if (!empty($custom_formats)) {
-    $formats = array_merge($formats, $custom_formats);
-  }
-  $choices = array();
-  foreach ($formats as $f => $format) {
-    $choices[$f] = format_date(REQUEST_TIME, 'custom', $f);
-  }
-  // Show date format select list.
-  $form['date_format'] = array(
-    '#type' => 'select',
-    '#title' => t('Date format'),
-    '#attributes' => array('class' => array('date-format')),
-    '#options' => $choices,
-    '#required' => TRUE,
-  );
-
-  $form['actions'] = array('#type' => 'actions');
-  $form['actions']['submit'] = array(
-    '#type' => 'submit',
-    '#value' => t('Add date type'),
-  );
-
-  $form['#validate'][] = 'system_add_date_format_type_form_validate';
-  $form['#submit'][] = 'system_add_date_format_type_form_submit';
-
-  return $form;
-}
-
-/**
- * Validate system_add_date_format_type form submissions.
- */
-function system_add_date_format_type_form_validate($form, &$form_state) {
-  if (!empty($form_state['values']['machine_name']) && !empty($form_state['values']['date_type'])) {
-    if (!preg_match("/^[a-zA-Z0-9_]+$/", trim($form_state['values']['machine_name']))) {
-      form_set_error('machine_name', t('The date type must contain only alphanumeric characters and underscores.'));
-    }
-    $types = system_get_date_types();
-    if (in_array(trim($form_state['values']['machine_name']), array_keys($types))) {
-      form_set_error('machine_name', t('This date type already exists. Enter a unique type.'));
-    }
-  }
-}
-
-/**
- * Process system_add_date_format_type form submissions.
- */
-function system_add_date_format_type_form_submit($form, &$form_state) {
-  $machine_name = trim($form_state['values']['machine_name']);
-
-  $format_type = array();
-  $format_type['title'] = trim($form_state['values']['date_type']);
-  $format_type['type'] = $machine_name;
-  $format_type['locked'] = 0;
-  $format_type['is_new'] = 1;
-  system_date_format_type_save($format_type);
-  variable_set('date_format_' . $machine_name, $form_state['values']['date_format']);
-
-  drupal_set_message(t('New date type added successfully.'));
-  $form_state['redirect'] = 'admin/config/regional/date-time';
-}
-
 /**
  * Return the date for a given format string via Ajax.
  */
@@ -2659,16 +2544,19 @@ function theme_system_themes_page($variables) {
 
 /**
  * Menu callback; present a form for deleting a date format.
+ *
+ * @param string $date_format_id
+ *   The machine name for the date format that may be deleted
  */
-function system_date_delete_format_form($form, &$form_state, $dfid) {
-  $form['dfid'] = array(
+function system_date_delete_format_form($form, &$form_state, $date_format_id) {
+  $form['date_format_id'] = array(
     '#type' => 'value',
-    '#value' => $dfid,
+    '#value' => $date_format_id,
   );
-  $format = system_get_date_format($dfid);
-
+  $format = system_get_date_formats($date_format_id);
+  $pattern = system_get_date_format_pattern($format['pattern']);
   $output = confirm_form($form,
-    t('Are you sure you want to remove the format %format?', array('%format' => format_date(REQUEST_TIME, 'custom', $format->format))),
+    t('Are you sure you want to remove the format %name : %format?', array('%name' => $format['name'], '%format' => format_date(REQUEST_TIME, 'custom', $pattern))),
     'admin/config/regional/date-time/formats',
     t('This action cannot be undone.'),
     t('Remove'), t('Cancel'),
@@ -2683,76 +2571,53 @@ function system_date_delete_format_form($form, &$form_state, $dfid) {
  */
 function system_date_delete_format_form_submit($form, &$form_state) {
   if ($form_state['values']['confirm']) {
-    $format = system_get_date_format($form_state['values']['dfid']);
-    system_date_format_delete($form_state['values']['dfid']);
-    drupal_set_message(t('Removed date format %format.', array('%format' => format_date(REQUEST_TIME, 'custom', $format->format))));
+    $format = system_get_date_formats($form_state['values']['date_format_id']);
+    system_date_format_delete($form_state['values']['date_format_id']);
+    drupal_set_message(t('Removed date format %format.', array('%format' => $format['name'])));
     $form_state['redirect'] = 'admin/config/regional/date-time/formats';
   }
 }
 
 /**
- * Menu callback; present a form for deleting a date type.
- */
-function system_delete_date_format_type_form($form, &$form_state, $format_type) {
-  $form['format_type'] = array(
-    '#type' => 'value',
-    '#value' => $format_type,
-  );
-  $type_info = system_get_date_types($format_type);
-
-  $output = confirm_form($form,
-    t('Are you sure you want to remove the date type %type?', array('%type' => $type_info['title'])),
-    'admin/config/regional/date-time',
-    t('This action cannot be undone.'),
-    t('Remove'), t('Cancel'),
-    'confirm'
-  );
-
-  return $output;
-}
-
-/**
- * Delete a configured date type.
- */
-function system_delete_date_format_type_form_submit($form, &$form_state) {
-  if ($form_state['values']['confirm']) {
-    $type_info = system_get_date_types($form_state['values']['format_type']);
-    system_date_format_type_delete($form_state['values']['format_type']);
-    drupal_set_message(t('Removed date type %type.', array('%type' => $type_info['title'])));
-    $form_state['redirect'] = 'admin/config/regional/date-time';
-  }
-}
-
-
-/**
  * Displays the date format strings overview page.
  */
 function system_date_time_formats() {
-  $header = array(t('Format'), t('Operations'));
+  $header = array(
+    array('data' => t('Machine Name'), 'field' => 'machine_name'),
+    array('data' => t('Name'), 'field' => 'name'),
+    array('data' => t('Pattern'), 'field' => 'pattern'),
+    array('data' => t('Operations'))
+  );
   $rows = array();
 
-  drupal_static_reset('system_get_date_formats');
-  $formats = system_get_date_formats('custom');
+  $formats = system_get_date_formats();
+
   if (!empty($formats)) {
-    foreach ($formats as $format) {
-      $row = array();
-      $row[] = array('data' => format_date(REQUEST_TIME, 'custom', $format['format']));
-      $links = array();
-      $links['edit'] = array(
-        'title' => t('edit'),
-        'href' => 'admin/config/regional/date-time/formats/' . $format['dfid'] . '/edit',
-      );
-      $links['delete'] = array(
-        'title' => t('delete'),
-        'href' => 'admin/config/regional/date-time/formats/' . $format['dfid'] . '/delete',
-      );
-      $row[] = array(
-        'data' => array(
+    foreach ($formats as $date_format_id => $format_info) {
+      // Do not display date formats that are locked
+      if (empty($format_info['locked'])) {
+        $row = array();
+        $row[] = array('data' => $date_format_id);
+        $row[] = array('data' => $format_info['name']);
+        $row[] = array('data' => format_date(REQUEST_TIME, 'custom', system_get_date_format_pattern($format_info['pattern'])));
+
+        // Prepare Operational links
+        $links = array();
+        $links['edit'] = array(
+          'title' => t('edit'),
+          'href' => 'admin/config/regional/date-time/formats/' . $date_format_id . '/edit',
+        );
+        $links['delete'] = array(
+          'title' => t('delete'),
+          'href' => 'admin/config/regional/date-time/formats/' . $date_format_id . '/delete',
+        );
+        $row['operations'] = array('data' => array(
           '#type' => 'operations',
           '#links' => $links,
-        ),
-      );
-      $rows[] = $row;
+        ));
+
+        $rows[] = $row;
+      }
     }
   }
 
@@ -2768,13 +2633,17 @@ function system_date_time_formats() {
 
 /**
  * Allow users to add additional date formats.
+ *
+ * @param string $date_format_id (optional)
+ *   When present, provides the machine name of the date format that is being
+ *   modified.
  */
-function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
+function system_configure_date_formats_form($form, &$form_state, $date_format_id = '') {
   $js_settings = array(
     'type' => 'setting',
     'data' => array(
       'dateTime' => array(
-        'date-format' => array(
+        'date-format-pattern' => array(
           'text' => t('Displayed as'),
           'lookup' => url('admin/config/regional/date-time/formats/lookup'),
         ),
@@ -2782,22 +2651,42 @@ function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
     ),
   );
 
-  if ($dfid) {
-    $form['dfid'] = array(
+  if (empty($date_format_id)) {
+    $form['date_format_id'] = array(
+      '#type' => 'machine_name',
+      '#title' => t('Machine-readable name'),
+      '#description' => t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
+      '#machine_name' => array(
+        'exists' => 'system_date_format_exists',
+        'source' => array('machine_name'),
+      ),
+    );
+    $now = '';
+  }
+  else {
+    $form['date_format_id'] = array(
       '#type' => 'value',
-      '#value' => $dfid,
+      '#value' => $date_format_id,
     );
-    $format = system_get_date_format($dfid);
+    $format_info = system_get_date_formats($date_format_id);
+    $pattern = system_get_date_format_pattern($format_info['pattern']);
+    $now = t('Displayed as %date', array('%date' => format_date(REQUEST_TIME, 'custom', $pattern)));
   }
 
-  $now = ($dfid ? t('Displayed as %date', array('%date' => format_date(REQUEST_TIME, 'custom', $format->format))) : '');
+  $form['date_format_name'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Name',
+    '#maxlength' => 100,
+    '#description' => t('Name of the date format'),
+    '#default_value' => empty($format_info['name']) ? '' : $format_info['name']
+  );
 
-  $form['date_format'] = array(
+  $form['date_format_pattern'] = array(
     '#type' => 'textfield',
     '#title' => t('Format string'),
     '#maxlength' => 100,
     '#description' => t('A user-defined date format. See the <a href="@url">PHP manual</a> for available options.', array('@url' => 'http://php.net/manual/function.date.php')),
-    '#default_value' => ($dfid ? $format->format : ''),
+    '#default_value' => empty($pattern) ? '' : $pattern,
     '#field_suffix' => ' <small id="edit-date-format-suffix">' . $now . '</small>',
     '#attached' => array(
       'library' => array(array('system', 'drupal.system')),
@@ -2806,10 +2695,27 @@ function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
     '#required' => TRUE,
   );
 
+  $languages = language_list();
+
+  $options = array();
+  foreach ($languages as $langcode => $data) {
+    $options[$langcode] = $data->name;
+  }
+
+  if (!empty($options)) {
+    $form['date_langcode'] = array(
+      '#title' => t('Select localizations'),
+      '#type' => 'select',
+      '#options' => $options,
+      '#multiple' => TRUE,
+      '#default_value' => empty($format_info['locales']) ? '' : $format_info['locales']
+    );
+  }
+
   $form['actions'] = array('#type' => 'actions');
   $form['actions']['update'] = array(
     '#type' => 'submit',
-    '#value' => ($dfid ? t('Save format') : t('Add format')),
+    '#value' => (!empty($date_format_id) ? t('Save format') : t('Add format')),
   );
 
   $form['#validate'][] = 'system_add_date_formats_form_validate';
@@ -2819,12 +2725,25 @@ function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
 }
 
 /**
+ * Check if the chosen machine_name exists or not
+ */
+function system_date_format_exists($candidate_machine_name) {
+  if ($formats = system_get_date_formats()) {
+    return array_key_exists($candidate_machine_name, $formats);
+  }
+  return FALSE;
+}
+
+/**
  * Validate new date format string submission.
  */
 function system_add_date_formats_form_validate($form, &$form_state) {
-  $formats = system_get_date_formats('custom');
-  $format = trim($form_state['values']['date_format']);
-  if (!empty($formats) && in_array($format, array_keys($formats)) && (!isset($form_state['values']['dfid']) || $form_state['values']['dfid'] != $formats[$format]['dfid'])) {
+  $formats = system_get_date_formats();
+  $format = trim($form_state['values']['date_format_pattern']);
+
+  // The machine name field should already check to see if the requested machine name is available
+  // Regardless of machine_name or human readable name, check to see if the provided pattern exists
+  if (!empty($formats) && in_array($format, array_values($formats)) && (!isset($form_state['values']['date_format_id']) || $form_state['values']['date_format_id'] != $formats[$format]['date_format_id'])) {
     form_set_error('date_format', t('This format already exists. Enter a unique format string.'));
   }
 }
@@ -2833,17 +2752,19 @@ function system_add_date_formats_form_validate($form, &$form_state) {
  * Process new date format string submission.
  */
 function system_add_date_formats_form_submit($form, &$form_state) {
+  $pattern_type = system_get_date_format_pattern_type();
   $format = array();
-  $format['format'] = trim($form_state['values']['date_format']);
-  $format['type'] = 'custom';
+  $format['name'] = check_plain($form_state['values']['date_format_name']);
+  $format['pattern'][$pattern_type] = trim($form_state['values']['date_format_pattern']);
+  $format['locales'] = !empty($form_state['values']['date_langcode']) ? $form_state['values']['date_langcode'] : array();
+  // Formats created in the UI are not locked.
   $format['locked'] = 0;
-  if (!empty($form_state['values']['dfid'])) {
-    system_date_format_save($format, $form_state['values']['dfid']);
+
+  system_date_format_save($form_state['values']['date_format_id'], $format);
+  if (!empty($form_state['values']['date_format_id'])) {
     drupal_set_message(t('Custom date format updated.'));
   }
   else {
-    $format['is_new'] = 1;
-    system_date_format_save($format);
     drupal_set_message(t('Custom date format added.'));
   }
 
@@ -2906,36 +2827,39 @@ function system_date_format_localize_form($form, &$form_state, $langcode) {
     '#value' => $langcode,
   );
 
-  // Get list of date format types.
-  $types = system_get_date_types();
-
   // Get list of available formats.
   $formats = system_get_date_formats();
+
   $choices = array();
-  foreach ($formats as $type => $list) {
-    foreach ($list as $f => $format) {
-      $choices[$f] = format_date(REQUEST_TIME, 'custom', $f);
+  foreach ($formats as $date_format_id => $format_info) {
+    $pattern = system_get_date_format_pattern($format_info['pattern']);
+    // Ignore values that are localized.
+    if (empty($format_info['locales'])) {
+      $choices[$date_format_id] = format_date(REQUEST_TIME, 'custom', $pattern);
+    }
+    else {
+      unset($formats[$date_format_id]);
     }
   }
-  reset($formats);
 
   // Get configured formats for each language.
   $locale_formats = system_date_format_locale($langcode);
-  // Display a form field for each format type.
-  foreach ($types as $type => $type_info) {
-    if (!empty($locale_formats) && in_array($type, array_keys($locale_formats))) {
-      $default = $locale_formats[$type];
-    }
-    else {
-      $default = variable_get('date_format_' . $type, key($formats));
+  if (!empty($locale_formats)) {
+    $formats += $locale_formats;
+    foreach ($locale_formats as $date_format_id => $format_info) {
+      $pattern = system_get_date_format_pattern($format_info['pattern']);
+      $choices[$date_format_id] = format_date(REQUEST_TIME, 'custom', $pattern);
     }
+  }
 
+  // Display a form field for each format type.
+  foreach ($formats as $date_format_id => $format_info) {
     // Show date format select list.
-    $form['date_formats']['date_format_' . $type] = array(
+    $form['date_formats']['date_format_' . $date_format_id] = array(
       '#type' => 'select',
-      '#title' => check_plain($type_info['title']),
+      '#title' => check_plain($format_info['name']),
       '#attributes' => array('class' => array('date-format')),
-      '#default_value' => (isset($choices[$default]) ? $default : 'custom'),
+      '#default_value' => isset($choices[$date_format_id]) ? $date_format_id : 'custom',
       '#options' => $choices,
     );
   }
@@ -2955,14 +2879,12 @@ function system_date_format_localize_form($form, &$form_state, $langcode) {
 function system_date_format_localize_form_submit($form, &$form_state) {
   $langcode = $form_state['values']['langcode'];
 
-  // Get list of date format types.
-  $types = system_get_date_types();
-  foreach ($types as $type => $type_info) {
-    $format = $form_state['values']['date_format_' . $type];
-    if ($format == 'custom') {
-      $format = $form_state['values']['date_format_' . $type . '_custom'];
+  $formats = system_get_date_formats();
+  foreach ($formats as $date_format_id => $format_info) {
+    if (isset($form_state['values']['date_format_' . $date_format_id])) {
+      $format = $form_state['values']['date_format_' . $date_format_id];
+      system_date_format_localize_form_save($langcode, $date_format_id, $formats[$format]['pattern']);
     }
-    system_date_format_localize_form_save($langcode, $type, $format);
   }
   drupal_set_message(t('Configuration saved.'));
   $form_state['redirect'] = 'admin/config/regional/date-time/locale';
@@ -2980,8 +2902,8 @@ function system_date_format_localize_form_submit($form, &$form_state) {
 function theme_system_date_format_localize_form($variables) {
   $form = $variables['form'];
   $header = array(
-    t('Date type'),
-    t('Format'),
+    'machine_name' => t('Machine Name'),
+    'pattern' => t('Format'),
   );
 
   foreach (element_children($form['date_formats']) as $key) {
@@ -3022,9 +2944,8 @@ function system_date_format_localize_reset_form($form, &$form_state, $langcode)
  * Form submission handler for locale_date_format_reset_form().
  */
 function system_date_format_localize_reset_form_submit($form, &$form_state) {
-  db_delete('date_format_locale')
-    ->condition('language', $form_state['values']['langcode'])
-    ->execute();
+  config('locale.config.' . $form['langcode']['#value'] . '.system.date')
+    ->delete();
   $form_state['redirect'] = 'admin/config/regional/date-time/locale';
 }
 
@@ -3034,23 +2955,13 @@ function system_date_format_localize_reset_form_submit($form, &$form_state) {
  * @param $langcode
  *   Language code, can be 2 characters, e.g. 'en' or 5 characters, e.g.
  *   'en-CA'.
- * @param $type
- *   Date format type, e.g. 'short', 'medium'.
+ * @param $date_format_id
+ *   Date format id, e.g. 'short', 'medium'.
  * @param $format
  *   The date format string.
  */
-function system_date_format_localize_form_save($langcode, $type, $format) {
-  $locale_format = array();
-  $locale_format['language'] = $langcode;
-  $locale_format['type'] = $type;
-  $locale_format['format'] = $format;
-
-  $is_existing = (bool) db_query_range('SELECT 1 FROM {date_format_locale} WHERE language = :langcode AND type = :type', 0, 1, array(':langcode' => $langcode, ':type' => $type))->fetchField();
-  if ($is_existing) {
-    $keys = array('type', 'language');
-    drupal_write_record('date_format_locale', $locale_format, $keys);
-  }
-  else {
-    drupal_write_record('date_format_locale', $locale_format);
-  }
+function system_date_format_localize_form_save($langcode, $date_format_id, $format) {
+  config('locale.config.' . $langcode . '.system.date')
+    ->set('formats.' . $date_format_id . '.pattern', $format)
+    ->save();
 }
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 2d09534..9db4b3a 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -3322,143 +3322,6 @@ function hook_archiver_info_alter(&$info) {
 }
 
 /**
- * Define additional date types.
- *
- * Next to the 'long', 'medium' and 'short' date types defined in core, any
- * module can define additional types that can be used when displaying dates,
- * by implementing this hook. A date type is basically just a name for a date
- * format.
- *
- * Date types are used in the administration interface: a user can assign
- * date format types defined in hook_date_formats() to date types defined in
- * this hook. Once a format has been assigned by a user, the machine name of a
- * type can be used in the format_date() function to format a date using the
- * chosen formatting.
- *
- * To define a date type in a module and make sure a format has been assigned to
- * it, without requiring a user to visit the administrative interface, use
- * @code variable_set('date_format_' . $type, $format); @endcode
- * where $type is the machine-readable name defined here, and $format is a PHP
- * date format string.
- *
- * To avoid namespace collisions with date types defined by other modules, it is
- * recommended that each date type starts with the module name. A date type
- * can consist of letters, numbers and underscores.
- *
- * @return
- *   An array of date types where the keys are the machine-readable names and
- *   the values are the human-readable labels.
- *
- * @see hook_date_formats()
- * @see format_date()
- */
-function hook_date_format_types() {
-  // Define the core date format types.
-  return array(
-    'long' => t('Long'),
-    'medium' => t('Medium'),
-    'short' => t('Short'),
-  );
-}
-
-/**
- * Modify existing date types.
- *
- * Allows other modules to modify existing date types like 'long'. Called by
- * _system_date_format_types_build(). For instance, A module may use this hook
- * to apply settings across all date types, such as locking all date types so
- * they appear to be provided by the system.
- *
- * @param $types
- *   A list of date types. Each date type is keyed by the machine-readable name
- *   and the values are associative arrays containing:
- *   - is_new: Set to FALSE to override previous settings.
- *   - module: The name of the module that created the date type.
- *   - type: The machine-readable date type name.
- *   - title: The human-readable date type name.
- *   - locked: Specifies that the date type is system-provided.
- */
-function hook_date_format_types_alter(&$types) {
-  foreach ($types as $name => $type) {
-    $types[$name]['locked'] = 1;
-  }
-}
-
-/**
- * Define additional date formats.
- *
- * This hook is used to define the PHP date format strings that can be assigned
- * to date types in the administrative interface. A module can provide date
- * format strings for the core-provided date types ('long', 'medium', and
- * 'short'), or for date types defined in hook_date_format_types() by itself
- * or another module.
- *
- * Since date formats can be locale-specific, you can specify the locales that
- * each date format string applies to. There may be more than one locale for a
- * format. There may also be more than one format for the same locale. For
- * example d/m/Y and Y/m/d work equally well in some locales. You may wish to
- * define some additional date formats that aren't specific to any one locale,
- * for example, "Y m". For these cases, the 'locales' component of the return
- * value should be omitted.
- *
- * Providing a date format here does not normally assign the format to be
- * used with the associated date type -- a user has to choose a format for each
- * date type in the administrative interface. There is one exception: locale
- * initialization chooses a locale-specific format for the three core-provided
- * types (see system_get_localized_date_format() for details). If your module
- * needs to ensure that a date type it defines has a format associated with it,
- * call @code variable_set('date_format_' . $type, $format); @endcode
- * where $type is the machine-readable name defined in hook_date_format_types(),
- * and $format is a PHP date format string.
- *
- * @return
- *   A list of date formats to offer as choices in the administrative
- *   interface. Each date format is a keyed array consisting of three elements:
- *   - 'type': The date type name that this format can be used with, as
- *     declared in an implementation of hook_date_format_types().
- *   - 'format': A PHP date format string to use when formatting dates. It
- *     can contain any of the formatting options described at
- *     http://php.net/manual/function.date.php
- *   - 'locales': (optional) An array of 2 and 5 character locale codes,
- *     defining which locales this format applies to (for example, 'en',
- *     'en-us', etc.). If your date format is not language-specific, leave this
- *     array empty.
- *
- * @see hook_date_format_types()
- */
-function hook_date_formats() {
-  return array(
-    array(
-      'type' => 'mymodule_extra_long',
-      'format' => 'l jS F Y H:i:s e',
-      'locales' => array('en-ie'),
-    ),
-    array(
-      'type' => 'mymodule_extra_long',
-      'format' => 'l jS F Y h:i:sa',
-      'locales' => array('en', 'en-us'),
-    ),
-    array(
-      'type' => 'short',
-      'format' => 'F Y',
-      'locales' => array(),
-    ),
-  );
-}
-
-/**
- * Alter date formats declared by another module.
- *
- * Called by _system_date_format_types_build() to allow modules to alter the
- * return values from implementations of hook_date_formats().
- */
-function hook_date_formats_alter(&$formats) {
-  foreach ($formats as $id => $format) {
-    $formats[$id]['locales'][] = 'en-ca';
-  }
-}
-
-/**
  * Alters theme operation links.
  *
  * @param $theme_groups
@@ -3607,7 +3470,7 @@ function hook_tokens($type, $tokens, array $data = array(), array $options = arr
           break;
 
         case 'created':
-          $replacements[$original] = format_date($node->created, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($node->created, 'system_medium', '', NULL, $langcode);
           break;
       }
     }
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 1f191ac..002cb45 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -2203,6 +2203,22 @@ function system_update_8032() {
 }
 
 /**
+ * Moves site system regional settings from variable to config.
+ *
+ * @ingroup config_upgrade
+ */
+function system_update_8033() {
+  update_variables_to_config('system.date', array(
+    'site_default_country' => 'country.default',
+    'date_first_day' => 'first_day',
+    'date_default_timezone' => 'timezone.default',
+    'configurable_timezones' => 'timezone.user.configurable',
+    'empty_timezone_message' => 'timezone.user.warn',
+    'user_default_timezone' => 'timezone.user.default',
+  ));
+}
+
+/**
  * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 4475104..7bc6ca9 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -857,48 +857,10 @@ function system_menu() {
     'file' => 'system.admin.inc',
   );
   $items['admin/config/regional/date-time'] = array(
-    'title' => 'Date and time',
-    'description' => 'Configure display formats for date and time.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('system_date_time_settings'),
-    'access arguments' => array('administer site configuration'),
-    'weight' => -15,
-    'file' => 'system.admin.inc',
-  );
-  $items['admin/config/regional/date-time/types'] = array(
-    'title' => 'Types',
-    'description' => 'Configure display formats for date and time.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('system_date_time_settings'),
-    'access arguments' => array('administer site configuration'),
-    'type' => MENU_DEFAULT_LOCAL_TASK,
-    'weight' => -10,
-    'file' => 'system.admin.inc',
-  );
-  $items['admin/config/regional/date-time/types/add'] = array(
-    'title' => 'Add date type',
-    'description' => 'Add new date type.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('system_add_date_format_type_form'),
-    'access arguments' => array('administer site configuration'),
-    'type' => MENU_LOCAL_ACTION,
-    'weight' => -10,
-    'file' => 'system.admin.inc',
-  );
-  $items['admin/config/regional/date-time/types/%/delete'] = array(
-    'title' => 'Delete date type',
-    'description' => 'Allow users to delete a configured date type.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('system_delete_date_format_type_form', 5),
-    'access arguments' => array('administer site configuration'),
-    'file' => 'system.admin.inc',
-  );
-  $items['admin/config/regional/date-time/formats'] = array(
     'title' => 'Formats',
     'description' => 'Configure display format strings for date and time.',
     'page callback' => 'system_date_time_formats',
     'access arguments' => array('administer site configuration'),
-    'type' => MENU_LOCAL_TASK,
     'weight' => -9,
     'file' => 'system.admin.inc',
   );
@@ -1416,18 +1378,6 @@ function system_library_info() {
       ),
     ),
   );
-  // Normalize.
-  $libraries['normalize'] = array(
-    'title' => 'normalize.css',
-    'website' => 'http://git.io/normalize',
-    'version' => '2.0.1',
-    'css' => array(
-      'core/misc/normalize/normalize.css' => array(
-        'every_page' => TRUE,
-        'weight' => -10,
-      ),
-    ),
-  );
 
   // jQuery UI.
   $libraries['jquery.ui.core'] = array(
@@ -2302,24 +2252,6 @@ function system_filetransfer_info() {
  * Implements hook_init().
  */
 function system_init() {
-  global $conf;
-
-  $language_interface = language(LANGUAGE_TYPE_INTERFACE);
-  // For each date type (e.g. long, short), get the localized date format
-  // for the user's current language and override the default setting for it
-  // in $conf. This should happen on all pages except the date and time formats
-  // settings page, where we want to display the site default and not the
-  // localized version.
-  if (strpos(current_path(), 'admin/config/regional/date-time/formats') !== 0) {
-    $languages = array($language_interface->langcode);
-
-    // Setup appropriate date formats for this locale.
-    $formats = system_get_localized_date_format($languages);
-    foreach ($formats as $format_type => $format) {
-      $conf[$format_type] = $format;
-    }
-  }
-
   $path = drupal_get_path('module', 'system');
   // Add the CSS for this module. These aren't in system.info, because they
   // need to be in the CSS_SYSTEM group rather than the CSS_DEFAULT group.
@@ -2365,52 +2297,14 @@ function system_init() {
  *   An array of date formats.
  */
 function system_get_localized_date_format($languages) {
-  $formats = array();
-
   // Get list of different format types.
-  $format_types = system_get_date_types();
-  $short_default = variable_get('date_format_short', 'm/d/Y - H:i');
-
-  // Loop through each language until we find one with some date formats
-  // configured.
   foreach ($languages as $language) {
-    $date_formats = system_date_format_locale($language);
+    $date_formats = config('locale.config.' . $language . '.system.date')->get('formats');
     if (!empty($date_formats)) {
-      // We have locale-specific date formats, so check for their types. If
-      // we're missing a type, use the default setting instead.
-      foreach ($format_types as $type => $type_info) {
-        // If format exists for this language, use it.
-        if (!empty($date_formats[$type])) {
-          $formats['date_format_' . $type] = $date_formats[$type];
-        }
-        // Otherwise get default variable setting. If this is not set, default
-        // to the short format.
-        else {
-          $formats['date_format_' . $type] = variable_get('date_format_' . $type, $short_default);
-        }
-      }
-
-      // Return on the first match.
-      return $formats;
+      return $date_formats;
     }
   }
-
-  // No locale specific formats found, so use defaults.
-  $system_types = array('short', 'medium', 'long');
-  // Handle system types separately as they have defaults if no variable exists.
-  $formats['date_format_short'] = $short_default;
-  $formats['date_format_medium'] = variable_get('date_format_medium', 'D, m/d/Y - H:i');
-  $formats['date_format_long'] = variable_get('date_format_long', 'l, F j, Y - H:i');
-
-  // For non-system types, get the default setting, otherwise use the short
-  // format.
-  foreach ($format_types as $type => $type_info) {
-    if (!in_array($type, $system_types)) {
-      $formats['date_format_' . $type] = variable_get('date_format_' . $type, $short_default);
-    }
-  }
-
-  return $formats;
+  return array();
 }
 
 /**
@@ -2448,7 +2342,7 @@ function system_custom_theme() {
  * Implements hook_form_FORM_ID_alter().
  */
 function system_form_user_profile_form_alter(&$form, &$form_state) {
-  if (variable_get('configurable_timezones', 1)) {
+  if (config('system.date')->get('timezone.user.configurable')) {
     system_user_timezone($form, $form_state);
   }
   return $form;
@@ -2458,7 +2352,8 @@ function system_form_user_profile_form_alter(&$form, &$form_state) {
  * Implements hook_form_FORM_ID_alter().
  */
 function system_form_user_register_form_alter(&$form, &$form_state) {
-  if (variable_get('configurable_timezones', 1) && variable_get('user_default_timezone', DRUPAL_USER_TIMEZONE_DEFAULT) == DRUPAL_USER_TIMEZONE_SELECT) {
+  $config = config('system.date');
+  if ($config->get('timezone.user.configurable') && $config->get('timezone.user.default') == DRUPAL_USER_TIMEZONE_SELECT) {
     system_user_timezone($form, $form_state);
     return $form;
   }
@@ -2468,8 +2363,9 @@ function system_form_user_register_form_alter(&$form, &$form_state) {
  * Implements hook_user_presave().
  */
 function system_user_presave($account) {
-  if (variable_get('configurable_timezones', 1) && empty($account->timezone) && !variable_get('user_default_timezone', DRUPAL_USER_TIMEZONE_DEFAULT)) {
-    $account->timezone = variable_get('date_default_timezone', '');
+  $config = config('system.date');
+  if ($config->get('timezone.user.configurable') && empty($account->timezone) && !$config->get('timezone.user.default')) {
+    $account->timezone = $config->get('timezone.default');
   }
 }
 
@@ -2477,8 +2373,9 @@ function system_user_presave($account) {
  * Implements hook_user_login().
  */
 function system_user_login(&$edit, $account) {
+  $config = config('system.date');
   // If the user has a NULL time zone, notify them to set a time zone.
-  if (!$account->timezone && variable_get('configurable_timezones', 1) && variable_get('empty_timezone_message', 0)) {
+  if (!$account->timezone && $config->get('timezone.user.configurable') && $config->get('timezone.user.warn')) {
     drupal_set_message(t('Configure your <a href="@user-edit">account time zone setting</a>.', array('@user-edit' => url("user/$account->uid/edit", array('query' => drupal_get_destination(), 'fragment' => 'edit-timezone')))));
   }
 }
@@ -2499,7 +2396,7 @@ function system_user_timezone(&$form, &$form_state) {
   $form['timezone']['timezone'] = array(
     '#type' => 'select',
     '#title' => t('Time zone'),
-    '#default_value' => isset($account->timezone) ? $account->timezone : ($account->uid == $user->uid ? variable_get('date_default_timezone', '') : ''),
+    '#default_value' => isset($account->timezone) ? $account->timezone : ($account->uid == $user->uid ? config('system.date')->get('timezone.default') : ''),
     '#options' => system_time_zones($account->uid != $user->uid),
     '#description' => t('Select the desired local time and time zone. Dates and times throughout this site will be displayed using this time zone.'),
   );
@@ -3154,7 +3051,7 @@ function system_system_info_alter(&$info, $file, $type) {
 }
 
 /**
- * Get the name of the default region for a given theme.
+ * Gets the name of the default region for a given theme.
  *
  * @param $theme
  *   The name of a theme.
@@ -3530,14 +3427,6 @@ function system_cache_flush() {
 }
 
 /**
- * Implements hook_rebuild().
- */
-function system_rebuild() {
-  // Rebuild list of date formats.
-  system_date_formats_rebuild();
-}
-
-/**
  * Implements hook_mail().
  */
 function system_mail($key, &$message, $params) {
@@ -3564,7 +3453,7 @@ function system_time_zones($blank = NULL) {
     // reasons and should not be used, the list is filtered by a regular
     // expression.
     if (preg_match('!^((Africa|America|Antarctica|Arctic|Asia|Atlantic|Australia|Europe|Indian|Pacific)/|UTC$)!', $zone)) {
-      $zones[$zone] = t('@zone: @date', array('@zone' => t(str_replace('_', ' ', $zone)), '@date' => format_date(REQUEST_TIME, 'custom', variable_get('date_format_long', 'l, F j, Y - H:i') . ' O', $zone)));
+      $zones[$zone] = t('@zone: @date', array('@zone' => t(str_replace('_', ' ', $zone)), '@date' => format_date(REQUEST_TIME, 'custom', config('system.date')->get('formats.system_long.pattern.php') . ' O', $zone)));
     }
   }
   // Sort the translated time zones alphabetically.
@@ -3709,48 +3598,6 @@ function system_run_automated_cron() {
 }
 
 /**
- * Gets the list of available date types and attributes.
- *
- * @param $type
- *   (optional) The date type name.
- *
- * @return
- *   An associative array of date type information keyed by the date type name.
- *   Each date type information array has the following elements:
- *   - type: The machine-readable name of the date type.
- *   - title: The human-readable name of the date type.
- *   - locked: A boolean indicating whether or not this date type should be
- *     configurable from the user interface.
- *   - module: The name of the module that defined this date type in its
- *     hook_date_format_types(). An empty string if the date type was
- *     user-defined.
- *   - is_new: A boolean indicating whether or not this date type is as of yet
- *     unsaved in the database.
- *   If $type was defined, only a single associative array with the above
- *   elements is returned.
- */
-function system_get_date_types($type = NULL) {
-  $types = &drupal_static(__FUNCTION__);
-
-  if (!isset($types)) {
-    $types = _system_date_format_types_build();
-  }
-
-  return $type ? (isset($types[$type]) ? $types[$type] : FALSE) : $types;
-}
-
-/**
- * Implements hook_date_format_types().
- */
-function system_date_format_types() {
-  return array(
-    'long' => t('Long'),
-    'medium' => t('Medium'),
-    'short' => t('Short'),
-  );
-}
-
-/**
  * Implements hook_date_formats().
  */
 function system_date_formats() {
@@ -3761,73 +3608,52 @@ function system_date_formats() {
 /**
  * Gets the list of defined date formats and attributes.
  *
- * @param $type
+ * @param $date_format_id
  *   (optional) The date type name.
  *
  * @return
- *   An associative array of date formats. The top-level keys are the names of
- *   the date types that the date formats belong to. The values are in turn
- *   associative arrays keyed by the format string, with the following keys:
- *   - dfid: The date format ID.
- *   - format: The format string.
- *   - type: The machine-readable name of the date type.
- *   - locales: An array of language codes. This can include both 2 character
- *     language codes like 'en and 'fr' and 5 character language codes like
- *     'en-gb' and 'en-us'.
- *   - locked: A boolean indicating whether or not this date type should be
- *     configurable from the user interface.
- *   - module: The name of the module that defined this date format in its
- *     hook_date_formats(). An empty string if the format was user-defined.
- *   - is_new: A boolean indicating whether or not this date type is as of yet
- *     unsaved in the database.
- *   If $type was defined, only the date formats associated with the given date
- *   type are returned, in a single associative array keyed by format string.
- */
-function system_get_date_formats($type = NULL) {
-  $date_formats = &drupal_static(__FUNCTION__);
+ *   An associative array of date formats. The top-level keys are the
+ *   machine-readable names of the date formats. The values are associative
+ *   arrays with the following keys:
+ *   - name: The human readable name of the date format.
+ *   - pattern: The pattern that will modify the format of the date
 
-  if (!isset($date_formats)) {
-    $date_formats = _system_date_formats_build();
-  }
+ *   If $date_format_id was defined, only the date formats associated with the
+ *   given machine name are returned, in a single associative array keyed by
+ *   format string.
+ */
+function system_get_date_formats($date_format_id = NULL) {
+  $date_formats = config('system.date')->get('formats');
 
-  return $type ? (isset($date_formats[$type]) ? $date_formats[$type] : FALSE) : $date_formats;
+  // Return either the specific format or all formats.
+  return empty($date_format_id) ? $date_formats : $date_formats[$date_format_id];
 }
 
 /**
- * Gets the format details for a particular format ID.
+ * Gets the appropriate date format pattern for this server's php configuration.
  *
- * @param $dfid
- *   A date format ID.
+ * @param array $pattern
+ *   The date pattern information that is stored in configuration
  *
- * @return
- *   A date format object with the following properties:
- *   - dfid: The date format ID.
- *   - format: The date format string.
- *   - type: The name of the date type.
- *   - locked: Whether the date format can be changed or not.
+ * @return string
+ *   The date format pattern
  */
-function system_get_date_format($dfid) {
-  return db_query('SELECT df.dfid, df.format, df.type, df.locked FROM {date_formats} df WHERE df.dfid = :dfid', array(':dfid' => $dfid))->fetch();
+function system_get_date_format_pattern($pattern) {
+  return $pattern[system_get_date_format_pattern_type()];
 }
 
 /**
- * Resets the database cache of date formats and saves all new date formats.
+ * Gets the appropriate date format pattern type.
+ *
+ * For now this function defaults to php.
+ *
+ * @return string
+ *   The format type.
+ *
+ * @todo: extend function to provide the appropriate key for alternate date formats
  */
-function system_date_formats_rebuild() {
-  drupal_static_reset('system_get_date_formats');
-  $date_formats = system_get_date_formats(NULL);
-
-  foreach ($date_formats as $type => $formats) {
-    foreach ($formats as $format => $info) {
-      system_date_format_save($info);
-    }
-  }
-
-  // Rebuild configured date formats locale list.
-  drupal_static_reset('system_date_format_locale');
-  system_date_format_locale();
-
-  _system_date_formats_build();
+function system_get_date_format_pattern_type() {
+  return 'php';
 }
 
 /**
@@ -3837,31 +3663,24 @@ function system_date_formats_rebuild() {
  *   (optional) Language code for the current locale. This can be a 2 character
  *   language code like 'en' and 'fr' or a 5 character language code like
  *   'en-gb' and 'en-us'.
- * @param $type
- *   (optional) The date type name.
+ * @param $date_format_id
+ *   (optional) The machine name for the date format.
  *
  * @return
- *   If $type and $langcode are specified, returns the corresponding date format
- *   string. If only $langcode is specified, returns an array of all date
- *   format strings for that locale, keyed by the date type. If neither is
- *   specified, or if no matching formats are found, returns FALSE.
+ *   If $date_format_id and $langcode are specified, returns the corresponding
+ *   date format string. If only $langcode is specified, returns an array of
+ *   all date format strings for that locale, keyed by the date type. If
+ *   neither is specified.
  */
-function system_date_format_locale($langcode = NULL, $type = NULL) {
+function system_date_format_locale($langcode = NULL, $date_format_id = NULL) {
   $formats = &drupal_static(__FUNCTION__);
 
-  if (empty($formats)) {
-    $formats = array();
-    $result = db_query("SELECT format, type, language FROM {date_format_locale}");
-    foreach ($result as $record) {
-      if (!isset($formats[$record->language])) {
-        $formats[$record->language] = array();
-      }
-      $formats[$record->language][$record->type] = $record->format;
-    }
+  if (!isset($formats[$langcode])) {
+    $formats[$langcode] = config('locale.config.' . $langcode . '.system.date')->get('formats');
   }
 
-  if ($type && $langcode && !empty($formats[$langcode][$type])) {
-    return $formats[$langcode][$type];
+  if ($date_format_id && $langcode && !empty($formats[$langcode][$date_format_id])) {
+    return $formats[$langcode][$date_format_id];
   }
   elseif ($langcode && !empty($formats[$langcode])) {
     return $formats[$langcode];
@@ -3871,244 +3690,39 @@ function system_date_format_locale($langcode = NULL, $type = NULL) {
 }
 
 /**
- * Builds and returns information about available date types.
- *
- * @return
- *   An associative array of date type information keyed by name. Each date type
- *   information array has the following elements:
- *   - type: The machine-readable name of the date type.
- *   - title: The human-readable name of the date type.
- *   - locked: A boolean indicating whether or not this date type should be
- *     configurable from the user interface.
- *   - module: The name of the module that defined this format in its
- *     hook_date_format_types(). An empty string if the format was user-defined.
- *   - is_new: A boolean indicating whether or not this date type is as of yet
- *     unsaved in the database.
- */
-function _system_date_format_types_build() {
-  $types = array();
-
-  // Get list of modules that implement hook_date_format_types().
-  $modules = module_implements('date_format_types');
-
-  foreach ($modules as $module) {
-    $module_types = module_invoke($module, 'date_format_types');
-    foreach ($module_types as $module_type => $type_title) {
-      $type = array();
-      $type['module'] = $module;
-      $type['type'] = $module_type;
-      $type['title'] = $type_title;
-      $type['locked'] = 1;
-      // Will be over-ridden later if in the db.
-      $type['is_new'] = TRUE;
-      $types[$module_type] = $type;
-    }
-  }
-
-  // Get custom formats added to the database by the end user.
-  $result = db_query('SELECT dft.type, dft.title, dft.locked FROM {date_format_type} dft ORDER BY dft.title');
-  foreach ($result as $record) {
-    if (!isset($types[$record->type])) {
-      $type = array();
-      $type['is_new'] = FALSE;
-      $type['module'] = '';
-      $type['type'] = $record->type;
-      $type['title'] = $record->title;
-      $type['locked'] = $record->locked;
-      $types[$record->type] = $type;
-    }
-    else {
-      $type = array();
-      $type['is_new'] = FALSE;  // Over-riding previous setting.
-      $types[$record->type] = array_merge($types[$record->type], $type);
-    }
-  }
-
-  // Allow other modules to modify these date types.
-  drupal_alter('date_format_types', $types);
-
-  return $types;
-}
-
-/**
- * Builds and returns information about available date formats.
- *
- * @return
- *   An associative array of date formats. The top-level keys are the names of
- *   the date types that the date formats belong to. The values are in turn
- *   associative arrays keyed by format with the following keys:
- *   - dfid: The date format ID.
- *   - format: The PHP date format string.
- *   - type: The machine-readable name of the date type the format belongs to.
- *   - locales: An array of language codes. This can include both 2 character
- *     language codes like 'en and 'fr' and 5 character language codes like
- *     'en-gb' and 'en-us'.
- *   - locked: A boolean indicating whether or not this date type should be
- *     configurable from the user interface.
- *   - module: The name of the module that defined this format in its
- *     hook_date_formats(). An empty string if the format was user-defined.
- *   - is_new: A boolean indicating whether or not this date type is as of yet
- *     unsaved in the database.
- */
-function _system_date_formats_build() {
-  $date_formats = array();
-
-  // First handle hook_date_format_types().
-  $types = _system_date_format_types_build();
-  foreach ($types as $type => $info) {
-    system_date_format_type_save($info);
-  }
-
-  // Get formats supplied by various contrib modules.
-  $module_formats = module_invoke_all('date_formats');
-
-  foreach ($module_formats as $module_format) {
-    // System types are locked.
-    $module_format['locked'] = 1;
-    // If no date type is specified, assign 'custom'.
-    if (!isset($module_format['type'])) {
-      $module_format['type'] = 'custom';
-    }
-    if (!in_array($module_format['type'], array_keys($types))) {
-      continue;
-    }
-    if (!isset($date_formats[$module_format['type']])) {
-      $date_formats[$module_format['type']] = array();
-    }
-
-    // If another module already set this format, merge in the new settings.
-    if (isset($date_formats[$module_format['type']][$module_format['format']])) {
-      $date_formats[$module_format['type']][$module_format['format']] = array_merge_recursive($date_formats[$module_format['type']][$module_format['format']], $module_format);
-    }
-    else {
-      // This setting will be overridden later if it already exists in the db.
-      $module_format['is_new'] = TRUE;
-      $date_formats[$module_format['type']][$module_format['format']] = $module_format;
-    }
-  }
-
-  // Get custom formats added to the database by the end user.
-  $result = db_query('SELECT df.dfid, df.format, df.type, df.locked, dfl.language FROM {date_formats} df LEFT JOIN {date_format_locale} dfl ON df.format = dfl.format AND df.type = dfl.type ORDER BY df.type, df.format');
-  foreach ($result as $record) {
-    // If this date type isn't set, initialise the array.
-    if (!isset($date_formats[$record->type])) {
-      $date_formats[$record->type] = array();
-    }
-    $format = (array) $record;
-    $format['is_new'] = FALSE; // It's in the db, so override this setting.
-    // If this format not already present, add it to the array.
-    if (!isset($date_formats[$record->type][$record->format])) {
-      $format['module'] = '';
-      $format['locales'] = array($record->language);
-      $date_formats[$record->type][$record->format] = $format;
-    }
-    // Format already present, so merge in settings.
-    else {
-      if (!empty($record->language)) {
-        $format['locales'] = array_merge($date_formats[$record->type][$record->format]['locales'], array($record->language));
-      }
-      $date_formats[$record->type][$record->format] = array_merge($date_formats[$record->type][$record->format], $format);
-    }
-  }
-
-  // Allow other modules to modify these formats.
-  drupal_alter('date_formats', $date_formats);
-
-  return $date_formats;
-}
-
-/**
- * Saves a date type to the database.
- *
- * @param $type
- *   A date type array containing the following keys:
- *   - type: The machine-readable name of the date type.
- *   - title: The human-readable name of the date type.
- *   - locked: A boolean indicating whether or not this date type should be
- *     configurable from the user interface.
- *   - is_new: A boolean indicating whether or not this date type is as of yet
- *     unsaved in the database.
- */
-function system_date_format_type_save($type) {
-  $info = array();
-  $info['type'] = $type['type'];
-  $info['title'] = $type['title'];
-  $info['locked'] = $type['locked'];
-
-  // Update date_format table.
-  if (!empty($type['is_new'])) {
-    drupal_write_record('date_format_type', $info);
-  }
-  else {
-    drupal_write_record('date_format_type', $info, 'type');
-  }
-}
-
-/**
- * Deletes a date type from the database.
- *
- * @param $type
- *   The machine-readable name of the date type.
- */
-function system_date_format_type_delete($type) {
-  db_delete('date_formats')
-    ->condition('type', $type)
-    ->execute();
-  db_delete('date_format_type')
-    ->condition('type', $type)
-    ->execute();
-  db_delete('date_format_locale')
-    ->condition('type', $type)
-    ->execute();
-}
-
-/**
  * Saves a date format to the database.
  *
  * @param $date_format
  *   A date format array containing the following keys:
- *   - type: The name of the date type this format is associated with.
- *   - format: The PHP date format string.
+ *   - name: The name of the date type this format is associated with.
+ *   - pattern: The PHP date format string.
  *   - locked: A boolean indicating whether or not this format should be
  *     configurable from the user interface.
- * @param $dfid
+ * @param $date_format_id
  *   If set, replace the existing date format having this ID with the
  *   information specified in $date_format.
  *
- * @see system_get_date_types()
  * @see http://php.net/date
  */
-function system_date_format_save($date_format, $dfid = 0) {
-  $info = array();
-  $info['dfid'] = $dfid;
-  $info['type'] = $date_format['type'];
-  $info['format'] = $date_format['format'];
-  $info['locked'] = $date_format['locked'];
-
-  // Update date_format table.
-  if (!empty($date_format['is_new'])) {
-    drupal_write_record('date_formats', $info);
-  }
-  else {
-    $keys = ($dfid ? array('dfid') : array('format', 'type'));
-    drupal_write_record('date_formats', $info, $keys);
-  }
+function system_date_format_save($date_format_id, $format_info) {
+  config('system.date')
+    ->set('formats.' . $date_format_id, $format_info)
+    ->save();
 
   $languages = language_list();
 
-  $locale_format = array();
-  $locale_format['type'] = $date_format['type'];
-  $locale_format['format'] = $date_format['format'];
+  $locale_format = array(
+    'name' => $format_info['name'],
+    'pattern' => $format_info['pattern'],
+  );
 
   // Check if the suggested language codes are configured.
-  if (!empty($date_format['locales'])) {
-    foreach ($date_format['locales'] as $langcode) {
+  if (!empty($format_info['locales'])) {
+    foreach ($format_info['locales'] as $langcode) {
       if (isset($languages[$langcode])) {
-        $is_existing = (bool) db_query_range('SELECT 1 FROM {date_format_locale} WHERE type = :type AND language = :language', 0, 1, array(':type' => $date_format['type'], ':language' => $langcode))->fetchField();
-        if (!$is_existing) {
-          $locale_format['language'] = $langcode;
-          drupal_write_record('date_format_locale', $locale_format);
-        }
+        config('locale.config.' . $langcode . '.system.date')
+          ->set('formats.' . $date_format_id, $locale_format)
+          ->save();
       }
     }
   }
@@ -4117,13 +3731,20 @@ function system_date_format_save($date_format, $dfid = 0) {
 /**
  * Deletes a date format from the database.
  *
- * @param $dfid
+ * @param $date_format_id
  *   The date format ID.
  */
-function system_date_format_delete($dfid) {
-  db_delete('date_formats')
-    ->condition('dfid', $dfid)
-    ->execute();
+function system_date_format_delete($date_format_id) {
+  $format_id = 'formats.' . $date_format_id;
+  config('system.date')->clear($format_id)->save();
+
+  // Clean up the localized entry if required.
+  foreach (language_list() as $langcode => $data) {
+    $config = config('locale.config.' . $langcode . '.system.date');
+    if ($config->get($format_id)) {
+      $config->clear($format_id)->save();
+    }
+  }
 }
 
 /**
diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc
index a5e7ad2..12876a8 100644
--- a/core/modules/system/system.tokens.inc
+++ b/core/modules/system/system.tokens.inc
@@ -55,15 +55,15 @@ function system_token_info() {
   // Date related tokens.
   $date['short'] = array(
     'name' => t("Short format"),
-    'description' => t("A date in 'short' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'short'))),
+    'description' => t("A date in 'short' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'system_short'))),
   );
   $date['medium'] = array(
     'name' => t("Medium format"),
-    'description' => t("A date in 'medium' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'medium'))),
+    'description' => t("A date in 'medium' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'system_medium'))),
   );
   $date['long'] = array(
     'name' => t("Long format"),
-    'description' => t("A date in 'long' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'long'))),
+    'description' => t("A date in 'long' format. (%date)", array('%date' => format_date(REQUEST_TIME, 'system_long'))),
   );
   $date['custom'] = array(
     'name' => t("Custom format"),
@@ -184,15 +184,15 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a
     foreach ($tokens as $name => $original) {
       switch ($name) {
         case 'short':
-          $replacements[$original] = format_date($date, 'short', '', NULL, $langcode);
+          $replacements[$original] = format_date($date, 'system_short', '', NULL, $langcode);
           break;
 
         case 'medium':
-          $replacements[$original] = format_date($date, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($date, 'system_medium', '', NULL, $langcode);
           break;
 
         case 'long':
-          $replacements[$original] = format_date($date, 'long', '', NULL, $langcode);
+          $replacements[$original] = format_date($date, 'system_long', '', NULL, $langcode);
           break;
 
         case 'since':
@@ -245,7 +245,7 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a
 
         // These tokens are default variations on the chained tokens handled below.
         case 'timestamp':
-          $replacements[$original] = format_date($file->timestamp, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($file->timestamp, 'system_medium', '', NULL, $langcode);
           break;
 
         case 'owner':
diff --git a/core/modules/system/tests/upgrade/drupal-7.state.system.database.php b/core/modules/system/tests/upgrade/drupal-7.state.system.database.php
index 47c86f2..8f19d1b 100644
--- a/core/modules/system/tests/upgrade/drupal-7.state.system.database.php
+++ b/core/modules/system/tests/upgrade/drupal-7.state.system.database.php
@@ -19,7 +19,3 @@
   ->key(array('name' => 'update_last_email_notification'))
   ->fields(array('value' => serialize(1304208000)))
   ->execute();
-db_merge('variable')
-  ->key(array('name' => 'node_access_needs_rebuild'))
-  ->fields(array('value' => serialize(TRUE)))
-  ->execute();
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
index 9c518d7..9a94cd9 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
@@ -149,17 +149,18 @@ function testRegistrationEmailDuplicates() {
   }
 
   function testRegistrationDefaultValues() {
-    $config = config('user.settings');
     // Don't require e-mail verification and allow registration by site visitors
     // without administrator approval.
-    $config
+    $config_user_settings = config('user.settings')
       ->set('verify_mail', FALSE)
       ->set('register', USER_REGISTER_VISITORS)
       ->save();
 
     // Set the default timezone to Brussels.
-    variable_set('configurable_timezones', 1);
-    variable_set('date_default_timezone', 'Europe/Brussels');
+    $config_system_date = config('system.date')
+      ->set('timezone.user.configurable', 1)
+      ->set('timezone.default', 'Europe/Brussels')
+      ->save();
 
     // Check that the account information fieldset's options are not displayed
     // is a fieldset if there is not more than one fieldset in the form.
@@ -181,8 +182,8 @@ function testRegistrationDefaultValues() {
     $this->assertEqual($new_user->theme, '', 'Correct theme field.');
     $this->assertEqual($new_user->signature, '', 'Correct signature field.');
     $this->assertTrue(($new_user->created > REQUEST_TIME - 20 ), 'Correct creation time.');
-    $this->assertEqual($new_user->status, $config->get('register') == USER_REGISTER_VISITORS ? 1 : 0, 'Correct status field.');
-    $this->assertEqual($new_user->timezone, variable_get('date_default_timezone'), 'Correct time zone field.');
+    $this->assertEqual($new_user->status, $config_user_settings->get('register') == USER_REGISTER_VISITORS ? 1 : 0, 'Correct status field.');
+    $this->assertEqual($new_user->timezone, $config_system_date->get('timezone.default'), 'Correct time zone field.');
     $this->assertEqual($new_user->langcode, language_default()->langcode, 'Correct language field.');
     $this->assertEqual($new_user->preferred_langcode, language_default()->langcode, 'Correct preferred language field.');
     $this->assertEqual($new_user->picture, 0, 'Correct picture field.');
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php b/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php
index f692706..ba170b8 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php
@@ -26,9 +26,11 @@ public static function getInfo() {
    */
   function testUserTimeZone() {
     // Setup date/time settings for Los Angeles time.
-    variable_set('date_default_timezone', 'America/Los_Angeles');
-    variable_set('configurable_timezones', 1);
-    variable_set('date_format_medium', 'Y-m-d H:i T');
+    $config = config('system.date')
+      ->set('timezone.user.configurable', 1)
+      ->set('timezone.default', 'America/Los_Angeles')
+      ->set('formats.system_medium.pattern.php', 'Y-m-d H:i T')
+      ->save();
 
     // Create a user account and login.
     $web_user = $this->drupalCreateUser();
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php b/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php
index d14e826..87f9959 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php
@@ -65,10 +65,10 @@ function testUserTokenReplacement() {
     $tests['[user:mail]'] = check_plain($account->mail);
     $tests['[user:url]'] = url("user/$account->uid", $url_options);
     $tests['[user:edit-url]'] = url("user/$account->uid/edit", $url_options);
-    $tests['[user:last-login]'] = format_date($account->login, 'medium', '', NULL, $language_interface->langcode);
-    $tests['[user:last-login:short]'] = format_date($account->login, 'short', '', NULL, $language_interface->langcode);
-    $tests['[user:created]'] = format_date($account->created, 'medium', '', NULL, $language_interface->langcode);
-    $tests['[user:created:short]'] = format_date($account->created, 'short', '', NULL, $language_interface->langcode);
+    $tests['[user:last-login]'] = format_date($account->login, 'system_medium', '', NULL, $language_interface->langcode);
+    $tests['[user:last-login:short]'] = format_date($account->login, 'system_short', '', NULL, $language_interface->langcode);
+    $tests['[user:created]'] = format_date($account->created, 'system_medium', '', NULL, $language_interface->langcode);
+    $tests['[user:created:short]'] = format_date($account->created, 'system_short', '', NULL, $language_interface->langcode);
     $tests['[current-user:name]'] = check_plain(user_format_name($global_account));
 
     // Test to make sure that we generated something for each token.
diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php
index 0c3002c..5abb44c 100644
--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -313,8 +313,9 @@ function hook_user_update($account) {
  *   The user object on which the operation was just performed.
  */
 function hook_user_login(&$edit, $account) {
+  $config = config('system.date');
   // If the user has a NULL time zone, notify them to set a time zone.
-  if (!$account->timezone && variable_get('configurable_timezones', 1) && variable_get('empty_timezone_message', 0)) {
+  if (!$account->timezone && $config->get('timezone.user.configurable') && $config->get('timezone.user.warn')) {
     drupal_set_message(t('Configure your <a href="@user-edit">account time zone setting</a>.', array('@user-edit' => url("user/$account->uid/edit", array('query' => drupal_get_destination(), 'fragment' => 'edit-timezone')))));
   }
 }
diff --git a/core/modules/user/user.tokens.inc b/core/modules/user/user.tokens.inc
index bc37434..30d984b 100644
--- a/core/modules/user/user.tokens.inc
+++ b/core/modules/user/user.tokens.inc
@@ -103,12 +103,12 @@ function user_tokens($type, $tokens, array $data = array(), array $options = arr
 
         // These tokens are default variations on the chained tokens handled below.
         case 'last-login':
-          $replacements[$original] = !empty($account->login) ? format_date($account->login, 'medium', '', NULL, $langcode) : t('never');
+          $replacements[$original] = !empty($account->login) ? format_date($account->login, 'system_medium', '', NULL, $langcode) : t('never');
           break;
 
         case 'created':
           // In the case of user_presave the created date may not yet be set.
-          $replacements[$original] = !empty($account->created) ? format_date($account->created, 'medium', '', NULL, $langcode) : t('not yet created');
+          $replacements[$original] = !empty($account->created) ? format_date($account->created, 'system_medium', '', NULL, $langcode) : t('not yet created');
           break;
       }
     }
diff --git a/core/modules/views/config/views.view.glossary.yml b/core/modules/views/config/views.view.glossary.yml
index 966da7c..4d0d274 100644
--- a/core/modules/views/config/views.view.glossary.yml
+++ b/core/modules/views/config/views.view.glossary.yml
@@ -47,7 +47,7 @@ display:
           table: node
           field: changed
           label: 'Last update'
-          date_format: large
+          date_format: system_long
       arguments:
         title:
           id: title
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
index 3f39af8..409128e 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
@@ -23,11 +23,6 @@
  *   module = "views",
  *   controller_class = "Drupal\views\ViewStorageController",
  *   list_controller_class = "Drupal\views_ui\ViewListController",
- *   form_controller_class = {
- *     "edit" = "Drupal\views_ui\ViewEditFormController",
- *     "add" = "Drupal\views_ui\ViewAddFormController",
- *     "preview" = "Drupal\views_ui\ViewPreviewFormController"
- *   },
  *   config_prefix = "views.view",
  *   fieldable = FALSE,
  *   entity_keys = {
@@ -44,7 +39,7 @@ class View extends ConfigEntityBase implements ViewStorageInterface {
    *
    * @var string
    */
-  protected $base_table = 'node';
+  public $base_table = 'node';
 
   /**
    * The name of the view.
@@ -58,7 +53,7 @@ class View extends ConfigEntityBase implements ViewStorageInterface {
    *
    * @var string
    */
-  protected $description = '';
+  public $description = '';
 
   /**
    * The "tags" of a view.
@@ -68,7 +63,7 @@ class View extends ConfigEntityBase implements ViewStorageInterface {
    *
    * @var string
    */
-  protected $tag = '';
+  public $tag = '';
 
   /**
    * The human readable name of the view.
@@ -82,14 +77,14 @@ class View extends ConfigEntityBase implements ViewStorageInterface {
    *
    * @var int
    */
-  protected $core = DRUPAL_CORE_COMPATIBILITY;
+  public $core = DRUPAL_CORE_COMPATIBILITY;
 
   /**
    * The views API version this view was created by.
    *
    * @var string
    */
-  protected $api_version = VIEWS_API_VERSION;
+  public $api_version = VIEWS_API_VERSION;
 
   /**
    * Stores all display handlers of this view.
@@ -99,14 +94,14 @@ class View extends ConfigEntityBase implements ViewStorageInterface {
    *
    * @var array
    */
-  protected $display;
+  public $display;
 
   /**
    * The name of the base field to use.
    *
    * @var string
    */
-  protected $base_field = 'nid';
+  public $base_field = 'nid';
 
   /**
    * Returns whether the view's status is disabled or not.
@@ -116,7 +111,7 @@ class View extends ConfigEntityBase implements ViewStorageInterface {
    *
    * @var bool
    */
-  protected $disabled = FALSE;
+  public $disabled = FALSE;
 
   /**
    * The UUID for this entity.
@@ -137,18 +132,58 @@ class View extends ConfigEntityBase implements ViewStorageInterface {
    *
    * @var string
    */
-  protected $module = 'views';
+  public $module = 'views';
 
   /**
-   * Overrides Drupal\Core\Entity\EntityInterface::get().
+   * Stores the executable version of this view.
+   *
+   * @param Drupal\views\ViewExecutable $executable
+   *   The executable version of this view.
+   */
+  public function setExecutable(ViewExecutable $executable) {
+    $this->executable = $executable;
+  }
+
+  /**
+   * Retrieves the executable version of this view.
+   *
+   * @param bool $reset
+   *   Get a new Drupal\views\ViewExecutable instance.
+   * @param bool $ui
+   *   If this should return Drupal\views_ui\ViewUI instead.
+   *
+   * @return Drupal\views\ViewExecutable
+   *   The executable version of this view.
    */
-  public function get($property_name, $langcode = NULL) {
-    // Ensure that an executable View is available.
-    if ($property_name == 'executable' && !isset($this->{$property_name})) {
-      $this->set('executable', new ViewExecutable($this));
+  public function getExecutable($reset = FALSE, $ui = FALSE) {
+    if (!isset($this->executable) || $reset) {
+     // @todo Remove this approach and use proper dependency injection.
+      if ($ui) {
+        $executable = new ViewUI($this);
+      }
+      else {
+        $executable = new ViewExecutable($this);
+      }
+      $this->setExecutable($executable);
     }
+    return $this->executable;
+  }
+
+  /**
+   * Initializes the display.
+   *
+   * @todo Inspect calls to this and attempt to clean up.
+   * @see Drupal\views\ViewExecutable::initDisplay()
+   */
+  public function initDisplay() {
+    $this->getExecutable()->initDisplay();
+  }
 
-    return parent::get($property_name, $langcode);
+  /**
+   * Returns the name of the module implementing this view.
+   */
+  public function getModule() {
+    return $this->module;
   }
 
   /**
@@ -164,7 +199,7 @@ public function uri() {
    * Overrides Drupal\Core\Entity\EntityInterface::id().
    */
   public function id() {
-    return $this->get('name');
+    return $this->name;
   }
 
   /**
@@ -196,8 +231,11 @@ public function isEnabled() {
    * When a certain view doesn't have a human readable name return the machine readable name.
    */
   public function getHumanName() {
-    if (!$human_name = $this->get('human_name')) {
-      $human_name = $this->get('name');
+    if (!empty($this->human_name)) {
+      $human_name = $this->human_name;
+    }
+    else {
+      $human_name = $this->name;
     }
     return $human_name;
   }
@@ -306,7 +344,7 @@ protected function generateDisplayId($plugin_id) {
    */
   public function &newDisplay($plugin_id = 'page', $title = NULL, $id = NULL) {
     $id = $this->addDisplay($plugin_id, $title, $id);
-    return $this->get('executable')->newDisplay($id);
+    return $this->getExecutable()->newDisplay($id);
   }
 
   /**
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
index e67614e..8424dbc 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
@@ -742,13 +742,7 @@ public function getSQLDateField() {
    * Figure out what timezone we're in; needed for some date manipulations.
    */
   public static function getTimezone() {
-    global $user;
-    if (variable_get('configurable_timezones', 1) && $user->uid && strlen($user->timezone)) {
-      $timezone = $user->timezone;
-    }
-    else {
-      $timezone = variable_get('date_default_timezone', 0);
-    }
+    $timezone = drupal_get_user_timezone();
 
     // set up the database timezone
     $db_type = Database::getConnection()->databaseType();
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index cf68a49..1ad673b 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -2156,7 +2156,7 @@ public function submitOptionsForm(&$form, &$form_state) {
             $access = array('type' => $form_state['values']['access']['type']);
             $this->setOption('access', $access);
             if ($plugin->usesOptions()) {
-              $form_state['view']->addFormToStack('display', $this->display['id'], array('access_options'));
+              $this->view->addFormToStack('display', $this->display['id'], array('access_options'));
             }
           }
         }
@@ -2179,7 +2179,7 @@ public function submitOptionsForm(&$form, &$form_state) {
             $cache = array('type' => $form_state['values']['cache']['type']);
             $this->setOption('cache', $cache);
             if ($plugin->usesOptions()) {
-              $form_state['view']->addFormToStack('display', $this->display['id'], array('cache_options'));
+              $this->view->addFormToStack('display', $this->display['id'], array('cache_options'));
             }
           }
         }
@@ -2240,7 +2240,7 @@ public function submitOptionsForm(&$form, &$form_state) {
 
             // send ajax form to options page if we use it.
             if ($plugin->usesOptions()) {
-              $form_state['view']->addFormToStack('display', $this->display['id'], array('row_options'));
+              $this->view->addFormToStack('display', $this->display['id'], array('row_options'));
             }
           }
         }
@@ -2256,7 +2256,7 @@ public function submitOptionsForm(&$form, &$form_state) {
             $this->setOption($section, $row);
             // send ajax form to options page if we use it.
             if ($plugin->usesOptions()) {
-              $form_state['view']->addFormToStack('display', $this->display['id'], array('style_options'));
+              $this->view->addFormToStack('display', $this->display['id'], array('style_options'));
             }
           }
         }
@@ -2290,7 +2290,7 @@ public function submitOptionsForm(&$form, &$form_state) {
             $exposed_form = array('type' => $form_state['values']['exposed_form']['type'], 'options' => array());
             $this->setOption('exposed_form', $exposed_form);
             if ($plugin->usesOptions()) {
-              $form_state['view']->addFormToStack('display', $this->display['id'], array('exposed_form_options'));
+              $this->view->addFormToStack('display', $this->display['id'], array('exposed_form_options'));
             }
           }
         }
@@ -2317,7 +2317,7 @@ public function submitOptionsForm(&$form, &$form_state) {
             $pager = array('type' => $form_state['values']['pager']['type'], 'options' => $plugin->options);
             $this->setOption('pager', $pager);
             if ($plugin->usesOptions()) {
-              $form_state['view']->addFormToStack('display', $this->display['id'], array('pager_options'));
+              $this->view->addFormToStack('display', $this->display['id'], array('pager_options'));
             }
           }
         }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php
index 889a14f..6f6abdb 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php
@@ -400,7 +400,7 @@ public function submitOptionsForm(&$form, &$form_state) {
         $this->setOption('menu', $form_state['values']['menu']);
         // send ajax form to options page if we use it.
         if ($form_state['values']['menu']['type'] == 'default tab') {
-          $form_state['view']->addFormToStack('display', $this->display['id'], array('tab_options'));
+          $this->view->addFormToStack('display', $this->display['id'], array('tab_options'));
         }
         break;
       case 'tab_options':
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php
index dd5f2fa..e898593 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php
@@ -33,9 +33,9 @@ protected function defineOptions() {
   public function buildOptionsForm(&$form, &$form_state) {
 
     $date_formats = array();
-    $date_types = system_get_date_types();
-    foreach ($date_types as $key => $value) {
-      $date_formats[$value['type']] = check_plain(t($value['title'] . ' format')) . ': ' . format_date(REQUEST_TIME, $value['type']);
+    $date_types = system_get_date_formats();
+    foreach ($date_types as $machine_name => $value) {
+      $date_formats[$machine_name] = check_plain(t('@name format', array('@name' => $value['name'])) . ': ' . format_date(REQUEST_TIME, $machine_name));
     }
 
     $form['date_format'] = array(
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
index f3a1f4d..1ebcd54 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
@@ -164,7 +164,7 @@ public function buildOptionsForm(&$form, &$form_state) {
   function get_temporary_view() {
     $view = entity_create('view', array('base_table' => $this->definition['base']));
     $view->addDisplay('default');
-    return $view->get('executable');
+    return $view->getExecutable();
   }
 
   /**
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/RowPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/RowPluginBase.php
index b18ded4..97a6656 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/row/RowPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/RowPluginBase.php
@@ -74,11 +74,11 @@ protected function defineOptions() {
   public function buildOptionsForm(&$form, &$form_state) {
     parent::buildOptionsForm($form, $form_state);
     if (isset($this->base_table)) {
-      $executable = $form_state['view']->get('executable');
+      $view = &$form_state['view'];
 
       // A whole bunch of code to figure out what relationships are valid for
       // this item.
-      $relationships = $executable->display_handler->getOption('relationships');
+      $relationships = $view->display_handler->getOption('relationships');
       $relationship_options = array();
 
       foreach ($relationships as $relationship) {
@@ -88,7 +88,7 @@ public function buildOptionsForm(&$form, &$form_state) {
         $data = views_fetch_data($relationship['table']);
         $base = $data[$relationship['field']]['relationship']['base'];
         if ($base == $this->base_table) {
-          $relationship_handler->init($executable, $relationship);
+          $relationship_handler->init($view, $relationship);
           $relationship_options[$relationship['id']] = $relationship_handler->label();
         }
       }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
index 0e8546c..acc1285 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
@@ -217,7 +217,7 @@ function build_form(array $form, array &$form_state) {
       '#title' => t('Create a page'),
       '#type' => 'checkbox',
       '#attributes' => array('class' => array('strong')),
-      '#default_value' => FALSE,
+      '#default_value' => TRUE,
       '#id' => 'edit-page-create',
     );
 
@@ -257,7 +257,7 @@ function build_form(array $form, array &$form_state) {
       '#options' => $style_options,
     );
     $style_form = &$form['displays']['page']['options']['style'];
-    $style_form['style_plugin']['#default_value'] = static::getSelected($form_state, array('page', 'style', 'style_plugin'), 'default', $style_form['style_plugin']);
+    $style_form['style_plugin']['#default_value'] = views_ui_get_selected($form_state, array('page', 'style', 'style_plugin'), 'default', $style_form['style_plugin']);
     // Changing this dropdown updates $form['displays']['page']['options'] via
     // AJAX.
     views_ui_add_ajax_trigger($style_form, 'style_plugin', array('displays', 'page', 'options'));
@@ -394,7 +394,7 @@ function build_form(array $form, array &$form_state) {
       '#options' => $style_options,
     );
     $style_form = &$form['displays']['block']['options']['style'];
-    $style_form['style_plugin']['#default_value'] = static::getSelected($form_state, array('block', 'style', 'style_plugin'), 'default', $style_form['style_plugin']);
+    $style_form['style_plugin']['#default_value'] = views_ui_get_selected($form_state, array('block', 'style', 'style_plugin'), 'default', $style_form['style_plugin']);
     // Changing this dropdown updates $form['displays']['block']['options'] via
     // AJAX.
     views_ui_add_ajax_trigger($style_form, 'style_plugin', array('displays', 'block', 'options'));
@@ -416,85 +416,6 @@ function build_form(array $form, array &$form_state) {
   }
 
   /**
-   * Gets the current value of a #select element, from within a form constructor function.
-   *
-   * This function is intended for use in highly dynamic forms (in particular the
-   * add view wizard) which are rebuilt in different ways depending on which
-   * triggering element (AJAX or otherwise) was most recently fired. For example,
-   * sometimes it is necessary to decide how to build one dynamic form element
-   * based on the value of a different dynamic form element that may not have
-   * even been present on the form the last time it was submitted. This function
-   * takes care of resolving those conflicts and gives you the proper current
-   * value of the requested #select element.
-   *
-   * By necessity, this function sometimes uses non-validated user input from
-   * $form_state['input'] in making its determination. Although it performs some
-   * minor validation of its own, it is not complete. The intention is that the
-   * return value of this function should only be used to help decide how to
-   * build the current form the next time it is reloaded, not to be saved as if
-   * it had gone through the normal, final form validation process. Do NOT use
-   * the results of this function for any other purpose besides deciding how to
-   * build the next version of the form.
-   *
-   * @param $form_state
-   *   The  standard associative array containing the current state of the form.
-   * @param $parents
-   *   An array of parent keys that point to the part of the submitted form
-   *   values that are expected to contain the element's value (in the case where
-   *   this form element was actually submitted). In a simple case (assuming
-   *   #tree is TRUE throughout the form), if the select element is located in
-   *   $form['wrapper']['select'], so that the submitted form values would
-   *   normally be found in $form_state['values']['wrapper']['select'], you would
-   *   pass array('wrapper', 'select') for this parameter.
-   * @param $default_value
-   *   The default value to return if the #select element does not currently have
-   *   a proper value set based on the submitted input.
-   * @param $element
-   *   An array representing the current version of the #select element within
-   *   the form.
-   *
-   * @return
-   *   The current value of the #select element. A common use for this is to feed
-   *   it back into $element['#default_value'] so that the form will be rendered
-   *   with the correct value selected.
-   */
-  public static function getSelected($form_state, $parents, $default_value, $element) {
-    // For now, don't trust this to work on anything but a #select element.
-    if (!isset($element['#type']) || $element['#type'] != 'select' || !isset($element['#options'])) {
-      return $default_value;
-    }
-
-    // If there is a user-submitted value for this element that matches one of
-    // the currently available options attached to it, use that. We need to check
-    // $form_state['input'] rather than $form_state['values'] here because the
-    // triggering element often has the #limit_validation_errors property set to
-    // prevent unwanted errors elsewhere on the form. This means that the
-    // $form_state['values'] array won't be complete. We could make it complete
-    // by adding each required part of the form to the #limit_validation_errors
-    // property individually as the form is being built, but this is difficult to
-    // do for a highly dynamic and extensible form. This method is much simpler.
-    if (!empty($form_state['input'])) {
-      $key_exists = NULL;
-      $submitted = drupal_array_get_nested_value($form_state['input'], $parents, $key_exists);
-      // Check that the user-submitted value is one of the allowed options before
-      // returning it. This is not a substitute for actual form validation;
-      // rather it is necessary because, for example, the same select element
-      // might have #options A, B, and C under one set of conditions but #options
-      // D, E, F under a different set of conditions. So the form submission
-      // might have occurred with option A selected, but when the form is rebuilt
-      // option A is no longer one of the choices. In that case, we don't want to
-      // use the value that was submitted anymore but rather fall back to the
-      // default value.
-      if ($key_exists && in_array($submitted, array_keys($element['#options']))) {
-        return $submitted;
-      }
-    }
-
-    // Fall back on returning the default value if nothing was returned above.
-    return $default_value;
-  }
-
-  /**
    * Adds the style options to the wizard form.
    *
    * @param array $form
@@ -522,7 +443,7 @@ protected function build_form_style(array &$form, array &$form_state, $type) {
       // if it's available (since that's the most common use case).
       $block_with_linked_titles_available = ($type == 'block' && isset($options['titles_linked']));
       $default_value = $block_with_linked_titles_available ? 'titles_linked' : key($options);
-      $style_form['row_plugin']['#default_value'] = static::getSelected($form_state, array($type, 'style', 'row_plugin'), $default_value, $style_form['row_plugin']);
+      $style_form['row_plugin']['#default_value'] = views_ui_get_selected($form_state, array($type, 'style', 'row_plugin'), $default_value, $style_form['row_plugin']);
       // Changing this dropdown updates the individual row options via AJAX.
       views_ui_add_ajax_trigger($style_form, 'row_plugin', array('displays', $type, 'options', 'style', 'row_options'));
 
@@ -572,7 +493,7 @@ protected function build_filters(&$form, &$form_state) {
         '#title' => t('of type'),
         '#options' => $options,
       );
-      $selected_bundle = static::getSelected($form_state, array('show', 'type'), 'all', $form['displays']['show']['type']);
+      $selected_bundle = views_ui_get_selected($form_state, array('show', 'type'), 'all', $form['displays']['show']['type']);
       $form['displays']['show']['type']['#default_value'] = $selected_bundle;
       // Changing this dropdown updates the entire content of $form['displays']
       // via AJAX, since each bundle might have entirely different fields
@@ -1145,7 +1066,7 @@ protected function set_validated_view(array $form, array &$form_state, ViewUI $v
    */
   public function validateView(array $form, array &$form_state) {
     $view = $this->instantiate_view($form, $form_state);
-    $errors = $view->get('executable')->validate();
+    $errors = $view->validate();
     if (!is_array($errors) || empty($errors)) {
       $this->set_validated_view($form, $form_state, $view);
       return array();
diff --git a/core/modules/views/lib/Drupal/views/Tests/Comment/WizardTest.php b/core/modules/views/lib/Drupal/views/Tests/Comment/WizardTest.php
index 834bd5b..05f3862 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Comment/WizardTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Comment/WizardTest.php
@@ -40,7 +40,6 @@ public function testCommentWizard() {
     $view['human_name'] = $this->randomName(16);
     $view['name'] = strtolower($this->randomName(16));
     $view['show[wizard_key]'] = 'comment';
-    $view['page[create]'] = TRUE;
     $view['page[path]'] = $this->randomName(16);
 
     // Just triggering the saving should automatically choose a proper row
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php
index 6040d40..f7f1a10 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php
@@ -56,9 +56,9 @@ public function testFieldDate() {
     );
     foreach ($timezones as $timezone) {
       $dates = array(
-        'small' => format_date($time, 'small', '', $timezone),
-        'medium' => format_date($time, 'medium', '', $timezone),
-        'large' => format_date($time, 'large', '', $timezone),
+        'small' => format_date($time, 'system_small', '', $timezone),
+        'medium' => format_date($time, 'system_medium', '', $timezone),
+        'large' => format_date($time, 'system_large', '', $timezone),
         'custom' => format_date($time, 'custom', 'c', $timezone),
       );
       $this->assertRenderedDatesEqual($view, $dates, $timezone);
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php
index 93529ab..02fa8f5 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php
@@ -59,7 +59,7 @@ public function testHandlers() {
       }
 
       $view = views_new_view();
-      $view->set('base_table', $base_table);
+      $view->base_table = $base_table;
       $view = new ViewExecutable($view);
 
       // @todo The groupwise relationship is currently broken.
diff --git a/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php b/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
index 67dfac6..5bf1574 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
@@ -163,12 +163,12 @@ public function testLoadFunctions() {
     // Test $exclude_view parameter.
     $this->assertFalse(array_key_exists('archive', views_get_views_as_options(TRUE, 'all', 'archive')), 'View excluded from options based on name');
     $this->assertFalse(array_key_exists('archive:default', views_get_views_as_options(FALSE, 'all', 'archive:default')), 'View display excluded from options based on name');
-    $this->assertFalse(array_key_exists('archive', views_get_views_as_options(TRUE, 'all', $archive->get('executable'))), 'View excluded from options based on object');
+    $this->assertFalse(array_key_exists('archive', views_get_views_as_options(TRUE, 'all', $archive->getExecutable())), 'View excluded from options based on object');
 
     // Test the $opt_group parameter.
     $expected_opt_groups = array();
     foreach ($all_views as $id => $view) {
-      foreach ($view->get('display') as $display_id => $display) {
+      foreach ($view->display as $display_id => $display) {
           $expected_opt_groups[$view->id()][$view->id() . ':' . $display['id']] = t('@view : @display', array('@view' => $view->id(), '@display' => $display['id']));
       }
     }
@@ -205,7 +205,7 @@ function testStatusFunctions() {
   protected function formatViewOptions(array $views = array()) {
     $expected_options = array();
     foreach ($views as $id => $view) {
-      foreach ($view->get('display') as $display_id => $display) {
+      foreach ($view->display as $display_id => $display) {
         $expected_options[$view->id() . ':' . $display['id']] = t('View: @view - Display: @display',
           array('@view' => $view->name, '@display' => $display['id']));
       }
diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php
index 0fd4bc3..fd35ca6 100644
--- a/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php
@@ -55,7 +55,7 @@ public function testRemoveDisplay() {
     // Delete the page, so we can test the undo process.
     $this->drupalPost($path_prefix . '/page_1', array(), 'delete Page');
     $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete', 'undo delete of Page', 'Make sure there a undo button on the page display after deleting.');
-    $this->assertTrue($this->xpath('//a[contains(@class, :class)]', array(':class' => 'views-display-deleted-link')), 'Make sure the display link is marked as to be deleted.');
+    $this->assertTrue($this->xpath('//div[contains(@class, views-display-deleted-link)]'). 'Make sure the display link is marked as to be deleted.');
 
     // Undo the deleting of the display.
     $this->drupalPost($path_prefix . '/page_1', array(), 'undo delete of Page');
@@ -66,7 +66,7 @@ public function testRemoveDisplay() {
     $this->drupalPost($path_prefix . '/page_1', array(), 'delete Page');
     $this->drupalPost(NULL, array(), t('Save'));
 
-    $this->assertNoLinkByHref($path_prefix . '/page_1', 'Make sure there is no display tab for the deleted display.');
+    $this->assertNoLinkByHref($path_prefix . '/page', 'Make sure there is no display tab for the deleted display.');
   }
 
   /**
diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/StorageTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/StorageTest.php
index 3115764..3614243 100644
--- a/core/modules/views/lib/Drupal/views/Tests/UI/StorageTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/UI/StorageTest.php
@@ -40,7 +40,7 @@ public function testDetails() {
     $view = views_get_view($view->storage->get('name'));
 
     foreach (array('human_name', 'tag', 'description') as $property) {
-      $this->assertEqual($view->storage->get($property), $edit[$property], format_string('Make sure the property @property got probably saved.', array('@property' => $property)));
+      $this->assertEqual($view->storage->{$property}, $edit[$property], format_string('Make sure the property @property got probably saved.', array('@property' => $property)));
     }
   }
 
diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
index 8408aa4..b115192 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
@@ -16,7 +16,7 @@
 /**
  * Tests the functionality of View and ViewStorageController.
  *
- * @see Drupal\views\Plugin\Core\Entity\View
+ * @see Drupal\views\ViewStorage
  * @see Drupal\views\ViewStorageController
  */
 class ViewStorageTest extends ViewTestBase {
@@ -103,16 +103,16 @@ protected function loadTests() {
     // expected properties.
     $this->assertTrue($view instanceof View, 'Single View instance loaded.');
     foreach ($this->config_properties as $property) {
-      $this->assertTrue($view->get($property), format_string('Property: @property loaded onto View.', array('@property' => $property)));
+      $this->assertTrue(isset($view->{$property}), format_string('Property: @property loaded onto View.', array('@property' => $property)));
     }
 
     // Check the displays have been loaded correctly from config display data.
     $expected_displays = array('default', 'page_1', 'block_1');
-    $this->assertEqual(array_keys($view->get('display')), $expected_displays, 'The correct display names are present.');
+    $this->assertEqual(array_keys($view->display), $expected_displays, 'The correct display names are present.');
 
     // Check each ViewDisplay object and confirm that it has the correct key and
     // property values.
-    foreach ($view->get('display') as $key => $display) {
+    foreach ($view->display as $key => $display) {
       $this->assertEqual($key, $display['id'], 'The display has the correct ID assigned.');
 
       // Get original display data and confirm that the display options array
@@ -171,8 +171,8 @@ protected function createTests() {
 
     // Test all properties except displays.
     foreach ($properties as $property) {
-      $this->assertTrue($created->get($property), format_string('Property: @property created on View.', array('@property' => $property)));
-      $this->assertIdentical($values[$property], $created->get($property), format_string('Property value: @property matches configuration value.', array('@property' => $property)));
+      $this->assertTrue(isset($created->{$property}), format_string('Property: @property created on View.', array('@property' => $property)));
+      $this->assertIdentical($values[$property], $created->{$property}, format_string('Property value: @property matches configuration value.', array('@property' => $property)));
     }
 
     // Check the UUID of the loaded View.
@@ -191,11 +191,11 @@ protected function displayTests() {
 
     $view->newDisplay('page', 'Test', 'test');
 
-    $new_display = $view->get('display');
+    $new_display = $view->display['test'];
 
     // Ensure the right display_plugin is created/instantiated.
-    $this->assertEqual($new_display['test']['display_plugin'], 'page', 'New page display "test" uses the right display plugin.');
-    $this->assertTrue($view->get('executable')->displayHandlers[$new_display['test']['id']] instanceof Page, 'New page display "test" uses the right display plugin.');
+    $this->assertEqual($new_display['display_plugin'], 'page', 'New page display "test" uses the right display plugin.');
+    $this->assertTrue($view->getExecutable()->displayHandlers[$new_display['id']] instanceof Page, 'New page display "test" uses the right display plugin.');
 
 
     $view->set('name', 'frontpage_new');
@@ -290,18 +290,15 @@ protected function displayMethodTests() {
 
     $id = $view->addDisplay('page', $random_title);
     $this->assertEqual($id, 'page_1', format_string('Make sure the first display (%id_new) has the expected ID (%id)', array('%id_new' => $id, '%id' => 'page_1')));
-    $display = $view->get('display');
-    $this->assertEqual($display[$id]['display_title'], $random_title);
+    $this->assertEqual($view->display[$id]['display_title'], $random_title);
 
     $random_title = $this->randomName();
     $id = $view->addDisplay('page', $random_title);
-    $display = $view->get('display');
     $this->assertEqual($id, 'page_2', format_string('Make sure the second display (%id_new) has the expected ID (%id)', array('%id_new' => $id, '%id' => 'page_2')));
-    $this->assertEqual($display[$id]['display_title'], $random_title);
+    $this->assertEqual($view->display[$id]['display_title'], $random_title);
 
     $id = $view->addDisplay('page');
-    $display = $view->get('display');
-    $this->assertEqual($display[$id]['display_title'], 'Page 3');
+    $this->assertEqual($view->display[$id]['display_title'], 'Page 3');
 
     // Tests Drupal\views\Plugin\Core\Entity\View::generateDisplayId().
     // @todo Sadly this method is not public so it cannot be tested.
@@ -317,23 +314,23 @@ protected function displayMethodTests() {
 
     $display = $view->newDisplay('page');
     $this->assertTrue($display instanceof Page);
-    $this->assertTrue($view->get('executable')->displayHandlers['page_1'] instanceof Page);
-    $this->assertTrue($view->get('executable')->displayHandlers['page_1']->default_display instanceof DefaultDisplay);
+    $this->assertTrue($view->getExecutable()->displayHandlers['page_1'] instanceof Page);
+    $this->assertTrue($view->getExecutable()->displayHandlers['page_1']->default_display instanceof DefaultDisplay);
 
     $display = $view->newDisplay('page');
     $this->assertTrue($display instanceof Page);
-    $this->assertTrue($view->get('executable')->displayHandlers['page_2'] instanceof Page);
-    $this->assertTrue($view->get('executable')->displayHandlers['page_2']->default_display instanceof DefaultDisplay);
+    $this->assertTrue($view->getExecutable()->displayHandlers['page_2'] instanceof Page);
+    $this->assertTrue($view->getExecutable()->displayHandlers['page_2']->default_display instanceof DefaultDisplay);
 
     $display = $view->newDisplay('feed');
     $this->assertTrue($display instanceof Feed);
-    $this->assertTrue($view->get('executable')->displayHandlers['feed_1'] instanceof Feed);
-    $this->assertTrue($view->get('executable')->displayHandlers['feed_1']->default_display instanceof DefaultDisplay);
+    $this->assertTrue($view->getExecutable()->displayHandlers['feed_1'] instanceof Feed);
+    $this->assertTrue($view->getExecutable()->displayHandlers['feed_1']->default_display instanceof DefaultDisplay);
 
     // Tests item related methods().
     $view = $this->controller->create(array('base_table' => 'views_test_data'));
     $view->addDisplay('default');
-    $view = $view->get('executable');
+    $view = $view->getExecutable();
 
     $display_id = 'default';
     $expected_items = array();
@@ -408,14 +405,13 @@ public function testCreateDuplicate() {
     );
 
     foreach ($config_properties as $property) {
-      $this->assertIdentical($view->storage->get($property), $copy->get($property), format_string('@property property is identical.', array('@property' => $property)));
+      $this->assertIdentical($view->storage->{$property}, $copy->{$property}, format_string('@property property is identical.', array('@property' => $property)));
     }
 
     // Check the displays are the same.
-    $copy_display = $copy->get('display');
     foreach ($view->storage->get('display') as $id => $display) {
       // assertIdentical will not work here.
-      $this->assertEqual($display, $copy_display[$id], format_string('The @display display has been copied correctly.', array('@display' => $id)));
+      $this->assertEqual($display, $copy->display[$id], format_string('The @display display has been copied correctly.', array('@display' => $id)));
     }
   }
 
diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php b/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php
index 4ad233d..0354f9b 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php
@@ -409,7 +409,7 @@ protected function createViewFromConfig($view_name) {
     $data = config("views.view.$view_name")->get();
 
     $view = entity_create('view', $data);
-    $view = $view->get('executable');
+    $view = $view->getExecutable();
     $view->setDisplay();
 
     return $view;
diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php
index 0f9837d..0367905 100644
--- a/core/modules/views/lib/Drupal/views/ViewExecutable.php
+++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php
@@ -406,7 +406,7 @@ class ViewExecutable {
   public function __construct(View $storage) {
     // Reference the storage and the executable to each other.
     $this->storage = $storage;
-    $this->storage->set('executable', $this);
+    $this->storage->setExecutable($this);
   }
 
   /**
@@ -1821,9 +1821,7 @@ public function createDuplicate() {
    */
   public function cloneView() {
     $storage = clone $this->storage;
-    $executable = new ViewExecutable($storage);
-    $storage->set('executable', $executable);
-    return $executable;
+    return $storage->getExecutable(TRUE);
   }
 
   /**
diff --git a/core/modules/views/lib/Drupal/views/ViewStorageController.php b/core/modules/views/lib/Drupal/views/ViewStorageController.php
index 644d224..75b4884 100644
--- a/core/modules/views/lib/Drupal/views/ViewStorageController.php
+++ b/core/modules/views/lib/Drupal/views/ViewStorageController.php
@@ -31,7 +31,7 @@ public function load(array $ids = NULL) {
 
     // Only return views for enabled modules.
     return array_filter($entities, function ($entity) {
-      if (module_exists($entity->get('module'))) {
+      if (module_exists($entity->getModule())) {
         return TRUE;
       }
       return FALSE;
@@ -78,8 +78,6 @@ public function create(array $values) {
           'display_plugin' => 'default',
           'id' => 'default',
           'display_title' => 'Master',
-          'position' => 0,
-          'display_options' => array(),
         ),
       )
     );
@@ -115,29 +113,4 @@ protected function attachDisplays(EntityInterface $entity) {
     }
   }
 
-  /**
-   * Overrides Drupal\config\ConfigStorageController::getProperties();
-   */
-  protected function getProperties(EntityInterface $entity) {
-    $names = array(
-      'api_version',
-      'base_field',
-      'base_table',
-      'core',
-      'description',
-      'disabled',
-      'display',
-      'human_name',
-      'module',
-      'name',
-      'tag',
-      'uuid',
-    );
-    $properties = array();
-    foreach ($names as $name) {
-      $properties[$name] = $entity->get($name);
-    }
-    return $properties;
-  }
-
 }
diff --git a/core/modules/views/lib/Drupal/views/ViewStorageInterface.php b/core/modules/views/lib/Drupal/views/ViewStorageInterface.php
index 01bb87d..b29fa03 100644
--- a/core/modules/views/lib/Drupal/views/ViewStorageInterface.php
+++ b/core/modules/views/lib/Drupal/views/ViewStorageInterface.php
@@ -12,7 +12,7 @@
 /**
  * Defines an interface for View storage classes.
  */
-interface ViewStorageInterface extends \IteratorAggregate, ConfigEntityInterface {
+interface ViewStorageInterface extends ConfigEntityInterface {
 
   /**
    * Sets the configuration entity status to enabled.
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index c29136a..f6568a4 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -278,7 +278,7 @@ function views_plugin_list() {
   $plugin_data = views_get_plugin_definitions();
   $plugins = array();
   foreach (views_get_enabled_views() as $view) {
-    foreach ($view->get('display') as $display_id => $display) {
+    foreach ($view->display as $display_id => $display) {
       foreach ($plugin_data as $type => $info) {
         if ($type == 'display' && isset($display['display_plugin'])) {
           $name = $display['display_plugin'];
@@ -306,7 +306,7 @@ function views_plugin_list() {
         }
 
         // Add this view to the list for this plugin.
-        $plugins[$key]['views'][$view->get('name')] = $view->get('name');
+        $plugins[$key]['views'][$view->storage->get('name')] = $view->storage->get('name');
       }
     }
   }
@@ -631,9 +631,8 @@ function views_block_info() {
       continue;
     }
 
-    $executable = $view->get('executable');
-    $executable->initDisplay();
-    foreach ($executable->displayHandlers as $display) {
+    $view->initDisplay();
+    foreach ($view->getExecutable()->displayHandlers as $display) {
 
       if (isset($display) && !empty($display->definition['uses_hook_block'])) {
         $result = $display->executeHookBlockList();
@@ -1366,20 +1365,20 @@ function views_get_applicable_views($type) {
       continue;
     }
 
-    $display = $view->get('display');
-    if (empty($display)) {
+    if (empty($view->display)) {
       // Skip this view as it is broken.
       continue;
     }
 
     // Loop on array keys because something seems to muck with $view->display
     // a bit in PHP4.
-    foreach (array_keys($display) as $id) {
-      $plugin = views_get_plugin_definition('display', $display[$id]['display_plugin']);
+    foreach (array_keys($view->display) as $id) {
+      $plugin = views_get_plugin_definition('display', $view->display[$id]['display_plugin']);
       if (!empty($plugin[$type])) {
+        $executable = $view->getExecutable();
         // This view uses_hook_menu. Clone it so that different handlers
         // don't trip over each other, and add it to the list.
-        $v = $view->get('executable')->cloneView();
+        $v = $executable->cloneView();
         if ($v->setDisplay($id) && $v->display_handler->isEnabled()) {
           $result[] = array($v, $id);
         }
@@ -1479,7 +1478,7 @@ function views_get_views_as_options($views_only = FALSE, $filter = 'all', $exclu
     }
     // Return views with display ids.
     else {
-      foreach ($view->get('display') as $display_id => $display) {
+      foreach ($view->display as $display_id => $display) {
         if (!($id == $exclude_view_name && $display_id == $exclude_view_display)) {
           if ($optgroup) {
             $options[$id][$id . ':' . $display['id']] = t('@view : @display', array('@view' => $id, '@display' => $display['id']));
@@ -1555,7 +1554,7 @@ function views_disable_view(View $view) {
 function views_get_view($name) {
   $view = entity_load('view', $name);
   if ($view) {
-    return $view->get('executable');
+    return $view->getExecutable();
   }
 }
 
diff --git a/core/modules/views/views_ui/admin.inc b/core/modules/views/views_ui/admin.inc
index 5b0ae41..83113aa 100644
--- a/core/modules/views/views_ui/admin.inc
+++ b/core/modules/views/views_ui/admin.inc
@@ -8,9 +8,7 @@
 use Drupal\Core\Database\Database;
 use Symfony\Component\HttpFoundation\JsonResponse;
 use Drupal\views_ui\ViewUI;
-use Drupal\views_ui\ViewFormControllerBase;
 use Drupal\views\Analyzer;
-use Drupal\views\ViewExecutable;
 use Drupal\views\Plugin\views\wizard\WizardException;
 
 /**
@@ -28,8 +26,88 @@ function views_ui_preview(ViewUI $view, $display_id) {
  */
 function views_ui_add_page() {
   drupal_set_title(t('Add new view'));
-  $view = entity_create('view', array());
-  return entity_get_form($view, 'add');
+  $form_state['build_info']['args'] = array();
+  $form_state['build_info']['callback'] = array('Drupal\views_ui\ViewUI', 'buildAddForm');
+  return drupal_build_form('views_ui_add_form', $form_state);
+}
+
+/**
+ * Gets the current value of a #select element, from within a form constructor function.
+ *
+ * This function is intended for use in highly dynamic forms (in particular the
+ * add view wizard) which are rebuilt in different ways depending on which
+ * triggering element (AJAX or otherwise) was most recently fired. For example,
+ * sometimes it is necessary to decide how to build one dynamic form element
+ * based on the value of a different dynamic form element that may not have
+ * even been present on the form the last time it was submitted. This function
+ * takes care of resolving those conflicts and gives you the proper current
+ * value of the requested #select element.
+ *
+ * By necessity, this function sometimes uses non-validated user input from
+ * $form_state['input'] in making its determination. Although it performs some
+ * minor validation of its own, it is not complete. The intention is that the
+ * return value of this function should only be used to help decide how to
+ * build the current form the next time it is reloaded, not to be saved as if
+ * it had gone through the normal, final form validation process. Do NOT use
+ * the results of this function for any other purpose besides deciding how to
+ * build the next version of the form.
+ *
+ * @param $form_state
+ *   The  standard associative array containing the current state of the form.
+ * @param $parents
+ *   An array of parent keys that point to the part of the submitted form
+ *   values that are expected to contain the element's value (in the case where
+ *   this form element was actually submitted). In a simple case (assuming
+ *   #tree is TRUE throughout the form), if the select element is located in
+ *   $form['wrapper']['select'], so that the submitted form values would
+ *   normally be found in $form_state['values']['wrapper']['select'], you would
+ *   pass array('wrapper', 'select') for this parameter.
+ * @param $default_value
+ *   The default value to return if the #select element does not currently have
+ *   a proper value set based on the submitted input.
+ * @param $element
+ *   An array representing the current version of the #select element within
+ *   the form.
+ *
+ * @return
+ *   The current value of the #select element. A common use for this is to feed
+ *   it back into $element['#default_value'] so that the form will be rendered
+ *   with the correct value selected.
+ */
+function views_ui_get_selected($form_state, $parents, $default_value, $element) {
+  // For now, don't trust this to work on anything but a #select element.
+  if (!isset($element['#type']) || $element['#type'] != 'select' || !isset($element['#options'])) {
+    return $default_value;
+  }
+
+  // If there is a user-submitted value for this element that matches one of
+  // the currently available options attached to it, use that. We need to check
+  // $form_state['input'] rather than $form_state['values'] here because the
+  // triggering element often has the #limit_validation_errors property set to
+  // prevent unwanted errors elsewhere on the form. This means that the
+  // $form_state['values'] array won't be complete. We could make it complete
+  // by adding each required part of the form to the #limit_validation_errors
+  // property individually as the form is being built, but this is difficult to
+  // do for a highly dynamic and extensible form. This method is much simpler.
+  if (!empty($form_state['input'])) {
+    $key_exists = NULL;
+    $submitted = drupal_array_get_nested_value($form_state['input'], $parents, $key_exists);
+    // Check that the user-submitted value is one of the allowed options before
+    // returning it. This is not a substitute for actual form validation;
+    // rather it is necessary because, for example, the same select element
+    // might have #options A, B, and C under one set of conditions but #options
+    // D, E, F under a different set of conditions. So the form submission
+    // might have occurred with option A selected, but when the form is rebuilt
+    // option A is no longer one of the choices. In that case, we don't want to
+    // use the value that was submitted anymore but rather fall back to the
+    // default value.
+    if ($key_exists && in_array($submitted, array_keys($element['#options']))) {
+      return $submitted;
+    }
+  }
+
+  // Fall back on returning the default value if nothing was returned above.
+  return $default_value;
 }
 
 /**
@@ -229,6 +307,79 @@ function views_ui_nojs_submit($form, &$form_state) {
 }
 
 /**
+ * Validate the add view form.
+ */
+function views_ui_wizard_form_validate($form, &$form_state) {
+  $wizard = views_ui_get_wizard($form_state['values']['show']['wizard_key']);
+  $form_state['wizard'] = $wizard;
+  $form_state['wizard_instance'] = views_get_plugin('wizard', $wizard['id']);
+  $errors = $form_state['wizard_instance']->validateView($form, $form_state);
+  foreach ($errors as $name => $message) {
+    form_set_error($name, $message);
+  }
+}
+
+/**
+ * Process the add view form, 'save'.
+ */
+function views_ui_add_form_save_submit($form, &$form_state) {
+  try {
+    $view = $form_state['wizard_instance']->create_view($form, $form_state);
+  }
+  catch (WizardException $e) {
+    drupal_set_message($e->getMessage(), 'error');
+    $form_state['redirect'] = 'admin/structure/views';
+  }
+  $view->save();
+
+  $form_state['redirect'] = 'admin/structure/views';
+  if (!empty($view->displayHandlers['page_1'])) {
+    $display = $view->displayHandlers['page_1'];
+    if ($display->hasPath()) {
+      $one_path = $display->getOption('path');
+      if (strpos($one_path, '%') === FALSE) {
+        $form_state['redirect'] = $one_path;  // PATH TO THE VIEW IF IT HAS ONE
+        return;
+      }
+    }
+  }
+  drupal_set_message(t('Your view was saved. You may edit it from the list below.'));
+}
+
+/**
+ * Process the add view form, 'continue'.
+ */
+function views_ui_add_form_store_edit_submit($form, &$form_state) {
+  try {
+    $view = $form_state['wizard_instance']->create_view($form, $form_state);
+  }
+  catch (WizardException $e) {
+    drupal_set_message($e->getMessage(), 'error');
+    $form_state['redirect'] = 'admin/structure/views';
+  }
+  // Just cache it temporarily to edit it.
+  views_ui_cache_set($view);
+
+  // If there is a destination query, ensure we still redirect the user to the
+  // edit view page, and then redirect the user to the destination.
+  // @todo: Revisit this when http://drupal.org/node/1668866 is in.
+  $destination = array();
+  $query = drupal_container()->get('request')->query;
+  if ($query->has('destination')) {
+    $destination = drupal_get_destination();
+    $query->remove('destination');
+  }
+  $form_state['redirect'] = array('admin/structure/views/view/' . $view->storage->get('name'), array('query' => $destination));
+}
+
+/**
+ * Cancel the add view form.
+ */
+function views_ui_add_form_cancel_submit($form, &$form_state) {
+  $form_state['redirect'] = 'admin/structure/views';
+}
+
+/**
  * Form element validation handler for a taxonomy autocomplete field.
  *
  * This allows a taxonomy autocomplete field to be validated outside the
@@ -284,19 +435,19 @@ function views_ui_break_lock_confirm($form, &$form_state, ViewUI $view) {
   $form = array();
 
   if (empty($view->locked)) {
-    $form['message']['#markup'] = t('There is no lock on view %name to break.', array('%name' => $view->get('name')));
+    $form['message']['#markup'] = t('There is no lock on view %name to break.', array('%name' => $view->storage->get('name')));
     return $form;
   }
 
   $cancel = drupal_container()->get('request')->query->get('cancel');
   if (empty($cancel)) {
-    $cancel = 'admin/structure/views/view/' . $view->get('name') . '/edit';
+    $cancel = 'admin/structure/views/view/' . $view->storage->get('name') . '/edit';
   }
 
   $account = user_load($view->locked->owner);
   $form = confirm_form($form,
                   t('Are you sure you want to break the lock on view %name?',
-                  array('%name' => $view->get('name'))),
+                  array('%name' => $view->storage->get('name'))),
                   $cancel,
                   t('By breaking this lock, any unsaved changes made by !user will be lost!', array('!user' => theme('username', array('account' => $account)))),
                   t('Break lock'),
@@ -309,16 +460,46 @@ function views_ui_break_lock_confirm($form, &$form_state, ViewUI $view) {
  * Page callback for the Edit View page.
  */
 function views_ui_edit_page(ViewUI $view, $display_id = NULL) {
-  $view->displayID = $display_id;
-  $build['edit'] = entity_get_form($view, 'edit');
-  $build['preview'] = entity_get_form($view, 'preview');
+  $display_id = $view->getDisplayEditPage($display_id);
+  if (!in_array($display_id, array(MENU_ACCESS_DENIED, MENU_NOT_FOUND))) {
+    $build = array();
+    $form_state['build_info']['args'] = array($display_id);
+    $form_state['build_info']['callback'] = array($view, 'buildEditForm');
+    $build['edit_form'] = drupal_build_form('views_ui_edit_form', $form_state);
+    $build['preview'] = views_ui_build_preview($view, $display_id, FALSE);
+  }
+  else {
+    $build = $display_id;
+  }
+
   return $build;
 }
 
 function views_ui_build_preview(ViewUI $view, $display_id, $render = TRUE) {
-  $view->displayID = $display_id;
-  $view->renderPreview = $render;
-  return entity_get_form($view, 'preview');
+  $build = array(
+    '#theme_wrappers' => array('container'),
+    '#attributes' => array('id' => 'views-preview-wrapper', 'class' => 'views-admin clearfix'),
+  );
+
+  $form_state['build_info']['args'] = array($display_id);
+  $form_state['build_info']['callback'] = array($view, 'buildPreviewForm');
+  $build['controls'] = drupal_build_form('views_ui_preview_form', $form_state);
+
+  $args = array();
+  if (!empty($form_state['values']['view_args'])) {
+    $args = explode('/', $form_state['values']['view_args']);
+  }
+
+  if ($render) {
+    $clone = $view->cloneView();
+    $build['preview'] = array(
+      '#theme_wrappers' => array('container'),
+      '#attributes' => array('id' => 'views-live-preview'),
+      '#markup' => $clone->renderPreview($display_id, $args),
+    );
+  }
+
+  return $build;
 }
 
 /**
@@ -396,6 +577,96 @@ function views_ui_pre_render_move_argument_options($form) {
 }
 
 /**
+ * Validate that a view is complete and whole.
+ */
+function views_ui_edit_view_form_validate($form, &$form_state) {
+  // Do not validate cancel or delete or revert.
+  if (empty($form_state['clicked_button']['#value']) || $form_state['clicked_button']['#value'] != t('Save')) {
+    return;
+  }
+
+  $errors = $form_state['view']->validate();
+  if ($errors !== TRUE) {
+    foreach ($errors as $error) {
+      form_set_error('', $error);
+    }
+  }
+}
+
+/**
+ * Submit handler for the edit view form.
+ */
+function views_ui_edit_view_form_submit($form, &$form_state) {
+  // Go through and remove displayed scheduled for removal.
+  $displays = $form_state['view']->storage->get('display');
+  foreach ($displays as $id => $display) {
+    if (!empty($display['deleted'])) {
+      unset($form_state['view']->displayHandlers[$id]);
+      unset($displays[$id]);
+    }
+  }
+  // Rename display ids if needed.
+  foreach ($form_state['view']->displayHandlers as $id => $display) {
+    if (!empty($display->display['new_id'])) {
+      $new_id = $display->display['new_id'];
+      $form_state['view']->displayHandlers[$new_id] = $form_state['view']->displayHandlers[$id];
+      $form_state['view']->displayHandlers[$new_id]->display['id'] = $new_id;
+
+      $displays[$new_id] = $displays[$id];
+      unset($displays[$id]);
+      // Redirect the user to the renamed display to be sure that the page itself exists and doesn't throw errors.
+      $form_state['redirect'] = 'admin/structure/views/view/' . $form_state['view']->storage->get('name') . '/edit/' . $new_id;
+    }
+  }
+  $form_state['view']->storage->set('display', $displays);
+
+  // Direct the user to the right url, if the path of the display has changed.
+  $query = drupal_container()->get('request')->query;
+  // @todo: Revisit this when http://drupal.org/node/1668866 is in.
+  $destination = $query->get('destination');
+  if (!empty($destination)) {
+    // Find out the first display which has a changed path and redirect to this url.
+    $old_view = views_get_view($form_state['view']->storage->get('name'));
+    $old_view->initDisplay();
+    foreach ($old_view->displayHandlers as $id => $display) {
+      // Only check for displays with a path.
+      $old_path = $display->getOption('path');
+      if (empty($old_path)) {
+        continue;
+      }
+
+      if (($display->getPluginId() == 'page') && ($old_path == $destination) && ($old_path != $form_state['view']->displayHandlers[$id]->getOption('path'))) {
+        $destination = $form_state['view']->displayHandlers[$id]->getOption('path');
+        $query->remove('destination');
+        // @todo For whatever reason drupal_goto is still using $_GET.
+        // @see http://drupal.org/node/1668866
+        unset($_GET['destination']);
+      }
+    }
+    $form_state['redirect'] = $destination;
+  }
+
+  $form_state['view']->save();
+  drupal_set_message(t('The view %name has been saved.', array('%name' => $form_state['view']->storage->getHumanName())));
+
+  // Remove this view from cache so we can edit it properly.
+  drupal_container()->get('user.tempstore')->get('views')->delete($form_state['view']->storage->get('name'));
+}
+
+/**
+ * Submit handler for the edit view form.
+ */
+function views_ui_edit_view_form_cancel($form, &$form_state) {
+  // Remove this view from cache so edits will be lost.
+  drupal_container()->get('user.tempstore')->get('views')->delete($form_state['view']->storage->get('name'));
+  if (empty($form['view']->vid)) {
+    // I seem to have to drupal_goto here because I can't get fapi to
+    // honor the redirect target. Not sure what I screwed up here.
+    drupal_goto('admin/structure/views');
+  }
+}
+
+/**
  * Add a <select> dropdown for a given section, allowing the user to
  * change whether this info is stored on the default display or on
  * the current display.
@@ -403,9 +674,8 @@ function views_ui_pre_render_move_argument_options($form) {
 function views_ui_standard_display_dropdown(&$form, &$form_state, $section) {
   $view = &$form_state['view'];
   $display_id = $form_state['display_id'];
-  $executable = $view->get('executable');
-  $displays = $executable->displayHandlers;
-  $current_display = $executable->display_handler;
+  $displays = $view->displayHandlers;
+  $current_display = $view->display_handler;
 
   // Add the "2 of 3" progress indicator.
   // @TODO: Move this to a separate function if it's needed on any forms that
@@ -529,7 +799,7 @@ function views_ui_ajax_forms($key = NULL) {
 function views_ui_build_form_url($form_state) {
   $form = views_ui_ajax_forms($form_state['form_key']);
   $ajax = empty($form_state['ajax']) ? 'nojs' : 'ajax';
-  $name = $form_state['view']->get('name');
+  $name = $form_state['view']->storage->get('name');
   $url = "admin/structure/views/$ajax/$form_state[form_key]/$name/$form_state[display_id]";
   foreach ($form['args'] as $arg) {
     $url .= '/' . $form_state[$arg];
@@ -610,7 +880,7 @@ function views_ui_ajax_form($js, $key, ViewUI $view, $display_id = '') {
     }
     elseif (!$js) {
       // if nothing on the stack, non-js forms just go back to the main view editor.
-      return drupal_goto("admin/structure/views/view/{$view->get('name')}/edit");
+      return drupal_goto("admin/structure/views/view/{$view->storage->get('name')}/edit");
     }
     else {
       $output = array();
@@ -624,7 +894,7 @@ function views_ui_ajax_form($js, $key, ViewUI $view, $display_id = '') {
     // If this form was for view-wide changes, there's no need to regenerate
     // the display section of the form.
     if ($display_id !== '') {
-      entity_form_controller('view', 'edit')->rebuildCurrentTab($view, $output, $display_id);
+      $view->rebuildCurrentTab($output, $display_id);
     }
   }
 
@@ -640,7 +910,7 @@ function views_ui_analyze_view_form($form, &$form_state) {
   $form['#title'] = t('View analysis');
   $form['#section'] = 'analyze';
 
-  $analyzer = new Analyzer($view->get('executable'));
+  $analyzer = new Analyzer($view);
   $messages = $analyzer->getMessages();
 
   $form['analysis'] = array(
@@ -659,7 +929,7 @@ function views_ui_analyze_view_form($form, &$form_state) {
  * Submit handler for views_ui_analyze_view_form
  */
 function views_ui_analyze_view_form_submit($form, &$form_state) {
-  $form_state['redirect'] = 'admin/structure/views/view/' . $form_state['view']->get('name') . '/edit';
+  $form_state['redirect'] = 'admin/structure/views/view/' . $form_state['view']->storage->get('name') . '/edit';
 }
 
 /**
@@ -679,20 +949,20 @@ function views_ui_edit_details_form($form, &$form_state) {
     '#type' => 'textfield',
     '#title' => t('Human-readable name'),
     '#description' => t('A descriptive human-readable name for this view. Spaces are allowed'),
-    '#default_value' => $view->getHumanName(),
+    '#default_value' => $view->storage->getHumanName(),
   );
   $form['details']['tag'] = array(
     '#type' => 'textfield',
     '#title' => t('View tag'),
     '#description' => t('Optionally, enter a comma delimited list of tags for this view to use in filtering and sorting views on the administrative page.'),
-    '#default_value' => $view->get('tag'),
+    '#default_value' => $view->storage->get('tag'),
     '#autocomplete_path' => 'admin/views/ajax/autocomplete/tag',
   );
   $form['details']['description'] = array(
     '#type' => 'textfield',
     '#title' => t('View description'),
     '#description' => t('This description will appear on the Views administrative UI to tell you what the view is about.'),
-    '#default_value' => $view->get('description'),
+    '#default_value' => $view->storage->get('description'),
   );
 
   $view->getStandardButtons($form, $form_state, 'views_ui_edit_details_form');
@@ -708,7 +978,7 @@ function views_ui_edit_details_form_submit($form, &$form_state) {
     // Only save values onto the view if they're actual view properties
     // (as opposed to 'op' or 'form_build_id').
     if (isset($form['details'][$key])) {
-      $view->set($key, $value);
+      $view->storage->$key = $value;
     }
   }
   $form_state['#page_title'] = views_ui_edit_page_title($view);
@@ -723,18 +993,17 @@ function views_ui_edit_display_form($form, &$form_state) {
   $display_id = $form_state['display_id'];
   $section = $form_state['section'];
 
-  $executable = $view->get('executable');
-  if (!$executable->setDisplay($display_id)) {
+  if (!$view->setDisplay($display_id)) {
     views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
   }
-  $display = &$executable->display[$display_id];
+  $display = &$view->display[$display_id];
 
   // Get form from the handler.
   $form['options'] = array(
     '#theme_wrappers' => array('container'),
     '#attributes' => array('class' => array('scroll')),
   );
-  $executable->display_handler->buildOptionsForm($form['options'], $form_state);
+  $view->display_handler->buildOptionsForm($form['options'], $form_state);
 
   // The handler options form sets $form['#title'], which we need on the entire
   // $form instead of just the ['options'] section.
@@ -760,7 +1029,7 @@ function views_ui_edit_display_form($form, &$form_state) {
  * Validate handler for views_ui_edit_display_form
  */
 function views_ui_edit_display_form_validate($form, &$form_state) {
-  $form_state['view']->get('executable')->displayHandlers[$form_state['display_id']]->validateOptionsForm($form['options'], $form_state);
+  $form_state['view']->displayHandlers[$form_state['display_id']]->validateOptionsForm($form['options'], $form_state);
 
   if (form_get_errors()) {
     $form_state['rerender'] = TRUE;
@@ -771,7 +1040,7 @@ function views_ui_edit_display_form_validate($form, &$form_state) {
  * Submit handler for views_ui_edit_display_form
  */
 function views_ui_edit_display_form_submit($form, &$form_state) {
-  $form_state['view']->get('executable')->displayHandlers[$form_state['display_id']]->submitOptionsForm($form['options'], $form_state);
+  $form_state['view']->displayHandlers[$form_state['display_id']]->submitOptionsForm($form['options'], $form_state);
 
   views_ui_cache_set($form_state['view']);
 }
@@ -782,7 +1051,7 @@ function views_ui_edit_display_form_submit($form, &$form_state) {
  * @TODO: Not currently used. Remove unless we implement an override toggle.
  */
 function views_ui_edit_display_form_override($form, &$form_state) {
-  $form_state['view']->get('executable')->displayHandlers[$form_state['display_id']]->optionsOverride($form['options'], $form_state);
+  $form_state['view']->displayHandlers[$form_state['display_id']]->optionsOverride($form['options'], $form_state);
 
   views_ui_cache_set($form_state['view']);
   $form_state['rerender'] = TRUE;
@@ -797,12 +1066,11 @@ function views_ui_rearrange_form($form, &$form_state) {
   $display_id = $form_state['display_id'];
   $type = $form_state['type'];
 
-  $types = ViewExecutable::viewsHandlerTypes();
-  $executable = $view->get('executable');
-  if (!$executable->setDisplay($display_id)) {
+  $types = ViewUI::viewsHandlerTypes();
+  if (!$view->setDisplay($display_id)) {
     views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
   }
-  $display = &$executable->displayHandlers[$display_id];
+  $display = &$view->displayHandlers[$display_id];
   $form['#title'] = t('Rearrange @type', array('@type' => $types[$type]['ltitle']));
   $form['#section'] = $display_id . 'rearrange-item';
 
@@ -823,7 +1091,7 @@ function views_ui_rearrange_form($form, &$form_state) {
   $groups = array();
   $grouping = FALSE;
   if ($type == 'filter') {
-    $group_info = $executable->display_handler->getOption('filter_groups');
+    $group_info = $view->display_handler->getOption('filter_groups');
     if (!empty($group_info['groups']) && count($group_info['groups']) > 1) {
       $grouping = TRUE;
       $groups = array(0 => array());
@@ -881,8 +1149,8 @@ function views_ui_rearrange_form($form, &$form_state) {
  * Submit handler for rearranging form.
  */
 function views_ui_rearrange_form_submit($form, &$form_state) {
-  $types = ViewExecutable::viewsHandlerTypes();
-  $display = &$form_state['view']->get('executable')->displayHandlers[$form_state['display_id']];
+  $types = ViewUI::viewsHandlerTypes();
+  $display = &$form_state['view']->displayHandlers[$form_state['display_id']];
 
   $old_fields = $display->getOption($types[$form_state['type']]['plural']);
   $new_fields = $order = array();
@@ -917,12 +1185,11 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
   $display_id = $form_state['display_id'];
   $type = $form_state['type'];
 
-  $types = ViewExecutable::viewsHandlerTypes();
-  $executable = $view->get('executable');
-  if (!$executable->setDisplay($display_id)) {
+  $types = ViewUI::viewsHandlerTypes();
+  if (!$view->setDisplay($display_id)) {
     views_ajax_render(t('Invalid display id @display', array('@display' => $display_id)));
   }
-  $display = $executable->displayHandlers[$display_id];
+  $display = $view->displayHandlers[$display_id];
   $form['#title'] = check_plain($display->display['display_title']) . ': ';
   $form['#title'] .= t('Rearrange @type', array('@type' => $types[$type]['ltitle']));
   $form['#section'] = $display_id . 'rearrange-item';
@@ -1091,8 +1358,8 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
  * Submit handler for rearranging form
  */
 function views_ui_rearrange_filter_form_submit($form, &$form_state) {
-  $types = ViewExecutable::viewsHandlerTypes();
-  $display = &$form_state['view']->get('executable')->displayHandlers[$form_state['display_id']];
+  $types = ViewUI::viewsHandlerTypes();
+  $display = &$form_state['view']->displayHandlers[$form_state['display_id']];
   $remember_groups = array();
 
   if (!empty($form_state['view']->form_cache)) {
@@ -1209,13 +1476,12 @@ function views_ui_add_item_form($form, &$form_state) {
     ),
   );
 
-  $executable = $view->get('executable');
-  if (!$executable->setDisplay($display_id)) {
+  if (!$view->setDisplay($display_id)) {
     views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
   }
-  $display = &$executable->displayHandlers[$display_id];
+  $display = &$view->displayHandlers[$display_id];
 
-  $types = ViewExecutable::viewsHandlerTypes();
+  $types = ViewUI::viewsHandlerTypes();
   $ltitle = $types[$type]['ltitle'];
   $section = $types[$type]['plural'];
 
@@ -1230,7 +1496,7 @@ function views_ui_add_item_form($form, &$form_state) {
   views_ui_standard_display_dropdown($form, $form_state, $section);
 
   // Figure out all the base tables allowed based upon what the relationships provide.
-  $base_tables = $executable->getBaseTables();
+  $base_tables = $view->getBaseTables();
   $options = views_fetch_fields(array_keys($base_tables), $type, $display->useGroupBy(), $form_state['type']);
 
   if (!empty($options)) {
@@ -1345,7 +1611,7 @@ function views_ui_config_item_form_build_group($form, &$form_state) {
     $form_state['handler']->build_group_options();
   }
 
-  $form_state['view']->get('executable')->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+  $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
 
   $form_state['view']->addFormToStack($form_state['form_key'], $form_state['display_id'], array($form_state['type'], $form_state['id']), TRUE, TRUE);
 
@@ -1364,7 +1630,7 @@ function views_ui_config_item_form_add_group($form, &$form_state) {
   // Add a new row.
   $item['group_info']['group_items'][] = array();
 
-  $form_state['view']->get('executable')->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+  $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
 
   views_ui_cache_set($form_state['view']);
   $form_state['rerender'] = TRUE;
@@ -1388,30 +1654,29 @@ function views_ui_config_item_form($form, &$form_state) {
       '#attributes' => array('class' => array('scroll')),
     ),
   );
-  $executable = $view->get('executable');
-  if (!$executable->setDisplay($display_id)) {
+  if (!$view->setDisplay($display_id)) {
     views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
   }
-  $item = $executable->getItem($display_id, $type, $id);
+  $item = $view->getItem($display_id, $type, $id);
 
   if ($item) {
-    $handler = $executable->display_handler->getHandler($type, $id);
+    $handler = $view->display_handler->getHandler($type, $id);
     if (empty($handler)) {
       $form['markup'] = array('#markup' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
     }
     else {
-      $types = ViewExecutable::viewsHandlerTypes();
+      $types = ViewUI::viewsHandlerTypes();
 
       // If this item can come from the default display, show a dropdown
       // that lets the user choose which display the changes should apply to.
-      if ($executable->display_handler->defaultableSections($types[$type]['plural'])) {
+      if ($view->display_handler->defaultableSections($types[$type]['plural'])) {
         $form_state['section'] = $types[$type]['plural'];
         views_ui_standard_display_dropdown($form, $form_state, $form_state['section']);
       }
 
       // A whole bunch of code to figure out what relationships are valid for
       // this item.
-      $relationships = $executable->display_handler->getOption('relationships');
+      $relationships = $view->display_handler->getOption('relationships');
       $relationship_options = array();
 
       foreach ($relationships as $relationship) {
@@ -1429,9 +1694,9 @@ function views_ui_config_item_form($form, &$form_state) {
         // If this relationship is valid for this type, add it to the list.
         $data = views_fetch_data($relationship['table']);
         $base = $data[$relationship['field']]['relationship']['base'];
-        $base_fields = views_fetch_fields($base, $form_state['type'], $executable->display_handler->useGroupBy());
+        $base_fields = views_fetch_fields($base, $form_state['type'], $view->display_handler->useGroupBy());
         if (isset($base_fields[$item['table'] . '.' . $item['field']])) {
-          $relationship_handler->init($executable, $relationship);
+          $relationship_handler->init($view, $relationship);
           $relationship_options[$relationship['id']] = $relationship_handler->label();
         }
       }
@@ -1439,7 +1704,7 @@ function views_ui_config_item_form($form, &$form_state) {
       if (!empty($relationship_options)) {
         // Make sure the existing relationship is even valid. If not, force
         // it to none.
-        $base_fields = views_fetch_fields($view->get('base_table'), $form_state['type'], $executable->display_handler->useGroupBy());
+        $base_fields = views_fetch_fields($view->storage->get('base_table'), $form_state['type'], $view->display_handler->useGroupBy());
         if (isset($base_fields[$item['table'] . '.' . $item['field']])) {
           $relationship_options = array_merge(array('none' => t('Do not use a relationship')), $relationship_options);
         }
@@ -1449,7 +1714,7 @@ function views_ui_config_item_form($form, &$form_state) {
           $rel = key($relationship_options);
           // We want this relationship option to get saved even if the user
           // skips submitting the form.
-          $executable->setItemOption($display_id, $type, $id, 'relationship', $rel);
+          $view->setItemOption($display_id, $type, $id, 'relationship', $rel);
           $temp_view = $view->cloneView();
           views_ui_cache_set($temp_view);
         }
@@ -1520,7 +1785,7 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) {
   // Run it through the handler's submit function.
   $form_state['handler']->submitOptionsForm($form['options'], $form_state);
   $item = $form_state['handler']->options;
-  $types = ViewExecutable::viewsHandlerTypes();
+  $types = ViewUI::viewsHandlerTypes();
 
   // For footer/header $handler_type is area but $type is footer/header.
   // For all other handle types it's the same.
@@ -1530,12 +1795,11 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) {
   }
 
   $override = NULL;
-  $executable = $form_state['view']->get('executable');
-  if ($executable->display_handler->useGroupBy() && !empty($item['group_type'])) {
-    if (empty($executable->query)) {
-      $executable->initQuery();
+  if ($form_state['view']->display_handler->useGroupBy() && !empty($item['group_type'])) {
+    if (empty($form_state['view']->query)) {
+      $form_state['view']->initQuery();
     }
-    $aggregate = $executable->query->get_aggregation_info();
+    $aggregate = $form_state['view']->query->get_aggregation_info();
     if (!empty($aggregate[$item['group_type']]['handler'][$type])) {
       $override = $aggregate[$item['group_type']]['handler'][$type];
     }
@@ -1544,7 +1808,7 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) {
   // Create a new handler and unpack the options from the form onto it. We
   // can use that for storage.
   $handler = views_get_handler($item['table'], $item['field'], $handler_type, $override);
-  $handler->init($executable, $item);
+  $handler->init($form_state['view'], $item);
 
   // Add the incoming options to existing options because items using
   // the extra form may not have everything in the form here.
@@ -1575,7 +1839,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
   // Run it through the handler's submit function.
   $form_state['handler']->submitOptionsForm($form['options'], $form_state);
   $item = $form_state['handler']->options;
-  $types = ViewExecutable::viewsHandlerTypes();
+  $types = ViewUI::viewsHandlerTypes();
 
   // For footer/header $handler_type is area but $type is footer/header.
   // For all other handle types it's the same.
@@ -1585,12 +1849,11 @@ function views_ui_config_item_form_submit($form, &$form_state) {
   }
 
   $override = NULL;
-  $executable = $form_state['view']->get('executable');
-  if ($executable->display_handler->useGroupBy() && !empty($item['group_type'])) {
-    if (empty($executable->query)) {
-      $executable->initQuery();
+  if ($form_state['view']->display_handler->useGroupBy() && !empty($item['group_type'])) {
+    if (empty($form_state['view']->query)) {
+      $form_state['view']->initQuery();
     }
-    $aggregate = $executable->query->get_aggregation_info();
+    $aggregate = $form_state['view']->query->get_aggregation_info();
     if (!empty($aggregate[$item['group_type']]['handler'][$type])) {
       $override = $aggregate[$item['group_type']]['handler'][$type];
     }
@@ -1599,7 +1862,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
   // Create a new handler and unpack the options from the form onto it. We
   // can use that for storage.
   $handler = views_get_handler($item['table'], $item['field'], $handler_type, $override);
-  $handler->init($executable, $item);
+  $handler->init($form_state['view'], $item);
 
   // Add the incoming options to existing options because items using
   // the extra form may not have everything in the form here.
@@ -1610,7 +1873,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
   $handler->unpackOptions($handler->options, $options, NULL, FALSE);
 
   // Store the item back on the view
-  $executable->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $handler->options);
+  $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $handler->options);
 
   // Ensure any temporary options are removed.
   if (isset($form_state['view']->temporary_options[$type][$form_state['id']])) {
@@ -1637,23 +1900,22 @@ function views_ui_config_item_group_form($type, &$form_state) {
       '#attributes' => array('class' => array('scroll')),
     ),
   );
-  $executable = $view->get('executable');
-  if (!$executable->setDisplay($display_id)) {
+  if (!$view->setDisplay($display_id)) {
     views_ajax_render(t('Invalid display id @display', array('@display' => $display_id)));
   }
 
-  $executable->initQuery();
+  $view->initQuery();
 
-  $item = $executable->getItem($display_id, $type, $id);
+  $item = $view->getItem($display_id, $type, $id);
 
   if ($item) {
-    $handler = $executable->display_handler->getHandler($type, $id);
+    $handler = $view->display_handler->getHandler($type, $id);
     if (empty($handler)) {
       $form['markup'] = array('#markup' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
     }
     else {
       $handler->init($view, $item);
-      $types = ViewExecutable::viewsHandlerTypes();
+      $types = ViewUI::viewsHandlerTypes();
 
       $form['#title'] = t('Configure group settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->adminLabel()));
 
@@ -1675,12 +1937,12 @@ function views_ui_config_item_group_form_submit($form, &$form_state) {
   $id = $form_state['id'];
 
   $handler = views_get_handler($item['table'], $item['field'], $type);
-  $handler->init($form_state['view']->get('executable'), $item);
+  $handler->init($form_state['view'], $item);
 
   $handler->submitGroupByForm($form, $form_state);
 
   // Store the item back on the view
-  $form_state['view']->get('executable')->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+  $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
 
   // Write to cache
   views_ui_cache_set($form_state['view']);
@@ -1694,10 +1956,10 @@ function views_ui_config_item_form_remove($form, &$form_state) {
   list($was_defaulted, $is_defaulted) = $form_state['view']->getOverrideValues($form, $form_state);
   // If the display selection was changed toggle the override value.
   if ($was_defaulted != $is_defaulted) {
-    $display =& $form_state['view']->get('executable')->displayHandlers[$form_state['display_id']];
+    $display =& $form_state['view']->displayHandlers[$form_state['display_id']];
     $display->optionsOverride($form, $form_state);
   }
-  $form_state['view']->get('executable')->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], NULL);
+  $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], NULL);
 
   // Write to cache
   views_ui_cache_set($form_state['view']);
@@ -1716,7 +1978,7 @@ function views_ui_config_item_form_expose($form, &$form_state) {
     $form_state['handler']->defaultExposeOptions();
   }
 
-  $form_state['view']->get('executable')->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+  $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
 
   $form_state['view']->addFormToStack($form_state['form_key'], $form_state['display_id'], array($form_state['type'], $form_state['id']), TRUE, TRUE);
 
@@ -1742,20 +2004,19 @@ function views_ui_config_item_extra_form($form, &$form_state) {
       '#attributes' => array('class' => array('scroll')),
     ),
   );
-  $executable = $view->get('executable');
-  if (!$executable->setDisplay($display_id)) {
+  if (!$view->setDisplay($display_id)) {
     views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
   }
-  $item = $executable->getItem($display_id, $type, $id);
+  $item = $view->getItem($display_id, $type, $id);
 
   if ($item) {
-    $handler = $executable->display_handler->getHandler($type, $id);
+    $handler = $view->display_handler->getHandler($type, $id);
     if (empty($handler)) {
       $form['markup'] = array('#markup' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
     }
     else {
       $handler->init($view, $item);
-      $types = ViewExecutable::viewsHandlerTypes();
+      $types = ViewUI::viewsHandlerTypes();
 
       $form['#title'] = t('Configure extra settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->adminLabel()));
 
@@ -1792,7 +2053,7 @@ function views_ui_config_item_extra_form_submit($form, &$form_state) {
   }
 
   // Store the item back on the view
-  $form_state['view']->get('executable')->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+  $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
 
   // Write to cache
   views_ui_cache_set($form_state['view']);
@@ -1803,7 +2064,7 @@ function views_ui_config_item_extra_form_submit($form, &$form_state) {
  */
 function views_ui_admin_settings_basic($form, &$form_state) {
   $form = array();
-  $form['#attached']['css'] = ViewFormControllerBase::getAdminCSS();
+  $form['#attached']['css'] = ViewUI::getAdminCSS();
 
   $config = config('views.settings');
 
@@ -1943,7 +2204,7 @@ function views_ui_admin_settings_basic_submit(&$form, &$form_state) {
  */
 function views_ui_admin_settings_advanced() {
   $form = array();
-  $form['#attached']['css'] = ViewFormControllerBase::getAdminCSS();
+  $form['#attached']['css'] = ViewUI::getAdminCSS();
 
   $config = config('views.settings');
 
@@ -2100,9 +2361,8 @@ function views_ui_autocomplete_tag($string = '') {
   // get matches from default views:
   $views = views_get_all_views();
   foreach ($views as $view) {
-    $tag = $view->get('tag');
-    if ($tag && strpos($tag, $string) === 0) {
-      $matches[$tag] = $tag;
+    if (!empty($view->tag) && strpos($view->tag, $string) === 0) {
+      $matches[$view->tag] = $view->tag;
       if (count($matches) >= 10) {
         break;
       }
@@ -2322,20 +2582,20 @@ function views_ui_field_list() {
   // Fetch all fieldapi fields which are used in views
   // Therefore search in all views, displays and handler-types.
   $fields = array();
-  $handler_types = ViewExecutable::viewsHandlerTypes();
+  $handler_types = ViewUI::viewsHandlerTypes();
   foreach ($views as $view) {
-    $executable = $view->get('executable');
-    $executable->initDisplay();
-    foreach ($executable->displayHandlers as $display_id => $display) {
-      if ($executable->setDisplay($display_id)) {
+    $view = $view->getExecutable();
+    $view->initDisplay();
+    foreach ($view->displayHandlers as $display_id => $display) {
+      if ($view->setDisplay($display_id)) {
         foreach ($handler_types as $type => $info) {
-          foreach ($executable->getItems($type, $display_id) as $item) {
+          foreach ($view->getItems($type, $display_id) as $item) {
             $data = views_fetch_data($item['table']);
             if (isset($data[$item['field']]) && isset($data[$item['field']][$type])
               && $data = $data[$item['field']][$type]) {
               // The final check that we have a fieldapi field now.
               if (isset($data['field_name'])) {
-                $fields[$data['field_name']][$view->get('name')] = $view->get('name');
+                $fields[$data['field_name']][$view->storage->get('name')] = $view->storage->get('name');
               }
             }
           }
diff --git a/core/modules/views/views_ui/css/views-admin.css b/core/modules/views/views_ui/css/views-admin.css
index dfb22a9..3683c57 100644
--- a/core/modules/views/views_ui/css/views-admin.css
+++ b/core/modules/views/views_ui/css/views-admin.css
@@ -375,7 +375,3 @@ html.js span.js-only {
 }
 
 /* @end */
-
-.js .views-edit-view .dropbutton-widget {
-  position: static;
-}
diff --git a/core/modules/views/views_ui/js/views-admin.js b/core/modules/views/views_ui/js/views-admin.js
index c5a3fc0..b0c63f8 100644
--- a/core/modules/views/views_ui/js/views-admin.js
+++ b/core/modules/views/views_ui/js/views-admin.js
@@ -874,6 +874,39 @@ Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) {
 };
 
 /**
+ * Ensure the desired default button is used when a form is implicitly submitted via an ENTER press on textfields, radios, and checkboxes.
+ *
+ * @see http://www.w3.org/TR/html5/association-of-controls-and-forms.html#implicit-submission
+ */
+Drupal.behaviors.viewsImplicitFormSubmission = {};
+Drupal.behaviors.viewsImplicitFormSubmission.attach = function (context, settings) {
+
+  "use strict";
+
+  var $ = jQuery;
+  $(':text, :password, :radio, :checkbox', context).once('viewsImplicitFormSubmission', function() {
+    $(this).keypress(function(event) {
+      if (event.which === 13) {
+        var formId = this.form.id;
+        if (formId && settings.viewsImplicitFormSubmission && settings.viewsImplicitFormSubmission[formId] && settings.viewsImplicitFormSubmission[formId].defaultButton) {
+          event.preventDefault();
+          var buttonId = settings.viewsImplicitFormSubmission[formId].defaultButton;
+          var $button = $('#' + buttonId, this.form);
+          if ($button.length === 1 && $button.is(':enabled')) {
+            if (Drupal.ajax && Drupal.ajax[buttonId]) {
+              $button.trigger(Drupal.ajax[buttonId].element_settings.event);
+            }
+            else {
+              $button.click();
+            }
+          }
+        }
+      }
+    });
+  });
+};
+
+/**
  * Remove icon class from elements that are themed as buttons or dropbuttons.
  */
 Drupal.behaviors.viewsRemoveIconClass = {};
diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewAddFormController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewAddFormController.php
deleted file mode 100644
index d8db8ef..0000000
--- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewAddFormController.php
+++ /dev/null
@@ -1,226 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\views_ui\ViewAddFormController.
- */
-
-namespace Drupal\views_ui;
-
-use Drupal\Core\Entity\EntityInterface;
-use Drupal\views\Plugin\views\wizard\WizardPluginBase;
-
-/**
- * Form controller for the Views edit form.
- */
-class ViewAddFormController extends ViewFormControllerBase {
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::prepareForm().
-   */
-  protected function prepareEntity(EntityInterface $view) {
-    // Do not prepare the entity while it is being added.
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::form().
-   */
-  public function form(array $form, array &$form_state, EntityInterface $view) {
-    $form['#attached']['css'] = static::getAdminCSS();
-    $form['#attached']['js'][] = drupal_get_path('module', 'views_ui') . '/js/views-admin.js';
-    $form['#attributes']['class'] = array('views-admin');
-
-    $form['name'] = array(
-      '#type' => 'fieldset',
-      '#attributes' => array('class' => array('fieldset-no-legend')),
-    );
-
-    $form['name']['human_name'] = array(
-      '#type' => 'textfield',
-      '#title' => t('View name'),
-      '#required' => TRUE,
-      '#size' => 32,
-      '#default_value' => '',
-      '#maxlength' => 255,
-    );
-    $form['name']['name'] = array(
-      '#type' => 'machine_name',
-      '#maxlength' => 128,
-      '#machine_name' => array(
-        'exists' => 'views_get_view',
-        'source' => array('name', 'human_name'),
-      ),
-      '#description' => t('A unique machine-readable name for this View. It must only contain lowercase letters, numbers, and underscores.'),
-    );
-
-    $form['name']['description_enable'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Description'),
-    );
-    $form['name']['description'] = array(
-      '#type' => 'textfield',
-      '#title' => t('Provide description'),
-      '#title_display' => 'invisible',
-      '#size' => 64,
-      '#default_value' => '',
-      '#states' => array(
-        'visible' => array(
-          ':input[name="description_enable"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
-
-    // Create a wrapper for the entire dynamic portion of the form. Everything
-    // that can be updated by AJAX goes somewhere inside here. For example, this
-    // is needed by "Show" dropdown (below); it changes the base table of the
-    // view and therefore potentially requires all options on the form to be
-    // dynamically updated.
-    $form['displays'] = array();
-
-    // Create the part of the form that allows the user to select the basic
-    // properties of what the view will display.
-    $form['displays']['show'] = array(
-      '#type' => 'fieldset',
-      '#tree' => TRUE,
-      '#attributes' => array('class' => array('container-inline')),
-    );
-
-    // Create the "Show" dropdown, which allows the base table of the view to be
-    // selected.
-    $wizard_plugins = views_ui_get_wizards();
-    $options = array();
-    foreach ($wizard_plugins as $key => $wizard) {
-      $options[$key] = $wizard['title'];
-    }
-    $form['displays']['show']['wizard_key'] = array(
-      '#type' => 'select',
-      '#title' => t('Show'),
-      '#options' => $options,
-    );
-    $show_form = &$form['displays']['show'];
-    $default_value = module_exists('node') ? 'node' : 'users';
-    $show_form['wizard_key']['#default_value'] = WizardPluginBase::getSelected($form_state, array('show', 'wizard_key'), $default_value, $show_form['wizard_key']);
-    // Changing this dropdown updates the entire content of $form['displays'] via
-    // AJAX.
-    views_ui_add_ajax_trigger($show_form, 'wizard_key', array('displays'));
-
-    // Build the rest of the form based on the currently selected wizard plugin.
-    $wizard_key = $show_form['wizard_key']['#default_value'];
-    $wizard_instance = views_get_plugin('wizard', $wizard_key);
-    $form = $wizard_instance->build_form($form, $form_state);
-
-    return $form;
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::actions().
-   */
-  protected function actions(array $form, array &$form_state) {
-    $actions = parent::actions($form, $form_state);
-    $actions['submit']['#value'] = t('Save & exit');
-    $actions['continueAndEdit'] = array(
-      '#value' => t('Continue & edit'),
-      '#validate' => array(
-        array($this, 'validate'),
-      ),
-      '#submit' => array(
-        array($this, 'continueAndEdit'),
-      ),
-    );
-
-    $actions['cancel'] = array(
-      '#value' => t('Cancel'),
-      '#submit' => array(
-        array($this, 'cancel'),
-      ),
-      '#limit_validation_errors' => array(),
-    );
-    return $actions;
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::validate().
-   */
-  public function validate(array $form, array &$form_state) {
-    $wizard = views_ui_get_wizard($form_state['values']['show']['wizard_key']);
-    $form_state['wizard'] = $wizard;
-    $form_state['wizard_instance'] = views_get_plugin('wizard', $wizard['id']);
-    $errors = $form_state['wizard_instance']->validateView($form, $form_state);
-    foreach ($errors as $name => $message) {
-      form_set_error($name, $message);
-    }
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::submit().
-   */
-  public function submit(array $form, array &$form_state) {
-    try {
-      $view = $form_state['wizard_instance']->create_view($form, $form_state);
-    }
-    catch (WizardException $e) {
-      drupal_set_message($e->getMessage(), 'error');
-      $form_state['redirect'] = 'admin/structure/views';
-      return;
-    }
-    $view->save();
-
-    $form_state['redirect'] = 'admin/structure/views';
-    if (!empty($view->get('executable')->displayHandlers['page_1'])) {
-      $display = $view->get('executable')->displayHandlers['page_1'];
-      if ($display->hasPath()) {
-        $one_path = $display->getOption('path');
-        if (strpos($one_path, '%') === FALSE) {
-          $form_state['redirect'] = $one_path;  // PATH TO THE VIEW IF IT HAS ONE
-          return;
-        }
-      }
-    }
-    drupal_set_message(t('Your view was saved. You may edit it from the list below.'));
-  }
-
-  /**
-   * Form submission handler for the 'continue' action.
-   *
-   * @param array $form
-   *   An associative array containing the structure of the form.
-   * @param array $form_state
-   *   A reference to a keyed array containing the current state of the form.
-   */
-  public function continueAndEdit(array $form, array &$form_state) {
-    try {
-      $view = $form_state['wizard_instance']->create_view($form, $form_state);
-    }
-    catch (WizardException $e) {
-      drupal_set_message($e->getMessage(), 'error');
-      $form_state['redirect'] = 'admin/structure/views';
-      return;
-    }
-    // Just cache it temporarily to edit it.
-    views_ui_cache_set($view);
-
-    // If there is a destination query, ensure we still redirect the user to the
-    // edit view page, and then redirect the user to the destination.
-    // @todo: Revisit this when http://drupal.org/node/1668866 is in.
-    $destination = array();
-    $query = drupal_container()->get('request')->query;
-    if ($query->has('destination')) {
-      $destination = drupal_get_destination();
-      $query->remove('destination');
-    }
-    $form_state['redirect'] = array('admin/structure/views/view/' . $view->get('name'), array('query' => $destination));
-  }
-
-  /**
-   * Form submission handler for the 'cancel' action.
-   *
-   * @param array $form
-   *   An associative array containing the structure of the form.
-   * @param array $form_state
-   *   A reference to a keyed array containing the current state of the form.
-   */
-  public function cancel(array $form, array &$form_state) {
-    $form_state['redirect'] = 'admin/structure/views';
-  }
-
-}
diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
deleted file mode 100644
index b9d966b..0000000
--- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
+++ /dev/null
@@ -1,997 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\views_ui\ViewEditFormController.
- */
-
-namespace Drupal\views_ui;
-
-use Drupal\Core\Entity\EntityInterface;
-use Drupal\views\ViewExecutable;
-
-/**
- * Form controller for the Views edit form.
- */
-class ViewEditFormController extends ViewFormControllerBase {
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::getEntity().
-   */
-  public function getEntity(array $form_state) {
-    return isset($form_state['view']) ? $form_state['view'] : NULL;
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::setEntity().
-   */
-  public function setEntity(EntityInterface $entity, array &$form_state) {
-    $form_state['view'] = $entity;
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::form().
-   */
-  public function form(array $form, array &$form_state, EntityInterface $view) {
-    $display_id = $view->displayID;
-    // Do not allow the form to be cached, because $form_state['view'] can become
-    // stale between page requests.
-    // See views_ui_ajax_get_form() for how this affects #ajax.
-    // @todo To remove this and allow the form to be cacheable:
-    //   - Change $form_state['view'] to $form_state['temporary']['view'].
-    //   - Add a #process function to initialize $form_state['temporary']['view']
-    //     on cached form submissions.
-    //   - Use form_load_include().
-    $form_state['no_cache'] = TRUE;
-
-    if ($display_id) {
-      if (!$view->get('executable')->setDisplay($display_id)) {
-        $form['#markup'] = t('Invalid display id @display', array('@display' => $display_id));
-        return $form;
-      }
-    }
-
-    $form['#tree'] = TRUE;
-
-    $form['#attached']['library'][] = array('system', 'jquery.ui.tabs');
-    $form['#attached']['library'][] = array('system', 'jquery.ui.dialog');
-    $form['#attached']['library'][] = array('system', 'drupal.ajax');
-    $form['#attached']['library'][] = array('system', 'jquery.form');
-    $form['#attached']['library'][] = array('system', 'drupal.states');
-    $form['#attached']['library'][] = array('system', 'drupal.tabledrag');
-
-    $form['#attached']['css'] = static::getAdminCSS();
-
-    $form['#attached']['js'][] = drupal_get_path('module', 'views_ui') . '/js/views-admin.js';
-    $form['#attached']['js'][] = array(
-      'data' => array('views' => array('ajax' => array(
-        'id' => '#views-ajax-body',
-        'title' => '#views-ajax-title',
-        'popup' => '#views-ajax-popup',
-        'defaultForm' => $view->getDefaultAJAXMessage(),
-      ))),
-      'type' => 'setting',
-    );
-
-    $form += array(
-      '#prefix' => '',
-      '#suffix' => '',
-    );
-    $form['#prefix'] .= '<div class="views-edit-view views-admin clearfix">';
-    $form['#suffix'] = '</div>' . $form['#suffix'];
-
-    $form['#attributes']['class'] = array('form-edit');
-
-    if (isset($view->locked) && is_object($view->locked) && $view->locked->owner != $GLOBALS['user']->uid) {
-      $form['locked'] = array(
-        '#type' => 'container',
-        '#attributes' => array('class' => array('view-locked', 'messages', 'warning')),
-        '#children' => t('This view is being edited by user !user, and is therefore locked from editing by others. This lock is !age old. Click here to <a href="!break">break this lock</a>.', array('!user' => theme('username', array('account' => user_load($view->locked->owner))), '!age' => format_interval(REQUEST_TIME - $view->locked->updated), '!break' => url('admin/structure/views/view/' . $view->get('name') . '/break-lock'))),
-        '#weight' => -10,
-      );
-    }
-    else {
-      if (isset($view->vid) && $view->vid == 'new') {
-        $message = t('* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard the view.');
-      }
-      else {
-        $message = t('* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard your changes.');
-      }
-
-      $form['changed'] = array(
-        '#type' => 'container',
-        '#attributes' => array('class' => array('view-changed', 'messages', 'warning')),
-        '#children' => $message,
-        '#weight' => -10,
-      );
-      if (empty($view->changed)) {
-        $form['changed']['#attributes']['class'][] = 'js-hide';
-      }
-    }
-
-    $form['help_text'] = array(
-      '#type' => 'container',
-      '#children' => t('Modify the display(s) of your view below or add new displays.'),
-    );
-    $form['displays'] = array(
-      '#prefix' => '<h1 class="unit-title clearfix">' . t('Displays') . '</h1>',
-      '#type' => 'container',
-      '#attributes' => array(
-        'class' => array(
-          'views-displays',
-        ),
-      ),
-    );
-
-
-    $form['displays']['top'] = $this->renderDisplayTop($view);
-
-    // The rest requires a display to be selected.
-    if ($display_id) {
-      $form_state['display_id'] = $display_id;
-
-      // The part of the page where editing will take place.
-      $form['displays']['settings'] = array(
-        '#type' => 'container',
-        '#id' => 'edit-display-settings',
-      );
-      $display_title = $this->getDisplayLabel($view, $display_id, FALSE);
-
-      // Add a text that the display is disabled.
-      if (!empty($view->get('executable')->displayHandlers[$display_id])) {
-        if (!$view->get('executable')->displayHandlers[$display_id]->isEnabled()) {
-          $form['displays']['settings']['disabled']['#markup'] = t('This display is disabled.');
-        }
-      }
-
-      // Add the edit display content
-      $tab_content = $this->getDisplayTab($view);
-      $tab_content['#theme_wrappers'] = array('container');
-      $tab_content['#attributes'] = array('class' => array('views-display-tab'));
-      $tab_content['#id'] = 'views-tab-' . $display_id;
-      // Mark deleted displays as such.
-      $display = $view->get('display');
-      if (!empty($display[$display_id]['deleted'])) {
-        $tab_content['#attributes']['class'][] = 'views-display-deleted';
-      }
-      // Mark disabled displays as such.
-      if (isset($view->get('executable')->displayHandlers[$display_id]) && !$view->get('executable')->displayHandlers[$display_id]->isEnabled()) {
-        $tab_content['#attributes']['class'][] = 'views-display-disabled';
-      }
-      $form['displays']['settings']['settings_content'] = array(
-        '#type' => 'container',
-        'tab_content' => $tab_content,
-      );
-
-      // The content of the popup dialog.
-      $form['ajax-area'] = array(
-        '#type' => 'container',
-        '#id' => 'views-ajax-popup',
-      );
-      $form['ajax-area']['ajax-title'] = array(
-        '#markup' => '<h2 id="views-ajax-title"></h2>',
-      );
-      $form['ajax-area']['ajax-body'] = array(
-        '#type' => 'container',
-        '#id' => 'views-ajax-body',
-        '#children' => $view->getDefaultAJAXMessage(),
-      );
-    }
-
-    return $form;
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::actions().
-   */
-  protected function actions(array $form, array &$form_state) {
-    $actions = parent::actions($form, $form_state);
-    unset($actions['delete']);
-
-    $actions['cancel'] = array(
-      '#value' => t('Cancel'),
-      '#submit' => array(
-        array($this, 'cancel'),
-      ),
-    );
-    return $actions;
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::validate().
-   */
-  public function validate(array $form, array &$form_state) {
-    parent::validate($form, $form_state);
-
-    $view = $this->getEntity($form_state);
-    $errors = $view->get('executable')->validate();
-    if ($errors !== TRUE) {
-      foreach ($errors as $error) {
-        form_set_error('', $error);
-      }
-    }
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::submit().
-   */
-  public function submit(array $form, array &$form_state) {
-    parent::submit($form, $form_state);
-
-    $view = $this->getEntity($form_state);
-    // Go through and remove displayed scheduled for removal.
-    $displays = $view->get('display');
-    foreach ($displays as $id => $display) {
-      if (!empty($display['deleted'])) {
-        unset($view->get('executable')->displayHandlers[$id]);
-        unset($displays[$id]);
-      }
-    }
-    // Rename display ids if needed.
-    foreach ($view->get('executable')->displayHandlers as $id => $display) {
-      if (!empty($display->display['new_id'])) {
-        $new_id = $display->display['new_id'];
-        $view->get('executable')->displayHandlers[$new_id] = $view->get('executable')->displayHandlers[$id];
-        $view->get('executable')->displayHandlers[$new_id]->display['id'] = $new_id;
-
-        $displays[$new_id] = $displays[$id];
-        unset($displays[$id]);
-        // Redirect the user to the renamed display to be sure that the page itself exists and doesn't throw errors.
-        $form_state['redirect'] = 'admin/structure/views/view/' . $view->get('name') . '/edit/' . $new_id;
-      }
-    }
-    $view->set('display', $displays);
-
-    // Direct the user to the right url, if the path of the display has changed.
-    $query = drupal_container()->get('request')->query;
-    // @todo: Revisit this when http://drupal.org/node/1668866 is in.
-    $destination = $query->get('destination');
-    if (!empty($destination)) {
-      // Find out the first display which has a changed path and redirect to this url.
-      $old_view = views_get_view($view->get('name'));
-      $old_view->initDisplay();
-      foreach ($old_view->displayHandlers as $id => $display) {
-        // Only check for displays with a path.
-        $old_path = $display->getOption('path');
-        if (empty($old_path)) {
-          continue;
-        }
-
-        if (($display->getPluginId() == 'page') && ($old_path == $destination) && ($old_path != $view->get('executable')->displayHandlers[$id]->getOption('path'))) {
-          $destination = $view->get('executable')->displayHandlers[$id]->getOption('path');
-          $query->remove('destination');
-          // @todo For whatever reason drupal_goto is still using $_GET.
-          // @see http://drupal.org/node/1668866
-          unset($_GET['destination']);
-        }
-      }
-      $form_state['redirect'] = $destination;
-    }
-
-    $view->save();
-    drupal_set_message(t('The view %name has been saved.', array('%name' => $view->getHumanName())));
-
-    // Remove this view from cache so we can edit it properly.
-    drupal_container()->get('user.tempstore')->get('views')->delete($view->get('name'));
-  }
-
-  /**
-   * Form submission handler for the 'cancel' action.
-   *
-   * @param array $form
-   *   An associative array containing the structure of the form.
-   * @param array $form_state
-   *   A reference to a keyed array containing the current state of the form.
-   */
-  public function cancel(array $form, array &$form_state) {
-    // Remove this view from cache so edits will be lost.
-    $view = $this->getEntity($form_state);
-    drupal_container()->get('user.tempstore')->get('views')->delete($view->get('name'));
-    $form_state['redirect'] = 'admin/structure/views';
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::actionsElement().
-   */
-  protected function actionsElement(array $form, array &$form_state) {
-    $element = parent::actionsElement($form, $form_state);
-    $element['#weight'] = 0;
-    $view = $this->getEntity($form_state);
-    if (empty($view->changed)) {
-      $element['#attributes'] = array(
-        'class' => array(
-          'js-hide',
-        ),
-      );
-    }
-    return $element;
-  }
-
-  /**
-   * Returns a renderable array representing the edit page for one display.
-   */
-  public function getDisplayTab($view) {
-    $build = array();
-    $display_id = $view->displayID;
-    $display = $view->get('executable')->displayHandlers[$display_id];
-    // If the plugin doesn't exist, display an error message instead of an edit
-    // page.
-    if (empty($display)) {
-      $title = isset($display['display_title']) ? $display['display_title'] : t('Invalid');
-      // @TODO: Improved UX for the case where a plugin is missing.
-      $build['#markup'] = t("Error: Display @display refers to a plugin named '@plugin', but that plugin is not available.", array('@display' => $display['id'], '@plugin' => $display['display_plugin']));
-    }
-    // Build the content of the edit page.
-    else {
-      $build['details'] = $this->getDisplayDetails($view, $display->display);
-    }
-    // In AJAX context, ViewUI::rebuildCurrentTab() returns this outside of form
-    // context, so hook_form_views_ui_edit_form_alter() is insufficient.
-    drupal_alter('views_ui_display_tab', $build, $view, $display_id);
-    return $build;
-  }
-
-  /**
-   * Helper function to get the display details section of the edit UI.
-   *
-   * @param $display
-   *
-   * @return array
-   *   A renderable page build array.
-   */
-  public function getDisplayDetails($view, $display) {
-    $display_title = $this->getDisplayLabel($view, $display['id'], FALSE);
-    $build = array(
-      '#theme_wrappers' => array('container'),
-      '#attributes' => array('id' => 'edit-display-settings-details'),
-    );
-
-    $is_display_deleted = !empty($display['deleted']);
-    // The master display cannot be cloned.
-    $is_default = $display['id'] == 'default';
-    // @todo: Figure out why getOption doesn't work here.
-    $is_enabled = $view->get('executable')->displayHandlers[$display['id']]->isEnabled();
-
-    if ($display['id'] != 'default') {
-      $build['top']['#theme_wrappers'] = array('container');
-      $build['top']['#attributes']['id'] = 'edit-display-settings-top';
-      $build['top']['#attributes']['class'] = array('views-ui-display-tab-actions', 'views-ui-display-tab-bucket', 'clearfix');
-
-      // The Delete, Duplicate and Undo Delete buttons.
-      $build['top']['actions'] = array(
-        '#theme_wrappers' => array('dropbutton_wrapper'),
-      );
-
-      // Because some of the 'links' are actually submit buttons, we have to
-      // manually wrap each item in <li> and the whole list in <ul>.
-      $build['top']['actions']['prefix']['#markup'] = '<ul class="dropbutton">';
-
-      if (!$is_display_deleted) {
-        if (!$is_enabled) {
-          $build['top']['actions']['enable'] = array(
-            '#type' => 'submit',
-            '#value' => t('enable @display_title', array('@display_title' => $display_title)),
-            '#limit_validation_errors' => array(),
-            '#submit' => array(array($this, 'submitDisplayEnable'), array($this, 'submitDelayDestination')),
-            '#prefix' => '<li class="enable">',
-            "#suffix" => '</li>',
-          );
-        }
-        // Add a link to view the page.
-        elseif ($view->get('executable')->displayHandlers[$display['id']]->hasPath()) {
-          $path = $view->get('executable')->displayHandlers[$display['id']]->getPath();
-          if (strpos($path, '%') === FALSE) {
-            $build['top']['actions']['path'] = array(
-              '#type' => 'link',
-              '#title' => t('view @display', array('@display' => $display['display_title'])),
-              '#options' => array('alt' => array(t("Go to the real page for this display"))),
-              '#href' => $path,
-              '#prefix' => '<li class="view">',
-              "#suffix" => '</li>',
-            );
-          }
-        }
-        if (!$is_default) {
-          $build['top']['actions']['duplicate'] = array(
-            '#type' => 'submit',
-            '#value' => t('clone @display_title', array('@display_title' => $display_title)),
-            '#limit_validation_errors' => array(),
-            '#submit' => array(array($this, 'submitDisplayDuplicate'), array($this, 'submitDelayDestination')),
-            '#prefix' => '<li class="duplicate">',
-            "#suffix" => '</li>',
-          );
-        }
-        // Always allow a display to be deleted.
-        $build['top']['actions']['delete'] = array(
-          '#type' => 'submit',
-          '#value' => t('delete @display_title', array('@display_title' => $display_title)),
-          '#limit_validation_errors' => array(),
-          '#submit' => array(array($this, 'submitDisplayDelete'), array($this, 'submitDelayDestination')),
-          '#prefix' => '<li class="delete">',
-          "#suffix" => '</li>',
-        );
-        if ($is_enabled) {
-          $build['top']['actions']['disable'] = array(
-            '#type' => 'submit',
-            '#value' => t('disable @display_title', array('@display_title' => $display_title)),
-            '#limit_validation_errors' => array(),
-            '#submit' => array(array($this, 'submitDisplayDisable'), array($this, 'submitDelayDestination')),
-            '#prefix' => '<li class="disable">',
-            "#suffix" => '</li>',
-          );
-        }
-      }
-      else {
-        $build['top']['actions']['undo_delete'] = array(
-          '#type' => 'submit',
-          '#value' => t('undo delete of @display_title', array('@display_title' => $display_title)),
-          '#limit_validation_errors' => array(),
-          '#submit' => array(array($this, 'submitDisplayUndoDelete'), array($this, 'submitDelayDestination')),
-          '#prefix' => '<li class="undo-delete">',
-          "#suffix" => '</li>',
-        );
-      }
-      $build['top']['actions']['suffix']['#markup'] = '</ul>';
-
-      // The area above the three columns.
-      $build['top']['display_title'] = array(
-        '#theme' => 'views_ui_display_tab_setting',
-        '#description' => t('Display name'),
-        '#link' => $view->get('executable')->displayHandlers[$display['id']]->optionLink(check_plain($display_title), 'display_title'),
-      );
-    }
-
-    $build['columns'] = array();
-    $build['columns']['#theme_wrappers'] = array('container');
-    $build['columns']['#attributes'] = array('id' => 'edit-display-settings-main', 'class' => array('clearfix', 'views-display-columns'));
-
-    $build['columns']['first']['#theme_wrappers'] = array('container');
-    $build['columns']['first']['#attributes'] = array('class' => array('views-display-column', 'first'));
-
-    $build['columns']['second']['#theme_wrappers'] = array('container');
-    $build['columns']['second']['#attributes'] = array('class' => array('views-display-column', 'second'));
-
-    $build['columns']['second']['settings'] = array();
-    $build['columns']['second']['header'] = array();
-    $build['columns']['second']['footer'] = array();
-    $build['columns']['second']['pager'] = array();
-
-    // The third column buckets are wrapped in a fieldset.
-    $build['columns']['third'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Advanced'),
-      '#collapsible' => TRUE,
-      '#collapsed' => TRUE,
-      '#theme_wrappers' => array('fieldset', 'container'),
-      '#attributes' => array(
-        'class' => array(
-          'views-display-column',
-          'third',
-        ),
-      ),
-    );
-
-    // Collapse the fieldset by default.
-    if (config('views.settings')->get('ui.show.advanced_column')) {
-      $build['columns']['third']['#collapsed'] = FALSE;
-    }
-
-    // Each option (e.g. title, access, display as grid/table/list) fits into one
-    // of several "buckets," or boxes (Format, Fields, Sort, and so on).
-    $buckets = array();
-
-    // Fetch options from the display plugin, with a list of buckets they go into.
-    $options = array();
-    $view->get('executable')->displayHandlers[$display['id']]->optionsSummary($buckets, $options);
-
-    // Place each option into its bucket.
-    foreach ($options as $id => $option) {
-      // Each option self-identifies as belonging in a particular bucket.
-      $buckets[$option['category']]['build'][$id] = $this->buildOptionForm($view, $id, $option, $display);
-    }
-
-    // Place each bucket into the proper column.
-    foreach ($buckets as $id => $bucket) {
-      // Let buckets identify themselves as belonging in a column.
-      if (isset($bucket['column']) && isset($build['columns'][$bucket['column']])) {
-        $column = $bucket['column'];
-      }
-      // If a bucket doesn't pick one of our predefined columns to belong to, put
-      // it in the last one.
-      else {
-        $column = 'third';
-      }
-      if (isset($bucket['build']) && is_array($bucket['build'])) {
-        $build['columns'][$column][$id] = $bucket['build'];
-        $build['columns'][$column][$id]['#theme_wrappers'][] = 'views_ui_display_tab_bucket';
-        $build['columns'][$column][$id]['#title'] = !empty($bucket['title']) ? $bucket['title'] : '';
-        $build['columns'][$column][$id]['#name'] = !empty($bucket['title']) ? $bucket['title'] : $id;
-      }
-    }
-
-    $build['columns']['first']['fields'] = $this->getFormBucket($view, 'field', $display);
-    $build['columns']['first']['filters'] = $this->getFormBucket($view, 'filter', $display);
-    $build['columns']['first']['sorts'] = $this->getFormBucket($view, 'sort', $display);
-    $build['columns']['second']['header'] = $this->getFormBucket($view, 'header', $display);
-    $build['columns']['second']['footer'] = $this->getFormBucket($view, 'footer', $display);
-    $build['columns']['third']['arguments'] = $this->getFormBucket($view, 'argument', $display);
-    $build['columns']['third']['relationships'] = $this->getFormBucket($view, 'relationship', $display);
-    $build['columns']['third']['empty'] = $this->getFormBucket($view, 'empty', $display);
-
-    return $build;
-  }
-
-  /**
-   * Submit handler to add a restore a removed display to a view.
-   */
-  public function submitDisplayUndoDelete($form, &$form_state) {
-    $view = $this->getEntity($form_state);
-    // Create the new display
-    $id = $form_state['display_id'];
-    $displays = $view->get('display');
-    $displays[$id]['deleted'] = FALSE;
-    $view->set('display', $displays);
-
-    // Store in cache
-    views_ui_cache_set($view);
-
-    // Redirect to the top-level edit page.
-    $form_state['redirect'] = 'admin/structure/views/view/' . $view->get('name') . '/edit/' . $id;
-  }
-
-  /**
-   * Submit handler to enable a disabled display.
-   */
-  public function submitDisplayEnable($form, &$form_state) {
-    $view = $this->getEntity($form_state);
-    $id = $form_state['display_id'];
-    // setOption doesn't work because this would might affect upper displays
-    $view->get('executable')->displayHandlers[$id]->setOption('enabled', TRUE);
-
-    // Store in cache
-    views_ui_cache_set($view);
-
-    // Redirect to the top-level edit page.
-    $form_state['redirect'] = 'admin/structure/views/view/' . $view->get('name') . '/edit/' . $id;
-  }
-
-  /**
-   * Submit handler to disable display.
-   */
-  public function submitDisplayDisable($form, &$form_state) {
-    $view = $this->getEntity($form_state);
-    $id = $form_state['display_id'];
-    $view->get('executable')->displayHandlers[$id]->setOption('enabled', FALSE);
-
-    // Store in cache
-    views_ui_cache_set($view);
-
-    // Redirect to the top-level edit page.
-    $form_state['redirect'] = 'admin/structure/views/view/' . $view->get('name') . '/edit/' . $id;
-  }
-
-  /**
-   * Submit handler to delete a display from a view.
-   */
-  public function submitDisplayDelete($form, &$form_state) {
-    $view = $this->getEntity($form_state);
-    $display_id = $form_state['display_id'];
-
-    // Mark the display for deletion.
-    $displays = $view->get('display');
-    $displays[$display_id]['deleted'] = TRUE;
-    $view->set('display', $displays);
-    views_ui_cache_set($view);
-
-    // Redirect to the top-level edit page. The first remaining display will
-    // become the active display.
-    $form_state['redirect'] = 'admin/structure/views/view/' . $view->get('name');
-  }
-
-  /**
-   * Regenerate the current tab for AJAX updates.
-   */
-  public function rebuildCurrentTab(ViewUI $view, &$output, $display_id) {
-    if (!$view->get('executable')->setDisplay('default')) {
-      return;
-    }
-
-    // Regenerate the main display area.
-    $build = static::getDisplayTab($this);
-    static::addMicroweights($build);
-    $output[] = ajax_command_html('#views-tab-' . $display_id, drupal_render($build));
-
-    // Regenerate the top area so changes to display names and order will appear.
-    $build = $this->renderDisplayTop($view);
-    static::addMicroweights($build);
-    $output[] = ajax_command_replace('#views-display-top', drupal_render($build));
-  }
-
-  /**
-   * Render the top of the display so it can be updated during ajax operations.
-   */
-  public function renderDisplayTop(ViewUI $view) {
-    $display_id = $view->displayID;
-    $element['#theme'] = 'views_ui_container';
-    $element['#attributes']['class'] = array('views-display-top', 'clearfix');
-    $element['#attributes']['id'] = array('views-display-top');
-
-    // Extra actions for the display
-    $element['extra_actions'] = array(
-      '#type' => 'dropbutton',
-      '#attributes' => array(
-        'id' => 'views-display-extra-actions',
-      ),
-      '#links' => array(
-        'edit-details' => array(
-          'title' => t('edit view name/description'),
-          'href' => "admin/structure/views/nojs/edit-details/{$view->get('name')}",
-          'attributes' => array('class' => array('views-ajax-link')),
-        ),
-        'analyze' => array(
-          'title' => t('analyze view'),
-          'href' => "admin/structure/views/nojs/analyze/{$view->get('name')}/$display_id",
-          'attributes' => array('class' => array('views-ajax-link')),
-        ),
-        'clone' => array(
-          'title' => t('clone view'),
-          'href' => "admin/structure/views/view/{$view->get('name')}/clone",
-        ),
-        'reorder' => array(
-          'title' => t('reorder displays'),
-          'href' => "admin/structure/views/nojs/reorder-displays/{$view->get('name')}/$display_id",
-          'attributes' => array('class' => array('views-ajax-link')),
-        ),
-      ),
-    );
-
-    // Let other modules add additional links here.
-    drupal_alter('views_ui_display_top_links', $element['extra_actions']['#links'], $view, $display_id);
-
-    if (isset($view->type) && $view->type != t('Default')) {
-      if ($view->type == t('Overridden')) {
-        $element['extra_actions']['#links']['revert'] = array(
-          'title' => t('revert view'),
-          'href' => "admin/structure/views/view/{$view->get('name')}/revert",
-          'query' => array('destination' => "admin/structure/views/view/{$view->get('name')}"),
-        );
-      }
-      else {
-        $element['extra_actions']['#links']['delete'] = array(
-          'title' => t('delete view'),
-          'href' => "admin/structure/views/view/{$view->get('name')}/delete",
-        );
-      }
-    }
-
-    // Determine the displays available for editing.
-    if ($tabs = $this->getDisplayTabs($view)) {
-      if ($display_id) {
-        $tabs[$display_id]['#active'] = TRUE;
-      }
-      $tabs['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2><ul id = "views-display-menu-tabs" class="tabs secondary">';
-      $tabs['#suffix'] = '</ul>';
-      $element['tabs'] = $tabs;
-    }
-
-    // Buttons for adding a new display.
-    foreach (views_fetch_plugin_names('display', NULL, array($view->get('base_table'))) as $type => $label) {
-      $element['add_display'][$type] = array(
-        '#type' => 'submit',
-        '#value' => t('Add !display', array('!display' => $label)),
-        '#limit_validation_errors' => array(),
-        '#submit' => array(array($this, 'submitDisplayAdd'), array($this, 'submitDelayDestination')),
-        '#attributes' => array('class' => array('add-display')),
-        // Allow JavaScript to remove the 'Add ' prefix from the button label when
-        // placing the button in a "Add" dropdown menu.
-        '#process' => array_merge(array('views_ui_form_button_was_clicked'), element_info_property('submit', '#process', array())),
-        '#values' => array(t('Add !display', array('!display' => $label)), $label),
-      );
-    }
-
-    return $element;
-  }
-
-  /**
-   * Submit handler for form buttons that do not complete a form workflow.
-   *
-   * The Edit View form is a multistep form workflow, but with state managed by
-   * the TempStore rather than $form_state['rebuild']. Without this
-   * submit handler, buttons that add or remove displays would redirect to the
-   * destination parameter (e.g., when the Edit View form is linked to from a
-   * contextual link). This handler can be added to buttons whose form submission
-   * should not yet redirect to the destination.
-   */
-  public function submitDelayDestination($form, &$form_state) {
-    $query = drupal_container()->get('request')->query;
-    // @todo: Revisit this when http://drupal.org/node/1668866 is in.
-    $destination = $query->get('destination');
-    if (isset($destination) && $form_state['redirect'] !== FALSE) {
-      if (!isset($form_state['redirect'])) {
-        $form_state['redirect'] = current_path();
-      }
-      if (is_string($form_state['redirect'])) {
-        $form_state['redirect'] = array($form_state['redirect']);
-      }
-      $options = isset($form_state['redirect'][1]) ? $form_state['redirect'][1] : array();
-      if (!isset($options['query']['destination'])) {
-        $options['query']['destination'] = $destination;
-      }
-      $form_state['redirect'][1] = $options;
-      $query->remove('destination');
-    }
-  }
-
-  /**
-   * Submit handler to duplicate a display for a view.
-   */
-  public function submitDisplayDuplicate($form, &$form_state) {
-    $view = $this->getEntity($form_state);
-    $display_id = $view->displayID;
-
-    // Create the new display.
-    $displays = $view->get('display');
-    $new_display_id = $view->addDisplay($displays[$display_id]['display_plugin']);
-    $displays[$new_display_id] = $displays[$display_id];
-    $displays[$new_display_id]['id'] = $new_display_id;
-    $view->set('display', $displays);
-
-    // By setting the current display the changed marker will appear on the new
-    // display.
-    $view->get('executable')->current_display = $new_display_id;
-    views_ui_cache_set($view);
-
-    // Redirect to the new display's edit page.
-    $form_state['redirect'] = 'admin/structure/views/view/' . $view->get('name') . '/edit/' . $new_display_id;
-  }
-
-  /**
-   * Submit handler to add a display to a view.
-   */
-  public function submitDisplayAdd($form, &$form_state) {
-    $view = $this->getEntity($form_state);
-    // Create the new display.
-    $parents = $form_state['triggering_element']['#parents'];
-    $display_type = array_pop($parents);
-    $display_id = $view->addDisplay($display_type);
-    // A new display got added so the asterisks symbol should appear on the new
-    // display.
-    $view->get('executable')->current_display = $display_id;
-    views_ui_cache_set($view);
-
-    // Redirect to the new display's edit page.
-    $form_state['redirect'] = 'admin/structure/views/view/' . $view->get('name') . '/edit/' . $display_id;
-  }
-
-  /**
-   * Build a renderable array representing one option on the edit form.
-   *
-   * This function might be more logical as a method on an object, if a suitable
-   * object emerges out of refactoring.
-   */
-  public function buildOptionForm(ViewUI $view, $id, $option, $display) {
-    $option_build = array();
-    $option_build['#theme'] = 'views_ui_display_tab_setting';
-
-    $option_build['#description'] = $option['title'];
-
-    $option_build['#link'] = $view->get('executable')->displayHandlers[$display['id']]->optionLink($option['value'], $id, '', empty($option['desc']) ? '' : $option['desc']);
-
-    $option_build['#links'] = array();
-    if (!empty($option['links']) && is_array($option['links'])) {
-      foreach ($option['links'] as $link_id => $link_value) {
-        $option_build['#settings_links'][] = $view->get('executable')->displayHandlers[$display['id']]->optionLink($option['setting'], $link_id, 'views-button-configure', $link_value);
-      }
-    }
-
-    if (!empty($view->get('executable')->displayHandlers[$display['id']]->options['defaults'][$id])) {
-      $display_id = 'default';
-      $option_build['#defaulted'] = TRUE;
-    }
-    else {
-      $display_id = $display['id'];
-      if (!$view->get('executable')->displayHandlers[$display['id']]->isDefaultDisplay()) {
-        if ($view->get('executable')->displayHandlers[$display['id']]->defaultableSections($id)) {
-          $option_build['#overridden'] = TRUE;
-        }
-      }
-    }
-    $option_build['#attributes']['class'][] = drupal_clean_css_identifier($display_id . '-' . $id);
-    return $option_build;
-  }
-
-  /**
-   * Add information about a section to a display.
-   */
-  public function getFormBucket(ViewUI $view, $type, $display) {
-    $build = array(
-      '#theme_wrappers' => array('views_ui_display_tab_bucket'),
-    );
-    $types = ViewExecutable::viewsHandlerTypes();
-
-    $build['#overridden'] = FALSE;
-    $build['#defaulted'] = FALSE;
-
-    $build['#name'] = $build['#title'] = $types[$type]['title'];
-
-    // Different types now have different rearrange forms, so we use this switch
-    // to get the right one.
-    switch ($type) {
-      case 'filter':
-        $rearrange_url = "admin/structure/views/nojs/rearrange-$type/{$view->get('name')}/{$display['id']}/$type";
-        $rearrange_text = t('And/Or, Rearrange');
-        // TODO: Add another class to have another symbol for filter rearrange.
-        $class = 'icon compact rearrange';
-        break;
-      case 'field':
-        // Fetch the style plugin info so we know whether to list fields or not.
-        $style_plugin = $view->get('executable')->displayHandlers[$display['id']]->getPlugin('style');
-        $uses_fields = $style_plugin && $style_plugin->usesFields();
-        if (!$uses_fields) {
-          $build['fields'][] = array(
-            '#markup' => t('The selected style or row format does not utilize fields.'),
-            '#theme_wrappers' => array('views_ui_container'),
-            '#attributes' => array('class' => array('views-display-setting')),
-          );
-          return $build;
-        }
-
-      default:
-        $rearrange_url = "admin/structure/views/nojs/rearrange/{$view->get('name')}/{$display['id']}/$type";
-        $rearrange_text = t('Rearrange');
-        $class = 'icon compact rearrange';
-    }
-
-    // Create an array of actions to pass to theme_links
-    $actions = array();
-    $count_handlers = count($view->get('executable')->displayHandlers[$display['id']]->getHandlers($type));
-    $actions['add'] = array(
-      'title' => t('Add'),
-      'href' => "admin/structure/views/nojs/add-item/{$view->get('name')}/{$display['id']}/$type",
-      'attributes' => array('class' => array('icon compact add', 'views-ajax-link'), 'title' => t('Add'), 'id' => 'views-add-' . $type),
-      'html' => TRUE,
-    );
-    if ($count_handlers > 0) {
-      $actions['rearrange'] = array(
-        'title' => $rearrange_text,
-        'href' => $rearrange_url,
-        'attributes' => array('class' => array($class, 'views-ajax-link'), 'title' => t('Rearrange'), 'id' => 'views-rearrange-' . $type),
-        'html' => TRUE,
-      );
-    }
-
-    // Render the array of links
-    $build['#actions'] = array(
-      '#type' => 'dropbutton',
-      '#links' => $actions,
-      '#attributes' => array(
-        'class' => array('views-ui-settings-bucket-operations'),
-      ),
-    );
-
-    if (!$view->get('executable')->displayHandlers[$display['id']]->isDefaultDisplay()) {
-      if (!$view->get('executable')->displayHandlers[$display['id']]->isDefaulted($types[$type]['plural'])) {
-        $build['#overridden'] = TRUE;
-      }
-      else {
-        $build['#defaulted'] = TRUE;
-      }
-    }
-
-    static $relationships = NULL;
-    if (!isset($relationships)) {
-      // Get relationship labels
-      $relationships = array();
-      foreach ($view->get('executable')->displayHandlers[$display['id']]->getHandlers('relationship') as $id => $handler) {
-        $relationships[$id] = $handler->label();
-      }
-    }
-
-    // Filters can now be grouped so we do a little bit extra:
-    $groups = array();
-    $grouping = FALSE;
-    if ($type == 'filter') {
-      $group_info = $view->get('executable')->displayHandlers['default']->getOption('filter_groups');
-      // If there is only one group but it is using the "OR" filter, we still
-      // treat it as a group for display purposes, since we want to display the
-      // "OR" label next to items within the group.
-      if (!empty($group_info['groups']) && (count($group_info['groups']) > 1 || current($group_info['groups']) == 'OR')) {
-        $grouping = TRUE;
-        $groups = array(0 => array());
-      }
-    }
-
-    $build['fields'] = array();
-
-    foreach ($view->get('executable')->displayHandlers[$display['id']]->getOption($types[$type]['plural']) as $id => $field) {
-      // Build the option link for this handler ("Node: ID = article").
-      $build['fields'][$id] = array();
-      $build['fields'][$id]['#theme'] = 'views_ui_display_tab_setting';
-
-      $handler = $view->get('executable')->displayHandlers[$display['id']]->getHandler($type, $id);
-      if (empty($handler)) {
-        $build['fields'][$id]['#class'][] = 'broken';
-        $field_name = t('Broken/missing handler: @table > @field', array('@table' => $field['table'], '@field' => $field['field']));
-        $build['fields'][$id]['#link'] = l($field_name, "admin/structure/views/nojs/config-item/{$view->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-ajax-link')), 'html' => TRUE));
-        continue;
-      }
-
-      $field_name = check_plain($handler->adminLabel(TRUE));
-      if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) {
-        $field_name = '(' . $relationships[$field['relationship']] . ') ' . $field_name;
-      }
-
-      $description = filter_xss_admin($handler->adminSummary());
-      $link_text = $field_name . (empty($description) ? '' : " ($description)");
-      $link_attributes = array('class' => array('views-ajax-link'));
-      if (!empty($field['exclude'])) {
-        $link_attributes['class'][] = 'views-field-excluded';
-      }
-      $build['fields'][$id]['#link'] = l($link_text, "admin/structure/views/nojs/config-item/{$view->get('name')}/{$display['id']}/$type/$id", array('attributes' => $link_attributes, 'html' => TRUE));
-      $build['fields'][$id]['#class'][] = drupal_clean_css_identifier($display['id']. '-' . $type . '-' . $id);
-
-      if ($view->get('executable')->displayHandlers[$display['id']]->useGroupBy() && $handler->usesGroupBy()) {
-        $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . t('Aggregation settings') . '</span>', "admin/structure/views/nojs/config-item-group/{$view->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => 'views-button-configure views-ajax-link', 'title' => t('Aggregation settings')), 'html' => TRUE));
-      }
-
-      if ($handler->hasExtraOptions()) {
-        $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . t('Settings') . '</span>', "admin/structure/views/nojs/config-item-extra/{$view->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => t('Settings')), 'html' => TRUE));
-      }
-
-      if ($grouping) {
-        $gid = $handler->options['group'];
-
-        // Show in default group if the group does not exist.
-        if (empty($group_info['groups'][$gid])) {
-          $gid = 0;
-        }
-        $groups[$gid][] = $id;
-      }
-    }
-
-    // If using grouping, re-order fields so that they show up properly in the list.
-    if ($type == 'filter' && $grouping) {
-      $store = $build['fields'];
-      $build['fields'] = array();
-      foreach ($groups as $gid => $contents) {
-        // Display an operator between each group.
-        if (!empty($build['fields'])) {
-          $build['fields'][] = array(
-            '#theme' => 'views_ui_display_tab_setting',
-            '#class' => array('views-group-text'),
-            '#link' => ($group_info['operator'] == 'OR' ? t('OR') : t('AND')),
-          );
-        }
-        // Display an operator between each pair of filters within the group.
-        $keys = array_keys($contents);
-        $last = end($keys);
-        foreach ($contents as $key => $pid) {
-          if ($key != $last) {
-            $store[$pid]['#link'] .= '&nbsp;&nbsp;' . ($group_info['groups'][$gid] == 'OR' ? t('OR') : t('AND'));
-          }
-          $build['fields'][$pid] = $store[$pid];
-        }
-      }
-    }
-
-    return $build;
-  }
-
-  /**
-   * Recursively adds microweights to a render array, similar to what form_builder() does for forms.
-   *
-   * @todo Submit a core patch to fix drupal_render() to do this, so that all
-   *   render arrays automatically preserve array insertion order, as forms do.
-   */
-  public static function addMicroweights(&$build) {
-    $count = 0;
-    foreach (element_children($build) as $key) {
-      if (!isset($build[$key]['#weight'])) {
-        $build[$key]['#weight'] = $count/1000;
-      }
-      static::addMicroweights($build[$key]);
-      $count++;
-    }
-  }
-
-}
diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php
deleted file mode 100644
index aae0052..0000000
--- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php
+++ /dev/null
@@ -1,184 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\views_ui\ViewFormControllerBase.
- */
-
-namespace Drupal\views_ui;
-
-use Drupal\Core\Entity\EntityFormController;
-use Drupal\Core\Entity\EntityInterface;
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
-use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
-
-/**
- * Base form controller for Views forms.
- */
-abstract class ViewFormControllerBase extends EntityFormController {
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::prepareForm().
-   */
-  protected function prepareEntity(EntityInterface $view) {
-    // Determine the displays available for editing.
-    if ($tabs = $this->getDisplayTabs($view)) {
-      // If a display isn't specified, use the first one.
-      if (empty($view->displayID)) {
-        foreach ($tabs as $id => $tab) {
-          if (!isset($tab['#access']) || $tab['#access']) {
-            $view->displayID = $id;
-            break;
-          }
-        }
-      }
-      // If a display is specified, but we don't have access to it, return
-      // an access denied page.
-      if ($view->displayID && !isset($tabs[$view->displayID])) {
-        throw new NotFoundHttpException();
-      }
-      elseif ($view->displayID && (isset($tabs[$view->displayID]['#access']) && !$tabs[$view->displayID]['#access'])) {
-        throw new AccessDeniedHttpException();
-      }
-
-    }
-    elseif ($view->displayID) {
-      throw new NotFoundHttpException();
-    }
-  }
-
-  /**
-   * Creates an array of Views admin CSS for adding or attaching.
-   *
-   * This returns an array of arrays. Each array represents a single
-   * file. The array format is:
-   * - file: The fully qualified name of the file to send to drupal_add_css
-   * - options: An array of options to pass to drupal_add_css.
-   */
-  public static function getAdminCSS() {
-    $module_path = drupal_get_path('module', 'views_ui');
-    $list = array();
-    $list[$module_path . '/css/views-admin.css'] = array();
-    $list[$module_path . '/css/views-admin.theme.css'] = array();
-
-    // Add in any theme specific CSS files we have
-    $themes = list_themes();
-    $theme_key = $GLOBALS['theme'];
-    while ($theme_key) {
-      // Try to find the admin css file for non-core themes.
-      if (!in_array($theme_key, array('seven', 'bartik'))) {
-        $theme_path = drupal_get_path('theme', $theme_key);
-        // First search in the css directory, then in the root folder of the theme.
-        if (file_exists($theme_path . "/css/views-admin.$theme_key.css")) {
-          $list[$theme_path . "/css/views-admin.$theme_key.css"] = array(
-            'group' => CSS_THEME,
-          );
-        }
-        elseif (file_exists($theme_path . "/views-admin.$theme_key.css")) {
-          $list[$theme_path . "/views-admin.$theme_key.css"] = array(
-            'group' => CSS_THEME,
-          );
-        }
-      }
-      else {
-        $list[$module_path . "/css/views-admin.$theme_key.css"] = array(
-          'group' => CSS_THEME,
-        );
-      }
-      $theme_key = isset($themes[$theme_key]->base_theme) ? $themes[$theme_key]->base_theme : '';
-    }
-    if (module_exists('contextual')) {
-      $list[$module_path . '/css/views-admin.contextual.css'] = array();
-    }
-
-    return $list;
-  }
-
-  /**
-   * Adds tabs for navigating across Displays when editing a View.
-   *
-   * This function can be called from hook_menu_local_tasks_alter() to implement
-   * these tabs as secondary local tasks, or it can be called from elsewhere if
-   * having them as secondary local tasks isn't desired. The caller is responsible
-   * for setting the active tab's #active property to TRUE.
-   *
-   * @param $display_id
-   *   The display_id which is edited on the current request.
-   */
-  public function getDisplayTabs(ViewUI $view) {
-    $display_id = $view->displayID;
-    $tabs = array();
-
-    // Create a tab for each display.
-    $displays = $view->get('display');
-    uasort($displays, array($view, 'sortPosition'));
-    $view->set('display', $displays);
-    foreach ($displays as $id => $display) {
-      $tabs[$id] = array(
-        '#theme' => 'menu_local_task',
-        '#link' => array(
-          'title' => $this->getDisplayLabel($view, $id),
-          'href' => 'admin/structure/views/view/' . $view->get('name') . '/edit/' . $id,
-          'localized_options' => array(),
-        ),
-      );
-      if (!empty($display['deleted'])) {
-        $tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'views-display-deleted-link';
-      }
-      if (isset($display['display_options']['enabled']) && !$display['display_options']['enabled']) {
-        $tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'views-display-disabled-link';
-      }
-    }
-
-    // If the default display isn't supposed to be shown, don't display its tab, unless it's the only display.
-    if ((!$this->isDefaultDisplayShown($view) && $display_id != 'default') && count($tabs) > 1) {
-      $tabs['default']['#access'] = FALSE;
-    }
-
-    // Mark the display tab as red to show validation errors.
-    $view->get('executable')->validate();
-    foreach ($view->get('display') as $id => $display) {
-      if (!empty($view->display_errors[$id])) {
-        // Always show the tab.
-        $tabs[$id]['#access'] = TRUE;
-        // Add a class to mark the error and a title to make a hover tip.
-        $tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'error';
-        $tabs[$id]['#link']['localized_options']['attributes']['title'] = t('This display has one or more validation errors; please review it.');
-      }
-    }
-
-    return $tabs;
-  }
-
-  /**
-   * Controls whether or not the default display should have its own tab on edit.
-   */
-  public function isDefaultDisplayShown(ViewUI $view) {
-    // Always show the default display for advanced users who prefer that mode.
-    $advanced_mode = config('views.settings')->get('ui.show.master_display');
-    // For other users, show the default display only if there are no others, and
-    // hide it if there's at least one "real" display.
-    $additional_displays = (count($view->get('executable')->displayHandlers) == 1);
-
-    return $advanced_mode || $additional_displays;
-  }
-
-  /**
-   * Placeholder function for overriding $display['display_title'].
-   *
-   * @todo Remove this function once editing the display title is possible.
-   */
-  public function getDisplayLabel(ViewUI $view, $display_id, $check_changed = TRUE) {
-    $display = $view->get('display');
-    $title = $display_id == 'default' ? t('Master') : $display[$display_id]['display_title'];
-    $title = views_ui_truncate($title, 25);
-
-    if ($check_changed && !empty($view->changed_display[$display_id])) {
-      $changed = '*';
-      $title = $title . $changed;
-    }
-
-    return $title;
-  }
-
-}
diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php
index ac8dc4e..78464df 100644
--- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php
+++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php
@@ -151,7 +151,7 @@ public function buildOperations(EntityInterface $entity) {
    */
   public function render() {
     $list = parent::render();
-    $list['#attached']['css'] = ViewFormControllerBase::getAdminCSS();
+    $list['#attached']['css'] = ViewUI::getAdminCSS();
     $list['#attached']['library'][] = array('system', 'drupal.ajax');
     $list['#attributes']['id'] = 'views-entity-list';
     return $list;
diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php
deleted file mode 100644
index bddb8c5..0000000
--- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\views_ui\ViewPreviewFormController.
- */
-
-namespace Drupal\views_ui;
-
-use Drupal\Core\Entity\EntityInterface;
-
-/**
- * Form controller for the Views preview form.
- */
-class ViewPreviewFormController extends ViewFormControllerBase {
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::form().
-   */
-  public function form(array $form, array &$form_state, EntityInterface $view) {
-    $form['#prefix'] = '<div id="views-preview-wrapper" class="views-admin clearfix">';
-    $form['#suffix'] = '</div>';
-    $form['#id'] = 'views-ui-preview-form';
-
-    // Reset the cache of IDs. Drupal rather aggressively prevents ID
-    // duplication but this causes it to remember IDs that are no longer even
-    // being used.
-    $seen_ids_init = &drupal_static('drupal_html_id:init');
-    $seen_ids_init = array();
-
-    $form_state['no_cache'] = TRUE;
-
-    $form['controls']['#attributes'] = array('class' => array('clearfix'));
-
-    // Add a checkbox controlling whether or not this display auto-previews.
-    $form['controls']['live_preview'] = array(
-      '#type' => 'checkbox',
-      '#id' => 'edit-displays-live-preview',
-      '#title' => t('Auto preview'),
-      '#default_value' => config('views.settings')->get('ui.always_live_preview'),
-    );
-
-    // Add the arguments textfield
-    $form['controls']['view_args'] = array(
-      '#type' => 'textfield',
-      '#title' => t('Preview with contextual filters:'),
-      '#description' => t('Separate contextual filter values with a "/". For example, %example.', array('%example' => '40/12/10')),
-      '#id' => 'preview-args',
-    );
-    $form['controls']['#action'] = url('admin/structure/views/view/' . $view->get('name') .'/preview/' . $view->displayID);
-
-    $args = array();
-    if (!empty($form_state['values']['view_args'])) {
-      $args = explode('/', $form_state['values']['view_args']);
-    }
-
-    if ($view->renderPreview) {
-      $form['preview'] = array(
-        '#weight' => 110,
-        '#theme_wrappers' => array('container'),
-        '#attributes' => array('id' => 'views-live-preview'),
-        '#markup' => $view->renderPreview($view->displayID, $args),
-      );
-    }
-    $form['#action'] = url('admin/structure/views/view/' . $view->get('name') .'/preview/' . $view->displayID);
-
-    return $form;
-  }
-
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::actions().
-   */
-  protected function actions(array $form, array &$form_state) {
-    $view = $this->getEntity($form_state);
-    return array(
-      '#attributes' => array(
-        'id' => 'preview-submit-wrapper',
-      ),
-      'button' => array(
-        '#type' => 'submit',
-        '#value' => t('Update preview'),
-        '#attributes' => array('class' => array('arguments-preview')),
-        '#id' => 'preview-submit',
-        '#ajax' => array(
-          'path' => 'admin/structure/views/view/' . $view->get('name') . '/preview/' . $view->displayID . '/ajax',
-          'wrapper' => 'views-preview-wrapper',
-          'event' => 'click',
-          'progress' => array('type' => 'throbber'),
-          'method' => 'replace',
-        ),
-      ),
-    );
-  }
-
-}
diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php
index a1aec9e..dda1c01 100644
--- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php
+++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php
@@ -10,13 +10,11 @@
 use Drupal\views\ViewExecutable;
 use Drupal\Core\Database\Database;
 use Drupal\views\Plugin\views\query\Sql;
-use Drupal\views\Plugin\Core\Entity\View;
-use Drupal\views\ViewStorageInterface;
 
 /**
  * Stores UI related temporary settings.
  */
-class ViewUI implements ViewStorageInterface {
+class ViewUI extends ViewExecutable {
 
   /**
    * Indicates if a view is currently being edited.
@@ -95,57 +93,376 @@ class ViewUI implements ViewStorageInterface {
    */
   public $live_preview;
 
-  public $displayID;
-
-  public $renderPreview = FALSE;
+  /**
+   * Overrides Drupal\views\ViewExecutable::cloneView().
+   */
+  public function cloneView() {
+    $storage = clone $this->storage;
+    return $storage->getExecutable(TRUE, TRUE);
+  }
 
   /**
-   * The View storage object.
+   * Placeholder function for overriding $display['display_title'].
    *
-   * @var \Drupal\views\Plugin\Core\Entity\View
+   * @todo Remove this function once editing the display title is possible.
    */
-  protected $storage;
+  public function getDisplayLabel($display_id, $check_changed = TRUE) {
+    $display = $this->storage->get('display');
+    $title = $display_id == 'default' ? t('Master') : $display[$display_id]['display_title'];
+    $title = views_ui_truncate($title, 25);
+
+    if ($check_changed && !empty($this->changed_display[$display_id])) {
+      $changed = '*';
+      $title = $title . $changed;
+    }
+
+    return $title;
+  }
 
   /**
-   * The View executable object.
+   * Helper function to return the used display_id for the edit page
    *
-   * @var \Drupal\views\ViewExecutable
+   * This function handles access to the display.
    */
-  protected $executable;
+  public function getDisplayEditPage($display_id) {
+    // Determine the displays available for editing.
+    if ($tabs = $this->getDisplayTabs($display_id)) {
+      // If a display isn't specified, use the first one.
+      if (empty($display_id)) {
+        foreach ($tabs as $id => $tab) {
+          if (!isset($tab['#access']) || $tab['#access']) {
+            $display_id = $id;
+            break;
+          }
+        }
+      }
+      // If a display is specified, but we don't have access to it, return
+      // an access denied page.
+      if ($display_id && (!isset($tabs[$display_id]) || (isset($tabs[$display_id]['#access']) && !$tabs[$display_id]['#access']))) {
+        return MENU_ACCESS_DENIED;
+      }
+
+      return $display_id;
+    }
+    elseif ($display_id) {
+      return MENU_ACCESS_DENIED;
+    }
+    else {
+      $display_id = NULL;
+    }
+
+    return $display_id;
+  }
 
   /**
-   * Constructs a View UI object.
+   * Helper function to get the display details section of the edit UI.
+   *
+   * @param $display
    *
-   * @param \Drupal\views\ViewStorageInterface $storage
-   *   The View storage object to wrap.
+   * @return array
+   *   A renderable page build array.
    */
-  public function __construct(ViewStorageInterface $storage) {
-    $this->entityType = 'view';
-    $this->storage = $storage;
-    $this->executable = $storage->get('executable');
+  public function getDisplayDetails($display) {
+    $display_title = $this->getDisplayLabel($display['id'], FALSE);
+    $build = array(
+      '#theme_wrappers' => array('container'),
+      '#attributes' => array('id' => 'edit-display-settings-details'),
+    );
+
+    $is_display_deleted = !empty($display['deleted']);
+    // The master display cannot be cloned.
+    $is_default = $display['id'] == 'default';
+    // @todo: Figure out why getOption doesn't work here.
+    $is_enabled = $this->displayHandlers[$display['id']]->isEnabled();
+
+    if ($display['id'] != 'default') {
+      $build['top']['#theme_wrappers'] = array('container');
+      $build['top']['#attributes']['id'] = 'edit-display-settings-top';
+      $build['top']['#attributes']['class'] = array('views-ui-display-tab-actions', 'views-ui-display-tab-bucket', 'clearfix');
+
+      // The Delete, Duplicate and Undo Delete buttons.
+      $build['top']['actions'] = array(
+        '#theme_wrappers' => array('dropbutton_wrapper'),
+      );
+
+      // Because some of the 'links' are actually submit buttons, we have to
+      // manually wrap each item in <li> and the whole list in <ul>.
+      $build['top']['actions']['prefix']['#markup'] = '<ul class="dropbutton">';
+
+      if (!$is_display_deleted) {
+        if (!$is_enabled) {
+          $build['top']['actions']['enable'] = array(
+            '#type' => 'submit',
+            '#value' => t('enable @display_title', array('@display_title' => $display_title)),
+            '#limit_validation_errors' => array(),
+            '#submit' => array(array($this, 'submitDisplayEnable'), array($this, 'submitDelayDestination')),
+            '#prefix' => '<li class="enable">',
+            "#suffix" => '</li>',
+          );
+        }
+        // Add a link to view the page.
+        elseif ($this->displayHandlers[$display['id']]->hasPath()) {
+          $path = $this->displayHandlers[$display['id']]->getPath();
+          if (strpos($path, '%') === FALSE) {
+            $build['top']['actions']['path'] = array(
+              '#type' => 'link',
+              '#title' => t('view @display', array('@display' => $display['display_title'])),
+              '#options' => array('alt' => array(t("Go to the real page for this display"))),
+              '#href' => $path,
+              '#prefix' => '<li class="view">',
+              "#suffix" => '</li>',
+            );
+          }
+        }
+        if (!$is_default) {
+          $build['top']['actions']['duplicate'] = array(
+            '#type' => 'submit',
+            '#value' => t('clone @display_title', array('@display_title' => $display_title)),
+            '#limit_validation_errors' => array(),
+            '#submit' => array(array($this, 'submitDisplayDuplicate'), array($this, 'submitDelayDestination')),
+            '#prefix' => '<li class="duplicate">',
+            "#suffix" => '</li>',
+          );
+        }
+        // Always allow a display to be deleted.
+        $build['top']['actions']['delete'] = array(
+          '#type' => 'submit',
+          '#value' => t('delete @display_title', array('@display_title' => $display_title)),
+          '#limit_validation_errors' => array(),
+          '#submit' => array(array($this, 'submitDisplayDelete'), array($this, 'submitDelayDestination')),
+          '#prefix' => '<li class="delete">',
+          "#suffix" => '</li>',
+        );
+        if ($is_enabled) {
+          $build['top']['actions']['disable'] = array(
+            '#type' => 'submit',
+            '#value' => t('disable @display_title', array('@display_title' => $display_title)),
+            '#limit_validation_errors' => array(),
+            '#submit' => array(array($this, 'submitDisplayDisable'), array($this, 'submitDelayDestination')),
+            '#prefix' => '<li class="disable">',
+            "#suffix" => '</li>',
+          );
+        }
+      }
+      else {
+        $build['top']['actions']['undo_delete'] = array(
+          '#type' => 'submit',
+          '#value' => t('undo delete of @display_title', array('@display_title' => $display_title)),
+          '#limit_validation_errors' => array(),
+          '#submit' => array(array($this, 'submitDisplayUndoDelete'), array($this, 'submitDelayDestination')),
+          '#prefix' => '<li class="undo-delete">',
+          "#suffix" => '</li>',
+        );
+      }
+      $build['top']['actions']['suffix']['#markup'] = '</ul>';
+
+      // The area above the three columns.
+      $build['top']['display_title'] = array(
+        '#theme' => 'views_ui_display_tab_setting',
+        '#description' => t('Display name'),
+        '#link' => $this->displayHandlers[$display['id']]->optionLink(check_plain($display_title), 'display_title'),
+      );
+    }
+
+    $build['columns'] = array();
+    $build['columns']['#theme_wrappers'] = array('container');
+    $build['columns']['#attributes'] = array('id' => 'edit-display-settings-main', 'class' => array('clearfix', 'views-display-columns'));
+
+    $build['columns']['first']['#theme_wrappers'] = array('container');
+    $build['columns']['first']['#attributes'] = array('class' => array('views-display-column', 'first'));
+
+    $build['columns']['second']['#theme_wrappers'] = array('container');
+    $build['columns']['second']['#attributes'] = array('class' => array('views-display-column', 'second'));
+
+    $build['columns']['second']['settings'] = array();
+    $build['columns']['second']['header'] = array();
+    $build['columns']['second']['footer'] = array();
+    $build['columns']['second']['pager'] = array();
+
+    // The third column buckets are wrapped in a fieldset.
+    $build['columns']['third'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Advanced'),
+      '#collapsible' => TRUE,
+      '#collapsed' => TRUE,
+      '#theme_wrappers' => array('fieldset', 'container'),
+      '#attributes' => array(
+        'class' => array(
+          'views-display-column',
+          'third',
+        ),
+      ),
+    );
+
+    // Collapse the fieldset by default.
+    if (config('views.settings')->get('ui.show.advanced_column')) {
+      $build['columns']['third']['#collapsed'] = FALSE;
+    }
+
+    // Each option (e.g. title, access, display as grid/table/list) fits into one
+    // of several "buckets," or boxes (Format, Fields, Sort, and so on).
+    $buckets = array();
+
+    // Fetch options from the display plugin, with a list of buckets they go into.
+    $options = array();
+    $this->displayHandlers[$display['id']]->optionsSummary($buckets, $options);
+
+    // Place each option into its bucket.
+    foreach ($options as $id => $option) {
+      // Each option self-identifies as belonging in a particular bucket.
+      $buckets[$option['category']]['build'][$id] = $this->buildOptionForm($id, $option, $display);
+    }
+
+    // Place each bucket into the proper column.
+    foreach ($buckets as $id => $bucket) {
+      // Let buckets identify themselves as belonging in a column.
+      if (isset($bucket['column']) && isset($build['columns'][$bucket['column']])) {
+        $column = $bucket['column'];
+      }
+      // If a bucket doesn't pick one of our predefined columns to belong to, put
+      // it in the last one.
+      else {
+        $column = 'third';
+      }
+      if (isset($bucket['build']) && is_array($bucket['build'])) {
+        $build['columns'][$column][$id] = $bucket['build'];
+        $build['columns'][$column][$id]['#theme_wrappers'][] = 'views_ui_display_tab_bucket';
+        $build['columns'][$column][$id]['#title'] = !empty($bucket['title']) ? $bucket['title'] : '';
+        $build['columns'][$column][$id]['#name'] = !empty($bucket['title']) ? $bucket['title'] : $id;
+      }
+    }
+
+    $build['columns']['first']['fields'] = $this->getFormBucket('field', $display);
+    $build['columns']['first']['filters'] = $this->getFormBucket('filter', $display);
+    $build['columns']['first']['sorts'] = $this->getFormBucket('sort', $display);
+    $build['columns']['second']['header'] = $this->getFormBucket('header', $display);
+    $build['columns']['second']['footer'] = $this->getFormBucket('footer', $display);
+    $build['columns']['third']['arguments'] = $this->getFormBucket('argument', $display);
+    $build['columns']['third']['relationships'] = $this->getFormBucket('relationship', $display);
+    $build['columns']['third']['empty'] = $this->getFormBucket('empty', $display);
+
+    return $build;
   }
 
   /**
-   * Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::get().
+   * Build a renderable array representing one option on the edit form.
+   *
+   * This function might be more logical as a method on an object, if a suitable
+   * object emerges out of refactoring.
    */
-  public function get($property_name, $langcode = NULL) {
-    if (property_exists($this->storage, $property_name)) {
-      return $this->storage->get($property_name, $langcode);
+  public function buildOptionForm($id, $option, $display) {
+    $option_build = array();
+    $option_build['#theme'] = 'views_ui_display_tab_setting';
+
+    $option_build['#description'] = $option['title'];
+
+    $option_build['#link'] = $this->displayHandlers[$display['id']]->optionLink($option['value'], $id, '', empty($option['desc']) ? '' : $option['desc']);
+
+    $option_build['#links'] = array();
+    if (!empty($option['links']) && is_array($option['links'])) {
+      foreach ($option['links'] as $link_id => $link_value) {
+        $option_build['#settings_links'][] = $this->displayHandlers[$display['id']]->optionLink($option['setting'], $link_id, 'views-button-configure', $link_value);
+      }
     }
 
-    return isset($this->{$property_name}) ? $this->{$property_name} : NULL;
+    if (!empty($this->displayHandlers[$display['id']]->options['defaults'][$id])) {
+      $display_id = 'default';
+      $option_build['#defaulted'] = TRUE;
+    }
+    else {
+      $display_id = $display['id'];
+      if (!$this->displayHandlers[$display['id']]->isDefaultDisplay()) {
+        if ($this->displayHandlers[$display['id']]->defaultableSections($id)) {
+          $option_build['#overridden'] = TRUE;
+        }
+      }
+    }
+    $option_build['#attributes']['class'][] = drupal_clean_css_identifier($display_id . '-' . $id);
+    return $option_build;
   }
 
   /**
-   * Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::set().
+   * Render the top of the display so it can be updated during ajax operations.
    */
-  public function set($property_name, $value) {
-    if (property_exists($this->storage, $property_name)) {
-      $this->storage->set($property_name, $value);
+  public function renderDisplayTop($display_id) {
+    $element['#theme_wrappers'] = array('views_ui_container');
+    $element['#attributes']['class'] = array('views-display-top', 'clearfix');
+    $element['#attributes']['id'] = array('views-display-top');
+
+    // Extra actions for the display
+    $element['extra_actions'] = array(
+      '#type' => 'dropbutton',
+      '#attributes' => array(
+        'id' => 'views-display-extra-actions',
+      ),
+      '#links' => array(
+        'edit-details' => array(
+          'title' => t('edit view name/description'),
+          'href' => "admin/structure/views/nojs/edit-details/{$this->storage->get('name')}",
+          'attributes' => array('class' => array('views-ajax-link')),
+        ),
+        'analyze' => array(
+          'title' => t('analyze view'),
+          'href' => "admin/structure/views/nojs/analyze/{$this->storage->get('name')}/$display_id",
+          'attributes' => array('class' => array('views-ajax-link')),
+        ),
+        'clone' => array(
+          'title' => t('clone view'),
+          'href' => "admin/structure/views/view/{$this->storage->get('name')}/clone",
+        ),
+        'reorder' => array(
+          'title' => t('reorder displays'),
+          'href' => "admin/structure/views/nojs/reorder-displays/{$this->storage->get('name')}/$display_id",
+          'attributes' => array('class' => array('views-ajax-link')),
+        ),
+      ),
+    );
+
+    // Let other modules add additional links here.
+    drupal_alter('views_ui_display_top_links', $element['extra_actions']['#links'], $this, $display_id);
+
+    if (isset($this->type) && $this->type != t('Default')) {
+      if ($this->type == t('Overridden')) {
+        $element['extra_actions']['#links']['revert'] = array(
+          'title' => t('revert view'),
+          'href' => "admin/structure/views/view/{$this->storage->get('name')}/revert",
+          'query' => array('destination' => "admin/structure/views/view/{$this->storage->get('name')}"),
+        );
+      }
+      else {
+        $element['extra_actions']['#links']['delete'] = array(
+          'title' => t('delete view'),
+          'href' => "admin/structure/views/view/{$this->storage->get('name')}/delete",
+        );
+      }
     }
-    else {
-      $this->{$property_name} = $value;
+
+    // Determine the displays available for editing.
+    if ($tabs = $this->getDisplayTabs($display_id)) {
+      if ($display_id) {
+        $tabs[$display_id]['#active'] = TRUE;
+      }
+      $tabs['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2><ul id = "views-display-menu-tabs" class="tabs secondary">';
+      $tabs['#suffix'] = '</ul>';
+      $element['tabs'] = $tabs;
+    }
+
+    // Buttons for adding a new display.
+    foreach (views_fetch_plugin_names('display', NULL, array($this->storage->get('base_table'))) as $type => $label) {
+      $element['add_display'][$type] = array(
+        '#type' => 'submit',
+        '#value' => t('Add !display', array('!display' => $label)),
+        '#limit_validation_errors' => array(),
+        '#submit' => array(array($this, 'submitDisplayAdd'), array($this, 'submitDelayDestination')),
+        '#attributes' => array('class' => array('add-display')),
+        // Allow JavaScript to remove the 'Add ' prefix from the button label when
+        // placing the button in a "Add" dropdown menu.
+        '#process' => array_merge(array('views_ui_form_button_was_clicked'), element_info_property('submit', '#process', array())),
+        '#values' => array(t('Add !display', array('!display' => $label)), $label),
+      );
     }
+
+    return $element;
   }
 
   public static function getDefaultAJAXMessage() {
@@ -153,6 +470,97 @@ public static function getDefaultAJAXMessage() {
   }
 
   /**
+   * Adds tabs for navigating across Displays when editing a View.
+   *
+   * This function can be called from hook_menu_local_tasks_alter() to implement
+   * these tabs as secondary local tasks, or it can be called from elsewhere if
+   * having them as secondary local tasks isn't desired. The caller is responsible
+   * for setting the active tab's #active property to TRUE.
+   *
+   * @param $display_id
+   *   The display_id which is edited on the current request.
+   */
+  public function getDisplayTabs($display_id = NULL) {
+    $tabs = array();
+
+    // Create a tab for each display.
+    $displays = $this->storage->get('display');
+    uasort($displays, array('static', 'sortPosition'));
+    $this->storage->set('display', $displays);
+    foreach ($displays as $id => $display) {
+      $tabs[$id] = array(
+        '#theme' => 'menu_local_task',
+        '#link' => array(
+          'title' => $this->getDisplayLabel($id),
+          'href' => 'admin/structure/views/view/' . $this->storage->get('name') . '/edit/' . $id,
+          'localized_options' => array(),
+        ),
+      );
+      if (!empty($display['deleted'])) {
+        $tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'views-display-deleted-link';
+      }
+      if (isset($display['display_options']['enabled']) && !$display['display_options']['enabled']) {
+        $tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'views-display-disabled-link';
+      }
+    }
+
+    // If the default display isn't supposed to be shown, don't display its tab, unless it's the only display.
+    if ((!$this->isDefaultDisplayShown() && $display_id != 'default') && count($tabs) > 1) {
+      $tabs['default']['#access'] = FALSE;
+    }
+
+    // Mark the display tab as red to show validation errors.
+    $this->validate();
+    foreach ($this->storage->get('display') as $id => $display) {
+      if (!empty($this->display_errors[$id])) {
+        // Always show the tab.
+        $tabs[$id]['#access'] = TRUE;
+        // Add a class to mark the error and a title to make a hover tip.
+        $tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'error';
+        $tabs[$id]['#link']['localized_options']['attributes']['title'] = t('This display has one or more validation errors; please review it.');
+      }
+    }
+
+    return $tabs;
+  }
+
+  /**
+   * Returns a renderable array representing the edit page for one display.
+   */
+  public function getDisplayTab($display_id) {
+    $build = array();
+    $display = $this->displayHandlers[$display_id];
+    // If the plugin doesn't exist, display an error message instead of an edit
+    // page.
+    if (empty($display)) {
+      $title = isset($display['display_title']) ? $display['display_title'] : t('Invalid');
+      // @TODO: Improved UX for the case where a plugin is missing.
+      $build['#markup'] = t("Error: Display @display refers to a plugin named '@plugin', but that plugin is not available.", array('@display' => $display['id'], '@plugin' => $display['display_plugin']));
+    }
+    // Build the content of the edit page.
+    else {
+      $build['details'] = $this->getDisplayDetails($display->display);
+    }
+    // In AJAX context, ViewUI::rebuildCurrentTab() returns this outside of form
+    // context, so hook_form_views_ui_edit_form_alter() is insufficient.
+    drupal_alter('views_ui_display_tab', $build, $this, $display_id);
+    return $build;
+  }
+
+  /**
+   * Controls whether or not the default display should have its own tab on edit.
+   */
+  public function isDefaultDisplayShown() {
+    // Always show the default display for advanced users who prefer that mode.
+    $advanced_mode = config('views.settings')->get('ui.show.master_display');
+    // For other users, show the default display only if there are no others, and
+    // hide it if there's at least one "real" display.
+    $additional_displays = (count($this->displayHandlers) == 1);
+
+    return $advanced_mode || $additional_displays;
+  }
+
+  /**
    * Basic submit handler applicable to all 'standard' forms.
    *
    * This submit handler determines whether the user wants the submitted changes
@@ -169,7 +577,7 @@ public function standardSubmit($form, &$form_state) {
     // these changes apply to.
     if ($revert) {
       // If it's revert just change the override and return.
-      $display = &$this->executable->displayHandlers[$form_state['display_id']];
+      $display = &$this->displayHandlers[$form_state['display_id']];
       $display->optionsOverride($form, $form_state);
 
       // Don't execute the normal submit handling but still store the changed view into cache.
@@ -183,7 +591,7 @@ public function standardSubmit($form, &$form_state) {
     elseif ($was_defaulted && !$is_defaulted) {
       // We were using the default display's values, but we're now overriding
       // the default display and saving values specific to this display.
-      $display = &$this->executable->displayHandlers[$form_state['display_id']];
+      $display = &$this->displayHandlers[$form_state['display_id']];
       // optionsOverride toggles the override of this section.
       $display->optionsOverride($form, $form_state);
       $display->submitOptionsForm($form, $form_state);
@@ -193,7 +601,7 @@ public function standardSubmit($form, &$form_state) {
       // to go back to the default display.
       // Overwrite the default display with the current form values, and make
       // the current display use the new default values.
-      $display = &$this->executable->displayHandlers[$form_state['display_id']];
+      $display = &$this->displayHandlers[$form_state['display_id']];
       // optionsOverride toggles the override of this section.
       $display->optionsOverride($form, $form_state);
       $display->submitOptionsForm($form, $form_state);
@@ -214,7 +622,7 @@ public function standardCancel($form, &$form_state) {
       views_ui_cache_set($this);
     }
 
-    $form_state['redirect'] = 'admin/structure/views/view/' . $this->get('name') . '/edit';
+    $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->get('name') . '/edit';
   }
 
   /**
@@ -315,6 +723,362 @@ public function getStandardButtons(&$form, &$form_state, $form_id, $name = NULL,
   }
 
   /**
+   * Creates an array of Views admin CSS for adding or attaching.
+   *
+   * This returns an array of arrays. Each array represents a single
+   * file. The array format is:
+   * - file: The fully qualified name of the file to send to drupal_add_css
+   * - options: An array of options to pass to drupal_add_css.
+   */
+  public static function getAdminCSS() {
+    $module_path = drupal_get_path('module', 'views_ui');
+    $list = array();
+    $list[$module_path . '/css/views-admin.css'] = array();
+    $list[$module_path . '/css/views-admin.theme.css'] = array();
+
+    // Add in any theme specific CSS files we have
+    $themes = list_themes();
+    $theme_key = $GLOBALS['theme'];
+    while ($theme_key) {
+      // Try to find the admin css file for non-core themes.
+      if (!in_array($theme_key, array('seven', 'bartik'))) {
+        $theme_path = drupal_get_path('theme', $theme_key);
+        // First search in the css directory, then in the root folder of the theme.
+        if (file_exists($theme_path . "/css/views-admin.$theme_key.css")) {
+          $list[$theme_path . "/css/views-admin.$theme_key.css"] = array(
+            'group' => CSS_THEME,
+          );
+        }
+        elseif (file_exists($theme_path . "/views-admin.$theme_key.css")) {
+          $list[$theme_path . "/views-admin.$theme_key.css"] = array(
+            'group' => CSS_THEME,
+          );
+        }
+      }
+      else {
+        $list[$module_path . "/css/views-admin.$theme_key.css"] = array(
+          'group' => CSS_THEME,
+        );
+      }
+      $theme_key = isset($themes[$theme_key]->base_theme) ? $themes[$theme_key]->base_theme : '';
+    }
+    if (module_exists('contextual')) {
+      $list[$module_path . '/css/views-admin.contextual.css'] = array();
+    }
+
+    return $list;
+  }
+
+  /**
+   * Submit handler to add a display to a view.
+   */
+  public function submitDisplayAdd($form, &$form_state) {
+    // Create the new display.
+    $parents = $form_state['triggering_element']['#parents'];
+    $display_type = array_pop($parents);
+    $display_id = $this->storage->addDisplay($display_type);
+    // A new display got added so the asterisks symbol should appear on the new
+    // display.
+    $this->current_display = $display_id;
+    views_ui_cache_set($this);
+
+    // Redirect to the new display's edit page.
+    $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->get('name') . '/edit/' . $display_id;
+  }
+
+  /**
+   * Submit handler to duplicate a display for a view.
+   */
+  public function submitDisplayDuplicate($form, &$form_state) {
+    $display_id = $form_state['display_id'];
+
+    // Create the new display.
+    $displays = $this->storage->get('display');
+    $new_display_id = $this->storage->addDisplay($displays[$display_id]['display_plugin']);
+    $displays[$new_display_id] = $displays[$display_id];
+    $displays[$new_display_id]['id'] = $new_display_id;
+    $this->storage->set('display', $displays);
+
+    // By setting the current display the changed marker will appear on the new
+    // display.
+    $this->current_display = $new_display_id;
+    views_ui_cache_set($this);
+
+    // Redirect to the new display's edit page.
+    $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->get('name') . '/edit/' . $new_display_id;
+  }
+
+  /**
+   * Submit handler to delete a display from a view.
+   */
+  public function submitDisplayDelete($form, &$form_state) {
+    $display_id = $form_state['display_id'];
+
+    // Mark the display for deletion.
+    $displays = $this->storage->get('display');
+    $displays[$display_id]['deleted'] = TRUE;
+    $this->storage->set('display', $displays);
+    views_ui_cache_set($this);
+
+    // Redirect to the top-level edit page. The first remaining display will
+    // become the active display.
+    $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->get('name');
+  }
+
+  /**
+   * Submit handler for form buttons that do not complete a form workflow.
+   *
+   * The Edit View form is a multistep form workflow, but with state managed by
+   * the TempStore rather than $form_state['rebuild']. Without this
+   * submit handler, buttons that add or remove displays would redirect to the
+   * destination parameter (e.g., when the Edit View form is linked to from a
+   * contextual link). This handler can be added to buttons whose form submission
+   * should not yet redirect to the destination.
+   */
+  public function submitDelayDestination($form, &$form_state) {
+    $query = drupal_container()->get('request')->query;
+    // @todo: Revisit this when http://drupal.org/node/1668866 is in.
+    $destination = $query->get('destination');
+    if (isset($destination) && $form_state['redirect'] !== FALSE) {
+      if (!isset($form_state['redirect'])) {
+        $form_state['redirect'] = current_path();
+      }
+      if (is_string($form_state['redirect'])) {
+        $form_state['redirect'] = array($form_state['redirect']);
+      }
+      $options = isset($form_state['redirect'][1]) ? $form_state['redirect'][1] : array();
+      if (!isset($options['query']['destination'])) {
+        $options['query']['destination'] = $destination;
+      }
+      $form_state['redirect'][1] = $options;
+      $query->remove('destination');
+    }
+  }
+
+  /**
+   * Submit handler to enable a disabled display.
+   */
+  public function submitDisplayEnable($form, &$form_state) {
+    $id = $form_state['display_id'];
+    // setOption doesn't work because this would might affect upper displays
+    $this->displayHandlers[$id]->setOption('enabled', TRUE);
+
+    // Store in cache
+    views_ui_cache_set($this);
+
+    // Redirect to the top-level edit page.
+    $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->get('name') . '/edit/' . $id;
+  }
+
+  /**
+   * Submit handler to disable display.
+   */
+  public function submitDisplayDisable($form, &$form_state) {
+    $id = $form_state['display_id'];
+    $this->displayHandlers[$id]->setOption('enabled', FALSE);
+
+    // Store in cache
+    views_ui_cache_set($this);
+
+    // Redirect to the top-level edit page.
+    $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->get('name') . '/edit/' . $id;
+  }
+
+  /**
+   * Submit handler to add a restore a removed display to a view.
+   */
+  public function submitDisplayUndoDelete($form, &$form_state) {
+    // Create the new display
+    $id = $form_state['display_id'];
+    $displays = $this->storage->get('display');
+    $displays[$id]['deleted'] = FALSE;
+    $this->storage->set('display', $displays);
+
+    // Store in cache
+    views_ui_cache_set($this);
+
+    // Redirect to the top-level edit page.
+    $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->get('name') . '/edit/' . $id;
+  }
+
+  /**
+   * Add information about a section to a display.
+   */
+  public function getFormBucket($type, $display) {
+    $build = array(
+      '#theme_wrappers' => array('views_ui_display_tab_bucket'),
+    );
+    $types = static::viewsHandlerTypes();
+
+    $build['#overridden'] = FALSE;
+    $build['#defaulted'] = FALSE;
+
+    $build['#name'] = $build['#title'] = $types[$type]['title'];
+
+    // Different types now have different rearrange forms, so we use this switch
+    // to get the right one.
+    switch ($type) {
+      case 'filter':
+        $rearrange_url = "admin/structure/views/nojs/rearrange-$type/{$this->storage->get('name')}/{$display['id']}/$type";
+        $rearrange_text = t('And/Or, Rearrange');
+        // TODO: Add another class to have another symbol for filter rearrange.
+        $class = 'icon compact rearrange';
+        break;
+      case 'field':
+        // Fetch the style plugin info so we know whether to list fields or not.
+        $style_plugin = $this->displayHandlers[$display['id']]->getPlugin('style');
+        $uses_fields = $style_plugin && $style_plugin->usesFields();
+        if (!$uses_fields) {
+          $build['fields'][] = array(
+            '#markup' => t('The selected style or row format does not utilize fields.'),
+            '#theme_wrappers' => array('views_ui_container'),
+            '#attributes' => array('class' => array('views-display-setting')),
+          );
+          return $build;
+        }
+
+      default:
+        $rearrange_url = "admin/structure/views/nojs/rearrange/{$this->storage->get('name')}/{$display['id']}/$type";
+        $rearrange_text = t('Rearrange');
+        $class = 'icon compact rearrange';
+    }
+
+    // Create an array of actions to pass to theme_links
+    $actions = array();
+    $count_handlers = count($this->displayHandlers[$display['id']]->getHandlers($type));
+    $actions['add'] = array(
+      'title' => t('Add'),
+      'href' => "admin/structure/views/nojs/add-item/{$this->storage->get('name')}/{$display['id']}/$type",
+      'attributes' => array('class' => array('icon compact add', 'views-ajax-link'), 'title' => t('Add'), 'id' => 'views-add-' . $type),
+      'html' => TRUE,
+    );
+    if ($count_handlers > 0) {
+      $actions['rearrange'] = array(
+        'title' => $rearrange_text,
+        'href' => $rearrange_url,
+        'attributes' => array('class' => array($class, 'views-ajax-link'), 'title' => t('Rearrange'), 'id' => 'views-rearrange-' . $type),
+        'html' => TRUE,
+      );
+    }
+
+    // Render the array of links
+    $build['#actions'] = array(
+      '#type' => 'dropbutton',
+      '#links' => $actions,
+      '#attributes' => array(
+        'class' => array('views-ui-settings-bucket-operations'),
+      ),
+    );
+
+    if (!$this->displayHandlers[$display['id']]->isDefaultDisplay()) {
+      if (!$this->displayHandlers[$display['id']]->isDefaulted($types[$type]['plural'])) {
+        $build['#overridden'] = TRUE;
+      }
+      else {
+        $build['#defaulted'] = TRUE;
+      }
+    }
+
+    static $relationships = NULL;
+    if (!isset($relationships)) {
+      // Get relationship labels
+      $relationships = array();
+      foreach ($this->displayHandlers[$display['id']]->getHandlers('relationship') as $id => $handler) {
+        $relationships[$id] = $handler->label();
+      }
+    }
+
+    // Filters can now be grouped so we do a little bit extra:
+    $groups = array();
+    $grouping = FALSE;
+    if ($type == 'filter') {
+      $group_info = $this->display_handler->getOption('filter_groups');
+      // If there is only one group but it is using the "OR" filter, we still
+      // treat it as a group for display purposes, since we want to display the
+      // "OR" label next to items within the group.
+      if (!empty($group_info['groups']) && (count($group_info['groups']) > 1 || current($group_info['groups']) == 'OR')) {
+        $grouping = TRUE;
+        $groups = array(0 => array());
+      }
+    }
+
+    $build['fields'] = array();
+
+    foreach ($this->displayHandlers[$display['id']]->getOption($types[$type]['plural']) as $id => $field) {
+      // Build the option link for this handler ("Node: ID = article").
+      $build['fields'][$id] = array();
+      $build['fields'][$id]['#theme'] = 'views_ui_display_tab_setting';
+
+      $handler = $this->displayHandlers[$display['id']]->getHandler($type, $id);
+      if (empty($handler)) {
+        $build['fields'][$id]['#class'][] = 'broken';
+        $field_name = t('Broken/missing handler: @table > @field', array('@table' => $field['table'], '@field' => $field['field']));
+        $build['fields'][$id]['#link'] = l($field_name, "admin/structure/views/nojs/config-item/{$this->storage->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-ajax-link')), 'html' => TRUE));
+        continue;
+      }
+
+      $field_name = check_plain($handler->adminLabel(TRUE));
+      if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) {
+        $field_name = '(' . $relationships[$field['relationship']] . ') ' . $field_name;
+      }
+
+      $description = filter_xss_admin($handler->adminSummary());
+      $link_text = $field_name . (empty($description) ? '' : " ($description)");
+      $link_attributes = array('class' => array('views-ajax-link'));
+      if (!empty($field['exclude'])) {
+        $link_attributes['class'][] = 'views-field-excluded';
+      }
+      $build['fields'][$id]['#link'] = l($link_text, "admin/structure/views/nojs/config-item/{$this->storage->get('name')}/{$display['id']}/$type/$id", array('attributes' => $link_attributes, 'html' => TRUE));
+      $build['fields'][$id]['#class'][] = drupal_clean_css_identifier($display['id']. '-' . $type . '-' . $id);
+
+      if ($this->displayHandlers[$display['id']]->useGroupBy() && $handler->usesGroupBy()) {
+        $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . t('Aggregation settings') . '</span>', "admin/structure/views/nojs/config-item-group/{$this->storage->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => 'views-button-configure views-ajax-link', 'title' => t('Aggregation settings')), 'html' => TRUE));
+      }
+
+      if ($handler->hasExtraOptions()) {
+        $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . t('Settings') . '</span>', "admin/structure/views/nojs/config-item-extra/{$this->storage->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => t('Settings')), 'html' => TRUE));
+      }
+
+      if ($grouping) {
+        $gid = $handler->options['group'];
+
+        // Show in default group if the group does not exist.
+        if (empty($group_info['groups'][$gid])) {
+          $gid = 0;
+        }
+        $groups[$gid][] = $id;
+      }
+    }
+
+    // If using grouping, re-order fields so that they show up properly in the list.
+    if ($type == 'filter' && $grouping) {
+      $store = $build['fields'];
+      $build['fields'] = array();
+      foreach ($groups as $gid => $contents) {
+        // Display an operator between each group.
+        if (!empty($build['fields'])) {
+          $build['fields'][] = array(
+            '#theme' => 'views_ui_display_tab_setting',
+            '#class' => array('views-group-text'),
+            '#link' => ($group_info['operator'] == 'OR' ? t('OR') : t('AND')),
+          );
+        }
+        // Display an operator between each pair of filters within the group.
+        $keys = array_keys($contents);
+        $last = end($keys);
+        foreach ($contents as $key => $pid) {
+          if ($key != $last) {
+            $store[$pid]['#link'] .= '&nbsp;&nbsp;' . ($group_info['groups'][$gid] == 'OR' ? t('OR') : t('AND'));
+          }
+          $build['fields'][$pid] = $store[$pid];
+        }
+      }
+    }
+
+    return $build;
+  }
+
+  /**
    * Return the was_defaulted, is_defaulted and revert state of a form.
    */
   public function getOverrideValues($form, $form_state) {
@@ -343,14 +1107,383 @@ public function getOverrideValues($form, $form_state) {
   }
 
   /**
+   * Regenerate the current tab for AJAX updates.
+   */
+  public function rebuildCurrentTab(&$output, $display_id) {
+    if (!$this->setDisplay('default')) {
+      return;
+    }
+
+    // Regenerate the main display area.
+    $build = $this->getDisplayTab($display_id);
+    static::addMicroweights($build);
+    $output[] = ajax_command_html('#views-tab-' . $display_id, drupal_render($build));
+
+    // Regenerate the top area so changes to display names and order will appear.
+    $build = $this->renderDisplayTop($display_id);
+    static::addMicroweights($build);
+    $output[] = ajax_command_replace('#views-display-top', drupal_render($build));
+  }
+
+  /**
    * Submit handler to break_lock a view.
    */
   public function submitBreakLock(&$form, &$form_state) {
-    drupal_container()->get('user.tempstore')->get('views')->delete($this->get('name'));
-    $form_state['redirect'] = 'admin/structure/views/view/' . $this->get('name') . '/edit';
+    drupal_container()->get('user.tempstore')->get('views')->delete($this->storage->get('name'));
+    $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->get('name') . '/edit';
     drupal_set_message(t('The lock has been broken and you may now edit this view.'));
   }
 
+  public static function buildAddForm($form, &$form_state) {
+    $form['#attached']['css'] = static::getAdminCSS();
+    $form['#attached']['js'][] = drupal_get_path('module', 'views_ui') . '/js/views-admin.js';
+    $form['#attributes']['class'] = array('views-admin');
+
+    $form['human_name'] = array(
+      '#type' => 'textfield',
+      '#title' => t('View name'),
+      '#required' => TRUE,
+      '#size' => 32,
+      '#default_value' => '',
+      '#maxlength' => 255,
+    );
+    $form['name'] = array(
+      '#type' => 'machine_name',
+      '#maxlength' => 128,
+      '#machine_name' => array(
+        'exists' => 'views_get_view',
+        'source' => array('human_name'),
+      ),
+      '#description' => t('A unique machine-readable name for this View. It must only contain lowercase letters, numbers, and underscores.'),
+    );
+
+    $form['description_enable'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Description'),
+    );
+    $form['description'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Provide description'),
+      '#title_display' => 'invisible',
+      '#size' => 64,
+      '#default_value' => '',
+      '#states' => array(
+        'visible' => array(
+          ':input[name="description_enable"]' => array('checked' => TRUE),
+        ),
+      ),
+    );
+
+    // Create a wrapper for the entire dynamic portion of the form. Everything
+    // that can be updated by AJAX goes somewhere inside here. For example, this
+    // is needed by "Show" dropdown (below); it changes the base table of the
+    // view and therefore potentially requires all options on the form to be
+    // dynamically updated.
+    $form['displays'] = array();
+
+    // Create the part of the form that allows the user to select the basic
+    // properties of what the view will display.
+    $form['displays']['show'] = array(
+      '#type' => 'fieldset',
+      '#tree' => TRUE,
+      '#attributes' => array('class' => array('container-inline')),
+    );
+
+    // Create the "Show" dropdown, which allows the base table of the view to be
+    // selected.
+    $wizard_plugins = views_ui_get_wizards();
+    $options = array();
+    foreach ($wizard_plugins as $key => $wizard) {
+      $options[$key] = $wizard['title'];
+    }
+    $form['displays']['show']['wizard_key'] = array(
+      '#type' => 'select',
+      '#title' => t('Show'),
+      '#options' => $options,
+    );
+    $show_form = &$form['displays']['show'];
+    $default_value = module_exists('node') ? 'node' : 'users';
+    $show_form['wizard_key']['#default_value'] = views_ui_get_selected($form_state, array('show', 'wizard_key'), $default_value, $show_form['wizard_key']);
+    // Changing this dropdown updates the entire content of $form['displays'] via
+    // AJAX.
+    views_ui_add_ajax_trigger($show_form, 'wizard_key', array('displays'));
+
+    // Build the rest of the form based on the currently selected wizard plugin.
+    $wizard_key = $show_form['wizard_key']['#default_value'];
+    $wizard_instance = views_get_plugin('wizard', $wizard_key);
+    $form = $wizard_instance->build_form($form, $form_state);
+
+    $form['save'] = array(
+      '#type' => 'submit',
+      '#value' => t('Save & exit'),
+      '#validate' => array('views_ui_wizard_form_validate'),
+      '#submit' => array('views_ui_add_form_save_submit'),
+    );
+    $form['continue'] = array(
+      '#type' => 'submit',
+      '#value' => t('Continue & edit'),
+      '#validate' => array('views_ui_wizard_form_validate'),
+      '#submit' => array('views_ui_add_form_store_edit_submit'),
+      '#process' => array_merge(array(array(get_called_class(), 'processDefaultButton')), element_info_property('submit', '#process', array())),
+    );
+    $form['cancel'] = array(
+      '#type' => 'submit',
+      '#value' => t('Cancel'),
+      '#submit' => array('views_ui_add_form_cancel_submit'),
+      '#limit_validation_errors' => array(),
+    );
+
+    return $form;
+  }
+
+  /**
+   * Form builder callback for editing a View.
+   *
+   * @todo Remove as many #prefix/#suffix lines as possible. Use #theme_wrappers
+   *   instead.
+   *
+   * @todo Rename to views_ui_edit_view_form(). See that function for the "old"
+   *   version.
+   *
+   * @see views_ui_ajax_get_form()
+   */
+  public function buildEditForm($form, &$form_state, $display_id = NULL) {
+    // Do not allow the form to be cached, because $form_state['view'] can become
+    // stale between page requests.
+    // See views_ui_ajax_get_form() for how this affects #ajax.
+    // @todo To remove this and allow the form to be cacheable:
+    //   - Change $form_state['view'] to $form_state['temporary']['view'].
+    //   - Add a #process function to initialize $form_state['temporary']['view']
+    //     on cached form submissions.
+    //   - Use form_load_include().
+    $form_state['no_cache'] = TRUE;
+
+    if ($display_id) {
+      if (!$this->setDisplay($display_id)) {
+        $form['#markup'] = t('Invalid display id @display', array('@display' => $display_id));
+        return $form;
+      }
+    }
+
+    $form['#tree'] = TRUE;
+    // @todo When more functionality is added to this form, cloning here may be
+    //   too soon. But some of what we do with $view later in this function
+    //   results in making it unserializable due to PDO limitations.
+    $form_state['view'] = clone($this);
+
+    $form['#attached']['library'][] = array('system', 'jquery.ui.tabs');
+    $form['#attached']['library'][] = array('system', 'jquery.ui.dialog');
+    $form['#attached']['library'][] = array('system', 'drupal.ajax');
+    $form['#attached']['library'][] = array('system', 'jquery.form');
+    $form['#attached']['library'][] = array('system', 'drupal.states');
+    $form['#attached']['library'][] = array('system', 'drupal.tabledrag');
+
+    $form['#attached']['css'] = static::getAdminCSS();
+
+    $form['#attached']['js'][] = drupal_get_path('module', 'views_ui') . '/js/views-admin.js';
+    $form['#attached']['js'][] = array(
+      'data' => array('views' => array('ajax' => array(
+        'id' => '#views-ajax-body',
+        'title' => '#views-ajax-title',
+        'popup' => '#views-ajax-popup',
+        'defaultForm' => static::getDefaultAJAXMessage(),
+      ))),
+      'type' => 'setting',
+    );
+
+    $form += array(
+      '#prefix' => '',
+      '#suffix' => '',
+    );
+    $form['#prefix'] .= '<div class="views-edit-view views-admin clearfix">';
+    $form['#suffix'] = '</div>' . $form['#suffix'];
+
+    $form['#attributes']['class'] = array('form-edit');
+
+    if (isset($this->locked) && is_object($this->locked) && $this->locked->owner != $GLOBALS['user']->uid) {
+      $form['locked'] = array(
+        '#theme_wrappers' => array('container'),
+        '#attributes' => array('class' => array('view-locked', 'messages', 'warning')),
+        '#markup' => t('This view is being edited by user !user, and is therefore locked from editing by others. This lock is !age old. Click here to <a href="!break">break this lock</a>.', array('!user' => theme('username', array('account' => user_load($this->locked->owner))), '!age' => format_interval(REQUEST_TIME - $this->locked->updated), '!break' => url('admin/structure/views/view/' . $this->storage->get('name') . '/break-lock'))),
+      );
+    }
+    else {
+      if (isset($this->vid) && $this->vid == 'new') {
+        $message = t('* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard the view.');
+      }
+      else {
+        $message = t('* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard your changes.');
+      }
+
+      $form['changed'] = array(
+        '#theme_wrappers' => array('container'),
+        '#attributes' => array('class' => array('view-changed', 'messages', 'warning')),
+        '#markup' => $message,
+      );
+      if (empty($this->changed)) {
+        $form['changed']['#attributes']['class'][] = 'js-hide';
+      }
+    }
+
+    $form['help_text'] = array(
+      '#prefix' => '<div>',
+      '#suffix' => '</div>',
+      '#markup' => t('Modify the display(s) of your view below or add new displays.'),
+    );
+
+    $form['actions'] = array(
+      '#type' => 'actions',
+      '#weight' => 0,
+    );
+
+    if (empty($this->changed)) {
+      $form['actions']['#attributes'] = array(
+        'class' => array(
+          'js-hide',
+        ),
+      );
+    }
+
+    $form['actions']['save'] = array(
+      '#type' => 'submit',
+      '#value' => t('Save'),
+      // Taken from the "old" UI. @TODO: Review and rename.
+      '#validate' => array('views_ui_edit_view_form_validate'),
+      '#submit' => array('views_ui_edit_view_form_submit'),
+    );
+    $form['actions']['cancel'] = array(
+      '#type' => 'submit',
+      '#value' => t('Cancel'),
+      '#submit' => array('views_ui_edit_view_form_cancel'),
+    );
+
+    $form['displays'] = array(
+      '#prefix' => '<h1 class="unit-title clearfix">' . t('Displays') . '</h1>' . "\n" . '<div class="views-displays">',
+      '#suffix' => '</div>',
+    );
+
+    $form['displays']['top'] = $this->renderDisplayTop($display_id);
+
+    // The rest requires a display to be selected.
+    if ($display_id) {
+      $form_state['display_id'] = $display_id;
+
+      // The part of the page where editing will take place.
+      $form['displays']['settings'] = array(
+        '#type' => 'container',
+        '#id' => 'edit-display-settings',
+      );
+      $display_title = $this->getDisplayLabel($display_id, FALSE);
+
+      $form['displays']['settings']['#title'] = '<h2>' . t('@display_title details', array('@display_title' => ucwords($display_title))) . '</h2>';
+
+      // Add a text that the display is disabled.
+      if (!empty($this->displayHandlers[$display_id])) {
+        if (!$this->displayHandlers[$display_id]->isEnabled()) {
+          $form['displays']['settings']['disabled']['#markup'] = t('This display is disabled.');
+        }
+      }
+
+      $form['displays']['settings']['settings_content']= array(
+        '#theme_wrappers' => array('container'),
+      );
+      // Add the edit display content
+      $form['displays']['settings']['settings_content']['tab_content'] = $this->getDisplayTab($display_id);
+      $form['displays']['settings']['settings_content']['tab_content']['#theme_wrappers'] = array('container');
+      $form['displays']['settings']['settings_content']['tab_content']['#attributes'] = array('class' => array('views-display-tab'));
+      $form['displays']['settings']['settings_content']['tab_content']['#id'] = 'views-tab-' . $display_id;
+      // Mark deleted displays as such.
+      $display = $this->storage->get('display');
+      if (!empty($display[$display_id]['deleted'])) {
+        $form['displays']['settings']['settings_content']['tab_content']['#attributes']['class'][] = 'views-display-deleted';
+      }
+      // Mark disabled displays as such.
+      if (!$this->displayHandlers[$display_id]->isEnabled()) {
+        $form['displays']['settings']['settings_content']['tab_content']['#attributes']['class'][] = 'views-display-disabled';
+      }
+
+      // The content of the popup dialog.
+      $form['ajax-area'] = array(
+        '#theme_wrappers' => array('container'),
+        '#id' => 'views-ajax-popup',
+      );
+      $form['ajax-area']['ajax-title'] = array(
+        '#markup' => '<h2 id="views-ajax-title"></h2>',
+      );
+      $form['ajax-area']['ajax-body'] = array(
+        '#theme_wrappers' => array('container'),
+        '#id' => 'views-ajax-body',
+        '#markup' => static::getDefaultAJAXMessage(),
+      );
+    }
+
+    // If relationships had to be fixed, we want to get that into the cache
+    // so that edits work properly, and to try to get the user to save it
+    // so that it's not using weird fixed up relationships.
+    if (!empty($this->relationships_changed) && drupal_container()->get('request')->request->count()) {
+      drupal_set_message(t('This view has been automatically updated to fix missing relationships. While this View should continue to work, you should verify that the automatic updates are correct and save this view.'));
+      views_ui_cache_set($this);
+    }
+    return $form;
+  }
+
+  /**
+   * Provide the preview formulas and the preview output, too.
+   */
+  public function buildPreviewForm($form, &$form_state, $display_id = 'default') {
+    // Reset the cache of IDs. Drupal rather aggressively prevents ID
+    // duplication but this causes it to remember IDs that are no longer even
+    // being used.
+    $seen_ids_init = &drupal_static('drupal_html_id:init');
+    $seen_ids_init = array();
+
+    $form_state['no_cache'] = TRUE;
+    $form_state['view'] = $this;
+
+    $form['#attributes'] = array('class' => array('clearfix'));
+
+    // Add a checkbox controlling whether or not this display auto-previews.
+    $form['live_preview'] = array(
+      '#type' => 'checkbox',
+      '#id' => 'edit-displays-live-preview',
+      '#title' => t('Auto preview'),
+      '#default_value' => config('views.settings')->get('ui.always_live_preview'),
+    );
+
+    // Add the arguments textfield
+    $form['view_args'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Preview with contextual filters:'),
+      '#description' => t('Separate contextual filter values with a "/". For example, %example.', array('%example' => '40/12/10')),
+      '#id' => 'preview-args',
+    );
+
+    // Add the preview button
+    $form['button'] = array(
+      '#type' => 'submit',
+      '#value' => t('Update preview'),
+      '#attributes' => array('class' => array('arguments-preview')),
+      '#prefix' => '<div id="preview-submit-wrapper">',
+      '#suffix' => '</div>',
+      '#id' => 'preview-submit',
+      '#ajax' => array(
+        'path' => 'admin/structure/views/view/' . $this->storage->get('name') . '/preview/' . $display_id . '/ajax',
+        'wrapper' => 'views-preview-wrapper',
+        'event' => 'click',
+        'progress' => array('type' => 'throbber'),
+        'method' => 'replace',
+      ),
+      // Make ENTER in arguments textfield (and other controls) submit the form
+      // as this button, not the Save button.
+      // @todo This only works for JS users. To make this work for nojs users,
+      //   we may need to split Preview into a separate form.
+      '#process' => array_merge(array(array($this, 'processDefaultButton')), element_info_property('submit', '#process', array())),
+    );
+    $form['#action'] = url('admin/structure/views/view/' . $this->storage->get('name') .'/preview/' . $display_id);
+
+    return $form;
+  }
+
   /**
    * Form constructor callback to reorder displays on a view
    */
@@ -361,11 +1494,11 @@ public function buildDisplaysReorderForm($form, &$form_state) {
 
     $form['#tree'] = TRUE;
 
-    $count = count($this->get('display'));
+    $count = count($this->storage->get('display'));
 
-    $displays = $this->get('display');
+    $displays = $this->storage->get('display');
     uasort($displays, array('static', 'sortPosition'));
-    $this->set('display', $displays);
+    $this->storage->set('display', $displays);
     foreach ($displays as $display) {
       $form[$display['id']] = array(
         'title'  => array('#markup' => $display['display_title']),
@@ -409,7 +1542,7 @@ public function buildDisplaysReorderForm($form, &$form_state) {
       'limit' => 0,
     );
 
-    $form['#action'] = url('admin/structure/views/nojs/reorder-displays/' . $this->get('name') . '/' . $display_id);
+    $form['#action'] = url('admin/structure/views/nojs/reorder-displays/' . $this->storage->get('name') . '/' . $display_id);
 
     $this->getStandardButtons($form, $form_state, 'views_ui_reorder_displays_form');
     $form['buttons']['submit']['#submit'] = array(array($this, 'submitDisplaysReorderForm'));
@@ -440,7 +1573,7 @@ public function submitDisplaysReorderForm($form, &$form_state) {
     }
 
     // Setting up position and removing deleted displays
-    $displays = $this->get('display');
+    $displays = $this->storage->get('display');
     foreach ($displays as $display_id => $display) {
       // Don't touch the default !!!
       if ($display_id === 'default') {
@@ -457,11 +1590,11 @@ public function submitDisplaysReorderForm($form, &$form_state) {
 
     // Sorting back the display array as the position is not enough
     uasort($displays, array('static', 'sortPosition'));
-    $this->set('display', $displays);
+    $this->storage->set('display', $displays);
 
     // Store in cache
     views_ui_cache_set($this);
-    $form_state['redirect'] = array('admin/structure/views/view/' . $this->get('name') . '/edit', array('fragment' => 'views-tab-default'));
+    $form_state['redirect'] = array('admin/structure/views/view/' . $this->storage->get('name') . '/edit', array('fragment' => 'views-tab-default'));
   }
 
   /**
@@ -517,7 +1650,7 @@ public function addFormToStack($key, $display_id, $args, $top = FALSE, $rebuild_
    */
   public function submitItemAdd($form, &$form_state) {
     $type = $form_state['type'];
-    $types = ViewExecutable::viewsHandlerTypes();
+    $types = static::viewsHandlerTypes();
     $section = $types[$type]['plural'];
 
     // Handle the override select.
@@ -525,7 +1658,7 @@ public function submitItemAdd($form, &$form_state) {
     if ($was_defaulted && !$is_defaulted) {
       // We were using the default display's values, but we're now overriding
       // the default display and saving values specific to this display.
-      $display = &$this->executable->displayHandlers[$form_state['display_id']];
+      $display = &$this->displayHandlers[$form_state['display_id']];
       // setOverride toggles the override of this section.
       $display->setOverride($section);
     }
@@ -534,7 +1667,7 @@ public function submitItemAdd($form, &$form_state) {
       // to go back to the default display.
       // Overwrite the default display with the current form values, and make
       // the current display use the new default values.
-      $display = &$this->executable->displayHandlers[$form_state['display_id']];
+      $display = &$this->displayHandlers[$form_state['display_id']];
       // optionsOverride toggles the override of this section.
       $display->setOverride($section);
     }
@@ -547,7 +1680,7 @@ public function submitItemAdd($form, &$form_state) {
         if ($cut = strpos($field, '$')) {
           $field = substr($field, 0, $cut);
         }
-        $id = $this->executable->addItem($form_state['display_id'], $type, $table, $field);
+        $id = $this->addItem($form_state['display_id'], $type, $table, $field);
 
         // check to see if we have group by settings
         $key = $type;
@@ -556,7 +1689,7 @@ public function submitItemAdd($form, &$form_state) {
           $key = $types[$type]['type'];
         }
         $handler = views_get_handler($table, $field, $key);
-        if ($this->executable->displayHandlers['default']->useGroupBy() && $handler->usesGroupBy()) {
+        if ($this->display_handler->useGroupBy() && $handler->usesGroupBy()) {
           $this->addFormToStack('config-item-group', $form_state['display_id'], array($type, $id));
         }
 
@@ -597,10 +1730,10 @@ public function renderPreview($display_id, $args = array()) {
     $rows = array('query' => array(), 'statistics' => array());
     $output = '';
 
-    $errors = $this->executable->validate();
+    $errors = $this->validate();
     if ($errors === TRUE) {
       $this->ajax = TRUE;
-      $this->executable->live_preview = TRUE;
+      $this->live_preview = TRUE;
       $this->views_ui_context = TRUE;
 
       // AJAX happens via $_POST but everything expects exposed data to
@@ -614,21 +1747,21 @@ public function renderPreview($display_id, $args = array()) {
         }
       }
 
-      $this->executable->setExposedInput($exposed_input);
+      $this->setExposedInput($exposed_input);
 
-      if (!$this->executable->setDisplay($display_id)) {
+      if (!$this->setDisplay($display_id)) {
         return t('Invalid display id @display', array('@display' => $display_id));
       }
 
-      $this->executable->setArguments($args);
+      $this->setArguments($args);
 
       // Store the current view URL for later use:
-      if ($this->executable->display_handler->getOption('path')) {
-        $path = $this->executable->getUrl();
+      if ($this->display_handler->getOption('path')) {
+        $path = $this->getUrl();
       }
 
       // Make view links come back to preview.
-      $this->override_path = 'admin/structure/views/nojs/preview/' . $this->get('name') . '/' . $display_id;
+      $this->override_path = 'admin/structure/views/nojs/preview/' . $this->storage->get('name') . '/' . $display_id;
 
       // Also override the current path so we get the pager.
       $original_path = current_path();
@@ -643,7 +1776,7 @@ public function renderPreview($display_id, $args = array()) {
       // @todo We'll want to add contextual links specific to editing the View, so
       //   the suppression may need to be moved deeper into the Preview pipeline.
       views_ui_contextual_links_suppress_push();
-      $preview = $this->executable->preview($display_id, $args);
+      $preview = $this->preview($display_id, $args);
       views_ui_contextual_links_suppress_pop();
 
       // Reset variables.
@@ -654,13 +1787,13 @@ public function renderPreview($display_id, $args = array()) {
       // below the view preview.
       if ($show_info || $show_query || $show_stats) {
         // Get information from the preview for display.
-        if (!empty($this->executable->build_info['query'])) {
+        if (!empty($this->build_info['query'])) {
           if ($show_query) {
-            $query = $this->executable->build_info['query'];
+            $query = $this->build_info['query'];
             // Only the sql default class has a method getArguments.
             $quoted = array();
 
-            if ($this->executable->query instanceof Sql) {
+            if ($this->query instanceof Sql) {
               $quoted = $query->getArguments();
               $connection = Database::getConnection();
               foreach ($quoted as $key => $val) {
@@ -673,9 +1806,9 @@ public function renderPreview($display_id, $args = array()) {
               }
             }
             $rows['query'][] = array('<strong>' . t('Query') . '</strong>', '<pre>' . check_plain(strtr($query, $quoted)) . '</pre>');
-            if (!empty($this->executable->additional_queries)) {
+            if (!empty($this->additional_queries)) {
               $queries = '<strong>' . t('These queries were run during view rendering:') . '</strong>';
-              foreach ($this->executable->additional_queries as $query) {
+              foreach ($this->additional_queries as $query) {
                 if ($queries) {
                   $queries .= "\n";
                 }
@@ -686,7 +1819,7 @@ public function renderPreview($display_id, $args = array()) {
             }
           }
           if ($show_info) {
-            $rows['query'][] = array('<strong>' . t('Title') . '</strong>', filter_xss_admin($this->executable->getTitle()));
+            $rows['query'][] = array('<strong>' . t('Title') . '</strong>', filter_xss_admin($this->getTitle()));
             if (isset($path)) {
               $path = l($path, $path);
             }
@@ -697,9 +1830,9 @@ public function renderPreview($display_id, $args = array()) {
           }
 
           if ($show_stats) {
-            $rows['statistics'][] = array('<strong>' . t('Query build time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->build_time * 100000) / 100)));
-            $rows['statistics'][] = array('<strong>' . t('Query execute time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->execute_time * 100000) / 100)));
-            $rows['statistics'][] = array('<strong>' . t('View render time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->render_time * 100000) / 100)));
+            $rows['statistics'][] = array('<strong>' . t('Query build time') . '</strong>', t('@time ms', array('@time' => intval($this->build_time * 100000) / 100)));
+            $rows['statistics'][] = array('<strong>' . t('Query execute time') . '</strong>', t('@time ms', array('@time' => intval($this->execute_time * 100000) / 100)));
+            $rows['statistics'][] = array('<strong>' . t('View render time') . '</strong>', t('@time ms', array('@time' => intval($this->render_time * 100000) / 100)));
 
           }
           drupal_alter('views_preview_info', $rows, $this);
@@ -756,6 +1889,23 @@ public function renderPreview($display_id, $args = array()) {
   }
 
   /**
+   * Recursively adds microweights to a render array, similar to what form_builder() does for forms.
+   *
+   * @todo Submit a core patch to fix drupal_render() to do this, so that all
+   *   render arrays automatically preserve array insertion order, as forms do.
+   */
+  public static function addMicroweights(&$build) {
+    $count = 0;
+    foreach (element_children($build) as $key) {
+      if (!isset($build[$key]['#weight'])) {
+        $build[$key]['#weight'] = $count/1000;
+      }
+      static::addMicroweights($build[$key]);
+      $count++;
+    }
+  }
+
+  /**
    * Get the user's current progress through the form stack.
    *
    * @return
@@ -793,7 +1943,7 @@ public function buildIdentifier($key, $display_id, $args) {
     $form = views_ui_ajax_forms($key);
     // Automatically remove the single-form cache if it exists and
     // does not match the key.
-    $identifier = implode('-', array($key, $this->get('name'), $display_id));
+    $identifier = implode('-', array($key, $this->storage->get('name'), $display_id));
 
     foreach ($form['args'] as $id) {
       $arg = (!empty($args)) ? array_shift($args) : NULL;
@@ -842,234 +1992,14 @@ public function buildFormState($js, $key, $display_id, $args) {
   }
 
   /**
-   * Passes through all unknown calls onto the storage object.
-   */
-  public function __call($method, $args) {
-    return call_user_func_array(array($this->storage, $method), $args);
-  }
-
-  /**
-   * Implements \IteratorAggregate::getIterator().
-   */
-  public function getIterator() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::id().
-   */
-  public function id() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::uuid().
-   */
-  public function uuid() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::isNew().
-   */
-  public function isNew() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::entityType().
-   */
-  public function entityType() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::bundle().
-   */
-  public function bundle() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::isDefaultRevision().
-   */
-  public function isDefaultRevision($new_value = NULL) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::getRevisionId().
-   */
-  public function getRevisionId() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::entityInfo().
-   */
-  public function entityInfo() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::createDuplicate().
-   */
-  public function createDuplicate() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::delete().
-   */
-  public function delete() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::save().
-   */
-  public function save() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::uri().
-   */
-  public function uri() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::label().
-   */
-  public function label($langcode = NULL) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::isNewRevision().
-   */
-  public function isNewRevision() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::setNewRevision().
-   */
-  public function setNewRevision($value = TRUE) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\EntityInterface::enforceIsNew().
-   */
-  public function enforceIsNew($value = TRUE) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\TranslatableInterface::getTranslation().
-   */
-  public function getTranslation($langcode, $strict = TRUE) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\TranslatableInterface::getTranslationLanguages().
-   */
-  public function getTranslationLanguages($include_default = TRUE) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\TranslatableInterface::language)().
-   */
-  public function language() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\AccessibleInterface::access().
-   */
-  public function access(\Drupal\user\User $account = NULL) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\ComplexDataInterface::isEmpty)().
-   */
-  public function isEmpty() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyValues().
-   */
-  public function getPropertyValues() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinitions().
-   */
-  public function getPropertyDefinitions() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinition().
-   */
-  public function getPropertyDefinition($name) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\ComplexDataInterface::setPropertyValues().
-   */
-  public function setPropertyValues($values) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\TypedData\ComplexDataInterface::getProperties().
-   */
-  public function getProperties($include_computed = FALSE) {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\views\ViewStorageInterface::enable().
-   */
-  public function enable() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\views\ViewStorageInterface::disable().
-   */
-  public function disable() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\views\ViewStorageInterface::isEnabled().
-   */
-  public function isEnabled() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::getOriginalID().
-   */
-  public function getOriginalID() {
-    return $this->__call(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::setOriginalID().
+   * #process callback for a button; makes implicit form submissions trigger as this button.
+   *
+   * @see Drupal.behaviors.viewsImplicitFormSubmission
    */
-  public function setOriginalID($id) {
-    return $this->__call(__FUNCTION__, func_get_args());
+  public static function processDefaultButton($element, &$form_state, $form) {
+    $setting['viewsImplicitFormSubmission'][$form['#id']]['defaultButton'] = $element['#id'];
+    $element['#attached']['js'][] = array('type' => 'setting', 'data' => $setting);
+    return $element;
   }
 
 }
diff --git a/core/modules/views/views_ui/theme/theme.inc b/core/modules/views/views_ui/theme/theme.inc
index 0a1e66f..530aec5 100644
--- a/core/modules/views/views_ui/theme/theme.inc
+++ b/core/modules/views/views_ui/theme/theme.inc
@@ -12,7 +12,7 @@
  */
 function theme_views_ui_container($variables) {
   $element = $variables['element'];
-  return '<div' . new Attribute($element['#attributes']) . '>' . drupal_render_children($element) . '</div>';
+  return '<div' . new Attribute($element['#attributes']) . '>' . $element['#children'] . '</div>';
 }
 
 function template_preprocess_views_ui_display_tab_setting(&$variables) {
diff --git a/core/modules/views/views_ui/theme/views-ui-edit-view.tpl.php b/core/modules/views/views_ui/theme/views-ui-edit-view.tpl.php
index 5f5e02f..821ae40 100644
--- a/core/modules/views/views_ui/theme/views-ui-edit-view.tpl.php
+++ b/core/modules/views/views_ui/theme/views-ui-edit-view.tpl.php
@@ -21,7 +21,7 @@
       <?php print $quick_links ?>
     </div>
     <?php print t('View %name, displaying items of type <strong>@base</strong>.',
-        array('%name' => $view->get('name'), '@base' => $base_table)); ?>
+        array('%name' => $view->storage->get('name'), '@base' => $base_table)); ?>
   </div>
 
   <?php print $tabs; ?>
diff --git a/core/modules/views/views_ui/views_ui.module b/core/modules/views/views_ui/views_ui.module
index 90f8aaf..d78ac25 100644
--- a/core/modules/views/views_ui/views_ui.module
+++ b/core/modules/views/views_ui/views_ui.module
@@ -290,9 +290,9 @@ function views_ui_custom_theme() {
 function views_ui_edit_page_title(ViewUI $view) {
   module_load_include('inc', 'views_ui', 'admin');
   $bases = views_fetch_base_tables();
-  $name = $view->getHumanName();
-  if (isset($bases[$view->get('base_table')])) {
-    $name .= ' (' . $bases[$view->get('base_table')]['title'] . ')';
+  $name = $view->storage->getHumanName();
+  if (isset($bases[$view->storage->get('base_table')])) {
+    $name .= ' (' . $bases[$view->storage->get('base_table')]['title'] . ')';
   }
 
   return $name;
@@ -327,14 +327,14 @@ function views_ui_cache_load($name) {
   else {
     // Keep disabled/enabled status real.
     if ($original_view) {
-      $view->set('disabled', $original_view->get('disabled'));
+      $view->storage->set('disabled', $original_view->storage->get('disabled'));
     }
   }
 
   if (empty($view)) {
     return FALSE;
   }
-  $view->locked = $views_temp_store->getMetadata($view->get('name'));
+  $view->locked = $views_temp_store->getMetadata($view->storage->get('name'));
 
   return $view;
 }
@@ -351,19 +351,18 @@ function views_ui_cache_set(ViewUI $view) {
 
   $view->changed = TRUE; // let any future object know that this view has changed.
 
-  $executable = $view->get('executable');
-  if (isset($executable->current_display)) {
+  if (isset($view->current_display)) {
     // Add the knowledge of the changed display, too.
-    $view->changed_display[$executable->current_display] = TRUE;
-    unset($executable->current_display);
+    $view->changed_display[$view->current_display] = TRUE;
+    unset($view->current_display);
   }
 
   // Unset handlers; we don't want to write these into the cache
-  unset($executable->display_handler);
-  unset($executable->default_display);
-  $executable->query = NULL;
-  $executable->displayHandlers = array();
-  drupal_container()->get('user.tempstore')->get('views')->set($view->get('name'), $view);
+  unset($view->display_handler);
+  unset($view->default_display);
+  $view->query = NULL;
+  $view->displayHandlers = array();
+  drupal_container()->get('user.tempstore')->get('views')->set($view->storage->get('name'), $view);
 }
 
 /**
@@ -400,8 +399,8 @@ function views_ui_preprocess_views_view(&$vars) {
  *   Add a bolded title of this section.
  */
 function views_ui_view_preview_section_handler_links(ViewUI $view, $type, $title = FALSE) {
-  $display = $view->executable->display_handler->display;
-  $handlers = $view->executable->display_handler->getHandlers($type);
+  $display = $view->display_handler->display;
+  $handlers = $view->display_handler->getHandlers($type);
   $links = array();
 
   $types = ViewExecutable::viewsHandlerTypes();
@@ -415,13 +414,13 @@ function views_ui_view_preview_section_handler_links(ViewUI $view, $type, $title
     $field_name = $handler->adminLabel(TRUE);
     $links[$type . '-edit-' . $id] = array(
       'title' => t('Edit @section', array('@section' => $field_name)),
-      'href' => "admin/structure/views/nojs/config-item/{$view->get('name')}/{$display['id']}/$type/$id",
+      'href' => "admin/structure/views/nojs/config-item/{$view->storage->get('name')}/{$display['id']}/$type/$id",
       'attributes' => array('class' => array('views-ajax-link')),
     );
   }
   $links[$type . '-add'] = array(
     'title' => t('Add new'),
-    'href' => "admin/structure/views/nojs/add-item/{$view->get('name')}/{$display['id']}/$type",
+    'href' => "admin/structure/views/nojs/add-item/{$view->storage->get('name')}/{$display['id']}/$type",
     'attributes' => array('class' => array('views-ajax-link')),
   );
 
@@ -436,7 +435,7 @@ function views_ui_view_preview_section_display_category_links(ViewUI $view, $typ
   $links = array(
     $type . '-edit' => array(
       'title' => t('Edit @section', array('@section' => $title)),
-      'href' => "admin/structure/views/nojs/display/{$view->get('name')}/{$display['id']}/$type",
+      'href' => "admin/structure/views/nojs/display/{$view->storage->get('name')}/{$display['id']}/$type",
       'attributes' => array('class' => array('views-ajax-link')),
     ),
   );
@@ -448,7 +447,7 @@ function views_ui_view_preview_section_display_category_links(ViewUI $view, $typ
  * Returns all contextual links for the main content part of the view.
  */
 function views_ui_view_preview_section_rows_links(ViewUI $view) {
-  $display = $view->executable->display_handler->display;
+  $display = $view->display_handler->display;
   $links = array();
   $links = array_merge($links, views_ui_view_preview_section_handler_links($view, 'filter', TRUE));
   $links = array_merge($links, views_ui_view_preview_section_handler_links($view, 'field', TRUE));
@@ -537,7 +536,7 @@ function views_ui_get_form_wizard_instance($wizard) {
  */
 function views_ui_views_plugins_display_alter(&$plugins) {
   // Attach contextual links to each display plugin. The links will point to
-  // paths underneath "admin/structure/views/view/{$view->get('name')}" (i.e., paths
+  // paths underneath "admin/structure/views/view/{$view->storage->name}" (i.e., paths
   // for editing and performing other contextual actions on the view).
   foreach ($plugins as &$display) {
     $display['contextual links']['views_ui'] = array(
diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css
index f0e244c..6f4cb14 100644
--- a/core/themes/bartik/css/style.css
+++ b/core/themes/bartik/css/style.css
@@ -1609,15 +1609,15 @@ div.admin-panel .description {
 }
 
 /* ---------- Dropbutton ----------- */
-.js .dropbutton-widget {
+.dropbutton-widget {
   background-color: white;
   border-radius: 5px;
 }
-.js .dropbutton-widget:hover {
+.dropbutton-widget:hover {
   background-color: #f8f8f8;
   border-color: #b8b8b8;
 }
-.js .dropbutton-multiple.open .dropbutton-widget:hover {
+.dropbutton-multiple.open .dropbutton-widget:hover {
   background-color: white;
 }
 
diff --git a/core/themes/bartik/templates/comment.tpl.php b/core/themes/bartik/templates/comment.tpl.php
index ef525c1..04aa8e5 100644
--- a/core/themes/bartik/templates/comment.tpl.php
+++ b/core/themes/bartik/templates/comment.tpl.php
@@ -43,20 +43,6 @@
  *   modules, intended to be displayed after the main title tag that appears in
  *   the template.
  *
- * These variables are provided to give context about the parent comment (if
- * any):
- * - $comment_parent: Full parent comment object (if any).
- * - $parent_author: Equivalent to $author for the parent comment.
- * - $parent_created: Equivalent to $created for the parent comment.
- * - $parent_changed: Equivalent to $changed for the parent comment.
- * - $parent_title: Equivalent to $title for the parent comment.
- * - $parent_permalink: Equivalent to $permalink for the parent comment.
- * - $parent: A text string of parent comment submission information created
- *   from $parent_author and $parent_created during
- *   template_preprocess_comment(). This information is presented to help
- *   screen readers follow lengthy discussion threads. You can hide this from
- *   sighted users using the class element-invisible.
- *
  * These two variables are provided for context:
  * - $comment: Full comment object.
  * - $node: Node entity the comments are attached to.
@@ -85,16 +71,6 @@
       <p class="comment-permalink">
         <?php print $permalink; ?>
       </p>
-      <?php
-        // Indicate the semantic relationship between parent and child comments
-        // for accessibility. The list is difficult to navigate in a screen
-        // reader without this information.
-        if ($parent):
-      ?>
-      <p class="comment-parent element-invisible">
-        <?php print $parent; ?>
-      </p>
-      <?php endif; ?>
     </div>
   </div>
 
diff --git a/core/themes/seven/reset.css b/core/themes/seven/reset.css
new file mode 100644
index 0000000..507955e
--- /dev/null
+++ b/core/themes/seven/reset.css
@@ -0,0 +1,201 @@
+
+/**
+ * Reset CSS styles.
+ *
+ * Based on Eric Meyer's "Reset CSS 1.0" tool from
+ * http://meyerweb.com/eric/tools/css/reset
+ */
+
+html,
+body,
+div,
+span,
+applet,
+object,
+iframe,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+dfn,
+em,
+font,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+input,
+select,
+textarea,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td,
+/* Drupal: system-menus.css */
+ul.links,
+ul.links.inline,
+ul.links li,
+.block ul,
+/* Drupal: admin.css */
+div.admin,
+/* Drupal: system.css */
+tr.even,
+tr.odd,
+tr.drag,
+tbody,
+tbody th,
+thead th,
+.breadcrumb,
+.item-list .icon,
+.item-list .title,
+.item-list ul,
+.item-list ul li,
+ol.task-list li.active,
+.form-item,
+tr.odd .form-item,
+tr.even .form-item,
+.form-item .description,
+.form-item label,
+.form-item label.option,
+.form-checkboxes,
+.form-radios,
+.form-checkboxes .form-item,
+.form-radios .form-item,
+.marker,
+.form-required,
+.more-link,
+.more-help-link,
+.item-list .pager,
+.item-list .pager li,
+.pager-current,
+.tips,
+ul.primary,
+ul.primary li,
+ul.primary li a,
+ul.primary li.active a,
+ul.primary li a:hover,
+ul.secondary,
+ul.secondary li,
+ul.secondary a,
+ul.secondary a.active,
+.resizable-textarea {
+  margin: 0;
+  padding: 0;
+  border: 0;
+  vertical-align: baseline;
+}
+/* Drupal: system-menus.css */
+ul.links,
+ul.links.inline,
+ul.links li,
+.block ul,
+ol,
+ul,
+.item-list ul,
+.item-list ul li {
+  list-style: none;
+}
+blockquote,
+q {
+  quotes: none;
+}
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+  content: '';
+  content: none;
+}
+
+/* Remember to highlight inserts somehow! */
+ins {
+  text-decoration: none;
+}
+del {
+  text-decoration: line-through;
+}
+
+/* Tables still need 'cellspacing="0"' in the markup. */
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+/**
+ * Font reset.
+ *
+ * Specifically targets form elements which browsers often times give
+ * special treatment.
+ */
+input,
+select,
+textarea {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+textarea {
+  font-size: 1em;
+  line-height: 1.538em;
+}
+/**
+ * Markup free clearing.
+ *
+ * Consider adding your own selectors to this instead of finding ways
+ * to sneak the clearfix class into Drupal's markup.
+ * From http://perishablepress.com/press/2009/12/06/new-clearfix-hack
+ */
+ul.links:after,
+div.admin-panel .body:after,
+.clearfix:after {
+  content: ".";
+  display: block;
+  height: 0;
+  clear: both;
+  visibility: hidden;
+}
+
+/* Exclude inline links from clearfix behavior */
+ul.inline:after {
+  content: "";
+  display: none;
+  clear: none;
+}
diff --git a/core/themes/seven/seven.info b/core/themes/seven/seven.info
index 87edba3..969f749 100644
--- a/core/themes/seven/seven.info
+++ b/core/themes/seven/seven.info
@@ -3,6 +3,7 @@ description = A simple one-column, tableless, fluid width administration theme.
 package = Core
 version = VERSION
 core = 8.x
+stylesheets[screen][] = reset.css
 stylesheets[screen][] = style.css
 settings[shortcut_module_link] = 1
 regions[content] = Content
diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css
index 3b5776a..7b8ae1b 100644
--- a/core/themes/seven/style.css
+++ b/core/themes/seven/style.css
@@ -1036,7 +1036,7 @@ div.add-or-remove-shortcuts {
 }
 
 /* Dropbutton */
-.js .dropbutton-widget {
+.dropbutton-widget {
   background-color: #fff;
   background-image: -moz-linear-gradient(-90deg, rgba(255, 255, 255, 0), #e7e7e7);
   background-image: -o-linear-gradient(-90deg, rgba(255, 255, 255, 0), #e7e7e7);
@@ -1044,11 +1044,11 @@ div.add-or-remove-shortcuts {
   background-image: linear-gradient(-90deg, rgba(255, 255, 255, 0), #e7e7e7);
   border-radius: 5px;
 }
-.js .dropbutton-widget:hover {
+.dropbutton-widget:hover {
   background-color: #f0f0f0;
   border-color: #b8b8b8;
 }
-.js .dropbutton-multiple.open .dropbutton-widget:hover {
+.dropbutton-multiple.open .dropbutton-widget:hover {
   background-color: #fff;
 }
 .dropbutton-content li:first-child > * {
diff --git a/core/themes/seven/template.php b/core/themes/seven/template.php
index f135c95..a8643ab 100644
--- a/core/themes/seven/template.php
+++ b/core/themes/seven/template.php
@@ -21,7 +21,6 @@ function seven_preprocess_maintenance_page(&$vars) {
  * Implements hook_preprocess_HOOK() for html.tpl.php.
  */
 function seven_preprocess_html(&$vars) {
-  drupal_add_library('system', 'normalize');
   // Add conditional CSS for IE8 and below.
   drupal_add_css(path_to_theme() . '/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
 }
