From 03b4953f008c1063e6d7166143ba844e8c6e89cc Mon Sep 17 00:00:00 2001
From: Fabian Becker <fabian.becker@uni-tuebingen.de>
Date: Thu, 18 Jul 2013 11:45:02 +0200
Subject: [PATCH] Refactor class Piwik_Common to \Piwik\Core\Common

Notice that auto refactoring has created a nested namespace. Not sure this is what we want - so we might have to edit those nested namespaces afterwards (I think they don't look so good)
---
 core/API/DataTableGenericFilter.php           |   4 +-
 core/API/DataTableManipulator/LabelFilter.php |   4 +-
 core/API/DocumentationGenerator.php           |  10 +-
 core/API/Proxy.php                            |   6 +-
 core/API/Request.php                          |  12 +-
 core/API/ResponseBuilder.php                  |  42 +++---
 core/Access.php                               |   6 +-
 core/ArchiveProcessor/Rules.php               |   6 +-
 core/AssetManager.php                         |   6 +-
 core/CacheFile.php                            |   6 +-
 core/Common.php                               |  10 +-
 core/Controller.php                           |  32 ++---
 core/Cookie.php                               |  12 +-
 core/DataAccess/ArchiveSelector.php           |   4 +-
 core/DataAccess/ArchiveTableCreator.php       |   8 +-
 core/DataAccess/ArchiveWriter.php             |   6 +-
 core/DataAccess/LogAggregator.php             |   6 +-
 core/DataTable/Renderer/Csv.php               |   6 +-
 core/DataTable/Renderer/Json.php              |   8 +-
 core/DataTable/Renderer/Rss.php               |  10 +-
 core/Db/Schema/Myisam.php                     |   4 +-
 core/FrontController.php                      |  26 ++--
 core/Http.php                                 |  12 +-
 core/IP.php                                   |  26 ++--
 core/Log.php                                  |  12 +-
 core/Log/Exception.php                        |   4 +-
 core/Log/Message.php                          |   6 +-
 core/Menu/Abstract.php                        |   4 +-
 core/Nonce.php                                |   4 +-
 core/Option.php                               |  12 +-
 core/Period/Range.php                         |   6 +-
 core/Piwik.php                                |  56 ++++----
 core/Plugin.php                               |   4 +-
 core/Plugin/MetadataLoader.php                |   4 +-
 core/PluginsArchiver.php                      |   4 +-
 core/PluginsManager.php                       |   6 +-
 core/ProxyHeaders.php                         |   4 +-
 core/ReportRenderer/Pdf.php                   |   6 +-
 core/Segment.php                              |   6 +-
 core/Session.php                              |  10 +-
 core/Session/Namespace.php                    |   4 +-
 core/Tracker.php                              |  30 ++---
 core/Tracker/Action.php                       |  42 +++---
 core/Tracker/Db.php                           |   4 +-
 core/Tracker/GoalManager.php                  |  34 ++---
 core/Tracker/Referer.php                      |  30 ++---
 core/Tracker/Request.php                      |  30 ++---
 core/Tracker/Visit.php                        |  18 +--
 core/Tracker/VisitExcluded.php                |   4 +-
 core/Translate.php                            |   6 +-
 core/TranslationWriter.php                    |   4 +-
 core/Twig.php                                 |   4 +-
 core/UpdateCheck.php                          |   4 +-
 core/Updater.php                              |   4 +-
 core/Updates/0.2.10.php                       |  16 +--
 core/Updates/0.2.12.php                       |   8 +-
 core/Updates/0.2.13.php                       |   6 +-
 core/Updates/0.2.24.php                       |  10 +-
 core/Updates/0.2.27.php                       |  10 +-
 core/Updates/0.2.32.php                       |  10 +-
 core/Updates/0.2.33.php                       |   6 +-
 core/Updates/0.2.35.php                       |   4 +-
 core/Updates/0.2.37.php                       |   4 +-
 core/Updates/0.4.1.php                        |   6 +-
 core/Updates/0.4.2.php                        |   8 +-
 core/Updates/0.4.php                          |  10 +-
 core/Updates/0.5.4.php                        |   6 +-
 core/Updates/0.5.5.php                        |   6 +-
 core/Updates/0.5.php                          |  22 +--
 core/Updates/0.6-rc1.php                      |  28 ++--
 core/Updates/0.6.3.php                        |   6 +-
 core/Updates/0.7.php                          |   4 +-
 core/Updates/0.9.1.php                        |   6 +-
 core/Updates/1.10.2-b1.php                    |   4 +-
 core/Updates/1.10.2-b2.php                    |   4 +-
 core/Updates/1.12-b1.php                      |   4 +-
 core/Updates/1.12-b16.php                     |   4 +-
 core/Updates/1.2-rc1.php                      |  28 ++--
 core/Updates/1.2.3.php                        |   4 +-
 core/Updates/1.2.5-rc1.php                    |   6 +-
 core/Updates/1.2.5-rc7.php                    |   4 +-
 core/Updates/1.4-rc1.php                      |   6 +-
 core/Updates/1.4-rc2.php                      |  10 +-
 core/Updates/1.5-b1.php                       |   8 +-
 core/Updates/1.5-b2.php                       |   4 +-
 core/Updates/1.5-b3.php                       |   8 +-
 core/Updates/1.5-b4.php                       |   4 +-
 core/Updates/1.5-b5.php                       |   4 +-
 core/Updates/1.6-b1.php                       |  10 +-
 core/Updates/1.7-b1.php                       |   6 +-
 core/Updates/1.7.2-rc5.php                    |   4 +-
 core/Updates/1.7.2-rc7.php                    |   8 +-
 core/Updates/1.8.3-b1.php                     |  16 +--
 core/Updates/1.8.4-b1.php                     |  12 +-
 core/Updates/1.9-b16.php                      |  10 +-
 core/Updates/1.9-b19.php                      |   6 +-
 core/Updates/1.9-b9.php                       |   6 +-
 core/Updates/1.9.1-b2.php                     |   4 +-
 core/Updates/1.9.3-b8.php                     |   4 +-
 core/Url.php                                  |  14 +-
 core/View.php                                 |  10 +-
 core/ViewDataTable.php                        |  30 ++---
 core/ViewDataTable/GenerateGraphData.php      |  14 +-
 .../GenerateGraphData/ChartEvolution.php      |  10 +-
 core/ViewDataTable/GenerateGraphHTML.php      |   4 +-
 .../GenerateGraphHTML/ChartEvolution.php      |  10 +-
 core/ViewDataTable/HtmlTable.php              |   4 +-
 core/ViewDataTable/HtmlTable/Goals.php        |  10 +-
 core/ViewDataTable/Sparkline.php              |   8 +-
 core/Visualization/Chart.php                  |   6 +-
 core/Visualization/Cloud.php                  |   6 +-
 libs/upgradephp/upgrade.php                   |   4 +-
 misc/cron/archive.php                         |  14 +-
 misc/others/geoipUpdateRows.php               |  26 ++--
 misc/others/iframeWidget_localhost.php        |   4 +-
 ...kies_GenerateHundredsWebsitesAndVisits.php |   4 +-
 .../test_generateLotsVisitsWebsites.php       |  32 ++---
 plugins/API/API.php                           |  20 +--
 plugins/API/Controller.php                    |   6 +-
 plugins/API/ProcessedReport.php               |   6 +-
 plugins/API/RowEvolution.php                  |   4 +-
 plugins/Actions/API.php                       |   4 +-
 plugins/Actions/Actions.php                   |  20 +--
 plugins/Annotations/Controller.php            |  16 +--
 plugins/AnonymizeIP/AnonymizeIP.php           |   4 +-
 plugins/CoreAdminHome/API.php                 |   4 +-
 plugins/CoreAdminHome/Controller.php          |  34 ++---
 plugins/CoreHome/Controller.php               |  20 +--
 .../DataTableRowAction/MultiRowEvolution.php  |   4 +-
 .../DataTableRowAction/RowEvolution.php       |   8 +-
 plugins/CorePluginsAdmin/Controller.php       |   6 +-
 plugins/CoreUpdater/Controller.php            |  16 +--
 plugins/CoreUpdater/CoreUpdater.php           |   6 +-
 plugins/CustomVariables/Archiver.php          |   4 +-
 plugins/DBStats/API.php                       |   8 +-
 plugins/DBStats/MySQLMetadataProvider.php     |  12 +-
 plugins/Dashboard/Controller.php              |  52 ++++----
 plugins/Dashboard/Dashboard.php               |  20 +--
 plugins/DevicesDetection/Controller.php       |   6 +-
 plugins/DevicesDetection/DevicesDetection.php |   6 +-
 plugins/ExamplePlugin/Controller.php          |   6 +-
 plugins/ExampleUI/Controller.php              |   4 +-
 plugins/Feedback/Controller.php               |  14 +-
 plugins/Goals/API.php                         |  14 +-
 plugins/Goals/Controller.php                  |  30 ++---
 plugins/Goals/Goals.php                       |  14 +-
 plugins/ImageGraph/API.php                    |  14 +-
 plugins/ImageGraph/Controller.php             |  12 +-
 plugins/ImageGraph/ImageGraph.php             |   6 +-
 plugins/Installation/Controller.php           |  22 +--
 plugins/Installation/FormDatabaseSetup.php    |   4 +-
 plugins/Installation/Installation.php         |   4 +-
 plugins/LanguagesManager/API.php              |   8 +-
 plugins/LanguagesManager/Controller.php       |   4 +-
 plugins/LanguagesManager/LanguagesManager.php |  10 +-
 plugins/Live/API.php                          |  24 ++--
 plugins/Live/Controller.php                   |   6 +-
 plugins/Live/Visitor.php                      |   8 +-
 plugins/Login/Auth.php                        |   6 +-
 plugins/Login/Controller.php                  |  20 +--
 plugins/MobileMessaging/API.php               |   6 +-
 plugins/MobileMessaging/Controller.php        |   6 +-
 .../MobileMessaging/ReportRenderer/Sms.php    |   4 +-
 plugins/MultiSites/API.php                    |   6 +-
 plugins/MultiSites/Controller.php             |  10 +-
 plugins/Overlay/Controller.php                |  28 ++--
 plugins/PDFReports/API.php                    |  30 ++---
 plugins/PDFReports/Controller.php             |   4 +-
 plugins/PDFReports/PDFReports.php             |   6 +-
 plugins/PrivacyManager/Controller.php         |  38 +++---
 plugins/PrivacyManager/LogDataPurger.php      |  28 ++--
 plugins/PrivacyManager/PrivacyManager.php     |   6 +-
 plugins/Provider/Provider.php                 |   8 +-
 plugins/Provider/functions.php                |   4 +-
 plugins/Proxy/Controller.php                  |  12 +-
 plugins/Referers/API.php                      |  10 +-
 plugins/Referers/Archiver.php                 |  20 +--
 plugins/Referers/Controller.php               |  58 ++++----
 plugins/Referers/functions.php                |  24 ++--
 plugins/SEO/Controller.php                    |   8 +-
 plugins/SEO/MajesticClient.php                |   4 +-
 plugins/SegmentEditor/API.php                 |  14 +-
 plugins/SegmentEditor/Controller.php          |  10 +-
 plugins/SegmentEditor/SegmentEditor.php       |   4 +-
 plugins/SitesManager/API.php                  |  56 ++++----
 plugins/SitesManager/Controller.php           |  40 +++---
 plugins/Transitions/API.php                   |  36 ++---
 plugins/UserCountry/Controller.php            |  28 ++--
 plugins/UserCountry/GeoIPAutoUpdater.php      |  10 +-
 plugins/UserCountry/LocationProvider.php      |   6 +-
 .../UserCountry/LocationProvider/Default.php  |   6 +-
 plugins/UserCountry/UserCountry.php           |   6 +-
 plugins/UserCountryMap/Controller.php         |  20 +--
 plugins/UserSettings/Archiver.php             |   6 +-
 plugins/UsersManager/API.php                  |  40 +++---
 plugins/UsersManager/Controller.php           |  28 ++--
 plugins/VisitFrequency/Controller.php         |   6 +-
 plugins/VisitTime/VisitTime.php               |  10 +-
 plugins/VisitorGenerator/Controller.php       |  12 +-
 plugins/VisitsSummary/Controller.php          |  10 +-
 plugins/Widgetize/Controller.php              |   8 +-
 tests/PHPUnit/BaseFixture.php                 |   6 +-
 tests/PHPUnit/BenchmarkTestCase.php           |   4 +-
 tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php |   4 +-
 tests/PHPUnit/Core/ArchiveProcessingTest.php  |  12 +-
 tests/PHPUnit/Core/CommonTest.php             |  48 +++----
 tests/PHPUnit/Core/IPTest.php                 |  10 +-
 tests/PHPUnit/Core/OptionTest.php             |  10 +-
 tests/PHPUnit/Core/ReleaseCheckListTest.php   |   4 +-
 tests/PHPUnit/Core/SegmentTest.php            |  48 +++----
 tests/PHPUnit/Core/ServeStaticFileTest.php    |   4 +-
 tests/PHPUnit/Core/TranslationWriterTest.php  |   6 +-
 .../ManySitesImportedLogsWithXssAttempts.php  |   6 +-
 ...everalDaysDateRange_ArchivingTestsTest.php |   6 +-
 ...mVariables_SegmentMatchVisitorTypeTest.php |   6 +-
 .../Integration/UrlNormalizationTest.php      |   6 +-
 tests/PHPUnit/IntegrationTestCase.php         |   6 +-
 .../PHPUnit/Plugins/LanguagesManagerTest.php  |   8 +-
 tests/PHPUnit/Plugins/PrivacyManagerTest.php  | 126 +++++++++---------
 tests/resources/staticFileServer.php          |   6 +-
 220 files changed, 1365 insertions(+), 1365 deletions(-)

diff --git a/core/API/DataTableGenericFilter.php b/core/API/DataTableGenericFilter.php
index 39dbba045c..9561c26ee5 100644
--- a/core/API/DataTableGenericFilter.php
+++ b/core/API/DataTableGenericFilter.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik
@@ -132,7 +132,7 @@ class Piwik_API_DataTableGenericFilter
                 }
 
                 try {
-                    $value = Piwik_Common::getRequestVar($name, $defaultValue, $type, $this->request);
+                    $value = Common::getRequestVar($name, $defaultValue, $type, $this->request);
                     settype($value, $type);
                     $filterParameters[] = $value;
                 } catch (Exception $e) {
diff --git a/core/API/DataTableManipulator/LabelFilter.php b/core/API/DataTableManipulator/LabelFilter.php
index 1d6ca323d9..43f43ce056 100644
--- a/core/API/DataTableManipulator/LabelFilter.php
+++ b/core/API/DataTableManipulator/LabelFilter.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * This class is responsible for handling the label parameter that can be
@@ -120,7 +120,7 @@ class Piwik_API_DataTableManipulator_LabelFilter extends Piwik_API_DataTableMani
         $label = urldecode($label);
         $label = trim($label);
 
-        $sanitizedLabel = Piwik_Common::sanitizeInputValue( $label );
+        $sanitizedLabel = Common::sanitizeInputValue( $label );
         $variations[] = $sanitizedLabel;
 
         if ($this->apiModule == 'Actions'
diff --git a/core/API/DocumentationGenerator.php b/core/API/DocumentationGenerator.php
index e36023af01..0f40826e22 100644
--- a/core/API/DocumentationGenerator.php
+++ b/core/API/DocumentationGenerator.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik
@@ -27,7 +27,7 @@ class Piwik_API_DocumentationGenerator
     {
         $plugins = Piwik_PluginsManager::getInstance()->getLoadedPluginsName();
         foreach ($plugins as $plugin) {
-            $plugin = Piwik_Common::unprefixClass($plugin);
+            $plugin = Common::unprefixClass($plugin);
             try {
                 Piwik_API_Proxy::getInstance()->registerClass('Piwik_' . $plugin . '_API');
             } catch (Exception $e) {
@@ -52,9 +52,9 @@ class Piwik_API_DocumentationGenerator
         $str = $toc = '';
         $token_auth = "&token_auth=" . Piwik::getCurrentUserTokenAuth();
         $parametersToSet = array(
-            'idSite' => Piwik_Common::getRequestVar('idSite', 1, 'int'),
-            'period' => Piwik_Common::getRequestVar('period', 'day', 'string'),
-            'date'   => Piwik_Common::getRequestVar('date', 'today', 'string')
+            'idSite' => Common::getRequestVar('idSite', 1, 'int'),
+            'period' => Common::getRequestVar('period', 'day', 'string'),
+            'date'   => Common::getRequestVar('date', 'today', 'string')
         );
 
         foreach (Piwik_API_Proxy::getInstance()->getMetadata() as $class => $info) {
diff --git a/core/API/Proxy.php b/core/API/Proxy.php
index 16a0f6dd32..ae07892e3d 100644
--- a/core/API/Proxy.php
+++ b/core/API/Proxy.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * To differentiate between "no value" and default value of null
@@ -281,7 +281,7 @@ class Piwik_API_Proxy
         foreach ($requiredParameters as $name => $defaultValue) {
             try {
                 if ($defaultValue instanceof Piwik_API_Proxy_NoDefaultValue) {
-                    $requestValue = Piwik_Common::getRequestVar($name, null, null, $parametersRequest);
+                    $requestValue = Common::getRequestVar($name, null, null, $parametersRequest);
                 } else {
                     try {
 
@@ -289,7 +289,7 @@ class Piwik_API_Proxy
                             // segment parameter is an exception: we do not want to sanitize user input or it would break the segment encoding
                             $requestValue = ($parametersRequest['segment']);
                         } else {
-                            $requestValue = Piwik_Common::getRequestVar($name, $defaultValue, null, $parametersRequest);
+                            $requestValue = Common::getRequestVar($name, $defaultValue, null, $parametersRequest);
                         }
                     } catch (Exception $e) {
                         // Special case: empty parameter in the URL, should return the empty string
diff --git a/core/API/Request.php b/core/API/Request.php
index 19bf6634ca..184a566d09 100644
--- a/core/API/Request.php
+++ b/core/API/Request.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * An API request is the object used to make a call to the API and get the result.
@@ -70,7 +70,7 @@ class Piwik_API_Request
             $request = trim($request);
             $request = str_replace(array("\n", "\t"), '', $request);
 
-            $requestParsed = Piwik_Common::getArrayFromQueryString($request);
+            $requestParsed = Common::getArrayFromQueryString($request);
             $requestArray = $requestParsed + $defaultRequest;
 
         }
@@ -125,14 +125,14 @@ class Piwik_API_Request
     public function process()
     {
         // read the format requested for the output data
-        $outputFormat = strtolower(Piwik_Common::getRequestVar('format', 'xml', 'string', $this->request));
+        $outputFormat = strtolower(Common::getRequestVar('format', 'xml', 'string', $this->request));
 
         // create the response
         $response = new Piwik_API_ResponseBuilder($outputFormat, $this->request);
 
         try {
             // read parameters
-            $moduleMethod = Piwik_Common::getRequestVar('method', null, 'string', $this->request);
+            $moduleMethod = Common::getRequestVar('method', null, 'string', $this->request);
 
             list($module, $method) = $this->extractModuleAndMethod($moduleMethod);
 
@@ -164,7 +164,7 @@ class Piwik_API_Request
     static public function reloadAuthUsingTokenAuth($request = null)
     {
         // if a token_auth is specified in the API request, we load the right permissions
-        $token_auth = Piwik_Common::getRequestVar('token_auth', '', 'string', $request);
+        $token_auth = Common::getRequestVar('token_auth', '', 'string', $request);
         if ($token_auth) {
             Piwik_PostEvent('API.Request.authenticate', array($token_auth));
             Piwik_Access::getInstance()->reloadAccess();
@@ -217,7 +217,7 @@ class Piwik_API_Request
         if(empty($_SERVER['QUERY_STRING'])) {
             return array();
         }
-        $GET = Piwik_Common::getArrayFromQueryString($_SERVER['QUERY_STRING']);
+        $GET = Common::getArrayFromQueryString($_SERVER['QUERY_STRING']);
         return $GET;
     }
     
diff --git a/core/API/ResponseBuilder.php b/core/API/ResponseBuilder.php
index d4082226d1..f826319fca 100644
--- a/core/API/ResponseBuilder.php
+++ b/core/API/ResponseBuilder.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik
@@ -164,7 +164,7 @@ class Piwik_API_ResponseBuilder
      */
     protected function caseRendererPHPSerialize($defaultSerializeValue = 1)
     {
-        $serialize = Piwik_Common::getRequestVar('serialize', $defaultSerializeValue, 'int', $this->request);
+        $serialize = Common::getRequestVar('serialize', $defaultSerializeValue, 'int', $this->request);
         if ($serialize) {
             return true;
         }
@@ -190,27 +190,27 @@ class Piwik_API_ResponseBuilder
             return $dataTable;
         }
 
-        $method = Piwik_Common::getRequestVar('method', '', 'string', $this->request);
+        $method = Common::getRequestVar('method', '', 'string', $this->request);
 
         $renderer = Piwik_DataTable_Renderer::factory($format);
         $renderer->setTable($dataTable);
-        $renderer->setRenderSubTables(Piwik_Common::getRequestVar('expanded', false, 'int', $this->request));
-        $renderer->setHideIdSubDatableFromResponse(Piwik_Common::getRequestVar('hideIdSubDatable', false, 'int', $this->request));
+        $renderer->setRenderSubTables(Common::getRequestVar('expanded', false, 'int', $this->request));
+        $renderer->setHideIdSubDatableFromResponse(Common::getRequestVar('hideIdSubDatable', false, 'int', $this->request));
 
         if ($format == 'php') {
             $renderer->setSerialize($this->caseRendererPHPSerialize());
-            $renderer->setPrettyDisplay(Piwik_Common::getRequestVar('prettyDisplay', false, 'int', $this->request));
+            $renderer->setPrettyDisplay(Common::getRequestVar('prettyDisplay', false, 'int', $this->request));
         } else if ($format == 'html') {
             $renderer->setTableId($this->request['method']);
         } else if ($format == 'csv' || $format == 'tsv') {
-            $renderer->setConvertToUnicode(Piwik_Common::getRequestVar('convertToUnicode', true, 'int', $this->request));
+            $renderer->setConvertToUnicode(Common::getRequestVar('convertToUnicode', true, 'int', $this->request));
         }
 
         // prepare translation of column names
         if ($format == 'html' || $format == 'csv' || $format == 'tsv' || $format = 'rss') {
             $renderer->setApiMethod($method);
-            $renderer->setIdSite(Piwik_Common::getRequestVar('idSite', false, 'int', $this->request));
-            $renderer->setTranslateColumnNames(Piwik_Common::getRequestVar('translateColumnNames', false, 'int', $this->request));
+            $renderer->setIdSite(Common::getRequestVar('idSite', false, 'int', $this->request));
+            $renderer->setTranslateColumnNames(Common::getRequestVar('translateColumnNames', false, 'int', $this->request));
         }
 
         return $renderer->render();
@@ -282,16 +282,16 @@ class Piwik_API_ResponseBuilder
     protected function handleDataTable($datatable)
     {
         // if requested, flatten nested tables
-        if (Piwik_Common::getRequestVar('flat', '0', 'string', $this->request) == '1') {
+        if (Common::getRequestVar('flat', '0', 'string', $this->request) == '1') {
             $flattener = new Piwik_API_DataTableManipulator_Flattener($this->apiModule, $this->apiMethod, $this->request);
-            if (Piwik_Common::getRequestVar('include_aggregate_rows', '0', 'string', $this->request) == '1') {
+            if (Common::getRequestVar('include_aggregate_rows', '0', 'string', $this->request) == '1') {
                 $flattener->includeAggregateRows();
             }
             $datatable = $flattener->flatten($datatable);
         }
 
         // if the flag disable_generic_filters is defined we skip the generic filters
-        if (0 == Piwik_Common::getRequestVar('disable_generic_filters', '0', 'string', $this->request)) {
+        if (0 == Common::getRequestVar('disable_generic_filters', '0', 'string', $this->request)) {
             $genericFilter = new Piwik_API_DataTableGenericFilter($this->request);
             $genericFilter->filter($datatable);
         }
@@ -300,14 +300,14 @@ class Piwik_API_ResponseBuilder
         $datatable->queueFilter('SafeDecodeLabel');
 
         // if the flag disable_queued_filters is defined we skip the filters that were queued
-        if (Piwik_Common::getRequestVar('disable_queued_filters', 'false', 'string', $this->request) == 'false') {
+        if (Common::getRequestVar('disable_queued_filters', 'false', 'string', $this->request) == 'false') {
             $datatable->applyQueuedFilters();
         }
 
         // use the ColumnDelete filter if hideColumns/showColumns is provided (must be done
         // after queued filters are run so processed metrics can be removed, too)
-        $hideColumns = Piwik_Common::getRequestVar('hideColumns', '', 'string', $this->request);
-        $showColumns = Piwik_Common::getRequestVar('showColumns', '', 'string', $this->request);
+        $hideColumns = Common::getRequestVar('hideColumns', '', 'string', $this->request);
+        $showColumns = Common::getRequestVar('showColumns', '', 'string', $this->request);
         if ($hideColumns !== '' || $showColumns !== '') {
             $datatable->filter('ColumnDelete', array($hideColumns, $showColumns));
         }
@@ -315,7 +315,7 @@ class Piwik_API_ResponseBuilder
         // apply label filter: only return rows matching the label parameter (more than one if more than one label)
         $label = $this->getLabelFromRequest($this->request);
         if (!empty($label)) {
-            $addLabelIndex = Piwik_Common::getRequestVar('labelFilterAddLabelIndex', 0, 'int', $this->request) == 1;
+            $addLabelIndex = Common::getRequestVar('labelFilterAddLabelIndex', 0, 'int', $this->request) == 1;
 
             $filter = new Piwik_API_DataTableManipulator_LabelFilter($this->apiModule, $this->apiMethod, $this->request);
             $datatable = $filter->filter($label, $datatable, $addLabelIndex);
@@ -437,7 +437,7 @@ class Piwik_API_ResponseBuilder
                 // Case dimension is a PHP array
                 case (is_array($value)):
 
-                    $json .= Piwik_Common::json_encode($value);
+                    $json .= Common::json_encode($value);
                     break;
 
                 // Case dimension is a Piwik_DataTable_Array or a Piwik_DataTable
@@ -452,7 +452,7 @@ class Piwik_API_ResponseBuilder
                 // Case scalar
                 default:
 
-                    $json .= Piwik_Common::json_encode($value);
+                    $json .= Common::json_encode($value);
                     break;
             }
 
@@ -479,9 +479,9 @@ class Piwik_API_ResponseBuilder
      */
     static public function getLabelFromRequest($request)
     {
-        $label = Piwik_Common::getRequestVar('label', array(), 'array', $request);
+        $label = Common::getRequestVar('label', array(), 'array', $request);
         if (empty($label)) {
-            $label = Piwik_Common::getRequestVar('label', '', 'string', $request);
+            $label = Common::getRequestVar('label', '', 'string', $request);
             if (!empty($label)) {
                 $label = array($label);
             }
@@ -496,7 +496,7 @@ class Piwik_API_ResponseBuilder
         // this is needed because Piwik_API_Proxy uses Piwik_Common::getRequestVar which in turn
         // uses Piwik_Common::sanitizeInputValue. This causes the > that separates recursive labels
         // to become &gt; and we need to undo that here.
-        $label = Piwik_Common::unsanitizeInputValues($label);
+        $label = Common::unsanitizeInputValues($label);
         return $label;
     }
 }
diff --git a/core/Access.php b/core/Access.php
index 52ef921eba..10f798e937 100644
--- a/core/Access.php
+++ b/core/Access.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Class to handle User Access:
@@ -195,8 +195,8 @@ class Piwik_Access
     public static function getSqlAccessSite($select)
     {
         return "SELECT " . $select . "
-						  FROM " . Piwik_Common::prefixTable('access') . " as t1
-							JOIN " . Piwik_Common::prefixTable('site') . " as t2 USING (idsite) " .
+						  FROM " . Common::prefixTable('access') . " as t1
+							JOIN " . Common::prefixTable('site') . " as t2 USING (idsite) " .
             " WHERE login = ?";
     }
 
diff --git a/core/ArchiveProcessor/Rules.php b/core/ArchiveProcessor/Rules.php
index e1a1b2004b..34abbec536 100644
--- a/core/ArchiveProcessor/Rules.php
+++ b/core/ArchiveProcessor/Rules.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * This class contains Archiving rules/logic which are used in several places
@@ -205,9 +205,9 @@ class Piwik_ArchiveProcessor_Rules
     {
         return !self::$archivingDisabledByTests &&
             (Piwik_ArchiveProcessor_Rules::isBrowserTriggerEnabled()
-                || Piwik_Common::isPhpCliMode()
+                || Common::isPhpCliMode()
                 || (Piwik::isUserIsSuperUser()
-                    && Piwik_Common::isArchivePhpTriggered()));
+                    && Common::isArchivePhpTriggered()));
     }
 
     public static function isBrowserTriggerEnabled()
diff --git a/core/AssetManager.php b/core/AssetManager.php
index 6a62cb176f..1c50f69ce6 100644
--- a/core/AssetManager.php
+++ b/core/AssetManager.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see libs/jsmin/jsmin.php
@@ -82,7 +82,7 @@ class Piwik_AssetManager
     public static function generateAssetsCacheBuster()
     {
         $pluginList = md5(implode(",", Piwik_PluginsManager::getInstance()->getLoadedPluginsName()));
-        $cacheBuster = md5(Piwik_Common::getSalt() . $pluginList . PHP_VERSION . Piwik_Version::VERSION);
+        $cacheBuster = md5(Common::getSalt() . $pluginList . PHP_VERSION . Piwik_Version::VERSION);
         return $cacheBuster;
     }
 
@@ -430,7 +430,7 @@ class Piwik_AssetManager
         $mergedFileDirectory = PIWIK_USER_PATH . '/' . self::MERGED_FILE_DIR;
 
         if (!is_dir($mergedFileDirectory)) {
-            Piwik_Common::mkdir($mergedFileDirectory);
+            Common::mkdir($mergedFileDirectory);
         }
 
         if (!is_writable($mergedFileDirectory)) {
diff --git a/core/CacheFile.php b/core/CacheFile.php
index a7697084cd..21dafedf65 100644
--- a/core/CacheFile.php
+++ b/core/CacheFile.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Code originally inspired from OpenX
@@ -91,7 +91,7 @@ class Piwik_CacheFile
 
     protected function cleanupId($id)
     {
-        if (!Piwik_Common::isValidFilename($id)) {
+        if (!Common::isValidFilename($id)) {
             throw new Exception("Invalid cache ID request $id");
         }
         return $id;
@@ -110,7 +110,7 @@ class Piwik_CacheFile
             return false;
         }
         if (!is_dir($this->cachePath)) {
-            Piwik_Common::mkdir($this->cachePath);
+            Common::mkdir($this->cachePath);
         }
         if (!is_writable($this->cachePath)) {
             return false;
diff --git a/core/Common.php b/core/Common.php
index 36c3c97db4..bad3bf28ed 100644
--- a/core/Common.php
+++ b/core/Common.php
@@ -16,7 +16,7 @@ namespace Piwik\Core {
      *
      * @package Piwik
      */
-    class Piwik_Common
+    class Common
     {
         const CLASSES_PREFIX = 'Piwik_';
 
@@ -185,10 +185,10 @@ namespace Piwik\Core {
                     $value = false;
                 }
                 if (!empty($name)) {
-                    $name = \Piwik\Core\Piwik_Common::sanitizeInputValue($name);
+                    $name = \Piwik\Core\Common::sanitizeInputValue($name);
                 }
                 if (!empty($value)) {
-                    $value = \Piwik\Core\Piwik_Common::sanitizeInputValue($value);
+                    $value = \Piwik\Core\Common::sanitizeInputValue($value);
                 }
 
                 // if array without indexes
@@ -497,7 +497,7 @@ namespace Piwik\Core {
             // $_GET and $_REQUEST already urldecode()'d
             // decode
             // note: before php 5.2.7, htmlspecialchars() double encodes &#x hex items
-            $value = html_entity_decode($value, \Piwik\Core\Piwik_Common::HTML_ENCODING_QUOTE_STYLE, 'UTF-8');
+            $value = html_entity_decode($value, \Piwik\Core\Common::HTML_ENCODING_QUOTE_STYLE, 'UTF-8');
 
             // filter
             $value = str_replace(array("\n", "\r", "\0"), '', $value);
@@ -611,7 +611,7 @@ namespace Piwik\Core {
             // we deal w/ json differently
             if ($varType == 'json') {
                 $value = \Piwik\Core\self::undoMagicQuotes($requestArrayToUse[$varName]);
-                $value = \Piwik\Core\Piwik_Common::json_decode($value, $assoc = true);
+                $value = \Piwik\Core\Common::json_decode($value, $assoc = true);
                 return \Piwik\Core\self::sanitizeInputValues($value, $alreadyStripslashed = true);
             }
 
diff --git a/core/Controller.php b/core/Controller.php
index bfb37b59d8..651351be5f 100644
--- a/core/Controller.php
+++ b/core/Controller.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Parent class of all plugins Controllers (located in /plugins/PluginName/Controller.php
@@ -62,9 +62,9 @@ abstract class Piwik_Controller
     {
         $aPluginName = explode('_', get_class($this));
         $this->pluginName = $aPluginName[1];
-        $date = Piwik_Common::getRequestVar('date', 'yesterday', 'string');
+        $date = Common::getRequestVar('date', 'yesterday', 'string');
         try {
-            $this->idSite = Piwik_Common::getRequestVar('idSite', false, 'int');
+            $this->idSite = Common::getRequestVar('idSite', false, 'int');
             $this->site = new Piwik_Site($this->idSite);
             $date = $this->getDateParameterInTimezone($date, $this->site->getTimezone());
             $this->setDate($date);
@@ -198,9 +198,9 @@ abstract class Piwik_Controller
         $_GET['columns'] = implode(',', $columnsToDisplay);
 
         // load translations from meta data
-        $idSite = Piwik_Common::getRequestVar('idSite');
-        $period = Piwik_Common::getRequestVar('period');
-        $date = Piwik_Common::getRequestVar('date');
+        $idSite = Common::getRequestVar('idSite');
+        $period = Common::getRequestVar('period');
+        $date = Common::getRequestVar('date');
         $meta = Piwik_API_API::getInstance()->getReportMetadata($idSite, $period, $date);
 
         $columns = array_merge($columnsToDisplay, $selectableColumns);
@@ -254,7 +254,7 @@ abstract class Piwik_Controller
     protected function getGraphParamsModified($paramsToSet = array())
     {
         if (!isset($paramsToSet['period'])) {
-            $period = Piwik_Common::getRequestVar('period');
+            $period = Common::getRequestVar('period');
         } else {
             $period = $paramsToSet['period'];
         }
@@ -396,8 +396,8 @@ abstract class Piwik_Controller
             }
             $this->setPeriodVariablesView($view);
 
-            $rawDate = Piwik_Common::getRequestVar('date');
-            $periodStr = Piwik_Common::getRequestVar('period');
+            $rawDate = Common::getRequestVar('date');
+            $periodStr = Common::getRequestVar('period');
             if ($periodStr != 'range') {
                 $date = Piwik_Date::factory($this->strDate);
                 $period = Piwik_Period::factory($periodStr, $date);
@@ -484,7 +484,7 @@ abstract class Piwik_Controller
         if (!$view->isValidHost) {
             // invalid host, so display warning to user
             $validHost = Config::getInstance()->General['trusted_hosts'][0];
-            $invalidHost = Piwik_Common::sanitizeInputValue($_SERVER['HTTP_HOST']);
+            $invalidHost = Common::sanitizeInputValue($_SERVER['HTTP_HOST']);
 
             $emailSubject = rawurlencode(Piwik_Translate('CoreHome_InjectedHostEmailSubject', $invalidHost));
             $emailBody = rawurlencode(Piwik_Translate('CoreHome_InjectedHostEmailBody'));
@@ -496,8 +496,8 @@ abstract class Piwik_Controller
             $invalidUrl = Piwik_Url::getCurrentUrlWithoutQueryString($checkIfTrusted = false);
             $validUrl = Piwik_Url::getCurrentScheme() . '://' . $validHost
                 . Piwik_Url::getCurrentScriptName();
-            $invalidUrl = Piwik_Common::sanitizeInputValue($invalidUrl);
-            $validUrl = Piwik_Common::sanitizeInputValue($validUrl);
+            $invalidUrl = Common::sanitizeInputValue($invalidUrl);
+            $validUrl = Common::sanitizeInputValue($validUrl);
 
             $changeTrustedHostsUrl = "index.php"
                 . Piwik_Url::getCurrentQueryStringWithParametersModified(array(
@@ -553,7 +553,7 @@ abstract class Piwik_Controller
             return;
         }
 
-        $currentPeriod = Piwik_Common::getRequestVar('period');
+        $currentPeriod = Common::getRequestVar('period');
         $view->displayUniqueVisitors = Piwik::isUniqueVisitorsEnabled($currentPeriod);
         $availablePeriods = array('day', 'week', 'month', 'year', 'range');
         if (!in_array($currentPeriod, $availablePeriods)) {
@@ -594,7 +594,7 @@ abstract class Piwik_Controller
                                                $metricsForAllPeriods = array('nb_visits', 'nb_actions'), $labelDisplayed = true)
     {
         // columns is set in the request if metrics picker has been used
-        $columns = Piwik_Common::getRequestVar('columns', false);
+        $columns = Common::getRequestVar('columns', false);
         if ($columns !== false) {
             $columns = Piwik::getArrayFromApiParameter($columns);
             $firstColumn = $columns[0];
@@ -669,7 +669,7 @@ abstract class Piwik_Controller
 
         if (Piwik::isUserIsSuperUser()) {
             Piwik_ExitWithMessage("Error: no website was found in this Piwik installation.
-			<br />Check the table '" . Piwik_Common::prefixTable('site') . "' in your database, it should contain your Piwik websites.", false, true);
+			<br />Check the table '" . Common::prefixTable('site') . "' in your database, it should contain your Piwik websites.", false, true);
         }
 
         $currentLogin = Piwik::getCurrentUserLogin();
@@ -769,7 +769,7 @@ abstract class Piwik_Controller
      */
     protected function checkTokenInUrl()
     {
-        if (Piwik_Common::getRequestVar('token_auth', false) != Piwik::getCurrentUserTokenAuth()) {
+        if (Common::getRequestVar('token_auth', false) != Piwik::getCurrentUserTokenAuth()) {
             throw new Piwik_Access_NoAccessException(Piwik_TranslateException('General_ExceptionInvalidToken'));
         }
     }
diff --git a/core/Cookie.php b/core/Cookie.php
index 8165a6bc36..d68d97a28e 100644
--- a/core/Cookie.php
+++ b/core/Cookie.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Simple class to handle the cookies:
@@ -156,7 +156,7 @@ class Piwik_Cookie
             . (!$Secure ? '' : '; secure')
             . (!$HTTPOnly ? '' : '; HttpOnly');
 
-        Piwik_Common::sendHeader($header, false);
+        Common::sendHeader($header, false);
     }
 
     /**
@@ -164,7 +164,7 @@ class Piwik_Cookie
      */
     protected function setP3PHeader()
     {
-        Piwik_Common::sendHeader("P3P: CP='OTI DSP COR NID STP UNI OTPa OUR'");
+        Common::sendHeader("P3P: CP='OTI DSP COR NID STP UNI OTPa OUR'");
     }
 
     /**
@@ -204,7 +204,7 @@ class Piwik_Cookie
     {
         $signature = substr($content, -40);
         if (substr($content, -43, 3) == self::VALUE_SEPARATOR . '_=' &&
-            $signature == sha1(substr($content, 0, -40) . Piwik_Common::getSalt())
+            $signature == sha1(substr($content, 0, -40) . Common::getSalt())
         ) {
             // strip trailing: VALUE_SEPARATOR '_=' signature"
             return substr($content, 0, -43);
@@ -270,7 +270,7 @@ class Piwik_Cookie
             $cookieStr .= '_=';
 
             // sign cookie
-            $signature = sha1($cookieStr . Piwik_Common::getSalt());
+            $signature = sha1($cookieStr . Common::getSalt());
             return $cookieStr . $signature;
         }
 
@@ -381,6 +381,6 @@ class Piwik_Cookie
      */
     protected static function escapeValue($value)
     {
-        return Piwik_Common::sanitizeInputValues($value);
+        return Common::sanitizeInputValues($value);
     }
 }
diff --git a/core/DataAccess/ArchiveSelector.php b/core/DataAccess/ArchiveSelector.php
index 46b677d7e8..f0241bd06f 100644
--- a/core/DataAccess/ArchiveSelector.php
+++ b/core/DataAccess/ArchiveSelector.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Data Access object used to query archives
@@ -200,7 +200,7 @@ class Piwik_DataAccess_ArchiveSelector
     static public function getArchiveData($archiveIds, $recordNames, $archiveDataType, $loadAllSubtables)
     {
         // create the SQL to select archive data
-        $inNames = Piwik_Common::getSqlStringFieldsArray($recordNames);
+        $inNames = Common::getSqlStringFieldsArray($recordNames);
         if ($loadAllSubtables) {
             $name = reset($recordNames);
 
diff --git a/core/DataAccess/ArchiveTableCreator.php b/core/DataAccess/ArchiveTableCreator.php
index e501a9b28a..cbcb25c8ac 100644
--- a/core/DataAccess/ArchiveTableCreator.php
+++ b/core/DataAccess/ArchiveTableCreator.php
@@ -1,6 +1,6 @@
 <?php
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -34,7 +34,7 @@ class Piwik_DataAccess_ArchiveTableCreator
     {
         $tableNamePrefix = "archive_" . $type;
         $tableName = $tableNamePrefix . "_" . $date->toString('Y_m');
-        $tableName = Piwik_Common::prefixTable($tableName);
+        $tableName = Common::prefixTable($tableName);
         self::createArchiveTablesIfAbsent($tableName, $tableNamePrefix);
         return $tableName;
     }
@@ -50,7 +50,7 @@ class Piwik_DataAccess_ArchiveTableCreator
             $sql = Piwik::getTableCreateSql($tableNamePrefix);
 
             // replace table name template by real name
-            $tableNamePrefix = Piwik_Common::prefixTable($tableNamePrefix);
+            $tableNamePrefix = Common::prefixTable($tableNamePrefix);
             $sql = str_replace($tableNamePrefix, $tableName, $sql);
             try {
                 $db->query($sql);
@@ -96,7 +96,7 @@ class Piwik_DataAccess_ArchiveTableCreator
 
     static public function getDateFromTableName($tableName)
     {
-        $tableName = Piwik_Common::unprefixTable($tableName);
+        $tableName = Common::unprefixTable($tableName);
         $date = str_replace(array('archive_numeric_', 'archive_blob_'), '', $tableName);
         return $date;
     }
diff --git a/core/DataAccess/ArchiveWriter.php b/core/DataAccess/ArchiveWriter.php
index 413f9d76eb..edf6c1ffac 100644
--- a/core/DataAccess/ArchiveWriter.php
+++ b/core/DataAccess/ArchiveWriter.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * This class is used to create a new Archive.
@@ -78,7 +78,7 @@ class Piwik_DataAccess_ArchiveWriter
         $idSite = $this->idSite;
 
         $db = Zend_Registry::get('db');
-        $locked = self::PREFIX_SQL_LOCK . Piwik_Common::generateUniqId();
+        $locked = self::PREFIX_SQL_LOCK . Common::generateUniqId();
         $date = date("Y-m-d H:i:s");
         $dbLockName = "allocateNewArchiveId.$numericTable";
 
@@ -125,7 +125,7 @@ class Piwik_DataAccess_ArchiveWriter
             . $period->getId() . '/'
             . $period->getDateStart()->toString('Y-m-d') . ','
             . $period->getDateEnd()->toString('Y-m-d');
-        return $lockName . '/' . md5($lockName . Piwik_Common::getSalt());
+        return $lockName . '/' . md5($lockName . Common::getSalt());
     }
 
     public function finalizeArchive()
diff --git a/core/DataAccess/LogAggregator.php b/core/DataAccess/LogAggregator.php
index 2992aa203c..1378a59c3f 100644
--- a/core/DataAccess/LogAggregator.php
+++ b/core/DataAccess/LogAggregator.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * This class queries the Visitor logs tables (visits, actions, conversions, ecommerce)
@@ -312,8 +312,8 @@ class Piwik_DataAccess_LogAggregator
 						count(distinct idorder) as `" . Piwik_Metrics::INDEX_ECOMMERCE_ORDERS . "`,
 						count(idvisit) as `" . Piwik_Metrics::INDEX_NB_VISITS . "`,
 						case idorder when '0' then " . Piwik_Tracker_GoalManager::IDGOAL_CART . " else " . Piwik_Tracker_GoalManager::IDGOAL_ORDER . " end as ecommerceType
-			 	FROM " . Piwik_Common::prefixTable('log_conversion_item') . "
-			 		LEFT JOIN " . Piwik_Common::prefixTable('log_action') . "
+			 	FROM " . Common::prefixTable('log_conversion_item') . "
+			 		LEFT JOIN " . Common::prefixTable('log_action') . "
 			 		ON $field = idaction
 			 	WHERE server_time >= ?
 						AND server_time <= ?
diff --git a/core/DataTable/Renderer/Csv.php b/core/DataTable/Renderer/Csv.php
index 555f35a71a..38c97fa2fc 100644
--- a/core/DataTable/Renderer/Csv.php
+++ b/core/DataTable/Renderer/Csv.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * CSV export
@@ -345,8 +345,8 @@ class Piwik_DataTable_Renderer_Csv extends Piwik_DataTable_Renderer
     {
         $fileName = 'Piwik ' . Piwik_Translate('General_Export');
 
-        $period = Piwik_Common::getRequestVar('period', false);
-        $date = Piwik_Common::getRequestVar('date', false);
+        $period = Common::getRequestVar('period', false);
+        $date = Common::getRequestVar('date', false);
         if ($period || $date) // in test cases, there are no request params set
         {
             if ($period == 'range') {
diff --git a/core/DataTable/Renderer/Json.php b/core/DataTable/Renderer/Json.php
index 6d815ea4bc..2d408d7fda 100644
--- a/core/DataTable/Renderer/Json.php
+++ b/core/DataTable/Renderer/Json.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * JSON export.
@@ -77,7 +77,7 @@ class Piwik_DataTable_Renderer_Json extends Piwik_DataTable_Renderer
         $callback = create_function('&$value,$key', 'if(is_string($value)){$value = html_entity_decode($value, ENT_QUOTES, "UTF-8");}');
         array_walk_recursive($array, $callback);
 
-        $str = Piwik_Common::json_encode($array);
+        $str = Common::json_encode($array);
 
         return $this->jsonpWrap($str);
     }
@@ -88,8 +88,8 @@ class Piwik_DataTable_Renderer_Json extends Piwik_DataTable_Renderer
      */
     protected function jsonpWrap($str)
     {
-        if (($jsonCallback = Piwik_Common::getRequestVar('callback', false)) === false)
-            $jsonCallback = Piwik_Common::getRequestVar('jsoncallback', false);
+        if (($jsonCallback = Common::getRequestVar('callback', false)) === false)
+            $jsonCallback = Common::getRequestVar('jsoncallback', false);
         if ($jsonCallback !== false) {
             if (preg_match('/^[0-9a-zA-Z_]*$/D', $jsonCallback) > 0) {
                 $str = $jsonCallback . "(" . $str . ")";
diff --git a/core/DataTable/Renderer/Rss.php b/core/DataTable/Renderer/Rss.php
index 4ea2c0453c..662ad0ad82 100644
--- a/core/DataTable/Renderer/Rss.php
+++ b/core/DataTable/Renderer/Rss.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * RSS Feed.
@@ -59,8 +59,8 @@ class Piwik_DataTable_Renderer_Rss extends Piwik_DataTable_Renderer
                 "\nPlease specify only one idSite or consider using &format=XML instead.");
         }
 
-        $idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
-        $period = Piwik_Common::getRequestVar('period');
+        $idSite = Common::getRequestVar('idSite', 1, 'int');
+        $period = Common::getRequestVar('period');
 
         $piwikUrl = Piwik_Url::getCurrentUrlWithoutFileName()
             . "?module=CoreHome&action=index&idSite=" . $idSite . "&period=" . $period;
@@ -73,7 +73,7 @@ class Piwik_DataTable_Renderer_Rss extends Piwik_DataTable_Renderer
             $pudDate = date('r', $timestamp);
 
             $dateInSiteTimezone = Piwik_Date::factory($timestamp)->setTimezone($site->getTimezone())->toString('Y-m-d');
-            $thisPiwikUrl = Piwik_Common::sanitizeInputValue($piwikUrl . "&date=$dateInSiteTimezone");
+            $thisPiwikUrl = Common::sanitizeInputValue($piwikUrl . "&date=$dateInSiteTimezone");
             $siteName = $site->getName();
             $title = $siteName . " on " . $date;
 
@@ -85,7 +85,7 @@ class Piwik_DataTable_Renderer_Rss extends Piwik_DataTable_Renderer
 		<author>http://piwik.org</author>
 		<description>";
 
-            $out .= Piwik_Common::sanitizeInputValue($this->renderDataTable($subtable));
+            $out .= Common::sanitizeInputValue($this->renderDataTable($subtable));
             $out .= "</description>\n\t</item>\n";
         }
 
diff --git a/core/Db/Schema/Myisam.php b/core/Db/Schema/Myisam.php
index c8d6d9a040..1758ee384b 100644
--- a/core/Db/Schema/Myisam.php
+++ b/core/Db/Schema/Myisam.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * MySQL schema
@@ -534,7 +534,7 @@ class Piwik_Db_Schema_Myisam implements Piwik_Db_Schema_Interface
         // The anonymous user is the user that is assigned by default
         // note that the token_auth value is anonymous, which is assigned by default as well in the Login plugin
         $db = Zend_Registry::get('db');
-        $db->query("INSERT INTO " . Piwik_Common::prefixTable("user") . "
+        $db->query("INSERT INTO " . Common::prefixTable("user") . "
 					VALUES ( 'anonymous', '', 'anonymous', 'anonymous@example.org', 'anonymous', '" . Piwik_Date::factory('now')->getDatetime() . "' );");
     }
 
diff --git a/core/FrontController.php b/core/FrontController.php
index c201546ed7..6836578670 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see core/PluginsManager.php
@@ -74,11 +74,11 @@ class Piwik_FrontController
 
         if (is_null($module)) {
             $defaultModule = 'CoreHome';
-            $module = Piwik_Common::getRequestVar('module', $defaultModule, 'string');
+            $module = Common::getRequestVar('module', $defaultModule, 'string');
         }
 
         if (is_null($action)) {
-            $action = Piwik_Common::getRequestVar('action', false);
+            $action = Common::getRequestVar('action', false);
         }
 
         if (!Piwik_Session::isFileBasedSessions()
@@ -130,7 +130,7 @@ class Piwik_FrontController
             Piwik_PostEvent('FrontController.NoAccessException', array($e), $pending = true);
         } catch (Exception $e) {
             $debugTrace = $e->getTraceAsString();
-            $message = Piwik_Common::sanitizeInputValue($e->getMessage());
+            $message = Common::sanitizeInputValue($e->getMessage());
             Piwik_ExitWithMessage($message, '' /* $debugTrace */, true);
         }
     }
@@ -178,8 +178,8 @@ class Piwik_FrontController
         // which load the HTML page of the installer with the error.
         // This is at least required for misc/cron/archive.php and useful to all other scripts
         return (defined('PIWIK_ENABLE_DISPATCH') && !PIWIK_ENABLE_DISPATCH)
-            || Piwik_Common::isPhpCliMode()
-            || Piwik_Common::isArchivePhpTriggered();
+            || Common::isPhpCliMode()
+            || Common::isArchivePhpTriggered();
     }
 
     /**
@@ -232,7 +232,7 @@ class Piwik_FrontController
             );
 
             Piwik::dieIfDirectoriesNotWritable($directoriesToCheck);
-            Piwik_Common::assignCliParametersToRequest();
+            Common::assignCliParametersToRequest();
 
             Piwik_Translate::getInstance()->loadEnglishTranslation();
 
@@ -292,7 +292,7 @@ class Piwik_FrontController
 
             // Force the auth to use the token_auth if specified, so that embed dashboard
             // and all other non widgetized controller methods works fine
-            if (($token_auth = Piwik_Common::getRequestVar('token_auth', false, 'string')) !== false) {
+            if (($token_auth = Common::getRequestVar('token_auth', false, 'string')) !== false) {
                 Piwik_API_Request::reloadAuthUsingTokenAuth();
             }
             Piwik::raiseMemoryLimitIfNecessary();
@@ -315,9 +315,9 @@ class Piwik_FrontController
     protected function handleMaintenanceMode()
     {
         if (Config::getInstance()->General['maintenance_mode'] == 1
-            && !Piwik_Common::isPhpCliMode()
+            && !Common::isPhpCliMode()
         ) {
-            $format = Piwik_Common::getRequestVar('format', '');
+            $format = Common::getRequestVar('format', '');
 
             $message = "Piwik is in scheduled maintenance. Please come back later."
                 . " The administrator can disable maintenance by editing the file piwik/config/config.ini.php and removing the following: "
@@ -340,12 +340,12 @@ class Piwik_FrontController
 
     protected function handleSSLRedirection()
     {
-        if (!Piwik_Common::isPhpCliMode()
+        if (!Common::isPhpCliMode()
             && Config::getInstance()->General['force_ssl'] == 1
             && !Piwik::isHttps()
             // Specifically disable for the opt out iframe
-            && !(Piwik_Common::getRequestVar('module', '') == 'CoreAdminHome'
-                && Piwik_Common::getRequestVar('action', '') == 'optOut')
+            && !(Common::getRequestVar('module', '') == 'CoreAdminHome'
+                && Common::getRequestVar('action', '') == 'optOut')
         ) {
             $url = Piwik_Url::getCurrentUrl();
             $url = str_replace("http://", "https://", $url);
diff --git a/core/Http.php b/core/Http.php
index 60f8ea6e65..cc536477f2 100644
--- a/core/Http.php
+++ b/core/Http.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Server-side http client to retrieve content from remote servers, and optionally save to a local file.
@@ -75,7 +75,7 @@ class Piwik_Http
         $file = null;
         if ($destinationPath) {
             // Ensure destination directory exists
-            Piwik_Common::mkdir(dirname($destinationPath));
+            Common::mkdir(dirname($destinationPath));
             if (($file = @fopen($destinationPath, 'wb')) === false || !is_resource($file)) {
                 throw new Exception('Error while creating the file: ' . $destinationPath);
             }
@@ -338,7 +338,7 @@ class Piwik_Http
                     throw new Exception('Timed out waiting for server response');
                 }
 
-                $fileLength += Piwik_Common::strlen($line);
+                $fileLength += Common::strlen($line);
 
                 if (is_resource($file)) {
                     // save to file
@@ -390,13 +390,13 @@ class Piwik_Http
                 $handle = fopen($aUrl, 'rb', false, $ctx);
                 while (!feof($handle)) {
                     $response = fread($handle, 8192);
-                    $fileLength += Piwik_Common::strlen($response);
+                    $fileLength += Common::strlen($response);
                     fwrite($file, $response);
                 }
                 fclose($handle);
             } else {
                 $response = file_get_contents($aUrl, 0, $ctx);
-                $fileLength = Piwik_Common::strlen($response);
+                $fileLength = Common::strlen($response);
             }
 
             // restore the socket_timeout value
@@ -498,7 +498,7 @@ class Piwik_Http
             }
 
             $contentLength = @curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
-            $fileLength = is_resource($file) ? @curl_getinfo($ch, CURLINFO_SIZE_DOWNLOAD) : Piwik_Common::strlen($response);
+            $fileLength = is_resource($file) ? @curl_getinfo($ch, CURLINFO_SIZE_DOWNLOAD) : Common::strlen($response);
             $status = @curl_getinfo($ch, CURLINFO_HTTP_CODE);
 
             @curl_close($ch);
diff --git a/core/IP.php b/core/IP.php
index 3e528eb628..64ca6072ff 100644
--- a/core/IP.php
+++ b/core/IP.php
@@ -10,9 +10,9 @@
  */
 
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
-if (Piwik_Common::isWindows() || !function_exists('inet_ntop')) {
+if (Common::isWindows() || !function_exists('inet_ntop')) {
     function _inet_ntop($in_addr)
     {
         return php_compat_inet_ntop($in_addr);
@@ -23,7 +23,7 @@ if (Piwik_Common::isWindows() || !function_exists('inet_ntop')) {
         return inet_ntop($in_addr);
     }
 }
-if (Piwik_Common::isWindows() || !function_exists('inet_pton')) {
+if (Common::isWindows() || !function_exists('inet_pton')) {
     function _inet_pton($address)
     {
         return php_compat_inet_pton($address);
@@ -137,7 +137,7 @@ class Piwik_IP
         if (($ip = @_inet_pton($ipRangeString)) === false)
             return false;
 
-        $maxbits = Piwik_Common::strlen($ip) * 8;
+        $maxbits = Common::strlen($ip) * 8;
         if (!isset($bits))
             $bits = $maxbits;
 
@@ -230,17 +230,17 @@ class Piwik_IP
     public static function long2ip($ip)
     {
         // IPv4
-        if (Piwik_Common::strlen($ip) == 4) {
+        if (Common::strlen($ip) == 4) {
             return self::N2P($ip);
         }
 
         // IPv6 - transitional address?
-        if (Piwik_Common::strlen($ip) == 16) {
+        if (Common::strlen($ip) == 16) {
             if (substr_compare($ip, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff", 0, 12) === 0
                 || substr_compare($ip, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 0, 12) === 0
             ) {
                 // remap 128-bit IPv4-mapped and IPv4-compat addresses
-                return self::N2P(Piwik_Common::substr($ip, 12));
+                return self::N2P(Common::substr($ip, 12));
             }
         }
 
@@ -298,7 +298,7 @@ class Piwik_IP
             return false;
         }
 
-        $lowLen = Piwik_Common::strlen($low);
+        $lowLen = Common::strlen($low);
         $i = $lowLen - 1;
         $bits = $lowLen * 8 - $bits;
 
@@ -327,7 +327,7 @@ class Piwik_IP
      */
     public static function isIpInRange($ip, $ipRanges)
     {
-        $ipLen = Piwik_Common::strlen($ip);
+        $ipLen = Common::strlen($ip);
         if (empty($ip) || empty($ipRanges) || ($ipLen != 4 && $ipLen != 16)) {
             return false;
         }
@@ -347,7 +347,7 @@ class Piwik_IP
 
             $low = $range[0];
             $high = $range[1];
-            if (Piwik_Common::strlen($low) != $ipLen) {
+            if (Common::strlen($low) != $ipLen) {
                 continue;
             }
 
@@ -423,13 +423,13 @@ class Piwik_IP
         if ($p !== false) {
             $elements = explode(',', $csv);
             for ($i = count($elements); $i--;) {
-                $element = trim(Piwik_Common::sanitizeInputValue($elements[$i]));
+                $element = trim(Common::sanitizeInputValue($elements[$i]));
                 if (empty($excludedIps) || (!in_array($element, $excludedIps) && !self::isIpInRange(self::P2N(self::sanitizeIp($element)), $excludedIps))) {
                     return $element;
                 }
             }
         }
-        return trim(Piwik_Common::sanitizeInputValue($csv));
+        return trim(Common::sanitizeInputValue($csv));
     }
 
     /**
@@ -460,7 +460,7 @@ function php_compat_inet_ntop($in_addr)
 {
     $r = bin2hex($in_addr);
 
-    switch (Piwik_Common::strlen($in_addr)) {
+    switch (Common::strlen($in_addr)) {
         case 4:
             // IPv4 address
             $prefix = '';
diff --git a/core/Log.php b/core/Log.php
index 2707b4a19c..6f0dee2047 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -35,7 +35,7 @@ abstract class Piwik_Log extends Zend_Log
     {
         parent::__construct();
 
-        $this->currentRequestKey = substr(Piwik_Common::generateUniqId(), 0, 8);
+        $this->currentRequestKey = substr(Common::generateUniqId(), 0, 8);
 
         $log_dir = Config::getInstance()->log['logger_file_path'];
         if ($log_dir[0] != '/' && $log_dir[0] != DIRECTORY_SEPARATOR) {
@@ -45,13 +45,13 @@ abstract class Piwik_Log extends Zend_Log
 
         $this->fileFormatter = $fileFormatter;
         $this->screenFormatter = $screenFormatter;
-        $this->logToDatabaseTableName = Piwik_Common::prefixTable($logToDatabaseTableName);
+        $this->logToDatabaseTableName = Common::prefixTable($logToDatabaseTableName);
         $this->logToDatabaseColumnMapping = $logToDatabaseColumnMapping;
     }
 
     function addWriteToFile()
     {
-        Piwik_Common::mkdir(dirname($this->logToFileFilename));
+        Common::mkdir(dirname($this->logToFileFilename));
         $writerFile = new Zend_Log_Writer_Stream($this->logToFileFilename);
         $writerFile->setFormatter($this->fileFormatter);
         $this->addWriter($writerFile);
@@ -176,7 +176,7 @@ class Piwik_Log_Formatter_ScreenFormatter implements Zend_Log_Formatter_Interfac
     function formatEvent($event)
     {
         // no injection in error messages, backtrace when displayed on screen
-        return array_map(array('Piwik\Core\Piwik_Common', 'sanitizeInputValue'), $event);
+        return array_map(array('Piwik\Core\Common', 'sanitizeInputValue'), $event);
     }
 
     function format($string)
@@ -186,7 +186,7 @@ class Piwik_Log_Formatter_ScreenFormatter implements Zend_Log_Formatter_Interfac
 
     static public function getFormattedString($string)
     {
-        if (!Piwik_Common::isPhpCliMode()) {
+        if (!Common::isPhpCliMode()) {
             @header('Content-Type: text/html; charset=utf-8');
         }
         return $string;
diff --git a/core/Log/Exception.php b/core/Log/Exception.php
index 2865ad74a3..b86a3dd6c7 100644
--- a/core/Log/Exception.php
+++ b/core/Log/Exception.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Class used to log an exception event.
@@ -94,7 +94,7 @@ class Piwik_Log_Exception_Formatter_ScreenFormatter extends Piwik_Log_Formatter_
         $event = parent::formatEvent($event);
         $errstr = $event['message'];
 
-        $outputFormat = strtolower(Piwik_Common::getRequestVar('format', 'html', 'string'));
+        $outputFormat = strtolower(Common::getRequestVar('format', 'html', 'string'));
         $response = new Piwik_API_ResponseBuilder($outputFormat);
         $message = $response->getResponseException(new Exception($errstr));
         return parent::format($message);
diff --git a/core/Log/Message.php b/core/Log/Message.php
index 6852f572c0..cc425116be 100644
--- a/core/Log/Message.php
+++ b/core/Log/Message.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Class used to log a standard message event.
@@ -77,14 +77,14 @@ class Piwik_Log_Message_Formatter_ScreenFormatter extends Piwik_Log_Formatter_Sc
         } else {
             $message = $event['message'];
         }
-        if (!Piwik_Common::isPhpCliMode()) {
+        if (!Common::isPhpCliMode()) {
             $message .= "<br/>";
         }
         $message .= "\n";
 
         $memory = '';
         // Hacky: let's hide the memory usage in CLI to hide from the archive.php output
-        if (!Piwik_Common::isPhpCliMode()) {
+        if (!Common::isPhpCliMode()) {
             $memory = '[' . Piwik::getMemoryUsage() . '] ';
         }
         $message = '[' . $event['timestamp'] . '] [' . $event['requestKey'] . '] ' . $memory . $message;
diff --git a/core/Menu/Abstract.php b/core/Menu/Abstract.php
index 1547a27eae..35e677875d 100644
--- a/core/Menu/Abstract.php
+++ b/core/Menu/Abstract.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik_Menu
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_Menu
@@ -56,7 +56,7 @@ abstract class Piwik_Menu_Abstract
     {
         if ($displayedForCurrentUser) {
             // make sure the idSite value used is numeric (hack-y fix for #3426)
-            if (!is_numeric(Piwik_Common::getRequestVar('idSite', false))) {
+            if (!is_numeric(Common::getRequestVar('idSite', false))) {
                 $idSites = Piwik_SitesManager_API::getInstance()->getSitesIdWithAtLeastViewAccess();
                 $url['idSite'] = reset($idSites);
             }
diff --git a/core/Nonce.php b/core/Nonce.php
index 4cb6b440d6..49f52a29b5 100644
--- a/core/Nonce.php
+++ b/core/Nonce.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Nonce class.
@@ -42,7 +42,7 @@ class Piwik_Nonce
         // to handle browser pre-fetch or double fetch caused by some browser add-ons/extensions
         if (empty($nonce)) {
             // generate a new nonce
-            $nonce = md5(Piwik_Common::getSalt() . time() . Piwik_Common::generateUniqId());
+            $nonce = md5(Common::getSalt() . time() . Common::generateUniqId());
             $ns->nonce = $nonce;
             $ns->setExpirationSeconds($ttl, 'nonce');
         }
diff --git a/core/Option.php b/core/Option.php
index 179e25c23c..424d9e1a05 100644
--- a/core/Option.php
+++ b/core/Option.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik_Option provides a very simple mechanism to save/retrieve key-values pair
@@ -69,7 +69,7 @@ class Piwik_Option
             return $this->all[$name];
         }
         $value = Piwik_FetchOne('SELECT option_value ' .
-            'FROM `' . Piwik_Common::prefixTable('option') . '`' .
+            'FROM `' . Common::prefixTable('option') . '`' .
             'WHERE option_name = ?', $name);
         if ($value === false) {
             return false;
@@ -88,7 +88,7 @@ class Piwik_Option
     public function set($name, $value, $autoLoad = 0)
     {
         $autoLoad = (int)$autoLoad;
-        Piwik_Query('INSERT INTO `' . Piwik_Common::prefixTable('option') . '` (option_name, option_value, autoload) ' .
+        Piwik_Query('INSERT INTO `' . Common::prefixTable('option') . '` (option_name, option_value, autoload) ' .
                 ' VALUES (?, ?, ?) ' .
                 ' ON DUPLICATE KEY UPDATE option_value = ?',
             array($name, $value, $autoLoad, $value));
@@ -103,7 +103,7 @@ class Piwik_Option
      */
     public function delete($name, $value = null)
     {
-        $sql = 'DELETE FROM `' . Piwik_Common::prefixTable('option') . '` WHERE option_name = ?';
+        $sql = 'DELETE FROM `' . Common::prefixTable('option') . '` WHERE option_name = ?';
         $bind[] = $name;
 
         if (isset($value)) {
@@ -125,7 +125,7 @@ class Piwik_Option
      */
     public function deleteLike($name, $value = null)
     {
-        $sql = 'DELETE FROM `' . Piwik_Common::prefixTable('option') . '` WHERE option_name LIKE ?';
+        $sql = 'DELETE FROM `' . Common::prefixTable('option') . '` WHERE option_name LIKE ?';
         $bind[] = $name;
 
         if (isset($value)) {
@@ -150,7 +150,7 @@ class Piwik_Option
         }
 
         $all = Piwik_FetchAll('SELECT option_value, option_name
-								FROM `' . Piwik_Common::prefixTable('option') . '`
+								FROM `' . Common::prefixTable('option') . '`
 								WHERE autoload = 1');
         foreach ($all as $option) {
             $this->all[$option['option_name']] = $option['option_value'];
diff --git a/core/Period/Range.php b/core/Period/Range.php
index e126ec835b..f23e3dce69 100644
--- a/core/Period/Range.php
+++ b/core/Period/Range.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * from a starting date to an ending date
@@ -356,11 +356,11 @@ class Piwik_Period_Range extends Piwik_Period
     public static function getLastDate($date = false, $period = false)
     {
         if ($date === false) {
-            $date = Piwik_Common::getRequestVar('date');
+            $date = Common::getRequestVar('date');
         }
 
         if ($period === false) {
-            $period = Piwik_Common::getRequestVar('period');
+            $period = Common::getRequestVar('period');
         }
 
         // can't get the last date for range periods & dates that use lastN/previousN
diff --git a/core/Piwik.php b/core/Piwik.php
index b377cd54a7..6f9ceb3bce 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -16,7 +16,7 @@ use Piwik\Core\Config;
 use Piwik_Access;
 use Piwik_Access_NoAccessException;
 use Piwik_AssetManager;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 use Piwik_Db_Adapter;
 use Piwik_Db_Schema;
 use Piwik_Log_APICall;
@@ -118,10 +118,10 @@ class Piwik
      */
     static public function prefixClass($class)
     {
-        if (!strncmp($class, Piwik_Common::CLASSES_PREFIX, strlen(Piwik_Common::CLASSES_PREFIX))) {
+        if (!strncmp($class, Common::CLASSES_PREFIX, strlen(Common::CLASSES_PREFIX))) {
             return $class;
         }
-        return Piwik_Common::CLASSES_PREFIX . $class;
+        return Common::CLASSES_PREFIX . $class;
     }
 
     /**
@@ -184,15 +184,15 @@ class Piwik
 
         $key = 'piwikUrl';
         $url = Piwik_GetOption($key);
-        if (Piwik_Common::isPhpCliMode()
+        if (Common::isPhpCliMode()
             // in case archive.php is triggered with domain localhost
-            || Piwik_Common::isArchivePhpTriggered()
+            || Common::isArchivePhpTriggered()
             || defined('PIWIK_MODE_ARCHIVE')
         ) {
             return $url;
         }
 
-        $currentUrl = Piwik_Common::sanitizeInputValue(Piwik_Url::getCurrentUrlWithoutFileName());
+        $currentUrl = Common::sanitizeInputValue(Piwik_Url::getCurrentUrlWithoutFileName());
 
         if (empty($url)
             // if URL changes, always update the cache
@@ -272,7 +272,7 @@ class Piwik
     static public function copyRecursive($source, $target, $excludePhp = false)
     {
         if (is_dir($source)) {
-            Piwik_Common::mkdir($target, false);
+            Common::mkdir($target, false);
             $d = dir($source);
             while (false !== ($entry = $d->read())) {
                 if ($entry == '.' || $entry == '..') {
@@ -317,7 +317,7 @@ class Piwik
             @chmod($dest, 0755);
             if (!@copy($source, $dest)) {
                 $message = "Error while creating/copying file to <code>$dest</code>. <br />"
-                    . self::getErrorMessageMissingPermissions(Piwik_Common::getPathToPiwikRoot());
+                    . self::getErrorMessageMissingPermissions(Common::getPathToPiwikRoot());
                 throw new Exception($message);
             }
         }
@@ -334,7 +334,7 @@ class Piwik
     {
         $message = "Please check that the web server has enough permission to write to these files/directories:<br />";
 
-        if (Piwik_Common::isWindows()) {
+        if (Common::isWindows()) {
             $message .= "On Windows, check that the folder is not read only and is writable.
 						You can try to execute:<br />";
         } else {
@@ -406,7 +406,7 @@ class Piwik
      */
     static private function getMakeWritableCommand($realpath)
     {
-        if (Piwik_Common::isWindows()) {
+        if (Common::isWindows()) {
             return "<code>cacls $realpath /t /g " . get_current_user() . ":f</code><br />";
         }
         return "<code>chmod -R 0755 $realpath</code><br />";
@@ -427,15 +427,15 @@ class Piwik
 
         $directoryList = '';
         foreach ($resultCheck as $dir => $bool) {
-            $realpath = Piwik_Common::realpath($dir);
+            $realpath = Common::realpath($dir);
             if (!empty($realpath) && $bool === false) {
                 $directoryList .= self::getMakeWritableCommand($realpath);
             }
         }
 
         // Also give the chown since the chmod is only 755
-        if (!Piwik_Common::isWindows()) {
-            $realpath = Piwik_Common::realpath(PIWIK_INCLUDE_PATH . '/');
+        if (!Common::isWindows()) {
+            $realpath = Common::realpath(PIWIK_INCLUDE_PATH . '/');
             $directoryList = "<code>chown -R www-data:www-data " . $realpath . "</code><br/>" . $directoryList;
         }
 
@@ -467,10 +467,10 @@ class Piwik
             // Create an empty directory
             $isFile = strpos($directoryToCheck, '.') !== false;
             if (!$isFile && !file_exists($directoryToCheck)) {
-                Piwik_Common::mkdir($directoryToCheck);
+                Common::mkdir($directoryToCheck);
             }
 
-            $directory = Piwik_Common::realpath($directoryToCheck);
+            $directory = Common::realpath($directoryToCheck);
             $resultCheck[$directory] = false;
             if ($directory !== false // realpath() returns FALSE on failure
                 && is_writable($directoryToCheck)
@@ -506,7 +506,7 @@ class Piwik
      */
     static public function getAutoUpdateMakeWritableMessage()
     {
-        $realpath = Piwik_Common::realpath(PIWIK_INCLUDE_PATH . '/');
+        $realpath = Common::realpath(PIWIK_INCLUDE_PATH . '/');
         $message = '';
         $message .= "<code>chown -R www-data:www-data " . $realpath . "</code><br />";
         $message .= "<code>chmod -R 0755 " . $realpath . "</code><br />";
@@ -545,7 +545,7 @@ class Piwik
             '/tmp',
         );
         foreach ($directoriesToProtect as $directoryToProtect) {
-            Piwik_Common::createHtAccess(PIWIK_INCLUDE_PATH . $directoryToProtect, $overwrite = true);
+            Common::createHtAccess(PIWIK_INCLUDE_PATH . $directoryToProtect, $overwrite = true);
         }
 
         // Allow/Deny lives in different modules depending on the Apache version
@@ -565,7 +565,7 @@ class Piwik
             '/misc/user' => $denyDirectPhp . $allowStaticAssets,
         );
         foreach ($directoriesToProtect as $directoryToProtect => $content) {
-            Piwik_Common::createHtAccess(PIWIK_INCLUDE_PATH . $directoryToProtect, $overwrite = true, $content);
+            Common::createHtAccess(PIWIK_INCLUDE_PATH . $directoryToProtect, $overwrite = true, $content);
         }
     }
 
@@ -971,7 +971,7 @@ class Piwik
         }
         $minimumMemoryLimit = Config::getInstance()->General['minimum_memory_limit'];
 
-        if (Piwik_Common::isArchivePhpTriggered()
+        if (Common::isArchivePhpTriggered()
             && Piwik::isUserIsSuperUser()
         ) {
             // archive.php: no time limit, high memory limit
@@ -1024,7 +1024,7 @@ class Piwik
     static public function shouldLoggerLog()
     {
         try {
-            $shouldLog = (Piwik_Common::isPhpCliMode()
+            $shouldLog = (Common::isPhpCliMode()
                     || Config::getInstance()->log['log_only_when_cli'] == 0)
                 &&
                 (Config::getInstance()->log['log_only_when_debug_parameter'] == 0
@@ -1115,7 +1115,7 @@ class Piwik
         if (is_null($db)) {
             $db = Piwik_Tracker::getDatabase();
         }
-        $tableName = Piwik_Common::prefixTable('log_profiling');
+        $tableName = Common::prefixTable('log_profiling');
 
         $all = $db->fetchAll('SELECT * FROM ' . $tableName);
         if ($all === false) {
@@ -1499,7 +1499,7 @@ class Piwik
         preg_match('~^(http|https)://(.*)$~D', $piwikUrl, $matches);
         $piwikUrl = @$matches[2];
         $jsCode = str_replace('{$idSite}', $idSite, $jsCode);
-        $jsCode = str_replace('{$piwikUrl}', Piwik_Common::sanitizeInputValue($piwikUrl), $jsCode);
+        $jsCode = str_replace('{$piwikUrl}', Common::sanitizeInputValue($piwikUrl), $jsCode);
         return $jsCode;
     }
 
@@ -1854,7 +1854,7 @@ class Piwik
      */
     static public function getModule()
     {
-        return Piwik_Common::getRequestVar('module', '', 'string');
+        return Common::getRequestVar('module', '', 'string');
     }
 
     /**
@@ -1864,7 +1864,7 @@ class Piwik
      */
     static public function getAction()
     {
-        return Piwik_Common::getRequestVar('action', '', 'string');
+        return Common::getRequestVar('action', '', 'string');
     }
 
     /**
@@ -2229,7 +2229,7 @@ class Piwik
     static public function createTableFromCSVFile($tableName, $fields, $filePath, $fileSpec)
     {
         // On Windows, MySQL expects forward slashes as directory separators
-        if (Piwik_Common::isWindows()) {
+        if (Common::isWindows()) {
             $filePath = str_replace('\\', '/', $filePath);
         }
 
@@ -2320,7 +2320,7 @@ class Piwik
      */
     static public function tableInsertBatch($tableName, $fields, $values, $throwException = false)
     {
-        $filePath = PIWIK_USER_PATH . '/' . Piwik_AssetManager::MERGED_FILE_DIR . $tableName . '-' . Piwik_Common::generateUniqId() . '.csv';
+        $filePath = PIWIK_USER_PATH . '/' . Piwik_AssetManager::MERGED_FILE_DIR . $tableName . '-' . Common::generateUniqId() . '.csv';
 
         if (Zend_Registry::get('db')->hasBulkLoader()) {
             try {
@@ -2385,7 +2385,7 @@ class Piwik
             $query = "INSERT $ignore
 					INTO " . $tableName . "
 					$fieldList
-					VALUES (" . Piwik_Common::getSqlStringFieldsArray($row) . ")";
+					VALUES (" . Common::getSqlStringFieldsArray($row) . ")";
             Piwik_Query($query, $row);
         }
     }
@@ -2408,7 +2408,7 @@ class Piwik
     {
         if (is_null(self::$lockPrivilegeGranted)) {
             try {
-                Piwik_LockTables(Piwik_Common::prefixTable('log_visit'));
+                Piwik_LockTables(Common::prefixTable('log_visit'));
                 Piwik_UnlockAllTables();
 
                 self::$lockPrivilegeGranted = true;
diff --git a/core/Plugin.php b/core/Plugin.php
index 582bb7ff51..51a21b6049 100644
--- a/core/Plugin.php
+++ b/core/Plugin.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see core/Plugin/MetadataLoader.php
@@ -46,7 +46,7 @@ class Piwik_Plugin
     public function __construct($pluginName = false)
     {
         if (empty($pluginName)) {
-            $pluginName = Piwik_Common::unprefixClass(get_class($this));
+            $pluginName = Common::unprefixClass(get_class($this));
         }
         $this->pluginName = $pluginName;
         
diff --git a/core/Plugin/MetadataLoader.php b/core/Plugin/MetadataLoader.php
index e96ce56ec4..5b514b8610 100644
--- a/core/Plugin/MetadataLoader.php
+++ b/core/Plugin/MetadataLoader.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see core/Version.php
@@ -132,7 +132,7 @@ class Piwik_Plugin_MetadataLoader
             return array();
         }
         
-        $info = Piwik_Common::json_decode($json, $assoc = true);
+        $info = Common::json_decode($json, $assoc = true);
         if (!is_array($info)
             || empty($info)
         ) {
diff --git a/core/PluginsArchiver.php b/core/PluginsArchiver.php
index f568ac5459..ad0579e332 100644
--- a/core/PluginsArchiver.php
+++ b/core/PluginsArchiver.php
@@ -10,7 +10,7 @@
  * @package Piwik_PluginArchiver
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Plugins that archive metrics for websites can implement an Archiver that extends this class
@@ -32,7 +32,7 @@ abstract class Piwik_PluginsArchiver
     // todo: review this concept, each plugin should somehow maintain the list of report names they generate
     public function shouldArchive()
     {
-        $pluginName = Piwik_Common::unprefixClass(get_class($this));
+        $pluginName = Common::unprefixClass(get_class($this));
         $pluginName = str_replace("_Archiver", "", $pluginName);
         return $this->getProcessor()->shouldProcessReportsForPlugin($pluginName);
     }
diff --git a/core/PluginsManager.php b/core/PluginsManager.php
index 0d03e46078..ffad1670c2 100644
--- a/core/PluginsManager.php
+++ b/core/PluginsManager.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see core/Menu/Abstract.php
@@ -320,7 +320,7 @@ class Piwik_PluginsManager
     {
         $existingPlugins = $this->readPluginsDirectory();
         $isPluginInFilesystem = array_search($pluginName, $existingPlugins) !== false;
-        return Piwik_Common::isValidFilename($pluginName)
+        return Common::isValidFilename($pluginName)
                 && $isPluginInFilesystem;
     }
 
@@ -496,7 +496,7 @@ class Piwik_PluginsManager
         $pluginFileName = sprintf("%s/%s.php", $pluginName, $pluginName);
         $pluginClassName = sprintf('Piwik_%s', $pluginName);
 
-        if (!Piwik_Common::isValidFilename($pluginName)) {
+        if (!Common::isValidFilename($pluginName)) {
             throw new Exception(sprintf("The plugin filename '%s' is not a valid filename", $pluginFileName));
         }
 
diff --git a/core/ProxyHeaders.php b/core/ProxyHeaders.php
index 4cd540e4da..ae319b986d 100644
--- a/core/ProxyHeaders.php
+++ b/core/ProxyHeaders.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Proxy headers
@@ -24,7 +24,7 @@ class Piwik_ProxyHeaders
      */
     public static function getProtocolInformation()
     {
-        if (Piwik_Common::getRequestVar('clientProtocol', 'http', 'string') == 'https') {
+        if (Common::getRequestVar('clientProtocol', 'http', 'string') == 'https') {
             return 'https';
         }
 
diff --git a/core/ReportRenderer/Pdf.php b/core/ReportRenderer/Pdf.php
index 85a3c9dbda..2b20ecb169 100644
--- a/core/ReportRenderer/Pdf.php
+++ b/core/ReportRenderer/Pdf.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik_ReportRenderer
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see libs/tcpdf
@@ -314,7 +314,7 @@ class Piwik_ReportRenderer_Pdf extends Piwik_ReportRenderer
 
     private function formatText($text)
     {
-        return Piwik_Common::unsanitizeInputValue($text);
+        return Common::unsanitizeInputValue($text);
     }
 
     private function paintReportTable()
@@ -373,7 +373,7 @@ class Piwik_ReportRenderer_Pdf extends Piwik_ReportRenderer
                         if ($logoHeight < 16) {
                             $topMargin = 2;
                         }
-                        $path = Piwik_Common::getPathToPiwikRoot() . "/" . $rowMetadata['logo'];
+                        $path = Common::getPathToPiwikRoot() . "/" . $rowMetadata['logo'];
                         if (file_exists($path)) {
                             $this->TCPDF->Image($path, $posX + ($leftMargin = 2), $posY + $topMargin, $logoWidth / 4);
                         }
diff --git a/core/Segment.php b/core/Segment.php
index f4a2be255e..1e2da61f2d 100644
--- a/core/Segment.php
+++ b/core/Segment.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -241,7 +241,7 @@ class Piwik_Segment
                 // join condition provided
                 $alias = isset($table['tableAlias']) ? $table['tableAlias'] : $table['table'];
                 $sql .= "
-				LEFT JOIN " . Piwik_Common::prefixTable($table['table']) . " AS " . $alias
+				LEFT JOIN " . Common::prefixTable($table['table']) . " AS " . $alias
                     . " ON " . $table['joinOn'];
                 continue;
             }
@@ -250,7 +250,7 @@ class Piwik_Segment
                 throw new Exception("Table '$table' can't be used for segmentation");
             }
 
-            $tableSql = Piwik_Common::prefixTable($table) . " AS $table";
+            $tableSql = Common::prefixTable($table) . " AS $table";
 
             if ($i == 0) {
                 // first table
diff --git a/core/Session.php b/core/Session.php
index 7072c26c53..5f2d362b6b 100644
--- a/core/Session.php
+++ b/core/Session.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Session initialization.
@@ -42,7 +42,7 @@ class Piwik_Session extends Zend_Session
      */
     public static function start($options = false)
     {
-        if (Piwik_Common::isPhpCliMode()
+        if (Common::isPhpCliMode()
             || self::$sessionStarted
             || (defined('PIWIK_ENABLE_SESSION_START') && !PIWIK_ENABLE_SESSION_START)
         ) {
@@ -81,7 +81,7 @@ class Piwik_Session extends Zend_Session
             // for "files", use our own folder to prevent local session file hijacking
             $sessionPath = self::getSessionsDirectory();
             // We always call mkdir since it also chmods the directory which might help when permissions were reverted for some reasons
-            Piwik_Common::mkdir($sessionPath);
+            Common::mkdir($sessionPath);
 
             @ini_set('session.save_handler', 'files');
             @ini_set('session.save_path', $sessionPath);
@@ -95,7 +95,7 @@ class Piwik_Session extends Zend_Session
             $db = Zend_Registry::get('db');
 
             $config = array(
-                'name'           => Piwik_Common::prefixTable('session'),
+                'name'           => Common::prefixTable('session'),
                 'primary'        => 'id',
                 'modifiedColumn' => 'modified',
                 'dataColumn'     => 'data',
@@ -128,7 +128,7 @@ class Piwik_Session extends Zend_Session
 
             $message = sprintf("Error: %s %s %s\n<pre>Debug: the original error was \n%s</pre>",
                 Piwik_Translate('General_ExceptionUnableToStartSession'),
-                Piwik::getErrorMessageMissingPermissions(Piwik_Common::getPathToPiwikRoot() . '/tmp/sessions/'),
+                Piwik::getErrorMessageMissingPermissions(Common::getPathToPiwikRoot() . '/tmp/sessions/'),
                 $enableDbSessions,
                 $e->getMessage()
             );
diff --git a/core/Session/Namespace.php b/core/Session/Namespace.php
index 0b65168ca4..22199fdfd6 100644
--- a/core/Session/Namespace.php
+++ b/core/Session/Namespace.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Session namespace.
@@ -24,7 +24,7 @@ class Piwik_Session_Namespace extends Zend_Session_Namespace
      */
     public function __construct($namespace = 'Default', $singleInstance = false)
     {
-        if (Piwik_Common::isPhpCliMode()) {
+        if (Common::isPhpCliMode()) {
             self::$_readable = true;
             return;
         }
diff --git a/core/Tracker.php b/core/Tracker.php
index f375ea35e4..e82e88f053 100644
--- a/core/Tracker.php
+++ b/core/Tracker.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Class used by the logging script piwik.php called by the javascript tag.
@@ -161,12 +161,12 @@ class Piwik_Tracker
     private function initBulkTrackingRequests($rawData)
     {
         // POST data can be array of string URLs or array of arrays w/ visit info
-        $jsonData = Piwik_Common::json_decode($rawData, $assoc = true);
+        $jsonData = Common::json_decode($rawData, $assoc = true);
 
         if (isset($jsonData['requests'])) {
             $this->requests = $jsonData['requests'];
         }
-        $tokenAuth = Piwik_Common::getRequestVar('token_auth', false, null, $jsonData);
+        $tokenAuth = Common::getRequestVar('token_auth', false, null, $jsonData);
         if (empty($tokenAuth)) {
             throw new Exception(" token_auth must be specified when using Bulk Tracking Import. See <a href='http://piwik.org/docs/tracking-api/reference/'>Tracking Doc</a>");
         }
@@ -264,7 +264,7 @@ class Piwik_Tracker
     {
         // don't run scheduled tasks in CLI mode from Tracker, this is the case
         // where we bulk load logs & don't want to lose time with tasks
-        return !Piwik_Common::isPhpCliMode()
+        return !Common::isPhpCliMode()
             && $this->getState() != self::STATE_LOGGING_DISABLE;
     }
 
@@ -375,11 +375,11 @@ class Piwik_Tracker
             if ((isset($GLOBALS['PIWIK_TRACKER_DEBUG']) && $GLOBALS['PIWIK_TRACKER_DEBUG']) || $authenticated) {
                 $result['error'] = Piwik_Tracker_GetErrorMessage($e);
             }
-            echo Piwik_Common::json_encode($result);
+            echo Common::json_encode($result);
             exit;
         }
         if (isset($GLOBALS['PIWIK_TRACKER_DEBUG']) && $GLOBALS['PIWIK_TRACKER_DEBUG']) {
-            Piwik_Common::sendHeader('Content-Type: text/html; charset=utf-8');
+            Common::sendHeader('Content-Type: text/html; charset=utf-8');
             $trailer = '<span style="color: #888888">Backtrace:<br /><pre>' . $e->getTraceAsString() . '</pre></span>';
             $headerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Zeitgeist/templates/simpleLayoutHeader.tpl');
             $footerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Zeitgeist/templates/simpleLayoutFooter.tpl');
@@ -388,7 +388,7 @@ class Piwik_Tracker
             echo $headerPage . '<p>' . Piwik_Tracker_GetErrorMessage($e) . '</p>' . $trailer . $footerPage;
         } // If not debug, but running authenticated (eg. during log import) then we display raw errors
         elseif ($authenticated) {
-            Piwik_Common::sendHeader('Content-Type: text/html; charset=utf-8');
+            Common::sendHeader('Content-Type: text/html; charset=utf-8');
             echo Piwik_Tracker_GetErrorMessage($e);
         } else {
             $this->outputTransparentGif();
@@ -569,7 +569,7 @@ class Piwik_Tracker
 
     protected function sendHeader($header)
     {
-        Piwik_Common::sendHeader($header);
+        Common::sendHeader($header);
     }
 
     protected function isVisitValid()
@@ -638,7 +638,7 @@ class Piwik_Tracker
             return $this->tokenAuth;
         }
 
-        return Piwik_Common::getRequestVar('token_auth', false);
+        return Common::getRequestVar('token_auth', false);
     }
 
     /**
@@ -689,18 +689,18 @@ class Piwik_Tracker
         }
 
         // Tests can force the use of 3rd party cookie for ID visitor
-        if (Piwik_Common::getRequestVar('forceUseThirdPartyCookie', false, null, $args) == 1) {
+        if (Common::getRequestVar('forceUseThirdPartyCookie', false, null, $args) == 1) {
             self::updateTrackerConfig('use_third_party_id_cookie', 1);
         }
 
         // Tests using window_look_back_for_visitor
-        if (Piwik_Common::getRequestVar('forceLargeWindowLookBackForVisitor', false, null, $args) == 1) {
+        if (Common::getRequestVar('forceLargeWindowLookBackForVisitor', false, null, $args) == 1) {
             self::updateTrackerConfig('window_look_back_for_visitor', 2678400);
         }
 
         // Tests can force the enabling of IP anonymization
         $forceIpAnonymization = false;
-        if (Piwik_Common::getRequestVar('forceIpAnonymization', false, null, $args) == 1) {
+        if (Common::getRequestVar('forceIpAnonymization', false, null, $args) == 1) {
             self::updateTrackerConfig('ip_address_mask_length', 2);
 
             $section = Config::getInstance()->Plugins_Tracker;
@@ -711,19 +711,19 @@ class Piwik_Tracker
         }
 
         // Custom IP to use for this visitor
-        $customIp = Piwik_Common::getRequestVar('cip', false, null, $args);
+        $customIp = Common::getRequestVar('cip', false, null, $args);
         if (!empty($customIp)) {
             self::setForceIp($customIp);
         }
 
         // Custom server date time to use
-        $customDatetime = Piwik_Common::getRequestVar('cdt', false, null, $args);
+        $customDatetime = Common::getRequestVar('cdt', false, null, $args);
         if (!empty($customDatetime)) {
             self::setForceDateTime($customDatetime);
         }
 
         // Custom visitor id
-        $customVisitorId = Piwik_Common::getRequestVar('cid', false, null, $args);
+        $customVisitorId = Common::getRequestVar('cid', false, null, $args);
         if (!empty($customVisitorId)) {
             self::setForceVisitorId($customVisitorId);
         }
diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php
index b98f284f78..ddba2c0dcc 100644
--- a/core/Tracker/Action.php
+++ b/core/Tracker/Action.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Interface of the Action object.
@@ -142,7 +142,7 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
         // Clean up host & hash tags, for URLs
         $parsedUrl = @parse_url($fullUrl);
         $parsedUrl = self::cleanupHostAndHashTag($parsedUrl);
-        $url = Piwik_Common::getParseUrlReverse($parsedUrl);
+        $url = Common::getParseUrlReverse($parsedUrl);
         if (!empty($url)) {
             return $url;
         }
@@ -261,7 +261,7 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
 
     static public function cleanupUrl($url)
     {
-        $url = Piwik_Common::unsanitizeInputValue($url);
+        $url = Common::unsanitizeInputValue($url);
         $url = self::cleanupString($url);
         $url = self::convertMatrixUrl($url);
         return $url;
@@ -353,17 +353,17 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
 
         if (empty($parsedUrl['query'])) {
             if (empty($parsedUrl['fragment'])) {
-                return Piwik_Common::getParseUrlReverse($parsedUrl);
+                return Common::getParseUrlReverse($parsedUrl);
             }
             // Exclude from the hash tag as well
-            $queryParameters = Piwik_Common::getArrayFromQueryString($parsedUrl['fragment']);
+            $queryParameters = Common::getArrayFromQueryString($parsedUrl['fragment']);
             $parsedUrl['fragment'] = self::getQueryStringWithExcludedParameters($queryParameters, $parametersToExclude);
-            $url = Piwik_Common::getParseUrlReverse($parsedUrl);
+            $url = Common::getParseUrlReverse($parsedUrl);
             return $url;
         }
-        $queryParameters = Piwik_Common::getArrayFromQueryString($parsedUrl['query']);
+        $queryParameters = Common::getArrayFromQueryString($parsedUrl['query']);
         $parsedUrl['query'] = self::getQueryStringWithExcludedParameters($queryParameters, $parametersToExclude);
-        $url = Piwik_Common::getParseUrlReverse($parsedUrl);
+        $url = Common::getParseUrlReverse($parsedUrl);
         return $url;
     }
 
@@ -375,7 +375,7 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
      */
     public static function getQueryParametersToExclude($idSite)
     {
-        $campaignTrackingParameters = Piwik_Common::getCampaignParameters();
+        $campaignTrackingParameters = Common::getCampaignParameters();
 
         $campaignTrackingParameters = array_merge(
             $campaignTrackingParameters[0], // campaign name parameters
@@ -459,7 +459,7 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
     static public function getSqlSelectActionId()
     {
         $sql = "SELECT idaction, type, name
-							FROM " . Piwik_Common::prefixTable('log_action')
+							FROM " . Common::prefixTable('log_action')
             . "  WHERE "
             . "		( hash = CRC32(?) AND name = ? AND type = ? ) ";
         return $sql;
@@ -533,7 +533,7 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
             }
         }
 
-        $sql = "INSERT INTO " . Piwik_Common::prefixTable('log_action') .
+        $sql = "INSERT INTO " . Common::prefixTable('log_action') .
             "( name, hash, type, url_prefix ) VALUES (?,CRC32(?),?,?)";
         // Then, we insert all new actions in the lookup table
         foreach ($actionsToInsert as $actionToInsert) {
@@ -691,9 +691,9 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
 
         $fields = implode(", ", array_keys($insertWithoutNulls));
         $bind = array_values($insertWithoutNulls);
-        $values = Piwik_Common::getSqlStringFieldsArray($insertWithoutNulls);
+        $values = Common::getSqlStringFieldsArray($insertWithoutNulls);
 
-        $sql = "INSERT INTO " . Piwik_Common::prefixTable('log_link_visit_action') . " ($fields) VALUES ($values)";
+        $sql = "INSERT INTO " . Common::prefixTable('log_link_visit_action') . " ($fields) VALUES ($values)";
         Piwik_Tracker::getDatabase()->query($sql, $bind);
 
         $this->idLinkVisitAction = Piwik_Tracker::getDatabase()->lastInsertId();
@@ -804,7 +804,7 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
         }
         $url = self::cleanupString($url);
 
-        if (!Piwik_Common::isLookLikeUrl($url)) {
+        if (!Common::isLookLikeUrl($url)) {
             printDebug("WARNING: URL looks invalid and is discarded");
             $url = '';
         }
@@ -923,19 +923,19 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
             ? $website['sitesearch_keyword_parameters']
             : array();
         $queryString = (!empty($parsedUrl['query']) ? $parsedUrl['query'] : '') . (!empty($parsedUrl['fragment']) ? $separator . $parsedUrl['fragment'] : '');
-        $parametersRaw = Piwik_Common::getArrayFromQueryString($queryString);
+        $parametersRaw = Common::getArrayFromQueryString($queryString);
 
         // strtolower the parameter names for smooth site search detection
         $parameters = array();
         foreach ($parametersRaw as $k => $v) {
-            $parameters[Piwik_Common::mb_strtolower($k)] = $v;
+            $parameters[Common::mb_strtolower($k)] = $v;
         }
         // decode values if they were sent from a client using another charset
         self::reencodeParameters($parameters, $this->pageEncoding);
 
         // Detect Site Search keyword
         foreach ($keywordParameters as $keywordParameterRaw) {
-            $keywordParameter = Piwik_Common::mb_strtolower($keywordParameterRaw);
+            $keywordParameter = Common::mb_strtolower($keywordParameterRaw);
             if (!empty($parameters[$keywordParameter])) {
                 $actionName = $parameters[$keywordParameter];
                 break;
@@ -951,7 +951,7 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
             : array();
 
         foreach ($categoryParameters as $categoryParameterRaw) {
-            $categoryParameter = Piwik_Common::mb_strtolower($categoryParameterRaw);
+            $categoryParameter = Common::mb_strtolower($categoryParameterRaw);
             if (!empty($parameters[$categoryParameter])) {
                 $categoryName = $parameters[$categoryParameter];
                 break;
@@ -968,10 +968,10 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
             // @see excludeQueryParametersFromUrl()
             // Excluded the detected parameters from the URL
             $parametersToExclude = array($categoryParameterRaw, $keywordParameterRaw);
-            $parsedUrl['query'] = self::getQueryStringWithExcludedParameters(Piwik_Common::getArrayFromQueryString($parsedUrl['query']), $parametersToExclude);
-            $parsedUrl['fragment'] = self::getQueryStringWithExcludedParameters(Piwik_Common::getArrayFromQueryString($parsedUrl['fragment']), $parametersToExclude);
+            $parsedUrl['query'] = self::getQueryStringWithExcludedParameters(Common::getArrayFromQueryString($parsedUrl['query']), $parametersToExclude);
+            $parsedUrl['fragment'] = self::getQueryStringWithExcludedParameters(Common::getArrayFromQueryString($parsedUrl['fragment']), $parametersToExclude);
         }
-        $url = Piwik_Common::getParseUrlReverse($parsedUrl);
+        $url = Common::getParseUrlReverse($parsedUrl);
         if (is_array($actionName)) {
             $actionName = reset($actionName);
         }
diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php
index 6ddb7b5183..6d33bc39c5 100644
--- a/core/Tracker/Db.php
+++ b/core/Tracker/Db.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Simple database wrapper.
@@ -98,7 +98,7 @@ abstract class Piwik_Tracker_Db
             $time = $info['sum_time_ms'];
             $count = $info['count'];
 
-            $queryProfiling = "INSERT INTO " . Piwik_Common::prefixTable('log_profiling') . "
+            $queryProfiling = "INSERT INTO " . Common::prefixTable('log_profiling') . "
 						(query,count,sum_time_ms) VALUES (?,$count,$time)
 						ON DUPLICATE KEY 
 							UPDATE count=count+$count,sum_time_ms=sum_time_ms+$time";
diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php
index 1f47cfcef5..fb22e339e7 100644
--- a/core/Tracker/GoalManager.php
+++ b/core/Tracker/GoalManager.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik
@@ -125,7 +125,7 @@ class Piwik_Tracker_GoalManager
      */
     function detectGoalsMatchingUrl($idSite, $action)
     {
-        if (!Piwik_Common::isGoalPluginEnabled()) {
+        if (!Common::isGoalPluginEnabled()) {
             return false;
         }
 
@@ -194,7 +194,7 @@ class Piwik_Tracker_GoalManager
 
     function detectGoalId($idSite)
     {
-        if (!Piwik_Common::isGoalPluginEnabled()) {
+        if (!Common::isGoalPluginEnabled()) {
             return false;
         }
         $goals = $this->getGoalDefinitions($idSite);
@@ -228,7 +228,7 @@ class Piwik_Tracker_GoalManager
 
         $location_country = isset($visitorInformation['location_country'])
             ? $visitorInformation['location_country']
-            : Piwik_Common::getCountry(
+            : Common::getCountry(
                 $browserLanguage,
                 $enableLanguageToCountryGuess = Config::getInstance()->Tracker['enable_language_to_country_guess'],
                 $visitorInformation['location_ip']
@@ -285,13 +285,13 @@ class Piwik_Tracker_GoalManager
         // 0) In some (unknown!?) cases the campaign is not found in the attribution cookie, but the URL ref was found.
         //    In this case we look up if the current visit is credited to a campaign and will credit this campaign rather than the URL ref (since campaigns have higher priority)
         if (empty($refererCampaignName)
-            && $type == Piwik_Common::REFERER_TYPE_CAMPAIGN
+            && $type == Common::REFERER_TYPE_CAMPAIGN
             && !empty($name)
         ) {
             // Use default values per above
         } // 1) Campaigns from 1st party cookie
         elseif (!empty($refererCampaignName)) {
-            $type = Piwik_Common::REFERER_TYPE_CAMPAIGN;
+            $type = Common::REFERER_TYPE_CAMPAIGN;
             $name = $refererCampaignName;
             $keyword = $refererCampaignKeyword;
             $time = $refererTimestamp;
@@ -301,7 +301,7 @@ class Piwik_Tracker_GoalManager
             $referrer = $referrer->getRefererInformation($refererUrl, $currentUrl = '', $idSite);
 
             // if the parsed referer is interesting enough, ie. website or search engine 
-            if (in_array($referrer['referer_type'], array(Piwik_Common::REFERER_TYPE_SEARCH_ENGINE, Piwik_Common::REFERER_TYPE_WEBSITE))) {
+            if (in_array($referrer['referer_type'], array(Common::REFERER_TYPE_SEARCH_ENGINE, Common::REFERER_TYPE_WEBSITE))) {
                 $type = $referrer['referer_type'];
                 $name = $referrer['referer_name'];
                 $keyword = $referrer['referer_keyword'];
@@ -358,7 +358,7 @@ class Piwik_Tracker_GoalManager
             printDebug("There is an existing cart for this visit");
         }
         if ($this->isGoalAnOrder) {
-            $orderIdNumeric = Piwik_Common::hashStringToInt($this->orderId);
+            $orderIdNumeric = Common::hashStringToInt($this->orderId);
             $goal['idgoal'] = self::IDGOAL_ORDER;
             $goal['idorder'] = $this->orderId;
             $goal['buster'] = $orderIdNumeric;
@@ -407,13 +407,13 @@ class Piwik_Tracker_GoalManager
      */
     protected function getEcommerceItemsFromRequest()
     {
-        $items = Piwik_Common::unsanitizeInputValue($this->request->getParam('ec_items'));
+        $items = Common::unsanitizeInputValue($this->request->getParam('ec_items'));
         if (empty($items)) {
             printDebug("There are no Ecommerce items in the request");
             // we still record an Ecommerce order without any item in it
             return array();
         }
-        $items = Piwik_Common::json_decode($items, $assoc = true);
+        $items = Common::json_decode($items, $assoc = true);
         if (!is_array($items)) {
             printDebug("Error while json_decode the Ecommerce items = " . var_export($items, true));
             return false;
@@ -440,7 +440,7 @@ class Piwik_Tracker_GoalManager
 
         // Select all items currently in the Cart if any
         $sql = "SELECT idaction_sku, idaction_name, idaction_category, idaction_category2, idaction_category3, idaction_category4, idaction_category5, price, quantity, deleted, idorder as idorder_original_value
-				FROM " . Piwik_Common::prefixTable('log_conversion_item') . "
+				FROM " . Common::prefixTable('log_conversion_item') . "
 				WHERE idvisit = ?
 					AND (idorder = ? OR idorder = ?)";
 
@@ -660,7 +660,7 @@ class Piwik_Tracker_GoalManager
                 $updateParts[] = $name . " = ?";
                 $sqlBind[] = $value;
             }
-            $sql = 'UPDATE ' . Piwik_Common::prefixTable('log_conversion_item') . "
+            $sql = 'UPDATE ' . Common::prefixTable('log_conversion_item') . "
 					SET " . implode($updateParts, ', ') . "
 						WHERE idvisit = ?
 							AND idorder = ? 
@@ -689,7 +689,7 @@ class Piwik_Tracker_GoalManager
         printDebug("Ecommerce items that are added to the cart/order");
         printDebug($itemsToInsert);
 
-        $sql = "INSERT INTO " . Piwik_Common::prefixTable('log_conversion_item') . "
+        $sql = "INSERT INTO " . Common::prefixTable('log_conversion_item') . "
 					(idaction_sku, idaction_name, idaction_category, idaction_category2, idaction_category3, idaction_category4, idaction_category5, price, quantity, deleted, 
 					idorder, idsite, idvisitor, server_time, idvisit) 
 					VALUES ";
@@ -700,7 +700,7 @@ class Piwik_Tracker_GoalManager
                 $sql .= ',';
             }
             $newRow = array_values($this->getItemRowEnriched($goal, $item));
-            $sql .= " ( " . Piwik_Common::getSqlStringFieldsArray($newRow) . " ) ";
+            $sql .= " ( " . Common::getSqlStringFieldsArray($newRow) . " ) ";
             $i++;
             $bind = array_merge($bind, $newRow);
         }
@@ -778,7 +778,7 @@ class Piwik_Tracker_GoalManager
         printDebug($newGoalDebug);
 
         $fields = implode(", ", array_keys($newGoal));
-        $bindFields = Piwik_Common::getSqlStringFieldsArray($newGoal);
+        $bindFields = Common::getSqlStringFieldsArray($newGoal);
 
         if ($mustUpdateNotInsert) {
             $updateParts = $sqlBind = $updateWhereParts = array();
@@ -790,13 +790,13 @@ class Piwik_Tracker_GoalManager
                 $updateWhereParts[] = $name . " = ?";
                 $sqlBind[] = $value;
             }
-            $sql = 'UPDATE  ' . Piwik_Common::prefixTable('log_conversion') . "
+            $sql = 'UPDATE  ' . Common::prefixTable('log_conversion') . "
 					SET " . implode($updateParts, ', ') . "
 						WHERE " . implode($updateWhereParts, ' AND ');
             Piwik_Tracker::getDatabase()->query($sql, $sqlBind);
             return true;
         } else {
-            $sql = 'INSERT IGNORE INTO ' . Piwik_Common::prefixTable('log_conversion') . "
+            $sql = 'INSERT IGNORE INTO ' . Common::prefixTable('log_conversion') . "
 					($fields) VALUES ($bindFields) ";
             $bind = array_values($newGoal);
             $result = Piwik_Tracker::getDatabase()->query($sql, $bind);
diff --git a/core/Tracker/Referer.php b/core/Tracker/Referer.php
index 85a456f95c..1c8469f3f0 100644
--- a/core/Tracker/Referer.php
+++ b/core/Tracker/Referer.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik
@@ -64,9 +64,9 @@ class Piwik_Tracker_Referer
         $this->idsite = $idSite;
 
         // default values for the referer_* fields
-        $refererUrl = Piwik_Common::unsanitizeInputValue($refererUrl);
+        $refererUrl = Common::unsanitizeInputValue($refererUrl);
         if (!empty($refererUrl)
-            && !Piwik_Common::isLookLikeUrl($refererUrl)
+            && !Common::isLookLikeUrl($refererUrl)
         ) {
             $refererUrl = '';
         }
@@ -76,7 +76,7 @@ class Piwik_Tracker_Referer
         $this->refererUrl = $refererUrl;
         $this->refererUrlParse = @parse_url($this->refererUrl);
         $this->currentUrlParse = @parse_url($currentUrl);
-        $this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_DIRECT_ENTRY;
+        $this->typeRefererAnalyzed = Common::REFERER_TYPE_DIRECT_ENTRY;
         $this->nameRefererAnalyzed = '';
         $this->keywordRefererAnalyzed = '';
         $this->refererHost = '';
@@ -104,7 +104,7 @@ class Piwik_Tracker_Referer
         if (!empty($this->refererHost)
             && !$refererDetected
         ) {
-            $this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_WEBSITE;
+            $this->typeRefererAnalyzed = Common::REFERER_TYPE_WEBSITE;
             $this->nameRefererAnalyzed = mb_strtolower($this->refererHost, 'UTF-8');
         }
 
@@ -124,12 +124,12 @@ class Piwik_Tracker_Referer
      */
     protected function detectRefererSearchEngine()
     {
-        $searchEngineInformation = Piwik_Common::extractSearchEngineInformationFromUrl($this->refererUrl);
+        $searchEngineInformation = Common::extractSearchEngineInformationFromUrl($this->refererUrl);
         Piwik_PostEvent('Tracker.detectRefererSearchEngine', array(&$searchEngineInformation, $this->refererUrl));
         if ($searchEngineInformation === false) {
             return false;
         }
-        $this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_SEARCH_ENGINE;
+        $this->typeRefererAnalyzed = Common::REFERER_TYPE_SEARCH_ENGINE;
         $this->nameRefererAnalyzed = $searchEngineInformation['name'];
         $this->keywordRefererAnalyzed = $searchEngineInformation['keywords'];
         return true;
@@ -142,18 +142,18 @@ class Piwik_Tracker_Referer
     protected function detectCampaignFromString($string)
     {
         foreach ($this->campaignNames as $campaignNameParameter) {
-            $campaignName = trim(urldecode(Piwik_Common::getParameterFromQueryString($string, $campaignNameParameter)));
+            $campaignName = trim(urldecode(Common::getParameterFromQueryString($string, $campaignNameParameter)));
             if (!empty($campaignName)) {
                 break;
             }
         }
 
         if (!empty($campaignName)) {
-            $this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_CAMPAIGN;
+            $this->typeRefererAnalyzed = Common::REFERER_TYPE_CAMPAIGN;
             $this->nameRefererAnalyzed = $campaignName;
 
             foreach ($this->campaignKeywords as $campaignKeywordParameter) {
-                $campaignKeyword = Piwik_Common::getParameterFromQueryString($string, $campaignKeywordParameter);
+                $campaignKeyword = Common::getParameterFromQueryString($string, $campaignKeywordParameter);
                 if (!empty($campaignKeyword)) {
                     $this->keywordRefererAnalyzed = trim(urldecode($campaignKeyword));
                     break;
@@ -163,7 +163,7 @@ class Piwik_Tracker_Referer
             // if the campaign keyword is empty, try to get a keyword from the referrer URL
             if (empty($this->keywordRefererAnalyzed)) {
                 // Set the Campaign keyword to the keyword found in the Referer URL if any
-                $referrerUrlInfo = Piwik_Common::extractSearchEngineInformationFromUrl($this->refererUrl);
+                $referrerUrlInfo = Common::extractSearchEngineInformationFromUrl($this->refererUrl);
                 if (!empty($referrerUrlInfo['keywords'])) {
                     $this->keywordRefererAnalyzed = $referrerUrlInfo['keywords'];
                 }
@@ -176,7 +176,7 @@ class Piwik_Tracker_Referer
                 ) {
                     // This parameter sometimes is found & contains the page with the adsense ad bringing visitor to our site
                     $adsenseReferrerParameter = 'url';
-                    $value = trim(urldecode(Piwik_Common::getParameterFromQueryString($this->refererUrlParse['query'], $adsenseReferrerParameter)));
+                    $value = trim(urldecode(Common::getParameterFromQueryString($this->refererUrlParse['query'], $adsenseReferrerParameter)));
                     if (!empty($value)) {
                         $parsedAdsenseReferrerUrl = parse_url($value);
                         if (!empty($parsedAdsenseReferrerUrl['host'])) {
@@ -207,7 +207,7 @@ class Piwik_Tracker_Referer
         ) {
             return false;
         }
-        $campaignParameters = Piwik_Common::getCampaignParameters();
+        $campaignParameters = Common::getCampaignParameters();
         $this->campaignNames = $campaignParameters[0];
         $this->campaignKeywords = $campaignParameters[1];
 
@@ -241,12 +241,12 @@ class Piwik_Tracker_Referer
             if (isset($this->currentUrlParse['host'])) {
                 $currentHost = mb_strtolower($this->currentUrlParse['host'], 'UTF-8');
                 if ($currentHost == mb_strtolower($this->refererHost, 'UTF-8')) {
-                    $this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_DIRECT_ENTRY;
+                    $this->typeRefererAnalyzed = Common::REFERER_TYPE_DIRECT_ENTRY;
                     return true;
                 }
             }
             if (Piwik_Tracker_Visit::isHostKnownAliasHost($this->refererHost, $this->idsite)) {
-                $this->typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_DIRECT_ENTRY;
+                $this->typeRefererAnalyzed = Common::REFERER_TYPE_DIRECT_ENTRY;
                 return true;
             }
         }
diff --git a/core/Tracker/Request.php b/core/Tracker/Request.php
index 243e6e4462..e27e2eaded 100644
--- a/core/Tracker/Request.php
+++ b/core/Tracker/Request.php
@@ -1,6 +1,6 @@
 <?php
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -59,7 +59,7 @@ class Piwik_Tracker_Request
     {
         $shouldAuthenticate = Config::getInstance()->Tracker['tracking_requests_require_authentication'];
         if ($shouldAuthenticate) {
-            $tokenAuth = $tokenAuthFromBulkRequest || Piwik_Common::getRequestVar('token_auth', false, 'string', $this->params);
+            $tokenAuth = $tokenAuthFromBulkRequest || Common::getRequestVar('token_auth', false, 'string', $this->params);
             try {
                 $idSite = $this->getIdSite();
                 $this->isAuthenticated = $this->authenticateSuperUserOrAdmin($tokenAuth, $idSite);
@@ -157,15 +157,15 @@ class Piwik_Tracker_Request
      */
     public function getBrowserLanguage()
     {
-        return Piwik_Common::getRequestVar('lang', Piwik_Common::getBrowserLanguage(), 'string', $this->params);
+        return Common::getRequestVar('lang', Common::getBrowserLanguage(), 'string', $this->params);
     }
 
     public function getLocalTime()
     {
         $localTimes = array(
-            'h' => (string)Piwik_Common::getRequestVar('h', $this->getCurrentDate("H"), 'int', $this->params),
-            'i' => (string)Piwik_Common::getRequestVar('m', $this->getCurrentDate("i"), 'int', $this->params),
-            's' => (string)Piwik_Common::getRequestVar('s', $this->getCurrentDate("s"), 'int', $this->params)
+            'h' => (string)Common::getRequestVar('h', $this->getCurrentDate("H"), 'int', $this->params),
+            'i' => (string)Common::getRequestVar('m', $this->getCurrentDate("i"), 'int', $this->params),
+            's' => (string)Common::getRequestVar('s', $this->getCurrentDate("s"), 'int', $this->params)
         );
         foreach ($localTimes as $k => $time) {
             if (strlen($time) == 1) {
@@ -189,7 +189,7 @@ class Piwik_Tracker_Request
 
     public function getGoalRevenue($defaultGoalRevenue)
     {
-        return Piwik_Common::getRequestVar('revenue', $defaultGoalRevenue, 'float', $this->params);
+        return Common::getRequestVar('revenue', $defaultGoalRevenue, 'float', $this->params);
     }
 
     public function getParam($name)
@@ -244,7 +244,7 @@ class Piwik_Tracker_Request
         $paramDefaultValue = $supportedParams[$name][0];
         $paramType = $supportedParams[$name][1];
 
-        $value = Piwik_Common::getRequestVar($name, $paramDefaultValue, $paramType, $this->params);
+        $value = Common::getRequestVar($name, $paramDefaultValue, $paramType, $this->params);
 
         return $value;
     }
@@ -262,7 +262,7 @@ class Piwik_Tracker_Request
 
     public function getIdSite()
     {
-        $idSite = Piwik_Common::getRequestVar('idsite', 0, 'int', $this->params);
+        $idSite = Common::getRequestVar('idsite', 0, 'int', $this->params);
         Piwik_PostEvent('Tracker.setRequest.idSite', array(&$idSite, $this->params));
         if ($idSite <= 0) {
             throw new Exception('Invalid idSite');
@@ -273,7 +273,7 @@ class Piwik_Tracker_Request
     public function getUserAgent()
     {
         $default = @$_SERVER['HTTP_USER_AGENT'];
-        return Piwik_Common::getRequestVar('ua', is_null($default) ? false : $default, 'string', $this->params);
+        return Common::getRequestVar('ua', is_null($default) ? false : $default, 'string', $this->params);
     }
 
     public function getCustomVariables($scope)
@@ -284,7 +284,7 @@ class Piwik_Tracker_Request
             $parameter = 'cvar';
         }
 
-        $customVar = Piwik_Common::unsanitizeInputValues(Piwik_Common::getRequestVar($parameter, '', 'json', $this->params));
+        $customVar = Common::unsanitizeInputValues(Common::getRequestVar($parameter, '', 'json', $this->params));
         if (!is_array($customVar)) {
             return array();
         }
@@ -399,13 +399,13 @@ class Piwik_Tracker_Request
         }
         // If a third party cookie was not found, we default to the first party cookie
         if (!$found) {
-            $idVisitor = Piwik_Common::getRequestVar('_id', '', 'string', $this->params);
+            $idVisitor = Common::getRequestVar('_id', '', 'string', $this->params);
             $found = strlen($idVisitor) >= Piwik_Tracker::LENGTH_HEX_ID_STRING;
         }
 
         if ($found) {
             $truncated = substr($idVisitor, 0, Piwik_Tracker::LENGTH_HEX_ID_STRING);
-            $binVisitorId = @Piwik_Common::hex2bin($truncated);
+            $binVisitorId = @Common::hex2bin($truncated);
             if (!empty($binVisitorId)) {
                 return $binVisitorId;
             }
@@ -464,7 +464,7 @@ class Piwik_Tracker_Request
         foreach ($locationOverrideParams as $queryParamName => $info) {
             list($type, $locationResultKey) = $info;
 
-            $value = Piwik_Common::getRequestVar($queryParamName, false, $type, $this->params);
+            $value = Common::getRequestVar($queryParamName, false, $type, $this->params);
             if (!empty($value)) {
                 $location[$locationResultKey] = $value;
             }
@@ -477,7 +477,7 @@ class Piwik_Tracker_Request
         $pluginsInOrder = array('fla', 'java', 'dir', 'qt', 'realp', 'pdf', 'wma', 'gears', 'ag', 'cookie');
         $plugins = array();
         foreach ($pluginsInOrder as $param) {
-            $plugins[] = Piwik_Common::getRequestVar($param, 0, 'int', $this->params);
+            $plugins[] = Common::getRequestVar($param, 0, 'int', $this->params);
         }
         return $plugins;
     }
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index 7cdcff57bf..c04d7f5a00 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik
@@ -318,7 +318,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
             $updateParts[] = $name . " = ?";
             $sqlBind[] = $value;
         }
-        $sqlQuery = "UPDATE " . Piwik_Common::prefixTable('log_visit') . "
+        $sqlQuery = "UPDATE " . Common::prefixTable('log_visit') . "
 						SET $sqlActionUpdate " . implode($updateParts, ', ') . "
 						WHERE idsite = ?
 							AND idvisit = ?";
@@ -571,9 +571,9 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
         $this->visitorInfo['config_resolution'] = substr($this->visitorInfo['config_resolution'], 0, 9);
 
         $fields = implode(", ", array_keys($this->visitorInfo));
-        $values = Piwik_Common::getSqlStringFieldsArray($this->visitorInfo);
+        $values = Common::getSqlStringFieldsArray($this->visitorInfo);
 
-        $sql = "INSERT INTO " . Piwik_Common::prefixTable('log_visit') . " ($fields) VALUES ($values)";
+        $sql = "INSERT INTO " . Common::prefixTable('log_visit') . " ($fields) VALUES ($values)";
         $bind = array_values($this->visitorInfo);
         Piwik_Tracker::getDatabase()->query($sql, $bind);
 
@@ -602,7 +602,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
         ) {
             return $this->visitorInfo['idvisitor'];
         }
-        return Piwik_Common::hex2bin($this->generateUniqueVisitorId());
+        return Common::hex2bin($this->generateUniqueVisitorId());
     }
 
     /**
@@ -610,7 +610,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
      */
     static public function generateUniqueVisitorId()
     {
-        $uniqueId = substr(Piwik_Common::generateUniqId(), 0, Piwik_Tracker::LENGTH_HEX_ID_STRING);
+        $uniqueId = substr(Common::generateUniqId(), 0, Piwik_Tracker::LENGTH_HEX_ID_STRING);
         return $uniqueId;
     }
 
@@ -680,7 +680,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
 							visit_goal_buyer
 							$selectCustomVariables 
 		";
-        $from = "FROM " . Piwik_Common::prefixTable('log_visit');
+        $from = "FROM " . Common::prefixTable('log_visit');
 
         list($timeLookBack,$timeLookAhead) = $this->getWindowLookupThisVisit();
 
@@ -1018,7 +1018,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
     protected function getConfigHash($os, $browserName, $browserVersion, $resolution, $plugin_Flash, $plugin_Java, $plugin_Director, $plugin_Quicktime, $plugin_RealPlayer, $plugin_PDF, $plugin_WindowsMedia, $plugin_Gears, $plugin_Silverlight, $plugin_Cookie, $ip, $browserLang)
     {
         $hash = md5($os . $browserName . $browserVersion . $plugin_Flash . $plugin_Java . $plugin_Director . $plugin_Quicktime . $plugin_RealPlayer . $plugin_PDF . $plugin_WindowsMedia . $plugin_Gears . $plugin_Silverlight . $plugin_Cookie . $ip . $browserLang, $raw_output = true);
-        return Piwik_Common::substr($hash, 0, Piwik_Tracker::LENGTH_BINARY_ID);
+        return Common::substr($hash, 0, Piwik_Tracker::LENGTH_BINARY_ID);
     }
 
     /**
@@ -1032,7 +1032,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
         if ($this->isVisitorKnown()) {
             return -1;
         }
-        return Piwik_Common::generateUniqId();
+        return Common::generateUniqId();
     }
 
     // is the referer host any of the registered URLs for this website?
diff --git a/core/Tracker/VisitExcluded.php b/core/Tracker/VisitExcluded.php
index 062020dbe7..b405d435cf 100644
--- a/core/Tracker/VisitExcluded.php
+++ b/core/Tracker/VisitExcluded.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * This class contains the logic to exclude some visitors from being tracked as per user settings
@@ -127,7 +127,7 @@ class Piwik_Tracker_VisitExcluded
      */
     protected function isNonHumanBot()
     {
-        $allowBots = Piwik_Common::getRequestVar('bots', false) != false;
+        $allowBots = Common::getRequestVar('bots', false) != false;
         return !$allowBots
             && (strpos($this->userAgent, 'Googlebot') !== false // Googlebot
                 || strpos($this->userAgent, 'Google Web Preview') !== false // Google Instant
diff --git a/core/Translate.php b/core/Translate.php
index a1ac503edd..95a2f58771 100644
--- a/core/Translate.php
+++ b/core/Translate.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik
@@ -73,7 +73,7 @@ class Piwik_Translate
     {
         $translations = array();
         $path = PIWIK_INCLUDE_PATH . '/lang/' . $language . '.php';
-        if (!Piwik_Common::isValidFilename($language) || !is_readable($path)) {
+        if (!Common::isValidFilename($language) || !is_readable($path)) {
             throw new Exception(Piwik_TranslateException('General_ExceptionLanguageFileNotFound', array($language)));
         }
         require $path;
@@ -98,7 +98,7 @@ class Piwik_Translate
     public function getLanguageToLoad()
     {
         if (is_null(self::$languageToLoad)) {
-            $lang = Piwik_Common::getRequestVar('language', '', 'string');
+            $lang = Common::getRequestVar('language', '', 'string');
 
             Piwik_PostEvent('Translate.getLanguageToLoad', array(&$lang));
 
diff --git a/core/TranslationWriter.php b/core/TranslationWriter.php
index c7b073712d..5cec03e006 100644
--- a/core/TranslationWriter.php
+++ b/core/TranslationWriter.php
@@ -9,7 +9,7 @@
  * @package Piwik
  *
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Write translations to file
@@ -52,7 +52,7 @@ class Piwik_TranslationWriter
      */
     static public function getTranslationPath($lang, $base = 'lang')
     {
-        if (!Piwik_Common::isValidFilename($lang) ||
+        if (!Common::isValidFilename($lang) ||
             ($base !== 'lang' && $base !== 'tmp')
         ) {
             throw new Exception(Piwik_TranslateException('General_ExceptionLanguageFileNotFound', array($lang)));
diff --git a/core/Twig.php b/core/Twig.php
index 6af9f80413..57f1b00ee6 100644
--- a/core/Twig.php
+++ b/core/Twig.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 
 /**
@@ -215,7 +215,7 @@ class Piwik_Twig
     {
         $plugins = Piwik_PluginsManager::getInstance()->getLoadedPluginsName();
         foreach($plugins as $name) {
-            $name = Piwik_Common::unprefixClass($name);
+            $name = Common::unprefixClass($name);
             $path = sprintf("%s/plugins/%s/templates/", PIWIK_INCLUDE_PATH, $name);
             if (is_dir($path)) {
                 $loader->addPath(PIWIK_INCLUDE_PATH . '/plugins/' . $name . '/templates', $name);
diff --git a/core/UpdateCheck.php b/core/UpdateCheck.php
index 62fcc33415..0f35a966d9 100644
--- a/core/UpdateCheck.php
+++ b/core/UpdateCheck.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Class to check if a newer version of Piwik is available
@@ -47,7 +47,7 @@ class Piwik_UpdateCheck
                 'piwik_version' => Piwik_Version::VERSION,
                 'php_version'   => PHP_VERSION,
                 'url'           => Piwik_Url::getCurrentUrlWithoutQueryString(),
-                'trigger'       => Piwik_Common::getRequestVar('module', '', 'string'),
+                'trigger'       => Common::getRequestVar('module', '', 'string'),
                 'timezone'      => Piwik_SitesManager_API::getInstance()->getDefaultTimezone(),
             );
 
diff --git a/core/Updater.php b/core/Updater.php
index 9ec42e8b59..b048dc6d0a 100644
--- a/core/Updater.php
+++ b/core/Updater.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see core/Option.php
@@ -131,7 +131,7 @@ class Piwik_Updater
                 }
             }
             // unfortunately had to extract this query from the Piwik_Option class
-            $queries[] = 'UPDATE `' . Piwik_Common::prefixTable('option') . '`
+            $queries[] = 'UPDATE `' . Common::prefixTable('option') . '`
     				SET option_value = \'' . $fileVersion . '\'
     				WHERE option_name = \'' . $this->getNameInOptionTable($componentName) . '\';';
         }
diff --git a/core/Updates/0.2.10.php b/core/Updates/0.2.10.php
index 627c626af8..bb4358e411 100644
--- a/core/Updates/0.2.10.php
+++ b/core/Updates/0.2.10.php
@@ -9,7 +9,7 @@
  * @package Updates
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,7 +19,7 @@ class Piwik_Updates_0_2_10 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'CREATE TABLE `' . Piwik_Common::prefixTable('option') . '` (
+            'CREATE TABLE `' . Common::prefixTable('option') . '` (
 				idoption BIGINT NOT NULL AUTO_INCREMENT ,
 				option_name VARCHAR( 64 ) NOT NULL ,
 				option_value LONGTEXT NOT NULL ,
@@ -27,23 +27,23 @@ class Piwik_Updates_0_2_10 extends Piwik_Updates
 			)'                                                                                                                                                             => false,
 
             // 0.1.7 [463]
-            'ALTER IGNORE TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER IGNORE TABLE `' . Common::prefixTable('log_visit') . '`
 				 CHANGE `location_provider` `location_provider` VARCHAR( 100 ) DEFAULT NULL' => '1054',
 
             // 0.1.7 [470]
-            'ALTER TABLE `' . Piwik_Common::prefixTable('logger_api_call') . '`
+            'ALTER TABLE `' . Common::prefixTable('logger_api_call') . '`
 				CHANGE `parameter_names_default_values` `parameter_names_default_values` TEXT,
 				CHANGE `parameter_values` `parameter_values` TEXT,
 				CHANGE `returned_value` `returned_value` TEXT'                                => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('logger_error') . '`
+            'ALTER TABLE `' . Common::prefixTable('logger_error') . '`
 				CHANGE `message` `message` TEXT'                                                 => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('logger_exception') . '`
+            'ALTER TABLE `' . Common::prefixTable('logger_exception') . '`
 				CHANGE `message` `message` TEXT'                                             => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('logger_message') . '`
+            'ALTER TABLE `' . Common::prefixTable('logger_message') . '`
 				CHANGE `message` `message` TEXT'                                               => false,
 
             // 0.2.2 [489]
-            'ALTER IGNORE TABLE `' . Piwik_Common::prefixTable('site') . '`
+            'ALTER IGNORE TABLE `' . Common::prefixTable('site') . '`
 				 CHANGE `feedburnerName` `feedburnerName` VARCHAR( 100 ) DEFAULT NULL'            => '1054',
         );
     }
diff --git a/core/Updates/0.2.12.php b/core/Updates/0.2.12.php
index 72bde57ba1..5712a132ff 100644
--- a/core/Updates/0.2.12.php
+++ b/core/Updates/0.2.12.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,14 +18,14 @@ class Piwik_Updates_0_2_12 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('site') . '`
+            'ALTER TABLE `' . Common::prefixTable('site') . '`
 				CHANGE `ts_created` `ts_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL'                    => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				DROP `config_color_depth`' => false,
 
             // 0.2.12 [673]
             // Note: requires INDEX privilege
-            'DROP INDEX index_idaction ON `' . Piwik_Common::prefixTable('log_action') . '`'                      => '1091',
+            'DROP INDEX index_idaction ON `' . Common::prefixTable('log_action') . '`'                      => '1091',
         );
     }
 
diff --git a/core/Updates/0.2.13.php b/core/Updates/0.2.13.php
index a70d1d68b8..d548761222 100644
--- a/core/Updates/0.2.13.php
+++ b/core/Updates/0.2.13.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,9 +18,9 @@ class Piwik_Updates_0_2_13 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'DROP TABLE IF EXISTS `' . Piwik_Common::prefixTable('option') . '`'    => false,
+            'DROP TABLE IF EXISTS `' . Common::prefixTable('option') . '`'    => false,
 
-            'CREATE TABLE `' . Piwik_Common::prefixTable('option') . "` (
+            'CREATE TABLE `' . Common::prefixTable('option') . "` (
 				option_name VARCHAR( 64 ) NOT NULL ,
 				option_value LONGTEXT NOT NULL ,
 				autoload TINYINT NOT NULL DEFAULT '1',
diff --git a/core/Updates/0.2.24.php b/core/Updates/0.2.24.php
index e71b829bcd..4533832d90 100644
--- a/core/Updates/0.2.24.php
+++ b/core/Updates/0.2.24.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,11 +19,11 @@ class Piwik_Updates_0_2_24 extends Piwik_Updates
     {
         return array(
             'CREATE INDEX index_type_name
-                ON ' . Piwik_Common::prefixTable('log_action') . ' (type, name(15))'                       => false,
+                ON ' . Common::prefixTable('log_action') . ' (type, name(15))'                       => false,
             'CREATE INDEX index_idsite_date
-                ON ' . Piwik_Common::prefixTable('log_visit') . ' (idsite, visit_server_date)' => false,
-            'DROP INDEX index_idsite ON ' . Piwik_Common::prefixTable('log_visit')                         => false,
-            'DROP INDEX index_visit_server_date ON ' . Piwik_Common::prefixTable('log_visit')              => false,
+                ON ' . Common::prefixTable('log_visit') . ' (idsite, visit_server_date)' => false,
+            'DROP INDEX index_idsite ON ' . Common::prefixTable('log_visit')                         => false,
+            'DROP INDEX index_visit_server_date ON ' . Common::prefixTable('log_visit')              => false,
         );
     }
 
diff --git a/core/Updates/0.2.27.php b/core/Updates/0.2.27.php
index dd43c0eb10..92a738f903 100644
--- a/core/Updates/0.2.27.php
+++ b/core/Updates/0.2.27.php
@@ -9,7 +9,7 @@
  * @package Updates
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,13 +19,13 @@ class Piwik_Updates_0_2_27 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         $sqlarray = array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				ADD `visit_goal_converted` VARCHAR( 1 ) NOT NULL AFTER `visit_total_time`'                                                                              => false,
             // 0.2.27 [826]
-            'ALTER IGNORE TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER IGNORE TABLE `' . Common::prefixTable('log_visit') . '`
 				CHANGE `visit_goal_converted` `visit_goal_converted` TINYINT(1) NOT NULL' => false,
 
-            'CREATE TABLE `' . Piwik_Common::prefixTable('goal') . "` (
+            'CREATE TABLE `' . Common::prefixTable('goal') . "` (
 				`idsite` int(11) NOT NULL,
 				`idgoal` int(11) NOT NULL,
 				`name` varchar(50) NOT NULL,
@@ -38,7 +38,7 @@ class Piwik_Updates_0_2_27 extends Piwik_Updates
 				PRIMARY KEY  (`idsite`,`idgoal`)
 			)"                                                                                       => false,
 
-            'CREATE TABLE `' . Piwik_Common::prefixTable('log_conversion') . '` (
+            'CREATE TABLE `' . Common::prefixTable('log_conversion') . '` (
 				`idvisit` int(10) unsigned NOT NULL,
 				`idsite` int(10) unsigned NOT NULL,
 				`visitor_idcookie` char(32) NOT NULL,
diff --git a/core/Updates/0.2.32.php b/core/Updates/0.2.32.php
index 921a48ed79..f14b5a5892 100644
--- a/core/Updates/0.2.32.php
+++ b/core/Updates/0.2.32.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,13 +19,13 @@ class Piwik_Updates_0_2_32 extends Piwik_Updates
     {
         return array(
             // 0.2.32 [941]
-            'ALTER TABLE `' . Piwik_Common::prefixTable('access') . '`
+            'ALTER TABLE `' . Common::prefixTable('access') . '`
 				CHANGE `login` `login` VARCHAR( 100 ) NOT NULL'                                                                             => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('user') . '`
+            'ALTER TABLE `' . Common::prefixTable('user') . '`
 				CHANGE `login` `login` VARCHAR( 100 ) NOT NULL'           => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('user_dashboard') . '`
+            'ALTER TABLE `' . Common::prefixTable('user_dashboard') . '`
 				CHANGE `login` `login` VARCHAR( 100 ) NOT NULL' => '1146',
-            'ALTER TABLE `' . Piwik_Common::prefixTable('user_language') . '`
+            'ALTER TABLE `' . Common::prefixTable('user_language') . '`
 				CHANGE `login` `login` VARCHAR( 100 ) NOT NULL'  => '1146',
         );
     }
diff --git a/core/Updates/0.2.33.php b/core/Updates/0.2.33.php
index ac82c5d5ac..c203db12d4 100644
--- a/core/Updates/0.2.33.php
+++ b/core/Updates/0.2.33.php
@@ -9,7 +9,7 @@
  * @package Updates
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -20,9 +20,9 @@ class Piwik_Updates_0_2_33 extends Piwik_Updates
     {
         $sqlarray = array(
             // 0.2.33 [1020]
-            'ALTER TABLE `' . Piwik_Common::prefixTable('user_dashboard') . '`
+            'ALTER TABLE `' . Common::prefixTable('user_dashboard') . '`
 				CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci '                                                                            => '1146',
-            'ALTER TABLE `' . Piwik_Common::prefixTable('user_language') . '`
+            'ALTER TABLE `' . Common::prefixTable('user_language') . '`
 				CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci ' => '1146',
         );
 
diff --git a/core/Updates/0.2.35.php b/core/Updates/0.2.35.php
index 70e4c17fdd..90f1b8fd6d 100644
--- a/core/Updates/0.2.35.php
+++ b/core/Updates/0.2.35.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_0_2_35 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('user_dashboard') . '`
+            'ALTER TABLE `' . Common::prefixTable('user_dashboard') . '`
 				CHANGE `layout` `layout` TEXT NOT NULL' => false,
         );
     }
diff --git a/core/Updates/0.2.37.php b/core/Updates/0.2.37.php
index adb9096327..1b3e9ad28e 100644
--- a/core/Updates/0.2.37.php
+++ b/core/Updates/0.2.37.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_0_2_37 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'DELETE FROM `' . Piwik_Common::prefixTable('user_dashboard') . "`
+            'DELETE FROM `' . Common::prefixTable('user_dashboard') . "`
 				WHERE layout LIKE '%.getLastVisitsGraph%'
 				OR layout LIKE '%.getLastVisitsReturningGraph%'" => false,
         );
diff --git a/core/Updates/0.4.1.php b/core/Updates/0.4.1.php
index bae1d4c793..17d5b27910 100644
--- a/core/Updates/0.4.1.php
+++ b/core/Updates/0.4.1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,9 +18,9 @@ class Piwik_Updates_0_4_1 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_conversion') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_conversion') . '`
 				CHANGE `idlink_va` `idlink_va` INT(11) DEFAULT NULL'                                                                           => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_conversion') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_conversion') . '`
 				CHANGE `idaction` `idaction` INT(11) DEFAULT NULL' => '1054',
         );
     }
diff --git a/core/Updates/0.4.2.php b/core/Updates/0.4.2.php
index 7b629c97ca..ac931d6357 100644
--- a/core/Updates/0.4.2.php
+++ b/core/Updates/0.4.2.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,11 +18,11 @@ class Piwik_Updates_0_4_2 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				ADD `config_java` TINYINT(1) NOT NULL AFTER `config_flash`'                                                                                => '1060',
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				ADD `config_quicktime` TINYINT(1) NOT NULL AFTER `config_director`' => '1060',
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				ADD `config_gears` TINYINT(1) NOT NULL AFTER  `config_windowsmedia`,
 				ADD `config_silverlight` TINYINT(1) NOT NULL AFTER `config_gears`'  => false,
         );
diff --git a/core/Updates/0.4.php b/core/Updates/0.4.php
index 5b578e7800..2ccecc2c16 100644
--- a/core/Updates/0.4.php
+++ b/core/Updates/0.4.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,13 +19,13 @@ class Piwik_Updates_0_4 extends Piwik_Updates
     {
         return array(
             // 0.4 [1140]
-            'UPDATE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'UPDATE `' . Common::prefixTable('log_visit') . '`
 				SET location_ip=location_ip+CAST(POW(2,32) AS UNSIGNED) WHERE location_ip < 0'                                                                   => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				CHANGE `location_ip` `location_ip` BIGINT UNSIGNED NOT NULL'              => false,
-            'UPDATE `' . Piwik_Common::prefixTable('logger_api_call') . '`
+            'UPDATE `' . Common::prefixTable('logger_api_call') . '`
 				SET caller_ip=caller_ip+CAST(POW(2,32) AS UNSIGNED) WHERE caller_ip < 0' => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('logger_api_call') . '`
+            'ALTER TABLE `' . Common::prefixTable('logger_api_call') . '`
 				CHANGE `caller_ip` `caller_ip` BIGINT UNSIGNED'                     => false,
         );
     }
diff --git a/core/Updates/0.5.4.php b/core/Updates/0.5.4.php
index bde45af871..f5fc2fb90a 100644
--- a/core/Updates/0.5.4.php
+++ b/core/Updates/0.5.4.php
@@ -9,7 +9,7 @@
  * @package Updates
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,14 +19,14 @@ class Piwik_Updates_0_5_4 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_action') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_action') . '`
 				 CHANGE `name` `name` TEXT' => false,
         );
     }
 
     static function update()
     {
-        $salt = Piwik_Common::generateUniqId();
+        $salt = Common::generateUniqId();
         $config = Config::getInstance();
         $superuser = $config->superuser;
         if (!isset($superuser['salt'])) {
diff --git a/core/Updates/0.5.5.php b/core/Updates/0.5.5.php
index e781f02db2..1cba67d7a9 100644
--- a/core/Updates/0.5.5.php
+++ b/core/Updates/0.5.5.php
@@ -9,7 +9,7 @@
  * @package Updates
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,8 +19,8 @@ class Piwik_Updates_0_5_5 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         $sqlarray = array(
-            'DROP INDEX index_idsite_date ON ' . Piwik_Common::prefixTable('log_visit')                                                                => '1091',
-            'CREATE INDEX index_idsite_date_config ON ' . Piwik_Common::prefixTable('log_visit') . ' (idsite, visit_server_date, config_md5config(8))' => '1061',
+            'DROP INDEX index_idsite_date ON ' . Common::prefixTable('log_visit')                                                                => '1091',
+            'CREATE INDEX index_idsite_date_config ON ' . Common::prefixTable('log_visit') . ' (idsite, visit_server_date, config_md5config(8))' => '1061',
         );
 
         $tables = Piwik::getTablesInstalled();
diff --git a/core/Updates/0.5.php b/core/Updates/0.5.php
index 1a01bcf5f1..d465f9c225 100644
--- a/core/Updates/0.5.php
+++ b/core/Updates/0.5.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,16 +18,16 @@ class Piwik_Updates_0_5 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_action') . ' ADD COLUMN `hash` INTEGER(10) UNSIGNED NOT NULL AFTER `name`;'                        => '1060',
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_visit') . ' CHANGE visit_exit_idaction visit_exit_idaction_url INTEGER(11) NOT NULL;'              => '1054',
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_visit') . ' CHANGE visit_entry_idaction visit_entry_idaction_url INTEGER(11) NOT NULL;'            => '1054',
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_link_visit_action') . ' CHANGE `idaction_ref` `idaction_url_ref` INTEGER(10) UNSIGNED NOT NULL;'   => '1054',
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_link_visit_action') . ' CHANGE `idaction` `idaction_url` INTEGER(10) UNSIGNED NOT NULL;'           => '1054',
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_link_visit_action') . ' ADD COLUMN `idaction_name` INTEGER(10) UNSIGNED AFTER `idaction_url_ref`;' => '1060',
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_conversion') . ' CHANGE `idaction` `idaction_url` INTEGER(11) UNSIGNED NOT NULL;'                  => '1054',
-            'UPDATE ' . Piwik_Common::prefixTable('log_action') . ' SET `hash` = CRC32(name);'                                                                 => false,
-            'CREATE INDEX index_type_hash ON ' . Piwik_Common::prefixTable('log_action') . ' (type, hash);'                                                    => '1061',
-            'DROP INDEX index_type_name ON ' . Piwik_Common::prefixTable('log_action') . ';'                                                                   => '1091',
+            'ALTER TABLE ' . Common::prefixTable('log_action') . ' ADD COLUMN `hash` INTEGER(10) UNSIGNED NOT NULL AFTER `name`;'                        => '1060',
+            'ALTER TABLE ' . Common::prefixTable('log_visit') . ' CHANGE visit_exit_idaction visit_exit_idaction_url INTEGER(11) NOT NULL;'              => '1054',
+            'ALTER TABLE ' . Common::prefixTable('log_visit') . ' CHANGE visit_entry_idaction visit_entry_idaction_url INTEGER(11) NOT NULL;'            => '1054',
+            'ALTER TABLE ' . Common::prefixTable('log_link_visit_action') . ' CHANGE `idaction_ref` `idaction_url_ref` INTEGER(10) UNSIGNED NOT NULL;'   => '1054',
+            'ALTER TABLE ' . Common::prefixTable('log_link_visit_action') . ' CHANGE `idaction` `idaction_url` INTEGER(10) UNSIGNED NOT NULL;'           => '1054',
+            'ALTER TABLE ' . Common::prefixTable('log_link_visit_action') . ' ADD COLUMN `idaction_name` INTEGER(10) UNSIGNED AFTER `idaction_url_ref`;' => '1060',
+            'ALTER TABLE ' . Common::prefixTable('log_conversion') . ' CHANGE `idaction` `idaction_url` INTEGER(11) UNSIGNED NOT NULL;'                  => '1054',
+            'UPDATE ' . Common::prefixTable('log_action') . ' SET `hash` = CRC32(name);'                                                                 => false,
+            'CREATE INDEX index_type_hash ON ' . Common::prefixTable('log_action') . ' (type, hash);'                                                    => '1061',
+            'DROP INDEX index_type_name ON ' . Common::prefixTable('log_action') . ';'                                                                   => '1091',
         );
     }
 
diff --git a/core/Updates/0.6-rc1.php b/core/Updates/0.6-rc1.php
index b1e83f3d3b..bde19cff94 100644
--- a/core/Updates/0.6-rc1.php
+++ b/core/Updates/0.6-rc1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -20,19 +20,19 @@ class Piwik_Updates_0_6_rc1 extends Piwik_Updates
         $defaultTimezone = 'UTC';
         $defaultCurrency = 'USD';
         return array(
-            'ALTER TABLE ' . Piwik_Common::prefixTable('user') . ' CHANGE date_registered date_registered TIMESTAMP NULL'                                                                => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('site') . ' CHANGE ts_created ts_created TIMESTAMP NULL'                                                                          => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('site') . ' ADD `timezone` VARCHAR( 50 ) NOT NULL AFTER `ts_created` ;'                                                           => false,
-            'UPDATE ' . Piwik_Common::prefixTable('site') . ' SET `timezone` = "' . $defaultTimezone . '";'                                                                              => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('site') . ' ADD currency CHAR( 3 ) NOT NULL AFTER `timezone` ;'                                                                   => false,
-            'UPDATE ' . Piwik_Common::prefixTable('site') . ' SET `currency` = "' . $defaultCurrency . '";'                                                                              => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('site') . ' ADD `excluded_ips` TEXT NOT NULL AFTER `currency` ;'                                                                  => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('site') . ' ADD excluded_parameters VARCHAR( 255 ) NOT NULL AFTER `excluded_ips` ;'                                               => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_visit') . ' ADD INDEX `index_idsite_datetime_config`  ( `idsite` , `visit_last_action_time`  , `config_md5config` ( 8 ) ) ;' => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_visit') . ' ADD INDEX index_idsite_idvisit (idsite, idvisit) ;'                                                              => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_conversion') . ' DROP INDEX index_idsite_date'                                                                               => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_conversion') . ' DROP visit_server_date;'                                                                                    => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_conversion') . ' ADD INDEX index_idsite_datetime ( `idsite` , `server_time` )'                                               => false,
+            'ALTER TABLE ' . Common::prefixTable('user') . ' CHANGE date_registered date_registered TIMESTAMP NULL'                                                                => false,
+            'ALTER TABLE ' . Common::prefixTable('site') . ' CHANGE ts_created ts_created TIMESTAMP NULL'                                                                          => false,
+            'ALTER TABLE ' . Common::prefixTable('site') . ' ADD `timezone` VARCHAR( 50 ) NOT NULL AFTER `ts_created` ;'                                                           => false,
+            'UPDATE ' . Common::prefixTable('site') . ' SET `timezone` = "' . $defaultTimezone . '";'                                                                              => false,
+            'ALTER TABLE ' . Common::prefixTable('site') . ' ADD currency CHAR( 3 ) NOT NULL AFTER `timezone` ;'                                                                   => false,
+            'UPDATE ' . Common::prefixTable('site') . ' SET `currency` = "' . $defaultCurrency . '";'                                                                              => false,
+            'ALTER TABLE ' . Common::prefixTable('site') . ' ADD `excluded_ips` TEXT NOT NULL AFTER `currency` ;'                                                                  => false,
+            'ALTER TABLE ' . Common::prefixTable('site') . ' ADD excluded_parameters VARCHAR( 255 ) NOT NULL AFTER `excluded_ips` ;'                                               => false,
+            'ALTER TABLE ' . Common::prefixTable('log_visit') . ' ADD INDEX `index_idsite_datetime_config`  ( `idsite` , `visit_last_action_time`  , `config_md5config` ( 8 ) ) ;' => false,
+            'ALTER TABLE ' . Common::prefixTable('log_visit') . ' ADD INDEX index_idsite_idvisit (idsite, idvisit) ;'                                                              => false,
+            'ALTER TABLE ' . Common::prefixTable('log_conversion') . ' DROP INDEX index_idsite_date'                                                                               => false,
+            'ALTER TABLE ' . Common::prefixTable('log_conversion') . ' DROP visit_server_date;'                                                                                    => false,
+            'ALTER TABLE ' . Common::prefixTable('log_conversion') . ' ADD INDEX index_idsite_datetime ( `idsite` , `server_time` )'                                               => false,
         );
     }
 
diff --git a/core/Updates/0.6.3.php b/core/Updates/0.6.3.php
index 82041c3620..7b2c21accc 100644
--- a/core/Updates/0.6.3.php
+++ b/core/Updates/0.6.3.php
@@ -9,7 +9,7 @@
  * @package Updates
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,9 +19,9 @@ class Piwik_Updates_0_6_3 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				CHANGE `location_ip` `location_ip` INT UNSIGNED NOT NULL'                                                                 => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('logger_api_call') . '`
+            'ALTER TABLE `' . Common::prefixTable('logger_api_call') . '`
 				CHANGE `caller_ip` `caller_ip` INT UNSIGNED' => false,
         );
     }
diff --git a/core/Updates/0.7.php b/core/Updates/0.7.php
index fa153883a9..d50796fc20 100644
--- a/core/Updates/0.7.php
+++ b/core/Updates/0.7.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_0_7 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('option') . '`
+            'ALTER TABLE `' . Common::prefixTable('option') . '`
 				CHANGE `option_name` `option_name` VARCHAR(255) NOT NULL' => false,
         );
     }
diff --git a/core/Updates/0.9.1.php b/core/Updates/0.9.1.php
index 31998ad17d..f76928c314 100644
--- a/core/Updates/0.9.1.php
+++ b/core/Updates/0.9.1.php
@@ -9,7 +9,7 @@
  * @package Updates
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -35,11 +35,11 @@ class Piwik_Updates_0_9_1 extends Piwik_Updates
         $timezoneList = '"' . implode('","', $brokenTZ) . '"';
 
         return array(
-            'UPDATE ' . Piwik_Common::prefixTable('site') . '
+            'UPDATE ' . Common::prefixTable('site') . '
 				SET timezone = "UTC" 
 				WHERE timezone IN (' . $timezoneList . ')'                                                                  => false,
 
-            'UPDATE `' . Piwik_Common::prefixTable('option') . '`
+            'UPDATE `' . Common::prefixTable('option') . '`
 				SET option_value = "UTC" 
 			WHERE option_name = "SitesManager_DefaultTimezone" 
 				AND option_value IN (' . $timezoneList . ')' => false,
diff --git a/core/Updates/1.10.2-b1.php b/core/Updates/1.10.2-b1.php
index 10a28c6143..f6c09c6e47 100755
--- a/core/Updates/1.10.2-b1.php
+++ b/core/Updates/1.10.2-b1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,7 +19,7 @@ class Piwik_Updates_1_10_2_b1 extends Piwik_Updates
     {
         return array(
             // ignore existing column name error (1060)
-            'ALTER TABLE ' . Piwik_Common::prefixTable('report')
+            'ALTER TABLE ' . Common::prefixTable('report')
                 . " ADD COLUMN hour tinyint NOT NULL default 0 AFTER period" => 1060,
         );
     }
diff --git a/core/Updates/1.10.2-b2.php b/core/Updates/1.10.2-b2.php
index 7c05ea806c..fd0907ab97 100644
--- a/core/Updates/1.10.2-b2.php
+++ b/core/Updates/1.10.2-b2.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,7 +19,7 @@ class Piwik_Updates_1_10_2_b2 extends Piwik_Updates
     {
         return array(
             // ignore existing column name error (1060)
-            'ALTER TABLE ' . Piwik_Common::prefixTable('site')
+            'ALTER TABLE ' . Common::prefixTable('site')
                 . " ADD COLUMN `keep_url_fragment` TINYINT NOT NULL DEFAULT 0 AFTER `group`" => 1060,
         );
     }
diff --git a/core/Updates/1.12-b1.php b/core/Updates/1.12-b1.php
index c91dbb1df0..44c9eccd9d 100644
--- a/core/Updates/1.12-b1.php
+++ b/core/Updates/1.12-b1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -23,7 +23,7 @@ class Piwik_Updates_1_12_b1 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_link_visit_action') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_link_visit_action') . '`
 			 ADD `custom_float` FLOAT NULL DEFAULT NULL' => 1060
         );
     }
diff --git a/core/Updates/1.12-b16.php b/core/Updates/1.12-b16.php
index fb5ba2a9a6..29cfa88489 100644
--- a/core/Updates/1.12-b16.php
+++ b/core/Updates/1.12-b16.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,7 +19,7 @@ class Piwik_Updates_1_12_b16 extends Piwik_Updates
     {
         return array(
             // ignore existing column name error (1060)
-            'ALTER TABLE ' . Piwik_Common::prefixTable('report')
+            'ALTER TABLE ' . Common::prefixTable('report')
                 . " ADD COLUMN idsegment INT(11) AFTER description" => 1060,
         );
     }
diff --git a/core/Updates/1.2-rc1.php b/core/Updates/1.2-rc1.php
index 7f36539f7b..beb3b97034 100644
--- a/core/Updates/1.2-rc1.php
+++ b/core/Updates/1.2-rc1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,7 +19,7 @@ class Piwik_Updates_1_2_rc1 extends Piwik_Updates
     {
         return array(
             // Various performance improvements schema updates
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 			    DROP `visit_server_date`,
 			    DROP INDEX `index_idsite_date_config`,
 			    DROP INDEX `index_idsite_datetime_config`,
@@ -44,7 +44,7 @@ class Piwik_Updates_1_2_rc1 extends Piwik_Updates
     			ADD custom_var_k5 VARCHAR(100) DEFAULT NULL,
     			ADD custom_var_v5 VARCHAR(100) DEFAULT NULL
 			   '                                                                                                                                                  => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_link_visit_action') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_link_visit_action') . '`
 				ADD `idsite` INT( 10 ) UNSIGNED NOT NULL AFTER `idlink_va` , 
 				ADD `server_time` DATETIME AFTER `idsite`,
 				ADD `idvisitor` BINARY(8) NOT NULL AFTER `idsite`,
@@ -52,7 +52,7 @@ class Piwik_Updates_1_2_rc1 extends Piwik_Updates
 				ADD INDEX `index_idsite_servertime` ( `idsite` , `server_time` )
 			   '                                                               => false,
 
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_conversion') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_conversion') . '`
 			    DROP `referer_idvisit`,
 			    ADD `idvisitor` BINARY(8) NOT NULL AFTER `idsite`,
 			    ADD visitor_count_visits SMALLINT(5) UNSIGNED NOT NULL,
@@ -70,46 +70,46 @@ class Piwik_Updates_1_2_rc1 extends Piwik_Updates
 			   '                                                                      => false,
 
             // Migrate 128bits IDs inefficiently stored as 8bytes (256 bits) into 64bits
-            'UPDATE ' . Piwik_Common::prefixTable('log_visit') . '
+            'UPDATE ' . Common::prefixTable('log_visit') . '
     			SET idvisitor = binary(unhex(substring(visitor_idcookie,1,16))),
     				config_id = binary(unhex(substring(config_md5config,1,16)))
 	   			'                                                                             => false,
-            'UPDATE ' . Piwik_Common::prefixTable('log_conversion') . '
+            'UPDATE ' . Common::prefixTable('log_conversion') . '
     			SET idvisitor = binary(unhex(substring(visitor_idcookie,1,16)))
 	   			'                                                                        => false,
 
             // Drop migrated fields
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 		    	DROP visitor_idcookie, 
 		    	DROP config_md5config
 		    	'                                                                          => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_conversion') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_conversion') . '`
 		    	DROP visitor_idcookie
 		    	'                                                                     => false,
 
             // Recreate INDEX on new field
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 		    	ADD INDEX `index_idsite_datetime_config` (idsite, visit_last_action_time, config_id)
 		    	'                                                                          => false,
 
             // Backfill action logs as best as we can
-            'UPDATE ' . Piwik_Common::prefixTable('log_link_visit_action') . ' as action,
-				  	' . Piwik_Common::prefixTable('log_visit') . '  as visit
+            'UPDATE ' . Common::prefixTable('log_link_visit_action') . ' as action,
+				  	' . Common::prefixTable('log_visit') . '  as visit
                 SET action.idsite = visit.idsite, 
                 	action.server_time = visit.visit_last_action_time, 
                 	action.idvisitor = visit.idvisitor
                 WHERE action.idvisit=visit.idvisit
                 ' => false,
 
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_link_visit_action') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_link_visit_action') . '`
 				CHANGE `server_time` `server_time` DATETIME NOT NULL
 			   '                                                               => false,
 
             // New index used max once per request, in case this table grows significantly in the future
-            'ALTER TABLE `' . Piwik_Common::prefixTable('option') . '` ADD INDEX ( `autoload` ) '                                                                 => false,
+            'ALTER TABLE `' . Common::prefixTable('option') . '` ADD INDEX ( `autoload` ) '                                                                 => false,
 
             // new field for websites
-            'ALTER TABLE `' . Piwik_Common::prefixTable('site') . '` ADD `group` VARCHAR( 250 ) NOT NULL'                                                         => false,
+            'ALTER TABLE `' . Common::prefixTable('site') . '` ADD `group` VARCHAR( 250 ) NOT NULL'                                                         => false,
         );
     }
 
diff --git a/core/Updates/1.2.3.php b/core/Updates/1.2.3.php
index 066cea1a82..c7cc2ce03c 100644
--- a/core/Updates/1.2.3.php
+++ b/core/Updates/1.2.3.php
@@ -9,7 +9,7 @@
  * @package Updates
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -23,7 +23,7 @@ class Piwik_Updates_1_2_3 extends Piwik_Updates
             'ALTER DATABASE `' . Config::getInstance()->database['dbname'] . '` DEFAULT CHARACTER SET utf8'                                        => false,
 
             // Various performance improvements schema updates
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				DROP INDEX index_idsite_datetime_config,
 				DROP INDEX index_idsite_idvisit,
 				ADD INDEX index_idsite_config_datetime (idsite, config_id, visit_last_action_time),
diff --git a/core/Updates/1.2.5-rc1.php b/core/Updates/1.2.5-rc1.php
index d17bfd3825..7eafdd9ad9 100644
--- a/core/Updates/1.2.5-rc1.php
+++ b/core/Updates/1.2.5-rc1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,9 +18,9 @@ class Piwik_Updates_1_2_5_rc1 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('goal') . '`
+            'ALTER TABLE `' . Common::prefixTable('goal') . '`
 		    	ADD `allow_multiple` tinyint(4) NOT NULL AFTER case_sensitive'                                                         => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_conversion') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_conversion') . '`
 				ADD buster int unsigned NOT NULL AFTER revenue,
 				DROP PRIMARY KEY,
 		    	ADD PRIMARY KEY (idvisit, idgoal, buster)' => false,
diff --git a/core/Updates/1.2.5-rc7.php b/core/Updates/1.2.5-rc7.php
index b1da1cd65a..f1b8805228 100644
--- a/core/Updates/1.2.5-rc7.php
+++ b/core/Updates/1.2.5-rc7.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_2_5_rc7 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 		    	ADD INDEX index_idsite_idvisitor (idsite, idvisitor)' => false,
         );
     }
diff --git a/core/Updates/1.4-rc1.php b/core/Updates/1.4-rc1.php
index 52e5589959..794c512e67 100644
--- a/core/Updates/1.4-rc1.php
+++ b/core/Updates/1.4-rc1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,9 +18,9 @@ class Piwik_Updates_1_4_rc1 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('pdf') . '`
+            'ALTER TABLE `' . Common::prefixTable('pdf') . '`
 		    	ADD COLUMN `format` VARCHAR(10)'                                                => false,
-            'UPDATE `' . Piwik_Common::prefixTable('pdf') . '`
+            'UPDATE `' . Common::prefixTable('pdf') . '`
 		    	SET format = "pdf"' => false,
         );
     }
diff --git a/core/Updates/1.4-rc2.php b/core/Updates/1.4-rc2.php
index f38e8208a0..a25e69ffc7 100644
--- a/core/Updates/1.4-rc2.php
+++ b/core/Updates/1.4-rc2.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -21,16 +21,16 @@ class Piwik_Updates_1_4_rc2 extends Piwik_Updates
             "SET sql_mode=''"                                                                                                                                  => false,
             // this converts the 32-bit UNSIGNED INT column to a 16 byte VARBINARY;
             // _but_ MySQL does string conversion! (e.g., integer 1 is converted to 49 -- the ASCII code for "1")
-            'ALTER TABLE ' . Piwik_Common::prefixTable('log_visit') . '
+            'ALTER TABLE ' . Common::prefixTable('log_visit') . '
 				MODIFY location_ip VARBINARY(16) NOT NULL'                               => false,
-            'ALTER TABLE ' . Piwik_Common::prefixTable('logger_api_call') . '
+            'ALTER TABLE ' . Common::prefixTable('logger_api_call') . '
 				MODIFY caller_ip VARBINARY(16) NOT NULL'                           => false,
 
             // fortunately, 2^32 is 10 digits long and fits in the VARBINARY(16) without truncation;
             // to fix this, we cast to an integer, convert to hex, pad out leading zeros, and unhex it
-            'UPDATE ' . Piwik_Common::prefixTable('log_visit') . "
+            'UPDATE ' . Common::prefixTable('log_visit') . "
 				SET location_ip = UNHEX(LPAD(HEX(CONVERT(location_ip, UNSIGNED)), 8, '0'))"   => false,
-            'UPDATE ' . Piwik_Common::prefixTable('logger_api_call') . "
+            'UPDATE ' . Common::prefixTable('logger_api_call') . "
 				SET caller_ip = UNHEX(LPAD(HEX(CONVERT(caller_ip, UNSIGNED)), 8, '0'))" => false,
         );
     }
diff --git a/core/Updates/1.5-b1.php b/core/Updates/1.5-b1.php
index ba72c69a3f..a8c7b76d31 100644
--- a/core/Updates/1.5-b1.php
+++ b/core/Updates/1.5-b1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_5_b1 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'CREATE TABLE `' . Piwik_Common::prefixTable('log_conversion_item') . '` (
+            'CREATE TABLE `' . Common::prefixTable('log_conversion_item') . '` (
 												  idsite int(10) UNSIGNED NOT NULL,
 										  		  idvisitor BINARY(8) NOT NULL,
 										          server_time DATETIME NOT NULL,
@@ -36,11 +36,11 @@ class Piwik_Updates_1_5_b1 extends Piwik_Updates
 										          INDEX index_idsite_servertime ( idsite, server_time )
 												)  DEFAULT CHARSET=utf8 '                                                                                            => false,
 
-            'ALTER IGNORE TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER IGNORE TABLE `' . Common::prefixTable('log_visit') . '`
 				 ADD  visitor_days_since_order SMALLINT(5) UNSIGNED NOT NULL AFTER visitor_days_since_last,
 				 ADD  visit_goal_buyer TINYINT(1) NOT NULL AFTER visit_goal_converted' => false,
 
-            'ALTER IGNORE TABLE `' . Piwik_Common::prefixTable('log_conversion') . '`
+            'ALTER IGNORE TABLE `' . Common::prefixTable('log_conversion') . '`
 				 ADD visitor_days_since_order SMALLINT(5) UNSIGNED NOT NULL AFTER visitor_days_since_first,
 				 ADD idorder varchar(100) default NULL AFTER buster,
 				 ADD items SMALLINT UNSIGNED DEFAULT NULL,
diff --git a/core/Updates/1.5-b2.php b/core/Updates/1.5-b2.php
index 4711c7a97f..9544271bce 100644
--- a/core/Updates/1.5-b2.php
+++ b/core/Updates/1.5-b2.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_5_b2 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_link_visit_action') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_link_visit_action') . '`
 				 ADD  custom_var_k1 VARCHAR(100) DEFAULT NULL AFTER time_spent_ref_action,
 				 ADD  custom_var_v1 VARCHAR(100) DEFAULT NULL,
 				 ADD  custom_var_k2 VARCHAR(100) DEFAULT NULL,
diff --git a/core/Updates/1.5-b3.php b/core/Updates/1.5-b3.php
index 2beb4ad583..6f72eb6ac5 100644
--- a/core/Updates/1.5-b3.php
+++ b/core/Updates/1.5-b3.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_5_b3 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				 CHANGE custom_var_k1 custom_var_k1 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_v1 custom_var_v1 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_k2 custom_var_k2 VARCHAR(100) DEFAULT NULL,
@@ -29,7 +29,7 @@ class Piwik_Updates_1_5_b3 extends Piwik_Updates
 				 CHANGE custom_var_v4 custom_var_v4 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_k5 custom_var_k5 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_v5 custom_var_v5 VARCHAR(100) DEFAULT NULL'                                                                                    => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_conversion') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_conversion') . '`
 				 CHANGE custom_var_k1 custom_var_k1 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_v1 custom_var_v1 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_k2 custom_var_k2 VARCHAR(100) DEFAULT NULL,
@@ -40,7 +40,7 @@ class Piwik_Updates_1_5_b3 extends Piwik_Updates
 				 CHANGE custom_var_v4 custom_var_v4 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_k5 custom_var_k5 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_v5 custom_var_v5 VARCHAR(100) DEFAULT NULL'        => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_link_visit_action') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_link_visit_action') . '`
 				 CHANGE custom_var_k1 custom_var_k1 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_v1 custom_var_v1 VARCHAR(100) DEFAULT NULL,
 				 CHANGE custom_var_k2 custom_var_k2 VARCHAR(100) DEFAULT NULL,
diff --git a/core/Updates/1.5-b4.php b/core/Updates/1.5-b4.php
index dcf67cf04d..5a869301ed 100644
--- a/core/Updates/1.5-b4.php
+++ b/core/Updates/1.5-b4.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_5_b4 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('site') . '`
+            'ALTER TABLE `' . Common::prefixTable('site') . '`
 				 ADD ecommerce TINYINT DEFAULT 0' => false,
         );
     }
diff --git a/core/Updates/1.5-b5.php b/core/Updates/1.5-b5.php
index 87913e6153..76729f4270 100644
--- a/core/Updates/1.5-b5.php
+++ b/core/Updates/1.5-b5.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_5_b5 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'CREATE TABLE `' . Piwik_Common::prefixTable('session') . '` (
+            'CREATE TABLE `' . Common::prefixTable('session') . '` (
 								id CHAR(32) NOT NULL,
 								modified INTEGER,
 								lifetime INTEGER,
diff --git a/core/Updates/1.6-b1.php b/core/Updates/1.6-b1.php
index f8d87d9945..ef54c76b44 100644
--- a/core/Updates/1.6-b1.php
+++ b/core/Updates/1.6-b1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,12 +18,12 @@ class Piwik_Updates_1_6_b1 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_conversion_item') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_conversion_item') . '`
 				 ADD idaction_category2 INTEGER(10) UNSIGNED NOT NULL AFTER idaction_category,
 				 ADD idaction_category3 INTEGER(10) UNSIGNED NOT NULL,
 				 ADD idaction_category4 INTEGER(10) UNSIGNED NOT NULL,
 				 ADD idaction_category5 INTEGER(10) UNSIGNED NOT NULL'                                                                                            => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_visit') . '`
 				 CHANGE custom_var_k1 custom_var_k1 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_v1 custom_var_v1 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_k2 custom_var_k2 VARCHAR(200) DEFAULT NULL,
@@ -34,7 +34,7 @@ class Piwik_Updates_1_6_b1 extends Piwik_Updates
 				 CHANGE custom_var_v4 custom_var_v4 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_k5 custom_var_k5 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_v5 custom_var_v5 VARCHAR(200) DEFAULT NULL'             => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_conversion') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_conversion') . '`
 				 CHANGE custom_var_k1 custom_var_k1 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_v1 custom_var_v1 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_k2 custom_var_k2 VARCHAR(200) DEFAULT NULL,
@@ -45,7 +45,7 @@ class Piwik_Updates_1_6_b1 extends Piwik_Updates
 				 CHANGE custom_var_v4 custom_var_v4 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_k5 custom_var_k5 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_v5 custom_var_v5 VARCHAR(200) DEFAULT NULL'        => false,
-            'ALTER TABLE `' . Piwik_Common::prefixTable('log_link_visit_action') . '`
+            'ALTER TABLE `' . Common::prefixTable('log_link_visit_action') . '`
 				 CHANGE custom_var_k1 custom_var_k1 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_v1 custom_var_v1 VARCHAR(200) DEFAULT NULL,
 				 CHANGE custom_var_k2 custom_var_k2 VARCHAR(200) DEFAULT NULL,
diff --git a/core/Updates/1.7-b1.php b/core/Updates/1.7-b1.php
index 62632a5183..2b4567e978 100644
--- a/core/Updates/1.7-b1.php
+++ b/core/Updates/1.7-b1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,9 +18,9 @@ class Piwik_Updates_1_7_b1 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('pdf') . '`
+            'ALTER TABLE `' . Common::prefixTable('pdf') . '`
 		    	ADD COLUMN `aggregate_reports_format` TINYINT(1) NOT NULL AFTER `reports`'                      => false,
-            'UPDATE `' . Piwik_Common::prefixTable('pdf') . '`
+            'UPDATE `' . Common::prefixTable('pdf') . '`
 		    	SET `aggregate_reports_format` = 1' => false,
         );
     }
diff --git a/core/Updates/1.7.2-rc5.php b/core/Updates/1.7.2-rc5.php
index d526d5f708..648c2c6b04 100644
--- a/core/Updates/1.7.2-rc5.php
+++ b/core/Updates/1.7.2-rc5.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_7_2_rc5 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('pdf') . '`
+            'ALTER TABLE `' . Common::prefixTable('pdf') . '`
 		    	CHANGE `aggregate_reports_format` `display_format` TINYINT(1) NOT NULL' => false
         );
     }
diff --git a/core/Updates/1.7.2-rc7.php b/core/Updates/1.7.2-rc7.php
index b6a25fae96..51d1bfa887 100755
--- a/core/Updates/1.7.2-rc7.php
+++ b/core/Updates/1.7.2-rc7.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_7_2_rc7 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('user_dashboard') . '`
+            'ALTER TABLE `' . Common::prefixTable('user_dashboard') . '`
 		        ADD `name` VARCHAR( 100 ) NULL DEFAULT NULL AFTER  `iddashboard`' => false,
         );
     }
@@ -26,14 +26,14 @@ class Piwik_Updates_1_7_2_rc7 extends Piwik_Updates
     static function update()
     {
         try {
-            $dashboards = Piwik_FetchAll('SELECT * FROM `' . Piwik_Common::prefixTable('user_dashboard') . '`');
+            $dashboards = Piwik_FetchAll('SELECT * FROM `' . Common::prefixTable('user_dashboard') . '`');
             foreach ($dashboards AS $dashboard) {
                 $idDashboard = $dashboard['iddashboard'];
                 $login = $dashboard['login'];
                 $layout = $dashboard['layout'];
                 $layout = html_entity_decode($layout);
                 $layout = str_replace("\\\"", "\"", $layout);
-                Piwik_Query('UPDATE `' . Piwik_Common::prefixTable('user_dashboard') . '` SET layout = ? WHERE iddashboard = ? AND login = ?', array($layout, $idDashboard, $login));
+                Piwik_Query('UPDATE `' . Common::prefixTable('user_dashboard') . '` SET layout = ? WHERE iddashboard = ? AND login = ?', array($layout, $idDashboard, $login));
             }
             Piwik_Updater::updateDatabase(__FILE__, self::getSql());
         } catch (Exception $e) {
diff --git a/core/Updates/1.8.3-b1.php b/core/Updates/1.8.3-b1.php
index 9605f15702..ca8c0a1c70 100644
--- a/core/Updates/1.8.3-b1.php
+++ b/core/Updates/1.8.3-b1.php
@@ -8,7 +8,7 @@
  * @category Piwik‚
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,10 +19,10 @@ class Piwik_Updates_1_8_3_b1 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE `' . Piwik_Common::prefixTable('site') . '`
+            'ALTER TABLE `' . Common::prefixTable('site') . '`
 				CHANGE `excluded_parameters` `excluded_parameters` TEXT NOT NULL'                            => false,
 
-            'CREATE TABLE `' . Piwik_Common::prefixTable('report') . '` (
+            'CREATE TABLE `' . Common::prefixTable('report') . '` (
 					`idreport` INT(11) NOT NULL AUTO_INCREMENT,
 					`idsite` INTEGER(11) NOT NULL,
 					`login` VARCHAR(100) NOT NULL,
@@ -55,7 +55,7 @@ class Piwik_Updates_1_8_3_b1 extends Piwik_Updates
             // - migrate previous reports, if any, from Piwik_Common::prefixTable('pdf') to Piwik_Common::prefixTable('report')
             // - delete Piwik_Common::prefixTable('pdf')
 
-            $reports = Piwik_FetchAll('SELECT * FROM `' . Piwik_Common::prefixTable('pdf') . '`');
+            $reports = Piwik_FetchAll('SELECT * FROM `' . Common::prefixTable('pdf') . '`');
             foreach ($reports AS $report) {
 
                 $idreport = $report['idreport'];
@@ -82,7 +82,7 @@ class Piwik_Updates_1_8_3_b1 extends Piwik_Updates
                 $parameters[Piwik_PDFReports::DISPLAY_FORMAT_PARAMETER] = $display_format;
 
                 Piwik_Query(
-                    'INSERT INTO `' . Piwik_Common::prefixTable('report') . '` SET
+                    'INSERT INTO `' . Common::prefixTable('report') . '` SET
 					idreport = ?, idsite = ?, login = ?, description = ?, period = ?,
 					type = ?, format = ?, reports = ?, parameters = ?, ts_created = ?,
 					ts_last_sent = ?, deleted = ?',
@@ -94,8 +94,8 @@ class Piwik_Updates_1_8_3_b1 extends Piwik_Updates
                          is_null($period) ? Piwik_PDFReports::DEFAULT_PERIOD : $period,
                          Piwik_PDFReports::EMAIL_TYPE,
                          is_null($format) ? Piwik_PDFReports::DEFAULT_REPORT_FORMAT : $format,
-                         Piwik_Common::json_encode(preg_split('/,/', $reports)),
-                         Piwik_Common::json_encode($parameters),
+                         Common::json_encode(preg_split('/,/', $reports)),
+                         Common::json_encode($parameters),
                          $ts_created,
                          $ts_last_sent,
                          $deleted
@@ -103,7 +103,7 @@ class Piwik_Updates_1_8_3_b1 extends Piwik_Updates
                 );
             }
 
-            Piwik_Query('DROP TABLE `' . Piwik_Common::prefixTable('pdf') . '`');
+            Piwik_Query('DROP TABLE `' . Common::prefixTable('pdf') . '`');
         } catch (Exception $e) {
         }
 
diff --git a/core/Updates/1.8.4-b1.php b/core/Updates/1.8.4-b1.php
index 58b8139647..e36349e8d1 100644
--- a/core/Updates/1.8.4-b1.php
+++ b/core/Updates/1.8.4-b1.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -23,11 +23,11 @@ class Piwik_Updates_1_8_4_b1 extends Piwik_Updates
 
     static function getSql($schema = 'Myisam')
     {
-        $action = Piwik_Common::prefixTable('log_action');
-        $duplicates = Piwik_Common::prefixTable('log_action_duplicates');
-        $visitAction = Piwik_Common::prefixTable('log_link_visit_action');
-        $conversion = Piwik_Common::prefixTable('log_conversion');
-        $visit = Piwik_Common::prefixTable('log_visit');
+        $action = Common::prefixTable('log_action');
+        $duplicates = Common::prefixTable('log_action_duplicates');
+        $visitAction = Common::prefixTable('log_link_visit_action');
+        $conversion = Common::prefixTable('log_conversion');
+        $visit = Common::prefixTable('log_visit');
 
         return array(
 
diff --git a/core/Updates/1.9-b16.php b/core/Updates/1.9-b16.php
index dade3e37b3..096e7eadf8 100755
--- a/core/Updates/1.9-b16.php
+++ b/core/Updates/1.9-b16.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -23,23 +23,23 @@ class Piwik_Updates_1_9_b16 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE  `' . Piwik_Common::prefixTable('log_link_visit_action') . '`
+            'ALTER TABLE  `' . Common::prefixTable('log_link_visit_action') . '`
 			CHANGE `idaction_url` `idaction_url` INT( 10 ) UNSIGNED NULL DEFAULT NULL'
             => false,
 
 
-            'ALTER TABLE  `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE  `' . Common::prefixTable('log_visit') . '`
 			ADD visit_total_searches SMALLINT(5) UNSIGNED NOT NULL AFTER `visit_total_actions`'
             => 1060,
 
-            'ALTER TABLE  `' . Piwik_Common::prefixTable('site') . '`
+            'ALTER TABLE  `' . Common::prefixTable('site') . '`
 			ADD sitesearch TINYINT DEFAULT 1 AFTER `excluded_parameters`,
             ADD sitesearch_keyword_parameters TEXT NOT NULL AFTER `sitesearch`,
             ADD sitesearch_category_parameters TEXT NOT NULL AFTER `sitesearch_keyword_parameters`'
                                                                                                    => 1060,
 
             // enable Site Search for all websites, users can manually disable the setting
-            'UPDATE `' . Piwik_Common::prefixTable('site') . '`
+            'UPDATE `' . Common::prefixTable('site') . '`
 		    	SET `sitesearch` = 1' => false,
         );
     }
diff --git a/core/Updates/1.9-b19.php b/core/Updates/1.9-b19.php
index 9dc79c3d4a..de201fcb8d 100755
--- a/core/Updates/1.9-b19.php
+++ b/core/Updates/1.9-b19.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,10 +18,10 @@ class Piwik_Updates_1_9_b19 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE  `' . Piwik_Common::prefixTable('log_link_visit_action') . '`
+            'ALTER TABLE  `' . Common::prefixTable('log_link_visit_action') . '`
 			CHANGE `idaction_url_ref` `idaction_url_ref` INT( 10 ) UNSIGNED NULL DEFAULT 0'
             => false,
-            'ALTER TABLE  `' . Piwik_Common::prefixTable('log_visit') . '`
+            'ALTER TABLE  `' . Common::prefixTable('log_visit') . '`
 			CHANGE `visit_exit_idaction_url` `visit_exit_idaction_url` INT( 10 ) UNSIGNED NULL DEFAULT 0'
             => false
         );
diff --git a/core/Updates/1.9-b9.php b/core/Updates/1.9-b9.php
index c70169d3ef..b67304d93d 100755
--- a/core/Updates/1.9-b9.php
+++ b/core/Updates/1.9-b9.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -22,8 +22,8 @@ class Piwik_Updates_1_9_b9 extends Piwik_Updates
 
     static function getSql($schema = 'Myisam')
     {
-        $logVisit = Piwik_Common::prefixTable('log_visit');
-        $logConversion = Piwik_Common::prefixTable('log_conversion');
+        $logVisit = Common::prefixTable('log_visit');
+        $logConversion = Common::prefixTable('log_conversion');
 
         $addColumns = "DROP `location_continent`,
 					   ADD `location_region` CHAR(2) NULL AFTER `location_country`,
diff --git a/core/Updates/1.9.1-b2.php b/core/Updates/1.9.1-b2.php
index bf478a6fc8..f2bcb81f42 100644
--- a/core/Updates/1.9.1-b2.php
+++ b/core/Updates/1.9.1-b2.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -18,7 +18,7 @@ class Piwik_Updates_1_9_1_b2 extends Piwik_Updates
     static function getSql($schema = 'Myisam')
     {
         return array(
-            'ALTER TABLE ' . Piwik_Common::prefixTable('site') . " DROP `feedburnerName`" => 1091
+            'ALTER TABLE ' . Common::prefixTable('site') . " DROP `feedburnerName`" => 1091
         );
     }
 
diff --git a/core/Updates/1.9.3-b8.php b/core/Updates/1.9.3-b8.php
index 67e296ea81..3a0db01948 100755
--- a/core/Updates/1.9.3-b8.php
+++ b/core/Updates/1.9.3-b8.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Updates
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Updates
@@ -19,7 +19,7 @@ class Piwik_Updates_1_9_3_b8 extends Piwik_Updates
     {
         return array(
             // ignore existing column name error (1060)
-            'ALTER TABLE ' . Piwik_Common::prefixTable('site')
+            'ALTER TABLE ' . Common::prefixTable('site')
                 . " ADD COLUMN excluded_user_agents TEXT NOT NULL AFTER excluded_parameters" => 1060,
         );
     }
diff --git a/core/Url.php b/core/Url.php
index b31d854935..ab7b7c65e1 100644
--- a/core/Url.php
+++ b/core/Url.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Class to retrieve absolute URL or URI components of the current URL,
@@ -197,7 +197,7 @@ class Piwik_Url
         }
 
         // Only punctuation we allow is '[', ']', ':', '.' and '-'
-        $hostLength = Piwik_Common::strlen($host);
+        $hostLength = Common::strlen($host);
         if ($hostLength !== strcspn($host, '`~!@#$%^&*()_+={}\\|;"\'<>,?/ ')) {
             return false;
         }
@@ -205,9 +205,9 @@ class Piwik_Url
         foreach ($trustedHosts as &$trustedHost) {
             $trustedHost = preg_quote($trustedHost);
         }
-        $untrustedHost = Piwik_Common::mb_strtolower($host);
+        $untrustedHost = Common::mb_strtolower($host);
         $untrustedHost = rtrim($untrustedHost, '.');
-        $hostRegex = Piwik_Common::mb_strtolower('/(^|.)' . implode('|', $trustedHosts) . '$/');
+        $hostRegex = Common::mb_strtolower('/(^|.)' . implode('|', $trustedHosts) . '$/');
         $result = preg_match($hostRegex, $untrustedHost);
         return 0 !== $result;
     }
@@ -284,7 +284,7 @@ class Piwik_Url
         }
 
         $host = self::getHost($checkTrustedHost);
-        $default = Piwik_Common::sanitizeInputValue($host ? $host : $default);
+        $default = Common::sanitizeInputValue($host ? $host : $default);
 
         return Piwik_IP::getNonProxyIpFromHeader($default, $hostHeaders);
     }
@@ -318,7 +318,7 @@ class Piwik_Url
     static function getArrayFromCurrentQueryString()
     {
         $queryString = self::getCurrentQueryString();
-        $urlValues = Piwik_Common::getArrayFromQueryString($queryString);
+        $urlValues = Common::getArrayFromQueryString($queryString);
         return $urlValues;
     }
 
@@ -391,7 +391,7 @@ class Piwik_Url
      */
     static public function redirectToUrl($url)
     {
-        if (Piwik_Common::isLookLikeUrl($url)
+        if (Common::isLookLikeUrl($url)
             || strpos($url, 'index.php') === 0
         ) {
             @header("Location: $url");
diff --git a/core/View.php b/core/View.php
index 8047dc6230..c8ee8c3089 100644
--- a/core/View.php
+++ b/core/View.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Transition for pre-Piwik 0.4.4
@@ -48,7 +48,7 @@ class Piwik_View implements Piwik_View_Interface
         $this->initializeTwig();
 
         $this->piwik_version = Piwik_Version::VERSION;
-        $this->piwikUrl = Piwik_Common::sanitizeInputValue(Piwik_Url::getCurrentUrlWithoutFileName());
+        $this->piwikUrl = Common::sanitizeInputValue(Piwik_Url::getCurrentUrlWithoutFileName());
     }
 
     /**
@@ -99,13 +99,13 @@ class Piwik_View implements Piwik_View_Interface
             $sites = Piwik_SitesManager_API::getInstance()->getSitesWithAtLeastViewAccess($count);
             usort($sites, create_function('$site1, $site2', 'return strcasecmp($site1["name"], $site2["name"]);'));
             $this->sites = $sites;
-            $this->url = Piwik_Common::sanitizeInputValue(Piwik_Url::getCurrentUrl());
+            $this->url = Common::sanitizeInputValue(Piwik_Url::getCurrentUrl());
             $this->token_auth = Piwik::getCurrentUserTokenAuth();
             $this->userHasSomeAdminAccess = Piwik::isUserHasSomeAdminAccess();
             $this->userIsSuperUser = Piwik::isUserIsSuperUser();
             $this->latest_version_available = Piwik_UpdateCheck::isNewestVersionAvailable();
-            $this->disableLink = Piwik_Common::getRequestVar('disableLink', 0, 'int');
-            $this->isWidget = Piwik_Common::getRequestVar('widget', 0, 'int');
+            $this->disableLink = Common::getRequestVar('disableLink', 0, 'int');
+            $this->isWidget = Common::getRequestVar('widget', 0, 'int');
             if (Config::getInstance()->General['autocomplete_min_sites'] <= count($sites)) {
                 $this->show_autocompleter = true;
             } else {
diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php
index 91da163f47..e8026c916a 100644
--- a/core/ViewDataTable.php
+++ b/core/ViewDataTable.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * This class is used to load (from the API) and customize the output of a given DataTable.
@@ -179,7 +179,7 @@ abstract class Piwik_ViewDataTable
         $this->viewProperties['request_parameters_to_modify'] = array();
         $this->viewProperties['columns_to_display'] = array();
 
-        $columns = Piwik_Common::getRequestVar('columns', false);
+        $columns = Common::getRequestVar('columns', false);
         if ($columns !== false) {
             $this->viewProperties['columns_to_display'] = Piwik::getArrayFromApiParameter($columns);
             array_unshift($this->viewProperties['columns_to_display'], 'label');
@@ -225,7 +225,7 @@ abstract class Piwik_ViewDataTable
             $defaultType = 'table';
         }
 
-        $type = Piwik_Common::getRequestVar('viewDataTable', $defaultType, 'string');
+        $type = Common::getRequestVar('viewDataTable', $defaultType, 'string');
         switch ($type) {
             case 'cloud':
                 $result = new Piwik_ViewDataTable_Cloud();
@@ -366,7 +366,7 @@ abstract class Piwik_ViewDataTable
         $this->currentControllerName = $currentControllerName;
         $this->currentControllerAction = $currentControllerAction;
         $this->controllerActionCalledWhenRequestSubTable = $controllerActionCalledWhenRequestSubTable;
-        $this->idSubtable = Piwik_Common::getRequestVar('idSubtable', false, 'int');
+        $this->idSubtable = Common::getRequestVar('idSubtable', false, 'int');
         
         foreach ($defaultProperties as $name => $value) {
             $this->setViewProperty($name, $value);
@@ -647,7 +647,7 @@ abstract class Piwik_ViewDataTable
     private function areGenericFiltersDisabled()
     {
         // if disable_generic_filters query param is set to '1', generic filters are disabled
-        if (Piwik_Common::getRequestVar('disable_generic_filters', '0', 'string') == 1) {
+        if (Common::getRequestVar('disable_generic_filters', '0', 'string') == 1) {
             return true;
         }
 
@@ -705,7 +705,7 @@ abstract class Piwik_ViewDataTable
         $requestArray = array(
             'method' => $this->viewProperties['apiMethodToRequestDataTable'],
             'format' => 'original',
-            'disable_generic_filters' => Piwik_Common::getRequestVar('disable_generic_filters', 1, 'int')
+            'disable_generic_filters' => Common::getRequestVar('disable_generic_filters', 1, 'int')
         );
 
         $toSetEventually = array(
@@ -744,7 +744,7 @@ abstract class Piwik_ViewDataTable
     {
         // we need the URL encoded segment parameter, we fetch it from _SERVER['QUERY_STRING'] instead of default URL decoded _GET
         $segmentRaw = false;
-        $segment = Piwik_Common::getRequestVar('segment', '', 'string');
+        $segment = Common::getRequestVar('segment', '', 'string');
         if (!empty($segment)) {
             $request = Piwik_API_Request::getRequestParametersGET();
             if(!empty($request['segment'])) {
@@ -826,7 +826,7 @@ abstract class Piwik_ViewDataTable
 
         foreach ($_GET as $name => $value) {
             try {
-                $requestValue = Piwik_Common::getRequestVar($name);
+                $requestValue = Common::getRequestVar($name);
             } catch (Exception $e) {
                 $requestValue = '';
             }
@@ -909,7 +909,7 @@ abstract class Piwik_ViewDataTable
     protected function getDefaultOrCurrent($nameVar)
     {
         if (isset($_GET[$nameVar])) {
-            return Piwik_Common::sanitizeInputValue($_GET[$nameVar]);
+            return Common::sanitizeInputValue($_GET[$nameVar]);
         }
         $default = $this->getDefault($nameVar);
         return $default;
@@ -1530,8 +1530,8 @@ abstract class Piwik_ViewDataTable
      */
     public function hasReportBeenPurged()
     {
-        $strPeriod = Piwik_Common::getRequestVar('period', false);
-        $strDate = Piwik_Common::getRequestVar('date', false);
+        $strPeriod = Common::getRequestVar('period', false);
+        $strDate = Common::getRequestVar('date', false);
 
         if ($strPeriod !== false
             && $strDate !== false
@@ -1539,7 +1539,7 @@ abstract class Piwik_ViewDataTable
         ) {
             // if range, only look at the first date
             if ($strPeriod == 'range') {
-                $idSite = Piwik_Common::getRequestVar('idSite', '');
+                $idSite = Common::getRequestVar('idSite', '');
                 if (intval($idSite) != 0) {
                     $site = new Piwik_Site($idSite);
                     $timezone = $site->getTimezone();
@@ -1620,9 +1620,9 @@ abstract class Piwik_ViewDataTable
     {
         // if filter_column_recursive & filter_pattern_recursive are supplied, and flat isn't supplied
         // we have to load all the child subtables.
-        return Piwik_Common::getRequestVar('filter_column_recursive', false) !== false
-             && Piwik_Common::getRequestVar('filter_pattern_recursive', false) !== false
-             && Piwik_Common::getRequestVar('flat', false) === false;
+        return Common::getRequestVar('filter_column_recursive', false) !== false
+             && Common::getRequestVar('filter_pattern_recursive', false) !== false
+             && Common::getRequestVar('flat', false) === false;
     }
     
     /**
diff --git a/core/ViewDataTable/GenerateGraphData.php b/core/ViewDataTable/GenerateGraphData.php
index 8658093102..91a1d889b7 100644
--- a/core/ViewDataTable/GenerateGraphData.php
+++ b/core/ViewDataTable/GenerateGraphData.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Reads data from the API and prepares data to give to the renderer Piwik_Visualization_Chart.
@@ -59,7 +59,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable
                      $controllerActionCalledWhenRequestSubTable,
                      $defaultProperties);
         
-        $columns = Piwik_Common::getRequestVar('columns', false);
+        $columns = Common::getRequestVar('columns', false);
         if ($columns !== false) {
             $columns = Piwik::getArrayFromApiParameter($columns);
         } else {
@@ -79,7 +79,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable
         // selectable columns
         if ($this->getViewDataTableId() != 'generateDataChartEvolution') {
             $selectableColumns = array('nb_visits', 'nb_actions');
-            if (Piwik_Common::getRequestVar('period', false) == 'day') {
+            if (Common::getRequestVar('period', false) == 'day') {
                 $selectableColumns[] = 'nb_uniq_visitors';
             }
             $this->setSelectableColumns($selectableColumns);
@@ -161,7 +161,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable
     protected function addSeriesPickerToView($multiSelect = true)
     {
         if (count($this->selectableColumns)
-            && Piwik_Common::getRequestVar('showSeriesPicker', 1) == 1
+            && Common::getRequestVar('showSeriesPicker', 1) == 1
         ) {
             // build the final configuration for the series picker
             $columnsToDisplay = $this->getColumnsToDisplay();
@@ -181,7 +181,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable
     protected function getUnitsForColumnsToDisplay()
     {
         // derive units from column names
-        $idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
+        $idSite = Common::getRequestVar('idSite', null, 'int');
         $units = $this->deriveUnitsFromRequestedColumnNames($this->getColumnsToDisplay(), $idSite);
         if (!empty($this->yAxisUnit)) {
             // force unit to the value set via $this->setAxisYUnit()
@@ -240,7 +240,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable
 
         // if addTotalRow was called in GenerateGraphHTML, add a row containing totals of
         // different metrics
-        if (Piwik_Common::getRequestVar('add_total_row', 0) == 1) {
+        if (Common::getRequestVar('add_total_row', 0) == 1) {
             $this->dataTable->queueFilter('AddSummaryRow', array(0, Piwik_Translate('General_Total'), null, false));
         }
 
@@ -275,7 +275,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable
         $this->view->setDisplayPercentageInTooltip($this->displayPercentageInTooltip);
 
         // show_all_ticks is not real query param, it is set by GenerateGraphHTML.
-        if (Piwik_Common::getRequestVar('show_all_ticks', 0) == 1) {
+        if (Common::getRequestVar('show_all_ticks', 0) == 1) {
             $this->view->showAllTicks();
         }
 
diff --git a/core/ViewDataTable/GenerateGraphData/ChartEvolution.php b/core/ViewDataTable/GenerateGraphData/ChartEvolution.php
index d0cbb29f3e..5a51049c8e 100644
--- a/core/ViewDataTable/GenerateGraphData/ChartEvolution.php
+++ b/core/ViewDataTable/GenerateGraphData/ChartEvolution.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik_ViewDataTable_GenerateGraphData for the Evolution graph (eg. Last 30 days visits) using Piwik_Visualization_Chart_Evolution
@@ -93,7 +93,7 @@ class Piwik_ViewDataTable_GenerateGraphData_ChartEvolution extends Piwik_ViewDat
 
     protected function loadDataTableFromAPI()
     {
-        $period = Piwik_Common::getRequestVar('period');
+        $period = Common::getRequestVar('period');
         // period will be overridden when 'range' is requested in the UI
         // but the graph will display for each day of the range.
         // Default 'range' behavior is to return the 'sum' for the range
@@ -129,7 +129,7 @@ class Piwik_ViewDataTable_GenerateGraphData_ChartEvolution extends Piwik_ViewDat
             $uniqueIdsDataTable[] = $idDataTable;
         }
 
-        $idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
+        $idSite = Common::getRequestVar('idSite', null, 'int');
         $requestedColumnNames = $this->getColumnsToDisplay();
         $units = $this->getUnitsForColumnsToDisplay();
 
@@ -276,8 +276,8 @@ class Piwik_ViewDataTable_GenerateGraphData_ChartEvolution extends Piwik_ViewDat
             // 1) Custom Date Range always have link disabled, otherwise
             // the graph data set is way too big and fails to display
             // 2) disableLink parameter is set in the Widgetize "embed" code
-            $linkEnabled = !Piwik_Common::getRequestVar('disableLink', 0, 'int')
-                && Piwik_Common::getRequestVar('period', 'day') != 'range';
+            $linkEnabled = !Common::getRequestVar('disableLink', 0, 'int')
+                && Common::getRequestVar('period', 'day') != 'range';
         }
         return $linkEnabled;
     }
diff --git a/core/ViewDataTable/GenerateGraphHTML.php b/core/ViewDataTable/GenerateGraphHTML.php
index f34390404d..501f7fc558 100644
--- a/core/ViewDataTable/GenerateGraphHTML.php
+++ b/core/ViewDataTable/GenerateGraphHTML.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * This class generates the HTML code to embed graphs in the page.
@@ -140,7 +140,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphHTML extends Piwik_ViewDataTable
     protected function buildView()
     {
         // access control
-        $idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
+        $idSite = Common::getRequestVar('idSite', 1, 'int');
         Piwik_API_Request::reloadAuthUsingTokenAuth();
         if (!Piwik::isUserHasViewAccess($idSite)) {
             throw new Exception(Piwik_TranslateException('General_ExceptionPrivilegeAccessWebsite', array("'view'", $idSite)));
diff --git a/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php b/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php
index aec31a7a3a..00c5079760 100644
--- a/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php
+++ b/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Generates HTML embed for the Evolution graph
@@ -100,10 +100,10 @@ class Piwik_ViewDataTable_GenerateGraphHTML_ChartEvolution extends Piwik_ViewDat
      */
     private function calculateEvolutionDateRange()
     {
-        $period = Piwik_Common::getRequestVar('period');
+        $period = Common::getRequestVar('period');
 
         $defaultLastN = self::getDefaultLastN($period);
-        $this->originalDate = Piwik_Common::getRequestVar('date', 'last' . $defaultLastN, 'string');
+        $this->originalDate = Common::getRequestVar('date', 'last' . $defaultLastN, 'string');
 
         if ($period != 'range') // show evolution limit if the period is not a range
         {
@@ -143,9 +143,9 @@ class Piwik_ViewDataTable_GenerateGraphHTML_ChartEvolution extends Piwik_ViewDat
         }
 
         $lastNParamName = self::getLastNParamName($period);
-        $lastN = Piwik_Common::getRequestVar($lastNParamName, $defaultLastN, 'int');
+        $lastN = Common::getRequestVar($lastNParamName, $defaultLastN, 'int');
 
-        $site = new Piwik_Site(Piwik_Common::getRequestVar('idSite'));
+        $site = new Piwik_Site(Common::getRequestVar('idSite'));
 
         $dateRange = Piwik_Controller::getDateRangeRelativeToEndDate($period, 'last' . $lastN, $endDate, $site);
 
diff --git a/core/ViewDataTable/HtmlTable.php b/core/ViewDataTable/HtmlTable.php
index 6267a2aca2..e1bfe37f10 100644
--- a/core/ViewDataTable/HtmlTable.php
+++ b/core/ViewDataTable/HtmlTable.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Outputs an AJAX Table for a given DataTable.
@@ -158,7 +158,7 @@ class Piwik_ViewDataTable_HtmlTable extends Piwik_ViewDataTable
 
     protected function handleLowPopulation($columnToApplyFilter = null)
     {
-        if (Piwik_Common::getRequestVar('enable_filter_excludelowpop', '0', 'string') == '0') {
+        if (Common::getRequestVar('enable_filter_excludelowpop', '0', 'string') == '0') {
             return;
         }
         if (is_null($columnToApplyFilter)) {
diff --git a/core/ViewDataTable/HtmlTable/Goals.php b/core/ViewDataTable/HtmlTable/Goals.php
index 325253872f..6e1ddb535d 100644
--- a/core/ViewDataTable/HtmlTable/Goals.php
+++ b/core/ViewDataTable/HtmlTable/Goals.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik
@@ -24,13 +24,13 @@ class Piwik_ViewDataTable_HtmlTable_Goals extends Piwik_ViewDataTable_HtmlTable
 
     public function main()
     {
-        $this->idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
-        $this->processOnlyIdGoal = Piwik_Common::getRequestVar('idGoal', Piwik_DataTable_Filter_AddColumnsProcessedMetricsGoal::GOALS_OVERVIEW, 'string');
+        $this->idSite = Common::getRequestVar('idSite', null, 'int');
+        $this->processOnlyIdGoal = Common::getRequestVar('idGoal', Piwik_DataTable_Filter_AddColumnsProcessedMetricsGoal::GOALS_OVERVIEW, 'string');
         $this->isEcommerce = $this->processOnlyIdGoal == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER;
         $this->viewProperties['show_exclude_low_population'] = true;
         $this->viewProperties['show_goals'] = true;
 
-        if (Piwik_Common::getRequestVar('documentationForGoalsPage', 0, 'int') == 1) {
+        if (Common::getRequestVar('documentationForGoalsPage', 0, 'int') == 1) {
             $this->setReportDocumentation(Piwik_Translate('Goals_ConversionByTypeReportDocumentation',
                 array('<br />', '<br />', '<a href="http://piwik.org/docs/tracking-goals-web-analytics/" target="_blank">', '</a>')));
         }
@@ -140,7 +140,7 @@ class Piwik_ViewDataTable_HtmlTable_Goals extends Piwik_ViewDataTable_HtmlTable
                 foreach ($goals as $goal) {
                     $idgoal = $goal['idgoal'];
 
-                    $goal['name'] = Piwik_Common::unsanitizeInputValue($goal['name']);
+                    $goal['name'] = Common::unsanitizeInputValue($goal['name']);
 
                     if ($this->processOnlyIdGoal > Piwik_DataTable_Filter_AddColumnsProcessedMetricsGoal::GOALS_FULL_TABLE
                         && $this->processOnlyIdGoal != $idgoal
diff --git a/core/ViewDataTable/Sparkline.php b/core/ViewDataTable/Sparkline.php
index 09a4d7373a..f20d3bc1ec 100644
--- a/core/ViewDataTable/Sparkline.php
+++ b/core/ViewDataTable/Sparkline.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Reads the requested DataTable from the API and prepare data for the Sparkline view.
@@ -35,7 +35,7 @@ class Piwik_ViewDataTable_Sparkline extends Piwik_ViewDataTable
         $this->mainAlreadyExecuted = true;
 
         // If period=range, we force the sparkline to draw daily data points
-        $period = Piwik_Common::getRequestVar('period');
+        $period = Common::getRequestVar('period');
         if ($period == 'range') {
             $_GET['period'] = 'day';
         }
@@ -53,12 +53,12 @@ class Piwik_ViewDataTable_Sparkline extends Piwik_ViewDataTable
         $graph = new Piwik_Visualization_Sparkline();
         $graph->setValues($values);
 
-        $height = Piwik_Common::getRequestVar('height', 0, 'int');
+        $height = Common::getRequestVar('height', 0, 'int');
         if (!empty($height)) {
             $graph->setHeight($height);
         }
 
-        $width = Piwik_Common::getRequestVar('width', 0, 'int');
+        $width = Common::getRequestVar('width', 0, 'int');
         if (!empty($width)) {
             $graph->setWidth($width);
         }
diff --git a/core/Visualization/Chart.php b/core/Visualization/Chart.php
index 9c8f53700d..3c6374e852 100644
--- a/core/Visualization/Chart.php
+++ b/core/Visualization/Chart.php
@@ -9,7 +9,7 @@
  * @package Piwik
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Generates the data in the Open Flash Chart format, from the given data.
@@ -57,7 +57,7 @@ abstract class Piwik_Visualization_Chart implements Piwik_View_Interface
                 // unsanitize here is safe since data gets outputted as JSON, not HTML
                 // NOTE: this is a quick fix for a double-encode issue. if this file is refactored,
                 // this fix can probably be removed (or at least made more understandable).
-                'label'         => Piwik_Common::unsanitizeInputValue($label),
+                'label'         => Common::unsanitizeInputValue($label),
                 'internalLabel' => $label
             );
 
@@ -168,7 +168,7 @@ abstract class Piwik_Visualization_Chart implements Piwik_View_Interface
         );
 
         Piwik_PostEvent('Visualization_Chart.render', array(&$data));
-        return Piwik_Common::json_encode($data);
+        return Common::json_encode($data);
     }
 
     public function customizeChartProperties()
diff --git a/core/Visualization/Cloud.php b/core/Visualization/Cloud.php
index 3458c70605..9d37bf9423 100644
--- a/core/Visualization/Cloud.php
+++ b/core/Visualization/Cloud.php
@@ -8,7 +8,7 @@
  * @category Piwik
  * @package Piwik
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Generates a tag cloud from a given data array.
@@ -52,8 +52,8 @@ class Piwik_Visualization_Cloud implements Piwik_View_Interface
         $maxValue = max($this->wordsArray);
         foreach ($this->wordsArray as $word => $popularity) {
             $wordTruncated = $word;
-            if (Piwik_Common::mb_strlen($word) > $this->truncatingLimit) {
-                $wordTruncated = Piwik_Common::mb_substr($word, 0, $this->truncatingLimit - 3) . '...';
+            if (Common::mb_strlen($word) > $this->truncatingLimit) {
+                $wordTruncated = Common::mb_substr($word, 0, $this->truncatingLimit - 3) . '...';
             }
 
             // case hideFutureHoursWhenToday=1 shows hours with no visits
diff --git a/libs/upgradephp/upgrade.php b/libs/upgradephp/upgrade.php
index e553110d36..19df79a6f6 100644
--- a/libs/upgradephp/upgrade.php
+++ b/libs/upgradephp/upgrade.php
@@ -35,7 +35,7 @@
  * Any contribution is appreciated. <milky*users#sf#net>
  *
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @since PHP 5
@@ -996,7 +996,7 @@ function _readfile($filename, $useIncludePath = false, $context = null)
 	}
 
 	// when in doubt (or when readfile() function is disabled)
-	$handle = @fopen($filename, Piwik_Common::isWindows() ? "rb" : "r");
+	$handle = @fopen($filename, Common::isWindows() ? "rb" : "r");
 	if ($handle) {
 		while(!feof($handle)) {
 			echo fread($handle, 8192);
diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index 8985087491..88dfb56851 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -1,7 +1,7 @@
 <?php
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 $USAGE = "
 Usage: 
@@ -623,8 +623,8 @@ class Archiving
      */
     private function initCheckCli()
     {
-        if (!Piwik_Common::isPhpCliMode()) {
-            $token_auth = Piwik_Common::getRequestVar('token_auth', '', 'string');
+        if (!Common::isPhpCliMode()) {
+            $token_auth = Common::getRequestVar('token_auth', '', 'string');
             if ($token_auth != $this->token_auth
                 || strlen($token_auth) != 32
             ) {
@@ -783,16 +783,16 @@ class Archiving
     private function initPiwikHost()
     {
         // If archive.php run as a web cron, we use the current hostname
-        if (!Piwik_Common::isPhpCliMode()) {
+        if (!Common::isPhpCliMode()) {
             // example.org/piwik/misc/cron/
-            $piwikUrl = Piwik_Common::sanitizeInputValue(Piwik_Url::getCurrentUrlWithoutFileName());
+            $piwikUrl = Common::sanitizeInputValue(Piwik_Url::getCurrentUrlWithoutFileName());
             // example.org/piwik/
             $piwikUrl = $piwikUrl . "../../";
         } // If archive.php run as CLI/shell we require the piwik url to be set
         else {
             $piwikUrl = $this->isParameterSet("url", true);
             if (!$piwikUrl
-                || !Piwik_Common::isLookLikeUrl($piwikUrl)
+                || !Common::isLookLikeUrl($piwikUrl)
             ) {
                 $this->logFatalError("archive.php expects the argument --url to be set to your Piwik URL, for example: --url=http://example.org/piwik/ ", $backtrace = false);
             }
@@ -819,7 +819,7 @@ class Archiving
      */
     private function isParameterSet($parameter, $valuePossible = false)
     {
-        if (!Piwik_Common::isPhpCliMode()) {
+        if (!Common::isPhpCliMode()) {
             return false;
         }
         $parameters = array(
diff --git a/misc/others/geoipUpdateRows.php b/misc/others/geoipUpdateRows.php
index 137b2bd1d0..3f42dc3855 100755
--- a/misc/others/geoipUpdateRows.php
+++ b/misc/others/geoipUpdateRows.php
@@ -1,7 +1,7 @@
 <?php
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 ini_set("memory_limit", "512M");
 error_reporting(E_ALL | E_NOTICE);
@@ -31,11 +31,11 @@ define('PIWIK_ENABLE_DISPATCH', false);
 Config::getInstance()->log['logger_message'][] = 'screen';
 Piwik_FrontController::getInstance()->init();
 
-$query = "SELECT count(*) FROM " . Piwik_Common::prefixTable('log_visit');
+$query = "SELECT count(*) FROM " . Common::prefixTable('log_visit');
 $count = Piwik_FetchOne($query);
 
 // when script run via browser, check for Super User & output html page to do conversion via AJAX
-if (!Piwik_Common::isPhpCliMode()) {
+if (!Common::isPhpCliMode()) {
     try {
         Piwik::checkUserIsSuperUser();
     } catch (Exception $e) {
@@ -44,7 +44,7 @@ if (!Piwik_Common::isPhpCliMode()) {
     }
     // the 'start' query param will be supplied by the AJAX requests, so if it's not there, the
     // user is viewing the page in the browser.
-    if (Piwik_Common::getRequestVar('start', false) === false) {
+    if (Common::getRequestVar('start', false) === false) {
         // output HTML page that runs update via AJAX
         ?>
         <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
@@ -92,8 +92,8 @@ if (!Piwik_Common::isPhpCliMode()) {
         <?php
         exit;
     } else {
-        $start = Piwik_Common::getRequestVar('start', 0, 'int');
-        $end = min($count, Piwik_Common::getRequestVar('end', $count, 'int'));
+        $start = Common::getRequestVar('start', 0, 'int');
+        $end = min($count, Common::getRequestVar('end', $count, 'int'));
         $limit = $end - $start;
     }
 } else // command line
@@ -106,7 +106,7 @@ if (!Piwik_Common::isPhpCliMode()) {
 function geoipUpdateError($message)
 {
     Piwik::log($message);
-    if (!Piwik_Common::isPhpCliMode()) {
+    if (!Common::isPhpCliMode()) {
         @header('HTTP/1.1 500 Internal Server Error', $replace = true, $responseCode = 500);
     }
     exit;
@@ -130,7 +130,7 @@ if (!$provider->isAvailable()) {
         if ($displayNotes) {
             Piwik::log("[note] The GeoIP PECL extension is broken: $workingOrError");
         }
-        if (Piwik_Common::isPhpCliMode()) {
+        if (Common::isPhpCliMode()) {
             Piwik::log("[note] Make sure your command line PHP is configured to use the PECL extension.");
         }
         $provider = null;
@@ -177,13 +177,13 @@ $logVisitFieldsToUpdate = array('location_country'   => Piwik_UserCountry_Locati
                                 'location_longitude' => Piwik_UserCountry_LocationProvider::LONGITUDE_KEY);
 
 if ($displayNotes) {
-    Piwik::log("\n$count rows to process in " . Piwik_Common::prefixTable('log_visit')
-        . " and " . Piwik_Common::prefixTable('log_conversion') . "...");
+    Piwik::log("\n$count rows to process in " . Common::prefixTable('log_visit')
+        . " and " . Common::prefixTable('log_conversion') . "...");
 }
 flush();
 for (; $start < $end; $start += $limit) {
     $rows = Piwik_FetchAll("SELECT idvisit, location_ip, " . implode(',', array_keys($logVisitFieldsToUpdate)) . "
-						FROM " . Piwik_Common::prefixTable('log_visit') . "
+						FROM " . Common::prefixTable('log_visit') . "
 						LIMIT $start, $limit");
     if (!count($rows)) {
         continue;
@@ -229,13 +229,13 @@ for (; $start < $end; $start += $limit) {
         $bind[] = $row['idvisit'];
 
         // update log_visit
-        $sql = "UPDATE " . Piwik_Common::prefixTable('log_visit') . "
+        $sql = "UPDATE " . Common::prefixTable('log_visit') . "
 				   SET " . implode(', ', $columnsToSet) . "
 				 WHERE idvisit = ?";
         Piwik_Query($sql, $bind);
 
         // update log_conversion
-        $sql = "UPDATE " . Piwik_Common::prefixTable('log_conversion') . "
+        $sql = "UPDATE " . Common::prefixTable('log_conversion') . "
 				   SET " . implode(', ', $columnsToSet) . "
 				 WHERE idvisit = ?";
         Piwik_Query($sql, $bind);
diff --git a/misc/others/iframeWidget_localhost.php b/misc/others/iframeWidget_localhost.php
index 7b4d87db9d..4e7c4b72ad 100644
--- a/misc/others/iframeWidget_localhost.php
+++ b/misc/others/iframeWidget_localhost.php
@@ -1,5 +1,5 @@
 <?php
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 exit;
 $date = date('Y-m-d');
@@ -36,7 +36,7 @@ foreach ($widgets as $category => $widgetsInCategory) {
     echo '<h2>' . $category . '</h2>';
     foreach ($widgetsInCategory as $widget) {
         echo '<h3>' . $widget['name'] . '</h3>';
-        $widgetUrl = Piwik_Common::getArrayFromQueryString($url);
+        $widgetUrl = Common::getArrayFromQueryString($url);
         $widgetUrl['moduleToWidgetize'] = $widget['parameters']['module'];
         $widgetUrl['actionToWidgetize'] = $widget['parameters']['action'];
         $parameters = $widget['parameters'];
diff --git a/misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php b/misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php
index 1b6ecf5361..5af16983d6 100644
--- a/misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php
+++ b/misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php
@@ -2,7 +2,7 @@
 // Script that creates 100 websites, then outputs a IMG that records a pageview in each website
 // Used initially to test how to handle cookies for this use case (see http://dev.piwik.org/trac/ticket/409)
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 exit;
 
@@ -18,7 +18,7 @@ Piwik_FrontController::getInstance()->init();
 Piwik::setUserIsSuperUser();
 $count = 100;
 for ($i = 0; $i <= $count; $i++) {
-    $id = Piwik_SitesManager_API::getInstance()->addSite(Piwik_Common::getRandomString(), 'http://piwik.org');
+    $id = Piwik_SitesManager_API::getInstance()->addSite(Common::getRandomString(), 'http://piwik.org');
     $t = new PiwikTracker($id, 'http://localhost/trunk/piwik.php');
     echo $id . " <img width=100 height=10 border=1 src='" . $t->getUrlTrackPageView('title') . "'><br/>";
 }
diff --git a/misc/others/test_generateLotsVisitsWebsites.php b/misc/others/test_generateLotsVisitsWebsites.php
index 44d5bc031a..a2e11deb78 100644
--- a/misc/others/test_generateLotsVisitsWebsites.php
+++ b/misc/others/test_generateLotsVisitsWebsites.php
@@ -1,7 +1,7 @@
 <?php
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 define('PIWIK_INCLUDE_PATH', realpath(dirname(__FILE__) . "/../.."));
 define('PIWIK_ENABLE_DISPATCH', false);
@@ -14,7 +14,7 @@ require_once PIWIK_INCLUDE_PATH . "/libs/PiwikTracker/PiwikTracker.php";
 Piwik_FrontController::getInstance()->init();
 
 // SECURITY: DO NOT DELETE THIS LINE!
-if (!Piwik_Common::isPhpCliMode()) {
+if (!Common::isPhpCliMode()) {
     die("ERROR: Must be executed in CLI");
 }
 
@@ -52,32 +52,32 @@ class Piwik_StressTests_CopyLogs
         $this->log(" Conversions today: " . $initialConversions);
 
         $this->log(" Now copying visits between '$startDate' and '$endDate'...");
-        $sql = "INSERT INTO " . Piwik_Common::prefixTable('log_visit') . " (`idsite`, `idvisitor`, `visitor_localtime`, `visitor_returning`, `visitor_count_visits`, `visit_first_action_time`, `visit_last_action_time`, `visit_exit_idaction_url`, `visit_exit_idaction_name`, `visit_entry_idaction_url`, `visit_entry_idaction_name`, `visit_total_actions`, `visit_total_time`, `visit_goal_converted`, `visit_goal_buyer`, `referer_type`, `referer_name`, `referer_url`, `referer_keyword`, `config_id`, `config_os`, `config_browser_name`, `config_browser_version`, `config_resolution`, `config_pdf`, `config_flash`, `config_java`, `config_director`, `config_quicktime`, `config_realplayer`, `config_windowsmedia`, `config_gears`, `config_silverlight`, `config_cookie`, `location_ip`, `location_browser_lang`, `location_country`, `location_provider`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `visitor_days_since_last`, `visitor_days_since_order`, `visitor_days_since_first`)
+        $sql = "INSERT INTO " . Common::prefixTable('log_visit') . " (`idsite`, `idvisitor`, `visitor_localtime`, `visitor_returning`, `visitor_count_visits`, `visit_first_action_time`, `visit_last_action_time`, `visit_exit_idaction_url`, `visit_exit_idaction_name`, `visit_entry_idaction_url`, `visit_entry_idaction_name`, `visit_total_actions`, `visit_total_time`, `visit_goal_converted`, `visit_goal_buyer`, `referer_type`, `referer_name`, `referer_url`, `referer_keyword`, `config_id`, `config_os`, `config_browser_name`, `config_browser_version`, `config_resolution`, `config_pdf`, `config_flash`, `config_java`, `config_director`, `config_quicktime`, `config_realplayer`, `config_windowsmedia`, `config_gears`, `config_silverlight`, `config_cookie`, `location_ip`, `location_browser_lang`, `location_country`, `location_provider`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `visitor_days_since_last`, `visitor_days_since_order`, `visitor_days_since_first`)
 		SELECT `idsite`, `idvisitor`, `visitor_localtime`, `visitor_returning`, `visitor_count_visits`, CONCAT(CURRENT_DATE()  , \" \",  FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), CONCAT(CURRENT_DATE()  , \" \",  FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), `visit_exit_idaction_url`, `visit_exit_idaction_name`, `visit_entry_idaction_url`, `visit_entry_idaction_name`, `visit_total_actions`, `visit_total_time`, `visit_goal_converted`, `visit_goal_buyer`, `referer_type`, `referer_name`, `referer_url`, `referer_keyword`, `config_id`, `config_os`, `config_browser_name`, `config_browser_version`, `config_resolution`, `config_pdf`, `config_flash`, `config_java`, `config_director`, `config_quicktime`, `config_realplayer`, `config_windowsmedia`, `config_gears`, `config_silverlight`, `config_cookie`, `location_ip`, `location_browser_lang`, `location_country`, `location_provider`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `visitor_days_since_last`, `visitor_days_since_order`, `visitor_days_since_first` 
-		FROM `" . Piwik_Common::prefixTable('log_visit') . "`
+		FROM `" . Common::prefixTable('log_visit') . "`
 		WHERE idsite >= 1 AND date(visit_last_action_time) between '$startDate' and '$endDate' ;";
         $result = $db->query($sql);
 
         $this->log(" Copying actions...");
-        $sql = "INSERT INTO " . Piwik_Common::prefixTable('log_link_visit_action') . " (`idsite`, `idvisitor`, `server_time`, `idvisit`, `idaction_url`, `idaction_url_ref`, `idaction_name`, `idaction_name_ref`, `time_spent_ref_action`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`)
+        $sql = "INSERT INTO " . Common::prefixTable('log_link_visit_action') . " (`idsite`, `idvisitor`, `server_time`, `idvisit`, `idaction_url`, `idaction_url_ref`, `idaction_name`, `idaction_name_ref`, `time_spent_ref_action`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`)
 		SELECT `idsite`, `idvisitor`, CONCAT(CURRENT_DATE()  , \" \",  FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), `idvisit`, `idaction_url`, `idaction_url_ref`, `idaction_name`, `idaction_name_ref`, `time_spent_ref_action`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5` 
-		FROM `" . Piwik_Common::prefixTable('log_link_visit_action') . "`
+		FROM `" . Common::prefixTable('log_link_visit_action') . "`
 		WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate' 
 		
 		;"; // LIMIT 1000000
         $result = $db->query($sql);
 
         $this->log(" Copying conversions...");
-        $sql = "INSERT IGNORE  INTO `" . Piwik_Common::prefixTable('log_conversion') . "` (`idvisit`, `idsite`, `visitor_days_since_first`, `visitor_days_since_order`, `visitor_count_visits`, `idvisitor`, `server_time`, `idaction_url`, `idlink_va`, `referer_visit_server_date`, `referer_type`, `referer_name`, `referer_keyword`, `visitor_returning`, `location_country`, `url`, `idgoal`, `revenue`, `buster`, `idorder`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `items`, `revenue_subtotal`, `revenue_tax`, `revenue_shipping`, `revenue_discount`)
+        $sql = "INSERT IGNORE  INTO `" . Common::prefixTable('log_conversion') . "` (`idvisit`, `idsite`, `visitor_days_since_first`, `visitor_days_since_order`, `visitor_count_visits`, `idvisitor`, `server_time`, `idaction_url`, `idlink_va`, `referer_visit_server_date`, `referer_type`, `referer_name`, `referer_keyword`, `visitor_returning`, `location_country`, `url`, `idgoal`, `revenue`, `buster`, `idorder`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `items`, `revenue_subtotal`, `revenue_tax`, `revenue_shipping`, `revenue_discount`)
 		SELECT `idvisit`, `idsite`, `visitor_days_since_first`, `visitor_days_since_order`, `visitor_count_visits`, `idvisitor`, CONCAT(CURRENT_DATE()  , \" \",  FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), `idaction_url`, `idlink_va`, `referer_visit_server_date`, `referer_type`, `referer_name`, `referer_keyword`, `visitor_returning`, `location_country`, `url`, `idgoal`, `revenue`, FLOOR(`buster` * RAND()), CONCAT(`idorder`,SUBSTRING(MD5(RAND()) FROM 1 FOR 9))  , `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `items`, `revenue_subtotal`, `revenue_tax`, `revenue_shipping`, `revenue_discount`
-		FROM `" . Piwik_Common::prefixTable('log_conversion') . "`
+		FROM `" . Common::prefixTable('log_conversion') . "`
 		WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate' ;";
         $result = $db->query($sql);
 
         $this->log(" Copying purchased items...");
-        $sql = "INSERT INTO `" . Piwik_Common::prefixTable('log_conversion_item') . "` (`idsite`, `idvisitor`, `server_time`, `idvisit`, `idorder`, `idaction_sku`, `idaction_name`, `idaction_category`, `price`, `quantity`, `deleted`)
+        $sql = "INSERT INTO `" . Common::prefixTable('log_conversion_item') . "` (`idsite`, `idvisitor`, `server_time`, `idvisit`, `idorder`, `idaction_sku`, `idaction_name`, `idaction_category`, `price`, `quantity`, `deleted`)
 		SELECT `idsite`, `idvisitor`, CONCAT(CURRENT_DATE()  , \" \",  TIME(`server_time`)), `idvisit`, CONCAT(`idorder`,SUBSTRING(MD5(RAND()) FROM 1 FOR 9)) , `idaction_sku`, `idaction_name`, `idaction_category`, `price`, `quantity`, `deleted`
-		FROM `" . Piwik_Common::prefixTable('log_conversion_item') . "`
+		FROM `" . Common::prefixTable('log_conversion_item') . "`
 		WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate' ;";
         $result = $db->query($sql);
 
@@ -102,15 +102,15 @@ class Piwik_StressTests_CopyLogs
     {
         $this->log("Deleting logs for today...");
         $db = Zend_Registry::get('db');
-        $sql = "DELETE FROM " . Piwik_Common::prefixTable('log_visit') . "
+        $sql = "DELETE FROM " . Common::prefixTable('log_visit') . "
 				WHERE date(visit_last_action_time) = CURRENT_DATE();";
         $db->query($sql);
         foreach (array('log_link_visit_action', 'log_conversion', 'log_conversion_item') as $table) {
-            $sql = "DELETE FROM " . Piwik_Common::prefixTable($table) . "
+            $sql = "DELETE FROM " . Common::prefixTable($table) . "
 		 		WHERE date(server_time) = CURRENT_DATE();";
             $db->query($sql);
         }
-        $sql = "OPTIMIZE TABLE " . Piwik_Common::prefixTable('log_link_visit_action') . ", " . Piwik_Common::prefixTable('log_conversion') . ", " . Piwik_Common::prefixTable('log_conversion_item') . ", " . Piwik_Common::prefixTable('log_visit') . "";
+        $sql = "OPTIMIZE TABLE " . Common::prefixTable('log_link_visit_action') . ", " . Common::prefixTable('log_conversion') . ", " . Common::prefixTable('log_conversion_item') . ", " . Common::prefixTable('log_visit') . "";
         $db->query($sql);
         $this->log("done");
     }
@@ -122,13 +122,13 @@ class Piwik_StressTests_CopyLogs
 
     function getVisitsToday()
     {
-        $sql = "SELECT count(*) FROM `" . Piwik_Common::prefixTable('log_visit') . "` WHERE idsite >= 1 AND DATE(`visit_last_action_time`) = CURRENT_DATE;";
+        $sql = "SELECT count(*) FROM `" . Common::prefixTable('log_visit') . "` WHERE idsite >= 1 AND DATE(`visit_last_action_time`) = CURRENT_DATE;";
         return Zend_Registry::get('db')->fetchOne($sql);
     }
 
     function getConversionItemsToday($table = 'log_conversion_item')
     {
-        $sql = "SELECT count(*) FROM `" . Piwik_Common::prefixTable($table) . "` WHERE idsite >= 1 AND DATE(`server_time`) = CURRENT_DATE;";
+        $sql = "SELECT count(*) FROM `" . Common::prefixTable($table) . "` WHERE idsite >= 1 AND DATE(`server_time`) = CURRENT_DATE;";
         return Zend_Registry::get('db')->fetchOne($sql);
     }
 
@@ -139,7 +139,7 @@ class Piwik_StressTests_CopyLogs
 
     function getActionsToday()
     {
-        $sql = "SELECT count(*) FROM `" . Piwik_Common::prefixTable('log_link_visit_action') . "` WHERE idsite >= 1 AND DATE(`server_time`) = CURRENT_DATE;";
+        $sql = "SELECT count(*) FROM `" . Common::prefixTable('log_link_visit_action') . "` WHERE idsite >= 1 AND DATE(`server_time`) = CURRENT_DATE;";
         return Zend_Registry::get('db')->fetchOne($sql);
     }
 }
diff --git a/plugins/API/API.php b/plugins/API/API.php
index a08e046c4b..16cba3ce4e 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_API
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_API
@@ -304,14 +304,14 @@ class Piwik_API_API
     {
         $logo = 'plugins/Zeitgeist/images/logo.png';
         if (Config::getInstance()->branding['use_custom_logo'] == 1
-            && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.png')
+            && file_exists(Common::getPathToPiwikRoot() . '/misc/user/logo.png')
         ) {
             $logo = 'misc/user/logo.png';
         }
         if (!$pathOnly) {
             return Piwik::getPiwikUrl() . $logo;
         }
-        return Piwik_Common::getPathToPiwikRoot() . '/' . $logo;
+        return Common::getPathToPiwikRoot() . '/' . $logo;
     }
 
     /**
@@ -324,14 +324,14 @@ class Piwik_API_API
     {
         $logo = 'plugins/Zeitgeist/images/logo-header.png';
         if (Config::getInstance()->branding['use_custom_logo'] == 1
-            && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo-header.png')
+            && file_exists(Common::getPathToPiwikRoot() . '/misc/user/logo-header.png')
         ) {
             $logo = 'misc/user/logo-header.png';
         }
         if (!$pathOnly) {
             return Piwik::getPiwikUrl() . $logo;
         }
-        return Piwik_Common::getPathToPiwikRoot() . '/' . $logo;
+        return Common::getPathToPiwikRoot() . '/' . $logo;
     }
 
     /**
@@ -345,14 +345,14 @@ class Piwik_API_API
     {
         $logo = 'plugins/Zeitgeist/images/logo.svg';
         if (Config::getInstance()->branding['use_custom_logo'] == 1
-            && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
+            && file_exists(Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
         ) {
             $logo = 'misc/user/logo.svg';
         }
         if (!$pathOnly) {
             return Piwik::getPiwikUrl() . $logo;
         }
-        return Piwik_Common::getPathToPiwikRoot() . '/' . $logo;
+        return Common::getPathToPiwikRoot() . '/' . $logo;
     }
 
     /**
@@ -366,7 +366,7 @@ class Piwik_API_API
             /* We always have our application logo */
             return true;
         } else if (Config::getInstance()->branding['use_custom_logo'] == 1
-            && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
+            && file_exists(Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
         ) {
             return true;
         }
@@ -553,7 +553,7 @@ class Piwik_API_API
         }
 
         $urls = array_map('urldecode', $urls);
-        $urls = array_map(array('Piwik\Core\Piwik_Common', 'unsanitizeInputValue'), $urls);
+        $urls = array_map(array('Piwik\Core\Common', 'unsanitizeInputValue'), $urls);
 
         $result = array();
         foreach ($urls as $url) {
@@ -629,7 +629,7 @@ class Piwik_API_API
         arsort($values);
         $values = array_keys($values);
 
-        $values = array_map(array('Piwik\Core\Piwik_Common', 'unsanitizeInputValue'), $values);
+        $values = array_map(array('Piwik\Core\Common', 'unsanitizeInputValue'), $values);
 
         $values = array_slice($values, 0, $maxSuggestionsToReturn);
         return $values;
diff --git a/plugins/API/Controller.php b/plugins/API/Controller.php
index 8d70af3650..c18bfc3e85 100644
--- a/plugins/API/Controller.php
+++ b/plugins/API/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_API
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -23,14 +23,14 @@ class Piwik_API_Controller extends Piwik_Controller
         if (!isset($_GET['filter_limit'])) {
             $_GET['filter_limit'] = Config::getInstance()->General['API_datatable_default_limit'];
         }
-        $request = new Piwik_API_Request('token_auth=' . Piwik_Common::getRequestVar('token_auth', 'anonymous', 'string'));
+        $request = new Piwik_API_Request('token_auth=' . Common::getRequestVar('token_auth', 'anonymous', 'string'));
         echo $request->process();
     }
 
     public function listAllMethods()
     {
         $ApiDocumentation = new Piwik_API_DocumentationGenerator();
-        echo $ApiDocumentation->getAllInterfaceString($outputExampleUrls = true, $prefixUrls = Piwik_Common::getRequestVar('prefixUrl', ''));
+        echo $ApiDocumentation->getAllInterfaceString($outputExampleUrls = true, $prefixUrls = Common::getRequestVar('prefixUrl', ''));
     }
 
     public function listAllAPI()
diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php
index 318929f1ce..2417a558ab 100644
--- a/plugins/API/ProcessedReport.php
+++ b/plugins/API/ProcessedReport.php
@@ -1,6 +1,6 @@
 <?php
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -425,7 +425,7 @@ class Piwik_API_ProcessedReport
         }
 
         // remove columns if hideColumns query parameters exist
-        $columnsToRemove = Piwik_Common::getRequestVar('hideColumns', '');
+        $columnsToRemove = Common::getRequestVar('hideColumns', '');
         if ($columnsToRemove != '') {
             $columnsToRemove = explode(',', $columnsToRemove);
             foreach ($columnsToRemove as $name) {
@@ -437,7 +437,7 @@ class Piwik_API_ProcessedReport
         }
 
         // remove columns if showColumns query parameters exist
-        $columnsToKeep = Piwik_Common::getRequestVar('showColumns', '');
+        $columnsToKeep = Common::getRequestVar('showColumns', '');
         if ($columnsToKeep != '') {
             $columnsToKeep = explode(',', $columnsToKeep);
             $columnsToKeep[] = 'label';
diff --git a/plugins/API/RowEvolution.php b/plugins/API/RowEvolution.php
index dfc24d6a6a..f0eca1b190 100644
--- a/plugins/API/RowEvolution.php
+++ b/plugins/API/RowEvolution.php
@@ -9,7 +9,7 @@
  * @package Piwik_API
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * This class generates a Row evolution dataset, from input request
@@ -92,7 +92,7 @@ class Piwik_API_RowEvolution
 
         // if the filter_limit query param is set, treat it as a request to limit
         // the number of labels used
-        $limit = Piwik_Common::getRequestVar('filter_limit', false);
+        $limit = Common::getRequestVar('filter_limit', false);
         if ($limit != false
             && $limit >= 0
         ) {
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php
index 25a21a2d8d..0f81d9d148 100644
--- a/plugins/Actions/API.php
+++ b/plugins/Actions/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_Actions
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The Actions API lets you request reports for all your Visitor Actions: Page URLs, Page titles (Piwik Events),
@@ -369,7 +369,7 @@ class Piwik_Actions_API
         if ($searchTree === false) {
             // build the query parts that are searched inside the tree
             if ($actionType == Piwik_Tracker_Action::TYPE_ACTION_NAME) {
-                $searchedString = Piwik_Common::unsanitizeInputValue($search);
+                $searchedString = Common::unsanitizeInputValue($search);
             } else {
                 $idSite = $callBackParameters[1];
                 try {
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php
index eb2171397a..2ab5dfb2d1 100644
--- a/plugins/Actions/Actions.php
+++ b/plugins/Actions/Actions.php
@@ -9,7 +9,7 @@
  * @package Piwik_Actions
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Actions plugin
@@ -144,7 +144,7 @@ class Piwik_Actions extends Piwik_Plugin
             $valueToMatch = preg_replace('@^http[s]?://(www\.)?@i', '', $valueToMatch);
         }
 
-        $valueToMatch = Piwik_Common::sanitizeInputValue(Piwik_Common::unsanitizeInputValue($valueToMatch));
+        $valueToMatch = Common::sanitizeInputValue(Common::unsanitizeInputValue($valueToMatch));
 
         // exact matches work by returning the id directly
         if ($matchType == Piwik_SegmentExpression::MATCH_EQUAL
@@ -164,7 +164,7 @@ class Piwik_Actions extends Piwik_Plugin
         // now, we handle the cases =@ (contains) and !@ (does not contain)
 
         // build the expression based on the match type
-        $sql = 'SELECT idaction FROM ' . Piwik_Common::prefixTable('log_action') . ' WHERE ';
+        $sql = 'SELECT idaction FROM ' . Common::prefixTable('log_action') . ' WHERE ';
         $sqlMatchType = 'AND type = ' . $actionType;
         switch ($matchType) {
             case '=@':
@@ -557,7 +557,7 @@ class Piwik_Actions extends Piwik_Plugin
 
     protected function isSiteSearchEnabled()
     {
-        $idSite = Piwik_Common::getRequestVar('idSite', 0, 'int');
+        $idSite = Common::getRequestVar('idSite', 0, 'int');
         if ($idSite == 0) {
             return false;
         }
@@ -681,7 +681,7 @@ class Piwik_Actions extends Piwik_Plugin
     
     private function addExcludeLowPopDisplayProperties(&$result)
     {
-        if (Piwik_Common::getRequestVar('enable_filter_excludelowpop', '0', 'string') != '0') {
+        if (Common::getRequestVar('enable_filter_excludelowpop', '0', 'string') != '0') {
             $result['filter_excludelowpop'] = 'nb_hits';
             $result['filter_excludelowpop_value'] = function () {
                 // computing minimum value to exclude (2 percent of the total number of actions)
@@ -759,7 +759,7 @@ class Piwik_Actions extends Piwik_Plugin
     public function getDisplayPropertiesForEntryPageUrls()
     {
         // link to the page, not just the report, but only if not a widget
-        $widget = Piwik_Common::getRequestVar('widget', false);
+        $widget = Common::getRequestVar('widget', false);
         $reportUrl = Piwik_API_Request::getCurrentUrlWithoutGenericFilters(array(
             'module' => 'Actions',
             'action' => $widget === false ? 'indexEntryPageUrls' : 'getEntryPageUrls'
@@ -788,7 +788,7 @@ class Piwik_Actions extends Piwik_Plugin
     public function getDisplayPropertiesForExitPageUrls()
     {
         // link to the page, not just the report, but only if not a widget
-        $widget = Piwik_Common::getRequestVar('widget', false);
+        $widget = Common::getRequestVar('widget', false);
         $reportUrl = Piwik_API_Request::getCurrentUrlWithoutGenericFilters(array(
             'module' => 'Actions',
             'action' => $widget === false ? 'indexExitPageUrls' : 'getExitPageUrls'
@@ -896,7 +896,7 @@ class Piwik_Actions extends Piwik_Plugin
     public function getDisplayPropertiesForGetPageTitles()
     {
         // link to the page, not just the report, but only if not a widget
-        $widget = Piwik_Common::getRequestVar('widget', false);
+        $widget = Common::getRequestVar('widget', false);
         $reportUrl = Piwik_API_Request::getCurrentUrlWithoutGenericFilters(array(
             'module' => 'Actions',
             'action' => $widget === false ? 'indexPageTitles' : 'getPageTitles'
@@ -923,7 +923,7 @@ class Piwik_Actions extends Piwik_Plugin
     public function getDisplayPropertiesForGetEntryPageTitles()
     {
         $entryPageUrlAction =
-            Piwik_Common::getRequestVar('widget', false) === false ? 'indexEntryPageUrls' : 'getEntryPageUrls';
+            Common::getRequestVar('widget', false) === false ? 'indexEntryPageUrls' : 'getEntryPageUrls';
         
         $result = array(
             'translations'       => array(
@@ -948,7 +948,7 @@ class Piwik_Actions extends Piwik_Plugin
     public function getDisplayPropertiesForGetExitPageTitles()
     {
         $exitPageUrlAction =
-            Piwik_Common::getRequestVar('widget', false) === false ? 'indexExitPageUrls' : 'getExitPageUrls';
+            Common::getRequestVar('widget', false) === false ? 'indexExitPageUrls' : 'getExitPageUrls';
         
         $result = array(
             'translations'       => array(
diff --git a/plugins/Annotations/Controller.php b/plugins/Annotations/Controller.php
index 32ad2b4931..08defbc614 100755
--- a/plugins/Annotations/Controller.php
+++ b/plugins/Annotations/Controller.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_Annotations
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Controller for the Annotations plugin.
@@ -41,18 +41,18 @@ class Piwik_Annotations_Controller extends Piwik_Controller
      */
     public function getAnnotationManager($fetch = false, $date = false, $period = false, $lastN = false)
     {
-        $idSite = Piwik_Common::getRequestVar('idSite');
+        $idSite = Common::getRequestVar('idSite');
 
         if ($date === false) {
-            $date = Piwik_Common::getRequestVar('date', false);
+            $date = Common::getRequestVar('date', false);
         }
 
         if ($period === false) {
-            $period = Piwik_Common::getRequestVar('period', 'day');
+            $period = Common::getRequestVar('period', 'day');
         }
 
         if ($lastN === false) {
-            $lastN = Piwik_Common::getRequestVar('lastN', false);
+            $lastN = Common::getRequestVar('lastN', false);
         }
 
         // create & render the view
@@ -141,7 +141,7 @@ class Piwik_Annotations_Controller extends Piwik_Controller
             // the date used is for the annotation manager HTML that gets echo'd. we
             // use this date for the new annotation, unless it is a date range, in
             // which case we use the first date of the range.
-            $date = Piwik_Common::getRequestVar('date');
+            $date = Common::getRequestVar('date');
             if (strpos($date, ',') !== false) {
                 $date = reset(explode(',', $date));
             }
@@ -149,8 +149,8 @@ class Piwik_Annotations_Controller extends Piwik_Controller
             // add the annotation. NOTE: permissions checked in API method
             Piwik_API_Request::processRequest("Annotations.add", array('date' => $date));
 
-            $managerDate = Piwik_Common::getRequestVar('managerDate', false);
-            $managerPeriod = Piwik_Common::getRequestVar('managerPeriod', false);
+            $managerDate = Common::getRequestVar('managerDate', false);
+            $managerPeriod = Common::getRequestVar('managerPeriod', false);
             echo $this->getAnnotationManager($fetch = true, $managerDate, $managerPeriod);
         }
     }
diff --git a/plugins/AnonymizeIP/AnonymizeIP.php b/plugins/AnonymizeIP/AnonymizeIP.php
index e50c7386a1..7194a055fa 100644
--- a/plugins/AnonymizeIP/AnonymizeIP.php
+++ b/plugins/AnonymizeIP/AnonymizeIP.php
@@ -9,7 +9,7 @@
  * @package Piwik_AnonymizeIP
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Anonymize visitor IP addresses to comply with the privacy laws/guidelines in countries, such as Germany.
@@ -50,7 +50,7 @@ class Piwik_AnonymizeIP extends Piwik_Plugin
      */
     static public function applyIPMask($ip, $maskLength)
     {
-        $i = Piwik_Common::strlen($ip);
+        $i = Common::strlen($ip);
         if ($maskLength > $i) {
             $maskLength = $i;
         }
diff --git a/plugins/CoreAdminHome/API.php b/plugins/CoreAdminHome/API.php
index 07cb1218e8..697ad3ca47 100644
--- a/plugins/CoreAdminHome/API.php
+++ b/plugins/CoreAdminHome/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_CoreAdminHome
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_CoreAdminHome
@@ -171,7 +171,7 @@ class Piwik_CoreAdminHome_API
         }
 
         // Update piwik_site.ts_created
-        $query = "UPDATE " . Piwik_Common::prefixTable("site") .
+        $query = "UPDATE " . Common::prefixTable("site") .
             " SET ts_created = ?" .
             " WHERE idsite IN ( $sqlIdSites )
 					AND ts_created > ?";
diff --git a/plugins/CoreAdminHome/Controller.php b/plugins/CoreAdminHome/Controller.php
index 69344d2771..41e7898611 100644
--- a/plugins/CoreAdminHome/Controller.php
+++ b/plugins/CoreAdminHome/Controller.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -76,39 +76,39 @@ class Piwik_CoreAdminHome_Controller extends Piwik_Controller_Admin
     public function setGeneralSettings()
     {
         Piwik::checkUserIsSuperUser();
-        $response = new Piwik_API_ResponseBuilder(Piwik_Common::getRequestVar('format'));
+        $response = new Piwik_API_ResponseBuilder(Common::getRequestVar('format'));
         try {
             $this->checkTokenInUrl();
-            $enableBrowserTriggerArchiving = Piwik_Common::getRequestVar('enableBrowserTriggerArchiving');
-            $todayArchiveTimeToLive = Piwik_Common::getRequestVar('todayArchiveTimeToLive');
+            $enableBrowserTriggerArchiving = Common::getRequestVar('enableBrowserTriggerArchiving');
+            $todayArchiveTimeToLive = Common::getRequestVar('todayArchiveTimeToLive');
 
             Piwik_ArchiveProcessor_Rules::setBrowserTriggerArchiving((bool)$enableBrowserTriggerArchiving);
             Piwik_ArchiveProcessor_Rules::setTodayArchiveTimeToLive($todayArchiveTimeToLive);
 
             // Update email settings
             $mail = array();
-            $mail['transport'] = (Piwik_Common::getRequestVar('mailUseSmtp') == '1') ? 'smtp' : '';
-            $mail['port'] = Piwik_Common::getRequestVar('mailPort', '');
-            $mail['host'] = Piwik_Common::unsanitizeInputValue(Piwik_Common::getRequestVar('mailHost', ''));
-            $mail['type'] = Piwik_Common::getRequestVar('mailType', '');
-            $mail['username'] = Piwik_Common::unsanitizeInputValue(Piwik_Common::getRequestVar('mailUsername', ''));
-            $mail['password'] = Piwik_Common::unsanitizeInputValue(Piwik_Common::getRequestVar('mailPassword', ''));
-            $mail['encryption'] = Piwik_Common::getRequestVar('mailEncryption', '');
+            $mail['transport'] = (Common::getRequestVar('mailUseSmtp') == '1') ? 'smtp' : '';
+            $mail['port'] = Common::getRequestVar('mailPort', '');
+            $mail['host'] = Common::unsanitizeInputValue(Common::getRequestVar('mailHost', ''));
+            $mail['type'] = Common::getRequestVar('mailType', '');
+            $mail['username'] = Common::unsanitizeInputValue(Common::getRequestVar('mailUsername', ''));
+            $mail['password'] = Common::unsanitizeInputValue(Common::getRequestVar('mailPassword', ''));
+            $mail['encryption'] = Common::getRequestVar('mailEncryption', '');
 
             $config = Config::getInstance();
             $config->mail = $mail;
 
             // update branding settings
             $branding = $config->branding;
-            $branding['use_custom_logo'] = Piwik_Common::getRequestVar('useCustomLogo', '0');
+            $branding['use_custom_logo'] = Common::getRequestVar('useCustomLogo', '0');
             $config->branding = $branding;
 
             // update beta channel setting
             $debug = $config->Debug;
-            $debug['allow_upgrades_to_beta'] = Piwik_Common::getRequestVar('enableBetaReleaseCheck', '0', 'int');
+            $debug['allow_upgrades_to_beta'] = Common::getRequestVar('enableBetaReleaseCheck', '0', 'int');
             $config->Debug = $debug;
             // update trusted host settings
-            $trustedHosts = Piwik_Common::getRequestVar('trustedHosts', false, 'json');
+            $trustedHosts = Common::getRequestVar('trustedHosts', false, 'json');
             if ($trustedHosts !== false) {
                 Piwik_Url::saveTrustedHostnameInConfig($trustedHosts);
             }
@@ -135,7 +135,7 @@ class Piwik_CoreAdminHome_Controller extends Piwik_Controller_Admin
         $viewableIdSites = Piwik_SitesManager_API::getInstance()->getSitesIdWithAtLeastViewAccess();
 
         $defaultIdSite = reset($viewableIdSites);
-        $view->idSite = Piwik_Common::getRequestVar('idSite', $defaultIdSite, 'int');
+        $view->idSite = Common::getRequestVar('idSite', $defaultIdSite, 'int');
 
         $view->defaultReportSiteName = Piwik_Site::getNameFor($view->idSite);
         $view->defaultSiteRevenue = Piwik::getCurrency($view->idSite);
@@ -166,8 +166,8 @@ class Piwik_CoreAdminHome_Controller extends Piwik_Controller_Admin
     {
         $trackVisits = !Piwik_Tracker_IgnoreCookie::isIgnoreCookieFound();
 
-        $nonce = Piwik_Common::getRequestVar('nonce', false);
-        $language = Piwik_Common::getRequestVar('language', '');
+        $nonce = Common::getRequestVar('nonce', false);
+        $language = Common::getRequestVar('language', '');
         if ($nonce !== false && Piwik_Nonce::verifyNonce('Piwik_OptOut', $nonce)) {
             Piwik_Nonce::discardNonce('Piwik_OptOut');
             Piwik_Tracker_IgnoreCookie::setIgnoreCookie();
diff --git a/plugins/CoreHome/Controller.php b/plugins/CoreHome/Controller.php
index c7758373d4..2dbe933fe5 100644
--- a/plugins/CoreHome/Controller.php
+++ b/plugins/CoreHome/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_CoreHome
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -37,15 +37,15 @@ class Piwik_CoreHome_Controller extends Piwik_Controller
         if ($defaultReport == Piwik::getLoginPluginName()) {
             $module = Piwik::getLoginPluginName();
         }
-        $idSite = Piwik_Common::getRequestVar('idSite', false, 'int');
+        $idSite = Common::getRequestVar('idSite', false, 'int');
 
         parent::redirectToIndex($module, $action, !empty($idSite) ? $idSite : null);
     }
 
     public function showInContext()
     {
-        $controllerName = Piwik_Common::getRequestVar('moduleToLoad');
-        $actionName = Piwik_Common::getRequestVar('actionToLoad', 'index');
+        $controllerName = Common::getRequestVar('moduleToLoad');
+        $actionName = Common::getRequestVar('actionToLoad', 'index');
         if ($actionName == 'showInContext') {
             throw new Exception("Preventing infinite recursion...");
         }
@@ -65,13 +65,13 @@ class Piwik_CoreHome_Controller extends Piwik_Controller
 
     protected function setDateTodayIfWebsiteCreatedToday()
     {
-        $date = Piwik_Common::getRequestVar('date', false);
+        $date = Common::getRequestVar('date', false);
         if ($date == 'today'
-            || Piwik_Common::getRequestVar('period', false) == 'range'
+            || Common::getRequestVar('period', false) == 'range'
         ) {
             return;
         }
-        $websiteId = Piwik_Common::getRequestVar('idSite', false, 'int');
+        $websiteId = Common::getRequestVar('idSite', false, 'int');
         if ($websiteId) {
             $website = new Piwik_Site($websiteId);
             $datetimeCreationDate = $this->site->getCreationDate()->getDatetime();
@@ -81,7 +81,7 @@ class Piwik_CoreHome_Controller extends Piwik_Controller
                 Piwik::redirectToModule('CoreHome', 'index',
                     array('date'   => 'today',
                           'idSite' => $websiteId,
-                          'period' => Piwik_Common::getRequestVar('period'))
+                          'period' => Common::getRequestVar('period'))
                 );
             }
         }
@@ -157,7 +157,7 @@ class Piwik_CoreHome_Controller extends Piwik_Controller
         $rowEvolution = self::$rowEvolutionCache;
         if ($rowEvolution === null) {
             $paramName = Piwik_CoreHome_DataTableRowAction_MultiRowEvolution::IS_MULTI_EVOLUTION_PARAM;
-            $isMultiRowEvolution = Piwik_Common::getRequestVar($paramName, false, 'int');
+            $isMultiRowEvolution = Common::getRequestVar($paramName, false, 'int');
 
             $rowEvolution = $this->makeRowEvolution($isMultiRowEvolution, $graphType = 'graphEvolution');
             $rowEvolution->useAvailableMetrics();
@@ -202,7 +202,7 @@ class Piwik_CoreHome_Controller extends Piwik_Controller
     public function getDonateForm()
     {
         $view = new Piwik_View('@CoreHome/getDonateForm');
-        if (Piwik_Common::getRequestVar('widget', false)
+        if (Common::getRequestVar('widget', false)
             && Piwik::isUserIsSuperUser()
         ) {
             $view->footerMessage = Piwik_Translate('CoreHome_OnlyForAdmin');
diff --git a/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php b/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php
index cb4c49ab8a..c617a77ff3 100644
--- a/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php
+++ b/plugins/CoreHome/DataTableRowAction/MultiRowEvolution.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_CoreHome
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * MULTI ROW EVOLUTION
@@ -36,7 +36,7 @@ class Piwik_CoreHome_DataTableRowAction_MultiRowEvolution
      */
     public function __construct($idSite, $date)
     {
-        $this->metric = Piwik_Common::getRequestVar('column', '', 'string');
+        $this->metric = Common::getRequestVar('column', '', 'string');
         parent::__construct($idSite, $date);
     }
 
diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php
index 22da9411f7..7b15f9c887 100644
--- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php
+++ b/plugins/CoreHome/DataTableRowAction/RowEvolution.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_CoreHome
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * ROW EVOLUTION
@@ -73,7 +73,7 @@ class Piwik_CoreHome_DataTableRowAction_RowEvolution
      */
     public function __construct($idSite, $date, $graphType = null)
     {
-        $this->apiMethod = Piwik_Common::getRequestVar('apiMethod', '', 'string');
+        $this->apiMethod = Common::getRequestVar('apiMethod', '', 'string');
         if (empty($this->apiMethod)) throw new Exception("Parameter apiMethod not set.");
 
         $this->label = Piwik_API_ResponseBuilder::getLabelFromRequest($_GET);
@@ -81,7 +81,7 @@ class Piwik_CoreHome_DataTableRowAction_RowEvolution
 
         if ($this->label === '') throw new Exception("Parameter label not set.");
 
-        $this->period = Piwik_Common::getRequestVar('period', '', 'string');
+        $this->period = Common::getRequestVar('period', '', 'string');
         if (empty($this->period)) throw new Exception("Parameter period not set.");
 
         $this->idSite = $idSite;
@@ -163,7 +163,7 @@ class Piwik_CoreHome_DataTableRowAction_RowEvolution
     protected function extractEvolutionReport($report)
     {
         $this->dataTable = $report['reportData'];
-        $this->rowLabel = Piwik_Common::sanitizeInputValue($report['label']);
+        $this->rowLabel = Common::sanitizeInputValue($report['label']);
         $this->rowIcon = !empty($report['logo']) ? $report['logo'] : false;
         $this->availableMetrics = $report['metadata']['metrics'];
         $this->dimension = $report['metadata']['dimension'];
diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php
index 692ee1abd1..b5bce55327 100644
--- a/plugins/CorePluginsAdmin/Controller.php
+++ b/plugins/CorePluginsAdmin/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_CorePluginsAdmin
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -122,7 +122,7 @@ class Piwik_CorePluginsAdmin_Controller extends Piwik_Controller_Admin
     {
         Piwik::checkUserIsSuperUser();
         $this->checkTokenInUrl();
-        $pluginName = Piwik_Common::getRequestVar('pluginName', null, 'string');
+        $pluginName = Common::getRequestVar('pluginName', null, 'string');
         return $pluginName;
     }
 
@@ -138,7 +138,7 @@ class Piwik_CorePluginsAdmin_Controller extends Piwik_Controller_Admin
         $pluginName = $this->initPluginModification();
         $uninstalled = Piwik_PluginsManager::getInstance()->uninstallPlugin($pluginName);
         if(!$uninstalled) {
-            $path = Piwik_Common::getPathToPiwikRoot() . '/plugins/' . $pluginName . '/';
+            $path = Common::getPathToPiwikRoot() . '/plugins/' . $pluginName . '/';
             $messagePermissions = Piwik::getErrorMessageMissingPermissions($path);
 
             $messageIntro = Piwik_Translate("Warning: \"%s\" could not be uninstalled. Piwik did not have enough permission to delete the files in $path. ",
diff --git a/plugins/CoreUpdater/Controller.php b/plugins/CoreUpdater/Controller.php
index 3d4040a6a5..8744d4e651 100644
--- a/plugins/CoreUpdater/Controller.php
+++ b/plugins/CoreUpdater/Controller.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -93,8 +93,8 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
         Piwik::checkUserIsSuperUser();
 
         $view = new Piwik_View('@CoreUpdater/oneClickResults');
-        $view->coreError = Piwik_Common::getRequestVar('error', '', 'string', $_POST);
-        $view->feedbackMessages = safe_unserialize(Piwik_Common::unsanitizeInputValue(Piwik_Common::getRequestVar('messages', '', 'string', $_POST)));
+        $view->coreError = Common::getRequestVar('error', '', 'string', $_POST);
+        $view->feedbackMessages = safe_unserialize(Common::unsanitizeInputValue(Common::getRequestVar('messages', '', 'string', $_POST)));
         echo $view->render();
     }
 
@@ -220,7 +220,7 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
 
     public function index()
     {
-        $language = Piwik_Common::getRequestVar('language', '');
+        $language = Common::getRequestVar('language', '');
         if (!empty($language)) {
             Piwik_LanguagesManager::setLanguageForSession($language);
         }
@@ -237,14 +237,14 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
 
         Piwik::setMaxExecutionTime(0);
 
-        $cli = Piwik_Common::isPhpCliMode() ? '_cli' : '';
+        $cli = Common::isPhpCliMode() ? '_cli' : '';
         $welcomeTemplate = '@CoreUpdater/runUpdaterAndExit_welcome' . $cli;
         $doneTemplate = '@CoreUpdater/runUpdaterAndExit_done' . $cli;
         $viewWelcome = new Piwik_View($welcomeTemplate);
         $viewDone = new Piwik_View($doneTemplate);
 
         $sqlQueries = $updater->getSqlQueriesToExecute();
-        if (Piwik_Common::isPhpCliMode()) {
+        if (Common::isPhpCliMode()) {
             $this->doWelcomeUpdates($viewWelcome, $componentsWithUpdateFile);
             echo $viewWelcome->render();
 
@@ -253,7 +253,7 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
                 echo $viewDone->render();
             }
         } else {
-            if (Piwik_Common::getRequestVar('updateCorePlugins', 0, 'integer') == 1) {
+            if (Common::getRequestVar('updateCorePlugins', 0, 'integer') == 1) {
                 $this->warningMessages = array();
                 $this->doExecuteUpdates($viewDone, $updater, $componentsWithUpdateFile);
 
@@ -274,7 +274,7 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
     private function doWelcomeUpdates($view, $componentsWithUpdateFile)
     {
         $view->new_piwik_version = Piwik_Version::VERSION;
-        $view->commandUpgradePiwik = "<br /><code>php " . Piwik_Common::getPathToPiwikRoot() . "/index.php  -- \"module=CoreUpdater\" </code>";
+        $view->commandUpgradePiwik = "<br /><code>php " . Common::getPathToPiwikRoot() . "/index.php  -- \"module=CoreUpdater\" </code>";
         $pluginNamesToUpdate = array();
         $coreToUpdate = false;
 
diff --git a/plugins/CoreUpdater/CoreUpdater.php b/plugins/CoreUpdater/CoreUpdater.php
index 72d5269000..6f14121fba 100644
--- a/plugins/CoreUpdater/CoreUpdater.php
+++ b/plugins/CoreUpdater/CoreUpdater.php
@@ -9,7 +9,7 @@
  * @package Piwik_CoreUpdater
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -47,8 +47,8 @@ class Piwik_CoreUpdater extends Piwik_Plugin
 
     public function dispatch()
     {
-        $module = Piwik_Common::getRequestVar('module', '', 'string');
-        $action = Piwik_Common::getRequestVar('action', '', 'string');
+        $module = Common::getRequestVar('module', '', 'string');
+        $action = Common::getRequestVar('action', '', 'string');
 
         $updater = new Piwik_Updater();
         $updater->addComponentToCheck('core', Piwik_Version::VERSION);
diff --git a/plugins/CustomVariables/Archiver.php b/plugins/CustomVariables/Archiver.php
index bae7cb7066..1e2c6c74ba 100644
--- a/plugins/CustomVariables/Archiver.php
+++ b/plugins/CustomVariables/Archiver.php
@@ -1,5 +1,5 @@
 <?php
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -130,7 +130,7 @@ class Piwik_CustomVariables_Archiver extends Piwik_PluginsArchiver
             if (substr($value, -2) != '"]') {
                 $value .= '"]';
             }
-            $decoded = @Piwik_Common::json_decode($value);
+            $decoded = @Common::json_decode($value);
             if (is_array($decoded)) {
                 $count = 0;
                 foreach ($decoded as $category) {
diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php
index 8e99fc8fec..0610b4573d 100644
--- a/plugins/DBStats/API.php
+++ b/plugins/DBStats/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_DBStats
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see plugins/DBStats/MySQLMetadataProvider.php
@@ -273,19 +273,19 @@ class Piwik_DBStats_API
     /** Returns true if $name is the name of a numeric archive table, false if otherwise. */
     private function isNumericArchiveTable($name)
     {
-        return strpos($name, Piwik_Common::prefixTable('archive_numeric_')) === 0;
+        return strpos($name, Common::prefixTable('archive_numeric_')) === 0;
     }
 
     /** Returns true if $name is the name of a blob archive table, false if otherwise. */
     private function isBlobArchiveTable($name)
     {
-        return strpos($name, Piwik_Common::prefixTable('archive_blob_')) === 0;
+        return strpos($name, Common::prefixTable('archive_blob_')) === 0;
     }
 
     /** Returns true if $name is the name of a log table, false if otherwise. */
     private function isTrackerTable($name)
     {
-        return strpos($name, Piwik_Common::prefixTable('log_')) === 0;
+        return strpos($name, Common::prefixTable('log_')) === 0;
     }
 
     /**
diff --git a/plugins/DBStats/MySQLMetadataProvider.php b/plugins/DBStats/MySQLMetadataProvider.php
index 90185312cb..75ca12e6ac 100755
--- a/plugins/DBStats/MySQLMetadataProvider.php
+++ b/plugins/DBStats/MySQLMetadataProvider.php
@@ -9,7 +9,7 @@
  * @package Piwik_DBStats
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Utility class that provides general information about databases, including the size of
@@ -78,7 +78,7 @@ class Piwik_DBStats_MySQLMetadataProvider
      */
     public function getTableStatus($table)
     {
-        $prefixed = Piwik_Common::prefixTable($table);
+        $prefixed = Common::prefixTable($table);
 
         // if we've already gotten every table status, don't issue an uneeded query
         if (!is_null($this->tableStatuses) && isset($this->tableStatuses[$prefixed])) {
@@ -130,7 +130,7 @@ class Piwik_DBStats_MySQLMetadataProvider
      */
     public function getAllLogTableStatus()
     {
-        $regex = "/^" . Piwik_Common::prefixTable('log_') . "(?!profiling)/";
+        $regex = "/^" . Common::prefixTable('log_') . "(?!profiling)/";
         return $this->getAllTablesStatus($regex);
     }
 
@@ -141,7 +141,7 @@ class Piwik_DBStats_MySQLMetadataProvider
      */
     public function getAllNumericArchiveStatus()
     {
-        $regex = "/^" . Piwik_Common::prefixTable('archive_numeric') . "_/";
+        $regex = "/^" . Common::prefixTable('archive_numeric') . "_/";
         return $this->getAllTablesStatus($regex);
     }
 
@@ -152,7 +152,7 @@ class Piwik_DBStats_MySQLMetadataProvider
      */
     public function getAllBlobArchiveStatus()
     {
-        $regex = "/^" . Piwik_Common::prefixTable('archive_blob') . "_/";
+        $regex = "/^" . Common::prefixTable('archive_blob') . "_/";
         return $this->getAllTablesStatus($regex);
     }
 
@@ -163,7 +163,7 @@ class Piwik_DBStats_MySQLMetadataProvider
      */
     public function getAllAdminTableStatus()
     {
-        $regex = "/^" . Piwik_Common::prefixTable('') . "(?!archive_|(?:log_(?!profiling)))/";
+        $regex = "/^" . Common::prefixTable('') . "(?!archive_|(?:log_(?!profiling)))/";
         return $this->getAllTablesStatus($regex);
     }
 
diff --git a/plugins/Dashboard/Controller.php b/plugins/Dashboard/Controller.php
index 589eb29e73..309b7a73a7 100644
--- a/plugins/Dashboard/Controller.php
+++ b/plugins/Dashboard/Controller.php
@@ -8,7 +8,7 @@
  * @package  Piwik_Dashboard
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Dashboard Controller
@@ -34,10 +34,10 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
         $view = new Piwik_View($template);
         $this->setGeneralVariablesView($view);
 
-        $view->availableWidgets = Piwik_Common::json_encode(Piwik_GetWidgetsList());
+        $view->availableWidgets = Common::json_encode(Piwik_GetWidgetsList());
         $view->availableLayouts = $this->getAvailableLayouts();
 
-        $view->dashboardId = Piwik_Common::getRequestVar('idDashboard', 1, 'int');
+        $view->dashboardId = Common::getRequestVar('idDashboard', 1, 'int');
         $view->dashboardLayout = $this->getLayout($view->dashboardId);
 
         return $view;
@@ -67,14 +67,14 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
         $this->checkTokenInUrl();
 
         Piwik_DataTable_Renderer_Json::sendHeaderJSON();
-        echo Piwik_Common::json_encode(Piwik_GetWidgetsList());
+        echo Common::json_encode(Piwik_GetWidgetsList());
     }
 
     public function getDashboardLayout()
     {
         $this->checkTokenInUrl();
 
-        $idDashboard = Piwik_Common::getRequestVar('idDashboard', 1, 'int');
+        $idDashboard = Common::getRequestVar('idDashboard', 1, 'int');
 
         $layout = $this->getLayout($idDashboard);
 
@@ -88,7 +88,7 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
     {
         $this->checkTokenInUrl();
         $layout = $this->dashboard->getDefaultLayout();
-        $idDashboard = Piwik_Common::getRequestVar('idDashboard', 1, 'int');
+        $idDashboard = Common::getRequestVar('idDashboard', 1, 'int');
         if (Piwik::isUserIsAnonymous()) {
             $session = new Piwik_Session_Namespace("Piwik_Dashboard");
             $session->dashboardLayout = $layout;
@@ -109,7 +109,7 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
     {
         $paramsBind = array($login, $idDashboard, $layout, $layout);
         $query = sprintf('INSERT INTO %s (login, iddashboard, layout) VALUES (?,?,?) ON DUPLICATE KEY UPDATE layout=?',
-            Piwik_Common::prefixTable('user_dashboard'));
+            Common::prefixTable('user_dashboard'));
         Piwik_Query($query, $paramsBind);
     }
 
@@ -124,7 +124,7 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
     {
         $paramsBind = array($name, $login, $idDashboard);
         $query = sprintf('UPDATE %s SET name = ? WHERE login = ? AND iddashboard = ?',
-            Piwik_Common::prefixTable('user_dashboard'));
+            Common::prefixTable('user_dashboard'));
         Piwik_Query($query, $paramsBind);
     }
 
@@ -139,12 +139,12 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
             return;
         }
 
-        $idDashboard = Piwik_Common::getRequestVar('idDashboard', 1, 'int');
+        $idDashboard = Common::getRequestVar('idDashboard', 1, 'int');
 
         // first layout can't be removed
         if ($idDashboard != 1) {
             $query = sprintf('DELETE FROM %s WHERE iddashboard = ? AND login = ?',
-                Piwik_Common::prefixTable('user_dashboard'));
+                Common::prefixTable('user_dashboard'));
             Piwik_Query($query, array($idDashboard, Piwik::getCurrentUserLogin()));
         }
     }
@@ -167,7 +167,7 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
         $dashboards = $this->dashboard->getAllDashboards($login);
 
         Piwik_DataTable_Renderer_Json::sendHeaderJSON();
-        echo Piwik_Common::json_encode($dashboards);
+        echo Common::json_encode($dashboards);
     }
 
     /**
@@ -185,8 +185,8 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
         $user = Piwik::getCurrentUserLogin();
         $nextId = $this->getNextIdDashboard($user);
 
-        $name = urldecode(Piwik_Common::getRequestVar('name', '', 'string'));
-        $type = urldecode(Piwik_Common::getRequestVar('type', 'default', 'string'));
+        $name = urldecode(Common::getRequestVar('name', '', 'string'));
+        $type = urldecode(Common::getRequestVar('type', 'default', 'string'));
         $layout = '{}';
 
         if ($type == 'default') {
@@ -194,17 +194,17 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
         }
 
         $query = sprintf('INSERT INTO %s (login, iddashboard, name, layout) VALUES (?, ?, ?, ?)',
-            Piwik_Common::prefixTable('user_dashboard'));
+            Common::prefixTable('user_dashboard'));
         Piwik_Query($query, array($user, $nextId, $name, $layout));
 
         Piwik_DataTable_Renderer_Json::sendHeaderJSON();
-        echo Piwik_Common::json_encode($nextId);
+        echo Common::json_encode($nextId);
     }
 
     private function getNextIdDashboard($login)
     {
         $nextIdQuery = sprintf('SELECT MAX(iddashboard)+1 FROM %s WHERE login = ?',
-            Piwik_Common::prefixTable('user_dashboard'));
+            Common::prefixTable('user_dashboard'));
         $nextId = Piwik_FetchOne($nextIdQuery, array($login));
 
         if (empty($nextId)) {
@@ -223,20 +223,20 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
             return;
         }
         $login = Piwik::getCurrentUserLogin();
-        $name = urldecode(Piwik_Common::getRequestVar('name', '', 'string'));
-        $user = urldecode(Piwik_Common::getRequestVar('user', '', 'string'));
-        $idDashboard = Piwik_Common::getRequestVar('dashboardId', 0, 'int');
+        $name = urldecode(Common::getRequestVar('name', '', 'string'));
+        $user = urldecode(Common::getRequestVar('user', '', 'string'));
+        $idDashboard = Common::getRequestVar('dashboardId', 0, 'int');
         $layout = $this->dashboard->getLayoutForUser($login, $idDashboard);
 
         if ($layout !== false) {
             $nextId = $this->getNextIdDashboard($user);
 
             $query = sprintf('INSERT INTO %s (login, iddashboard, name, layout) VALUES (?, ?, ?, ?)',
-                Piwik_Common::prefixTable('user_dashboard'));
+                Common::prefixTable('user_dashboard'));
             Piwik_Query($query, array($user, $nextId, $name, $layout));
 
             Piwik_DataTable_Renderer_Json::sendHeaderJSON();
-            echo Piwik_Common::json_encode($nextId);
+            echo Common::json_encode($nextId);
             return;
         }
     }
@@ -250,9 +250,9 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
     {
         $this->checkTokenInUrl();
 
-        $layout = Piwik_Common::unsanitizeInputValue(Piwik_Common::getRequestVar('layout'));
-        $idDashboard = Piwik_Common::getRequestVar('idDashboard', 1, 'int');
-        $name = Piwik_Common::getRequestVar('name', '', 'string');
+        $layout = Common::unsanitizeInputValue(Common::getRequestVar('layout'));
+        $idDashboard = Common::getRequestVar('idDashboard', 1, 'int');
+        $name = Common::getRequestVar('name', '', 'string');
         if (Piwik::isUserIsAnonymous()) {
             $session = new Piwik_Session_Namespace("Piwik_Dashboard");
             $session->dashboardLayout = $layout;
@@ -273,10 +273,10 @@ class Piwik_Dashboard_Controller extends Piwik_Controller
         $this->checkTokenInUrl();
 
         if (Piwik::isUserIsSuperUser()) {
-            $layout = Piwik_Common::unsanitizeInputValue(Piwik_Common::getRequestVar('layout'));
+            $layout = Common::unsanitizeInputValue(Common::getRequestVar('layout'));
             $paramsBind = array('', '1', $layout, $layout);
             $query = sprintf('INSERT INTO %s (login, iddashboard, layout) VALUES (?,?,?) ON DUPLICATE KEY UPDATE layout=?',
-                Piwik_Common::prefixTable('user_dashboard'));
+                Common::prefixTable('user_dashboard'));
             Piwik_Query($query, $paramsBind);
         }
     }
diff --git a/plugins/Dashboard/Dashboard.php b/plugins/Dashboard/Dashboard.php
index f6a0274dfe..972804a950 100644
--- a/plugins/Dashboard/Dashboard.php
+++ b/plugins/Dashboard/Dashboard.php
@@ -9,7 +9,7 @@
  * @package Piwik_Dashboard
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_Dashboard
@@ -43,7 +43,7 @@ class Piwik_Dashboard extends Piwik_Plugin
     {
         $paramsBind = array($login, $idDashboard);
         $query = sprintf('SELECT layout FROM %s WHERE login = ? AND iddashboard = ?',
-            Piwik_Common::prefixTable('user_dashboard'));
+            Common::prefixTable('user_dashboard'));
         $return = Piwik_FetchAll($query, $paramsBind);
 
         if (count($return) == 0) {
@@ -95,7 +95,7 @@ class Piwik_Dashboard extends Piwik_Plugin
     public function getAllDashboards($login)
     {
         $dashboards = Piwik_FetchAll('SELECT iddashboard, name, layout
-                                      FROM ' . Piwik_Common::prefixTable('user_dashboard') .
+                                      FROM ' . Common::prefixTable('user_dashboard') .
             ' WHERE login = ? ORDER BY iddashboard', array($login));
 
         $nameless = 1;
@@ -110,7 +110,7 @@ class Piwik_Dashboard extends Piwik_Plugin
                 $nameless++;
             }
 
-            $dashboard['name'] = Piwik_Common::unsanitizeInputValue($dashboard['name']);
+            $dashboard['name'] = Common::unsanitizeInputValue($dashboard['name']);
 
             $layout = '[]';
             if (!empty($dashboard['layout'])) {
@@ -181,12 +181,12 @@ class Piwik_Dashboard extends Piwik_Plugin
         $layout = str_replace("\\\"", "\"", $layout);
         $layout = str_replace("\n", "", $layout);
 
-        return Piwik_Common::json_decode($layout, $assoc = false);
+        return Common::json_decode($layout, $assoc = false);
     }
 
     public function encodeLayout($layout)
     {
-        return Piwik_Common::json_encode($layout);
+        return Common::json_encode($layout);
     }
 
     public function addMenus()
@@ -211,7 +211,7 @@ class Piwik_Dashboard extends Piwik_Plugin
     {
         $tooltip = false;
         try {
-            $idSite = Piwik_Common::getRequestVar('idSite');
+            $idSite = Common::getRequestVar('idSite');
             $tooltip = Piwik_Translate('Dashboard_TopLinkTooltip', Piwik_Site::getNameFor($idSite));
         } catch (Exception $ex) {
             // if no idSite parameter, show no tooltip
@@ -238,14 +238,14 @@ class Piwik_Dashboard extends Piwik_Plugin
 
     public function deleteDashboardLayout($userLogin)
     {
-        Piwik_Query('DELETE FROM ' . Piwik_Common::prefixTable('user_dashboard') . ' WHERE login = ?', array($userLogin));
+        Piwik_Query('DELETE FROM ' . Common::prefixTable('user_dashboard') . ' WHERE login = ?', array($userLogin));
     }
 
     public function install()
     {
         // we catch the exception
         try {
-            $sql = "CREATE TABLE " . Piwik_Common::prefixTable('user_dashboard') . " (
+            $sql = "CREATE TABLE " . Common::prefixTable('user_dashboard') . " (
 					login VARCHAR( 100 ) NOT NULL ,
 					iddashboard INT NOT NULL ,
 					name VARCHAR( 100 ) NULL DEFAULT NULL ,
@@ -264,6 +264,6 @@ class Piwik_Dashboard extends Piwik_Plugin
 
     public function uninstall()
     {
-        Piwik_DropTables(Piwik_Common::prefixTable('user_dashboard'));
+        Piwik_DropTables(Common::prefixTable('user_dashboard'));
     }
 }
diff --git a/plugins/DevicesDetection/Controller.php b/plugins/DevicesDetection/Controller.php
index 9d09a35abe..6aac50450c 100644
--- a/plugins/DevicesDetection/Controller.php
+++ b/plugins/DevicesDetection/Controller.php
@@ -1,6 +1,6 @@
 <?php
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -135,7 +135,7 @@ class Piwik_DevicesDetection_Controller extends Piwik_Controller
     public function refreshParsedUserAgents()
     {
         Piwik::checkUserIsSuperUser();
-        $q = "SELECT idvisit, config_debug_ua FROM " . Piwik_Common::prefixTable("log_visit");
+        $q = "SELECT idvisit, config_debug_ua FROM " . Common::prefixTable("log_visit");
         $res = Piwik_FetchAll($q);
         foreach ($res as $rec) {
             $UAParser = new UserAgentParserEnhanced($rec['config_debug_ua']);
@@ -165,7 +165,7 @@ class Piwik_DevicesDetection_Controller extends Piwik_Controller
 
     private function updateVisit($idVisit, $uaDetails)
     {
-        $q = "UPDATE " . Piwik_Common::prefixTable("log_visit") . " SET " .
+        $q = "UPDATE " . Common::prefixTable("log_visit") . " SET " .
             "config_browser_name = '" . $uaDetails['config_browser_name'] . "' ," .
             "config_browser_version = '" . $uaDetails['config_browser_version'] . "' ," .
             "config_os = '" . $uaDetails['config_os'] . "' ," .
diff --git a/plugins/DevicesDetection/DevicesDetection.php b/plugins/DevicesDetection/DevicesDetection.php
index 31c12d6b07..74ee758854 100644
--- a/plugins/DevicesDetection/DevicesDetection.php
+++ b/plugins/DevicesDetection/DevicesDetection.php
@@ -10,7 +10,7 @@
  * @package Piwik_DevicesDetection
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once PIWIK_INCLUDE_PATH . "/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php";
 require_once PIWIK_INCLUDE_PATH . '/plugins/DevicesDetection/functions.php';
@@ -187,7 +187,7 @@ class Piwik_DevicesDetection extends Piwik_Plugin
     {
 // we catch the exception
         try {
-            $q1 = "ALTER TABLE `" . Piwik_Common::prefixTable("log_visit") . "`
+            $q1 = "ALTER TABLE `" . Common::prefixTable("log_visit") . "`
                 ADD `config_os_version` VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `config_os` ,
                 ADD `config_device_type` TINYINT( 10 ) NULL DEFAULT NULL AFTER `config_browser_version` ,
                 ADD `config_device_brand` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `config_device_type` ,
@@ -195,7 +195,7 @@ class Piwik_DevicesDetection extends Piwik_Plugin
             Piwik_Exec($q1);
             // conditionaly add this column
             if (@Config::getInstance()->Debug['store_user_agent_in_visit']) {
-                $q2 = "ALTER TABLE `" . Piwik_Common::prefixTable("log_visit") . "` 
+                $q2 = "ALTER TABLE `" . Common::prefixTable("log_visit") . "`
                 ADD `config_debug_ua` VARCHAR( 512 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `config_device_model`";
                 Piwik_Exec($q2);
             }
diff --git a/plugins/ExamplePlugin/Controller.php b/plugins/ExamplePlugin/Controller.php
index 73329f9270..45857cbc0b 100644
--- a/plugins/ExamplePlugin/Controller.php
+++ b/plugins/ExamplePlugin/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_ExamplePlugin
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -82,7 +82,7 @@ class Piwik_ExamplePlugin_Controller extends Piwik_Controller
         $out .= '<h3>Misc</h3>';
         $out .= '<code>Piwik_AddMenu( $mainMenuName, $subMenuName, $url );</code> - Adds an entry to the menu in the Piwik interface (See the example in the <a href="https://github.com/piwik/piwik/blob/1.0/plugins/UserCountry/UserCountry.php#L76">UserCountry Plugin file</a>)<br />';
         $out .= '<code>Piwik_AddWidget( $widgetCategory, $widgetName, $controllerName, $controllerAction, $customParameters = array());</code> - Adds a widget that users can add in the dashboard, or export using the Widgets link at the top of the screen. See the example in the <a href="https://github.com/piwik/piwik/blob/1.0/plugins/UserCountry/UserCountry.php#L70">UserCountry Plugin file</a> or any other plugin)<br />';
-        $out .= '<code>Piwik_Common::prefixTable("site")</code> = <b>' . Piwik_Common::prefixTable("site") . '</b><br />';
+        $out .= '<code>Piwik_Common::prefixTable("site")</code> = <b>' . Common::prefixTable("site") . '</b><br />';
 
 
         $out .= '<h2>User access</h2>';
@@ -93,7 +93,7 @@ class Piwik_ExamplePlugin_Controller extends Piwik_Controller
         $out .= '<code>Piwik::isUserIsSuperUser()</code> = <b>' . self::boolToString(Piwik::isUserIsSuperUser()) . '</b><br />';
 
         $out .= '<h2>Execute SQL queries</h2>';
-        $txtQuery = "SELECT token_auth FROM " . Piwik_Common::prefixTable('user') . " WHERE login = ?";
+        $txtQuery = "SELECT token_auth FROM " . Common::prefixTable('user') . " WHERE login = ?";
         $result = Piwik_FetchOne($txtQuery, array('anonymous'));
         $out .= '<code>Piwik_FetchOne("' . $txtQuery . '", array("anonymous"))</code> = <b>' . var_export($result, true) . '</b><br />';
         $out .= '<br />';
diff --git a/plugins/ExampleUI/Controller.php b/plugins/ExampleUI/Controller.php
index 1cb48ecb5e..597dea4c0f 100644
--- a/plugins/ExampleUI/Controller.php
+++ b/plugins/ExampleUI/Controller.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_ExampleUI
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_ExampleUI
@@ -113,7 +113,7 @@ class Piwik_ExampleUI_Controller extends Piwik_Controller
 
     function generateSparkline()
     {
-        $serverRequested = Piwik_Common::getRequestVar('server', '');
+        $serverRequested = Common::getRequestVar('server', '');
         $view = Piwik_ViewDataTable::factory('sparkline');
         $view->init($this->pluginName, __FUNCTION__, 'ExampleUI.getTemperaturesEvolution');
         $view->setColumnsToDisplay($serverRequested);
diff --git a/plugins/Feedback/Controller.php b/plugins/Feedback/Controller.php
index 783a64dbb5..3ba8fa5b5a 100644
--- a/plugins/Feedback/Controller.php
+++ b/plugins/Feedback/Controller.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -31,10 +31,10 @@ class Piwik_Feedback_Controller extends Piwik_Controller
      */
     function sendFeedback()
     {
-        $email = Piwik_Common::getRequestVar('email', '', 'string');
-        $body = Piwik_Common::getRequestVar('body', '', 'string');
-        $category = Piwik_Common::getRequestVar('category', '', 'string');
-        $nonce = Piwik_Common::getRequestVar('nonce', '', 'string');
+        $email = Common::getRequestVar('email', '', 'string');
+        $body = Common::getRequestVar('body', '', 'string');
+        $category = Common::getRequestVar('category', '', 'string');
+        $nonce = Common::getRequestVar('nonce', '', 'string');
 
         $view = new Piwik_View('@Feedback/sendFeedback');
         $view->feedbackEmailAddress = Config::getInstance()->General['feedback_email_address'];
@@ -59,10 +59,10 @@ class Piwik_Feedback_Controller extends Piwik_Controller
             Piwik_Nonce::discardNonce('Piwik_Feedback.sendFeedback');
 
             $mail = new Piwik_Mail();
-            $mail->setFrom(Piwik_Common::unsanitizeInputValue($email));
+            $mail->setFrom(Common::unsanitizeInputValue($email));
             $mail->addTo($view->feedbackEmailAddress, 'Piwik Team');
             $mail->setSubject('[ Feedback form - Piwik ] ' . $category);
-            $mail->setBodyText(Piwik_Common::unsanitizeInputValue($body) . "\n"
+            $mail->setBodyText(Common::unsanitizeInputValue($body) . "\n"
                 . 'Piwik ' . Piwik_Version::VERSION . "\n"
                 . 'IP: ' . Piwik_IP::getIpFromHeader() . "\n"
                 . 'URL: ' . Piwik_Url::getReferer() . "\n");
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php
index f6fd240773..bddaf7b98e 100644
--- a/plugins/Goals/API.php
+++ b/plugins/Goals/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_Goals
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Goals API lets you Manage existing goals, via "updateGoal" and "deleteGoal", create new Goals via "addGoal",
@@ -62,7 +62,7 @@ class Piwik_Goals_API
         }
         Piwik::checkUserHasViewAccess($idSite);
         $goals = Piwik_FetchAll("SELECT *
-								FROM " . Piwik_Common::prefixTable('goal') . "
+								FROM " . Common::prefixTable('goal') . "
 								WHERE idsite IN (" . implode(", ", $idSite) . ")
 									AND deleted = 0");
         $cleanedGoals = array();
@@ -101,12 +101,12 @@ class Piwik_Goals_API
         // save in db
         $db = Zend_Registry::get('db');
         $idGoal = $db->fetchOne("SELECT max(idgoal) + 1
-								FROM " . Piwik_Common::prefixTable('goal') . "
+								FROM " . Common::prefixTable('goal') . "
 								WHERE idsite = ?", $idSite);
         if ($idGoal == false) {
             $idGoal = 1;
         }
-        $db->insert(Piwik_Common::prefixTable('goal'),
+        $db->insert(Common::prefixTable('goal'),
             array(
                  'idsite'          => $idSite,
                  'idgoal'          => $idGoal,
@@ -145,7 +145,7 @@ class Piwik_Goals_API
         $name = $this->checkName($name);
         $pattern = $this->checkPattern($pattern);
         $this->checkPatternIsValid($patternType, $pattern);
-        Zend_Registry::get('db')->update(Piwik_Common::prefixTable('goal'),
+        Zend_Registry::get('db')->update(Common::prefixTable('goal'),
             array(
                  'name'            => $name,
                  'match_attribute' => $matchAttribute,
@@ -190,12 +190,12 @@ class Piwik_Goals_API
     public function deleteGoal($idSite, $idGoal)
     {
         Piwik::checkUserHasAdminAccess($idSite);
-        Piwik_Query("UPDATE " . Piwik_Common::prefixTable('goal') . "
+        Piwik_Query("UPDATE " . Common::prefixTable('goal') . "
 										SET deleted = 1
 										WHERE idsite = ? 
 											AND idgoal = ?",
             array($idSite, $idGoal));
-        Piwik_DeleteAllRows(Piwik_Common::prefixTable("log_conversion"), "WHERE idgoal = ?", 100000, array($idGoal));
+        Piwik_DeleteAllRows(Common::prefixTable("log_conversion"), "WHERE idgoal = ?", 100000, array($idGoal));
         Piwik_Tracker_Cache::regenerateCacheWebsiteAttributes($idSite);
     }
 
diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php
index d96730e3b5..ea38907bae 100644
--- a/plugins/Goals/Controller.php
+++ b/plugins/Goals/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_Goals
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -49,26 +49,26 @@ class Piwik_Goals_Controller extends Piwik_Controller
     public function __construct()
     {
         parent::__construct();
-        $this->idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
+        $this->idSite = Common::getRequestVar('idSite', null, 'int');
         $this->goals = Piwik_Goals_API::getInstance()->getGoals($this->idSite);
         foreach ($this->goals as &$goal) {
-            $goal['name'] = Piwik_Common::sanitizeInputValue($goal['name']);
+            $goal['name'] = Common::sanitizeInputValue($goal['name']);
             if (isset($goal['pattern'])) {
-                $goal['pattern'] = Piwik_Common::sanitizeInputValue($goal['pattern']);
+                $goal['pattern'] = Common::sanitizeInputValue($goal['pattern']);
             }
         }
     }
 
     public function widgetGoalReport()
     {
-        $view = $this->getGoalReportView($idGoal = Piwik_Common::getRequestVar('idGoal', null, 'string'));
+        $view = $this->getGoalReportView($idGoal = Common::getRequestVar('idGoal', null, 'string'));
         $view->displayFullReport = false;
         echo $view->render();
     }
 
     public function goalReport()
     {
-        $view = $this->getGoalReportView($idGoal = Piwik_Common::getRequestVar('idGoal', null, 'string'));
+        $view = $this->getGoalReportView($idGoal = Common::getRequestVar('idGoal', null, 'string'));
         $view->displayFullReport = true;
         echo $view->render();
     }
@@ -87,7 +87,7 @@ class Piwik_Goals_Controller extends Piwik_Controller
     public function getEcommerceLog($fetch = false)
     {
         $saveGET = $_GET;
-        $_GET['filterEcommerce'] = Piwik_Common::getRequestVar('filterEcommerce', 1, 'int');
+        $_GET['filterEcommerce'] = Common::getRequestVar('filterEcommerce', 1, 'int');
         $_GET['widget'] = 1;
         $_GET['segment'] = 'visitEcommerceStatus!=none';
         $output = Piwik_FrontController::getInstance()->dispatch('Live', 'getVisitorLog', array($fetch));
@@ -129,10 +129,10 @@ class Piwik_Goals_Controller extends Piwik_Controller
 
         // conversion rate for new and returning visitors
         $segment = 'visitorType==returning,visitorType==returningCustomer';
-        $conversionRateReturning = Piwik_Goals_API::getInstance()->getConversionRate($this->idSite, Piwik_Common::getRequestVar('period'), Piwik_Common::getRequestVar('date'), $segment, $idGoal);
+        $conversionRateReturning = Piwik_Goals_API::getInstance()->getConversionRate($this->idSite, Common::getRequestVar('period'), Common::getRequestVar('date'), $segment, $idGoal);
         $view->conversion_rate_returning = $this->formatConversionRate($conversionRateReturning);
         $segment = 'visitorType==new';
-        $conversionRateNew = Piwik_Goals_API::getInstance()->getConversionRate($this->idSite, Piwik_Common::getRequestVar('period'), Piwik_Common::getRequestVar('date'), $segment, $idGoal);
+        $conversionRateNew = Piwik_Goals_API::getInstance()->getConversionRate($this->idSite, Common::getRequestVar('period'), Common::getRequestVar('date'), $segment, $idGoal);
         $view->conversion_rate_new = $this->formatConversionRate($conversionRateNew);
         $view->goalReportsByDimension = $this->getGoalReportsByDimensionTable(
             $view->nb_conversions, isset($ecommerce), !empty($view->cart_nb_conversions));
@@ -147,12 +147,12 @@ class Piwik_Goals_Controller extends Piwik_Controller
         // any other code/cause security issues)
         $goals = $this->goals;
         foreach ($goals as &$goal) {
-            $goal['name'] = Piwik_Common::unsanitizeInputValue($goal['name']);
+            $goal['name'] = Common::unsanitizeInputValue($goal['name']);
             if (isset($goal['pattern'])) {
-                $goal['pattern'] = Piwik_Common::unsanitizeInputValue($goal['pattern']);
+                $goal['pattern'] = Common::unsanitizeInputValue($goal['pattern']);
             }
         }
-        $view->goalsJSON = Piwik_Common::json_encode($goals);
+        $view->goalsJSON = Common::json_encode($goals);
         
         $view->userCanEditGoals = Piwik::isUserHasAdminAccess($this->idSite);
         $view->ecommerceEnabled = $this->site->isEcommerceEnabled();
@@ -233,14 +233,14 @@ class Piwik_Goals_Controller extends Piwik_Controller
     public function getEvolutionGraph($fetch = false, array $columns = array(), $idGoal = false)
     {
         if (empty($columns)) {
-            $columns = Piwik_Common::getRequestVar('columns');
+            $columns = Common::getRequestVar('columns');
             $columns = Piwik::getArrayFromApiParameter($columns);
         }
 
         $columns = !is_array($columns) ? array($columns) : $columns;
 
         if (empty($idGoal)) {
-            $idGoal = Piwik_Common::getRequestVar('idGoal', false, 'string');
+            $idGoal = Common::getRequestVar('idGoal', false, 'string');
         }
         $view = $this->getLastUnitGraph($this->pluginName, __FUNCTION__, 'Goals.get');
         $view->setParametersToModify(array('idGoal' => $idGoal));
@@ -423,7 +423,7 @@ class Piwik_Goals_Controller extends Piwik_Controller
             // for non-Goals reports, we show the goals table
             $customParams = $ecommerceCustomParams + array('documentationForGoalsPage' => '1');
 
-            if (Piwik_Common::getRequestVar('idGoal', '') === '') // if no idGoal, use 0 for overview
+            if (Common::getRequestVar('idGoal', '') === '') // if no idGoal, use 0 for overview
             {
                 $customParams['idGoal'] = '0'; // NOTE: Must be string! Otherwise Piwik_View_HtmlTable_Goals fails.
             }
diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php
index 80a6cfc8e9..9549dc2fb1 100644
--- a/plugins/Goals/Goals.php
+++ b/plugins/Goals/Goals.php
@@ -9,7 +9,7 @@
  * @package Piwik_Goals
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -99,7 +99,7 @@ class Piwik_Goals extends Piwik_Plugin
      */
     function deleteSiteGoals($idSite)
     {
-        Piwik_Query("DELETE FROM " . Piwik_Common::prefixTable('goal') . " WHERE idsite = ? ", array($idSite));
+        Piwik_Query("DELETE FROM " . Common::prefixTable('goal') . " WHERE idsite = ? ", array($idSite));
     }
 
     /**
@@ -410,7 +410,7 @@ class Piwik_Goals extends Piwik_Plugin
 
     public function addWidgets()
     {
-        $idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
+        $idSite = Common::getRequestVar('idSite', null, 'int');
 
         // Ecommerce widgets
         $site = new Piwik_Site($idSite);
@@ -427,14 +427,14 @@ class Piwik_Goals extends Piwik_Plugin
         $goals = Piwik_Goals_API::getInstance()->getGoals($idSite);
         if (count($goals) > 0) {
             foreach ($goals as $goal) {
-                Piwik_AddWidget('Goals_Goals', Piwik_Common::sanitizeInputValue($goal['name']), 'Goals', 'widgetGoalReport', array('idGoal' => $goal['idgoal']));
+                Piwik_AddWidget('Goals_Goals', Common::sanitizeInputValue($goal['name']), 'Goals', 'widgetGoalReport', array('idGoal' => $goal['idgoal']));
             }
         }
     }
 
     function addMenus()
     {
-        $idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
+        $idSite = Common::getRequestVar('idSite', null, 'int');
         $goals = Piwik_Goals_API::getInstance()->getGoals($idSite);
         $mainGoalMenu = $this->getGoalCategoryName($idSite);
         $site = new Piwik_Site($idSite);
@@ -570,7 +570,7 @@ class Piwik_Goals extends Piwik_Plugin
     
     private function getDisplayPropertiesForItemsReport($label)
     {
-        $idSite = Piwik_Common::getRequestVar('idSite');
+        $idSite = Common::getRequestVar('idSite');
         
         $moneyColumns = array('revenue', 'avg_price');
         $prettifyMoneyColumns = array(
@@ -592,7 +592,7 @@ class Piwik_Goals extends Piwik_Plugin
         // set columns/translations which differ based on viewDataTable TODO: shouldn't have to do this check... amount of reports should be dynamic, but metadata should be static
         $columns = Piwik_Goals::getProductReportColumns();
         
-        $abandonedCart = Piwik_Common::getRequestVar('viewDataTable', 'ecommerceOrder', 'string') == 'ecommerceAbandonedCart';
+        $abandonedCart = Common::getRequestVar('viewDataTable', 'ecommerceOrder', 'string') == 'ecommerceAbandonedCart';
         if ($abandonedCart) {
             $columns['abandoned_carts'] = Piwik_Translate('General_AbandonedCarts');
             $columns['revenue'] = Piwik_Translate('Goals_LeftInCart', Piwik_Translate('General_ProductRevenue'));
diff --git a/plugins/ImageGraph/API.php b/plugins/ImageGraph/API.php
index d6d7feaa42..c240a04ecc 100644
--- a/plugins/ImageGraph/API.php
+++ b/plugins/ImageGraph/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_ImageGraph
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The ImageGraph.get API call lets you generate beautiful static PNG Graphs for any existing Piwik report.
@@ -283,10 +283,10 @@ class Piwik_ImageGraph_API
                 // when no labels are specified, getRowEvolution returns the top N=filter_limit row evolutions
                 // rows are sorted using filter_sort_column (see Piwik_API_DataTableGenericFilter for more info)
                 if (!$labels) {
-                    $savedFilterSortColumnValue = Piwik_Common::getRequestVar('filter_sort_column', '');
+                    $savedFilterSortColumnValue = Common::getRequestVar('filter_sort_column', '');
                     $_GET['filter_sort_column'] = $plottedMetric;
 
-                    $savedFilterLimitValue = Piwik_Common::getRequestVar('filter_limit', -1, 'int');
+                    $savedFilterLimitValue = Common::getRequestVar('filter_limit', -1, 'int');
                     if ($savedFilterLimitValue == -1 || $savedFilterLimitValue > self::MAX_NB_ROW_LABELS) {
                         $_GET['filter_limit'] = self::DEFAULT_NB_ROW_EVOLUTIONS;
                     }
@@ -382,7 +382,7 @@ class Piwik_ImageGraph_API
                 {
                     // $row instanceof Piwik_DataTable_Row
                     $rowData = $row->getColumns(); // Associative Array
-                    $abscissaSeries[] = Piwik_Common::unsanitizeInputValue($rowData['label']);
+                    $abscissaSeries[] = Common::unsanitizeInputValue($rowData['label']);
 
                     foreach ($ordinateColumns as $column) {
                         $parsedOrdinateValue = $this->parseOrdinateValue($rowData[$column]);
@@ -442,7 +442,7 @@ class Piwik_ImageGraph_API
                     }
 
                     $rowId = $periodsData[$i]->metadata['period']->getLocalizedShortString();
-                    $abscissaSeries[] = Piwik_Common::unsanitizeInputValue($rowId);
+                    $abscissaSeries[] = Common::unsanitizeInputValue($rowId);
                 }
             }
 
@@ -502,7 +502,7 @@ class Piwik_ImageGraph_API
                 $fileName = self::$DEFAULT_PARAMETERS[$graphType][self::FILENAME_KEY] . '_' . $apiModule . '_' . $apiAction . $idGoal . ' ' . str_replace(',', '-', $date) . ' ' . $idSite . '.png';
                 $fileName = str_replace(array(' ', '/'), '_', $fileName);
 
-                if (!Piwik_Common::isValidFilename($fileName)) {
+                if (!Common::isValidFilename($fileName)) {
                     throw new Exception('Error: Image graph filename ' . $fileName . ' is not valid.');
                 }
 
@@ -520,7 +520,7 @@ class Piwik_ImageGraph_API
 
     private function setFilterTruncate($default)
     {
-        $_GET['filter_truncate'] = Piwik_Common::getRequestVar('filter_truncate', $default, 'int');
+        $_GET['filter_truncate'] = Common::getRequestVar('filter_truncate', $default, 'int');
     }
 
     private static function parseOrdinateValue($ordinateValue)
diff --git a/plugins/ImageGraph/Controller.php b/plugins/ImageGraph/Controller.php
index 56157a4f2a..4cabcd9633 100644
--- a/plugins/ImageGraph/Controller.php
+++ b/plugins/ImageGraph/Controller.php
@@ -1,6 +1,6 @@
 <?php
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -18,9 +18,9 @@ class Piwik_ImageGraph_Controller extends Piwik_Controller
     public function index()
     {
         Piwik::checkUserHasSomeAdminAccess();
-        $idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
-        $period = Piwik_Common::getRequestVar('period', 'day', 'string');
-        $date = Piwik_Common::getRequestVar('date', 'today', 'string');
+        $idSite = Common::getRequestVar('idSite', 1, 'int');
+        $period = Common::getRequestVar('period', 'day', 'string');
+        $date = Common::getRequestVar('date', 'today', 'string');
         $_GET['token_auth'] = Piwik::getCurrentUserTokenAuth();
         $reports = Piwik_API_API::getInstance()->getReportMetadata($idSite, $period, $date);
         $plot = array();
@@ -47,8 +47,8 @@ class Piwik_ImageGraph_Controller extends Piwik_Controller
         $view = new Piwik_View('@ImageGraph/testAllSizes');
         $this->setGeneralVariablesView($view);
 
-        $period = Piwik_Common::getRequestVar('period', 'day', 'string');
-        $date = Piwik_Common::getRequestVar('date', 'today', 'string');
+        $period = Common::getRequestVar('period', 'day', 'string');
+        $date = Common::getRequestVar('date', 'today', 'string');
 
         $_GET['token_auth'] = Piwik::getCurrentUserTokenAuth();
         $availableReports = Piwik_API_API::getInstance()->getReportMetadata($this->idSite, $period, $date);
diff --git a/plugins/ImageGraph/ImageGraph.php b/plugins/ImageGraph/ImageGraph.php
index 8cf15cd7ff..dfccc799bb 100644
--- a/plugins/ImageGraph/ImageGraph.php
+++ b/plugins/ImageGraph/ImageGraph.php
@@ -1,5 +1,5 @@
 <?php
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -95,7 +95,7 @@ class Piwik_ImageGraph extends Piwik_Plugin
             }
         }
 
-        $token_auth = Piwik_Common::getRequestVar('token_auth', false);
+        $token_auth = Common::getRequestVar('token_auth', false);
 
         $urlPrefix = "index.php?";
         foreach ($reports as &$report) {
@@ -126,7 +126,7 @@ class Piwik_ImageGraph extends Piwik_Plugin
             }
 
             // add the idSubtable if it exists
-            $idSubtable = Piwik_Common::getRequestVar('idSubtable', false);
+            $idSubtable = Common::getRequestVar('idSubtable', false);
             if ($idSubtable !== false) {
                 $parameters['idSubtable'] = $idSubtable;
             }
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 26e5f23b72..cf676dbd7f 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_Installation
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Installation controller
@@ -159,7 +159,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
                 $this->session->db_infos = $dbInfos;
                 $this->redirectToNextStep(__FUNCTION__);
             } catch (Exception $e) {
-                $view->errorMessage = Piwik_Common::sanitizeInputValue($e->getMessage());
+                $view->errorMessage = Common::sanitizeInputValue($e->getMessage());
             }
         }
         $view->addForm($form);
@@ -240,7 +240,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
         $this->skipThisStep(__FUNCTION__);
         $this->createDbFromSessionInformation();
 
-        if (Piwik_Common::getRequestVar('deleteTables', 0, 'int') == 1) {
+        if (Common::getRequestVar('deleteTables', 0, 'int') == 1) {
             Piwik::dropTables();
             $view->existingTablesDeleted = true;
 
@@ -313,7 +313,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
                 'login'    => $form->getSubmitValue('login'),
                 'password' => md5($form->getSubmitValue('password')),
                 'email'    => $form->getSubmitValue('email'),
-                'salt'     => Piwik_Common::generateUniqId(),
+                'salt'     => Common::generateUniqId(),
             );
 
             $this->session->superuser_infos = $superUserInfos;
@@ -418,7 +418,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
             $this->session->firstWebsiteSetupSuccessMessage = true;
         }
         $siteName = $this->session->site_name;
-        $siteName = Piwik_Common::sanitizeInputValue(urldecode($siteName));
+        $siteName = Common::sanitizeInputValue(urldecode($siteName));
         $idSite = $this->session->site_idSite;
 
         // Load the Tracking code and help text from the SitesManager
@@ -547,7 +547,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
      */
     public function saveLanguage()
     {
-        $language = Piwik_Common::getRequestVar('language');
+        $language = Common::getRequestVar('language');
         Piwik_LanguagesManager::setLanguageForSession($language);
         Piwik_Url::redirectToReferer();
     }
@@ -591,7 +591,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
             $message = Piwik_Translate('Installation_ErrorInvalidState',
                 array('<br /><b>',
                       '</b>',
-                      '<a href=\'' . Piwik_Common::sanitizeInputValue(Piwik_Url::getCurrentUrlWithoutFileName()) . '\'>',
+                      '<a href=\'' . Common::sanitizeInputValue(Piwik_Url::getCurrentUrlWithoutFileName()) . '\'>',
                       '</a>')
             );
             Piwik::exitWithErrorMessage($message);
@@ -698,7 +698,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
 
         $infos['can_auto_update'] = Piwik::canAutoUpdate();
 
-        if (Piwik_Common::isIIS()) {
+        if (Common::isIIS()) {
             Piwik::createWebConfigFiles();
         } else {
             Piwik::createHtAccessFiles();
@@ -807,7 +807,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
             $infos['memory_ok'] = $memoryValue >= $minimumMemoryLimit;
         }
 
-        $infos['isWindows'] = Piwik_Common::isWindows();
+        $infos['isWindows'] = Common::isWindows();
 
         $integrityInfo = Piwik::getFileIntegrityInformation();
         $infos['integrity'] = $integrityInfo[0];
@@ -822,7 +822,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
 
         $infos['timezone'] = Piwik::isTimezoneSupportEnabled();
 
-        $infos['tracker_status'] = Piwik_Common::getRequestVar('trackerStatus', 0, 'int');
+        $infos['tracker_status'] = Common::getRequestVar('trackerStatus', 0, 'int');
 
         $infos['protocol'] = Piwik_ProxyHeaders::getProtocolInformation();
         if (!Piwik::isHttps() && $infos['protocol'] !== null) {
@@ -945,7 +945,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
         $result = array();
 
         // check if LOAD DATA INFILE works
-        $optionTable = Piwik_Common::prefixTable('option');
+        $optionTable = Common::prefixTable('option');
         $testOptionNames = array('test_system_check1', 'test_system_check2');
 
         $result['load_data_infile_available'] = false;
diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php
index bae926f4ed..0136c1a20e 100644
--- a/plugins/Installation/FormDatabaseSetup.php
+++ b/plugins/Installation/FormDatabaseSetup.php
@@ -9,7 +9,7 @@
  * @package Piwik_Installation
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -300,7 +300,7 @@ class Piwik_Installation_FormDatabaseSetup_Rule_checkValidFilename extends HTML_
     {
         $prefix = $this->owner->getValue();
         return empty($prefix)
-            || Piwik_Common::isValidFilename($prefix);
+            || Common::isValidFilename($prefix);
     }
 }
 
diff --git a/plugins/Installation/Installation.php b/plugins/Installation/Installation.php
index 36326a93ad..20af4fb892 100644
--- a/plugins/Installation/Installation.php
+++ b/plugins/Installation/Installation.php
@@ -9,7 +9,7 @@
  * @package Piwik_Installation
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -55,7 +55,7 @@ class Piwik_Installation extends Piwik_Plugin
 
         Piwik_PostEvent('Installation.startInstallation', array($this));
 
-        $step = Piwik_Common::getRequestVar('action', 'welcome', 'string');
+        $step = Common::getRequestVar('action', 'welcome', 'string');
         $controller = $this->getInstallationController();
         if (in_array($step, array_keys($controller->getInstallationSteps())) || $step == 'saveLanguage') {
             $controller->$step($message);
diff --git a/plugins/LanguagesManager/API.php b/plugins/LanguagesManager/API.php
index a4048e99b5..14fb3ea7f5 100644
--- a/plugins/LanguagesManager/API.php
+++ b/plugins/LanguagesManager/API.php
@@ -10,7 +10,7 @@
  *
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The LanguagesManager API lets you access existing Piwik translations, and change Users languages preferences.
@@ -51,7 +51,7 @@ class Piwik_LanguagesManager_API
     public function isLanguageAvailable($languageCode)
     {
         return $languageCode !== false
-            && Piwik_Common::isValidFilename($languageCode)
+            && Common::isValidFilename($languageCode)
             && in_array($languageCode, $this->getAvailableLanguages());
     }
 
@@ -161,7 +161,7 @@ class Piwik_LanguagesManager_API
     {
         Piwik::checkUserIsSuperUserOrTheUser($login);
         Piwik::checkUserIsNotAnonymous();
-        return Piwik_FetchOne('SELECT language FROM ' . Piwik_Common::prefixTable('user_language') .
+        return Piwik_FetchOne('SELECT language FROM ' . Common::prefixTable('user_language') .
             ' WHERE login = ? ', array($login));
     }
 
@@ -180,7 +180,7 @@ class Piwik_LanguagesManager_API
             return false;
         }
         $paramsBind = array($login, $languageCode, $languageCode);
-        Piwik_Query('INSERT INTO ' . Piwik_Common::prefixTable('user_language') .
+        Piwik_Query('INSERT INTO ' . Common::prefixTable('user_language') .
                 ' (login, language)
                     VALUES (?,?)
                 ON DUPLICATE KEY UPDATE language=?',
diff --git a/plugins/LanguagesManager/Controller.php b/plugins/LanguagesManager/Controller.php
index 2fbc094382..53dd6494c5 100644
--- a/plugins/LanguagesManager/Controller.php
+++ b/plugins/LanguagesManager/Controller.php
@@ -10,7 +10,7 @@
  *
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_LanguagesManager
@@ -23,7 +23,7 @@ class Piwik_LanguagesManager_Controller extends Piwik_Controller
      */
     public function saveLanguage()
     {
-        $language = Piwik_Common::getRequestVar('language');
+        $language = Common::getRequestVar('language');
 
         // Prevent CSRF only when piwik is not installed yet (During install user can change language)
         if (Piwik::isInstalled()) {
diff --git a/plugins/LanguagesManager/LanguagesManager.php b/plugins/LanguagesManager/LanguagesManager.php
index 5d8f6a3a72..073e7a1231 100644
--- a/plugins/LanguagesManager/LanguagesManager.php
+++ b/plugins/LanguagesManager/LanguagesManager.php
@@ -11,7 +11,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -88,7 +88,7 @@ class Piwik_LanguagesManager extends Piwik_Plugin
 
     public function deleteUserLanguage($userLogin)
     {
-        Piwik_Query('DELETE FROM ' . Piwik_Common::prefixTable('user_language') . ' WHERE login = ?', $userLogin);
+        Piwik_Query('DELETE FROM ' . Common::prefixTable('user_language') . ' WHERE login = ?', $userLogin);
     }
 
     /**
@@ -98,7 +98,7 @@ class Piwik_LanguagesManager extends Piwik_Plugin
     {
         // we catch the exception
         try {
-            $sql = "CREATE TABLE " . Piwik_Common::prefixTable('user_language') . " (
+            $sql = "CREATE TABLE " . Common::prefixTable('user_language') . " (
 					login VARCHAR( 100 ) NOT NULL ,
 					language VARCHAR( 10 ) NOT NULL ,
 					PRIMARY KEY ( login )
@@ -118,7 +118,7 @@ class Piwik_LanguagesManager extends Piwik_Plugin
      */
     public function uninstall()
     {
-        Piwik_DropTables(Piwik_Common::prefixTable('user_language'));
+        Piwik_DropTables(Common::prefixTable('user_language'));
     }
 
     /**
@@ -128,7 +128,7 @@ class Piwik_LanguagesManager extends Piwik_Plugin
     {
         $languageCode = self::getLanguageFromPreferences();
         if (!Piwik_LanguagesManager_API::getInstance()->isLanguageAvailable($languageCode)) {
-            $languageCode = Piwik_Common::extractLanguageCodeFromBrowserLanguage(Piwik_Common::getBrowserLanguage(), Piwik_LanguagesManager_API::getInstance()->getAvailableLanguages());
+            $languageCode = Common::extractLanguageCodeFromBrowserLanguage(Common::getBrowserLanguage(), Piwik_LanguagesManager_API::getInstance()->getAvailableLanguages());
         }
         if (!Piwik_LanguagesManager_API::getInstance()->isLanguageAvailable($languageCode)) {
             $languageCode = Piwik_Translate::getInstance()->getLanguageDefault();
diff --git a/plugins/Live/API.php b/plugins/Live/API.php
index 4928570526..6c4e7ba046 100644
--- a/plugins/Live/API.php
+++ b/plugins/Live/API.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see plugins/Referers/functions.php
@@ -325,7 +325,7 @@ class Piwik_Live_API
         $orderByParent = "sub.visit_last_action_time DESC";
         if (!empty($visitorId)) {
             $where[] = "log_visit.idvisitor = ? ";
-            $whereBind[] = @Piwik_Common::hex2bin($visitorId);
+            $whereBind[] = @Common::hex2bin($visitorId);
         }
 
         if (!empty($minTimestamp)) {
@@ -466,10 +466,10 @@ class Piwik_Live_API
 					log_link_visit_action.time_spent_ref_action as timeSpentRef,
 					log_link_visit_action.custom_float
 					$sqlCustomVariables
-				FROM " . Piwik_Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
-					LEFT JOIN " . Piwik_Common::prefixTable('log_action') . " AS log_action
+				FROM " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
+					LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action
 					ON  log_link_visit_action.idaction_url = log_action.idaction
-					LEFT JOIN " . Piwik_Common::prefixTable('log_action') . " AS log_action_title
+					LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_title
 					ON  log_link_visit_action.idaction_name = log_action_title.idaction
 				WHERE log_link_visit_action.idvisit = ?
 				ORDER BY server_time ASC
@@ -531,8 +531,8 @@ class Piwik_Live_API
 						log_conversion.idlink_va as goalPageId,
 						log_conversion.server_time as serverTimePretty,
 						log_conversion.url as url
-				FROM " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion
-				LEFT JOIN " . Piwik_Common::prefixTable('goal') . " AS goal
+				FROM " . Common::prefixTable('log_conversion') . " AS log_conversion
+				LEFT JOIN " . Common::prefixTable('goal') . " AS goal
 					ON (goal.idsite = log_conversion.idsite
 						AND
 						goal.idgoal = log_conversion.idgoal)
@@ -555,7 +555,7 @@ class Piwik_Live_API
 						items as items,
 
 						log_conversion.server_time as serverTimePretty
-					FROM " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion
+					FROM " . Common::prefixTable('log_conversion') . " AS log_conversion
 					WHERE idvisit = ?
 						AND idgoal <= " . Piwik_Tracker_GoalManager::IDGOAL_ORDER . "
 					ORDER BY server_time ASC
@@ -590,12 +590,12 @@ class Piwik_Live_API
 							log_action_category.name as itemCategory,
 							" . Piwik_DataAccess_LogAggregator::getSqlRevenue('price') . " as price,
 							quantity as quantity
-						FROM " . Piwik_Common::prefixTable('log_conversion_item') . "
-							INNER JOIN " . Piwik_Common::prefixTable('log_action') . " AS log_action_sku
+						FROM " . Common::prefixTable('log_conversion_item') . "
+							INNER JOIN " . Common::prefixTable('log_action') . " AS log_action_sku
 							ON  idaction_sku = log_action_sku.idaction
-							LEFT JOIN " . Piwik_Common::prefixTable('log_action') . " AS log_action_name
+							LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_name
 							ON  idaction_name = log_action_name.idaction
-							LEFT JOIN " . Piwik_Common::prefixTable('log_action') . " AS log_action_category
+							LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_category
 							ON idaction_category = log_action_category.idaction
 						WHERE idvisit = ?
 							AND idorder = ?
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php
index 40058843c4..13e02a5d7d 100644
--- a/plugins/Live/Controller.php
+++ b/plugins/Live/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_Live
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_Live
@@ -79,7 +79,7 @@ class Piwik_Live_Controller extends Piwik_Controller
     public function indexVisitorLog()
     {
         $view = new Piwik_View('@Live/indexVisitorLog.twig');
-        $view->filterEcommerce = Piwik_Common::getRequestVar('filterEcommerce', 0, 'int');
+        $view->filterEcommerce = Common::getRequestVar('filterEcommerce', 0, 'int');
         $view->visitorLog = $this->getVisitorLog($fetch = true);
         echo $view->render();
     }
@@ -117,7 +117,7 @@ class Piwik_Live_Controller extends Piwik_Controller
         // set a very high row count so that the next link in the footer of the data table is always shown
         $view->setCustomParameter('totalRows', 10000000);
 
-        $view->setCustomParameter('filterEcommerce', Piwik_Common::getRequestVar('filterEcommerce', 0, 'int'));
+        $view->setCustomParameter('filterEcommerce', Common::getRequestVar('filterEcommerce', 0, 'int'));
         $view->setCustomParameter('pageUrlNotDefined', Piwik_Translate('General_NotDefined', Piwik_Translate('Actions_ColumnPageURL')));
 
         return $this->renderView($view, $fetch);
diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php
index 0efd06ba63..800e8ec914 100644
--- a/plugins/Live/Visitor.php
+++ b/plugins/Live/Visitor.php
@@ -9,7 +9,7 @@
  * @package Piwik_Live
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see plugins/Referers/functions.php
@@ -256,7 +256,7 @@ class Piwik_Live_Visitor
 
     function getContinentCode()
     {
-        return Piwik_Common::getContinent($this->details['location_country']);
+        return Common::getContinent($this->details['location_country']);
     }
 
     function getCityName()
@@ -370,7 +370,7 @@ class Piwik_Live_Visitor
                 }
             }
         }
-        if (Piwik_Common::isLookLikeUrl($this->details['referer_url'])) {
+        if (Common::isLookLikeUrl($this->details['referer_url'])) {
             return $this->details['referer_url'];
         }
         return null;
@@ -385,7 +385,7 @@ class Piwik_Live_Visitor
             if (empty($url['query'])) {
                 return null;
             }
-            $position = Piwik_Common::getParameterFromQueryString($url['query'], 'cd');
+            $position = Common::getParameterFromQueryString($url['query'], 'cd');
             if (!empty($position)) {
                 return $position;
             }
diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php
index a9027cd864..20eae5f377 100644
--- a/plugins/Login/Auth.php
+++ b/plugins/Login/Auth.php
@@ -9,7 +9,7 @@
  * @package Piwik_Login
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -48,7 +48,7 @@ class Piwik_Login_Auth implements Piwik_Auth
 
             $login = Piwik_FetchOne(
                 'SELECT login
-                FROM ' . Piwik_Common::prefixTable('user') . '
+                FROM ' . Common::prefixTable('user') . '
 					WHERE token_auth = ?',
                 array($this->token_auth)
             );
@@ -67,7 +67,7 @@ class Piwik_Login_Auth implements Piwik_Auth
             $login = $this->login;
             $userToken = Piwik_FetchOne(
                 'SELECT token_auth
-                FROM ' . Piwik_Common::prefixTable('user') . '
+                FROM ' . Common::prefixTable('user') . '
 					WHERE login = ?',
                 array($login)
             );
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php
index 135f6f3af6..6e429788eb 100644
--- a/plugins/Login/Controller.php
+++ b/plugins/Login/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_Login
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Login controller
@@ -29,9 +29,9 @@ class Piwik_Login_Controller extends Piwik_Controller
     {
         // mitigate rainbow table attack
         $passwordLen = strlen($password) / 2;
-        $hash = Piwik_Common::hash(
+        $hash = Common::hash(
             $userInfo . substr($password, 0, $passwordLen)
-                . Piwik_Common::getSalt() . substr($password, $passwordLen)
+                . Common::getSalt() . substr($password, $passwordLen)
         );
         return $hash;
     }
@@ -113,24 +113,24 @@ class Piwik_Login_Controller extends Piwik_Controller
     {
         self::checkForceSslLogin();
 
-        $password = Piwik_Common::getRequestVar('password', null, 'string');
+        $password = Common::getRequestVar('password', null, 'string');
         if (strlen($password) != 32) {
             throw new Exception(Piwik_TranslateException('Login_ExceptionPasswordMD5HashExpected'));
         }
 
-        $login = Piwik_Common::getRequestVar('login', null, 'string');
+        $login = Common::getRequestVar('login', null, 'string');
         if ($login == Config::getInstance()->superuser['login']) {
             throw new Exception(Piwik_TranslateException('Login_ExceptionInvalidSuperUserAuthenticationMethod', array("logme")));
         }
 
         $currentUrl = 'index.php';
 
-        if (($idSite = Piwik_Common::getRequestVar('idSite', false, 'int')) !== false) {
+        if (($idSite = Common::getRequestVar('idSite', false, 'int')) !== false) {
             $currentUrl .= '?idSite=' . $idSite;
         }
 
-        $urlToRedirect = Piwik_Common::getRequestVar('url', $currentUrl, 'string');
-        $urlToRedirect = Piwik_Common::unsanitizeInputValue($urlToRedirect);
+        $urlToRedirect = Common::getRequestVar('url', $currentUrl, 'string');
+        $urlToRedirect = Common::unsanitizeInputValue($urlToRedirect);
 
         $this->authenticateAndRedirect($login, $password, false, $urlToRedirect);
     }
@@ -289,8 +289,8 @@ class Piwik_Login_Controller extends Piwik_Controller
     {
         $errorMessage = null;
 
-        $login = Piwik_Common::getRequestVar('login', '');
-        $resetToken = Piwik_Common::getRequestVar('resetToken', '');
+        $login = Common::getRequestVar('login', '');
+        $resetToken = Common::getRequestVar('resetToken', '');
 
         try {
             // get password reset info & user info
diff --git a/plugins/MobileMessaging/API.php b/plugins/MobileMessaging/API.php
index d8b88da705..52073993b0 100644
--- a/plugins/MobileMessaging/API.php
+++ b/plugins/MobileMessaging/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_MobileMessaging
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The MobileMessaging API lets you manage and access all the MobileMessaging plugin features including :
@@ -399,7 +399,7 @@ class Piwik_MobileMessaging_API
     {
         Piwik_SetOption(
             $user . Piwik_MobileMessaging::USER_SETTINGS_POSTFIX_OPTION,
-            Piwik_Common::json_encode($settings)
+            Common::json_encode($settings)
         );
     }
 
@@ -426,7 +426,7 @@ class Piwik_MobileMessaging_API
         if (empty($userSettings)) {
             $userSettings = array();
         } else {
-            $userSettings = Piwik_Common::json_decode($userSettings, true);
+            $userSettings = Common::json_decode($userSettings, true);
         }
 
         return $userSettings;
diff --git a/plugins/MobileMessaging/Controller.php b/plugins/MobileMessaging/Controller.php
index d720b62236..84893cb172 100644
--- a/plugins/MobileMessaging/Controller.php
+++ b/plugins/MobileMessaging/Controller.php
@@ -10,7 +10,7 @@
  */
 
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once PIWIK_INCLUDE_PATH . '/plugins/UserCountry/functions.php';
 
@@ -49,7 +49,7 @@ class Piwik_MobileMessaging_Controller extends Piwik_Controller_Admin
 
         // construct the list of countries from the lang files
         $countries = array();
-        foreach (Piwik_Common::getCountriesList() as $countryCode => $continentCode) {
+        foreach (Common::getCountriesList() as $countryCode => $continentCode) {
             if (isset(Piwik_MobileMessaging_CountryCallingCodes::$countryCallingCodes[$countryCode])) {
                 $countries[$countryCode] =
                     array(
@@ -60,7 +60,7 @@ class Piwik_MobileMessaging_Controller extends Piwik_Controller_Admin
         }
         $view->countries = $countries;
 
-        $view->defaultCountry = Piwik_Common::getCountry(
+        $view->defaultCountry = Common::getCountry(
             Piwik_LanguagesManager::getLanguageCodeForCurrentUser(),
             true,
             Piwik_IP::getIpFromHeader()
diff --git a/plugins/MobileMessaging/ReportRenderer/Sms.php b/plugins/MobileMessaging/ReportRenderer/Sms.php
index 39d10cad2f..c871e6632a 100644
--- a/plugins/MobileMessaging/ReportRenderer/Sms.php
+++ b/plugins/MobileMessaging/ReportRenderer/Sms.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_MobileMessaging_ReportRenderer
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 
 /**
@@ -55,7 +55,7 @@ class Piwik_MobileMessaging_ReportRenderer_Sms extends Piwik_ReportRenderer
 
     public function renderReport($processedReport)
     {
-        $isGoalPluginEnabled = Piwik_Common::isGoalPluginEnabled();
+        $isGoalPluginEnabled = Common::isGoalPluginEnabled();
         $prettyDate = $processedReport['prettyDate'];
         $reportData = $processedReport['reportData'];
 
diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php
index 1060129b8a..433263ebb8 100755
--- a/plugins/MultiSites/API.php
+++ b/plugins/MultiSites/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_MultiSites
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The MultiSites API lets you request the key metrics (visits, page views, revenue) for all Websites in Piwik.
@@ -363,7 +363,7 @@ class Piwik_MultiSites_API
             }
         } else {
             $revenueMetric = '';
-            if (Piwik_Common::isGoalPluginEnabled()) {
+            if (Common::isGoalPluginEnabled()) {
                 $revenueMetric = Piwik_Goals_Archiver::getRecordName(self::GOAL_REVENUE_METRIC);
             }
 
@@ -431,7 +431,7 @@ class Piwik_MultiSites_API
     public static function getApiMetrics($enhanced)
     {
         $metrics = self::$baseMetrics;
-        if (Piwik_Common::isGoalPluginEnabled()) {
+        if (Common::isGoalPluginEnabled()) {
             // goal revenue metric
             $metrics[self::GOAL_REVENUE_METRIC] = array(
                 self::METRIC_TRANSLATION_KEY        => 'Goals_ColumnRevenue',
diff --git a/plugins/MultiSites/Controller.php b/plugins/MultiSites/Controller.php
index c63820a6a7..a6634df68f 100644
--- a/plugins/MultiSites/Controller.php
+++ b/plugins/MultiSites/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_MultiSites
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -46,10 +46,10 @@ class Piwik_MultiSites_Controller extends Piwik_Controller
     public function getSitesInfo($isWidgetized = false)
     {
         Piwik::checkUserHasSomeViewAccess();
-        $displayRevenueColumn = Piwik_Common::isGoalPluginEnabled();
+        $displayRevenueColumn = Common::isGoalPluginEnabled();
 
-        $date = Piwik_Common::getRequestVar('date', 'today');
-        $period = Piwik_Common::getRequestVar('period', 'day');
+        $date = Common::getRequestVar('date', 'today');
+        $period = Common::getRequestVar('period', 'day');
         $siteIds = Piwik_SitesManager_API::getInstance()->getSitesIdWithAtLeastViewAccess();
         list($minDate, $maxDate) = $this->getMinMaxDateAcrossWebsites($siteIds);
 
@@ -210,7 +210,7 @@ class Piwik_MultiSites_Controller extends Piwik_Controller
     public function getEvolutionGraph($fetch = false, $columns = false)
     {
         if (empty($columns)) {
-            $columns = Piwik_Common::getRequestVar('columns');
+            $columns = Common::getRequestVar('columns');
         }
         $api = "API.get";
 
diff --git a/plugins/Overlay/Controller.php b/plugins/Overlay/Controller.php
index 0754731d49..e08218a23f 100644
--- a/plugins/Overlay/Controller.php
+++ b/plugins/Overlay/Controller.php
@@ -1,6 +1,6 @@
 <?php
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -30,8 +30,8 @@ class Piwik_Overlay_Controller extends Piwik_Controller
         $this->setGeneralVariablesView($view);
 
         $view->idSite = $this->idSite;
-        $view->date = Piwik_Common::getRequestVar('date', 'today');
-        $view->period = Piwik_Common::getRequestVar('period', 'day');
+        $view->date = Common::getRequestVar('date', 'today');
+        $view->period = Common::getRequestVar('period', 'day');
 
         $view->ssl = Piwik::isHttps();
 
@@ -41,14 +41,14 @@ class Piwik_Overlay_Controller extends Piwik_Controller
     /** Render the area left of the iframe */
     public function renderSidebar()
     {
-        $idSite = Piwik_Common::getRequestVar('idSite');
-        $period = Piwik_Common::getRequestVar('period');
-        $date = Piwik_Common::getRequestVar('date');
-        $currentUrl = Piwik_Common::getRequestVar('currentUrl');
-        $currentUrl = Piwik_Common::unsanitizeInputValue($currentUrl);
+        $idSite = Common::getRequestVar('idSite');
+        $period = Common::getRequestVar('period');
+        $date = Common::getRequestVar('date');
+        $currentUrl = Common::getRequestVar('currentUrl');
+        $currentUrl = Common::unsanitizeInputValue($currentUrl);
 
         $normalizedCurrentUrl = Piwik_Tracker_Action::excludeQueryParametersFromUrl($currentUrl, $idSite);
-        $normalizedCurrentUrl = Piwik_Common::unsanitizeInputValue($normalizedCurrentUrl);
+        $normalizedCurrentUrl = Common::unsanitizeInputValue($normalizedCurrentUrl);
 
         // load the appropriate row of the page urls report using the label filter
         Piwik_Actions_ArchivingHelper::reloadConfig();
@@ -118,7 +118,7 @@ class Piwik_Overlay_Controller extends Piwik_Controller
      */
     public function startOverlaySession()
     {
-        $idSite = Piwik_Common::getRequestVar('idsite', 0, 'int');
+        $idSite = Common::getRequestVar('idsite', 0, 'int');
         Piwik::checkUserHasViewAccess($idSite);
 
         $sitesManager = Piwik_SitesManager_API::getInstance();
@@ -147,7 +147,7 @@ class Piwik_Overlay_Controller extends Piwik_Controller
 					var urlToRedirect = window.location.hash.substr(1);
 					var urlToRedirectWithoutPrefix = removeUrlPrefix(urlToRedirect);
 					
-					var knownUrls = ' . Piwik_Common::json_encode($urls) . ';
+					var knownUrls = ' . Common::json_encode($urls) . ';
 					for (var i = 0; i < knownUrls.length; i++) {
 						var testUrl = removeUrlPrefix(knownUrls[i]);
 						if (urlToRedirectWithoutPrefix.substr(0, testUrl.length) == testUrl) {
@@ -186,11 +186,11 @@ class Piwik_Overlay_Controller extends Piwik_Controller
      */
     public function showErrorWrongDomain()
     {
-        $idSite = Piwik_Common::getRequestVar('idSite', 0, 'int');
+        $idSite = Common::getRequestVar('idSite', 0, 'int');
         Piwik::checkUserHasViewAccess($idSite);
 
-        $url = Piwik_Common::getRequestVar('url', '');
-        $url = Piwik_Common::unsanitizeInputValue($url);
+        $url = Common::getRequestVar('url', '');
+        $url = Common::unsanitizeInputValue($url);
 
         $message = Piwik_Translate('Overlay_RedirectUrlError', array($url, "\n"));
         $message = nl2br(htmlentities($message));
diff --git a/plugins/PDFReports/API.php b/plugins/PDFReports/API.php
index 5a048ed1dc..f63225450c 100644
--- a/plugins/PDFReports/API.php
+++ b/plugins/PDFReports/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_PDFReports
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The PDFReports API lets you manage Scheduled Email reports, as well as generate, download or email any existing report.
@@ -99,13 +99,13 @@ class Piwik_PDFReports_API
         $reports = self::validateRequestedReports($idSite, $reportType, $reports);
 
         $db = Zend_Registry::get('db');
-        $idReport = $db->fetchOne("SELECT max(idreport) + 1 FROM " . Piwik_Common::prefixTable('report'));
+        $idReport = $db->fetchOne("SELECT max(idreport) + 1 FROM " . Common::prefixTable('report'));
 
         if ($idReport == false) {
             $idReport = 1;
         }
 
-        $db->insert(Piwik_Common::prefixTable('report'),
+        $db->insert(Common::prefixTable('report'),
             array(
                  'idreport'    => $idReport,
                  'idsite'      => $idSite,
@@ -158,7 +158,7 @@ class Piwik_PDFReports_API
         // validation of requested reports
         $reports = self::validateRequestedReports($idSite, $reportType, $reports);
 
-        Zend_Registry::get('db')->update(Piwik_Common::prefixTable('report'),
+        Zend_Registry::get('db')->update(Common::prefixTable('report'),
             array(
                  'description' => $description,
                  'idsegment'   => $idSegment,
@@ -186,7 +186,7 @@ class Piwik_PDFReports_API
         $report = reset($pdfReports);
         Piwik::checkUserIsSuperUserOrTheUser($report['login']);
 
-        Zend_Registry::get('db')->update(Piwik_Common::prefixTable('report'),
+        Zend_Registry::get('db')->update(Common::prefixTable('report'),
             array(
                  'deleted' => 1,
             ),
@@ -235,7 +235,7 @@ class Piwik_PDFReports_API
         }
         if (!empty($idSite)) {
             Piwik::checkUserHasViewAccess($idSite);
-            $sqlWhere .= " AND " . Piwik_Common::prefixTable('site') . ".idsite = ?";
+            $sqlWhere .= " AND " . Common::prefixTable('site') . ".idsite = ?";
             $bind[] = $idSite;
         }
         if (!empty($idReport)) {
@@ -249,8 +249,8 @@ class Piwik_PDFReports_API
 
         // Joining with the site table to work around pre-1.3 where reports could still be linked to a deleted site
         $reports = Piwik_FetchAll("SELECT *
-								FROM " . Piwik_Common::prefixTable('report') . "
-									JOIN " . Piwik_Common::prefixTable('site') . "
+								FROM " . Common::prefixTable('report') . "
+									JOIN " . Common::prefixTable('site') . "
 									USING (idsite)
 								WHERE deleted = 0
 									$sqlWhere", $bind);
@@ -263,10 +263,10 @@ class Piwik_PDFReports_API
 
         foreach ($reports as &$report) {
             // decode report parameters
-            $report['parameters'] = Piwik_Common::json_decode($report['parameters'], true);
+            $report['parameters'] = Common::json_decode($report['parameters'], true);
 
             // decode report list
-            $report['reports'] = Piwik_Common::json_decode($report['reports'], true);
+            $report['reports'] = Common::json_decode($report['reports'], true);
         }
 
         // static cache
@@ -318,7 +318,7 @@ class Piwik_PDFReports_API
         }
 
         // override and/or validate report parameters
-        $report['parameters'] = Piwik_Common::json_decode(
+        $report['parameters'] = Common::json_decode(
             self::validateReportParameters($reportType, empty($parameters) ? $report['parameters'] : $parameters),
             true
         );
@@ -336,7 +336,7 @@ class Piwik_PDFReports_API
 
         // the report will be rendered with the first 23 rows and will aggregate other rows in a summary row
         // 23 rows table fits in one portrait page
-        $initialFilterTruncate = Piwik_Common::getRequestVar('filter_truncate', false);
+        $initialFilterTruncate = Common::getRequestVar('filter_truncate', false);
         $_GET['filter_truncate'] = self::REPORT_TRUNCATE;
 
         $prettyDate = null;
@@ -536,7 +536,7 @@ class Piwik_PDFReports_API
         );
 
         // Update flag in DB
-        Zend_Registry::get('db')->update(Piwik_Common::prefixTable('report'),
+        Zend_Registry::get('db')->update(Common::prefixTable('report'),
             array('ts_last_sent' => Piwik_Date::now()->getDatetime()),
             "idreport = " . $report['idreport']
         );
@@ -591,7 +591,7 @@ class Piwik_PDFReports_API
         // delegate report parameter validation
         Piwik_PostEvent(self::VALIDATE_PARAMETERS_EVENT, array(&$parameters, $notificationInfo));
 
-        return Piwik_Common::json_encode($parameters);
+        return Common::json_encode($parameters);
     }
 
     private static function validateAndTruncateDescription(&$description)
@@ -620,7 +620,7 @@ class Piwik_PDFReports_API
             }
         }
 
-        return Piwik_Common::json_encode($requestedReports);
+        return Common::json_encode($requestedReports);
     }
 
     private static function validateCommonReportAttributes($period, $hour, &$description, &$idSegment, $reportType, $reportFormat)
diff --git a/plugins/PDFReports/Controller.php b/plugins/PDFReports/Controller.php
index 1203246a1e..2f8a5a9d83 100644
--- a/plugins/PDFReports/Controller.php
+++ b/plugins/PDFReports/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_PDFReports
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -62,7 +62,7 @@ class Piwik_PDFReports_Controller extends Piwik_Controller
             }
         }
         $view->reports = $reports;
-        $view->reportsJSON = Piwik_Common::json_encode($reportsById);
+        $view->reportsJSON = Common::json_encode($reportsById);
 
         $view->downloadOutputType = Piwik_PDFReports_API::OUTPUT_INLINE;
 
diff --git a/plugins/PDFReports/PDFReports.php b/plugins/PDFReports/PDFReports.php
index a7bc831e80..9332020010 100644
--- a/plugins/PDFReports/PDFReports.php
+++ b/plugins/PDFReports/PDFReports.php
@@ -9,7 +9,7 @@
  * @package Piwik_PDFReports
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -504,13 +504,13 @@ class Piwik_PDFReports extends Piwik_Plugin
 
     public function deleteUserReport($userLogin)
     {
-        Piwik_Query('DELETE FROM ' . Piwik_Common::prefixTable('report') . ' WHERE login = ?', $userLogin);
+        Piwik_Query('DELETE FROM ' . Common::prefixTable('report') . ' WHERE login = ?', $userLogin);
     }
 
     public function install()
     {
         $queries[] = '
-                CREATE TABLE `' . Piwik_Common::prefixTable('report') . '` (
+                CREATE TABLE `' . Common::prefixTable('report') . '` (
 					`idreport` INT(11) NOT NULL AUTO_INCREMENT,
 					`idsite` INTEGER(11) NOT NULL,
 					`login` VARCHAR(100) NOT NULL,
diff --git a/plugins/PrivacyManager/Controller.php b/plugins/PrivacyManager/Controller.php
index 3791d830c7..049f3a1ec8 100644
--- a/plugins/PrivacyManager/Controller.php
+++ b/plugins/PrivacyManager/Controller.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -27,11 +27,11 @@ class Piwik_PrivacyManager_Controller extends Piwik_Controller_Admin
         Piwik::checkUserIsSuperUser();
         if ($_SERVER["REQUEST_METHOD"] == "POST") {
             $this->checkTokenInUrl();
-            switch (Piwik_Common::getRequestVar('form')) {
+            switch (Common::getRequestVar('form')) {
                 case("formMaskLength"):
-                    $this->handlePluginState(Piwik_Common::getRequestVar("anonymizeIPEnable", 0));
+                    $this->handlePluginState(Common::getRequestVar("anonymizeIPEnable", 0));
                     $trackerConfig = Config::getInstance()->Tracker;
-                    $trackerConfig['ip_address_mask_length'] = Piwik_Common::getRequestVar("maskLength", 1);
+                    $trackerConfig['ip_address_mask_length'] = Common::getRequestVar("maskLength", 1);
                     Config::getInstance()->Tracker = $trackerConfig;
                     Config::getInstance()->forceSave();
                     break;
@@ -60,22 +60,22 @@ class Piwik_PrivacyManager_Controller extends Piwik_Controller_Admin
         $settings = array();
 
         // delete logs settings
-        $settings['delete_logs_enable'] = Piwik_Common::getRequestVar("deleteEnable", 0);
-        $settings['delete_logs_schedule_lowest_interval'] = Piwik_Common::getRequestVar("deleteLowestInterval", 7);
-        $settings['delete_logs_older_than'] = ((int)Piwik_Common::getRequestVar("deleteOlderThan", 180) < 1) ?
-            1 : Piwik_Common::getRequestVar("deleteOlderThan", 180);
+        $settings['delete_logs_enable'] = Common::getRequestVar("deleteEnable", 0);
+        $settings['delete_logs_schedule_lowest_interval'] = Common::getRequestVar("deleteLowestInterval", 7);
+        $settings['delete_logs_older_than'] = ((int)Common::getRequestVar("deleteOlderThan", 180) < 1) ?
+            1 : Common::getRequestVar("deleteOlderThan", 180);
 
         // delete reports settings
-        $settings['delete_reports_enable'] = Piwik_Common::getRequestVar("deleteReportsEnable", 0);
-        $deleteReportsOlderThan = Piwik_Common::getRequestVar("deleteReportsOlderThan", 3);
+        $settings['delete_reports_enable'] = Common::getRequestVar("deleteReportsEnable", 0);
+        $deleteReportsOlderThan = Common::getRequestVar("deleteReportsOlderThan", 3);
         $settings['delete_reports_older_than'] = $deleteReportsOlderThan < 3 ? 3 : $deleteReportsOlderThan;
-        $settings['delete_reports_keep_basic_metrics'] = Piwik_Common::getRequestVar("deleteReportsKeepBasic", 0);
-        $settings['delete_reports_keep_day_reports'] = Piwik_Common::getRequestVar("deleteReportsKeepDay", 0);
-        $settings['delete_reports_keep_week_reports'] = Piwik_Common::getRequestVar("deleteReportsKeepWeek", 0);
-        $settings['delete_reports_keep_month_reports'] = Piwik_Common::getRequestVar("deleteReportsKeepMonth", 0);
-        $settings['delete_reports_keep_year_reports'] = Piwik_Common::getRequestVar("deleteReportsKeepYear", 0);
-        $settings['delete_reports_keep_range_reports'] = Piwik_Common::getRequestVar("deleteReportsKeepRange", 0);
-        $settings['delete_reports_keep_segment_reports'] = Piwik_Common::getRequestVar("deleteReportsKeepSegments", 0);
+        $settings['delete_reports_keep_basic_metrics'] = Common::getRequestVar("deleteReportsKeepBasic", 0);
+        $settings['delete_reports_keep_day_reports'] = Common::getRequestVar("deleteReportsKeepDay", 0);
+        $settings['delete_reports_keep_week_reports'] = Common::getRequestVar("deleteReportsKeepWeek", 0);
+        $settings['delete_reports_keep_month_reports'] = Common::getRequestVar("deleteReportsKeepMonth", 0);
+        $settings['delete_reports_keep_year_reports'] = Common::getRequestVar("deleteReportsKeepYear", 0);
+        $settings['delete_reports_keep_range_reports'] = Common::getRequestVar("deleteReportsKeepRange", 0);
+        $settings['delete_reports_keep_segment_reports'] = Common::getRequestVar("deleteReportsKeepSegments", 0);
 
         $settings['delete_logs_max_rows_per_query'] = Piwik_PrivacyManager::DEFAULT_MAX_ROWS_PER_QUERY;
 
@@ -91,7 +91,7 @@ class Piwik_PrivacyManager_Controller extends Piwik_Controller_Admin
         Piwik::checkUserIsSuperUser();
         $view = new Piwik_View('@PrivacyManager/getDatabaseSize');
 
-        $forceEstimate = Piwik_Common::getRequestVar('forceEstimate', 0);
+        $forceEstimate = Common::getRequestVar('forceEstimate', 0);
         $view->dbStats = $this->getDeleteDBSizeEstimate($getSettingsFromQuery = true, $forceEstimate);
         $view->language = Piwik_LanguagesManager::getLanguageCodeForCurrentUser();
 
@@ -137,7 +137,7 @@ class Piwik_PrivacyManager_Controller extends Piwik_Controller_Admin
 
         // if the request isn't a POST, redirect to index
         if ($_SERVER["REQUEST_METHOD"] != "POST"
-            && !Piwik_Common::isPhpCliMode()
+            && !Common::isPhpCliMode()
         ) {
             return $this->redirectToIndex('PrivacyManager', 'privacySettings');
         }
diff --git a/plugins/PrivacyManager/LogDataPurger.php b/plugins/PrivacyManager/LogDataPurger.php
index 6b9fc829ef..692d8435e2 100755
--- a/plugins/PrivacyManager/LogDataPurger.php
+++ b/plugins/PrivacyManager/LogDataPurger.php
@@ -9,7 +9,7 @@
  * @package Piwik_PrivacyManager
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Purges the log_visit, log_conversion and related tables of old visit data.
@@ -71,7 +71,7 @@ class Piwik_PrivacyManager_LogDataPurger
         $where = "WHERE idvisit <= ?";
         foreach ($logTables as $logTable) {
             // deleting from log_action must be handled differently, so we do it later
-            if ($logTable != Piwik_Common::prefixTable('log_action')) {
+            if ($logTable != Common::prefixTable('log_action')) {
                 Piwik_DeleteAllRows($logTable, $where, $this->maxRowsToDeletePerQuery, array($maxIdVisit));
             }
         }
@@ -105,7 +105,7 @@ class Piwik_PrivacyManager_LogDataPurger
         if (!empty($maxIdVisit)) {
             foreach ($this->getDeleteTableLogTables() as $table) {
                 // getting an estimate for log_action is not supported since it can take too long
-                if ($table != Piwik_Common::prefixTable('log_action')) {
+                if ($table != Common::prefixTable('log_action')) {
                     $rowCount = $this->getLogTableDeleteCount($table, $maxIdVisit);
                     if ($rowCount > 0) {
                         $result[$table] = $rowCount;
@@ -146,7 +146,7 @@ class Piwik_PrivacyManager_LogDataPurger
      */
     private function getDeleteIdVisitOffset()
     {
-        $logVisit = Piwik_Common::prefixTable("log_visit");
+        $logVisit = Common::prefixTable("log_visit");
 
         // get max idvisit
         $maxIdVisit = Piwik_FetchOne("SELECT MAX(idvisit) FROM $logVisit");
@@ -175,7 +175,7 @@ class Piwik_PrivacyManager_LogDataPurger
 
     private function createTempTable()
     {
-        $sql = "CREATE TEMPORARY TABLE " . Piwik_Common::prefixTable(self::TEMP_TABLE_NAME) . " (
+        $sql = "CREATE TEMPORARY TABLE " . Common::prefixTable(self::TEMP_TABLE_NAME) . " (
 					idaction INT(11),
 					PRIMARY KEY (idaction)
 				)";
@@ -190,7 +190,7 @@ class Piwik_PrivacyManager_LogDataPurger
         $result = array();
         foreach ($tables as $table) {
             $idCol = $idColumns[$table];
-            $result[$table] = Piwik_FetchOne("SELECT MAX($idCol) FROM " . Piwik_Common::prefixTable($table));
+            $result[$table] = Piwik_FetchOne("SELECT MAX($idCol) FROM " . Common::prefixTable($table));
         }
 
         return $result;
@@ -198,14 +198,14 @@ class Piwik_PrivacyManager_LogDataPurger
 
     private function insertActionsToKeep($maxIds, $olderThan = true)
     {
-        $tempTableName = Piwik_Common::prefixTable(self::TEMP_TABLE_NAME);
+        $tempTableName = Common::prefixTable(self::TEMP_TABLE_NAME);
 
         $idColumns = $this->getTableIdColumns();
         foreach ($this->getIdActionColumns() as $table => $columns) {
             $idCol = $idColumns[$table];
 
             foreach ($columns as $col) {
-                $select = "SELECT $col FROM " . Piwik_Common::prefixTable($table) . " WHERE $idCol >= ? AND $idCol < ?";
+                $select = "SELECT $col FROM " . Common::prefixTable($table) . " WHERE $idCol >= ? AND $idCol < ?";
                 $sql = "INSERT IGNORE INTO $tempTableName $select";
 
                 if ($olderThan) {
@@ -213,7 +213,7 @@ class Piwik_PrivacyManager_LogDataPurger
                     $finish = $maxIds[$table];
                 } else {
                     $start = $maxIds[$table];
-                    $finish = Piwik_FetchOne("SELECT MAX($idCol) FROM " . Piwik_Common::prefixTable($table));
+                    $finish = Piwik_FetchOne("SELECT MAX($idCol) FROM " . Common::prefixTable($table));
                 }
 
                 Piwik_SegmentedQuery($sql, $start, $finish, self::$selectSegmentSize);
@@ -231,11 +231,11 @@ class Piwik_PrivacyManager_LogDataPurger
     private function lockLogTables()
     {
         Piwik_LockTables(
-            $readLocks = Piwik_Common::prefixTables('log_conversion',
+            $readLocks = Common::prefixTables('log_conversion',
                 'log_link_visit_action',
                 'log_visit',
                 'log_conversion_item'),
-            $writeLocks = Piwik_Common::prefixTables('log_action')
+            $writeLocks = Common::prefixTables('log_action')
         );
     }
 
@@ -246,7 +246,7 @@ class Piwik_PrivacyManager_LogDataPurger
 
     private function deleteUnusedActions()
     {
-        list($logActionTable, $tempTableName) = Piwik_Common::prefixTables("log_action", self::TEMP_TABLE_NAME);
+        list($logActionTable, $tempTableName) = Common::prefixTables("log_action", self::TEMP_TABLE_NAME);
 
         $deleteSql = "DELETE LOW_PRIORITY QUICK IGNORE $logActionTable
 						FROM $logActionTable
@@ -294,12 +294,12 @@ class Piwik_PrivacyManager_LogDataPurger
     // let's hardcode, since these are not dynamically created tables
     public static function getDeleteTableLogTables()
     {
-        $result = Piwik_Common::prefixTables('log_conversion',
+        $result = Common::prefixTables('log_conversion',
             'log_link_visit_action',
             'log_visit',
             'log_conversion_item');
         if (Piwik::isLockPrivilegeGranted()) {
-            $result[] = Piwik_Common::prefixTable('log_action');
+            $result[] = Common::prefixTable('log_action');
         }
         return $result;
     }
diff --git a/plugins/PrivacyManager/PrivacyManager.php b/plugins/PrivacyManager/PrivacyManager.php
index 39381d8cd2..9553275c8a 100644
--- a/plugins/PrivacyManager/PrivacyManager.php
+++ b/plugins/PrivacyManager/PrivacyManager.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see plugins/PrivacyManager/LogDataPurger.php
@@ -330,7 +330,7 @@ class Piwik_PrivacyManager extends Piwik_Plugin
         $metricsToKeep = self::getMetricsToKeep();
 
         // convert goal metric names to correct archive names
-        if (Piwik_Common::isGoalPluginEnabled()) {
+        if (Common::isGoalPluginEnabled()) {
             $goalMetricsToKeep = self::getGoalMetricsToKeep();
 
             $maxGoalId = self::getMaxGoalId();
@@ -387,7 +387,7 @@ class Piwik_PrivacyManager extends Piwik_Plugin
 
     private static function getMaxGoalId()
     {
-        return Piwik_FetchOne("SELECT MAX(idgoal) FROM " . Piwik_Common::prefixTable('goal'));
+        return Piwik_FetchOne("SELECT MAX(idgoal) FROM " . Common::prefixTable('goal'));
     }
 }
 
diff --git a/plugins/Provider/Provider.php b/plugins/Provider/Provider.php
index ab06434fe4..b785229214 100644
--- a/plugins/Provider/Provider.php
+++ b/plugins/Provider/Provider.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_Provider
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -61,7 +61,7 @@ class Piwik_Provider extends Piwik_Plugin
     function install()
     {
         // add column hostname / hostname ext in the visit table
-        $query = "ALTER IGNORE TABLE `" . Piwik_Common::prefixTable('log_visit') . "` ADD `location_provider` VARCHAR( 100 ) NULL";
+        $query = "ALTER IGNORE TABLE `" . Common::prefixTable('log_visit') . "` ADD `location_provider` VARCHAR( 100 ) NULL";
 
         // if the column already exist do not throw error. Could be installed twice...
         try {
@@ -77,7 +77,7 @@ class Piwik_Provider extends Piwik_Plugin
     function uninstall()
     {
         // add column hostname / hostname ext in the visit table
-        $query = "ALTER TABLE `" . Piwik_Common::prefixTable('log_visit') . "` DROP `location_provider`";
+        $query = "ALTER TABLE `" . Common::prefixTable('log_visit') . "` DROP `location_provider`";
         Piwik_Exec($query);
     }
 
@@ -127,7 +127,7 @@ class Piwik_Provider extends Piwik_Plugin
         if ($hostnameDomain == 'uk') {
             $hostnameDomain = 'gb';
         }
-        if (array_key_exists($hostnameDomain, Piwik_Common::getCountriesList())) {
+        if (array_key_exists($hostnameDomain, Common::getCountriesList())) {
             $visitorInfo['location_country'] = $hostnameDomain;
         }
     }
diff --git a/plugins/Provider/functions.php b/plugins/Provider/functions.php
index 1c36f8a929..36dc488a99 100644
--- a/plugins/Provider/functions.php
+++ b/plugins/Provider/functions.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_Provider
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Return hostname portion of a domain name
@@ -66,7 +66,7 @@ function Piwik_Provider_getPrettyProviderName( $in )
 {
     $providerName = Piwik_getHostnameName($in);
 
-    $prettyNames = Piwik_Common::getProviderNames();
+    $prettyNames = Common::getProviderNames();
 
     if(is_array($prettyNames)
         && array_key_exists(strtolower($providerName), $prettyNames))
diff --git a/plugins/Proxy/Controller.php b/plugins/Proxy/Controller.php
index cac2e2505e..b97e61471c 100644
--- a/plugins/Proxy/Controller.php
+++ b/plugins/Proxy/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_Proxy
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Controller for proxy services
@@ -32,7 +32,7 @@ class Piwik_Proxy_Controller extends Piwik_Controller
         Piwik::checkUserHasSomeViewAccess();
 
         $view = new Piwik_View('@Proxy/exportImageWindow');
-        $view->imageData = 'data:image/png;base64,' . Piwik_Common::getRequestVar('imageData', self::TRANSPARENT_PNG_PIXEL, 'string', $_POST);
+        $view->imageData = 'data:image/png;base64,' . Common::getRequestVar('imageData', self::TRANSPARENT_PNG_PIXEL, 'string', $_POST);
         echo $view->render();
     }
 
@@ -52,13 +52,13 @@ class Piwik_Proxy_Controller extends Piwik_Controller
     {
         Piwik::checkUserHasSomeViewAccess();
 
-        $rawData = Piwik_Common::getRequestVar('imageData', '', 'string', $_POST);
+        $rawData = Common::getRequestVar('imageData', '', 'string', $_POST);
 
         // returns false if any illegal characters in input
         $data = base64_decode($rawData);
         if ($data !== false) {
             // check for PNG header
-            if (Piwik_Common::substr($data, 0, 8) === "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a") {
+            if (Common::substr($data, 0, 8) === "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a") {
                 header('Content-Type: image/png');
 
                 // more robust validation (if available)
@@ -119,7 +119,7 @@ class Piwik_Proxy_Controller extends Piwik_Controller
      */
     public function redirect()
     {
-        $url = Piwik_Common::getRequestVar('url', '', 'string', $_GET);
+        $url = Common::getRequestVar('url', '', 'string', $_GET);
 
         // validate referrer
         $referrer = Piwik_Url::getReferer();
@@ -135,7 +135,7 @@ class Piwik_Proxy_Controller extends Piwik_Controller
         if (!self::isPiwikUrl($url)) {
             Piwik::checkUserHasSomeViewAccess();
         }
-        if (!Piwik_Common::isLookLikeUrl($url)) {
+        if (!Common::isLookLikeUrl($url)) {
             die('Please check the &url= parameter: it should to be a valid URL');
         }
         @header('Content-Type: text/html; charset=utf-8');
diff --git a/plugins/Referers/API.php b/plugins/Referers/API.php
index f71d3c2a45..39ad371b43 100644
--- a/plugins/Referers/API.php
+++ b/plugins/Referers/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_Referers
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The Referrers API lets you access reports about Websites, Search engines, Keywords, Campaigns used to access your website.
@@ -78,13 +78,13 @@ class Piwik_Referers_API
         if ($idSubtable !== false) {
             $result = false;
             switch ($idSubtable) {
-                case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE:
+                case Common::REFERER_TYPE_SEARCH_ENGINE:
                     $result = $this->getKeywords($idSite, $period, $date, $segment);
                     break;
-                case Piwik_Common::REFERER_TYPE_WEBSITE:
+                case Common::REFERER_TYPE_WEBSITE:
                     $result = $this->getWebsites($idSite, $period, $date, $segment);
                     break;
-                case Piwik_Common::REFERER_TYPE_CAMPAIGN:
+                case Common::REFERER_TYPE_CAMPAIGN:
                     $result = $this->getCampaigns($idSite, $period, $date, $segment);
                     break;
                 default: // invalid idSubtable, return whole report
@@ -507,7 +507,7 @@ class Piwik_Referers_API
     {
         foreach ($dataTable->getRows() as $row) {
             $typeReferrer = $row->getColumn('label');
-            if ($typeReferrer != Piwik_Common::REFERER_TYPE_DIRECT_ENTRY) {
+            if ($typeReferrer != Common::REFERER_TYPE_DIRECT_ENTRY) {
                 if (!$expanded) // if we don't want the expanded datatable, then don't do any extra queries
                 {
                     $row->c[Piwik_DataTable_Row::DATATABLE_ASSOCIATED] = $typeReferrer;
diff --git a/plugins/Referers/Archiver.php b/plugins/Referers/Archiver.php
index 1ebab392d6..8dd540a478 100644
--- a/plugins/Referers/Archiver.php
+++ b/plugins/Referers/Archiver.php
@@ -1,5 +1,5 @@
 <?php
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -75,14 +75,14 @@ class Piwik_Referers_Archiver extends Piwik_PluginsArchiver
     protected function makeRefererTypeNonEmpty(&$row)
     {
         if (empty($row['referer_type'])) {
-            $row['referer_type'] = Piwik_Common::REFERER_TYPE_DIRECT_ENTRY;
+            $row['referer_type'] = Common::REFERER_TYPE_DIRECT_ENTRY;
         }
     }
 
     protected function aggregateVisit($row)
     {
         switch ($row['referer_type']) {
-            case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE:
+            case Common::REFERER_TYPE_SEARCH_ENGINE:
                 if (empty($row['referer_keyword'])) {
                     $row['referer_keyword'] = Piwik_Referers_API::LABEL_KEYWORD_NOT_DEFINED;
                 }
@@ -94,7 +94,7 @@ class Piwik_Referers_Archiver extends Piwik_PluginsArchiver
                 $keywordsDataArray->sumMetricsVisitsPivot($row['referer_keyword'], $row['referer_name'], $row);
                 break;
 
-            case Piwik_Common::REFERER_TYPE_WEBSITE:
+            case Common::REFERER_TYPE_WEBSITE:
                 $this->getDataArray(self::WEBSITES_RECORD_NAME)->sumMetricsVisits($row['referer_name'], $row);
                 $this->getDataArray(self::WEBSITES_RECORD_NAME)->sumMetricsVisitsPivot($row['referer_name'], $row['referer_url'], $row);
 
@@ -104,14 +104,14 @@ class Piwik_Referers_Archiver extends Piwik_PluginsArchiver
                 }
                 break;
 
-            case Piwik_Common::REFERER_TYPE_CAMPAIGN:
+            case Common::REFERER_TYPE_CAMPAIGN:
                 if (!empty($row['referer_keyword'])) {
                     $this->getDataArray(self::CAMPAIGNS_RECORD_NAME)->sumMetricsVisitsPivot($row['referer_name'], $row['referer_keyword'], $row);
                 }
                 $this->getDataArray(self::CAMPAIGNS_RECORD_NAME)->sumMetricsVisits($row['referer_name'], $row);
                 break;
 
-            case Piwik_Common::REFERER_TYPE_DIRECT_ENTRY:
+            case Common::REFERER_TYPE_DIRECT_ENTRY:
                 // direct entry are aggregated below in $this->metricsByType array
                 break;
 
@@ -155,7 +155,7 @@ class Piwik_Referers_Archiver extends Piwik_PluginsArchiver
     {
         $skipAggregateByType = false;
         switch ($row['referer_type']) {
-            case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE:
+            case Common::REFERER_TYPE_SEARCH_ENGINE:
                 if (empty($row['referer_keyword'])) {
                     $row['referer_keyword'] = Piwik_Referers_API::LABEL_KEYWORD_NOT_DEFINED;
                 }
@@ -164,18 +164,18 @@ class Piwik_Referers_Archiver extends Piwik_PluginsArchiver
                 $this->getDataArray(self::KEYWORDS_RECORD_NAME)->sumMetricsGoals($row['referer_keyword'], $row);
                 break;
 
-            case Piwik_Common::REFERER_TYPE_WEBSITE:
+            case Common::REFERER_TYPE_WEBSITE:
                 $this->getDataArray(self::WEBSITES_RECORD_NAME)->sumMetricsGoals($row['referer_name'], $row);
                 break;
 
-            case Piwik_Common::REFERER_TYPE_CAMPAIGN:
+            case Common::REFERER_TYPE_CAMPAIGN:
                 if (!empty($row['referer_keyword'])) {
                     $this->getDataArray(self::CAMPAIGNS_RECORD_NAME)->sumMetricsGoalsPivot($row['referer_name'], $row['referer_keyword'], $row);
                 }
                 $this->getDataArray(self::CAMPAIGNS_RECORD_NAME)->sumMetricsGoals($row['referer_name'], $row);
                 break;
 
-            case Piwik_Common::REFERER_TYPE_DIRECT_ENTRY:
+            case Common::REFERER_TYPE_DIRECT_ENTRY:
                 // Direct entry, no sub dimension
                 break;
 
diff --git a/plugins/Referers/Controller.php b/plugins/Referers/Controller.php
index cc3d253f29..df592528c1 100644
--- a/plugins/Referers/Controller.php
+++ b/plugins/Referers/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_Referers
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -21,7 +21,7 @@ class Piwik_Referers_Controller extends Piwik_Controller
     {
         $view = new Piwik_View('@Referers/index');
 
-        $view->graphEvolutionReferers = $this->getEvolutionGraph(true, Piwik_Common::REFERER_TYPE_DIRECT_ENTRY, array('nb_visits'));
+        $view->graphEvolutionReferers = $this->getEvolutionGraph(true, Common::REFERER_TYPE_DIRECT_ENTRY, array('nb_visits'));
         $view->nameGraphEvolutionReferers = 'ReferersgetEvolutionGraph';
 
         // building the referers summary report
@@ -51,8 +51,8 @@ class Piwik_Referers_Controller extends Piwik_Controller
         // calculate evolution for visit metrics & distinct metrics
         list($lastPeriodDate, $ignore) = Piwik_Period_Range::getLastDate();
         if ($lastPeriodDate !== false) {
-            $date = Piwik_Common::getRequestVar('date');
-            $period = Piwik_Common::getRequestVar('period');
+            $date = Common::getRequestVar('date');
+            $period = Common::getRequestVar('period');
 
             $prettyDate = self::getPrettyDate($date, $period);
             $prettyLastPeriodDate = self::getPrettyDate($lastPeriodDate, $period);
@@ -67,10 +67,10 @@ class Piwik_Referers_Controller extends Piwik_Controller
         }
 
         // sparkline for the historical data of the above values
-        $view->urlSparklineSearchEngines = $this->getReferrerUrlSparkline(Piwik_Common::REFERER_TYPE_SEARCH_ENGINE);
-        $view->urlSparklineDirectEntry = $this->getReferrerUrlSparkline(Piwik_Common::REFERER_TYPE_DIRECT_ENTRY);
-        $view->urlSparklineWebsites = $this->getReferrerUrlSparkline(Piwik_Common::REFERER_TYPE_WEBSITE);
-        $view->urlSparklineCampaigns = $this->getReferrerUrlSparkline(Piwik_Common::REFERER_TYPE_CAMPAIGN);
+        $view->urlSparklineSearchEngines = $this->getReferrerUrlSparkline(Common::REFERER_TYPE_SEARCH_ENGINE);
+        $view->urlSparklineDirectEntry = $this->getReferrerUrlSparkline(Common::REFERER_TYPE_DIRECT_ENTRY);
+        $view->urlSparklineWebsites = $this->getReferrerUrlSparkline(Common::REFERER_TYPE_WEBSITE);
+        $view->urlSparklineCampaigns = $this->getReferrerUrlSparkline(Common::REFERER_TYPE_CAMPAIGN);
 
         // sparklines for the evolution of the distinct keywords count/websites count/ etc
         $view->urlSparklineDistinctSearchEngines = $this->getUrlSparkline('getLastDistinctSearchEnginesGraph');
@@ -144,17 +144,17 @@ class Piwik_Referers_Controller extends Piwik_Controller
         $view->setLimit(10);
         $view->setColumnsToDisplay(array('label', 'nb_visits'));
 
-        $idSubtable = Piwik_Common::getRequestVar('idSubtable', false);
+        $idSubtable = Common::getRequestVar('idSubtable', false);
         $labelColumnTitle = Piwik_Translate('Referers_ColumnRefererType');
         if ($idSubtable !== false) {
             switch ($idSubtable) {
-                case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE:
+                case Common::REFERER_TYPE_SEARCH_ENGINE:
                     $labelColumnTitle = Piwik_Translate('Referers_ColumnSearchEngine');
                     break;
-                case Piwik_Common::REFERER_TYPE_WEBSITE:
+                case Common::REFERER_TYPE_WEBSITE:
                     $labelColumnTitle = Piwik_Translate('Referers_ColumnWebsite');
                     break;
-                case Piwik_Common::REFERER_TYPE_CAMPAIGN:
+                case Common::REFERER_TYPE_CAMPAIGN:
                     $labelColumnTitle = Piwik_Translate('Referers_ColumnCampaign');
                     break;
                 default:
@@ -207,16 +207,16 @@ class Piwik_Referers_Controller extends Piwik_Controller
         // get singular label for referrer type
         $indexTranslation = '';
         switch ($referrerType) {
-            case Piwik_Common::REFERER_TYPE_DIRECT_ENTRY:
+            case Common::REFERER_TYPE_DIRECT_ENTRY:
                 $indexTranslation = 'Referers_DirectEntry';
                 break;
-            case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE:
+            case Common::REFERER_TYPE_SEARCH_ENGINE:
                 $indexTranslation = 'Referers_ColumnKeyword';
                 break;
-            case Piwik_Common::REFERER_TYPE_WEBSITE:
+            case Common::REFERER_TYPE_WEBSITE:
                 $indexTranslation = 'Referers_ColumnWebsite';
                 break;
-            case Piwik_Common::REFERER_TYPE_CAMPAIGN:
+            case Common::REFERER_TYPE_CAMPAIGN:
                 $indexTranslation = 'Referers_ColumnCampaign';
                 break;
             default:
@@ -419,7 +419,7 @@ class Piwik_Referers_Controller extends Piwik_Controller
     protected function getReferersVisitorsByType($date = false)
     {
         if ($date === false) {
-            $date = Piwik_Common::getRequestVar('date', false);
+            $date = Common::getRequestVar('date', false);
         }
 
         // we disable the queued filters because here we want to get the visits coming from search engines
@@ -429,10 +429,10 @@ class Piwik_Referers_Controller extends Piwik_Controller
             "Referers.getRefererType", array('disable_queued_filters' => '1', 'date' => $date));
 
         $nameToColumnId = array(
-            'visitorsFromSearchEngines' => Piwik_Common::REFERER_TYPE_SEARCH_ENGINE,
-            'visitorsFromDirectEntry'   => Piwik_Common::REFERER_TYPE_DIRECT_ENTRY,
-            'visitorsFromWebsites'      => Piwik_Common::REFERER_TYPE_WEBSITE,
-            'visitorsFromCampaigns'     => Piwik_Common::REFERER_TYPE_CAMPAIGN,
+            'visitorsFromSearchEngines' => Common::REFERER_TYPE_SEARCH_ENGINE,
+            'visitorsFromDirectEntry'   => Common::REFERER_TYPE_DIRECT_ENTRY,
+            'visitorsFromWebsites'      => Common::REFERER_TYPE_WEBSITE,
+            'visitorsFromCampaigns'     => Common::REFERER_TYPE_CAMPAIGN,
         );
         $return = array();
         foreach ($nameToColumnId as $nameVar => $columnId) {
@@ -447,10 +447,10 @@ class Piwik_Referers_Controller extends Piwik_Controller
     }
 
     protected $referrerTypeToLabel = array(
-        Piwik_Common::REFERER_TYPE_DIRECT_ENTRY  => 'Referers_DirectEntry',
-        Piwik_Common::REFERER_TYPE_SEARCH_ENGINE => 'Referers_SearchEngines',
-        Piwik_Common::REFERER_TYPE_WEBSITE       => 'Referers_Websites',
-        Piwik_Common::REFERER_TYPE_CAMPAIGN      => 'Referers_Campaigns',
+        Common::REFERER_TYPE_DIRECT_ENTRY  => 'Referers_DirectEntry',
+        Common::REFERER_TYPE_SEARCH_ENGINE => 'Referers_SearchEngines',
+        Common::REFERER_TYPE_WEBSITE       => 'Referers_Websites',
+        Common::REFERER_TYPE_CAMPAIGN      => 'Referers_Campaigns',
     );
 
     public function getEvolutionGraph($fetch = false, $typeReferer = false, array $columns = array())
@@ -461,14 +461,14 @@ class Piwik_Referers_Controller extends Piwik_Controller
 
         // configure displayed columns
         if (empty($columns)) {
-            $columns = Piwik_Common::getRequestVar('columns');
+            $columns = Common::getRequestVar('columns');
             $columns = Piwik::getArrayFromApiParameter($columns);
         }
         $columns = !is_array($columns) ? array($columns) : $columns;
         $view->setColumnsToDisplay($columns);
 
         // configure selectable columns
-        if (Piwik_Common::getRequestVar('period', false) == 'day') {
+        if (Common::getRequestVar('period', false) == 'day') {
             $selectable = array('nb_visits', 'nb_uniq_visitors', 'nb_actions');
         } else {
             $selectable = array('nb_visits', 'nb_actions');
@@ -476,7 +476,7 @@ class Piwik_Referers_Controller extends Piwik_Controller
         $view->setSelectableColumns($selectable);
 
         // configure displayed rows
-        $visibleRows = Piwik_Common::getRequestVar('rows', false);
+        $visibleRows = Common::getRequestVar('rows', false);
         if ($visibleRows !== false) {
             // this happens when the row picker has been used
             $visibleRows = Piwik::getArrayFromApiParameter($visibleRows);
@@ -486,7 +486,7 @@ class Piwik_Referers_Controller extends Piwik_Controller
         } else {
             // use $typeReferer as default
             if ($typeReferer === false) {
-                $typeReferer = Piwik_Common::getRequestVar('typeReferer', false);
+                $typeReferer = Common::getRequestVar('typeReferer', false);
             }
             $label = self::getTranslatedReferrerTypeLabel($typeReferer);
             $total = Piwik_Translate('General_Total');
diff --git a/plugins/Referers/functions.php b/plugins/Referers/functions.php
index e22f28cd1a..7ba0b6f776 100644
--- a/plugins/Referers/functions.php
+++ b/plugins/Referers/functions.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_Referers
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Returns path component from a URL
@@ -18,7 +18,7 @@ use Piwik\Core\Piwik_Common;
  */
 function Piwik_getPathFromUrl($url)
 {
-    $path = Piwik_Common::getPathAndQueryFromUrl($url);
+    $path = Common::getPathAndQueryFromUrl($url);
     if (empty($path)) {
         return 'index';
     }
@@ -114,7 +114,7 @@ function Piwik_getSocialsLogoFromUrl($domain)
  */
 function Piwik_getSearchEngineUrlFromName($name)
 {
-    $searchEngineNames = Piwik_Common::getSearchEngineNames();
+    $searchEngineNames = Common::getSearchEngineNames();
     if (isset($searchEngineNames[$name])) {
         $url = 'http://' . $searchEngineNames[$name];
     } else {
@@ -182,7 +182,7 @@ function Piwik_getSearchEngineUrlFromUrlAndKeyword($url, $keyword)
     if ($keyword === Piwik_Referers_API::LABEL_KEYWORD_NOT_DEFINED) {
         return 'http://piwik.org/faq/general/#faq_144';
     }
-    $searchEngineUrls = Piwik_Common::getSearchEngineUrls();
+    $searchEngineUrls = Common::getSearchEngineUrls();
     $keyword = urlencode($keyword);
     $keyword = str_replace(urlencode('+'), urlencode(' '), $keyword);
     $path = @$searchEngineUrls[Piwik_getSearchEngineHostPathFromUrl($url)][2];
@@ -217,16 +217,16 @@ function Piwik_getRefererTypeLabel($label)
 {
     $indexTranslation = '';
     switch ($label) {
-        case Piwik_Common::REFERER_TYPE_DIRECT_ENTRY:
+        case Common::REFERER_TYPE_DIRECT_ENTRY:
             $indexTranslation = 'Referers_DirectEntry';
             break;
-        case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE:
+        case Common::REFERER_TYPE_SEARCH_ENGINE:
             $indexTranslation = 'Referers_SearchEngines';
             break;
-        case Piwik_Common::REFERER_TYPE_WEBSITE:
+        case Common::REFERER_TYPE_WEBSITE:
             $indexTranslation = 'Referers_Websites';
             break;
-        case Piwik_Common::REFERER_TYPE_CAMPAIGN:
+        case Common::REFERER_TYPE_CAMPAIGN:
             $indexTranslation = 'Referers_Campaigns';
             break;
         default:
@@ -246,10 +246,10 @@ function Piwik_getRefererTypeLabel($label)
 function Piwik_getRefererTypeFromShortName($name)
 {
     $map = array(
-        Piwik_Common::REFERER_TYPE_SEARCH_ENGINE => 'search',
-        Piwik_Common::REFERER_TYPE_WEBSITE       => 'website',
-        Piwik_Common::REFERER_TYPE_DIRECT_ENTRY  => 'direct',
-        Piwik_Common::REFERER_TYPE_CAMPAIGN      => 'campaign',
+        Common::REFERER_TYPE_SEARCH_ENGINE => 'search',
+        Common::REFERER_TYPE_WEBSITE       => 'website',
+        Common::REFERER_TYPE_DIRECT_ENTRY  => 'direct',
+        Common::REFERER_TYPE_CAMPAIGN      => 'campaign',
     );
     if (isset($map[$name])) {
         return $map[$name];
diff --git a/plugins/SEO/Controller.php b/plugins/SEO/Controller.php
index 00abd8337e..9e9945de83 100644
--- a/plugins/SEO/Controller.php
+++ b/plugins/SEO/Controller.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_SEO
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_SEO
@@ -17,16 +17,16 @@ class Piwik_SEO_Controller extends Piwik_Controller
 {
     function getRank()
     {
-        $idSite = Piwik_Common::getRequestVar('idSite');
+        $idSite = Common::getRequestVar('idSite');
         $site = new Piwik_Site($idSite);
 
-        $url = urldecode(Piwik_Common::getRequestVar('url', '', 'string'));
+        $url = urldecode(Common::getRequestVar('url', '', 'string'));
 
         if (!empty($url) && strpos($url, 'http://') !== 0 && strpos($url, 'https://') !== 0) {
             $url = 'http://' . $url;
         }
 
-        if (empty($url) || !Piwik_Common::isLookLikeUrl($url)) {
+        if (empty($url) || !Common::isLookLikeUrl($url)) {
             $url = $site->getMainUrl();
         }
 
diff --git a/plugins/SEO/MajesticClient.php b/plugins/SEO/MajesticClient.php
index 4834a66e8c..2e0b2ee5e6 100644
--- a/plugins/SEO/MajesticClient.php
+++ b/plugins/SEO/MajesticClient.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_SEO
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Client for Majestic SEO's HTTP API.
@@ -64,7 +64,7 @@ class Piwik_SEO_MajesticClient
             'referrer_domains_count' => false
         );
 
-        $apiResponse = Piwik_Common::json_decode($apiResponse, $assoc = true);
+        $apiResponse = Common::json_decode($apiResponse, $assoc = true);
         if (!empty($apiResponse)
             && !empty($apiResponse['Data'])
         ) {
diff --git a/plugins/SegmentEditor/API.php b/plugins/SegmentEditor/API.php
index 2d5aa2b714..7d90bee310 100644
--- a/plugins/SegmentEditor/API.php
+++ b/plugins/SegmentEditor/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_SegmentEditor
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The SegmentEditor API lets you add, update, delete custom Segments, and list saved segments.a
@@ -36,7 +36,7 @@ class Piwik_SegmentEditor_API
     protected function checkSegmentValue($definition, $idSite)
     {
         // unsanitize so we don't record the HTML entitied segment
-        $definition = Piwik_Common::unsanitizeInputValue($definition);
+        $definition = Common::unsanitizeInputValue($definition);
         $definition = str_replace("#", '%23', $definition); // hash delimiter
         $definition = str_replace("'", '%27', $definition); // not encoded in JS
         $definition = str_replace("&", '%26', $definition);
@@ -134,7 +134,7 @@ class Piwik_SegmentEditor_API
 
         $segment = $this->getSegmentOrFail($idSegment);
         $db = Zend_Registry::get('db');
-        $db->delete(Piwik_Common::prefixTable('segment'), 'idsegment = ' . $idSegment);
+        $db->delete(Common::prefixTable('segment'), 'idsegment = ' . $idSegment);
         return true;
     }
 
@@ -171,7 +171,7 @@ class Piwik_SegmentEditor_API
         );
 
         $db = Zend_Registry::get('db');
-        $db->update(Piwik_Common::prefixTable("segment"),
+        $db->update(Common::prefixTable("segment"),
             $bind,
             "idsegment = $idSegment"
         );
@@ -209,7 +209,7 @@ class Piwik_SegmentEditor_API
             'ts_created'         => Piwik_Date::now()->getDatetime(),
             'deleted'            => 0,
         );
-        $db->insert(Piwik_Common::prefixTable("segment"), $bind);
+        $db->insert(Common::prefixTable("segment"), $bind);
         return $db->lastInsertId();
     }
 
@@ -227,7 +227,7 @@ class Piwik_SegmentEditor_API
             throw new Exception("idSegment should be numeric.");
         }
         $segment = Zend_Registry::get('db')->fetchRow("SELECT * " .
-                                                    " FROM " . Piwik_Common::prefixTable("segment") .
+                                                    " FROM " . Common::prefixTable("segment") .
                                                     " WHERE idsegment = ?", $idSegment);
 
         if (empty($segment)) {
@@ -278,7 +278,7 @@ class Piwik_SegmentEditor_API
 
         // Query
         $sql = "SELECT * " .
-                " FROM " . Piwik_Common::prefixTable("segment") .
+                " FROM " . Common::prefixTable("segment") .
                 " WHERE ($whereIdSite enable_only_idsite = 0)
                         AND  (enable_all_users = 1 OR login = ?)
                         AND deleted = 0
diff --git a/plugins/SegmentEditor/Controller.php b/plugins/SegmentEditor/Controller.php
index 8fc5b6871a..b48374deb1 100644
--- a/plugins/SegmentEditor/Controller.php
+++ b/plugins/SegmentEditor/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_SegmentEditor
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_SegmentEditor
@@ -20,7 +20,7 @@ class Piwik_SegmentEditor_Controller extends Piwik_Controller
     public function getSelector()
     {
         $view = new Piwik_View('@SegmentEditor/getSelector');
-        $idSite = Piwik_Common::getRequestVar('idSite');
+        $idSite = Common::getRequestVar('idSite');
         $this->setGeneralVariablesView($view);
         $segments = Piwik_API_API::getInstance()->getSegmentsMetadata($idSite);
 
@@ -40,12 +40,12 @@ class Piwik_SegmentEditor_Controller extends Piwik_Controller
 
         $savedSegments = Piwik_SegmentEditor_API::getInstance()->getAll($idSite);
         foreach($savedSegments as &$savedSegment) {
-            $savedSegment['name'] = Piwik_Common::sanitizeInputValue($savedSegment['name']);
+            $savedSegment['name'] = Common::sanitizeInputValue($savedSegment['name']);
         }
-        $view->savedSegmentsJson = Piwik_Common::json_encode($savedSegments);
+        $view->savedSegmentsJson = Common::json_encode($savedSegments);
         $view->authorizedToCreateSegments = !Piwik::isUserIsAnonymous();
 
-        $view->segmentTranslations = Piwik_Common::json_encode($this->getTranslations());
+        $view->segmentTranslations = Common::json_encode($this->getTranslations());
         $out = $view->render();
         echo $out;
     }
diff --git a/plugins/SegmentEditor/SegmentEditor.php b/plugins/SegmentEditor/SegmentEditor.php
index 4dd4f163ac..41b79dcd1d 100644
--- a/plugins/SegmentEditor/SegmentEditor.php
+++ b/plugins/SegmentEditor/SegmentEditor.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_SegmentEditor
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_SegmentEditor
@@ -68,7 +68,7 @@ class Piwik_SegmentEditor extends Piwik_Plugin
 
     public function install()
     {
-        $queries[] = 'CREATE TABLE `' . Piwik_Common::prefixTable('segment') . '` (
+        $queries[] = 'CREATE TABLE `' . Common::prefixTable('segment') . '` (
 					`idsegment` INT(11) NOT NULL AUTO_INCREMENT,
 					`name` VARCHAR(255) NOT NULL,
 					`definition` TEXT NOT NULL,
diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php
index 69a72e92cd..19a8db3d2e 100644
--- a/plugins/SitesManager/API.php
+++ b/plugins/SitesManager/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_SitesManager
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The SitesManager API gives you full control on Websites in Piwik (create, update and delete), and many methods to retrieve websites based on various attributes.
@@ -68,7 +68,7 @@ class Piwik_SitesManager_API
         if (empty($piwikUrl)) {
             $piwikUrl = Piwik_Url::getCurrentUrlWithoutFileName();
         }
-        $piwikUrl = Piwik_Common::sanitizeInputValues($piwikUrl);
+        $piwikUrl = Common::sanitizeInputValues($piwikUrl);
 
         $htmlEncoded = Piwik::getJavascriptCode($idSite, $piwikUrl);
         $htmlEncoded = str_replace(array('<br>', '<br />', '<br/>'), '', $htmlEncoded);
@@ -85,7 +85,7 @@ class Piwik_SitesManager_API
         $group = trim($group);
 
         $sites = Zend_Registry::get('db')->fetchAll("SELECT *
-													FROM " . Piwik_Common::prefixTable("site") . "
+													FROM " . Common::prefixTable("site") . "
 													WHERE `group` = ?", $group);
         return $sites;
     }
@@ -99,7 +99,7 @@ class Piwik_SitesManager_API
     public function getSitesGroups()
     {
         Piwik::checkUserIsSuperUser();
-        $groups = Zend_Registry::get('db')->fetchAll("SELECT DISTINCT `group` FROM " . Piwik_Common::prefixTable("site"));
+        $groups = Zend_Registry::get('db')->fetchAll("SELECT DISTINCT `group` FROM " . Common::prefixTable("site"));
         $cleanedGroups = array();
         foreach ($groups as $group) {
             $cleanedGroups[] = $group['group'];
@@ -119,7 +119,7 @@ class Piwik_SitesManager_API
     {
         Piwik::checkUserHasViewAccess($idSite);
         $site = Zend_Registry::get('db')->fetchRow("SELECT *
-													FROM " . Piwik_Common::prefixTable("site") . "
+													FROM " . Common::prefixTable("site") . "
 													WHERE idsite = ?", $idSite);
         return $site;
     }
@@ -135,7 +135,7 @@ class Piwik_SitesManager_API
     {
         $db = Zend_Registry::get('db');
         $result = $db->fetchAll("SELECT url
-								FROM " . Piwik_Common::prefixTable("site_url") . "
+								FROM " . Common::prefixTable("site_url") . "
 								WHERE idsite = ?", $idSite);
         $urls = array();
         foreach ($result as $url) {
@@ -167,7 +167,7 @@ class Piwik_SitesManager_API
      */
     private function getSitesId()
     {
-        $result = Piwik_FetchAll("SELECT idsite FROM " . Piwik_Common::prefixTable('site'));
+        $result = Piwik_FetchAll("SELECT idsite FROM " . Common::prefixTable('site'));
         $idSites = array();
         foreach ($result as $idSite) {
             $idSites[] = $idSite['idsite'];
@@ -183,7 +183,7 @@ class Piwik_SitesManager_API
     public function getAllSites()
     {
         Piwik::checkUserIsSuperUser();
-        $sites = Zend_Registry::get('db')->fetchAll("SELECT * FROM " . Piwik_Common::prefixTable("site"));
+        $sites = Zend_Registry::get('db')->fetchAll("SELECT * FROM " . Common::prefixTable("site"));
         $return = array();
         foreach ($sites as $site) {
             $return[$site['idsite']] = $site;
@@ -226,10 +226,10 @@ class Piwik_SitesManager_API
             SELECT
                 idsite
             FROM
-                " . Piwik_Common::prefixTable('site') . " s
+                " . Common::prefixTable('site') . " s
             WHERE EXISTS (
                 SELECT 1 
-                FROM " . Piwik_Common::prefixTable('log_visit') . " v
+                FROM " . Common::prefixTable('log_visit') . " v
                 WHERE v.idsite = s.idsite
                 AND visit_last_action_time > ?
                 AND visit_last_action_time <= ?
@@ -351,7 +351,7 @@ class Piwik_SitesManager_API
 
         $db = Zend_Registry::get('db');
         $sites = $db->fetchAll("SELECT *
-								FROM " . Piwik_Common::prefixTable("site") . "
+								FROM " . Common::prefixTable("site") . "
 								WHERE idsite IN (" . implode(", ", $idSites) . ")
 								ORDER BY idsite ASC $limit");
         return $sites;
@@ -380,22 +380,22 @@ class Piwik_SitesManager_API
         if (Piwik::isUserIsSuperUser()) {
             $ids = Zend_Registry::get('db')->fetchAll(
                 'SELECT idsite
-                FROM ' . Piwik_Common::prefixTable('site') . '
+                FROM ' . Common::prefixTable('site') . '
 					WHERE (main_url = ? OR main_url = ?) ' .
                     'UNION
                     SELECT idsite
-                    FROM ' . Piwik_Common::prefixTable('site_url') . '
+                    FROM ' . Common::prefixTable('site_url') . '
 					WHERE (url = ? OR url = ?) ', array($url, $urlBis, $url, $urlBis));
         } else {
             $login = Piwik::getCurrentUserLogin();
             $ids = Zend_Registry::get('db')->fetchAll(
                 'SELECT idsite
-                FROM ' . Piwik_Common::prefixTable('site') . '
+                FROM ' . Common::prefixTable('site') . '
 					WHERE (main_url = ? OR main_url = ?)' .
                     'AND idsite IN (' . Piwik_Access::getSqlAccessSite('idsite') . ') ' .
                     'UNION
                     SELECT idsite
-                    FROM ' . Piwik_Common::prefixTable('site_url') . '
+                    FROM ' . Common::prefixTable('site_url') . '
 					WHERE (url = ? OR url = ?)' .
                     'AND idsite IN (' . Piwik_Access::getSqlAccessSite('idsite') . ')',
                 array($url, $urlBis, $login, $url, $urlBis, $login));
@@ -418,8 +418,8 @@ class Piwik_SitesManager_API
         $timezones = array_unique($timezones);
         $ids = Zend_Registry::get('db')->fetchAll(
             'SELECT idsite
-            FROM ' . Piwik_Common::prefixTable('site') . '
-					WHERE timezone IN (' . Piwik_Common::getSqlStringFieldsArray($timezones) . ')
+            FROM ' . Common::prefixTable('site') . '
+					WHERE timezone IN (' . Common::getSqlStringFieldsArray($timezones) . ')
 					ORDER BY idsite ASC',
             $timezones);
         $return = array();
@@ -525,7 +525,7 @@ class Piwik_SitesManager_API
             $bind['group'] = "";
         }
 
-        $db->insert(Piwik_Common::prefixTable("site"), $bind);
+        $db->insert(Common::prefixTable("site"), $bind);
 
         $idSite = $db->lastInsertId();
 
@@ -569,13 +569,13 @@ class Piwik_SitesManager_API
 
         $db = Zend_Registry::get('db');
 
-        $db->query("DELETE FROM " . Piwik_Common::prefixTable("site") . "
+        $db->query("DELETE FROM " . Common::prefixTable("site") . "
 					WHERE idsite = ?", $idSite);
 
-        $db->query("DELETE FROM " . Piwik_Common::prefixTable("site_url") . "
+        $db->query("DELETE FROM " . Common::prefixTable("site_url") . "
 					WHERE idsite = ?", $idSite);
 
-        $db->query("DELETE FROM " . Piwik_Common::prefixTable("access") . "
+        $db->query("DELETE FROM " . Common::prefixTable("access") . "
 					WHERE idsite = ?", $idSite);
 
         // we do not delete logs here on purpose (you can run these queries on the log_ tables to delete all data)
@@ -1033,7 +1033,7 @@ class Piwik_SitesManager_API
 
         $bind['name'] = $siteName;
         $db = Zend_Registry::get('db');
-        $db->update(Piwik_Common::prefixTable("site"),
+        $db->update(Common::prefixTable("site"),
             $bind,
             "idsite = $idSite"
         );
@@ -1161,7 +1161,7 @@ class Piwik_SitesManager_API
     public function getUniqueSiteTimezones()
     {
         Piwik::checkUserIsSuperUser();
-        $results = Piwik_FetchAll("SELECT distinct timezone FROM " . Piwik_Common::prefixTable('site'));
+        $results = Piwik_FetchAll("SELECT distinct timezone FROM " . Common::prefixTable('site'));
         $timezones = array();
         foreach ($results as $result) {
             $timezones[] = $result['timezone'];
@@ -1178,7 +1178,7 @@ class Piwik_SitesManager_API
         if (count($urls) != 0) {
             $db = Zend_Registry::get('db');
             foreach ($urls as $url) {
-                $db->insert(Piwik_Common::prefixTable("site_url"), array(
+                $db->insert(Common::prefixTable("site_url"), array(
                                                                         'idsite' => $idSite,
                                                                         'url'    => $url
                                                                    )
@@ -1193,7 +1193,7 @@ class Piwik_SitesManager_API
     private function deleteSiteAliasUrls($idsite)
     {
         $db = Zend_Registry::get('db');
-        $db->query("DELETE FROM " . Piwik_Common::prefixTable("site_url") . "
+        $db->query("DELETE FROM " . Common::prefixTable("site_url") . "
 					WHERE idsite = ?", $idsite);
     }
 
@@ -1222,7 +1222,7 @@ class Piwik_SitesManager_API
      */
     private function isValidUrl($url)
     {
-        return Piwik_Common::isLookLikeUrl($url);
+        return Common::isLookLikeUrl($url);
     }
 
     /**
@@ -1310,7 +1310,7 @@ class Piwik_SitesManager_API
                 $url = 'http://' . $url;
             }
             $url = trim($url);
-            $url = Piwik_Common::sanitizeInputValue($url);
+            $url = Common::sanitizeInputValue($url);
         }
         $urls = array_unique($urls);
         return $urls;
@@ -1339,7 +1339,7 @@ class Piwik_SitesManager_API
             $where = 'OR  s.idsite = ?';
         }
         $sites = $db->fetchAll("SELECT idsite, name, main_url
-								FROM " . Piwik_Common::prefixTable('site') . " s
+								FROM " . Common::prefixTable('site') . " s
 								WHERE (		s.name like ? 
 										OR 	s.main_url like ?
 										 $where ) 
diff --git a/plugins/SitesManager/Controller.php b/plugins/SitesManager/Controller.php
index 3a73b32d60..eca7970aca 100644
--- a/plugins/SitesManager/Controller.php
+++ b/plugins/SitesManager/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_SitesManager
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -44,10 +44,10 @@ class Piwik_SitesManager_Controller extends Piwik_Controller_Admin
 
         $timezones = Piwik_SitesManager_API::getInstance()->getTimezonesList();
         $view->timezoneSupported = Piwik::isTimezoneSupportEnabled();
-        $view->timezones = Piwik_Common::json_encode($timezones);
+        $view->timezones = Common::json_encode($timezones);
         $view->defaultTimezone = Piwik_SitesManager_API::getInstance()->getDefaultTimezone();
 
-        $view->currencies = Piwik_Common::json_encode(Piwik_SitesManager_API::getInstance()->getCurrencyList());
+        $view->currencies = Common::json_encode(Piwik_SitesManager_API::getInstance()->getCurrencyList());
         $view->defaultCurrency = Piwik_SitesManager_API::getInstance()->getDefaultCurrency();
 
         $view->utcTime = Piwik_Date::now()->getDatetime();
@@ -69,7 +69,7 @@ class Piwik_SitesManager_Controller extends Piwik_Controller_Admin
 
         $view->currentIpAddress = Piwik_IP::getIpFromHeader();
 
-        $view->showAddSite = (boolean)Piwik_Common::getRequestVar('showaddsite', false);
+        $view->showAddSite = (boolean)Common::getRequestVar('showaddsite', false);
 
         $this->setBasicVariablesView($view);
         echo $view->render();
@@ -80,19 +80,19 @@ class Piwik_SitesManager_Controller extends Piwik_Controller_Admin
      */
     public function setGlobalSettings()
     {
-        $response = new Piwik_API_ResponseBuilder(Piwik_Common::getRequestVar('format'));
+        $response = new Piwik_API_ResponseBuilder(Common::getRequestVar('format'));
 
         try {
             $this->checkTokenInUrl();
-            $timezone = Piwik_Common::getRequestVar('timezone', false);
-            $excludedIps = Piwik_Common::getRequestVar('excludedIps', false);
-            $excludedQueryParameters = Piwik_Common::getRequestVar('excludedQueryParameters', false);
-            $excludedUserAgents = Piwik_Common::getRequestVar('excludedUserAgents', false);
-            $currency = Piwik_Common::getRequestVar('currency', false);
-            $searchKeywordParameters = Piwik_Common::getRequestVar('searchKeywordParameters', $default = "");
-            $searchCategoryParameters = Piwik_Common::getRequestVar('searchCategoryParameters', $default = "");
-            $enableSiteUserAgentExclude = Piwik_Common::getRequestVar('enableSiteUserAgentExclude', $default = 0);
-            $keepURLFragments = Piwik_Common::getRequestVar('keepURLFragments', $default = 0);
+            $timezone = Common::getRequestVar('timezone', false);
+            $excludedIps = Common::getRequestVar('excludedIps', false);
+            $excludedQueryParameters = Common::getRequestVar('excludedQueryParameters', false);
+            $excludedUserAgents = Common::getRequestVar('excludedUserAgents', false);
+            $currency = Common::getRequestVar('currency', false);
+            $searchKeywordParameters = Common::getRequestVar('searchKeywordParameters', $default = "");
+            $searchCategoryParameters = Common::getRequestVar('searchCategoryParameters', $default = "");
+            $enableSiteUserAgentExclude = Common::getRequestVar('enableSiteUserAgentExclude', $default = 0);
+            $keepURLFragments = Common::getRequestVar('keepURLFragments', $default = 0);
 
             $api = Piwik_SitesManager_API::getInstance();
             $api->setDefaultTimezone($timezone);
@@ -117,7 +117,7 @@ class Piwik_SitesManager_Controller extends Piwik_Controller_Admin
      */
     function displayJavascriptCode()
     {
-        $idSite = Piwik_Common::getRequestVar('idSite');
+        $idSite = Common::getRequestVar('idSite');
         Piwik::checkUserHasViewAccess($idSite);
         $jsTag = Piwik::getJavascriptCode($idSite, Piwik_Url::getCurrentUrlWithoutFileName());
         $view = new Piwik_View('@SitesManager/displayJavascriptCode');
@@ -147,10 +147,10 @@ class Piwik_SitesManager_Controller extends Piwik_Controller_Admin
     function displayAlternativeTagsHelp()
     {
         $view = new Piwik_View('@SitesManager/displayAlternativeTagsHelp');
-        $view->idSite = Piwik_Common::getRequestVar('idSite');
-        $url = Piwik_Common::getRequestVar('piwikUrl', '', 'string');
+        $view->idSite = Common::getRequestVar('idSite');
+        $url = Common::getRequestVar('piwikUrl', '', 'string');
         if (empty($url)
-            || !Piwik_Common::isLookLikeUrl($url)
+            || !Common::isLookLikeUrl($url)
         ) {
             $url = $view->piwikUrl;
         }
@@ -161,7 +161,7 @@ class Piwik_SitesManager_Controller extends Piwik_Controller_Admin
 
     function getSitesForAutocompleter()
     {
-        $pattern = Piwik_Common::getRequestVar('term');
+        $pattern = Common::getRequestVar('term');
         $sites = Piwik_SitesManager_API::getInstance()->getPatternMatchSites($pattern);
         $pattern = str_replace('%', '', $pattern);
         if (!count($sites)) {
@@ -187,6 +187,6 @@ class Piwik_SitesManager_Controller extends Piwik_Controller_Admin
         }
 
         Piwik_DataTable_Renderer_Json::sendHeaderJSON();
-        print Piwik_Common::json_encode($results);
+        print Common::json_encode($results);
     }
 }
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php
index 4e4d0ab038..2b35a6e271 100644
--- a/plugins/Transitions/API.php
+++ b/plugins/Transitions/API.php
@@ -9,7 +9,7 @@
  * @package Piwik_Transitions
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @package Piwik_Transitions
@@ -128,7 +128,7 @@ class Piwik_Transitions_API
         switch ($actionType) {
             case 'url':
                 $originalActionName = $actionName;
-                $actionName = Piwik_Common::unsanitizeInputValue($actionName);
+                $actionName = Common::unsanitizeInputValue($actionName);
                 $id = $actionsPlugin->getIdActionFromSegment($actionName, 'idaction_url', Piwik_SegmentExpression::MATCH_EQUAL, 'pageUrl');
 
                 if ($id < 0) {
@@ -343,18 +343,18 @@ class Piwik_Transitions_API
         $rankingQuery->addLabelColumn('referrer_data');
         $selects = array(
             'CASE log_visit.referer_type
-				WHEN ' . Piwik_Common::REFERER_TYPE_DIRECT_ENTRY . ' THEN \'\'
-				WHEN ' . Piwik_Common::REFERER_TYPE_SEARCH_ENGINE . ' THEN log_visit.referer_keyword
-				WHEN ' . Piwik_Common::REFERER_TYPE_WEBSITE . ' THEN log_visit.referer_url
-				WHEN ' . Piwik_Common::REFERER_TYPE_CAMPAIGN . ' THEN CONCAT(log_visit.referer_name, \' \', log_visit.referer_keyword)
+				WHEN ' . Common::REFERER_TYPE_DIRECT_ENTRY . ' THEN \'\'
+				WHEN ' . Common::REFERER_TYPE_SEARCH_ENGINE . ' THEN log_visit.referer_keyword
+				WHEN ' . Common::REFERER_TYPE_WEBSITE . ' THEN log_visit.referer_url
+				WHEN ' . Common::REFERER_TYPE_CAMPAIGN . ' THEN CONCAT(log_visit.referer_name, \' \', log_visit.referer_keyword)
 			END AS `referrer_data`');
 
         // get one limited group per referrer type
         $rankingQuery->partitionResultIntoMultipleGroups('referer_type', array(
-                                                                              Piwik_Common::REFERER_TYPE_DIRECT_ENTRY,
-                                                                              Piwik_Common::REFERER_TYPE_SEARCH_ENGINE,
-                                                                              Piwik_Common::REFERER_TYPE_WEBSITE,
-                                                                              Piwik_Common::REFERER_TYPE_CAMPAIGN
+                                                                              Common::REFERER_TYPE_DIRECT_ENTRY,
+                                                                              Common::REFERER_TYPE_SEARCH_ENGINE,
+                                                                              Common::REFERER_TYPE_WEBSITE,
+                                                                              Common::REFERER_TYPE_CAMPAIGN
                                                                          ));
 
         $type = $this->getColumnTypeSuffix($actionType);
@@ -368,12 +368,12 @@ class Piwik_Transitions_API
 
         foreach ($data as $referrerType => &$subData) {
             $referrerData[$referrerType] = array(Piwik_Metrics::INDEX_NB_VISITS => 0);
-            if ($referrerType != Piwik_Common::REFERER_TYPE_DIRECT_ENTRY) {
+            if ($referrerType != Common::REFERER_TYPE_DIRECT_ENTRY) {
                 $referrerSubData[$referrerType] = array();
             }
 
             foreach ($subData as &$row) {
-                if ($referrerType == Piwik_Common::REFERER_TYPE_SEARCH_ENGINE && empty($row['referrer_data'])) {
+                if ($referrerType == Common::REFERER_TYPE_SEARCH_ENGINE && empty($row['referrer_data'])) {
                     $row['referrer_data'] = Piwik_Referers_API::LABEL_KEYWORD_NOT_DEFINED;
                 }
 
@@ -581,8 +581,8 @@ class Piwik_Transitions_API
         // causes an exception.
         if (count($report['referrers']) == 0) {
             $report['referrers'][] = array(
-                'label'     => $this->getReferrerLabel(Piwik_Common::REFERER_TYPE_DIRECT_ENTRY),
-                'shortName' => Piwik_getRefererTypeLabel(Piwik_Common::REFERER_TYPE_DIRECT_ENTRY),
+                'label'     => $this->getReferrerLabel(Common::REFERER_TYPE_DIRECT_ENTRY),
+                'shortName' => Piwik_getRefererTypeLabel(Common::REFERER_TYPE_DIRECT_ENTRY),
                 'visits'    => 0
             );
         }
@@ -591,13 +591,13 @@ class Piwik_Transitions_API
     private function getReferrerLabel($referrerId)
     {
         switch ($referrerId) {
-            case Piwik_Common::REFERER_TYPE_DIRECT_ENTRY:
+            case Common::REFERER_TYPE_DIRECT_ENTRY:
                 return Piwik_Transitions_Controller::getTranslation('directEntries');
-            case Piwik_Common::REFERER_TYPE_SEARCH_ENGINE:
+            case Common::REFERER_TYPE_SEARCH_ENGINE:
                 return Piwik_Transitions_Controller::getTranslation('fromSearchEngines');
-            case Piwik_Common::REFERER_TYPE_WEBSITE:
+            case Common::REFERER_TYPE_WEBSITE:
                 return Piwik_Transitions_Controller::getTranslation('fromWebsites');
-            case Piwik_Common::REFERER_TYPE_CAMPAIGN:
+            case Common::REFERER_TYPE_CAMPAIGN:
                 return Piwik_Transitions_Controller::getTranslation('fromCampaigns');
             default:
                 return Piwik_Translate('General_Others');
diff --git a/plugins/UserCountry/Controller.php b/plugins/UserCountry/Controller.php
index b6ffad1963..355f771e68 100644
--- a/plugins/UserCountry/Controller.php
+++ b/plugins/UserCountry/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_UserCountry
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -104,7 +104,7 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin
                 $result = Piwik_Http::downloadChunk(
                     $url = Piwik_UserCountry_LocationProvider_GeoIp::GEO_LITE_URL,
                     $outputPath,
-                    $continue = Piwik_Common::getRequestVar('continue', true, 'int')
+                    $continue = Common::getRequestVar('continue', true, 'int')
                 );
 
                 // if the file is done
@@ -121,9 +121,9 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin
                     $result['next_screen'] = $this->getGeoIpUpdaterManageScreen();
                 }
 
-                echo Piwik_Common::json_encode($result);
+                echo Common::json_encode($result);
             } catch (Exception $ex) {
-                echo Piwik_Common::json_encode(array('error' => $ex->getMessage()));
+                echo Common::json_encode(array('error' => $ex->getMessage()));
             }
         }
     }
@@ -190,13 +190,13 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin
                 // the browser so it can download it next
                 $info = $this->getNextMissingDbUrlInfo();
                 if ($info !== false) {
-                    echo Piwik_Common::json_encode($info);
+                    echo Common::json_encode($info);
                     return;
                 } else {
                     echo 1;
                 }
             } catch (Exception $ex) {
-                echo Piwik_Common::json_encode(array('error' => $ex->getMessage()));
+                echo Common::json_encode(array('error' => $ex->getMessage()));
             }
         }
     }
@@ -229,7 +229,7 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin
 
                 // based on the database type (provided by the 'key' query param) determine the
                 // url & output file name
-                $key = Piwik_Common::getRequestVar('key', null, 'string');
+                $key = Common::getRequestVar('key', null, 'string');
                 $url = Piwik_UserCountry_GeoIPAutoUpdater::getConfiguredUrl($key);
 
                 $ext = Piwik_UserCountry_GeoIPAutoUpdater::getGeoIPUrlExtension($url);
@@ -242,7 +242,7 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin
 
                 // download part of the file
                 $result = Piwik_Http::downloadChunk(
-                    $url, $outputPath, Piwik_Common::getRequestVar('continue', true, 'int'));
+                    $url, $outputPath, Common::getRequestVar('continue', true, 'int'));
 
                 // if the file is done
                 if ($result['current_size'] >= $result['expected_file_size']) {
@@ -250,14 +250,14 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin
 
                     $info = $this->getNextMissingDbUrlInfo();
                     if ($info !== false) {
-                        echo Piwik_Common::json_encode($info);
+                        echo Common::json_encode($info);
                         return;
                     }
                 }
 
-                echo Piwik_Common::json_encode($result);
+                echo Common::json_encode($result);
             } catch (Exception $ex) {
-                echo Piwik_Common::json_encode(array('error' => $ex->getMessage()));
+                echo Common::json_encode(array('error' => $ex->getMessage()));
             }
         }
     }
@@ -277,7 +277,7 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin
         if ($_SERVER["REQUEST_METHOD"] == "POST") {
             $this->checkTokenInUrl();
 
-            $providerId = Piwik_Common::getRequestVar('id');
+            $providerId = Common::getRequestVar('id');
             $provider = Piwik_UserCountry_LocationProvider::setCurrentProvider($providerId);
             if ($provider === false) {
                 throw new Exception("Invalid provider ID: '$providerId'.");
@@ -297,14 +297,14 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin
      */
     public function getLocationUsingProvider()
     {
-        $providerId = Piwik_Common::getRequestVar('id');
+        $providerId = Common::getRequestVar('id');
         $provider = $provider = Piwik_UserCountry_LocationProvider::getProviderById($providerId);
         if ($provider === false) {
             throw new Exception("Invalid provider ID: '$providerId'.");
         }
 
         $location = $provider->getLocation(array('ip'                => Piwik_IP::getIpFromHeader(),
-                                                 'lang'              => Piwik_Common::getBrowserLanguage(),
+                                                 'lang'              => Common::getBrowserLanguage(),
                                                  'disable_fallbacks' => true));
         $location = Piwik_UserCountry_LocationProvider::prettyFormatLocation(
             $location, $newline = '<br/>', $includeExtra = true);
diff --git a/plugins/UserCountry/GeoIPAutoUpdater.php b/plugins/UserCountry/GeoIPAutoUpdater.php
index 15e207edeb..febeccdee0 100755
--- a/plugins/UserCountry/GeoIPAutoUpdater.php
+++ b/plugins/UserCountry/GeoIPAutoUpdater.php
@@ -9,7 +9,7 @@
  * @package Piwik_UserCountry
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Used to automatically update installed GeoIP databases, and manages the updater's
@@ -274,10 +274,10 @@ class Piwik_UserCountry_GeoIPAutoUpdater
     public static function setUpdaterOptionsFromUrl()
     {
         self::setUpdaterOptions(array(
-                                     'loc'    => Piwik_Common::getRequestVar('loc_db', false, 'string'),
-                                     'isp'    => Piwik_Common::getRequestVar('isp_db', false, 'string'),
-                                     'org'    => Piwik_Common::getRequestVar('org_db', false, 'string'),
-                                     'period' => Piwik_Common::getRequestVar('period', false, 'string'),
+                                     'loc'    => Common::getRequestVar('loc_db', false, 'string'),
+                                     'isp'    => Common::getRequestVar('isp_db', false, 'string'),
+                                     'org'    => Common::getRequestVar('org_db', false, 'string'),
+                                     'period' => Common::getRequestVar('period', false, 'string'),
                                 ));
     }
 
diff --git a/plugins/UserCountry/LocationProvider.php b/plugins/UserCountry/LocationProvider.php
index 983d0f6839..d05fbfba76 100755
--- a/plugins/UserCountry/LocationProvider.php
+++ b/plugins/UserCountry/LocationProvider.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_UserCountry
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see plugins/UserCountry/LocationProvider/Default.php
@@ -217,7 +217,7 @@ abstract class Piwik_UserCountry_LocationProvider
                 if ($workingOrError === true) // if the implementation is configured correctly, get the location
                 {
                     $locInfo = array('ip'                => Piwik_IP::getIpFromHeader(),
-                                     'lang'              => Piwik_Common::getBrowserLanguage(),
+                                     'lang'              => Common::getBrowserLanguage(),
                                      'disable_fallbacks' => true);
 
                     $location = $provider->getLocation($locInfo);
@@ -325,7 +325,7 @@ abstract class Piwik_UserCountry_LocationProvider
             && !empty($location[self::COUNTRY_CODE_KEY])
         ) {
             $countryCode = strtolower($location[self::COUNTRY_CODE_KEY]);
-            $location[self::CONTINENT_CODE_KEY] = Piwik_Common::getContinent($countryCode);
+            $location[self::CONTINENT_CODE_KEY] = Common::getContinent($countryCode);
         }
 
         // fill in continent name if continent code is present
diff --git a/plugins/UserCountry/LocationProvider/Default.php b/plugins/UserCountry/LocationProvider/Default.php
index 703c1441ec..18ef73ce3e 100755
--- a/plugins/UserCountry/LocationProvider/Default.php
+++ b/plugins/UserCountry/LocationProvider/Default.php
@@ -9,7 +9,7 @@
  * @package Piwik_UserCountry
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The default LocationProvider, this LocationProvider guesses a visitor's country
@@ -33,9 +33,9 @@ class Piwik_UserCountry_LocationProvider_Default extends Piwik_UserCountry_Locat
         $enableLanguageToCountryGuess = Config::getInstance()->Tracker['enable_language_to_country_guess'];
 
         if (empty($info['lang'])) {
-            $info['lang'] = Piwik_Common::getBrowserLanguage();
+            $info['lang'] = Common::getBrowserLanguage();
         }
-        $country = Piwik_Common::getCountry($info['lang'], $enableLanguageToCountryGuess, $info['ip']);
+        $country = Common::getCountry($info['lang'], $enableLanguageToCountryGuess, $info['ip']);
 
         $location = array(parent::COUNTRY_CODE_KEY => $country);
         $this->completeLocationResult($location);
diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php
index c7d559b289..3171a92e7c 100644
--- a/plugins/UserCountry/UserCountry.php
+++ b/plugins/UserCountry/UserCountry.php
@@ -9,7 +9,7 @@
  * @package Piwik_UserCountry
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * @see plugins/UserCountry/GeoIPAutoUpdater.php
@@ -64,7 +64,7 @@ class Piwik_UserCountry extends Piwik_Plugin
     {
         require_once PIWIK_INCLUDE_PATH . "/plugins/UserCountry/LocationProvider.php";
 
-        $id = Piwik_Common::getCurrentLocationProviderId();
+        $id = Common::getCurrentLocationProviderId();
         $provider = Piwik_UserCountry_LocationProvider::getProviderById($id);
         if ($provider === false) {
             $id = Piwik_UserCountry_LocationProvider_Default::ID;
@@ -271,7 +271,7 @@ class Piwik_UserCountry extends Piwik_Plugin
     {
         $result = array();
         $continent = strtolower($continent);
-        foreach (Piwik_Common::getCountriesList() as $countryCode => $continentCode) {
+        foreach (Common::getCountriesList() as $countryCode => $continentCode) {
             if ($continent == $continentCode) {
                 $result[] = $countryCode;
             }
diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php
index 8e732b399c..6eee81eed6 100644
--- a/plugins/UserCountryMap/Controller.php
+++ b/plugins/UserCountryMap/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_UserCountryMap
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -25,11 +25,11 @@ class Piwik_UserCountryMap_Controller extends Piwik_Controller
     {
         $this->checkUserCountryPluginEnabled();
 
-        $idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
+        $idSite = Common::getRequestVar('idSite', 1, 'int');
         Piwik::checkUserHasViewAccess($idSite);
 
-        $period = Piwik_Common::getRequestVar('period');
-        $date = Piwik_Common::getRequestVar('date');
+        $period = Common::getRequestVar('period');
+        $date = Common::getRequestVar('date');
         $token_auth = Piwik::getCurrentUserTokenAuth();
 
         $view = new Piwik_View('@UserCountryMap/visitorMap');
@@ -56,7 +56,7 @@ class Piwik_UserCountryMap_Controller extends Piwik_Controller
         $view->defaultMetric = 'nb_visits';
 
         // some translations
-        $view->localeJSON = Piwik_Common::json_encode(array(
+        $view->localeJSON = Common::json_encode(array(
                                                            'nb_visits'            => Piwik_Translate('VisitsSummary_NbVisits'),
                                                            'one_visit'            => Piwik_Translate('General_OneVisit'),
                                                            'no_visit'             => Piwik_Translate('UserCountryMap_NoVisit'),
@@ -80,7 +80,7 @@ class Piwik_UserCountryMap_Controller extends Piwik_Controller
         $view->metrics = $config['metrics'] = $this->getMetrics($idSite, $period, $date, $token_auth);
         $config['svgBasePath'] = 'plugins/UserCountryMap/svg/';
         $config['mapCssPath'] = 'plugins/UserCountryMap/stylesheets/map.css';
-        $view->config = Piwik_Common::json_encode($config);
+        $view->config = Common::json_encode($config);
         $view->noData = empty($config['visitsSummary']['nb_visits']);
 
         echo $view->render();
@@ -101,7 +101,7 @@ class Piwik_UserCountryMap_Controller extends Piwik_Controller
     {
         $this->checkUserCountryPluginEnabled();
 
-        $idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
+        $idSite = Common::getRequestVar('idSite', 1, 'int');
         Piwik::checkUserHasViewAccess($idSite);
 
         $token_auth = Piwik::getCurrentUserTokenAuth();
@@ -118,7 +118,7 @@ class Piwik_UserCountryMap_Controller extends Piwik_Controller
         $view->hasGoals = !empty($goals) || $site->isEcommerceEnabled() ? 'true' : 'false';
 
         // maximum number of visits to be displayed in the map
-        $view->maxVisits = Piwik_Common::getRequestVar('format_limit', 100, 'int');
+        $view->maxVisits = Common::getRequestVar('format_limit', 100, 'int');
 
         // some translations
         $view->localeJSON = json_encode(array(
@@ -156,7 +156,7 @@ class Piwik_UserCountryMap_Controller extends Piwik_Controller
             $params['segment'] = $segment;
         }
 
-        return Piwik_Common::json_encode($params);
+        return Common::json_encode($params);
     }
 
 
@@ -182,7 +182,7 @@ class Piwik_UserCountryMap_Controller extends Piwik_Controller
 
         $metrics = array();
         foreach ($metaData[0]['metrics'] as $id => $val) {
-            if (Piwik_Common::getRequestVar('period') == 'day' || $id != 'nb_uniq_visitors') {
+            if (Common::getRequestVar('period') == 'day' || $id != 'nb_uniq_visitors') {
                 $metrics[] = array($id, $val);
             }
         }
diff --git a/plugins/UserSettings/Archiver.php b/plugins/UserSettings/Archiver.php
index 817b8b9a5e..95f7f5f107 100644
--- a/plugins/UserSettings/Archiver.php
+++ b/plugins/UserSettings/Archiver.php
@@ -9,7 +9,7 @@
  * @package Piwik_UserSettings
  */
 
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once PIWIK_INCLUDE_PATH . '/plugins/UserSettings/functions.php';
 
@@ -120,10 +120,10 @@ class Piwik_UserSettings_Archiver extends Piwik_PluginsArchiver
     protected function aggregateByLanguage()
     {
         $query = $this->getLogAggregator()->queryVisitsByDimension( array("label" => self::LANGUAGE_DIMENSION) );
-        $languageCodes = array_keys(Piwik_Common::getLanguagesList());
+        $languageCodes = array_keys(Common::getLanguagesList());
         $metricsByLanguage = new Piwik_DataArray();
         while ($row = $query->fetch()) {
-            $code = Piwik_Common::extractLanguageCodeFromBrowserLanguage($row['label'], $languageCodes);
+            $code = Common::extractLanguageCodeFromBrowserLanguage($row['label'], $languageCodes);
             $metricsByLanguage->sumMetricsVisits($code, $row);
         }
 
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index 411cd735a2..0ed1aaf7aa 100644
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -10,7 +10,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * The UsersManager API lets you Manage Users and their permissions to access specific websites.
@@ -120,12 +120,12 @@ class Piwik_UsersManager_API
         $bind = array();
         if (!empty($userLogins)) {
             $userLogins = explode(',', $userLogins);
-            $where = 'WHERE login IN (' . Piwik_Common::getSqlStringFieldsArray($userLogins) . ')';
+            $where = 'WHERE login IN (' . Common::getSqlStringFieldsArray($userLogins) . ')';
             $bind = $userLogins;
         }
         $db = Zend_Registry::get('db');
         $users = $db->fetchAll("SELECT *
-								FROM " . Piwik_Common::prefixTable("user") . "
+								FROM " . Common::prefixTable("user") . "
 								$where 
 								ORDER BY login ASC", $bind);
         // Non Super user can only access login & alias
@@ -148,7 +148,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
         $users = $db->fetchAll("SELECT login
-								FROM " . Piwik_Common::prefixTable("user") . "
+								FROM " . Common::prefixTable("user") . "
 								ORDER BY login ASC");
         $return = array();
         foreach ($users as $login) {
@@ -180,7 +180,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
         $users = $db->fetchAll("SELECT login,idsite
-								FROM " . Piwik_Common::prefixTable("access")
+								FROM " . Common::prefixTable("access")
             . " WHERE access = ?
 								ORDER BY login, idsite", $access);
         $return = array();
@@ -212,7 +212,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
         $users = $db->fetchAll("SELECT login,access
-								FROM " . Piwik_Common::prefixTable("access")
+								FROM " . Common::prefixTable("access")
             . " WHERE idsite = ?", $idSite);
         $return = array();
         foreach ($users as $user) {
@@ -228,7 +228,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
         $users = $db->fetchAll("SELECT login
-								FROM " . Piwik_Common::prefixTable("access")
+								FROM " . Common::prefixTable("access")
             . " WHERE idsite = ? AND access = ?", array($idSite, $access));
         $logins = array();
         foreach ($users as $user) {
@@ -265,7 +265,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
         $users = $db->fetchAll("SELECT idsite,access
-								FROM " . Piwik_Common::prefixTable("access")
+								FROM " . Common::prefixTable("access")
             . " WHERE login = ?", $userLogin);
         $return = array();
         foreach ($users as $user) {
@@ -292,7 +292,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
         $user = $db->fetchRow("SELECT *
-								FROM " . Piwik_Common::prefixTable("user")
+								FROM " . Common::prefixTable("user")
             . " WHERE login = ?", $userLogin);
         return $user;
     }
@@ -311,7 +311,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
         $user = $db->fetchRow("SELECT *
-								FROM " . Piwik_Common::prefixTable("user")
+								FROM " . Common::prefixTable("user")
             . " WHERE email = ?", $userEmail);
         return $user;
     }
@@ -367,7 +367,7 @@ class Piwik_UsersManager_API
         $this->checkUserIsNotSuperUser($userLogin);
         $this->checkEmail($email);
 
-        $password = Piwik_Common::unsanitizeInputValue($password);
+        $password = Common::unsanitizeInputValue($password);
         Piwik_UsersManager::checkPassword($password);
 
         $alias = $this->getCleanAlias($alias, $userLogin);
@@ -377,7 +377,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
 
-        $db->insert(Piwik_Common::prefixTable("user"), array(
+        $db->insert(Common::prefixTable("user"), array(
                                                             'login'           => $userLogin,
                                                             'password'        => $passwordTransformed,
                                                             'alias'           => $alias,
@@ -413,7 +413,7 @@ class Piwik_UsersManager_API
         if (empty($password)) {
             $password = $userInfo['password'];
         } else {
-            $password = Piwik_Common::unsanitizeInputValue($password);
+            $password = Common::unsanitizeInputValue($password);
             if (!$_isPasswordHashed) {
                 Piwik_UsersManager::checkPassword($password);
                 $password = Piwik_UsersManager::getPasswordHash($password);
@@ -437,7 +437,7 @@ class Piwik_UsersManager_API
 
         $db = Zend_Registry::get('db');
 
-        $db->update(Piwik_Common::prefixTable("user"),
+        $db->update(Common::prefixTable("user"),
             array(
                  'password'   => $password,
                  'alias'      => $alias,
@@ -483,7 +483,7 @@ class Piwik_UsersManager_API
     public function userExists($userLogin)
     {
         $count = Piwik_FetchOne("SELECT count(*)
-													FROM " . Piwik_Common::prefixTable("user") . "
+													FROM " . Common::prefixTable("user") . "
 													WHERE login = ?", $userLogin);
         return $count != 0;
     }
@@ -498,7 +498,7 @@ class Piwik_UsersManager_API
     {
         Piwik::checkUserIsNotAnonymous();
         $count = Piwik_FetchOne("SELECT count(*)
-								FROM " . Piwik_Common::prefixTable("user") . "
+								FROM " . Common::prefixTable("user") . "
 								WHERE email = ?", $userEmail);
         return $count != 0
             || Config::getInstance()->superuser['email'] == $userEmail;
@@ -558,7 +558,7 @@ class Piwik_UsersManager_API
         // when no access are specified
         if ($access != 'noaccess') {
             foreach ($idSites as $idsite) {
-                $db->insert(Piwik_Common::prefixTable("access"),
+                $db->insert(Common::prefixTable("access"),
                     array("idsite" => $idsite,
                           "login"  => $userLogin,
                           "access" => $access)
@@ -633,7 +633,7 @@ class Piwik_UsersManager_API
     private function deleteUserOnly($userLogin)
     {
         $db = Zend_Registry::get('db');
-        $db->query("DELETE FROM " . Piwik_Common::prefixTable("user") . " WHERE login = ?", $userLogin);
+        $db->query("DELETE FROM " . Common::prefixTable("user") . " WHERE login = ?", $userLogin);
 
         Piwik_PostEvent('UsersManager.deleteUser', array($userLogin));
     }
@@ -653,12 +653,12 @@ class Piwik_UsersManager_API
         $db = Zend_Registry::get('db');
 
         if (is_null($idSites)) {
-            $db->query("DELETE FROM " . Piwik_Common::prefixTable("access") .
+            $db->query("DELETE FROM " . Common::prefixTable("access") .
                     " WHERE login = ?",
                 array($userLogin));
         } else {
             foreach ($idSites as $idsite) {
-                $db->query("DELETE FROM " . Piwik_Common::prefixTable("access") .
+                $db->query("DELETE FROM " . Common::prefixTable("access") .
                         " WHERE idsite = ? AND login = ?",
                     array($idsite, $userLogin)
                 );
diff --git a/plugins/UsersManager/Controller.php b/plugins/UsersManager/Controller.php
index 322a4ebff0..ac3aaab360 100644
--- a/plugins/UsersManager/Controller.php
+++ b/plugins/UsersManager/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_UsersManager
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -36,7 +36,7 @@ class Piwik_UsersManager_Controller extends Piwik_Controller_Admin
 
         if (count($IdSitesAdmin) > 0) {
             $defaultWebsiteId = $IdSitesAdmin[0];
-            $idSiteSelected = Piwik_Common::getRequestVar('idSite', $defaultWebsiteId);
+            $idSiteSelected = Common::getRequestVar('idSite', $defaultWebsiteId);
         }
 
         if ($idSiteSelected === 'all') {
@@ -224,13 +224,13 @@ class Piwik_UsersManager_Controller extends Piwik_Controller_Admin
      */
     public function recordAnonymousUserSettings()
     {
-        $response = new Piwik_API_ResponseBuilder(Piwik_Common::getRequestVar('format'));
+        $response = new Piwik_API_ResponseBuilder(Common::getRequestVar('format'));
         try {
             Piwik::checkUserIsSuperUser();
             $this->checkTokenInUrl();
 
-            $anonymousDefaultReport = Piwik_Common::getRequestVar('anonymousDefaultReport');
-            $anonymousDefaultDate = Piwik_Common::getRequestVar('anonymousDefaultDate');
+            $anonymousDefaultReport = Common::getRequestVar('anonymousDefaultReport');
+            $anonymousDefaultDate = Common::getRequestVar('anonymousDefaultDate');
             $userLogin = 'anonymous';
             Piwik_UsersManager_API::getInstance()->setUserPreference($userLogin,
                 Piwik_UsersManager_API::PREFERENCE_DEFAULT_REPORT,
@@ -251,18 +251,18 @@ class Piwik_UsersManager_Controller extends Piwik_Controller_Admin
      */
     public function recordUserSettings()
     {
-        $response = new Piwik_API_ResponseBuilder(Piwik_Common::getRequestVar('format'));
+        $response = new Piwik_API_ResponseBuilder(Common::getRequestVar('format'));
         try {
             $this->checkTokenInUrl();
 
-            $alias = Piwik_Common::getRequestVar('alias');
-            $email = Piwik_Common::getRequestVar('email');
-            $defaultReport = Piwik_Common::getRequestVar('defaultReport');
-            $defaultDate = Piwik_Common::getRequestVar('defaultDate');
+            $alias = Common::getRequestVar('alias');
+            $email = Common::getRequestVar('email');
+            $defaultReport = Common::getRequestVar('defaultReport');
+            $defaultDate = Common::getRequestVar('defaultDate');
 
             $newPassword = false;
-            $password = Piwik_Common::getRequestvar('password', false);
-            $passwordBis = Piwik_Common::getRequestvar('passwordBis', false);
+            $password = Common::getRequestvar('password', false);
+            $passwordBis = Common::getRequestvar('passwordBis', false);
             if (!empty($password)
                 || !empty($passwordBis)
             ) {
@@ -285,7 +285,7 @@ class Piwik_UsersManager_Controller extends Piwik_Controller_Admin
                 $updatedSuperUser = false;
 
                 if ($newPassword !== false) {
-                    $newPassword = Piwik_Common::unsanitizeInputValue($newPassword);
+                    $newPassword = Common::unsanitizeInputValue($newPassword);
                     $md5PasswordSuperUser = md5($newPassword);
                     $superUser['password'] = $md5PasswordSuperUser;
                     $updatedSuperUser = true;
@@ -301,7 +301,7 @@ class Piwik_UsersManager_Controller extends Piwik_Controller_Admin
             } else {
                 Piwik_UsersManager_API::getInstance()->updateUser($userLogin, $newPassword, $email, $alias);
                 if ($newPassword !== false) {
-                    $newPassword = Piwik_Common::unsanitizeInputValue($newPassword);
+                    $newPassword = Common::unsanitizeInputValue($newPassword);
                 }
             }
 
diff --git a/plugins/VisitFrequency/Controller.php b/plugins/VisitFrequency/Controller.php
index 0c32d3dcf6..6cac26d504 100644
--- a/plugins/VisitFrequency/Controller.php
+++ b/plugins/VisitFrequency/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_VisitFrequency
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -35,7 +35,7 @@ class Piwik_VisitFrequency_Controller extends Piwik_Controller
     public function getEvolutionGraph($fetch = false, array $columns = array())
     {
         if (empty($columns)) {
-            $columns = Piwik_Common::getRequestVar('columns');
+            $columns = Common::getRequestVar('columns');
             $columns = Piwik::getArrayFromApiParameter($columns);
         }
 
@@ -59,7 +59,7 @@ class Piwik_VisitFrequency_Controller extends Piwik_Controller
             'avg_time_on_site'
         );
 
-        $period = Piwik_Common::getRequestVar('period', false);
+        $period = Common::getRequestVar('period', false);
         if ($period == 'day') {
             // add number of unique (returning) visitors for period=day
             $selectableColumns = array_merge(
diff --git a/plugins/VisitTime/VisitTime.php b/plugins/VisitTime/VisitTime.php
index dee8d07368..990bf350e3 100644
--- a/plugins/VisitTime/VisitTime.php
+++ b/plugins/VisitTime/VisitTime.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_VisitTime
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -154,7 +154,7 @@ class Piwik_VisitTime extends Piwik_Plugin
         );
 
         // add the visits by day of week as a related report, if the current period is not 'day'
-        if (Piwik_Common::getRequestVar('period', 'day') != 'day') {
+        if (Common::getRequestVar('period', 'day') != 'day') {
             $reportViewProperties['VisitTime.getVisitInformationPerLocalTime']['relatedReports'] = array(
                 'VisitTime.getByDayOfWeek' => Piwik_Translate('VisitTime_VisitsByDayOfWeek')
             );
@@ -185,9 +185,9 @@ class Piwik_VisitTime extends Piwik_Plugin
     private static function getDateRangeForFooterMessage()
     {
         // get query params
-        $idSite = Piwik_Common::getRequestVar('idSite');
-        $date = Piwik_Common::getRequestVar('date');
-        $period = Piwik_Common::getRequestVar('period');
+        $idSite = Common::getRequestVar('idSite');
+        $date = Common::getRequestVar('date');
+        $period = Common::getRequestVar('period');
 
         // create a period instance
         $oPeriod = Piwik_Period::makePeriodFromQueryParams(Piwik_Site::getTimezoneFor($idSite), $period, $date);
diff --git a/plugins/VisitorGenerator/Controller.php b/plugins/VisitorGenerator/Controller.php
index cb9a567b52..813984b2ed 100644
--- a/plugins/VisitorGenerator/Controller.php
+++ b/plugins/VisitorGenerator/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_VisitorGenerator
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -46,19 +46,19 @@ class Piwik_VisitorGenerator_Controller extends Piwik_Controller_Admin
     public function generate()
     {
         Piwik::checkUserIsSuperUser();
-        $nonce = Piwik_Common::getRequestVar('form_nonce', '', 'string', $_POST);
-        if (Piwik_Common::getRequestVar('choice', 'no') != 'yes' ||
+        $nonce = Common::getRequestVar('form_nonce', '', 'string', $_POST);
+        if (Common::getRequestVar('choice', 'no') != 'yes' ||
             !Piwik_Nonce::verifyNonce('Piwik_VisitorGenerator.generate', $nonce)
         ) {
             Piwik::redirectToModule('VisitorGenerator', 'index');
         }
         Piwik_Nonce::discardNonce('Piwik_VisitorGenerator.generate');
 
-        $daysToCompute = Piwik_Common::getRequestVar('daysToCompute', 1, 'int');
+        $daysToCompute = Common::getRequestVar('daysToCompute', 1, 'int');
 
         // get idSite from POST with fallback to GET
-        $idSite = Piwik_Common::getRequestVar('idSite', false, 'int', $_GET);
-        $idSite = Piwik_Common::getRequestVar('idSite', $idSite, 'int', $_POST);
+        $idSite = Common::getRequestVar('idSite', false, 'int', $_GET);
+        $idSite = Common::getRequestVar('idSite', $idSite, 'int', $_POST);
 
         Piwik::setMaxExecutionTime(0);
 
diff --git a/plugins/VisitsSummary/Controller.php b/plugins/VisitsSummary/Controller.php
index 3dc80647a4..02ab257ac5 100644
--- a/plugins/VisitsSummary/Controller.php
+++ b/plugins/VisitsSummary/Controller.php
@@ -9,7 +9,7 @@
  * @package Piwik_VisitsSummary
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -37,7 +37,7 @@ class Piwik_VisitsSummary_Controller extends Piwik_Controller
     public function getEvolutionGraph($fetch = false, array $columns = array())
     {
         if (empty($columns)) {
-            $columns = Piwik_Common::getRequestVar('columns');
+            $columns = Common::getRequestVar('columns');
             $columns = Piwik::getArrayFromApiParameter($columns);
         }
 
@@ -75,7 +75,7 @@ class Piwik_VisitsSummary_Controller extends Piwik_Controller
             'avg_time_generation'
         );
 
-        $idSite = Piwik_Common::getRequestVar('idSite');
+        $idSite = Common::getRequestVar('idSite');
         $displaySiteSearch = Piwik_Site::isSiteSearchEnabledFor($idSite);
 
         if ($displaySiteSearch) {
@@ -121,7 +121,7 @@ class Piwik_VisitsSummary_Controller extends Piwik_Controller
         $view->urlSparklineBounceRate = $this->getUrlSparkline('getEvolutionGraph', array('columns' => array('bounce_rate')));
 		$view->urlSparklineAvgGenerationTime = $this->getUrlSparkline('getEvolutionGraph', array('columns' => array('avg_time_generation')));
 
-        $idSite = Piwik_Common::getRequestVar('idSite');
+        $idSite = Common::getRequestVar('idSite');
         $displaySiteSearch = Piwik_Site::isSiteSearchEnabledFor($idSite);
         if ($displaySiteSearch) {
             $view->urlSparklineNbSearches = $this->getUrlSparkline('getEvolutionGraph', array('columns' => array('nb_searches', 'nb_keywords')));
@@ -131,7 +131,7 @@ class Piwik_VisitsSummary_Controller extends Piwik_Controller
         $dataTableVisit = self::getVisitsSummary();
         $dataRow = $dataTableVisit->getRowsCount() == 0 ? new Piwik_DataTable_Row() : $dataTableVisit->getFirstRow();
 
-        $dataTableActions = Piwik_Actions_API::getInstance()->get($idSite, Piwik_Common::getRequestVar('period'), Piwik_Common::getRequestVar('date'), Piwik_ViewDataTable::getRawSegmentFromRequest());
+        $dataTableActions = Piwik_Actions_API::getInstance()->get($idSite, Common::getRequestVar('period'), Common::getRequestVar('date'), Piwik_ViewDataTable::getRawSegmentFromRequest());
         $dataActionsRow =
             $dataTableActions->getRowsCount() == 0 ? new Piwik_DataTable_Row() : $dataTableActions->getFirstRow();
 
diff --git a/plugins/Widgetize/Controller.php b/plugins/Widgetize/Controller.php
index c8751b6b7b..be6b56a37b 100644
--- a/plugins/Widgetize/Controller.php
+++ b/plugins/Widgetize/Controller.php
@@ -8,7 +8,7 @@
  * @category Piwik_Plugins
  * @package Piwik_Widgetize
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  *
@@ -19,7 +19,7 @@ class Piwik_Widgetize_Controller extends Piwik_Controller
     public function index()
     {
         $view = new Piwik_View('@Widgetize/index');
-        $view->availableWidgets = Piwik_Common::json_encode(Piwik_GetWidgetsList());
+        $view->availableWidgets = Common::json_encode(Piwik_GetWidgetsList());
         $this->setGeneralVariablesView($view);
         echo $view->render();
     }
@@ -45,8 +45,8 @@ class Piwik_Widgetize_Controller extends Piwik_Controller
     {
         Piwik_API_Request::reloadAuthUsingTokenAuth();
         $this->init();
-        $controllerName = Piwik_Common::getRequestVar('moduleToWidgetize');
-        $actionName = Piwik_Common::getRequestVar('actionToWidgetize');
+        $controllerName = Common::getRequestVar('moduleToWidgetize');
+        $actionName = Common::getRequestVar('actionToWidgetize');
         $parameters = array($fetch = true);
         $outputDataTable = Piwik_FrontController::getInstance()->fetchDispatch($controllerName, $actionName, $parameters);
         if ($controllerName == 'Dashboard' && $actionName == 'index') {
diff --git a/tests/PHPUnit/BaseFixture.php b/tests/PHPUnit/BaseFixture.php
index 812fdc2960..88f90a471b 100644
--- a/tests/PHPUnit/BaseFixture.php
+++ b/tests/PHPUnit/BaseFixture.php
@@ -6,7 +6,7 @@
  * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Base type for all integration test fixtures. Integration test fixtures
@@ -64,7 +64,7 @@ abstract class Test_Piwik_BaseFixture extends PHPUnit_Framework_Assert
         );
 
         // Manually set the website creation date to a day earlier than the earliest day we record stats for
-        Zend_Registry::get('db')->update(Piwik_Common::prefixTable("site"),
+        Zend_Registry::get('db')->update(Common::prefixTable("site"),
             array('ts_created' => Piwik_Date::factory($dateTime)->subDay(1)->getDatetime()),
             "idsite = $idSite"
         );
@@ -333,7 +333,7 @@ abstract class Test_Piwik_BaseFixture extends PHPUnit_Framework_Assert
 
     protected static function executeLogImporter($logFile, $options)
     {
-        $python = Piwik_Common::isWindows() ? "C:\Python27\python.exe" : 'python';
+        $python = Common::isWindows() ? "C:\Python27\python.exe" : 'python';
 
         // create the command
         $cmd = $python
diff --git a/tests/PHPUnit/BenchmarkTestCase.php b/tests/PHPUnit/BenchmarkTestCase.php
index 72df0a58dc..3f753e401b 100755
--- a/tests/PHPUnit/BenchmarkTestCase.php
+++ b/tests/PHPUnit/BenchmarkTestCase.php
@@ -6,7 +6,7 @@
  * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  */
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/IntegrationTestCase.php';
 require_once PIWIK_INCLUDE_PATH . '/tests/LocalTracker.php';
@@ -47,7 +47,7 @@ abstract class BenchmarkTestCase extends IntegrationTestCase
         try {
             if (isset(self::$fixture->tablesPrefix)) {
                 Config::getInstance()->database['tables_prefix'] = self::$fixture->tablesPrefix;
-                Piwik_Common::$cachedTablePrefix = null;
+                Common::$cachedTablePrefix = null;
             }
 
             Piwik_Query("USE " . $dbName);
diff --git a/tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php b/tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php
index ee8a4f8b49..2f6a75143b 100755
--- a/tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php
+++ b/tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php
@@ -7,7 +7,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Reusable fixture. Loads a ~1GB SQL dump into the DB.
@@ -57,7 +57,7 @@ class Piwik_Test_Fixture_SqlDump
         $password = Config::getInstance()->database['password'];
         $dbName = Config::getInstance()->database['dbname'];
         Config::getInstance()->database['tables_prefix'] = 'piwik_';
-        Piwik_Common::$cachedTablePrefix = null;
+        Common::$cachedTablePrefix = null;
 
         exec("mysql -u \"$user\" \"--password=$password\" $dbName < \"" . $deflatedDumpPath . "\" 2>&1", $output, $return);
         if ($return !== 0) {
diff --git a/tests/PHPUnit/Core/ArchiveProcessingTest.php b/tests/PHPUnit/Core/ArchiveProcessingTest.php
index dd1e9a8186..8a73c11113 100644
--- a/tests/PHPUnit/Core/ArchiveProcessingTest.php
+++ b/tests/PHPUnit/Core/ArchiveProcessingTest.php
@@ -1,7 +1,7 @@
 <?php
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -181,7 +181,7 @@ class ArchiveProcessingTest extends DatabaseTestCase
         // see isArchivingDisabled()
         // Running in CLI doesn't impact the time to live today's archive we are loading
         // From CLI, we will not return data that is 'stale' 
-        if (!Piwik_Common::isPhpCliMode()) {
+        if (!Common::isPhpCliMode()) {
             $dateMinArchived = 0;
         }
         $this->compareTimestamps($archiveProcessor->getMinTimeArchivedProcessed(), $dateMinArchived);
@@ -224,7 +224,7 @@ class ArchiveProcessingTest extends DatabaseTestCase
         // see isArchivingDisabled()
         // Running in CLI doesn't impact the time to live today's archive we are loading
         // From CLI, we will not return data that is 'stale'
-        if (!Piwik_Common::isPhpCliMode()) {
+        if (!Common::isPhpCliMode()) {
             $dateMinArchived = 0;
         }
         $this->compareTimestamps($dateMinArchived, $archiveProcessor->getMinTimeArchivedProcessed());
@@ -270,7 +270,7 @@ class ArchiveProcessingTest extends DatabaseTestCase
         // see isArchivingDisabled()
         // Running in CLI doesn't impact the time to live today's archive we are loading
         // From CLI, we will not return data that is 'stale'
-        if (!Piwik_Common::isPhpCliMode()) {
+        if (!Common::isPhpCliMode()) {
             $dateMinArchived = 0;
         }
         $this->compareTimestamps($dateMinArchived, $archiveProcessor->getMinTimeArchivedProcessed());
@@ -291,7 +291,7 @@ class ArchiveProcessingTest extends DatabaseTestCase
      */
     public function testTableInsertBatch()
     {
-        $table = Piwik_Common::prefixTable('site_url');
+        $table = Common::prefixTable('site_url');
         $data = $this->_getDataInsert();
         try {
             $didWeUseBulk = Piwik::tableInsertBatch($table,
@@ -343,7 +343,7 @@ class ArchiveProcessingTest extends DatabaseTestCase
      */
     public function testTableInsertBatchIterate()
     {
-        $table = Piwik_Common::prefixTable('site_url');
+        $table = Common::prefixTable('site_url');
         $data = $this->_getDataInsert();
         Piwik::tableInsertBatchIterate($table, array('idsite', 'url'), $data);
         $this->_checkTableIsExpected($table, $data);
diff --git a/tests/PHPUnit/Core/CommonTest.php b/tests/PHPUnit/Core/CommonTest.php
index f8d7b431b7..0163ff548a 100644
--- a/tests/PHPUnit/Core/CommonTest.php
+++ b/tests/PHPUnit/Core/CommonTest.php
@@ -1,5 +1,5 @@
 <?php
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -44,7 +44,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
      */
     public function testIsUrl($url, $isValid)
     {
-        $this->assertEquals($isValid, Piwik_Common::isLookLikeUrl($url));
+        $this->assertEquals($isValid, Common::isLookLikeUrl($url));
     }
 
     /**
@@ -134,11 +134,11 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
         if (version_compare(PHP_VERSION, '5.4') < 0) {
             $this->assertTrue(@set_magic_quotes_runtime(1));
             $this->assertEquals(1, @get_magic_quotes_runtime());
-            $this->assertEquals($output, Piwik_Common::sanitizeInputValues($input));
+            $this->assertEquals($output, Common::sanitizeInputValues($input));
 
             $this->assertTrue(@set_magic_quotes_runtime(0));
             $this->assertEquals(0, @get_magic_quotes_runtime());
-            $this->assertEquals($output, Piwik_Common::sanitizeInputValues($input));
+            $this->assertEquals($output, Common::sanitizeInputValues($input));
         }
     }
 
@@ -152,7 +152,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
     {
         try {
             $_GET[''] = 1;
-            Piwik_Common::getRequestVar('');
+            Common::getRequestVar('');
         } catch (Exception $e) {
             return;
         }
@@ -168,7 +168,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
     public function testGetRequestVarNoDefaultNoTypeNoValue()
     {
         try {
-            Piwik_Common::getRequestVar('test');
+            Common::getRequestVar('test');
         } catch (Exception $e) {
             return;
         }
@@ -184,7 +184,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
     public function testGetRequestVarNoDefaultNoTypeWithValue()
     {
         $_GET['test'] = 1413.431413;
-        $this->assertEquals($_GET['test'], Piwik_Common::getRequestVar('test'));
+        $this->assertEquals($_GET['test'], Common::getRequestVar('test'));
 
     }
 
@@ -198,7 +198,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
     {
         try {
             $_GET['test'] = 1413.431413;
-            Piwik_Common::getRequestVar('test', null, 'string');
+            Common::getRequestVar('test', null, 'string');
         } catch (Exception $e) {
             return;
         }
@@ -214,7 +214,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
     public function testGetRequestVarNoDefaultWithTypeWithValue2()
     {
         try {
-            Piwik_Common::getRequestVar('test', null, 'string');
+            Common::getRequestVar('test', null, 'string');
         } catch (Exception $e) {
             return;
         }
@@ -268,7 +268,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
     public function testGetRequestVar($varValue, $default, $type, $expected)
     {
         $_GET['test'] = $varValue;
-        $return = Piwik_Common::getRequestVar('test', $default, $type);
+        $return = Common::getRequestVar('test', $default, $type);
         $this->assertEquals($expected, $return);
         // validate correct type
         switch ($type) {
@@ -340,7 +340,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
      */
     public function testGetParameterFromQueryString($queryString, $parameter, $expected)
     {
-        $this->assertSame($expected, Piwik_Common::getParameterFromQueryString($queryString, $parameter));
+        $this->assertSame($expected, Common::getParameterFromQueryString($queryString, $parameter));
     }
 
     /**
@@ -350,7 +350,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
      */
     public function testGetPathAndQueryFromUrl()
     {
-        $this->assertEquals('test/index.php?module=CoreHome', Piwik_Common::getPathAndQueryFromUrl('http://piwik.org/test/index.php?module=CoreHome'));
+        $this->assertEquals('test/index.php?module=CoreHome', Common::getPathAndQueryFromUrl('http://piwik.org/test/index.php?module=CoreHome'));
     }
 
     /**
@@ -369,7 +369,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
             'f' => array('a'),
             'g' => array('b', 'c'),
         );
-        $this->assertEquals(serialize($expected), serialize(Piwik_Common::getArrayFromQueryString('a&b=&c=1&d[]&e[]=&f[]=a&g[]=b&g[]=c')));
+        $this->assertEquals(serialize($expected), serialize(Common::getArrayFromQueryString('a&b=&c=1&d[]&e[]=&f[]=a&g[]=b&g[]=c')));
     }
 
     /**
@@ -383,7 +383,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
             "test", "test.txt", "test.......", "en-ZHsimplified",
         );
         foreach ($valid as $toTest) {
-            $this->assertTrue(Piwik_Common::isValidFilename($toTest), $toTest . " not valid!");
+            $this->assertTrue(Common::isValidFilename($toTest), $toTest . " not valid!");
         }
     }
 
@@ -398,7 +398,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
             "../test", "/etc/htpasswd", '$var', ';test', '[bizarre]', '', ".htaccess", "very long long eogaioge ageja geau ghaeihieg heiagie aiughaeui hfilename",
         );
         foreach ($notvalid as $toTest) {
-            $this->assertFalse(Piwik_Common::isValidFilename($toTest), $toTest . " valid but shouldn't!");
+            $this->assertFalse(Common::isValidFilename($toTest), $toTest . " valid but shouldn't!");
         }
     }
 
@@ -446,7 +446,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
      */
     public function testGetBrowserLanguage($useragent, $browserLanguage)
     {
-        $res = Piwik_Common::getBrowserLanguage($useragent);
+        $res = Common::getBrowserLanguage($useragent);
         $this->assertEquals($browserLanguage, $res);
     }
 
@@ -466,7 +466,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
             array("fr-fr,fr-ca", array("us" => 'amn', "ca" => 'amn'), "ca"),
             array("fr-fr;q=1.0,fr-ca;q=0.9", array("us" => 'amn', "ca" => 'amn'), "ca"),
             array("fr-ca,fr;q=0.1", array("us" => 'amn', "ca" => 'amn'), "ca"),
-            array("en-us,en;q=0.5", Piwik_Common::getCountriesList(), "us"),
+            array("en-us,en;q=0.5", Common::getCountriesList(), "us"),
             array("fr-ca,fr;q=0.1", array("fr" => 'eur', "us" => 'amn', "ca" => 'amn'), "ca"),
             array("fr-fr,fr-ca", array("fr" => 'eur', "us" => 'amn', "ca" => 'amn'), "fr")
         );
@@ -482,8 +482,8 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
     {
         include 'DataFiles/LanguageToCountry.php';
 
-        $this->assertEquals($expected, Piwik_Common::extractCountryCodeFromBrowserLanguage($browserLanguage, $validCountries, true));
-        $this->assertEquals($expected, Piwik_Common::extractCountryCodeFromBrowserLanguage($browserLanguage, $validCountries, false));
+        $this->assertEquals($expected, Common::extractCountryCodeFromBrowserLanguage($browserLanguage, $validCountries, true));
+        $this->assertEquals($expected, Common::extractCountryCodeFromBrowserLanguage($browserLanguage, $validCountries, false));
     }
 
     /**
@@ -511,10 +511,10 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
         include "DataFiles/LanguageToCountry.php";
 
         // do not infer country from language
-        $this->assertEquals($expected, Piwik_Common::extractCountryCodeFromBrowserLanguage($browserLanguage, $validCountries, $enableLanguageToCountryGuess = false));
+        $this->assertEquals($expected, Common::extractCountryCodeFromBrowserLanguage($browserLanguage, $validCountries, $enableLanguageToCountryGuess = false));
 
         // infer country from language
-        $this->assertEquals($expectedInfer, Piwik_Common::extractCountryCodeFromBrowserLanguage($browserLanguage, $validCountries, $enableLanguageToCountryGuess = true));
+        $this->assertEquals($expectedInfer, Common::extractCountryCodeFromBrowserLanguage($browserLanguage, $validCountries, $enableLanguageToCountryGuess = true));
     }
 
     /**
@@ -549,7 +549,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
      */
     public function testExtractLanguageCodeFromBrowserLanguage($browserLanguage, $validLanguages, $expected)
     {
-        $this->assertEquals($expected, Piwik_Common::extractLanguageCodeFromBrowserLanguage($browserLanguage, $validLanguages), "test with {$browserLanguage} failed, expected {$expected}");
+        $this->assertEquals($expected, Common::extractLanguageCodeFromBrowserLanguage($browserLanguage, $validLanguages), "test with {$browserLanguage} failed, expected {$expected}");
     }
 
     /**
@@ -607,7 +607,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
     public function testExtractSearchEngineInformationFromUrl($url, $engine, $keywords)
     {
         $this->includeDataFilesForSearchEngineTest();
-        $returnedValue = Piwik_Common::extractSearchEngineInformationFromUrl($url);
+        $returnedValue = Common::extractSearchEngineInformationFromUrl($url);
 
         $exptectedValue = false;
 
@@ -645,7 +645,7 @@ class Core_CommonTest extends PHPUnit_Framework_TestCase
      */
     public function testGetLossyUrl($input, $expected)
     {
-        $this->assertEquals($expected, Piwik_Common::getLossyUrl($input));
+        $this->assertEquals($expected, Common::getLossyUrl($input));
     }
     
     private function includeDataFilesForSearchEngineTest()
diff --git a/tests/PHPUnit/Core/IPTest.php b/tests/PHPUnit/Core/IPTest.php
index 3ca6be38dc..375f441fa3 100644
--- a/tests/PHPUnit/Core/IPTest.php
+++ b/tests/PHPUnit/Core/IPTest.php
@@ -1,6 +1,6 @@
 <?php
 use Piwik\Core\Config;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -357,7 +357,7 @@ class IPTest extends PHPUnit_Framework_TestCase
     {
         $this->assertEquals($P, Piwik_IP::long2ip($N), bin2hex($N));
         // this is our compatibility function
-        $this->assertEquals($P, Piwik_Common::long2ip($N), bin2hex($N));
+        $this->assertEquals($P, Common::long2ip($N), bin2hex($N));
     }
 
     /**
@@ -691,7 +691,7 @@ class IPTest extends PHPUnit_Framework_TestCase
         $hosts = array('localhost', 'localhost.localdomain', strtolower(@php_uname('n')), '127.0.0.1');
         $this->assertTrue(in_array(strtolower(Piwik_IP::getHostByAddr('127.0.0.1')), $hosts), '127.0.0.1 -> localhost');
 
-        if (!Piwik_Common::isWindows() || PHP_VERSION >= '5.3') {
+        if (!Common::isWindows() || PHP_VERSION >= '5.3') {
             $hosts = array('ip6-localhost', 'localhost', 'localhost.localdomain', strtolower(@php_uname('n')), '::1');
             $this->assertTrue(in_array(strtolower(Piwik_IP::getHostByAddr('::1')), $hosts), '::1 -> ip6-localhost');
         }
@@ -729,7 +729,7 @@ class IPTest extends PHPUnit_Framework_TestCase
     public function testPhpCompatInetNtop($k, $v)
     {
         $this->assertEquals($k, php_compat_inet_ntop(pack('H*', $v)));
-        if (!Piwik_Common::isWindows()) {
+        if (!Common::isWindows()) {
             $this->assertEquals($k, @inet_ntop(pack('H*', $v)));
         }
     }
@@ -805,7 +805,7 @@ class IPTest extends PHPUnit_Framework_TestCase
     public function testPhpCompatInetPton($k, $v)
     {
         $this->assertEquals($v, bin2hex(php_compat_inet_pton($k)));
-        if (!Piwik_Common::isWindows()) {
+        if (!Common::isWindows()) {
             $this->assertEquals($v, bin2hex(@inet_pton($k)));
         }
     }
diff --git a/tests/PHPUnit/Core/OptionTest.php b/tests/PHPUnit/Core/OptionTest.php
index eafb246501..ea6bc19ef9 100644
--- a/tests/PHPUnit/Core/OptionTest.php
+++ b/tests/PHPUnit/Core/OptionTest.php
@@ -5,7 +5,7 @@
  * @link http://piwik.org
  * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once "Option.php";
 
@@ -21,11 +21,11 @@ class OptionTest extends DatabaseTestCase
         $this->assertFalse(Piwik_Option::getInstance()->get('anonymous_defaultReport'));
 
         // populate table, expect '1' (i.e., found)
-        Piwik_Query("INSERT INTO " . Piwik_Common::prefixTable('option') . " VALUES ('anonymous_defaultReport', '1', false)");
+        Piwik_Query("INSERT INTO " . Common::prefixTable('option') . " VALUES ('anonymous_defaultReport', '1', false)");
         $this->assertSame('1', Piwik_Option::getInstance()->get('anonymous_defaultReport'));
 
         // delete row (bypassing API), expect '1' (i.e., from cache)
-        Piwik_Query("DELETE FROM " . Piwik_Common::prefixTable('option') . " WHERE option_name = ?", array('anonymous_defaultReport'));
+        Piwik_Query("DELETE FROM " . Common::prefixTable('option') . " WHERE option_name = ?", array('anonymous_defaultReport'));
         $this->assertSame('1', Piwik_Option::getInstance()->get('anonymous_defaultReport'));
 
         // force cache reload, expect false (i.e., not found)
@@ -43,11 +43,11 @@ class OptionTest extends DatabaseTestCase
         $this->assertFalse(Piwik_GetOption('anonymous_defaultReport'));
 
         // populate table, expect '1' (i.e., found)
-        Piwik_Query("INSERT INTO " . Piwik_Common::prefixTable('option') . " VALUES ('anonymous_defaultReport', '1',true)");
+        Piwik_Query("INSERT INTO " . Common::prefixTable('option') . " VALUES ('anonymous_defaultReport', '1',true)");
         $this->assertSame('1', Piwik_GetOption('anonymous_defaultReport'));
 
         // delete row (bypassing API), expect '1' (i.e., from cache)
-        Piwik_Query("DELETE FROM " . Piwik_Common::prefixTable('option') . " WHERE option_name = ?", array('anonymous_defaultReport'));
+        Piwik_Query("DELETE FROM " . Common::prefixTable('option') . " WHERE option_name = ?", array('anonymous_defaultReport'));
         $this->assertSame('1', Piwik_GetOption('anonymous_defaultReport'));
 
         // force cache reload, expect false (i.e., not found)
diff --git a/tests/PHPUnit/Core/ReleaseCheckListTest.php b/tests/PHPUnit/Core/ReleaseCheckListTest.php
index e24f9cf144..d58cbfaea5 100644
--- a/tests/PHPUnit/Core/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Core/ReleaseCheckListTest.php
@@ -1,6 +1,6 @@
 <?php
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -121,7 +121,7 @@ class ReleaseCheckListTest extends PHPUnit_Framework_TestCase
      */
     public function testEndOfLines()
     {
-        if (Piwik_Common::isWindows()) {
+        if (Common::isWindows()) {
             // SVN native does not make this work on windows
             return;
         }
diff --git a/tests/PHPUnit/Core/SegmentTest.php b/tests/PHPUnit/Core/SegmentTest.php
index bbc8f4d70e..e86a0affdc 100644
--- a/tests/PHPUnit/Core/SegmentTest.php
+++ b/tests/PHPUnit/Core/SegmentTest.php
@@ -1,5 +1,5 @@
 <?php
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -62,8 +62,8 @@ class SegmentTest extends PHPUnit_Framework_TestCase
             // OR, with 2 value rewrites
             array('referrerType==search,referrerType==direct', array(
                 'where' => ' (log_visit.referer_type = ? OR log_visit.referer_type = ? )',
-                'bind'  => array(Piwik_Common::REFERER_TYPE_SEARCH_ENGINE,
-                                 Piwik_Common::REFERER_TYPE_DIRECT_ENTRY))),
+                'bind'  => array(Common::REFERER_TYPE_SEARCH_ENGINE,
+                                 Common::REFERER_TYPE_DIRECT_ENTRY))),
 
             // IS NOT NULL
             array('browserCode==ff;referrerKeyword!=', array(
@@ -103,7 +103,7 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     log_visit.idvisit
                 FROM
-                    ' . Piwik_Common::prefixTable('log_visit') . ' AS log_visit
+                    ' . Common::prefixTable('log_visit') . ' AS log_visit
                 WHERE
                     ' . $expected['where'],
             'bind' => $expected['bind']
@@ -142,7 +142,7 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     *
                 FROM
-                    " . Piwik_Common::prefixTable('log_visit') . " AS log_visit
+                    " . Common::prefixTable('log_visit') . " AS log_visit
                 WHERE
                     ( idsite = ? )
                     AND
@@ -173,8 +173,8 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     *
                 FROM
-                    " . Piwik_Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_visit') . " AS log_visit ON log_visit.idvisit = log_link_visit_action.idvisit
+                    " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
+                    LEFT JOIN " . Common::prefixTable('log_visit') . " AS log_visit ON log_visit.idvisit = log_link_visit_action.idvisit
                 WHERE
                     ( log_link_visit_action.idvisit = ? )
                     AND
@@ -210,8 +210,8 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                     log_visit.visit_total_actions,
                     log_visit.visit_total_time
                 FROM
-                    " . Piwik_Common::prefixTable('log_visit') . " AS log_visit
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit
+                    " . Common::prefixTable('log_visit') . " AS log_visit
+                    LEFT JOIN " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit
                 WHERE
                     ( log_visit.idvisit = ? )
                     AND
@@ -244,8 +244,8 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     *
                 FROM
-                    " . Piwik_Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion ON log_conversion.idlink_va = log_link_visit_action.idlink_va AND log_conversion.idsite = log_link_visit_action.idsite
+                    " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
+                    LEFT JOIN " . Common::prefixTable('log_conversion') . " AS log_conversion ON log_conversion.idlink_va = log_link_visit_action.idlink_va AND log_conversion.idsite = log_link_visit_action.idsite
                 WHERE
                     ( log_link_visit_action.idvisit = ? )
                     AND
@@ -276,8 +276,8 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     *
                 FROM
-                    " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action ON log_conversion.idlink_va = log_link_visit_action.idlink_va
+                    " . Common::prefixTable('log_conversion') . " AS log_conversion
+                    LEFT JOIN " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action ON log_conversion.idlink_va = log_link_visit_action.idlink_va
                 WHERE
                     ( log_conversion.idvisit = ? )
                     AND
@@ -312,8 +312,8 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     log_visit.*
                 FROM
-                    " . Piwik_Common::prefixTable('log_visit') . " AS log_visit
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion ON log_conversion.idvisit = log_visit.idvisit
+                    " . Common::prefixTable('log_visit') . " AS log_visit
+                    LEFT JOIN " . Common::prefixTable('log_conversion') . " AS log_conversion ON log_conversion.idvisit = log_visit.idvisit
                 WHERE
                     ( log_visit.idvisit = ? )
                     AND
@@ -346,7 +346,7 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     log_conversion.*
                 FROM
-                    " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion
+                    " . Common::prefixTable('log_conversion') . " AS log_conversion
                 WHERE
                     ( log_conversion.idvisit = ? )
                     AND
@@ -377,8 +377,8 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     *
                 FROM
-                    " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_visit') . " AS log_visit ON log_conversion.idvisit = log_visit.idvisit
+                    " . Common::prefixTable('log_conversion') . " AS log_conversion
+                    LEFT JOIN " . Common::prefixTable('log_visit') . " AS log_visit ON log_conversion.idvisit = log_visit.idvisit
                 WHERE
                     ( log_conversion.idvisit = ? )
                     AND
@@ -412,9 +412,9 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     *
                 FROM
-                    " . Piwik_Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_visit') . " AS log_visit ON log_visit.idvisit = log_link_visit_action.idvisit
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion ON log_conversion.idlink_va = log_link_visit_action.idlink_va AND log_conversion.idsite = log_link_visit_action.idsite
+                    " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
+                    LEFT JOIN " . Common::prefixTable('log_visit') . " AS log_visit ON log_visit.idvisit = log_link_visit_action.idvisit
+                    LEFT JOIN " . Common::prefixTable('log_conversion') . " AS log_conversion ON log_conversion.idlink_va = log_link_visit_action.idlink_va AND log_conversion.idsite = log_link_visit_action.idsite
                 WHERE
                      HOUR(log_visit.visit_last_action_time) = ? AND log_conversion.idgoal = ? ",
             "bind" => array(12, 1));
@@ -450,9 +450,9 @@ class SegmentTest extends PHPUnit_Framework_TestCase
                 SELECT
                     log_visit.*
                 FROM
-                    " . Piwik_Common::prefixTable('log_visit') . " AS log_visit
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit
-                    LEFT JOIN " . Piwik_Common::prefixTable('log_conversion') . " AS log_conversion ON log_conversion.idlink_va = log_link_visit_action.idlink_va AND log_conversion.idsite = log_link_visit_action.idsite
+                    " . Common::prefixTable('log_visit') . " AS log_visit
+                    LEFT JOIN " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit
+                    LEFT JOIN " . Common::prefixTable('log_conversion') . " AS log_conversion ON log_conversion.idlink_va = log_link_visit_action.idlink_va AND log_conversion.idsite = log_link_visit_action.idsite
                 WHERE
                      log_conversion.idgoal = ? AND HOUR(log_visit.visit_last_action_time) = ? AND log_link_visit_action.custom_var_k1 = ?
                 GROUP BY log_visit.idvisit
diff --git a/tests/PHPUnit/Core/ServeStaticFileTest.php b/tests/PHPUnit/Core/ServeStaticFileTest.php
index 034a64a4ba..47747527f7 100644
--- a/tests/PHPUnit/Core/ServeStaticFileTest.php
+++ b/tests/PHPUnit/Core/ServeStaticFileTest.php
@@ -13,7 +13,7 @@
 
 // This is Piwik logo, the static file used in this test suit
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 define("TEST_FILE_LOCATION", realpath(dirname(__FILE__) . "/../../resources/lipsum.txt"));
 define("TEST_FILE_CONTENT_TYPE", "text/plain");
@@ -101,7 +101,7 @@ class Test_Piwik_ServeStaticFile extends PHPUnit_Framework_TestCase
          * This test would fail on a windows environment because it is not possible to remove reading rights on a
          * windows file using PHP.
          */
-        if (Piwik_Common::isWindows()) {
+        if (Common::isWindows()) {
             return;
         }
 
diff --git a/tests/PHPUnit/Core/TranslationWriterTest.php b/tests/PHPUnit/Core/TranslationWriterTest.php
index 187996ed0b..6b36c76dbf 100644
--- a/tests/PHPUnit/Core/TranslationWriterTest.php
+++ b/tests/PHPUnit/Core/TranslationWriterTest.php
@@ -1,5 +1,5 @@
 <?php
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Piwik - Open source web analytics
@@ -64,7 +64,7 @@ class TranslationWriterTest extends PHPUnit_Framework_TestCase
      */
     public function testQuote($data, $expected)
     {
-        if (Piwik_Common::isWindows() && $data == "\n") {
+        if (Common::isWindows() && $data == "\n") {
             return;
         }
         $this->assertEquals($expected, Piwik_TranslationWriter::quote($data));
@@ -164,7 +164,7 @@ class TranslationWriterTest extends PHPUnit_Framework_TestCase
 
         $contents = file_get_contents($path);
         $expected = "<?php\n\$translations = array(\n\t'General_Locale' => 'en_CA.UTF-8',\n\t'General_Id' => 'Id',\n\t'Goals_Goals' => 'Goals',\n\n\t// FOR REVIEW\n\t'Plugin_Body' => 'Message\nBody',\n);\n";
-        if (Piwik_Common::isWindows()) $expected = str_replace("\r\n", "\n", $expected);
+        if (Common::isWindows()) $expected = str_replace("\r\n", "\n", $expected);
         $this->assertEquals($expected, $contents);
     }
 }
diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php
index df3fd04f16..dfb515b713 100644
--- a/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php
+++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php
@@ -5,7 +5,7 @@
  * @link    http://piwik.org
  * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php';
 
@@ -87,7 +87,7 @@ class Test_Piwik_Fixture_ManySitesImportedLogsWithXssAttempts extends Test_Piwik
         
         foreach ($dashboards as $id => $layout) {
             $_GET['name'] = self::makeXssContent('dashboard name' . $id);
-            $_GET['layout'] = Piwik_Common::json_encode($layout);
+            $_GET['layout'] = Common::json_encode($layout);
             $_GET['idDashboard'] = $id + 1;
             Piwik_FrontController::getInstance()->fetchDispatch('Dashboard', 'saveLayout');
         }
@@ -117,7 +117,7 @@ class Test_Piwik_Fixture_ManySitesImportedLogsWithXssAttempts extends Test_Piwik
     {
         $result = "<script>$('body').html('$type XSS!');</script>";
         if ($sanitize) {
-            $result = Piwik_Common::sanitizeInputValue($result);
+            $result = Common::sanitizeInputValue($result);
         }
         return $result;
     }
diff --git a/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php b/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
index 92f495fac1..b8a4520456 100755
--- a/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
+++ b/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
@@ -6,7 +6,7 @@
  * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Tests some API using range periods & makes sure the correct amount of blob/numeric
@@ -99,11 +99,11 @@ class Test_Piwik_Integration_OneVisitorOneWebsite_SeveralDaysDateRange_Archiving
             'archive_numeric_2011_01' => 0,
         );
         foreach ($tests as $table => $expectedRows) {
-            $sql = "SELECT count(*) FROM " . Piwik_Common::prefixTable($table) . " WHERE period = " . Piwik::$idPeriods['range'];
+            $sql = "SELECT count(*) FROM " . Common::prefixTable($table) . " WHERE period = " . Piwik::$idPeriods['range'];
             $countBlobs = Zend_Registry::get('db')->fetchOne($sql);
 
             if($expectedRows != $countBlobs) {
-                var_export(Zend_Registry::get('db')->fetchAll("SELECT * FROM " . Piwik_Common::prefixTable($table). " WHERE period = " . Piwik::$idPeriods['range'] . " ORDER BY idarchive ASC"));
+                var_export(Zend_Registry::get('db')->fetchAll("SELECT * FROM " . Common::prefixTable($table). " WHERE period = " . Piwik::$idPeriods['range'] . " ORDER BY idarchive ASC"));
             }
             $this->assertEquals($expectedRows, $countBlobs, "$table expected $expectedRows, got $countBlobs");
         }
diff --git a/tests/PHPUnit/Integration/TwoVisitsWithCustomVariables_SegmentMatchVisitorTypeTest.php b/tests/PHPUnit/Integration/TwoVisitsWithCustomVariables_SegmentMatchVisitorTypeTest.php
index 3fd750022b..fa43ef7cea 100755
--- a/tests/PHPUnit/Integration/TwoVisitsWithCustomVariables_SegmentMatchVisitorTypeTest.php
+++ b/tests/PHPUnit/Integration/TwoVisitsWithCustomVariables_SegmentMatchVisitorTypeTest.php
@@ -5,7 +5,7 @@
  * @link    http://piwik.org
  * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Tests use of custom variable segments.
@@ -86,11 +86,11 @@ class Test_Piwik_Integration_TwoVisitsWithCustomVariables_SegmentMatchVisitorTyp
             'archive_numeric_2009_12' => (6 + 2 + 3) * 2,
         );
         foreach ($tests as $table => $expectedRows) {
-            $sql = "SELECT count(*) FROM " . Piwik_Common::prefixTable($table);
+            $sql = "SELECT count(*) FROM " . Common::prefixTable($table);
             $countBlobs = Zend_Registry::get('db')->fetchOne($sql);
 
             if($expectedRows != $countBlobs) {
-                var_export(Zend_Registry::get('db')->fetchAll("SELECT * FROM " . Piwik_Common::prefixTable($table) . " ORDER BY name, idarchive ASC"));
+                var_export(Zend_Registry::get('db')->fetchAll("SELECT * FROM " . Common::prefixTable($table) . " ORDER BY name, idarchive ASC"));
             }
             $this->assertEquals($expectedRows, $countBlobs, "$table: %s");
         }
diff --git a/tests/PHPUnit/Integration/UrlNormalizationTest.php b/tests/PHPUnit/Integration/UrlNormalizationTest.php
index a2b0e6c702..cf0237bcc3 100644
--- a/tests/PHPUnit/Integration/UrlNormalizationTest.php
+++ b/tests/PHPUnit/Integration/UrlNormalizationTest.php
@@ -1,5 +1,5 @@
 <?php
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 /**
  * Tests the URL normalization.
@@ -85,12 +85,12 @@ class Test_Piwik_Integration_UrlNormalization extends IntegrationTestCase
      */
     public function testCheckPostConditions()
     {
-        $sql = "SELECT count(*) FROM " . Piwik_Common::prefixTable('log_action');
+        $sql = "SELECT count(*) FROM " . Common::prefixTable('log_action');
         $count = Zend_Registry::get('db')->fetchOne($sql);
         $expected = 9; // 4 urls + 5 titles
         $this->assertEquals($expected, $count, "only $expected actions expected");
 
-        $sql = "SELECT name, url_prefix FROM " . Piwik_Common::prefixTable('log_action')
+        $sql = "SELECT name, url_prefix FROM " . Common::prefixTable('log_action')
             . " WHERE type = " . Piwik_Tracker_Action::TYPE_ACTION_URL
             . " ORDER BY idaction ASC";
         $urls = Zend_Registry::get('db')->fetchAll($sql);
diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php
index 86460d46d5..624efa9b55 100755
--- a/tests/PHPUnit/IntegrationTestCase.php
+++ b/tests/PHPUnit/IntegrationTestCase.php
@@ -7,7 +7,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once PIWIK_INCLUDE_PATH . '/libs/PiwikTracker/PiwikTracker.php';
 
@@ -706,7 +706,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
                                 && $isTestLogImportReverseChronological;
 
         $request = new Piwik_API_Request($requestUrl);
-        $dateTime = Piwik_Common::getRequestVar('date', '', 'string', Piwik_Common::getArrayFromQueryString($requestUrl));
+        $dateTime = Common::getRequestVar('date', '', 'string', Common::getArrayFromQueryString($requestUrl));
 
         list($processedFilePath, $expectedFilePath) = $this->getProcessedAndExpectedPaths($testName, $apiId);
 
@@ -1089,7 +1089,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
                 $tableType = strpos($table, 'archive_numeric') !== false ? 'archive_numeric' : 'archive_blob';
 
                 $createSql = Piwik::getTableCreateSql($tableType);
-                $createSql = str_replace(Piwik_Common::prefixTable($tableType), $table, $createSql);
+                $createSql = str_replace(Common::prefixTable($tableType), $table, $createSql);
                 Piwik_Query($createSql);
             }
 
diff --git a/tests/PHPUnit/Plugins/LanguagesManagerTest.php b/tests/PHPUnit/Plugins/LanguagesManagerTest.php
index 2b47a4bb80..2b0571460c 100755
--- a/tests/PHPUnit/Plugins/LanguagesManagerTest.php
+++ b/tests/PHPUnit/Plugins/LanguagesManagerTest.php
@@ -5,7 +5,7 @@
  * @link    http://piwik.org
  * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  */
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once 'LanguagesManager/API.php';
 
@@ -26,8 +26,8 @@ class Test_LanguagesManager extends PHPUnit_Framework_TestCase
 
     function getTestDataForLanguageFiles()
     {
-        self::$allLanguages = Piwik_Common::getLanguagesList();
-        self::$allCountries = Piwik_Common::getCountriesList();
+        self::$allLanguages = Common::getLanguagesList();
+        self::$allCountries = Common::getCountriesList();
         self::$englishStringsWithParameters = array();
         self::$englishStringsIndexed = array();
         self::$expectedLanguageKeys = array();
@@ -283,7 +283,7 @@ class Test_LanguagesManager extends PHPUnit_Framework_TestCase
      */
     function testGetLanguagesList()
     {
-        $languages = Piwik_Common::getLanguagesList();
+        $languages = Common::getLanguagesList();
         $this->assertTrue(count($languages) > 0);
         foreach ($languages as $langCode => $langs) {
             $this->assertTrue(strlen($langCode) == 2, "$langCode length = 2");
diff --git a/tests/PHPUnit/Plugins/PrivacyManagerTest.php b/tests/PHPUnit/Plugins/PrivacyManagerTest.php
index 2b81e55dad..3c8c32cd10 100755
--- a/tests/PHPUnit/Plugins/PrivacyManagerTest.php
+++ b/tests/PHPUnit/Plugins/PrivacyManagerTest.php
@@ -7,7 +7,7 @@
  */
 use Piwik\Core\Config;
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 require_once 'PrivacyManager/PrivacyManager.php';
 
@@ -110,7 +110,7 @@ class PrivacyManagerTest extends IntegrationTestCase
         Piwik_Tracker_Cache::deleteTrackerCache();
         Piwik_DataAccess_ArchiveTableCreator::clear();
 
-        $tempTableName = Piwik_Common::prefixTable(Piwik_PrivacyManager_LogDataPurger::TEMP_TABLE_NAME);
+        $tempTableName = Common::prefixTable(Piwik_PrivacyManager_LogDataPurger::TEMP_TABLE_NAME);
         Piwik_Query("DROP TABLE IF EXISTS " . $tempTableName);
     }
 
@@ -182,12 +182,12 @@ class PrivacyManagerTest extends IntegrationTestCase
 
         // perform checks on prediction
         $expectedPrediction = array(
-            Piwik_Common::prefixTable('log_conversion')          => 6,
-            Piwik_Common::prefixTable('log_link_visit_action')   => 6,
-            Piwik_Common::prefixTable('log_visit')               => 3,
-            Piwik_Common::prefixTable('log_conversion_item')     => 3,
-            Piwik_Common::prefixTable('archive_numeric_2012_01') => -1,
-            Piwik_Common::prefixTable('archive_blob_2012_01')    => -1
+            Common::prefixTable('log_conversion')          => 6,
+            Common::prefixTable('log_link_visit_action')   => 6,
+            Common::prefixTable('log_visit')               => 3,
+            Common::prefixTable('log_conversion_item')     => 3,
+            Common::prefixTable('archive_numeric_2012_01') => -1,
+            Common::prefixTable('archive_blob_2012_01')    => -1
         );
         $this->assertEquals($expectedPrediction, $prediction);
 
@@ -300,12 +300,12 @@ class PrivacyManagerTest extends IntegrationTestCase
 
         // perform checks on prediction
         $expectedPrediction = array(
-            Piwik_Common::prefixTable('log_conversion')          => 6,
-            Piwik_Common::prefixTable('log_link_visit_action')   => 6,
-            Piwik_Common::prefixTable('log_visit')               => 3,
-            Piwik_Common::prefixTable('log_conversion_item')     => 3,
-            Piwik_Common::prefixTable('archive_numeric_2012_01') => 1, // remove the garbage metric
-            Piwik_Common::prefixTable('archive_blob_2012_01')    => -1
+            Common::prefixTable('log_conversion')          => 6,
+            Common::prefixTable('log_link_visit_action')   => 6,
+            Common::prefixTable('log_visit')               => 3,
+            Common::prefixTable('log_conversion_item')     => 3,
+            Common::prefixTable('archive_numeric_2012_01') => 1, // remove the garbage metric
+            Common::prefixTable('archive_blob_2012_01')    => -1
         );
         $this->assertEquals($expectedPrediction, $prediction);
 
@@ -326,7 +326,7 @@ class PrivacyManagerTest extends IntegrationTestCase
         $this->assertEquals($janRowCount, $tableCount); // January
 
         if($janRowCount != $tableCount) {
-            var_export(Piwik_FetchAll("SELECT * FROM " . Piwik_Common::prefixTable($tableName) ));
+            var_export(Piwik_FetchAll("SELECT * FROM " . Common::prefixTable($tableName) ));
         }
 
         // check february numerics not deleted
@@ -358,12 +358,12 @@ class PrivacyManagerTest extends IntegrationTestCase
         // perform checks on prediction
         $unexplained = 0;//-2;
         $expectedPrediction = array(
-            Piwik_Common::prefixTable('log_conversion')          => 6,
-            Piwik_Common::prefixTable('log_link_visit_action')   => 6,
-            Piwik_Common::prefixTable('log_visit')               => 3,
-            Piwik_Common::prefixTable('log_conversion_item')     => 3,
-            Piwik_Common::prefixTable('archive_numeric_2012_01') => -1,
-            Piwik_Common::prefixTable('archive_blob_2012_01')    => 10 + $unexplained // removing 4 weeks, 1 month & 1 year + 1 garbage report + 2 range reports + 1 segmented report
+            Common::prefixTable('log_conversion')          => 6,
+            Common::prefixTable('log_link_visit_action')   => 6,
+            Common::prefixTable('log_visit')               => 3,
+            Common::prefixTable('log_conversion_item')     => 3,
+            Common::prefixTable('archive_numeric_2012_01') => -1,
+            Common::prefixTable('archive_blob_2012_01')    => 10 + $unexplained // removing 4 weeks, 1 month & 1 year + 1 garbage report + 2 range reports + 1 segmented report
         );
         $this->assertEquals($expectedPrediction, $prediction);
 
@@ -395,12 +395,12 @@ class PrivacyManagerTest extends IntegrationTestCase
         // perform checks on prediction
         $unexplained = 0;//-2;
         $expectedPrediction = array(
-            Piwik_Common::prefixTable('log_conversion')          => 6,
-            Piwik_Common::prefixTable('log_link_visit_action')   => 6,
-            Piwik_Common::prefixTable('log_visit')               => 3,
-            Piwik_Common::prefixTable('log_conversion_item')     => 3,
-            Piwik_Common::prefixTable('archive_numeric_2012_01') => -1,
-            Piwik_Common::prefixTable('archive_blob_2012_01')    => 11 + $unexplained // 5 days, 1 month & 1 year to remove + 1 garbage report + 2 range reports + 1 segmented report
+            Common::prefixTable('log_conversion')          => 6,
+            Common::prefixTable('log_link_visit_action')   => 6,
+            Common::prefixTable('log_visit')               => 3,
+            Common::prefixTable('log_conversion_item')     => 3,
+            Common::prefixTable('archive_numeric_2012_01') => -1,
+            Common::prefixTable('archive_blob_2012_01')    => 11 + $unexplained // 5 days, 1 month & 1 year to remove + 1 garbage report + 2 range reports + 1 segmented report
         );
         $this->assertEquals($expectedPrediction, $prediction);
 
@@ -432,12 +432,12 @@ class PrivacyManagerTest extends IntegrationTestCase
         $unexplained = 0;//-1;
         // perform checks on prediction
         $expectedPrediction = array(
-            Piwik_Common::prefixTable('log_conversion')          => 6,
-            Piwik_Common::prefixTable('log_link_visit_action')   => 6,
-            Piwik_Common::prefixTable('log_visit')               => 3,
-            Piwik_Common::prefixTable('log_conversion_item')     => 3,
-            Piwik_Common::prefixTable('archive_numeric_2012_01') => -1,
-            Piwik_Common::prefixTable('archive_blob_2012_01')    => 14 + $unexplained // 5 days, 4 weeks, 1 year to remove + 1 garbage report + 2 range reports + 1 segmented report
+            Common::prefixTable('log_conversion')          => 6,
+            Common::prefixTable('log_link_visit_action')   => 6,
+            Common::prefixTable('log_visit')               => 3,
+            Common::prefixTable('log_conversion_item')     => 3,
+            Common::prefixTable('archive_numeric_2012_01') => -1,
+            Common::prefixTable('archive_blob_2012_01')    => 14 + $unexplained // 5 days, 4 weeks, 1 year to remove + 1 garbage report + 2 range reports + 1 segmented report
         );
         $this->assertEquals($expectedPrediction, $prediction);
 
@@ -469,12 +469,12 @@ class PrivacyManagerTest extends IntegrationTestCase
         // perform checks on prediction
         $unexplained = 0;//-1;
         $expectedPrediction = array(
-            Piwik_Common::prefixTable('log_conversion')          => 6,
-            Piwik_Common::prefixTable('log_link_visit_action')   => 6,
-            Piwik_Common::prefixTable('log_visit')               => 3,
-            Piwik_Common::prefixTable('log_conversion_item')     => 3,
-            Piwik_Common::prefixTable('archive_numeric_2012_01') => -1,
-            Piwik_Common::prefixTable('archive_blob_2012_01')    => 14 + $unexplained // 5 days, 4 weeks & 1 year to remove + 1 garbage report + 2 range reports + 1 segmented report
+            Common::prefixTable('log_conversion')          => 6,
+            Common::prefixTable('log_link_visit_action')   => 6,
+            Common::prefixTable('log_visit')               => 3,
+            Common::prefixTable('log_conversion_item')     => 3,
+            Common::prefixTable('archive_numeric_2012_01') => -1,
+            Common::prefixTable('archive_blob_2012_01')    => 14 + $unexplained // 5 days, 4 weeks & 1 year to remove + 1 garbage report + 2 range reports + 1 segmented report
         );
         $this->assertEquals($expectedPrediction, $prediction);
 
@@ -501,7 +501,7 @@ class PrivacyManagerTest extends IntegrationTestCase
         $purger = Piwik_PrivacyManager_LogDataPurger::make($this->settings, true);
 
         $this->unusedIdAction = Piwik_FetchOne(
-            "SELECT idaction FROM " . Piwik_Common::prefixTable('log_action') . " WHERE name = ?",
+            "SELECT idaction FROM " . Common::prefixTable('log_action') . " WHERE name = ?",
             array('whatever.com/_40'));
         $this->assertTrue($this->unusedIdAction > 0);
 
@@ -513,7 +513,7 @@ class PrivacyManagerTest extends IntegrationTestCase
 
         // check that the unused action still exists
         $count = Piwik_FetchOne(
-            "SELECT COUNT(*) FROM " . Piwik_Common::prefixTable('log_action') . " WHERE idaction = ?",
+            "SELECT COUNT(*) FROM " . Common::prefixTable('log_action') . " WHERE idaction = ?",
             array($this->unusedIdAction));
         $this->assertEquals(1, $count);
 
@@ -538,12 +538,12 @@ class PrivacyManagerTest extends IntegrationTestCase
         // perform checks on prediction
         $unexplained = 0;//-2;
         $expectedPrediction = array(
-            Piwik_Common::prefixTable('log_conversion')          => 6,
-            Piwik_Common::prefixTable('log_link_visit_action')   => 6,
-            Piwik_Common::prefixTable('log_visit')               => 3,
-            Piwik_Common::prefixTable('log_conversion_item')     => 3,
-            Piwik_Common::prefixTable('archive_numeric_2012_01') => -1,
-            Piwik_Common::prefixTable('archive_blob_2012_01')    => 13 + $unexplained // 5 days, 4 weeks, 1 month & 1 year + 1 garbage report + 1 segmented report
+            Common::prefixTable('log_conversion')          => 6,
+            Common::prefixTable('log_link_visit_action')   => 6,
+            Common::prefixTable('log_visit')               => 3,
+            Common::prefixTable('log_conversion_item')     => 3,
+            Common::prefixTable('archive_numeric_2012_01') => -1,
+            Common::prefixTable('archive_blob_2012_01')    => 13 + $unexplained // 5 days, 4 weeks, 1 month & 1 year + 1 garbage report + 1 segmented report
         );
         $this->assertEquals($expectedPrediction, $prediction);
 
@@ -576,12 +576,12 @@ class PrivacyManagerTest extends IntegrationTestCase
         // perform checks on prediction
         $unexplained = 0;//-2;
         $expectedPrediction = array(
-            Piwik_Common::prefixTable('log_conversion')          => 6,
-            Piwik_Common::prefixTable('log_link_visit_action')   => 6,
-            Piwik_Common::prefixTable('log_visit')               => 3,
-            Piwik_Common::prefixTable('log_conversion_item')     => 3,
-            Piwik_Common::prefixTable('archive_numeric_2012_01') => -1,
-            Piwik_Common::prefixTable('archive_blob_2012_01')    => 9 + $unexplained // 4 weeks, 1 month & 1 year + 1 garbage report + 2 range reports
+            Common::prefixTable('log_conversion')          => 6,
+            Common::prefixTable('log_link_visit_action')   => 6,
+            Common::prefixTable('log_visit')               => 3,
+            Common::prefixTable('log_conversion_item')     => 3,
+            Common::prefixTable('archive_numeric_2012_01') => -1,
+            Common::prefixTable('archive_blob_2012_01')    => 9 + $unexplained // 4 weeks, 1 month & 1 year + 1 garbage report + 2 range reports
         );
         $this->assertEquals($expectedPrediction, $prediction);
 
@@ -715,12 +715,12 @@ class PrivacyManagerTest extends IntegrationTestCase
 
         $archiveTables = self::_getArchiveTableNames();
         foreach ($archiveTables['numeric'] as $table) {
-            $realTable = Piwik_Common::prefixTable($table);
+            $realTable = Common::prefixTable($table);
             $sql = "DELETE FROM $realTable WHERE name NOT IN ('" . implode("','", $metricsToSave) . "') AND name NOT LIKE 'done%'";
             Piwik_Query($sql);
         }
         foreach ($archiveTables['blob'] as $table) {
-            $realTable = Piwik_Common::prefixTable($table);
+            $realTable = Common::prefixTable($table);
             Piwik_Query("DELETE FROM $realTable WHERE name NOT IN ('VisitorInterest_timeGap')");
         }
 
@@ -732,15 +732,15 @@ class PrivacyManagerTest extends IntegrationTestCase
                         VALUES (10000,?,1,?,?,?,?,?)";
 
         // one metric for jan & one for feb
-        Piwik_Query(sprintf($sql, Piwik_Common::prefixTable($archiveTables['numeric'][0])),
+        Piwik_Query(sprintf($sql, Common::prefixTable($archiveTables['numeric'][0])),
             array(self::GARBAGE_FIELD, $janDate1, $janDate1, $janDate1, 1, 100));
-        Piwik_Query(sprintf($sql, Piwik_Common::prefixTable($archiveTables['numeric'][1])),
+        Piwik_Query(sprintf($sql, Common::prefixTable($archiveTables['numeric'][1])),
             array(self::GARBAGE_FIELD, $febDate1, $febDate1, $febDate1, 1, 200));
 
         // add garbage reports
-        Piwik_Query(sprintf($sql, Piwik_Common::prefixTable($archiveTables['blob'][0])),
+        Piwik_Query(sprintf($sql, Common::prefixTable($archiveTables['blob'][0])),
             array(self::GARBAGE_FIELD, $janDate1, $janDate1, $janDate1, 10, 'blobval'));
-        Piwik_Query(sprintf($sql, Piwik_Common::prefixTable($archiveTables['blob'][1])),
+        Piwik_Query(sprintf($sql, Common::prefixTable($archiveTables['blob'][1])),
             array(self::GARBAGE_FIELD, $febDate1, $febDate1, $febDate1, 20, 'blobval'));
     }
 
@@ -817,8 +817,8 @@ class PrivacyManagerTest extends IntegrationTestCase
             return;
         }
 
-        $tempTableName = Piwik_Common::prefixTable(Piwik_PrivacyManager_LogDataPurger::TEMP_TABLE_NAME);
-        $logLinkVisitActionTable = Piwik_Common::prefixTable("log_link_visit_action");
+        $tempTableName = Common::prefixTable(Piwik_PrivacyManager_LogDataPurger::TEMP_TABLE_NAME);
+        $logLinkVisitActionTable = Common::prefixTable("log_link_visit_action");
 
         $sql = "INSERT INTO $logLinkVisitActionTable
                             (idsite, idvisitor, server_time, idvisit, idaction_url, idaction_url_ref,
@@ -840,7 +840,7 @@ class PrivacyManagerTest extends IntegrationTestCase
 
     protected function _getTableCount($tableName, $where = '')
     {
-        $sql = "SELECT COUNT(*) FROM " . Piwik_Common::prefixTable($tableName) . " $where";
+        $sql = "SELECT COUNT(*) FROM " . Common::prefixTable($tableName) . " $where";
         return Piwik_FetchOne($sql);
     }
 
@@ -849,7 +849,7 @@ class PrivacyManagerTest extends IntegrationTestCase
         $dbName = Config::getInstance()->database['dbname'];
 
         $sql = "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = ? AND table_name = ?";
-        return Piwik_FetchOne($sql, array($dbName, Piwik_Common::prefixTable($tableName))) == 1;
+        return Piwik_FetchOne($sql, array($dbName, Common::prefixTable($tableName))) == 1;
     }
 
     protected static function _getArchiveTableNames()
diff --git a/tests/resources/staticFileServer.php b/tests/resources/staticFileServer.php
index e0e2a00dc1..510e1794dc 100644
--- a/tests/resources/staticFileServer.php
+++ b/tests/resources/staticFileServer.php
@@ -10,7 +10,7 @@
  * serveStaticFile.test.php has been created to avoid making too many modifications to /tests/core/Piwik.test.php
  */
 use Piwik\Core\Piwik;
-use Piwik\Core\Piwik_Common;
+use Piwik\Core\Common;
 
 define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__).'/../../');
 if(file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php'))
@@ -61,10 +61,10 @@ define("TEST_FILE_SRV_MODE", "testFile");
  * the execution of Piwik:serveStaticFile(). In this case, unit tests won't be executed
  */
 // Getting the server mode
-$staticFileServerMode = Piwik_Common::getRequestVar(SRV_MODE_REQUEST_VAR, "");
+$staticFileServerMode = Common::getRequestVar(SRV_MODE_REQUEST_VAR, "");
 
 // Setting zlib output compression as requested
-ini_set('zlib.output_compression', Piwik_Common::getRequestVar(ZLIB_OUTPUT_REQUEST_VAR, '0'));
+ini_set('zlib.output_compression', Common::getRequestVar(ZLIB_OUTPUT_REQUEST_VAR, '0'));
 
 if ($staticFileServerMode === "") {
     throw new Exception("When this testing file is used as a static file server, the request parameter " .
-- 
GitLab