diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index edaf8ec..0bf0670 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1531,8 +1531,6 @@ function install_configure_form($form, &$form_state, &$install_state) {
   // We add these strings as settings because JavaScript translation does not
   // work on install time.
   drupal_add_js(array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail'))), 'setting');
-  // Add JS to show / hide the 'Email administrator about site updates' elements
-  drupal_add_js('jQuery(function () { Drupal.hideEmailAdministratorCheckbox() });', 'inline');
 
   // Cache a fully-built schema. This is necessary for any invocation of
   // index.php because: (1) setting cache table entries requires schema
@@ -1834,16 +1832,23 @@ function _install_configure_form($form, &$form_state, &$install_state) {
     '#type' => 'fieldset',
     '#title' => st('Update notifications'),
     '#collapsible' => FALSE,
+    '#weight' => 15,
+  );
+  $form['update_notifications']['check_for_updates'] = array(
+    '#type' => 'checkbox',
+    '#title' => st('Check for updates automatically.'),
+    '#default_value' => TRUE,
   );
-  $form['update_notifications']['update_status_module'] = array(
-    '#type' => 'checkboxes',
-    '#options' => array(
-      1 => st('Check for updates automatically'),
-      2 => st('Receive e-mail notifications'),
+  $form['update_notifications']['recive_email_notifications'] = array(
+    '#type' => 'checkbox',
+    '#title' => st('Receive e-mail notifications.'),
+    '#default_value' => TRUE,
+    '#states' => array(
+      'visible' => array(
+        'input[name="check_for_updates"]' => array('checked' => TRUE),
+      ),
     ),
-    '#default_value' => array(1, 2),
     '#description' => st('The system will notify you when updates and important security releases are available for installed components. Anonymous information about your site is sent to <a href="@drupal">Drupal.org</a>.', array('@drupal' => 'http://drupal.org')),
-    '#weight' => 15,
   );
 
   $form['actions'] = array('#type' => 'actions');
@@ -1880,12 +1885,12 @@ function install_configure_form_submit($form, &$form_state) {
   variable_set('site_default_country', $form_state['values']['site_default_country']);
 
   // Enable update.module if this option was selected.
-  if ($form_state['values']['update_status_module'][1]) {
+  if ($form_state['values']['check_for_updates']) {
     module_enable(array('update'), FALSE);
 
     // Add the site maintenance account's email address to the list of
     // addresses to be notified when updates are available, if selected.
-    if ($form_state['values']['update_status_module'][2]) {
+    if ($form_state['values']['recive_email_notifications']) {
       config('update.settings')->set('notification.emails', array($form_state['values']['account']['mail']))->save();
     }
   }
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index 8aa3ed4..41fb292 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -1696,7 +1696,6 @@ function system_logging_settings_submit($form, &$form_state) {
  * @see system_performance_settings_submit().
  */
 function system_performance_settings($form, &$form_state) {
-  drupal_add_js(drupal_get_path('module', 'system') . '/system.js');
   $config = config('system.performance');
 
   $form['clear_cache'] = array(
@@ -1751,8 +1750,11 @@ function system_performance_settings($form, &$form_state) {
     '#type' => 'checkbox',
     '#title' => t('Compress cached pages.'),
     '#default_value' => $config->get('page_compression'),
-    '#prefix' => '<div id="page-compression-wrapper"' . $js_hide . '>',
-    '#suffix' => '</div>',
+    '#states' => array(
+      'visible' => array(
+        'input[name="cache"]' => array('checked' => TRUE),
+      ),
+    ),
   );
   $form['bandwidth_optimization']['preprocess_css'] = array(
     '#type' => 'checkbox',
@@ -2235,14 +2237,6 @@ function system_add_date_format_type_form_submit($form, &$form_state) {
 }
 
 /**
- * Return the date for a given format string via Ajax.
- */
-function system_date_time_lookup() {
-  $result = format_date(REQUEST_TIME, 'custom', $_GET['format']);
-  return new JsonResponse($result);
-}
-
-/**
  * Form builder; Configure the site's maintenance status.
  *
  * @ingroup forms
@@ -2856,18 +2850,6 @@ function system_date_time_formats() {
  * Allow users to add additional date formats.
  */
 function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
-  $js_settings = array(
-    'type' => 'setting',
-    'data' => array(
-      'dateTime' => array(
-        'date-format' => array(
-          'text' => t('Displayed as'),
-          'lookup' => url('admin/config/regional/date-time/formats/lookup'),
-        ),
-      ),
-    ),
-  );
-
   if ($dfid) {
     $form['dfid'] = array(
       '#type' => 'value',
@@ -2885,8 +2867,10 @@ function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
     '#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 : ''),
     '#field_suffix' => ' <small id="edit-date-format-suffix">' . $now . '</small>',
-    '#attached' => array(
-      'js' => array(drupal_get_path('module', 'system') . '/system.js', $js_settings),
+    '#ajax' => array(
+      'callback' => 'system_date_time_lookup',
+      'event' => 'keyup',
+      'progress' => array('type' => 'throbber', 'message' => NULL),
     ),
     '#required' => TRUE,
   );
@@ -2904,6 +2888,21 @@ function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
 }
 
 /**
+ * Return the date for a given format string via Ajax.
+ */
+function system_date_time_lookup($form, $form_state) {
+  $format = '';
+  if (!empty($form_state['values']['date_format'])) {
+    $format = t('Displayed as %date_format', array('%date_format' => format_date(REQUEST_TIME, 'custom', $form_state['values']['date_format'])));
+  }
+  // We are returning command and not directly string because if we return
+  // string ajax api will prepend additional empty div element which will mess
+  // our layout.
+  $commands[] = ajax_command_replace('#edit-date-format-suffix', '<small id="edit-date-format-suffix">' . $format . '</small>');
+  return array('#type' => 'ajax', '#commands' => $commands);
+}
+
+/**
  * Validate new date format string submission.
  */
 function system_add_date_formats_form_validate($form, &$form_state) {
diff --git a/core/modules/system/system.js b/core/modules/system/system.js
index 66fd4f5..0436817 100644
--- a/core/modules/system/system.js
+++ b/core/modules/system/system.js
@@ -3,92 +3,31 @@
 "use strict";
 
 /**
- * Show/hide the 'Email site administrator when updates are available' checkbox
- * on the install page.
- */
-Drupal.hideEmailAdministratorCheckbox = function () {
-  // Make sure the secondary box is shown / hidden as necessary on page load.
-  if ($('#edit-update-status-module-1').is(':checked')) {
-    $('.form-item-update-status-module-2').show();
-  }
-  else {
-    $('.form-item-update-status-module-2').hide();
-  }
-
-  // Toggle the display as necessary when the checkbox is clicked.
-  $('#edit-update-status-module-1').change( function () {
-    $('.form-item-update-status-module-2').toggle();
-  });
-};
-
-/**
  * When a field is filled out, apply its value to other fields that will likely
  * use the same value. In the installer this is used to populate the
  * administrator e-mail address with the same value as the site e-mail address.
  */
 Drupal.behaviors.copyFieldValue = {
   attach: function (context, settings) {
-    for (var sourceId in settings.copyFieldValue) {
-      $('#' + sourceId, context).once('copy-field-values').bind('blur', function () {
-        // Get the list of target fields.
-        var targetIds = settings.copyFieldValue[sourceId];
-        // Add the behavior to update target fields on blur of the primary field.
-        for (var delta in targetIds) {
+    function updateTarget () {
+      // Get the list of target fields.
+      var targetIds = settings.copyFieldValue[sourceId];
+      for (var delta in targetIds) {
+        if (targetIds.hasOwnProperty(delta)) {
           var targetField = $('#' + targetIds[delta]);
           if (targetField.val() === '') {
             targetField.val(this.value);
           }
         }
-      });
-    }
-  }
-};
-
-/**
- * Show/hide custom format sections on the regional settings page.
- */
-Drupal.behaviors.dateTime = {
-  attach: function (context, settings) {
-    for (var fieldName in settings.dateTime) {
-      if (settings.dateTime.hasOwnProperty(fieldName)) {
-        (function (fieldSettings, fieldName) {
-          var source = '#edit-' + fieldName;
-          var suffix = source + '-suffix';
-
-          // Attach keyup handler to custom format inputs.
-          $(context).find('input' + source).once('date-time').keyup(function () {
-            var input = $(this);
-            var url = fieldSettings.lookup + (/\?q=/.test(fieldSettings.lookup) ? '&format=' : '?format=') + encodeURIComponent(input.val());
-            $.getJSON(url, function (data) {
-              $(suffix).empty().append(' ' + fieldSettings.text + ': <em>' + data + '</em>');
-            });
-          });
-        })(settings.dateTime[fieldName], fieldName);
+      }
+    };
+    for (var sourceId in settings.copyFieldValue) {
+      if (settings.copyFieldValue.hasOwnProperty(sourceId)) {
+        // Add the behavior to update target fields on blur of the primary field.
+        $('#' + sourceId, context).once('copy-field-values').bind('blur', updateTarget);
       }
     }
   }
 };
 
- /**
- * Show/hide settings for page caching depending on whether page caching is
- * enabled or not.
- */
-Drupal.behaviors.pageCache = {
-  attach: function (context, settings) {
-    var $context = $(context);
-    $context.find('#edit-cache-0').change(function () {
-      $('#page-compression-wrapper').hide();
-      $('#cache-error').hide();
-    });
-    $context.find('#edit-cache-1').change(function () {
-      $('#page-compression-wrapper').show();
-      $('#cache-error').hide();
-    });
-    $context.find('#edit-cache-2').change(function () {
-      $('#page-compression-wrapper').show();
-      $('#cache-error').show();
-    });
-  }
-};
-
 })(jQuery);
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index de7241f..a3223ca 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -973,13 +973,6 @@ function system_menu() {
     'access arguments' => array('administer site configuration'),
     'file' => 'system.admin.inc',
   );
-  $items['admin/config/regional/date-time/formats/lookup'] = array(
-    'title' => 'Date and time lookup',
-    'page callback' => 'system_date_time_lookup',
-    'access arguments' => array('administer site configuration'),
-    'type' => MENU_CALLBACK,
-    'file' => 'system.admin.inc',
-  );
 
   // Search settings.
   $items['admin/config/search'] = array(
