diff --git a/.htaccess b/.htaccess
index a69bdd4..2dc1428 100644
--- a/.htaccess
+++ b/.htaccess
@@ -95,7 +95,7 @@ DirectoryIndex index.php index.html index.htm
   #
   # If your site is running in a VirtualDocumentRoot at http://example.com/,
   # uncomment the following line:
-  # RewriteBase /
+  RewriteBase /~crell/drupal_lg
 
   # Redirect common PHP files to their new locations.
   RewriteCond %{REQUEST_URI} ^(.*)?/(update.php) [OR]
diff --git a/core/includes/archiver.inc b/core/includes/archiver.inc
index 3ce1173..835d46f 100644
--- a/core/includes/archiver.inc
+++ b/core/includes/archiver.inc
@@ -51,12 +51,12 @@ interface ArchiverInterface {
    * @param $files
    *   Optionally specify a list of files to be extracted. Files are
    *   relative to the root of the archive. If not specified, all files
-   *   in the archive will be extracted.
+   *   in the archive will be extracted
    *
    * @return ArchiverInterface
    *   The called object.
    */
-  public function extract($path, array $files = array());
+  public function extract($path, Array $files = array());
 
   /**
    * Lists all files in the archive.
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 952b4ea..0ef2d9d 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -3,6 +3,8 @@
 use Symfony\Component\ClassLoader\UniversalClassLoader;
 use Symfony\Component\ClassLoader\ApcUniversalClassLoader;
 
+use Drupal\Core\Request;
+
 /**
  * @file
  * Functions that need to be loaded on every Drupal request.
@@ -718,13 +720,6 @@ function drupal_environment_initialize() {
     $_SERVER['HTTP_HOST'] = '';
   }
 
-  // When clean URLs are enabled, emulate ?q=foo/bar using REQUEST_URI. It is
-  // not possible to append the query string using mod_rewrite without the B
-  // flag (this was added in Apache 2.2.8), because mod_rewrite unescapes the
-  // path before passing it on to PHP. This is a problem when the path contains
-  // e.g. "&" or "%" that have special meanings in URLs and must be encoded.
-  $_GET['q'] = request_path();
-
   // Enforce E_STRICT, but allow users to set levels not part of E_STRICT.
   error_reporting(E_STRICT | E_ALL | error_reporting());
 
@@ -1955,7 +1950,7 @@ function drupal_block_denied($ip) {
  */
 function drupal_random_bytes($count)  {
   // $random_state does not use drupal_static as it stores random bytes.
-  static $random_state, $bytes, $php_compatible;
+  static $random_state, $bytes;
   // Initialize on the first call. The contents of $_SERVER includes a mix of
   // user-specific and system information that varies a little with each page.
   if (!isset($random_state)) {
@@ -1967,11 +1962,6 @@ function drupal_random_bytes($count)  {
     $bytes = '';
   }
   if (strlen($bytes) < $count) {
-    // PHP versions prior 5.3.4 experienced openssl_random_pseudo_bytes()
-    // locking on Windows and rendered it unusable.
-    if (!isset($php_compatible)) {
-      $php_compatible = version_compare(PHP_VERSION, '5.3.4', '>=');
-    }
     // /dev/urandom is available on many *nix systems and is considered the
     // best commonly available pseudo-random source.
     if ($fh = @fopen('/dev/urandom', 'rb')) {
@@ -1981,11 +1971,6 @@ function drupal_random_bytes($count)  {
       $bytes .= fread($fh, max(4096, $count));
       fclose($fh);
     }
-    // openssl_random_pseudo_bytes() will find entropy in a system-dependent
-    // way.
-    elseif ($php_compatible && function_exists('openssl_random_pseudo_bytes')) {
-      $bytes .= openssl_random_pseudo_bytes($count - strlen($bytes));
-    }
     // If /dev/urandom is not available or returns no bytes, this loop will
     // generate a good set of pseudo-random bytes on any system.
     // Note that it may be important that our $random_state is passed
@@ -2725,157 +2710,59 @@ function language_default() {
 }
 
 /**
+ * Returns the request object for the current request.
+ *
+ * @return Drupal\Core\Request
+ *   The request object for this request, as populated from the PHP superglobals.
+ */
+function request() {
+  $request = &drupal_static(__FUNCTION__);
+  if (empty($request)) {
+    $request = Request::createFromGlobals();
+  }
+  return $request;
+}
+
+/**
  * Returns the requested URL path of the page being viewed.
  *
- * Examples:
- * - http://example.com/node/306 returns "node/306".
- * - http://example.com/drupalfolder/node/306 returns "node/306" while
- *   base_path() returns "/drupalfolder/".
- * - http://example.com/path/alias (which is a path alias for node/306) returns
- *   "path/alias" as opposed to the internal path.
- * - http://example.com/index.php returns an empty string (meaning: front page).
- * - http://example.com/index.php?page=1 returns an empty string.
+ * @deprecated
  *
  * @return
  *   The requested Drupal URL path.
  *
- * @see current_path()
+ * @see Drupal\Core\Request::requestPath()
  */
 function request_path() {
-  static $path;
-
-  if (isset($path)) {
-    return $path;
-  }
-
-  if (isset($_GET['q'])) {
-    // This is a request with a ?q=foo/bar query string. $_GET['q'] is
-    // overwritten in drupal_path_initialize(), but request_path() is called
-    // very early in the bootstrap process, so the original value is saved in
-    // $path and returned in later calls.
-    $path = $_GET['q'];
-  }
-  elseif (isset($_SERVER['REQUEST_URI'])) {
-    // This request is either a clean URL, or 'index.php', or nonsense.
-    // Extract the path from REQUEST_URI.
-    $request_path = strtok($_SERVER['REQUEST_URI'], '?');
-    $base_path_len = strlen(rtrim(dirname($_SERVER['SCRIPT_NAME']), '\/'));
-    // Unescape and strip $base_path prefix, leaving q without a leading slash.
-    $path = substr(urldecode($request_path), $base_path_len + 1);
-    // If the path equals the script filename, either because 'index.php' was
-    // explicitly provided in the URL, or because the server added it to
-    // $_SERVER['REQUEST_URI'] even when it wasn't provided in the URL (some
-    // versions of Microsoft IIS do this), the front page should be served.
-    if ($path == basename($_SERVER['PHP_SELF'])) {
-      $path = '';
-    }
-  }
-  else {
-    // This is the front page.
-    $path = '';
-  }
-
-  // Under certain conditions Apache's RewriteRule directive prepends the value
-  // assigned to $_GET['q'] with a slash. Moreover we can always have a trailing
-  // slash in place, hence we need to normalize $_GET['q'].
-  $path = trim($path, '/');
-
-  return $path;
+  return request()->requestPath();
 }
 
 /**
  * Returns a component of the current Drupal path.
  *
- * When viewing a page at the path "admin/structure/types", for example, arg(0)
- * returns "admin", arg(1) returns "structure", and arg(2) returns "types".
- *
- * Avoid use of this function where possible, as resulting code is hard to
- * read. In menu callback functions, attempt to use named arguments. See the
- * explanation in menu.inc for how to construct callbacks that take arguments.
- * When attempting to use this function to load an element from the current
- * path, e.g. loading the node on a node page, use menu_get_object() instead.
- *
- * @param $index
- *   The index of the component, where each component is separated by a '/'
- *   (forward-slash), and where the first component has an index of 0 (zero).
- * @param $path
- *   A path to break into components. Defaults to the path of the current page.
+ * @deprecated
  *
  * @return
  *   The component specified by $index, or NULL if the specified component was
- *   not found. If called without arguments, it returns an array containing all
- *   the components of the current path.
+ *   not found.
  */
 function arg($index = NULL, $path = NULL) {
-  // Even though $arguments doesn't need to be resettable for any functional
-  // reasons (the result of explode() does not depend on any run-time
-  // information), it should be resettable anyway in case a module needs to
-  // free up the memory used by it.
-  // Use the advanced drupal_static() pattern, since this is called very often.
-  static $drupal_static_fast;
-  if (!isset($drupal_static_fast)) {
-    $drupal_static_fast['arguments'] = &drupal_static(__FUNCTION__);
-  }
-  $arguments = &$drupal_static_fast['arguments'];
-
-  if (!isset($path)) {
-    $path = $_GET['q'];
-  }
-  if (!isset($arguments[$path])) {
-    $arguments[$path] = explode('/', $path);
-  }
-  if (!isset($index)) {
-    return $arguments[$path];
-  }
-  if (isset($arguments[$path][$index])) {
-    return $arguments[$path][$index];
-  }
+  return request()->pathElement($index);
 }
 
 /**
  * Returns the IP address of the client machine.
  *
- * If Drupal is behind a reverse proxy, we use the X-Forwarded-For header
- * instead of $_SERVER['REMOTE_ADDR'], which would be the IP address of
- * the proxy server, and not the client's. The actual header name can be
- * configured by the reverse_proxy_header variable.
+ * @deprecated
  *
  * @return
  *   IP address of client machine, adjusted for reverse proxy and/or cluster
  *   environments.
+ *
+ * @see Symfony\Component\HttpFoundation\Request::getClientIp()
  */
 function ip_address() {
-  $ip_address = &drupal_static(__FUNCTION__);
-
-  if (!isset($ip_address)) {
-    $ip_address = $_SERVER['REMOTE_ADDR'];
-
-    if (variable_get('reverse_proxy', 0)) {
-      $reverse_proxy_header = variable_get('reverse_proxy_header', 'HTTP_X_FORWARDED_FOR');
-      if (!empty($_SERVER[$reverse_proxy_header])) {
-        // If an array of known reverse proxy IPs is provided, then trust
-        // the XFF header if request really comes from one of them.
-        $reverse_proxy_addresses = variable_get('reverse_proxy_addresses', array());
-
-        // Turn XFF header into an array.
-        $forwarded = explode(',', $_SERVER[$reverse_proxy_header]);
-
-        // Trim the forwarded IPs; they may have been delimited by commas and spaces.
-        $forwarded = array_map('trim', $forwarded);
-
-        // Tack direct client IP onto end of forwarded array.
-        $forwarded[] = $ip_address;
-
-        // Eliminate all trusted IPs.
-        $untrusted = array_diff($forwarded, $reverse_proxy_addresses);
-
-        // The right-most IP is the most specific we can trust.
-        $ip_address = array_pop($untrusted);
-      }
-    }
-  }
-
-  return $ip_address;
+  return request()->getClientIp(variable_get('reverse_proxy', 0));
 }
 
 /**
diff --git a/core/includes/cache.inc b/core/includes/cache.inc
index d3c3414..ab14bd4 100644
--- a/core/includes/cache.inc
+++ b/core/includes/cache.inc
@@ -11,8 +11,8 @@
  * By default, this returns an instance of the Drupal\Core\Cache\DatabaseBackend
  * class.
  *
- * Classes implementing Drupal\Core\Cache\CacheBackendInterface can register
- * themselves both as a default implementation and for specific bins.
+ * Classes implementing Drupal\Core\Cache\CacheBackendInterface can register themselves
+ * both as a default implementation and for specific bins.
  *
  * @param $bin
  *   The cache bin for which the cache object should be returned, defaults to
diff --git a/core/includes/common.inc b/core/includes/common.inc
index f840e5c..e2c8784 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -1850,9 +1850,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',
- *     'html_date', 'html_time', 'html_yearless_date', 'html_week',
- *     'html_month', 'html_year'.
+ *   - 'short', 'medium', or 'long' (the corresponding built-in date formats).
  *   - The name of a date type defined by a module in hook_date_format_types(),
  *     if it's been assigned a format.
  *   - The machine name of an administrator-defined date format.
@@ -1905,34 +1903,6 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
       $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;
@@ -6750,9 +6720,6 @@ function drupal_common_theme() {
       'render element' => 'elements',
       'template' => 'region',
     ),
-    'datetime' => array(
-      'variables' => array('timestamp' => NULL, 'text' => NULL, 'attributes' => array(), 'html' => FALSE),
-    ),
     'status_messages' => array(
       'variables' => array('display' => NULL),
     ),
@@ -6786,9 +6753,6 @@ function drupal_common_theme() {
     'table' => array(
       'variables' => array('header' => NULL, 'rows' => NULL, 'attributes' => array(), 'caption' => NULL, 'colgroups' => array(), 'sticky' => TRUE, 'empty' => ''),
     ),
-    'meter' => array(
-      'variables' => array('display_value' => NULL, 'form' => NULL, 'high' => NULL, 'low' => NULL, 'max' => NULL, 'min' => NULL, 'optimum' => NULL, 'value' => NULL, 'percentage' => NULL, 'attributes' => array()),
-    ),
     'tablesort_indicator' => array(
       'variables' => array('style' => NULL),
     ),
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index 84bd0d1..fea93c1 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -434,7 +434,7 @@ function menu_set_item($path, $router_item) {
 function menu_get_item($path = NULL, $router_item = NULL) {
   $router_items = &drupal_static(__FUNCTION__);
   if (!isset($path)) {
-    $path = $_GET['q'];
+    $path = request()->systemPath();
   }
   if (isset($router_item)) {
     $router_items[$path] = $router_item;
@@ -445,12 +445,20 @@ function menu_get_item($path = NULL, $router_item = NULL) {
     if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) {
       menu_rebuild();
     }
-    $original_map = arg(NULL, $path);
-
-    $parts = array_slice($original_map, 0, MENU_MAX_PARTS);
-    $ancestors = menu_get_ancestors($parts);
-    $router_item = db_query_range('SELECT * FROM {menu_router} WHERE path IN (:ancestors) ORDER BY fit DESC', 0, 1, array(':ancestors' => $ancestors))->fetchAssoc();
+    $original_map = explode('/', $path);
 
+    // Since there is no limit to the length of $path, use a hash to keep it
+    // short yet unique.
+    $cid = 'menu_item:' . hash('sha256', $path);
+    if ($cached = cache('menu')->get($cid)) {
+      $router_item = $cached->data;
+    }
+    else {
+      $parts = array_slice($original_map, 0, MENU_MAX_PARTS);
+      $ancestors = menu_get_ancestors($parts);
+      $router_item = db_query_range('SELECT * FROM {menu_router} WHERE path IN (:ancestors) ORDER BY fit DESC', 0, 1, array(':ancestors' => $ancestors))->fetchAssoc();
+      cache('menu')->set($cid, $router_item);
+    }
     if ($router_item) {
       // Allow modules to alter the router item before it is translated and
       // checked for access.
@@ -1697,7 +1705,7 @@ function menu_get_active_help() {
     return '';
   }
 
-  $arg = drupal_help_arg(arg(NULL));
+  $arg = drupal_help_arg(explode('/', request()->systemPath()));
 
   foreach (module_implements('help') as $module) {
     $function = $module . '_help';
diff --git a/core/includes/path.inc b/core/includes/path.inc
index 44bf3fe..04f5f06 100644
--- a/core/includes/path.inc
+++ b/core/includes/path.inc
@@ -292,7 +292,7 @@ function drupal_is_front_page() {
   if (!isset($is_front_page)) {
     // As drupal_path_initialize updates $_GET['q'] with the 'site_frontpage' path,
     // we can check it against the 'site_frontpage' variable.
-    $is_front_page = ($_GET['q'] == variable_get('site_frontpage', 'user'));
+    $is_front_page = (request()->get('q') == variable_get('site_frontpage', 'user'));
   }
 
   return $is_front_page;
@@ -352,7 +352,7 @@ function drupal_match_path($path, $patterns) {
  * @see request_path()
  */
 function current_path() {
-  return $_GET['q'];
+  return request()->systemPath();
 }
 
 /**
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 5088c41..9983a18 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1475,66 +1475,6 @@ function theme_disable($theme_list) {
  */
 
 /**
- * Preprocess variables for theme_datetime().
- */
-function template_preprocess_datetime(&$variables) {
-  // Format the 'datetime' attribute based on the timestamp.
-  // @see http://www.w3.org/TR/html5-author/the-time-element.html#attr-time-datetime
-  if (!isset($variables['attributes']['datetime']) && isset($variables['timestamp'])) {
-    $variables['attributes']['datetime'] = format_date($variables['timestamp'], 'html_datetime', '', 'UTC');
-  }
-
-  // If no text was provided, try to auto-generate it.
-  if (!isset($variables['text'])) {
-    // Format and use a human-readable version of the timestamp, if any.
-    if (isset($variables['timestamp'])) {
-      $variables['text'] = format_date($variables['timestamp']);
-      $variables['html'] = FALSE;
-    }
-    // Otherwise, use the literal datetime attribute.
-    elseif (isset($variables['attributes']['datetime'])) {
-      $variables['text'] = $variables['attributes']['datetime'];
-      $variables['html'] = FALSE;
-    }
-  }
-}
-
-/**
- * Returns HTML for a date / time.
- *
- * @param $variables
- *   An associative array containing:
- *   - timestamp: (optional) A UNIX timestamp for the datetime attribute. If the
- *     datetime cannot be represented as a UNIX timestamp, use a valid datetime
- *     attribute value in $variables['attributes']['datetime'].
- *   - text: (optional) The content to display within the <time> element. Set
- *     'html' to TRUE if this value is already sanitized for output in HTML.
- *     Defaults to a human-readable representation of the timestamp value or the
- *     datetime attribute value using format_date().
- *     When invoked as #theme or #theme_wrappers of a render element, the
- *     rendered #children are autoamtically taken over as 'text', unless #text
- *     is explicitly set.
- *   - attributes: (optional) An associative array of HTML attributes to apply
- *     to the <time> element. A datetime attribute in 'attributes' overrides the
- *     'timestamp'. To create a valid datetime attribute value from a UNIX
- *     timestamp, use format_date() with one of the predefined 'html_*' formats.
- *   - html: (optional) Whether 'text' is HTML markup (TRUE) or plain-text
- *     (FALSE). Defaults to FALSE. For example, to use a SPAN tag within the
- *     TIME element, this must be set to TRUE, or the SPAN tag will be escaped.
- *     It is the responsibility of the caller to properly sanitize the value
- *     contained in 'text' (or within the SPAN tag in aforementioned example).
- *
- * @see template_preprocess_datetime()
- * @see http://www.w3.org/TR/html5-author/the-time-element.html#attr-time-datetime
- */
-function theme_datetime($variables) {
-  $output = '<time' . drupal_attributes($variables['attributes']) . '>';
-  $output .= !empty($variables['html']) ? $variables['text'] : check_plain($variables['text']);
-  $output .= '</time>';
-  return $output;
-}
-
-/**
  * Returns HTML for status and/or error messages, grouped by type.
  *
  * An invisible heading identifies the messages for assistive technology.
@@ -2203,49 +2143,6 @@ function theme_progress_bar($variables) {
 }
 
 /**
- * Returns HTML for a meter.
- *
- * @param $variables
- *   An associative array containing:
- *   - display_value: The textual representation of the meter bar.
- *   - form: A string specifying one or more forms to which the <meter> element
- *     belongs separated by spaces.
- *   - high: A number specifying the range that is considered to be a high
- *     value.
- *   - low: A number specifying the range that is considered to be a low value.
- *   - max: A number specifying the maximum value of the range.
- *   - min: A number specifying the minimum value of the range.
- *   - optimum: A number specifying what value is the optimal value for the
- *     gauge.
- *   - value: A number specifying the current value of the gauge.
- *   - percentage: A number specifying the current percentage of the gauge.
- *   - attributes: Associative array of attributes to be placed in the meter
- *     tag.
- */
-function theme_meter($variables) {
-  $attributes = $variables['attributes'];
-
-  foreach (array('form', 'high', 'low', 'max', 'min', 'optimum', 'value') as $attribute) {
-    if (!empty($variables[$attribute])) {
-      // This function was initially designed for the <meter> tag, but due to
-      // the lack of browser and styling support for it, we're currently using
-      // it's attributes as HTML5 data attributes.
-      $attributes['data-' . $attribute] = $variables[$attribute];
-    }
-  }
-
-  $output = '<div' . drupal_attributes($attributes) . '>';
-  $output .= '  <div style="width: '. $variables['percentage'] .'%;" class="foreground"></div>';
-  $output .= "</div>\n";
-
-  if (!empty($variables['display_value'])) {
-    $output .= '<div class="percent">' . $variables['display_value'] . '</div>';
-  }
-
-  return $output;
-}
-
-/**
  * Returns HTML for an indentation div; used for drag and drop tables.
  *
  * @param $variables
@@ -2435,7 +2332,7 @@ function template_preprocess_html(&$variables) {
   }
 
   // Populate the body classes.
-  if ($suggestions = theme_get_suggestions(arg(), 'page', '-')) {
+  if ($suggestions = theme_get_suggestions(request()->pathElements(), 'page', '-')) {
     foreach ($suggestions as $suggestion) {
       if ($suggestion != 'page-front') {
         // Add current suggestion to page classes to make it possible to theme
@@ -2483,7 +2380,7 @@ function template_preprocess_html(&$variables) {
   $variables['head_title'] = implode(' | ', $head_title);
 
   // Populate the page template suggestions.
-  if ($suggestions = theme_get_suggestions(arg(), 'html')) {
+  if ($suggestions = theme_get_suggestions(request()->pathElements(), 'html')) {
     $variables['theme_hook_suggestions'] = $suggestions;
   }
 }
@@ -2495,9 +2392,6 @@ function template_preprocess_html(&$variables) {
  * inside "modules/system/page.tpl.php". Look in there for the full list of
  * variables.
  *
- * Uses the arg() function to generate a series of page template suggestions
- * based on the current path.
- *
  * Any changes to variables in this preprocessor should also be changed inside
  * template_preprocess_maintenance_page() to keep all of them consistent.
  *
@@ -2542,7 +2436,7 @@ function template_preprocess_page(&$variables) {
   }
 
   // Populate the page template suggestions.
-  if ($suggestions = theme_get_suggestions(arg(), 'page')) {
+  if ($suggestions = theme_get_suggestions(request()->pathElements(), 'page')) {
     $variables['theme_hook_suggestions'] = $suggestions;
   }
 }
@@ -2611,7 +2505,7 @@ function template_process_html(&$variables) {
  * base the additional suggestions on the path of the current page.
  *
  * @param $args
- *   An array of path arguments, such as from function arg().
+ *   An array of path arguments.
  * @param $base
  *   A string identifying the base 'thing' from which more specific suggestions
  *   are derived. For example, 'page' or 'html'.
diff --git a/core/lib/Drupal/Core/Request.php b/core/lib/Drupal/Core/Request.php
new file mode 100644
index 0000000..d514766
--- /dev/null
+++ b/core/lib/Drupal/Core/Request.php
@@ -0,0 +1,154 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Core\Request.
+ */
+
+namespace Drupal\Core;
+
+use Symfony\Component\HttpFoundation\Request as HttpFoundationRequest;
+
+/**
+ * Description of DrupalRequest
+ */
+class Request extends HttpFoundationRequest {
+
+  /**
+   * An array of elements in the path, which are arguments to the request.
+   *
+   * @var array
+   */
+  protected $pathElements;
+
+  /**
+   * The requested URL path of the page being viewed
+   *
+   * @var string
+   */
+  protected $requestPath;
+
+  /**
+   * Returns a component of the current path.
+   *
+   * When viewing a page at the path "admin/structure/types", for example,
+   * index 0 returns "admin", index 1 returns "structure", and index 2 returns
+   * "types".
+   *
+   * Use of this method is discouraged, as it results in a code that is
+   * hard-coded to a particular path.  Generally it is bad practice to assume
+   * that a particular piece of code will run on a particular path.
+   *
+   * @param $index
+   *   The index of the component, where each component is separated by a '/'
+   *   (forward-slash), and where the first component has an index of 0 (zero).
+   *
+   * @return
+   *   The component specified by $index, or NULL if the specified component was
+   *   not found.
+   */
+  public function pathElement($index) {
+    $elements = $this->pathElements();
+    return isset($elements[$index]) ? $elements[$index] : NULL;
+  }
+
+  /**
+   * Returns the current path broken up into an array.
+   *
+   * @return array
+   *   An array representing the elements of the path.
+   */
+  public function pathElements() {
+    if (empty($this->pathElements)) {
+      $this->pathElements = explode('/', $this->systemPath());
+    }
+    return $this->pathElements;
+  }
+
+  /**
+   * Returns the requested URL path of the page being viewed.
+   *
+   * Examples:
+   * - http://example.com/node/306 returns "node/306".
+   * - http://example.com/drupalfolder/node/306 returns "node/306" while
+   *   base_path() returns "/drupalfolder/".
+   * - http://example.com/path/alias (which is a path alias for node/306) returns
+   *   "path/alias" as opposed to the internal path.
+   * - http://example.com/index.php returns an empty string (meaning: front page).
+   * - http://example.com/index.php?page=1 returns an empty string.
+   *
+   * @return
+   *   The requested URL path, as it came from the user agent.
+   */
+  public function requestPath() {
+    if (empty($this->requestPath)) {
+      $raw_path = '';
+
+      $q = $this->query->get('q');
+
+      if (!empty($q)) {
+        // This is a request with a ?q=foo/bar query string. That trumps all other
+        // path locations.
+        $raw_path = $q;
+      }
+      else {
+        // This request is either a clean URL, or 'index.php', or nonsense.
+        // Extract the path from REQUEST_URI.
+        $request_uri = $this->getRequestUri();
+        $request_path = strtok($request_uri, '?');
+        $script_name = $this->getScriptName();
+        $base_path_len = strlen(rtrim(dirname($script_name), '\/'));
+        // Unescape and strip $base_path prefix, leaving q without a leading slash.
+        $raw_path = substr(urldecode($request_path), $base_path_len + 1);
+        // If the path equals the script filename, either because 'index.php' was
+        // explicitly provided in the URL, or because the server added it to
+        // $_SERVER['REQUEST_URI'] even when it wasn't provided in the URL (some
+        // versions of Microsoft IIS do this), the front page should be served.
+        $php_self = $this->server->get('PHP_SELF');
+        if ($raw_path == basename($php_self)) {
+          $raw_path = '';
+        }
+      }
+
+      // Under certain conditions Apache's RewriteRule directive prepends the value
+      // assigned to $_GET['q'] with a slash. Moreover we can always have a trailing
+      // slash in place, hence we need to normalize $_GET['q'].
+      $this->requestPath = trim($raw_path, '/');
+    }
+
+    return $this->requestPath;
+  }
+
+  /**
+   * Return the current URL path of the page being viewed.
+   *
+   * Examples:
+   * - http://example.com/node/306 returns "node/306".
+   * - http://example.com/drupalfolder/node/306 returns "node/306" while
+   *   base_path() returns "/drupalfolder/".
+   * - http://example.com/path/alias (which is a path alias for node/306) returns
+   *   "node/306" as opposed to the path alias.
+   *
+   * This function is not available in hook_boot() so use Request::requestPath()
+   * instead.  Be aware that requestPath() does not have aliases resolved.
+   *
+   * @return
+   *   The current URL path, with aliases resolved.
+   */
+  public function systemPath() {
+    if (empty($this->systemPath)) {
+      // @todo Temporary hack. Fix when path is an object.
+      require_once DRUPAL_ROOT . '/core/includes/path.inc';
+
+      $path = $this->requestPath();
+
+      if (empty($path)) {
+        // @todo Temporary hack. Fix when configuration is injectable.
+        $path = variable_get('site_frontpage', 'node');
+      }
+      $this->systemPath = drupal_get_normal_path($path);
+    }
+
+    return $this->systemPath;
+  }
+}
diff --git a/core/misc/autocomplete.js b/core/misc/autocomplete.js
index e5a0892..5e85be4 100644
--- a/core/misc/autocomplete.js
+++ b/core/misc/autocomplete.js
@@ -32,7 +32,7 @@ Drupal.behaviors.autocomplete = {
 Drupal.autocompleteSubmit = function () {
   return $('#autocomplete').each(function () {
     this.owner.hidePopup();
-  }).length == 0;
+  }).size() == 0;
 };
 
 /**
@@ -41,7 +41,7 @@ Drupal.autocompleteSubmit = function () {
 Drupal.jsAC = function ($input, db) {
   var ac = this;
   this.input = $input[0];
-  this.ariaLive = $('#' + this.input.id + '-autocomplete-aria-live');
+  this.ariaLive = $('#' + $input.attr('id') + '-autocomplete-aria-live');
   this.db = db;
 
   $input
@@ -123,7 +123,7 @@ Drupal.jsAC.prototype.selectDown = function () {
   }
   else if (this.popup) {
     var lis = $('li', this.popup);
-    if (lis.length > 0) {
+    if (lis.size() > 0) {
       this.highlight(lis.get(0));
     }
   }
@@ -227,7 +227,7 @@ Drupal.jsAC.prototype.found = function (matches) {
 
   // Show popup with matches, if any.
   if (this.popup) {
-    if (ul.children().length) {
+    if (ul.children().size()) {
       $(this.popup).empty().append(ul).show();
       $(this.ariaLive).html(Drupal.t('Autocomplete popup'));
     }
diff --git a/core/misc/states.js b/core/misc/states.js
index a2650a8..d6b2505 100644
--- a/core/misc/states.js
+++ b/core/misc/states.js
@@ -21,7 +21,7 @@ Drupal.behaviors.states = {
         new states.Dependent({
           element: $(selector),
           state: states.State.sanitize(state),
-          constraints: settings.states[selector][state]
+          dependees: settings.states[selector][state]
         });
       }
     }
@@ -40,14 +40,12 @@ Drupal.behaviors.states = {
  *   Object with the following keys (all of which are required):
  *   - element: A jQuery object of the dependent element
  *   - state: A State object describing the state that is dependent
- *   - constraints: An object with dependency specifications. Lists all elements
- *     that this element depends on. It can be nested and can contain arbitrary
- *     AND and OR clauses.
+ *   - dependees: An object with dependency specifications. Lists all elements
+ *     that this element depends on.
  */
 states.Dependent = function (args) {
-  $.extend(this, { values: {}, oldValue: null }, args);
+  $.extend(this, { values: {}, oldValue: undefined }, args);
 
-  this.dependees = this.getDependees();
   for (var selector in this.dependees) {
     this.initializeDependee(selector, this.dependees[selector]);
   }
@@ -71,7 +69,7 @@ states.Dependent.comparisons = {
     // as a string before applying the strict comparison in compare(). Otherwise
     // numeric keys in the form's #states array fail to match string values
     // returned from jQuery's val().
-    return (typeof value === 'string') ? compare(reference.toString(), value) : compare(reference, value);
+    return (value.constructor.name === 'String') ? compare(String(reference), value) : compare(reference, value);
   }
 };
 
@@ -86,33 +84,26 @@ states.Dependent.prototype = {
    *   dependee's compliance status.
    */
   initializeDependee: function (selector, dependeeStates) {
-    var state;
+    var self = this;
 
     // Cache for the states of this dependee.
-    this.values[selector] = {};
+    self.values[selector] = {};
 
-    for (var i in dependeeStates) {
-      if (dependeeStates.hasOwnProperty(i)) {
-        state = dependeeStates[i];
-        // Make sure we're not initializing this selector/state combination twice.
-        if ($.inArray(state, dependeeStates) === -1) {
-          continue;
-        }
-
-        state = states.State.sanitize(state);
+    $.each(dependeeStates, function (state, value) {
+      state = states.State.sanitize(state);
 
-        // Initialize the value of this state.
-        this.values[selector][state.name] = null;
+      // Initialize the value of this state.
+      self.values[selector][state.pristine] = undefined;
 
-        // Monitor state changes of the specified state for this dependee.
-        $(selector).bind('state:' + state, $.proxy(function (e) {
-          this.update(selector, state, e.value);
-        }, this));
+      // Monitor state changes of the specified state for this dependee.
+      $(selector).bind('state:' + state, function (e) {
+        var complies = self.compare(value, e.value);
+        self.update(selector, state, complies);
+      });
 
-        // Make sure the event we just bound ourselves to is actually fired.
-        new states.Trigger({ selector: selector, state: state });
-      }
-    }
+      // Make sure the event we just bound ourselves to is actually fired.
+      new states.Trigger({ selector: selector, state: state });
+    });
   },
 
   /**
@@ -120,16 +111,12 @@ states.Dependent.prototype = {
    *
    * @param reference
    *   The value used for reference.
-   * @param selector
-   *   CSS selector describing the dependee.
-   * @param state
-   *   A State object describing the dependee's updated state.
-   *
+   * @param value
+   *   The value to compare with the reference value.
    * @return
-   *   true or false.
+   *   true, undefined or false.
    */
-  compare: function (reference, selector, state) {
-    var value = this.values[selector][state.name];
+  compare: function (reference, value) {
     if (reference.constructor.name in states.Dependent.comparisons) {
       // Use a custom compare function for certain reference value types.
       return states.Dependent.comparisons[reference.constructor.name](reference, value);
@@ -152,8 +139,8 @@ states.Dependent.prototype = {
    */
   update: function (selector, state, value) {
     // Only act when the 'new' value is actually new.
-    if (value !== this.values[selector][state.name]) {
-      this.values[selector][state.name] = value;
+    if (value !== this.values[selector][state.pristine]) {
+      this.values[selector][state.pristine] = value;
       this.reevaluate();
     }
   },
@@ -162,8 +149,16 @@ states.Dependent.prototype = {
    * Triggers change events in case a state changed.
    */
   reevaluate: function () {
-    // Check whether any constraint for this dependent state is satisifed.
-    var value = this.verifyConstraints(this.constraints);
+    var value = undefined;
+
+    // Merge all individual values to find out whether this dependee complies.
+    for (var selector in this.values) {
+      for (var state in this.values[selector]) {
+        state = states.State.sanitize(state);
+        var complies = this.values[selector][state.pristine];
+        value = ternary(value, invert(complies, state.invert));
+      }
+    }
 
     // Only invoke a state change event when the value actually changed.
     if (value !== this.oldValue) {
@@ -178,124 +173,6 @@ states.Dependent.prototype = {
       // infinite loops.
       this.element.trigger({ type: 'state:' + this.state, value: value, trigger: true });
     }
-  },
-
-  /**
-   * Evaluates child constraints to determine if a constraint is satisfied.
-   *
-   * @param constraints
-   *   A constraint object or an array of constraints.
-   * @param selector
-   *   The selector for these constraints. If undefined, there isn't yet a
-   *   selector that these constraints apply to. In that case, the keys of the
-   *   object are interpreted as the selector if encountered.
-   *
-   * @return
-   *   true or false, depending on whether these constraints are satisfied.
-   */
-  verifyConstraints: function(constraints, selector) {
-    var result;
-    if ($.isArray(constraints)) {
-      // This constraint is an array (OR or XOR).
-      var hasXor = $.inArray('xor', constraints) === -1;
-      for (var i = 0, len = constraints.length; i < len; i++) {
-        if (constraints[i] != 'xor') {
-          var constraint = this.checkConstraints(constraints[i], selector, i);
-          // Return if this is OR and we have a satisfied constraint or if this
-          // is XOR and we have a second satisfied constraint.
-          if (constraint && (hasXor || result)) {
-            return hasXor;
-          }
-          result = result || constraint;
-        }
-      }
-    }
-    // Make sure we don't try to iterate over things other than objects. This
-    // shouldn't normally occur, but in case the condition definition is bogus,
-    // we don't want to end up with an infinite loop.
-    else if ($.isPlainObject(constraints)) {
-      // This constraint is an object (AND).
-      for (var n in constraints) {
-        if (constraints.hasOwnProperty(n)) {
-          result = ternary(result, this.checkConstraints(constraints[n], selector, n));
-          // False and anything else will evaluate to false, so return when any
-          // false condition is found.
-          if (result === false) { return false; }
-        }
-      }
-    }
-    return result;
-  },
-
-  /**
-   * Checks whether the value matches the requirements for this constraint.
-   *
-   * @param value
-   *   Either the value of a state or an array/object of constraints. In the
-   *   latter case, resolving the constraint continues.
-   * @param selector
-   *   The selector for this constraint. If undefined, there isn't yet a
-   *   selector that this constraint applies to. In that case, the state key is
-   *   propagates to a selector and resolving continues.
-   * @param state
-   *   The state to check for this constraint. If undefined, resolving
-   *   continues.
-   *   If both selector and state aren't undefined and valid non-numeric
-   *   strings, a lookup for the actual value of that selector's state is
-   *   performed. This parameter is not a State object but a pristine state
-   *   string.
-   *
-   * @return
-   *   true or false, depending on whether this constraint is satisfied.
-   */
-  checkConstraints: function(value, selector, state) {
-    // Normalize the last parameter. If it's non-numeric, we treat it either as
-    // a selector (in case there isn't one yet) or as a trigger/state.
-    if (typeof state !== 'string' || (/[0-9]/).test(state[0])) {
-      state = null;
-    }
-    else if (typeof selector === 'undefined') {
-      // Propagate the state to the selector when there isn't one yet.
-      selector = state;
-      state = null;
-    }
-
-    if (state !== null) {
-      // constraints is the actual constraints of an element to check for.
-      state = states.State.sanitize(state);
-      return invert(this.compare(value, selector, state), state.invert);
-    }
-    else {
-      // Resolve this constraint as an AND/OR operator.
-      return this.verifyConstraints(value, selector);
-    }
-  },
-
-  /**
-   * Gathers information about all required triggers.
-   */
-  getDependees: function() {
-    var cache = {};
-    // Swivel the lookup function so that we can record all available selector-
-    // state combinations for initialization.
-    var _compare = this.compare;
-    this.compare = function(reference, selector, state) {
-      (cache[selector] || (cache[selector] = [])).push(state.name);
-      // Return nothing (=== undefined) so that the constraint loops are not
-      // broken.
-    };
-
-    // This call doesn't actually verify anything but uses the resolving
-    // mechanism to go through the constraints array, trying to look up each
-    // value. Since we swivelled the compare function, this comparison returns
-    // undefined and lookup continues until the very end. Instead of lookup up
-    // the value, we record that combination of selector and state so that we
-    // can initialize all triggers.
-    this.verifyConstraints(this.constraints);
-    // Restore the original function.
-    this.compare = _compare;
-
-    return cache;
   }
 };
 
@@ -315,6 +192,7 @@ states.Trigger = function (args) {
 
 states.Trigger.prototype = {
   initialize: function () {
+    var self = this;
     var trigger = states.Trigger.states[this.state];
 
     if (typeof trigger == 'function') {
@@ -322,11 +200,9 @@ states.Trigger.prototype = {
       trigger.call(window, this.element);
     }
     else {
-      for (var event in trigger) {
-        if (trigger.hasOwnProperty(event)) {
-          this.defaultTrigger(event, trigger[event]);
-        }
-      }
+      $.each(trigger, function (event, valueFn) {
+        self.defaultTrigger(event, valueFn);
+      });
     }
 
     // Mark this trigger as initialized for this element.
@@ -334,22 +210,23 @@ states.Trigger.prototype = {
   },
 
   defaultTrigger: function (event, valueFn) {
+    var self = this;
     var oldValue = valueFn.call(this.element);
 
     // Attach the event callback.
-    this.element.bind(event, $.proxy(function (e) {
-      var value = valueFn.call(this.element, e);
+    this.element.bind(event, function (e) {
+      var value = valueFn.call(self.element, e);
       // Only trigger the event if the value has actually changed.
       if (oldValue !== value) {
-        this.element.trigger({ type: 'state:' + this.state, value: value, oldValue: oldValue });
+        self.element.trigger({ type: 'state:' + self.state, value: value, oldValue: oldValue });
         oldValue = value;
       }
-    }, this));
+    });
 
-    states.postponed.push($.proxy(function () {
+    states.postponed.push(function () {
       // Trigger the event once for initialization purposes.
-      this.element.trigger({ type: 'state:' + this.state, value: oldValue, oldValue: null });
-    }, this));
+      self.element.trigger({ type: 'state:' + self.state, value: oldValue, oldValue: undefined });
+    });
   }
 };
 
@@ -409,7 +286,7 @@ states.Trigger.states = {
 
   collapsed: {
     'collapsed': function(e) {
-      return (typeof e !== 'undefined' && 'value' in e) ? e.value : this.is('.collapsed');
+      return (e !== undefined && 'value' in e) ? e.value : this.is('.collapsed');
     }
   }
 };
@@ -441,7 +318,7 @@ states.State = function(state) {
 };
 
 /**
- * Creates a new State object by sanitizing the passed value.
+ * Create a new State object by sanitizing the passed value.
  */
 states.State.sanitize = function (state) {
   if (state instanceof states.State) {
@@ -486,71 +363,72 @@ states.State.prototype = {
  * bubble up to these handlers. We use this system so that themes and modules
  * can override these state change handlers for particular parts of a page.
  */
-
-$(document).bind('state:disabled', function(e) {
-  // Only act when this change was triggered by a dependency and not by the
-  // element monitoring itself.
-  if (e.trigger) {
-    $(e.target)
-      .attr('disabled', e.value)
-      .filter('.form-element')
-        .closest('.form-item, .form-submit, .form-wrapper')[e.value ? 'addClass' : 'removeClass']('form-disabled');
-
-    // Note: WebKit nightlies don't reflect that change correctly.
-    // See https://bugs.webkit.org/show_bug.cgi?id=23789
-  }
-});
-
-$(document).bind('state:required', function(e) {
-  if (e.trigger) {
-    if (e.value) {
-      $(e.target).closest('.form-item, .form-wrapper').find('label').append('<abbr class="form-required" title="' + Drupal.t('This field is required.') + '">*</abbr>');
-    }
-    else {
-      $(e.target).closest('.form-item, .form-wrapper').find('label .form-required').remove();
+{
+  $(document).bind('state:disabled', function(e) {
+    // Only act when this change was triggered by a dependency and not by the
+    // element monitoring itself.
+    if (e.trigger) {
+      $(e.target)
+        .attr('disabled', e.value)
+        .filter('.form-element')
+          .closest('.form-item, .form-submit, .form-wrapper')[e.value ? 'addClass' : 'removeClass']('form-disabled');
+
+      // Note: WebKit nightlies don't reflect that change correctly.
+      // See https://bugs.webkit.org/show_bug.cgi?id=23789
     }
-  }
-});
+  });
 
-$(document).bind('state:visible', function(e) {
-  if (e.trigger) {
-    $(e.target).closest('.form-item, .form-submit, .form-wrapper')[e.value ? 'show' : 'hide']();
-  }
-});
+  $(document).bind('state:required', function(e) {
+    if (e.trigger) {
+      if (e.value) {
+        $(e.target).closest('.form-item, .form-wrapper').find('label').append('<abbr class="form-required" title="' + Drupal.t('This field is required.') + '">*</abbr>');
+      }
+      else {
+        $(e.target).closest('.form-item, .form-wrapper').find('label .form-required').remove();
+      }
+    }
+  });
 
-$(document).bind('state:checked', function(e) {
-  if (e.trigger) {
-    $(e.target).attr('checked', e.value);
-  }
-});
+  $(document).bind('state:visible', function(e) {
+    if (e.trigger) {
+      $(e.target).closest('.form-item, .form-submit, .form-wrapper')[e.value ? 'show' : 'hide']();
+    }
+  });
 
-$(document).bind('state:collapsed', function(e) {
-  if (e.trigger) {
-    if ($(e.target).is('.collapsed') !== e.value) {
-      $('> legend a', e.target).click();
+  $(document).bind('state:checked', function(e) {
+    if (e.trigger) {
+      $(e.target).attr('checked', e.value);
     }
-  }
-});
+  });
 
+  $(document).bind('state:collapsed', function(e) {
+    if (e.trigger) {
+      if ($(e.target).is('.collapsed') !== e.value) {
+        $('> legend a', e.target).click();
+      }
+    }
+  });
+}
 
 /**
  * These are helper functions implementing addition "operators" and don't
  * implement any logic that is particular to states.
  */
-
-// Bitwise AND with a third undefined state.
-function ternary (a, b) {
-  return typeof a === 'undefined' ? b : (typeof b === 'undefined' ? a : a && b);
-}
-
-// Inverts a (if it's not undefined) when invert is true.
-function invert (a, invert) {
-  return (invert && typeof a !== 'undefined') ? !a : a;
-}
-
-// Compares two values while ignoring undefined values.
-function compare (a, b) {
-  return (a === b) ? (typeof a === 'undefined' ? a : true) : (typeof a === 'undefined' || typeof b === 'undefined');
+{
+  // Bitwise AND with a third undefined state.
+  function ternary (a, b) {
+    return a === undefined ? b : (b === undefined ? a : a && b);
+  };
+
+  // Inverts a (if it's not undefined) when invert is true.
+  function invert (a, invert) {
+    return (invert && a !== undefined) ? !a : a;
+  };
+
+  // Compares two values while ignoring undefined values.
+  function compare (a, b) {
+    return (a === b) ? (a === undefined ? a : true) : (a === undefined || b === undefined);
+  }
 }
 
 })(jQuery);
diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js
index 62b48d9..61e64bf 100644
--- a/core/misc/tabledrag.js
+++ b/core/misc/tabledrag.js
@@ -123,7 +123,7 @@ Drupal.tableDrag.prototype.initColumns = function () {
     // Find the first field in this group.
     for (var d in this.tableSettings[group]) {
       var field = $('.' + this.tableSettings[group][d].target + ':first', this.table);
-      if (field.length && this.tableSettings[group][d].hidden) {
+      if (field.size() && this.tableSettings[group][d].hidden) {
         var hidden = this.tableSettings[group][d].hidden;
         var cell = field.closest('td');
         break;
@@ -256,7 +256,7 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) {
   if ($('td:first .indentation:last', item).length) {
     $('td:first .indentation:last', item).after(handle);
     // Update the total width of indentation in this entire table.
-    self.indentCount = Math.max($('.indentation', item).length, self.indentCount);
+    self.indentCount = Math.max($('.indentation', item).size(), self.indentCount);
   }
   else {
     $('td:first', item).prepend(handle);
@@ -357,7 +357,7 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) {
           if ($(item).is('.tabledrag-root')) {
             // Swap with the previous top-level row.
             var groupHeight = 0;
-            while (previousRow && $('.indentation', previousRow).length) {
+            while (previousRow && $('.indentation', previousRow).size()) {
               previousRow = $(previousRow).prev('tr').get(0);
               groupHeight += $(previousRow).is(':hidden') ? 0 : previousRow.offsetHeight;
             }
@@ -678,7 +678,7 @@ Drupal.tableDrag.prototype.updateField = function (changedRow, group) {
     var sourceRow = changedRow;
     if ($(previousRow).is('.draggable') && $('.' + group, previousRow).length) {
       if (this.indentEnabled) {
-        if ($('.indentations', previousRow).length == $('.indentations', changedRow)) {
+        if ($('.indentations', previousRow).size() == $('.indentations', changedRow)) {
           sourceRow = previousRow;
         }
       }
@@ -688,7 +688,7 @@ Drupal.tableDrag.prototype.updateField = function (changedRow, group) {
     }
     else if ($(nextRow).is('.draggable') && $('.' + group, nextRow).length) {
       if (this.indentEnabled) {
-        if ($('.indentations', nextRow).length == $('.indentations', changedRow)) {
+        if ($('.indentations', nextRow).size() == $('.indentations', changedRow)) {
           sourceRow = nextRow;
         }
       }
@@ -744,7 +744,7 @@ Drupal.tableDrag.prototype.updateField = function (changedRow, group) {
     switch (rowSettings.action) {
       case 'depth':
         // Get the depth of the target row.
-        targetElement.value = $('.indentation', $(sourceElement).closest('tr')).length;
+        targetElement.value = $('.indentation', $(sourceElement).closest('tr')).size();
         break;
       case 'match':
         // Update the value.
@@ -874,7 +874,7 @@ Drupal.tableDrag.prototype.row = function (tableRow, method, indentEnabled, maxD
   this.element = tableRow;
   this.method = method;
   this.group = [tableRow];
-  this.groupDepth = $('.indentation', tableRow).length;
+  this.groupDepth = $('.indentation', tableRow).size();
   this.changed = false;
   this.table = $(tableRow).closest('table').get(0);
   this.indentEnabled = indentEnabled;
@@ -882,12 +882,12 @@ Drupal.tableDrag.prototype.row = function (tableRow, method, indentEnabled, maxD
   this.direction = ''; // Direction the row is being moved.
 
   if (this.indentEnabled) {
-    this.indents = $('.indentation', tableRow).length;
+    this.indents = $('.indentation', tableRow).size();
     this.children = this.findChildren(addClasses);
     this.group = $.merge(this.group, this.children);
     // Find the depth of this entire group.
     for (var n = 0; n < this.group.length; n++) {
-      this.groupDepth = Math.max($('.indentation', this.group[n]).length, this.groupDepth);
+      this.groupDepth = Math.max($('.indentation', this.group[n]).size(), this.groupDepth);
     }
   }
 };
@@ -999,7 +999,7 @@ Drupal.tableDrag.prototype.row.prototype.validIndentInterval = function (prevRow
 
   // Minimum indentation:
   // Do not orphan the next row.
-  minIndent = nextRow ? $('.indentation', nextRow).length : 0;
+  minIndent = nextRow ? $('.indentation', nextRow).size() : 0;
 
   // Maximum indentation:
   if (!prevRow || $(prevRow).is(':not(.draggable)') || $(this.element).is('.tabledrag-root')) {
@@ -1011,7 +1011,7 @@ Drupal.tableDrag.prototype.row.prototype.validIndentInterval = function (prevRow
   }
   else {
     // Do not go deeper than as a child of the previous row.
-    maxIndent = $('.indentation', prevRow).length + ($(prevRow).is('.tabledrag-leaf') ? 0 : 1);
+    maxIndent = $('.indentation', prevRow).size() + ($(prevRow).is('.tabledrag-leaf') ? 0 : 1);
     // Limit by the maximum allowed depth for the table.
     if (this.maxDepth) {
       maxIndent = Math.min(maxIndent, this.maxDepth - (this.groupDepth - this.indents));
@@ -1032,8 +1032,8 @@ Drupal.tableDrag.prototype.row.prototype.validIndentInterval = function (prevRow
 Drupal.tableDrag.prototype.row.prototype.indent = function (indentDiff) {
   // Determine the valid indentations interval if not available yet.
   if (!this.interval) {
-    var prevRow = $(this.element).prev('tr').get(0);
-    var nextRow = $(this.group).filter(':last').next('tr').get(0);
+    prevRow = $(this.element).prev('tr').get(0);
+    nextRow = $(this.group).filter(':last').next('tr').get(0);
     this.interval = this.validIndentInterval(prevRow, nextRow);
   }
 
diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js
index 904adb9..d83da2c 100644
--- a/core/misc/tableselect.js
+++ b/core/misc/tableselect.js
@@ -8,7 +8,7 @@ Drupal.behaviors.tableSelect = {
 
 Drupal.tableSelect = function () {
   // Do not add a "Select all" checkbox if there are no rows with checkboxes in the table
-  if ($('td input:checkbox', this).length == 0) {
+  if ($('td input:checkbox', this).size() == 0) {
     return;
   }
 
diff --git a/core/modules/block/block.js b/core/modules/block/block.js
index 72b5673..6d2c33f 100644
--- a/core/modules/block/block.js
+++ b/core/modules/block/block.js
@@ -153,7 +153,7 @@ Drupal.behaviors.blockDrag = {
           }
         }
         // This region has become empty.
-        if ($(this).next('tr').is(':not(.draggable)') || $(this).next('tr').length == 0) {
+        if ($(this).next('tr').is(':not(.draggable)') || $(this).next('tr').size() == 0) {
           $(this).removeClass('region-populated').addClass('region-empty');
         }
         // This region has become populated.
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 70218a5..37f1c05 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -2149,26 +2149,24 @@ function template_preprocess_comment(&$variables) {
   else {
     $variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published';
   }
-
   // Gather comment classes.
-  // 'comment-published' class is not needed, it is either 'comment-preview' or
-  // 'comment-unpublished'.
-  if ($variables['status'] != 'comment-published') {
-    $variables['classes_array'][] = $variables['status'];
-  }
-  if ($variables['new']) {
-    $variables['classes_array'][] = 'comment-new';
-  }
-  if (!$comment->uid) {
+  if ($comment->uid == 0) {
     $variables['classes_array'][] = 'comment-by-anonymous';
   }
   else {
-    if ($comment->uid == $variables['node']->uid) {
+    // Published class is not needed. It is either 'comment-preview' or 'comment-unpublished'.
+    if ($variables['status'] != 'comment-published') {
+      $variables['classes_array'][] = $variables['status'];
+    }
+    if ($comment->uid === $variables['node']->uid) {
       $variables['classes_array'][] = 'comment-by-node-author';
     }
-    if ($comment->uid == $variables['user']->uid) {
+    if ($comment->uid === $variables['user']->uid) {
       $variables['classes_array'][] = 'comment-by-viewer';
     }
+    if ($variables['new']) {
+      $variables['classes_array'][] = 'comment-new';
+    }
   }
 }
 
diff --git a/core/modules/comment/comment.test b/core/modules/comment/comment.test
index dd74d13..9a77853 100644
--- a/core/modules/comment/comment.test
+++ b/core/modules/comment/comment.test
@@ -291,6 +291,8 @@ class CommentInterfaceTest extends CommentHelperCase {
     $comment = $this->postComment($this->node, $comment_text);
     $comment_loaded = comment_load($comment->id);
     $this->assertTrue($this->commentExists($comment), t('Comment found.'));
+    $by_viewer_class = $this->xpath('//a[@id=:comment_id]/following-sibling::div[1][contains(@class, "comment-by-viewer")]', array(':comment_id' => 'comment-' . $comment->id));
+    $this->assertTrue(!empty($by_viewer_class), t('HTML class for comments by viewer found.'));
 
     // Set comments to have subject and preview to required.
     $this->drupalLogout();
@@ -377,6 +379,11 @@ class CommentInterfaceTest extends CommentHelperCase {
     $this->assertTrue($this->commentExists($reply, TRUE), t('Page two exists. %s'));
     $this->setCommentsPerPage(50);
 
+    // Create comment #5 to assert HTML class.
+    $comment = $this->postComment($this->node, $this->randomName(), $this->randomName());
+    $by_node_author_class = $this->xpath('//a[@id=:comment_id]/following-sibling::div[1][contains(@class, "comment-by-node-author")]', array(':comment_id' => 'comment-' . $comment->id));
+    $this->assertTrue(!empty($by_node_author_class), t('HTML class for node author found.'));
+
     // Attempt to post to node with comments disabled.
     $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_HIDDEN));
     $this->assertTrue($this->node, t('Article node created.'));
@@ -476,111 +483,6 @@ class CommentInterfaceTest extends CommentHelperCase {
   }
 
   /**
-   * Tests CSS classes on comments.
-   */
-  function testCommentClasses() {
-    // Create all permutations for comments, users, and nodes.
-    $parameters = array(
-      'node_uid' => array(0, $this->web_user->uid),
-      'comment_uid' => array(0, $this->web_user->uid, $this->admin_user->uid),
-      'comment_status' => array(COMMENT_PUBLISHED, COMMENT_NOT_PUBLISHED),
-      'user' => array('anonymous', 'authenticated', 'admin'),
-    );
-    $permutations = $this->generatePermutations($parameters);
-
-    foreach ($permutations as $case) {
-      // Create a new node.
-      $node = $this->drupalCreateNode(array('type' => 'article', 'uid' => $case['node_uid']));
-
-      // Add a comment.
-      $comment = entity_create('comment', array(
-        'nid' => $node->nid,
-        'uid' => $case['comment_uid'],
-        'status' => $case['comment_status'],
-        'subject' => $this->randomName(),
-        'language' => LANGUAGE_NONE,
-        'comment_body' => array(LANGUAGE_NONE => array($this->randomName())),
-      ));
-      comment_save($comment);
-
-      // Adjust the current/viewing user.
-      switch ($case['user']) {
-        case 'anonymous':
-          $this->drupalLogout();
-          $case['user_uid'] = 0;
-          break;
-
-        case 'authenticated':
-          $this->drupalLogin($this->web_user);
-          $case['user_uid'] = $this->web_user->uid;
-          break;
-
-        case 'admin':
-          $this->drupalLogin($this->admin_user);
-          $case['user_uid'] = $this->admin_user->uid;
-          break;
-      }
-      // Request the node with the comment.
-      $this->drupalGet('node/' . $node->nid);
-
-      // Verify classes if the comment is visible for the current user.
-      if ($case['comment_status'] == COMMENT_PUBLISHED || $case['user'] == 'admin') {
-        // Verify the comment-by-anonymous class.
-        $comments = $this->xpath('//*[contains(@class, "comment-by-anonymous")]');
-        if ($case['comment_uid'] == 0) {
-          $this->assertTrue(count($comments) == 1, 'comment-by-anonymous class found.');
-        }
-        else {
-          $this->assertFalse(count($comments), 'comment-by-anonymous class not found.');
-        }
-
-        // Verify the comment-by-node-author class.
-        $comments = $this->xpath('//*[contains(@class, "comment-by-node-author")]');
-        if ($case['comment_uid'] > 0 && $case['comment_uid'] == $case['node_uid']) {
-          $this->assertTrue(count($comments) == 1, 'comment-by-node-author class found.');
-        }
-        else {
-          $this->assertFalse(count($comments), 'comment-by-node-author class not found.');
-        }
-
-        // Verify the comment-by-viewer class.
-        $comments = $this->xpath('//*[contains(@class, "comment-by-viewer")]');
-        if ($case['comment_uid'] > 0 && $case['comment_uid'] == $case['user_uid']) {
-          $this->assertTrue(count($comments) == 1, 'comment-by-viewer class found.');
-        }
-        else {
-          $this->assertFalse(count($comments), 'comment-by-viewer class not found.');
-        }
-      }
-
-      // Verify the comment-unpublished class.
-      $comments = $this->xpath('//*[contains(@class, "comment-unpublished")]');
-      if ($case['comment_status'] == COMMENT_NOT_PUBLISHED && $case['user'] == 'admin') {
-        $this->assertTrue(count($comments) == 1, 'comment-unpublished class found.');
-      }
-      else {
-        $this->assertFalse(count($comments), 'comment-unpublished class not found.');
-      }
-
-      // Verify the comment-new class.
-      if ($case['comment_status'] == COMMENT_PUBLISHED || $case['user'] == 'admin') {
-        $comments = $this->xpath('//*[contains(@class, "comment-new")]');
-        if ($case['user'] != 'anonymous') {
-          $this->assertTrue(count($comments) == 1, 'comment-new class found.');
-
-          // Request the node again. The comment-new class should disappear.
-          $this->drupalGet('node/' . $node->nid);
-          $comments = $this->xpath('//*[contains(@class, "comment-new")]');
-          $this->assertFalse(count($comments), 'comment-new class not found.');
-        }
-        else {
-          $this->assertFalse(count($comments), 'comment-new class not found.');
-        }
-      }
-    }
-  }
-
-  /**
    * Tests the node comment statistics.
    */
   function testCommentNodeCommentStatistics() {
@@ -1080,6 +982,8 @@ class CommentAnonymous extends CommentHelperCase {
     // Post anonymous comment without contact info.
     $anonymous_comment1 = $this->postComment($this->node, $this->randomName(), $this->randomName());
     $this->assertTrue($this->commentExists($anonymous_comment1), t('Anonymous comment without contact info found.'));
+    $anonymous_class = $this->xpath('//a[@id=:comment_id]/following-sibling::div[1][contains(@class, "comment-by-anonymous")]', array(':comment_id' => 'comment-' . $anonymous_comment1->id));
+    $this->assertTrue(!empty($anonymous_class), t('HTML class for anonymous comments found.'));
 
     // Allow contact info.
     $this->drupalLogin($this->admin_user);
diff --git a/core/modules/field/field.info.inc b/core/modules/field/field.info.inc
index d2d021e..af7d93d 100644
--- a/core/modules/field/field.info.inc
+++ b/core/modules/field/field.info.inc
@@ -617,9 +617,8 @@ function field_info_fields() {
  *
  * @param $field_name
  *   The name of the field to retrieve. $field_name can only refer to a
- *   non-deleted, active field. For deleted fields, use
- *   field_info_field_by_id(). To retrieve information about inactive fields,
- *   use field_read_fields().
+ *   non-deleted, active field. Use field_read_fields() to retrieve information
+ *   on deleted or inactive fields.
  *
  * @return
  *   The field array, as returned by field_read_fields(), with an
@@ -640,7 +639,7 @@ function field_info_field($field_name) {
  *
  * @param $field_id
  *   The id of the field to retrieve. $field_id can refer to a
- *   deleted field, but not an inactive one.
+ *   deleted field.
  *
  * @return
  *   The field array, as returned by field_read_fields(), with an
diff --git a/core/modules/file/file.js b/core/modules/file/file.js
index 8113170..37419fd 100644
--- a/core/modules/file/file.js
+++ b/core/modules/file/file.js
@@ -96,7 +96,7 @@ Drupal.file = Drupal.file || {
 
     // Check if we're working with an "Upload" button.
     var $enabledFields = [];
-    if ($(this).closest('div.form-managed-file').length > 0) {
+    if ($(this).closest('div.form-managed-file').size() > 0) {
       $enabledFields = $(this).closest('div.form-managed-file').find('input.form-file');
     }
 
@@ -120,7 +120,7 @@ Drupal.file = Drupal.file || {
   progressBar: function (event) {
     var clickedButton = this;
     var $progressId = $(clickedButton).closest('div.form-managed-file').find('input.file-progress');
-    if ($progressId.length) {
+    if ($progressId.size()) {
       var originalName = $progressId.attr('name');
 
       // Replace the name with the required identifier.
diff --git a/core/modules/menu/menu.admin.js b/core/modules/menu/menu.admin.js
index 4fa094e..15bc2e7 100644
--- a/core/modules/menu/menu.admin.js
+++ b/core/modules/menu/menu.admin.js
@@ -1,46 +1,47 @@
+
 (function ($) {
 
-Drupal.behaviors.menuChangeParentItems = {
-  attach: function (context, settings) {
-    $('fieldset#edit-menu input').each(function () {
-      $(this).change(function () {
-        // Update list of available parent menu items.
-        Drupal.menu_update_parent_list();
+  Drupal.behaviors.menuChangeParentItems = {
+    attach: function (context, settings) {
+      $('fieldset#edit-menu input').each(function () {
+        $(this).change(function () {
+          // Update list of available parent menu items.
+          Drupal.menu_update_parent_list();
+        });
       });
-    });
+    }
   }
-};
 
-/**
- * Function to set the options of the menu parent item dropdown.
- */
-Drupal.menu_update_parent_list = function () {
-  var values = [];
+  /**
+   * Function to set the options of the menu parent item dropdown.
+   */
+  Drupal.menu_update_parent_list = function () {
+    var values = [];
 
-  $('input:checked', $('fieldset#edit-menu')).each(function () {
-    // Get the names of all checked menus.
-    values.push(Drupal.checkPlain($.trim($(this).val())));
-  });
+    $('input:checked', $('fieldset#edit-menu')).each(function () {
+      // Get the names of all checked menus.
+      values.push(Drupal.checkPlain($.trim($(this).val())));
+    });
 
-  var url = Drupal.settings.basePath + 'admin/structure/menu/parents';
-  $.ajax({
-    url: location.protocol + '//' + location.host + url,
-    type: 'POST',
-    data: {'menus[]' : values},
-    dataType: 'json',
-    success: function (options) {
-      // Save key of last selected element.
-      var selected = $('fieldset#edit-menu #edit-menu-parent :selected').val();
-      // Remove all exisiting options from dropdown.
-      $('fieldset#edit-menu #edit-menu-parent').children().remove();
-      // Add new options to dropdown.
-      jQuery.each(options, function(index, value) {
-        $('fieldset#edit-menu #edit-menu-parent').append(
-          $('<option ' + (index == selected ? ' selected="selected"' : '') + '></option>').val(index).text(value)
-        );
-      });
-    }
-  });
-};
+    var url = Drupal.settings.basePath + 'admin/structure/menu/parents';
+    $.ajax({
+      url: location.protocol + '//' + location.host + url,
+      type: 'POST',
+      data: {'menus[]' : values},
+      dataType: 'json',
+      success: function (options) {
+        // Save key of last selected element.
+        var selected = $('fieldset#edit-menu #edit-menu-parent :selected').val();
+        // Remove all exisiting options from dropdown.
+        $('fieldset#edit-menu #edit-menu-parent').children().remove();
+        // Add new options to dropdown.
+        jQuery.each(options, function(index, value) {
+          $('fieldset#edit-menu #edit-menu-parent').append(
+            $('<option ' + (index == selected ? ' selected="selected"' : '') + '></option>').val(index).text(value)
+          );
+        });
+      }
+    });
+  }
 
 })(jQuery);
diff --git a/core/modules/menu/menu.js b/core/modules/menu/menu.js
index ff4ef1e..40c1bfe 100644
--- a/core/modules/menu/menu.js
+++ b/core/modules/menu/menu.js
@@ -1,3 +1,4 @@
+
 (function ($) {
 
 Drupal.behaviors.menuFieldsetSummaries = {
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 93f0ddc..f2a9612 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -1448,7 +1448,7 @@ function node_build_content($node, $view_mode = 'full', $langcode = NULL) {
  *   viewed.
  *
  * @return
- *   A $page element suitable for use by drupal_render().
+ *   A $page element suitable for use by drupal_page_render().
  *
  * @see node_menu()
  */
diff --git a/core/modules/node/tests/node_access_test.module b/core/modules/node/tests/node_access_test.module
index c17f07e..f946573 100644
--- a/core/modules/node/tests/node_access_test.module
+++ b/core/modules/node/tests/node_access_test.module
@@ -167,7 +167,7 @@ function node_access_entity_test_page() {
 }
 
 /**
- * Implements hook_form_BASE_FORM_ID_alter().
+ * Implements hook_form_node_form_alter().
  */
 function node_access_test_form_node_form_alter(&$form, $form_state) {
   // Only show this checkbox for NodeAccessBaseTableTestCase.
diff --git a/core/modules/openid/openid.js b/core/modules/openid/openid.js
index 4a09e5a..fdc97fa 100644
--- a/core/modules/openid/openid.js
+++ b/core/modules/openid/openid.js
@@ -7,7 +7,7 @@ Drupal.behaviors.openid = {
     var cookie = $.cookie('Drupal.visitor.openid_identifier');
 
     // This behavior attaches by ID, so is only valid once on a page.
-    if (!$('#edit-openid-identifier.openid-processed').length) {
+    if (!$('#edit-openid-identifier.openid-processed').size()) {
       if (cookie) {
         $('#edit-openid-identifier').val(cookie);
       }
diff --git a/core/modules/poll/poll-bar--block.tpl.php b/core/modules/poll/poll-bar--block.tpl.php
new file mode 100644
index 0000000..3b91afc
--- /dev/null
+++ b/core/modules/poll/poll-bar--block.tpl.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display the bar for a single choice in a
+ * poll.
+ *
+ * Variables available:
+ * - $title: The title of the poll.
+ * - $votes: The number of votes for this choice
+ * - $total_votes: The number of votes for this choice
+ * - $percentage: The percentage of votes for this choice.
+ * - $vote: The choice number of the current user's vote.
+ * - $voted: Set to TRUE if the user voted for this choice.
+ *
+ * @see template_preprocess_poll_bar()
+ */
+?>
+
+<div class="text"><?php print $title; ?></div>
+<div class="bar">
+  <div style="width: <?php print $percentage; ?>%;" class="foreground"></div>
+</div>
+<div class="percent">
+  <?php print $percentage; ?>%
+</div>
diff --git a/core/modules/poll/poll-bar.tpl.php b/core/modules/poll/poll-bar.tpl.php
new file mode 100644
index 0000000..9426ff5
--- /dev/null
+++ b/core/modules/poll/poll-bar.tpl.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display the bar for a single choice in a
+ * poll.
+ *
+ * Variables available:
+ * - $title: The title of the poll.
+ * - $votes: The number of votes for this choice
+ * - $total_votes: The number of votes for this choice
+ * - $percentage: The percentage of votes for this choice.
+ * - $vote: The choice number of the current user's vote.
+ * - $voted: Set to TRUE if the user voted for this choice.
+ *
+ * @see template_preprocess_poll_bar()
+ */
+?>
+
+<div class="text"><?php print $title; ?></div>
+<div class="bar">
+  <div style="width: <?php print $percentage; ?>%;" class="foreground"></div>
+</div>
+<div class="percent">
+  <?php print $percentage; ?>% (<?php print format_plural($votes, '1 vote', '@count votes'); ?>)
+</div>
diff --git a/core/modules/poll/poll-results.tpl.php b/core/modules/poll/poll-results--block.tpl.php
similarity index 60%
copy from core/modules/poll/poll-results.tpl.php
copy to core/modules/poll/poll-results--block.tpl.php
index bb4cee3..f8387f5 100644
--- a/core/modules/poll/poll-results.tpl.php
+++ b/core/modules/poll/poll-results--block.tpl.php
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * @file
  * Default theme implementation to display the poll results in a block.
@@ -11,24 +10,19 @@
  * - $links: Links in the poll.
  * - $nid: The nid of the poll
  * - $cancel_form: A form to cancel the user's vote, if allowed.
- * - $raw_links: The raw array of links.
+ * - $raw_links: The raw array of links. Should be run through theme('links')
+ *   if used.
  * - $vote: The choice number of the current user's vote.
  *
  * @see template_preprocess_poll_results()
  */
 ?>
-<article class="poll">
-  <?php if ($block): ?>
-    <h3 class="poll-title"><?php print $title; ?></h3>
-  <?php endif; ?>
-  <?php print $results; ?>
+
+<div class="poll">
+  <div class="title"><?php print $title ?></div>
+  <?php print $results ?>
   <div class="total">
     <?php print t('Total votes: @votes', array('@votes' => $votes)); ?>
   </div>
-  <?php if (!empty($cancel_form)): ?>
-    <?php print $cancel_form; ?>
-  <?php endif; ?>
-</article>
-<?php if ($block): ?>
-  <div class="links"><?php print $links; ?></div>
-<?php endif; ?>
+</div>
+<div class="links"><?php print $links; ?></div>
diff --git a/core/modules/poll/poll-results.tpl.php b/core/modules/poll/poll-results.tpl.php
index bb4cee3..5e14dec 100644
--- a/core/modules/poll/poll-results.tpl.php
+++ b/core/modules/poll/poll-results.tpl.php
@@ -17,10 +17,7 @@
  * @see template_preprocess_poll_results()
  */
 ?>
-<article class="poll">
-  <?php if ($block): ?>
-    <h3 class="poll-title"><?php print $title; ?></h3>
-  <?php endif; ?>
+<div class="poll">
   <?php print $results; ?>
   <div class="total">
     <?php print t('Total votes: @votes', array('@votes' => $votes)); ?>
@@ -28,7 +25,4 @@
   <?php if (!empty($cancel_form)): ?>
     <?php print $cancel_form; ?>
   <?php endif; ?>
-</article>
-<?php if ($block): ?>
-  <div class="links"><?php print $links; ?></div>
-<?php endif; ?>
+</div>
diff --git a/core/modules/poll/poll-rtl.css b/core/modules/poll/poll-rtl.css
index 1d215d7..14d42e6 100644
--- a/core/modules/poll/poll-rtl.css
+++ b/core/modules/poll/poll-rtl.css
@@ -5,6 +5,6 @@
 .poll .percent {
   text-align: left;
 }
-.poll .vote-form {
+.poll .vote-form .choices {
   text-align: right;
 }
diff --git a/core/modules/poll/poll-vote.tpl.php b/core/modules/poll/poll-vote.tpl.php
index a749f91..068ff7c 100644
--- a/core/modules/poll/poll-vote.tpl.php
+++ b/core/modules/poll/poll-vote.tpl.php
@@ -14,16 +14,16 @@
  * @see template_preprocess_poll_vote()
  */
 ?>
-<article class="poll">
+<div class="poll">
   <div class="vote-form">
-
-    <?php if ($block): ?>
-      <h3 class="poll-title"><?php print $title; ?></h3>
-    <?php endif; ?>
-    <?php print $choice; ?>
-
+    <div class="choices">
+      <?php if ($block): ?>
+        <div class="title"><?php print $title; ?></div>
+      <?php endif; ?>
+      <?php print $choice; ?>
+    </div>
     <?php print $vote; ?>
   </div>
   <?php // This is the 'rest' of the form, in case items have been added. ?>
   <?php print $rest ?>
-</article>
+</div>
diff --git a/core/modules/poll/poll.css b/core/modules/poll/poll.css
index 6abcaf5..8b04e38 100644
--- a/core/modules/poll/poll.css
+++ b/core/modules/poll/poll.css
@@ -24,10 +24,12 @@
 .poll .vote-form {
   text-align: center;
 }
-.poll .vote-form {
+.poll .vote-form .choices {
   text-align: left; /* LTR */
+  margin: 0 auto;
+  display: table;
 }
-.poll .vote-form .poll-title {
+.poll .vote-form .choices .title {
   font-weight: bold;
 }
 .node-form #edit-poll-more {
diff --git a/core/modules/poll/poll.module b/core/modules/poll/poll.module
index 8862308..40a481a 100644
--- a/core/modules/poll/poll.module
+++ b/core/modules/poll/poll.module
@@ -42,8 +42,25 @@ function poll_theme() {
       'template' => 'poll-results',
       'variables' => array('raw_title' => NULL, 'results' => NULL, 'votes' => NULL, 'raw_links' => NULL, 'block' => NULL, 'nid' => NULL, 'vote' => NULL),
     ),
+    'poll_bar' => array(
+      'template' => 'poll-bar',
+      'variables' => array('title' => NULL, 'votes' => NULL, 'total_votes' => NULL, 'vote' => NULL, 'block' => NULL),
+    ),
+  );
+  // The theme system automatically discovers the theme's functions and
+  // templates that implement more targeted "suggestions" of generic theme
+  // hooks. But suggestions implemented by a module must be explicitly
+  // registered.
+  $theme_hooks += array(
+    'poll_results__block' => array(
+      'template' => 'poll-results--block',
+      'variables' => $theme_hooks['poll_results']['variables'],
+    ),
+    'poll_bar__block' => array(
+      'template' => 'poll-bar--block',
+      'variables' => $theme_hooks['poll_bar']['variables'],
+    ),
   );
-
   return $theme_hooks;
 }
 
@@ -815,25 +832,15 @@ function poll_view_results($node, $view_mode, $block = FALSE) {
     }
   }
 
-  $poll_results = array();
+  $poll_results = '';
   foreach ($node->choice as $i => $choice) {
-    $chvotes = isset($choice['chvotes']) ? $choice['chvotes'] : NULL;
-    $percentage = round($chvotes * 100 / max($total_votes, 1));
-    $display_votes = !$block ? ' (' . format_plural($chvotes, '1 vote', '@count votes') . ')' : '';
-
-    $poll_results[] = array(
-      '#theme' => 'meter',
-      '#prefix' => '<div class="choice-title">' . check_plain($choice['chtext']) . '</div>',
-      '#display_value' =>  t('!percentage%', array('!percentage' => $percentage)) . $display_votes,
-      '#min' => 0,
-      '#max' => $total_votes,
-      '#value' => $chvotes,
-      '#percentage' => $percentage,
-      '#attributes' => array('class' => 'bar'),
-    );
+    if (!empty($choice['chtext'])) {
+      $chvotes = isset($choice['chvotes']) ? $choice['chvotes'] : NULL;
+      $poll_results .= theme('poll_bar', array('title' => $choice['chtext'], 'votes' => $chvotes, 'total_votes' => $total_votes, 'vote' => isset($node->vote) && $node->vote == $i, 'block' => $block));
+    }
   }
 
-  return theme('poll_results', array('raw_title' => $node->title, 'results' => drupal_render($poll_results), 'votes' => $total_votes, 'raw_links' => isset($node->links) ? $node->links : array(), 'block' => $block, 'nid' => $node->nid, 'vote' => isset($node->vote) ? $node->vote : NULL));
+  return theme('poll_results', array('raw_title' => $node->title, 'results' => $poll_results, 'votes' => $total_votes, 'raw_links' => isset($node->links) ? $node->links : array(), 'block' => $block, 'nid' => $node->nid, 'vote' => isset($node->vote) ? $node->vote : NULL));
 }
 
 
@@ -910,6 +917,27 @@ function template_preprocess_poll_results(&$variables) {
     $variables['cancel_form'] = drupal_render($elements);
   }
   $variables['title'] = check_plain($variables['raw_title']);
+
+  if ($variables['block']) {
+    $variables['theme_hook_suggestions'][] = 'poll_results__block';
+  }
+}
+
+/**
+ * Preprocess the poll_bar theme hook.
+ *
+ * Inputs: $title, $votes, $total_votes, $voted, $block
+ *
+ * @see poll-bar.tpl.php
+ * @see poll-bar--block.tpl.php
+ * @see theme_poll_bar()
+ */
+function template_preprocess_poll_bar(&$variables) {
+  if ($variables['block']) {
+    $variables['theme_hook_suggestions'][] = 'poll_bar__block';
+  }
+  $variables['title'] = check_plain($variables['title']);
+  $variables['percentage'] = round($variables['votes'] * 100 / max($variables['total_votes'], 1));
 }
 
 /**
diff --git a/core/modules/poll/poll.test b/core/modules/poll/poll.test
index 78af995..3fad677 100644
--- a/core/modules/poll/poll.test
+++ b/core/modules/poll/poll.test
@@ -228,10 +228,10 @@ class PollCreateTestCase extends PollTestCase {
     $this->clickLink($title);
     $this->assertText($new_option, 'New option found.');
 
-    $option = $this->xpath('//div[@id="node-1"]//article[@class="poll"]//div[@class="choice-title"]');
+    $option = $this->xpath('//div[@id="node-1"]//div[@class="poll"]//div[@class="text"]');
     $this->assertEqual(end($option), $new_option, 'Last item is equal to new option.');
 
-    $votes = $this->xpath('//div[@id="node-1"]//article[@class="poll"]//div[@class="percent"]');
+    $votes = $this->xpath('//div[@id="node-1"]//div[@class="poll"]//div[@class="percent"]');
     $this->assertTrue(strpos(end($votes), $vote_count) > 0, t("Votes saved."));
   }
 
diff --git a/core/modules/search/search-rtl.css b/core/modules/search/search-rtl.css
new file mode 100644
index 0000000..da9e8d9
--- /dev/null
+++ b/core/modules/search/search-rtl.css
@@ -0,0 +1,13 @@
+
+.search-advanced .criterion {
+  float: right;
+  margin-right: 0;
+  margin-left: 2em;
+}
+.search-advanced .action {
+  float: right;
+  clear: right;
+}
+.search-results .search-snippet-info {
+  padding-right: 1em; /* LTR */
+}
\ No newline at end of file
diff --git a/core/modules/search/search.css b/core/modules/search/search.css
new file mode 100644
index 0000000..ff7230f
--- /dev/null
+++ b/core/modules/search/search.css
@@ -0,0 +1,34 @@
+
+.search-form {
+  margin-bottom: 1em;
+}
+.search-form input {
+  margin-top: 0;
+  margin-bottom: 0;
+}
+.search-results {
+  list-style: none;
+}
+.search-results p {
+  margin-top: 0;
+}
+.search-results .title {
+  font-size: 1.2em;
+}
+.search-results li {
+  margin-bottom: 1em;
+}
+.search-results .search-snippet-info {
+  padding-left: 1em; /* LTR */
+}
+.search-results .search-info {
+  font-size: 0.85em;
+}
+.search-advanced .criterion {
+  float: left; /* LTR */
+  margin-right: 2em; /* LTR */
+}
+.search-advanced .action {
+  float: left; /* LTR */
+  clear: left; /* LTR */
+}
diff --git a/core/modules/search/search.info b/core/modules/search/search.info
index 1d47c96..d8d7baa 100644
--- a/core/modules/search/search.info
+++ b/core/modules/search/search.info
@@ -6,4 +6,4 @@ core = 8.x
 files[] = search.extender.inc
 files[] = search.test
 configure = admin/config/search/settings
-stylesheets[all][] = search.theme.css
+stylesheets[all][] = search.css
diff --git a/core/modules/shortcut/shortcut.admin.js b/core/modules/shortcut/shortcut.admin.js
index 6ec3e28..0d0e9f4 100644
--- a/core/modules/shortcut/shortcut.admin.js
+++ b/core/modules/shortcut/shortcut.admin.js
@@ -82,7 +82,7 @@ Drupal.behaviors.shortcutDrag = {
         var statusName = statusRow.className.replace(/([^ ]+[ ]+)*shortcut-status-([^ ]+)([ ]+[^ ]+)*/, '$2');
         var statusField = $('select.shortcut-status-select', rowObject.element);
         statusField.val(statusName);
-      }
+      };
 
       tableDrag.restripeTable = function () {
         // :even and :odd are reversed because jQuery counts from 0 and
diff --git a/core/modules/simpletest/simpletest.info b/core/modules/simpletest/simpletest.info
index bbe65f0..8faf836 100644
--- a/core/modules/simpletest/simpletest.info
+++ b/core/modules/simpletest/simpletest.info
@@ -29,6 +29,7 @@ files[] = tests/module.test
 files[] = tests/password.test
 files[] = tests/path.test
 files[] = tests/registry.test
+files[] = tests/request.test
 files[] = tests/schema.test
 files[] = tests/session.test
 files[] = tests/symfony.test
diff --git a/core/modules/simpletest/simpletest.js b/core/modules/simpletest/simpletest.js
index 9cab261..4933452 100644
--- a/core/modules/simpletest/simpletest.js
+++ b/core/modules/simpletest/simpletest.js
@@ -16,7 +16,7 @@ Drupal.behaviors.simpleTestMenuCollapse = {
     $('div.simpletest-image').click(function () {
       var trs = $(this).closest('tbody').children('.' + settings.simpleTest[this.id].testClass);
       var direction = settings.simpleTest[this.id].imageDirection;
-      var row = direction ? trs.length - 1 : 0;
+      var row = direction ? trs.size() - 1 : 0;
 
       // If clicked in the middle of expanding a group, stop so we can switch directions.
       if (timeout) {
@@ -35,7 +35,7 @@ Drupal.behaviors.simpleTestMenuCollapse = {
           }
         }
         else {
-          if (row < trs.length) {
+          if (row < trs.size()) {
             $(trs[row]).removeClass('js-hide').show();
             row++;
             timeout = setTimeout(rowToggle, 20);
diff --git a/core/modules/simpletest/tests/common.test b/core/modules/simpletest/tests/common.test
index d6f19c7..396e600 100644
--- a/core/modules/simpletest/tests/common.test
+++ b/core/modules/simpletest/tests/common.test
@@ -2394,14 +2394,6 @@ class CommonFormatDateTestCase extends DrupalWebTestCase {
     $this->assertIdentical(format_date($timestamp, 'medium'), '25. marzo 2007 - 17:00', t('Test medium date format.'));
     $this->assertIdentical(format_date($timestamp, 'short'), '2007 Mar 25 - 5:00pm', t('Test short date format.'));
     $this->assertIdentical(format_date($timestamp), '25. marzo 2007 - 17:00', t('Test default date format.'));
-    // Test HTML time element formats.
-    $this->assertIdentical(format_date($timestamp, 'html_datetime'), '2007-03-25T17:00:00-0700', t('Test html_datetime date format.'));
-    $this->assertIdentical(format_date($timestamp, 'html_date'), '2007-03-25', t('Test html_date date format.'));
-    $this->assertIdentical(format_date($timestamp, 'html_time'), '17:00:00', t('Test html_time date format.'));
-    $this->assertIdentical(format_date($timestamp, 'html_yearless_date'), '03-25', t('Test html_yearless_date date format.'));
-    $this->assertIdentical(format_date($timestamp, 'html_week'), '2007-W12', t('Test html_week date format.'));
-    $this->assertIdentical(format_date($timestamp, 'html_month'), '2007-03', t('Test html_month date format.'));
-    $this->assertIdentical(format_date($timestamp, 'html_year'), '2007', t('Test html_year date format.'));
 
     // Restore the original user and language, and enable session saving.
     $user = $real_user;
diff --git a/core/modules/simpletest/tests/form_test.module b/core/modules/simpletest/tests/form_test.module
index e1e2435..28ba566 100644
--- a/core/modules/simpletest/tests/form_test.module
+++ b/core/modules/simpletest/tests/form_test.module
@@ -1526,7 +1526,7 @@ function form_test_clicked_button($form, &$form_state) {
   // 'image_button', and a 'button' with #access=FALSE. This enables form.test
   // to test a variety of combinations.
   $i=0;
-  $args = array_slice(arg(), 2);
+  $args = array_slice(request()->pathElements(), 2);
   foreach ($args as $arg) {
     $name = 'button' . ++$i;
     // 's', 'b', or 'i' in the argument define the button type wanted.
diff --git a/core/modules/simpletest/tests/request.test b/core/modules/simpletest/tests/request.test
new file mode 100644
index 0000000..93e215d
--- /dev/null
+++ b/core/modules/simpletest/tests/request.test
@@ -0,0 +1,92 @@
+<?php
+
+/**
+ * @file
+ * Tests for the request object.
+ */
+
+use Drupal\Core\Request;
+
+/**
+ * Unit tests for the Request object.
+ */
+class RequestUnitTest extends DrupalUnitTestCase {
+  protected $testPath = 'foo/bar';
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Request',
+      'description' => 'Tests for request information',
+      'group' => 'Request',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp();
+
+    require_once DRUPAL_ROOT . '/core/lib/Drupal/Core/Request.php';
+
+    // This unfortunately necessary because Drupal's registry throws a database
+    // exception when testing class_exist on non-existent classes in unit tests.
+    // This is the point of one of our tests so we have to remove the registry
+    // prior to running our tests.
+    spl_autoload_unregister('drupal_autoload_class');
+    spl_autoload_unregister('drupal_autoload_interface');
+  }
+
+  public function tearDown() {
+    // Re-register drupal's autoload classes. See setUp for the reasoning.
+    spl_autoload_register('drupal_autoload_class');
+    spl_autoload_register('drupal_autoload_interface');
+
+    parent::tearDown();
+  }
+
+  /**
+   * Test the request path logic.
+   */
+  function testRequestPathFromPath() {
+    $request = Request::create('/' . $this->testPath);
+
+    $this->assertEqual($request->requestPath(), $this->testPath, t('Correct request path derived from path.'));
+  }
+
+  /**
+   * Test the request path logic.
+   */
+  function testRequestPathFromQuery() {
+    $request = Request::create('index.php', 'GET', array('q' => $this->testPath));
+
+    $this->assertEqual($request->requestPath(), $this->testPath, t('Correct request path derived from arguments.'));
+  }
+
+  /**
+   * Test the path fragment logic.
+   */
+  function testPathFragment() {
+    $request = Request::create('/' . $this->testPath);
+
+    $this->assertEqual($request->pathElement(0), 'foo', t('Correct first path element returned.'));
+    $this->assertEqual($request->pathElement(1), 'bar', t('Correct second path element returned.'));
+    $this->assertNull($request->pathElement(2), t('Null returned for non-existent path element.'));
+  }
+
+  /**
+   * Test the path fragment logic.
+   */
+  function testPathFragments() {
+    $request = Request::create('/' . $this->testPath);
+
+    $elements = $request->pathElements();
+
+    $this->assertEqual($elements[0], 'foo', t('Correct first path element returned.'));
+    $this->assertEqual($elements[1], 'bar', t('Correct second path element returned.'));
+    $this->assertTrue(empty($elements[2]), t('Null returned for non-existent path element.'));
+  }
+
+
+  // System path cannot be unit tested, because it relies on the database.
+  // @TODO: Add a unit test here once the path logic becomes an object and can
+  // be mocked.
+
+}
diff --git a/core/modules/simpletest/tests/theme.test b/core/modules/simpletest/tests/theme.test
index 21a69bd..9870545 100644
--- a/core/modules/simpletest/tests/theme.test
+++ b/core/modules/simpletest/tests/theme.test
@@ -592,65 +592,3 @@ class ThemeRegistryTestCase extends DrupalWebTestCase {
     $this->assertTrue($registry['theme_test_template_test_2'], 'Offset was returned correctly from the theme registry');
   }
 }
-
-/**
- * Tests for theme_datetime().
- */
-class ThemeDatetime extends DrupalWebTestCase {
-  protected $profile = 'testing';
-
-  public static function getInfo() {
-    return array(
-      'name' => 'Theme Datetime',
-      'description' => 'Test the theme_datetime() function.',
-      'group' => 'Theme',
-    );
-  }
-
-  /**
-   * Test function theme_datetime().
-   */
-  function testThemeDatetime() {
-    // Create timestamp and formatted date for testing.
-    $timestamp = 280281600;
-    $date = format_date($timestamp);
-
-    // Test with timestamp.
-    $variables = array(
-      'timestamp' => $timestamp,
-    );
-    $this->assertEqual('<time datetime="1978-11-19T00:00:00+0000">' . $date . '</time>', theme('datetime', $variables));
-
-    // Test with text and timestamp.
-    $variables = array(
-      'timestamp' => $timestamp,
-      'text' => "Dries' birthday",
-    );
-    $this->assertEqual('<time datetime="1978-11-19T00:00:00+0000">Dries&#039; birthday</time>', theme('datetime', $variables));
-
-    // Test with datetime attribute.
-    $variables = array(
-      'attributes' => array(
-        'datetime' => '1978-11-19',
-      ),
-    );
-    $this->assertEqual('<time datetime="1978-11-19">1978-11-19</time>', theme('datetime', $variables));
-
-    // Test with text and datetime attribute.
-    $variables = array(
-      'text' => "Dries' birthday",
-      'attributes' => array(
-        'datetime' => '1978-11-19',
-      ),
-    );
-    $this->assertEqual('<time datetime="1978-11-19">Dries&#039; birthday</time>', theme('datetime', $variables));
-
-    // Test with HTML text.
-    $variables = array(
-      'timestamp' => $timestamp,
-      'text' => "<span>Dries' birthday</span>",
-      'html' => TRUE,
-    );
-    $this->assertEqual('<time datetime="1978-11-19T00:00:00+0000"><span>Dries\' birthday</span></time>', theme('datetime', $variables));
-  }
-}
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 34df7ba..5b95ccf 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -609,11 +609,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) {
  * @endcode
  * This 'abc' object will then be passed into the callback functions defined
  * for the menu item, such as the page callback function mymodule_abc_edit()
- * to replace the integer 1 in the argument array. Note that a load function
- * should return FALSE when it is unable to provide a loadable object. For
- * example, the node_load() function for the 'node/%node/edit' menu item will
- * return FALSE for the path 'node/999/edit' if a node with a node ID of 999
- * does not exist. The menu routing system will return a 404 error in this case.
+ * to replace the integer 1 in the argument array.
  *
  * You can also define a %wildcard_to_arg() function (for the example menu
  * entry above this would be 'mymodule_abc_to_arg()'). The _to_arg() function
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index da0d9f4..c0467f0 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2747,8 +2747,8 @@ function system_region_list($theme_key, $show = REGIONS_ALL) {
  * Implements hook_system_info_alter().
  */
 function system_system_info_alter(&$info, $file, $type) {
-  // Remove page-top and page-bottom from the blocks UI since they are reserved for
-  // modules to populate from outside the blocks system.
+  // Remove page-top from the blocks UI since it is reserved for modules to
+  // populate from outside the blocks system.
   if ($type == 'theme') {
     $info['regions_hidden'][] = 'page_top';
     $info['regions_hidden'][] = 'page_bottom';
diff --git a/core/modules/system/system.queue.inc b/core/modules/system/system.queue.inc
index c2a6b13..00d3940 100644
--- a/core/modules/system/system.queue.inc
+++ b/core/modules/system/system.queue.inc
@@ -45,13 +45,13 @@
  * would be an in-memory queue backend which might lose items if it crashes.
  * However, such a backend would be able to deal with significantly more writes
  * than a reliable queue and for many tasks this is more important. See
- * aggregator_cron() for an example of how to effectively utilize a
- * non-reliable queue. Another example is doing Twitter statistics -- the small
- * possibility of losing a few items is insignificant next to power of the
- * queue being able to keep up with writes. As described in the processing
- * section, regardless of the queue being reliable or not, the processing code
- * should be aware that an item might be handed over for processing more than
- * once (because the processing code might time out before it finishes).
+ * aggregator_cron() for an example of how can this not be a problem. Another
+ * example is doing Twitter statistics -- the small possibility of losing a few
+ * items is insignificant next to power of the queue being able to keep up with
+ * writes. As described in the processing section, regardless of the queue
+ * being reliable or not, the processing code should be aware that an item
+ * might be handed over for processing more than once (because the processing
+ * code might time out before it finishes).
  */
 
 /**
diff --git a/core/modules/taxonomy/taxonomy.js b/core/modules/taxonomy/taxonomy.js
index 1a0c790..cc9cdf7 100644
--- a/core/modules/taxonomy/taxonomy.js
+++ b/core/modules/taxonomy/taxonomy.js
@@ -10,7 +10,7 @@ Drupal.behaviors.termDrag = {
   attach: function (context, settings) {
     var table = $('#taxonomy', context);
     var tableDrag = Drupal.tableDrag.taxonomy; // Get the blocks tableDrag object.
-    var rows = $('tr', table).length;
+    var rows = $('tr', table).size();
 
     // When a row is swapped, keep previous and next page classes set.
     tableDrag.row.prototype.onSwap = function (swappedRow) {
diff --git a/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test
index 6d80602..a4d50d3 100644
--- a/core/modules/taxonomy/taxonomy.test
+++ b/core/modules/taxonomy/taxonomy.test
@@ -1128,21 +1128,6 @@ class TaxonomyTermIndexTestCase extends TaxonomyWebTestCase {
     ))->fetchField();
     $this->assertEqual(0, $index_count, t('Term 2 is not indexed.'));
   }
-
-  /**
-   * Tests that there is a link to the parent term on the child term page.
-   */
-  function testTaxonomyTermHierarchyBreadcrumbs() {
-    // Create two taxonomy terms and set term2 as the parent of term1.
-    $term1 = $this->createTerm($this->vocabulary);
-    $term2 = $this->createTerm($this->vocabulary);
-    $term1->parent = array($term2->tid);
-    taxonomy_term_save($term1);
-
-    // Verify that the page breadcrumbs include a link to the parent term.
-    $this->drupalGet('taxonomy/term/' . $term1->tid);
-    $this->assertRaw(l($term2->name, 'taxonomy/term/' . $term2->tid), t('Parent term link is displayed when viewing the node.'));
-  }
 }
 
 /**
diff --git a/core/modules/user/user.js b/core/modules/user/user.js
index 042668d..44c00f3 100644
--- a/core/modules/user/user.js
+++ b/core/modules/user/user.js
@@ -168,7 +168,7 @@ Drupal.evaluatePasswordStrength = function (password, translate) {
 
   // Assemble the final message.
   msg = translate.hasWeaknesses + '<ul><li>' + msg.join('</li><li>') + '</li></ul>';
-  return { strength: strength, message: msg, indicatorText: indicatorText };
+  return { strength: strength, message: msg, indicatorText: indicatorText }
 
 };
 
@@ -180,7 +180,7 @@ Drupal.behaviors.fieldUserRegistration = {
   attach: function (context, settings) {
     var $checkbox = $('form#field-ui-field-edit-form input#edit-instance-settings-user-register-form');
 
-    if ($checkbox.length) {
+    if ($checkbox.size()) {
       $('input#edit-instance-required', context).once('user-register-form-checkbox', function () {
         $(this).bind('change', function (e) {
           if ($(this).attr('checked')) {
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 928daad..f1ddbbc 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -3476,27 +3476,23 @@ function user_preferred_language($account, $default = NULL) {
  * @see drupal_mail()
  *
  * @param $op
- *   The operation being performed on the account. Possible values:
- *   - 'register_admin_created': Welcome message for user created by the admin.
- *   - 'register_no_approval_required': Welcome message when user
- *     self-registers.
- *   - 'register_pending_approval': Welcome message, user pending admin
- *     approval.
- *   - 'password_reset': Password recovery request.
- *   - 'status_activated': Account activated.
- *   - 'status_blocked': Account blocked.
- *   - 'cancel_confirm': Account cancellation request.
- *   - 'status_canceled': Account canceled.
+ *  The operation being performed on the account. Possible values:
+ *  'register_admin_created': Welcome message for user created by the admin
+ *  'register_no_approval_required': Welcome message when user self-registers
+ *  'register_pending_approval': Welcome message, user pending admin approval
+ *  'password_reset': Password recovery request
+ *  'status_activated': Account activated
+ *  'status_blocked': Account blocked
+ *  'cancel_confirm': Account cancellation request
+ *  'status_canceled': Account canceled
  *
  * @param $account
- *   The user object of the account being notified. Must contain at
- *   least the fields 'uid', 'name', and 'mail'.
+ *  The user object of the account being notified. Must contain at
+ *  least the fields 'uid', 'name', and 'mail'.
  * @param $language
- *   Optional language to use for the notification, overriding account language.
- *
+ *  Optional language to use for the notification, overriding account language.
  * @return
- *   The return value from drupal_mail_system()->mail(), if ends up being
- *   called.
+ *  The return value from drupal_mail_system()->mail(), if ends up being called.
  */
 function _user_mail_notify($op, $account, $language = NULL) {
   // By default, we always notify except for canceled and blocked.
diff --git a/core/tests/README.txt b/core/tests/README.txt
index 0f3cafd..eaf3cae 100644
--- a/core/tests/README.txt
+++ b/core/tests/README.txt
@@ -1,3 +1,3 @@
-This directory contains test case code for Drupal core Components and
-Subsystems. Test classes should mirror the namespace of the code being tested.
-Supporting code for test classes is allowed.
+This directory contains test case code for Drupal core Components and Subsystems.
+Test classes should mirror the namespace of the code being tested. Supporting
+code for test classes is allowed.
diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css
index 25a29ed..cafd744 100644
--- a/core/themes/bartik/css/style.css
+++ b/core/themes/bartik/css/style.css
@@ -1584,6 +1584,8 @@ div.admin-panel .description {
 }
 .poll .vote-form {
   text-align: left; /* LTR */
+}
+.poll .vote-form .choices {
   margin: 0;
 }
 .poll .percent {
@@ -1594,7 +1596,7 @@ div.admin-panel .description {
   float: right;
   text-align: right;
 }
-.poll .choice-title {
+.poll .text {
   clear: right;
   margin-right: 2.25em;
 }
diff --git a/core/vendor/README.txt b/core/vendor/README.txt
index 33a40f5..7968995 100644
--- a/core/vendor/README.txt
+++ b/core/vendor/README.txt
@@ -2,5 +2,5 @@
 They should not be modified from their original form at any time. They should
 be changed only to keep up to date with upstream projects.
 
-Code in this directory MAY be licensed under a GPL-compatible non-GPL license.
-If so, it must be properly documented in COPYRIGHT.txt.
+Code in this directory MAY be licensed under a GPL-compatible non-GPL license. If
+so, it must be properly documented in COPYRIGHT.txt.
