diff --git a/includes/Drupal/Context/Handler/HandlerHttp.php b/includes/Drupal/Context/Handler/HandlerHttp.php
index bb191ab..5ebfe8a 100644
--- a/includes/Drupal/Context/Handler/HandlerHttp.php
+++ b/includes/Drupal/Context/Handler/HandlerHttp.php
@@ -24,8 +24,9 @@ class HandlerHttp extends HandlerAbstract {
    * @var array
    */
   static protected $httpProperties = array(
-    'method', 'url', 'accept_types', 'domain', 'request_args', 'query',
-    'languages', 'files', 'cookies', 'headers', 'server', 'request_body'
+    'method', 'uri', 'accept_types', 'domain', 'request_args', 'query',
+    'languages', 'files', 'cookies', 'headers', 'server', 'request_body',
+    'base_url', 'base_path', 'request_uri', 'script_name', 'php_self'
   );
 
   public function __construct($params = array()) {
@@ -67,9 +68,24 @@ class HandlerHttp extends HandlerAbstract {
         case 'method':
           $this->params[$property] = $this->request->getMethod();
           break;
-        case 'url':
+        case 'uri':
           $this->params[$property] = $this->request->getUri();
           break;
+        case 'base_url':
+          $this->params[$property] = $this->request->getScheme() . '://' . $this->request->getHost() . $this->request->getBaseUrl();
+          break;
+        case 'base_path':
+          $this->params[$property] = $this->request->getBasePath() . '/';
+          break;
+        case 'request_uri':
+          $this->params[$property] = $this->request->getRequestUri();
+          break;
+        case 'script_name':
+          $this->params[$property] = $this->request->getScriptName();
+          break;
+        case 'php_self':
+          $this->params[$property] = $this->request->server->get('PHP_SELF');
+          break;
         case 'accept_types':
           $this->params[$property] = $this->request->getAcceptableContentTypes();
           break;
@@ -137,4 +153,4 @@ class HandlerHttp extends HandlerAbstract {
       }
     }
   }
-}
+}
\ No newline at end of file
diff --git a/includes/Drupal/Context/Handler/HandlerPathRaw.php b/includes/Drupal/Context/Handler/HandlerPathRaw.php
new file mode 100644
index 0000000..b7094a9
--- /dev/null
+++ b/includes/Drupal/Context/Handler/HandlerPathRaw.php
@@ -0,0 +1,51 @@
+<?php
+
+namespace Drupal\Context\Handler;
+
+use \Drupal\Context\ContextInterface;
+use \Drupal\Context\Handler;
+
+/**
+ * Raw path Context Handler implementation.
+ */
+class HandlerPathRaw extends HandlerAbstract {
+
+  public function getValue(array $args = array(), ContextInterface $context = null) {
+    $raw_path = '';
+
+    $q = $context->getValue('http:query:q');
+    if (!empty($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.
+      $raw_path = $q;
+    }
+    else {
+      // This request is either a clean URL, or 'index.php', or nonsense.
+      // Extract the path from REQUEST_URI.
+      $request_uri = $context->getValue('http:request_uri');
+      $request_path = strtok($request_uri, '?');
+      $script_name = $context->getValue('http:script_name');
+      $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 = $context->getValue('http: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'].
+    $raw_path = trim($raw_path, '/');
+
+    return $raw_path;
+  }
+
+}
diff --git a/includes/Drupal/Context/Handler/HandlerPathSystem.php b/includes/Drupal/Context/Handler/HandlerPathSystem.php
new file mode 100644
index 0000000..b795265
--- /dev/null
+++ b/includes/Drupal/Context/Handler/HandlerPathSystem.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Drupal\Context\Handler;
+
+use \Drupal\Context\ContextInterface;
+use \Drupal\Context\Handler;
+
+/**
+ * System path Context Handler implementation.
+ */
+class HandlerPathSystem extends HandlerAbstract {
+
+  public function getValue(array $args = array(), ContextInterface $context = null) {
+    $system_path = '';
+
+    $path = $context->getValue('path:raw');
+    if (!empty($path)) {
+      $system_path = drupal_get_normal_path($path);
+    }
+    else {
+      $system_path = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
+    }
+
+    return $system_path;
+  }
+
+}
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index a779e8c..970fe12 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -691,13 +691,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());
 
@@ -2521,9 +2514,11 @@ function drupal_maintenance_theme() {
  */
 function drupal_fast_404() {
   $exclude_paths = variable_get('404_fast_paths_exclude', FALSE);
-  if ($exclude_paths && !preg_match($exclude_paths, $_GET['q'])) {
+  $context = drupal_get_context();
+  $q = $context->getValue('path:system');
+  if ($exclude_paths && !preg_match($exclude_paths, $q)) {
     $fast_paths = variable_get('404_fast_paths', FALSE);
-    if ($fast_paths && preg_match($fast_paths, $_GET['q'])) {
+    if ($fast_paths && preg_match($fast_paths, $q)) {
       drupal_add_http_header('Status', '404 Not Found');
       $fast_404_html = variable_get('404_fast_html', '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>');
       // Replace @path in the variable with the page path.
@@ -2735,45 +2730,8 @@ function language_default() {
  * @see current_path()
  */
 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;
+  $context = drupal_get_context();
+  return $context->getValue('path:raw');
 }
 
 /**
@@ -2812,7 +2770,8 @@ function arg($index = NULL, $path = NULL) {
   $arguments = &$drupal_static_fast['arguments'];
 
   if (!isset($path)) {
-    $path = $_GET['q'];
+    $context = drupal_get_context();
+    $path = $context->getValue('path:system');
   }
   if (!isset($arguments[$path])) {
     $arguments[$path] = explode('/', $path);
diff --git a/includes/common.inc b/includes/common.inc
index 5f7cdb8..793f0c1 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -513,7 +513,8 @@ function drupal_get_destination() {
     $destination = array('destination' => $_GET['destination']);
   }
   else {
-    $path = $_GET['q'];
+    $context = drupal_get_context();
+    $path = $context->getValue('path:system');
     $query = drupal_http_build_query(drupal_get_query_parameters());
     if ($query != '') {
       $path .= '?' . $query;
@@ -2316,7 +2317,8 @@ function l($text, $path, array $options = array()) {
   );
 
   // Append active class.
-  if (($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) &&
+  $context = drupal_get_context();
+  if (($path == $context->getValue('path:system') || ($path == '<front>' && drupal_is_front_page())) &&
       (empty($options['language']) || $options['language']->language == $language_url->language)) {
     $options['attributes']['class'][] = 'active';
   }
@@ -2442,7 +2444,8 @@ function drupal_deliver_page($page_callback_result, $default_delivery_callback =
     // If a delivery callback is specified, but doesn't exist as a function,
     // something is wrong, but don't print anything, since it's not known
     // what format the response needs to be in.
-    watchdog('delivery callback not found', 'callback %callback not found: %q.', array('%callback' => $delivery_callback, '%q' => $_GET['q']), WATCHDOG_ERROR);
+    $context = drupal_get_context();
+    watchdog('delivery callback not found', 'callback %callback not found: %q.', array('%callback' => $delivery_callback, '%q' => $context->getValue('path:system')), WATCHDOG_ERROR);
   }
 }
 
@@ -2469,24 +2472,26 @@ function drupal_deliver_html_page($page_callback_result) {
 
   // Menu status constants are integers; page content is a string or array.
   if (is_int($page_callback_result)) {
+    $context = drupal_get_context();
+    $q = $context->getValue('path:system');
     // @todo: Break these up into separate functions?
     switch ($page_callback_result) {
       case MENU_NOT_FOUND:
         // Print a 404 page.
         drupal_add_http_header('Status', '404 Not Found');
 
-        watchdog('page not found', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);
+        watchdog('page not found', check_plain($q), NULL, WATCHDOG_WARNING);
 
         // Check for and return a fast 404 page if configured.
         drupal_fast_404();
 
         // Keep old path for reference, and to allow forms to redirect to it.
         if (!isset($_GET['destination'])) {
-          $_GET['destination'] = $_GET['q'];
+          $_GET['destination'] = $q;
         }
 
         $path = drupal_get_normal_path(variable_get('site_404', ''));
-        if ($path && $path != $_GET['q']) {
+        if ($path && $path != $q) {
           // Custom 404 handler. Set the active item in case there are tabs to
           // display, or other dependencies on the path.
           menu_set_active_item($path);
@@ -2507,15 +2512,15 @@ function drupal_deliver_html_page($page_callback_result) {
       case MENU_ACCESS_DENIED:
         // Print a 403 page.
         drupal_add_http_header('Status', '403 Forbidden');
-        watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);
+        watchdog('access denied', check_plain($q), NULL, WATCHDOG_WARNING);
 
         // Keep old path for reference, and to allow forms to redirect to it.
         if (!isset($_GET['destination'])) {
-          $_GET['destination'] = $_GET['q'];
+          $_GET['destination'] = $q;
         }
 
         $path = drupal_get_normal_path(variable_get('site_403', ''));
-        if ($path && $path != $_GET['q']) {
+        if ($path && $path != $q) {
           // Custom 403 handler. Set the active item in case there are tabs to
           // display or other dependencies on the path.
           menu_set_active_item($path);
@@ -4933,9 +4938,6 @@ function _drupal_bootstrap_full() {
     ini_set('error_log', 'public://error.log');
   }
 
-  // Initialize $_GET['q'] prior to invoking hook_init().
-  drupal_path_initialize();
-
   // Let all modules take action before the menu system handles the request.
   // We do not want this while running update.php.
   if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') {
@@ -4969,10 +4971,11 @@ function drupal_page_set_cache() {
   global $base_root;
 
   if (drupal_page_is_cacheable()) {
+    $context = drupal_get_context();
     $cache = (object) array(
       'cid' => $base_root . request_uri(),
       'data' => array(
-        'path' => $_GET['q'],
+        'path' => $context->getValue('path:system'),
         'body' => ob_get_clean(),
         'title' => drupal_get_title(),
         'headers' => array(),
diff --git a/includes/form.inc b/includes/form.inc
index 1b163a0..764f54c 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -1236,7 +1236,8 @@ function drupal_redirect_form($form_state) {
         $function($form_state['redirect']);
       }
     }
-    drupal_goto($_GET['q']);
+    $context = drupal_get_context();
+    drupal_goto($context->getValue('path:system'));
   }
 }
 
@@ -4312,12 +4313,13 @@ function batch_process($redirect = NULL, $url = 'batch', $redirect_callback = 'd
 
   if (isset($batch)) {
     // Add process information
+    $context = drupal_get_context();
     $process_info = array(
       'current_set' => 0,
       'progressive' => TRUE,
       'url' => $url,
       'url_options' => array(),
-      'source_url' => $_GET['q'],
+      'source_url' => $context->getValue('path:system'),
       'redirect' => $redirect,
       'theme' => $GLOBALS['theme_key'],
       'redirect_callback' => $redirect_callback,
diff --git a/includes/locale.inc b/includes/locale.inc
index 5a0138c..32e7174 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -270,9 +270,9 @@ function locale_language_from_url($languages) {
 
   switch (variable_get('locale_language_negotiation_url_part', LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX)) {
     case LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX:
-      // $_GET['q'] might not be available at this time, because
-      // path initialization runs after the language bootstrap phase.
-      list($language, $_GET['q']) = language_url_split_prefix(isset($_GET['q']) ? $_GET['q'] : NULL, $languages);
+      $context = drupal_get_context();
+      $q = $context->getValue('path:system');
+      list($language, $q) = language_url_split_prefix($q, $languages);
       if ($language !== FALSE) {
         $language_url = $language->language;
       }
diff --git a/includes/menu.inc b/includes/menu.inc
index f23eb0d..8cce2e3 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -425,7 +425,8 @@ 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'];
+    $context = drupal_get_context();
+    $path = $context->getValue('path:system');
   }
   if (isset($router_item)) {
     $router_items[$path] = $router_item;
@@ -490,7 +491,8 @@ function menu_execute_active_handler($path = NULL, $deliver = TRUE) {
   // Allow other modules to change the site status but not the path because that
   // would not change the global variable. hook_url_inbound_alter() can be used
   // to change the path. Code later will not use the $read_only_path variable.
-  $read_only_path = !empty($path) ? $path : $_GET['q'];
+  $context = drupal_get_context();
+  $read_only_path = !empty($path) ? $path : $context->getValue('path:system');
   drupal_alter('menu_site_status', $page_callback_result, $read_only_path);
 
   // Only continue if the site status is not set.
@@ -1035,11 +1037,12 @@ function menu_tree_output($tree) {
       $class[] = 'active-trail';
       $data['link']['localized_options']['attributes']['class'][] = 'active-trail';
     }
-    // Normally, l() compares the href of every link with $_GET['q'] and sets
-    // the active class accordingly. But local tasks do not appear in menu
+    // Normally, l() compares the href of every link with the system path and
+    // sets the active class accordingly. But local tasks do not appear in menu
     // trees, so if the current path is a local task, and this link is its
     // tab root, then we have to set the class manually.
-    if ($data['link']['href'] == $router_item['tab_root_href'] && $data['link']['href'] != $_GET['q']) {
+    $context = drupal_get_context();
+    if ($data['link']['href'] == $router_item['tab_root_href'] && $data['link']['href'] != $context->getValue('path:system')) {
       $data['link']['localized_options']['attributes']['class'][] = 'active';
     }
 
@@ -1824,11 +1827,12 @@ function menu_navigation_links($menu_name, $level = 0) {
         $class = ' active-trail';
         $l['attributes']['class'][] = 'active-trail';
       }
-      // Normally, l() compares the href of every link with $_GET['q'] and sets
-      // the active class accordingly. But local tasks do not appear in menu
+      // Normally, l() compares the href of every link with the system path and
+      // sets the active class accordingly. But local tasks do not appear in menu
       // trees, so if the current path is a local task, and this link is its
       // tab root, then we have to set the class manually.
-      if ($item['link']['href'] == $router_item['tab_root_href'] && $item['link']['href'] != $_GET['q']) {
+      $context = drupal_get_context();
+      if ($item['link']['href'] == $router_item['tab_root_href'] && $item['link']['href'] != $context->getValue('path:system')) {
         $l['attributes']['class'][] = 'active';
       }
       // Keyed with the unique mlid to generate classes in theme_links().
@@ -1942,8 +1946,9 @@ function menu_local_tasks($level = 0) {
             // local tasks link to their parent, but the path of default local
             // tasks can still be accessed directly, in which case this link
             // would not be marked as active, since l() only compares the href
-            // with $_GET['q'].
-            if ($link['href'] != $_GET['q']) {
+            // with the system path.
+            $context = drupal_get_context();
+            if ($link['href'] != $context->getValue('path:system')) {
               $link['localized_options']['attributes']['class'][] = 'active';
             }
             $tabs_current[] = array(
@@ -2018,8 +2023,9 @@ function menu_local_tasks($level = 0) {
             // Mark the link as active, if the current path is a (second-level)
             // local task of a default local task. Since this default local task
             // links to its parent, l() will not mark it as active, as it only
-            // compares the link's href to $_GET['q'].
-            if ($link['href'] != $_GET['q']) {
+            // compares the link's href to the system path.
+            $context = drupal_get_context();
+            if ($link['href'] != $context->getValue('path:system')) {
               $link['localized_options']['attributes']['class'][] = 'active';
             }
             $tabs_current[] = array(
@@ -2385,7 +2391,8 @@ function menu_link_get_preferred($path = NULL) {
   $preferred_links = &drupal_static(__FUNCTION__);
 
   if (!isset($path)) {
-    $path = $_GET['q'];
+    $context = drupal_get_context();
+    $path = $context->getValue('path:system');
   }
 
   if (!isset($preferred_links[$path])) {
@@ -3777,7 +3784,8 @@ function _menu_site_is_offline($check_only = FALSE) {
       // Ensure that the maintenance mode message is displayed only once
       // (allowing for page redirects) and specifically suppress its display on
       // the maintenance mode settings page.
-      if (!$check_only && $_GET['q'] != 'admin/config/development/maintenance') {
+      $context = drupal_get_context();
+      if (!$check_only && $context->getValue('path:system') != 'admin/config/development/maintenance') {
         if (user_access('administer site configuration')) {
           drupal_set_message(t('Operating in maintenance mode. <a href="@url">Go online.</a>', array('@url' => url('admin/config/development/maintenance'))), 'status', FALSE);
         }
diff --git a/includes/pager.inc b/includes/pager.inc
index a5d3e6b..e62e8fe 100644
--- a/includes/pager.inc
+++ b/includes/pager.inc
@@ -630,7 +630,8 @@ function theme_pager_link($variables) {
     }
   }
 
-  return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => $query));
+  $context = drupal_get_context();
+  return l($text, $context->getValue('path:system'), array('attributes' => $attributes, 'query' => $query));
 }
 
 /**
diff --git a/includes/path.inc b/includes/path.inc
index 630b34c..662c90b 100644
--- a/includes/path.inc
+++ b/includes/path.inc
@@ -10,18 +10,6 @@
  */
 
 /**
- * Initialize the $_GET['q'] variable to the proper normal path.
- */
-function drupal_path_initialize() {
-  if (!empty($_GET['q'])) {
-    $_GET['q'] = drupal_get_normal_path($_GET['q']);
-  }
-  else {
-    $_GET['q'] = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
-  }
-}
-
-/**
  * Given an alias, return its Drupal system URL if one exists. Given a Drupal
  * system URL return one of its aliases if such a one exists. Otherwise,
  * return FALSE.
@@ -235,7 +223,8 @@ function drupal_cache_system_paths() {
 function drupal_get_path_alias($path = NULL, $path_language = NULL) {
   // If no path is specified, use the current page's path.
   if ($path == NULL) {
-    $path = $_GET['q'];
+    $context = drupal_get_context();
+    $path = $context->getValue('path:system');
   }
   $result = $path;
   if ($alias = drupal_lookup_path('alias', $path, $path_language)) {
@@ -290,9 +279,10 @@ function drupal_is_front_page() {
   $is_front_page = &$drupal_static_fast['is_front_page'];
 
   if (!isset($is_front_page)) {
-    // As drupal_path_initialize updates $_GET['q'] with the 'site_frontpage' path,
+    // As system path handler updates 'path:system' with the 'site_frontpage' path,
     // we can check it against the 'site_frontpage' variable.
-    $is_front_page = ($_GET['q'] == variable_get('site_frontpage', 'node'));
+    $context = drupal_get_context();
+    $is_front_page = ($context->getValue('path:system') == variable_get('site_frontpage', 'node'));
   }
 
   return $is_front_page;
@@ -352,7 +342,8 @@ function drupal_match_path($path, $patterns) {
  * @see request_path()
  */
 function current_path() {
-  return $_GET['q'];
+  $context = drupal_get_context();
+  return $context->getValue('path:system');
 }
 
 /**
diff --git a/includes/tablesort.inc b/includes/tablesort.inc
index 121a1b9..1803304 100644
--- a/includes/tablesort.inc
+++ b/includes/tablesort.inc
@@ -143,7 +143,8 @@ function tablesort_header($cell, $header, $ts) {
       $ts['sort'] = 'asc';
       $image = '';
     }
-    $cell['data'] = l($cell['data'] . $image, $_GET['q'], array('attributes' => array('title' => $title), 'query' => array_merge($ts['query'], array('sort' => $ts['sort'], 'order' => $cell['data'])), 'html' => TRUE));
+    $context = drupal_get_context();
+    $cell['data'] = l($cell['data'] . $image, $context->getValue('path:system'), array('attributes' => array('title' => $title), 'query' => array_merge($ts['query'], array('sort' => $ts['sort'], 'order' => $cell['data'])), 'html' => TRUE));
 
     unset($cell['field'], $cell['sort']);
   }
diff --git a/includes/theme.inc b/includes/theme.inc
index 7fad5f3..e5edd5e 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1588,7 +1588,8 @@ function theme_links($variables) {
       if ($i == $num_links) {
         $class[] = 'last';
       }
-      if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))
+      $context = drupal_get_context();
+      if (isset($link['href']) && ($link['href'] == $context->getValue('path:system') || ($link['href'] == '<front>' && drupal_is_front_page()))
           && (empty($link['language']) || $link['language']->language == $language_url->language)) {
         $class[] = 'active';
       }
diff --git a/modules/block/block.module b/modules/block/block.module
index 920090f..500c313 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -802,11 +802,13 @@ function block_block_list_alter(&$blocks) {
       $pages = drupal_strtolower($block->pages);
       if ($block->visibility < BLOCK_VISIBILITY_PHP) {
         // Convert the Drupal path to lowercase
-        $path = drupal_strtolower(drupal_get_path_alias($_GET['q']));
+        $context = drupal_get_context();
+        $q = $context->getValue('path:system');
+        $path = drupal_strtolower(drupal_get_path_alias($q));
         // Compare the lowercase internal and lowercase path alias (if any).
         $page_match = drupal_match_path($path, $pages);
-        if ($path != $_GET['q']) {
-          $page_match = $page_match || drupal_match_path($_GET['q'], $pages);
+        if ($path != $q) {
+          $page_match = $page_match || drupal_match_path($q, $pages);
         }
         // When $block->visibility has a value of 0 (BLOCK_VISIBILITY_NOTLISTED),
         // the block is displayed on all pages except those listed in $block->pages.
diff --git a/modules/contact/contact.module b/modules/contact/contact.module
index eaae9c6..09e0253 100644
--- a/modules/contact/contact.module
+++ b/modules/contact/contact.module
@@ -169,11 +169,12 @@ function contact_load($cid) {
  */
 function contact_mail($key, &$message, $params) {
   $language = $message['language'];
+  $context = drupal_get_context();
   $variables = array(
     '!site-name' => variable_get('site_name', 'Drupal'),
     '!subject' => $params['subject'],
     '!category' => isset($params['category']['category']) ? $params['category']['category'] : '',
-    '!form-url' => url($_GET['q'], array('absolute' => TRUE, 'language' => $language)),
+    '!form-url' => url($context->getValue('path:system'), array('absolute' => TRUE, 'language' => $language)),
     '!sender-name' => format_username($params['sender']),
     '!sender-url' => $params['sender']->uid ? url('user/' . $params['sender']->uid, array('absolute' => TRUE, 'language' => $language)) : $params['sender']->mail,
   );
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 03757ac..edb64be 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -230,7 +230,8 @@ function locale_init() {
   // in $conf. This should happen on all pages except the date and time formats
   // settings page, where we want to display the site default and not the
   // localized version.
-  if (strpos($_GET['q'], 'admin/config/regional/date-time/formats') !== 0) {
+  $context = drupal_get_context();
+  if (strpos($context->getValue('path:system'), 'admin/config/regional/date-time/formats') !== 0) {
     $languages = array($language->language);
 
     // Setup appropriate date formats for this locale.
@@ -999,7 +1000,8 @@ function locale_block_info() {
  */
 function locale_block_view($type) {
   if (drupal_multilingual()) {
-    $path = drupal_is_front_page() ? '<front>' : $_GET['q'];
+    $context = drupal_get_context();
+    $path = drupal_is_front_page() ? '<front>' : $context->getValue('path:system');
     $links = language_negotiation_get_switch_links($type, $path);
 
     if (isset($links->links)) {
diff --git a/modules/shortcut/shortcut.module b/modules/shortcut/shortcut.module
index f8ddcc2..968735a 100644
--- a/modules/shortcut/shortcut.module
+++ b/modules/shortcut/shortcut.module
@@ -648,7 +648,8 @@ function shortcut_preprocess_page(&$variables) {
   // we do not want to display it on "access denied" or "page not found"
   // pages).
   if (shortcut_set_edit_access() && ($item = menu_get_item()) && $item['access']) {
-    $link = $_GET['q'];
+    $context = drupal_get_context();
+    $link = $context->getValue('path:system');
     $query_parameters = drupal_get_query_parameters();
     if (!empty($query_parameters)) {
      $link .= '?' . drupal_http_build_query($query_parameters);
diff --git a/modules/simpletest/tests/context.test b/modules/simpletest/tests/context.test
index 134e8d3..bd2419f 100644
--- a/modules/simpletest/tests/context.test
+++ b/modules/simpletest/tests/context.test
@@ -546,3 +546,32 @@ class ContextHTTPTestCase extends ContextTestCases {
     $this->assertEqual($butler->getValue('http:query:baz'), '', t('Non existent value fetched as empty string'));
   }
 }
+
+/**
+ * Test class for the HTTP Handler.
+ */
+class ContextPathTestCase extends ContextTestCases {
+  public static function getInfo() {
+    return array(
+      'name' => 'Context Path Handlers',
+      'description' => 'Test the Path Handlers.',
+      'group' => 'Context',
+    );
+  }
+
+  /**
+   * Test path:raw
+   */
+  function testPathRawProperty() {
+    $butler = new \Drupal\Context\Context();
+
+    $params = array('values' => array('parameters' => array('q' => 'alias')));
+
+    $butler->setHandler('http', '\Drupal\Context\Handler\HandlerHttp', $params);
+    $butler->setHandler('path:raw', '\Drupal\Context\Handler\HandlerPathRaw', $params);
+    $butler->lock();
+
+    $this->assertEqual($butler->getValue('path:raw'), $params['values']['parameters']['q'], t('Raw path is fetched successfully.'));
+  }
+
+}
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 0ba9d7f..f849771 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -76,10 +76,11 @@ function statistics_exit() {
   if (variable_get('statistics_enable_access_log', 0)) {
     drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
     // Log this page access.
+    $context = drupal_get_context();
     db_insert('accesslog')
       ->fields(array(
         'title' => strip_tags(drupal_get_title()),
-        'path' => $_GET['q'],
+        'path' => $context->getValue('path:system'),
         'url' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
         'hostname' => ip_address(),
         'uid' => $user->uid,
diff --git a/modules/system/system.module b/modules/system/system.module
index 9c8f87c..d565958 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1919,6 +1919,8 @@ function system_init() {
 function system_context_init(\Drupal\Context\ContextInterface $context) {
 
   $context->setHandler('http', '\Drupal\Context\Handler\HandlerHttp');
+  $context->setHandler('path:raw', '\Drupal\Context\Handler\HandlerPathRaw');
+  $context->setHandler('path:system', '\Drupal\Context\Handler\HandlerPathSystem');
 
 }
 
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 2440a28..5c04ad9 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -411,7 +411,8 @@ function taxonomy_overview_terms($form, &$form_state, $vocabulary) {
       '#type' => 'submit',
       '#value' => t('Reset to alphabetical')
     );
-    $form_state['redirect'] = array($_GET['q'], (isset($_GET['page']) ? array('query' => array('page' => $_GET['page'])) : array()));
+    $context = drupal_get_context();
+    $form_state['redirect'] = array($context->getValue('path:system'), (isset($_GET['page']) ? array('query' => array('page' => $_GET['page'])) : array()));
   }
 
   return $form;
@@ -771,7 +772,8 @@ function taxonomy_form_term($form, &$form_state, $edit = array(), $vocabulary =
     );
   }
   else {
-    $form_state['redirect'] = $_GET['q'];
+    $context = drupal_get_context();
+    $form_state['redirect'] = $context->getValue('path:system');
   }
 
   return $form;
diff --git a/modules/update/update.compare.inc b/modules/update/update.compare.inc
index 2ccd97c..78c76da 100644
--- a/modules/update/update.compare.inc
+++ b/modules/update/update.compare.inc
@@ -739,7 +739,8 @@ function update_project_cache($cid) {
 
   // On certain paths, we should clear the cache and recompute the projects for
   // update status of the site to avoid presenting stale information.
-  $q = $_GET['q'];
+  $context = drupal_get_context();
+  $q = $context->getValue('path:system');
   $paths = array(
     'admin/modules',
     'admin/modules/update',
diff --git a/modules/update/update.module b/modules/update/update.module
index a2d705a..c3b6e03 100644
--- a/modules/update/update.module
+++ b/modules/update/update.module
@@ -107,7 +107,8 @@ function update_help($path, $arg) {
  */
 function update_init() {
   if (arg(0) == 'admin' && user_access('administer site configuration')) {
-    switch ($_GET['q']) {
+    $context = drupal_get_context();
+    switch ($context->getValue('path:system')) {
       // These pages don't need additional nagging.
       case 'admin/appearance/update':
       case 'admin/appearance/install':
diff --git a/modules/user/user.module b/modules/user/user.module
index bae0ffc..f9d7dd7 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1252,7 +1252,8 @@ function user_user_categories() {
 }
 
 function user_login_block($form) {
-  $form['#action'] = url($_GET['q'], array('query' => drupal_get_destination()));
+  $context = drupal_get_context();
+  $form['#action'] = url($context->getValue('path:system'), array('query' => drupal_get_destination()));
   $form['#id'] = 'user-login-form';
   $form['#validate'] = user_login_default_validators();
   $form['#submit'][] = 'user_login_submit';
@@ -3696,7 +3697,8 @@ function user_register_form($form, &$form_state) {
   if ($admin) {
     // Redirect back to page which initiated the create request;
     // usually admin/people/create.
-    $form_state['redirect'] = $_GET['q'];
+    $context = drupal_get_context();
+    $form_state['redirect'] = $context->getValue('path:system');
   }
 
   $form['actions'] = array('#type' => 'actions');
