From fee89fecad93a1f182550c1df5946eea16338f11 Mon Sep 17 00:00:00 2001
From: mage2-team <mage2-team@magento.com>
Date: Fri, 28 Dec 2012 18:14:20 -0800
Subject: [PATCH] 2.0.0.0-dev37 * Refactored a variety of grids in backend
 (admin) to make them configurable through layout, rather than hard-coded. The
 following classes were affected (converted): `Mage_User_Block_User_Grid`,
 `Mage_User_Block_Role_Grid`, `Mage_Adminhtml_Block_System_Design_Grid`,
 `Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid`,
 `Mage_Adminhtml_Block_Newsletter_Problem_Grid`,
 `Mage_Adminhtml_Block_Backup_Grid`, `Mage_Adminhtml_Block_Tax_Rate_Grid`,
 `Mage_Adminhtml_Block_System_Store_Grid`,
 `Mage_Adminhtml_Block_System_Email_Template_Grid`,
 `Mage_Adminhtml_Block_Sitemap_Grid`,
 `Mage_Adminhtml_Block_Catalog_Search_Grid`,
 `Mage_Adminhtml_Block_Urlrewrite_Grid`,
 `Mage_Adminhtml_Block_System_Variable_Grid`,
 `Mage_Adminhtml_Block_Report_Review_Customer_Grid`,
 `Mage_Adminhtml_Block_Report_Review_Product_Grid` * Modified behavior of
 configuration merging. Each config file can be separately validated against
 DOM schema. * Moved `Mage_Adminhtml_Utility_Controller` to `Backend` and
 changed all child classes * Changes in Profiler system:   * Created separate
 component for handling Profiler Driver selection logic   * Extended
 `Magento_Profiler::start()` calls with tags as second argument * Bug fix -
 Added additional validation into `Mage_Adminhtml_Catalog_CategoryController`
 to prevent saving new category with any id using firebug

---
 CHANGELOG.markdown                            |  10 +
 app/Mage.php                                  |   4 +-
 app/bootstrap.php                             |  32 ++-
 .../Moneybookers/etc/adminhtml/system.xml     |   2 +-
 app/code/core/Mage/Adminhtml/Block/Backup.php |   1 -
 .../core/Mage/Adminhtml/Block/Backup/Grid.php | 142 ------------
 .../Catalog/Product/Attribute/Set/Grid.php    |  78 -------
 .../Adminhtml/Block/Catalog/Search/Grid.php   | 178 ---------------
 .../Adminhtml/Block/Newsletter/Problem.php    |   4 -
 .../Block/Newsletter/Problem/Grid.php         | 102 ---------
 .../Block/Report/Review/Customer/Grid.php     |  92 --------
 .../Block/Report/Review/Product/Grid.php      | 119 ----------
 .../Mage/Adminhtml/Block/Sitemap/Grid.php     | 114 ----------
 .../Mage/Adminhtml/Block/System/Design.php    |   4 -
 .../Adminhtml/Block/System/Design/Grid.php    | 127 -----------
 .../Adminhtml/Block/System/Email/Template.php |   5 +-
 .../Block/System/Email/Template/Grid.php      | 125 -----------
 .../Adminhtml/Block/System/Store/Grid.php     |  84 -------
 .../Adminhtml/Block/System/Variable/Grid.php  |  97 ---------
 .../Mage/Adminhtml/Block/Tax/Rate/Grid.php    | 104 ---------
 .../Mage/Adminhtml/Block/Urlrewrite/Grid.php  | 125 -----------
 .../Adminhtml/Model/UrlRewriteOptions.php     |  60 +++++
 .../Catalog/CategoryController.php            |   3 +
 .../Catalog/Product/SetController.php         |  16 +-
 .../controllers/Catalog/SearchController.php  |   7 +-
 .../Newsletter/ProblemController.php          |   8 +-
 .../controllers/Report/ReviewController.php   |  65 +++---
 .../controllers/SitemapController.php         |   6 +-
 .../controllers/System/BackupController.php   |   5 +-
 .../controllers/System/DesignController.php   |   7 +-
 .../System/Email/TemplateController.php       |   7 +-
 .../controllers/System/StoreController.php    |   1 -
 .../controllers/System/VariableController.php |   5 +-
 .../controllers/Tax/RateController.php        |  28 +--
 .../controllers/UrlrewriteController.php      |   3 -
 app/code/core/Mage/Adminhtml/etc/config.xml   |  21 +-
 .../Mage/Adminhtml/view/adminhtml/backup.xml  | 139 ++++++++++++
 .../view/adminhtml/backup/list.phtml          |   1 +
 .../Mage/Adminhtml/view/adminhtml/catalog.xml |  40 ++++
 .../product/attribute/set/toolbar/main.phtml  |   3 +
 .../Adminhtml/view/adminhtml/newsletter.xml   |  83 +++++++
 .../view/adminhtml/system/design/design.xml   | 107 +++++++++
 .../view/adminhtml/system/email/template.xml  | 123 +++++++++++
 .../view/adminhtml/system/store/store.xml     |  80 +++++++
 .../Mage/Adminhtml/view/adminhtml/tax.xml     | 105 +++++++++
 .../view/adminhtml/tax/toolbar/rate/add.phtml |   3 +-
 .../Adminhtml/view/adminhtml/urlrewrite.xml   | 138 ++++++++++++
 .../Adminhtml/view/adminhtml/variable.xml     |  78 +++++++
 .../Mage/Backend/etc/adminhtml/system.xml     |   4 +-
 .../Grid/Column/Renderer/Download.php         |  54 +++++
 .../Block/Adminhtml/Grid/Column/Rollback.php  |  45 ++++
 .../core/Mage/Backup/Model/Grid/Options.php   |  58 +++++
 .../Mage/Captcha/etc/adminhtml/system.xml     |   4 +-
 app/code/core/Mage/Catalog/Model/Category.php |   4 +-
 .../Model/Product/Type/Configurable.php       |   6 +-
 .../Configurable/Attribute/Collection.php     |   8 +-
 .../Mage/Catalog/etc/adminhtml/system.xml     |   2 +-
 .../CatalogInventory/etc/adminhtml/system.xml |   2 +-
 .../Model/Terms/Grid/OptionsArray.php         |  62 ++++++
 .../core/Mage/CatalogSearch/etc/config.xml    |   7 +
 .../CatalogSearch/view/adminhtml/layout.xml   | 158 ++++++++++++++
 app/code/core/Mage/Core/Block/Template.php    |   3 +-
 app/code/core/Mage/Core/Model/App.php         |   2 +-
 app/code/core/Mage/Core/Model/App/Area.php    |   3 +-
 app/code/core/Mage/Core/Model/Config.php      |   5 +-
 .../Model/Layout/Argument/Handler/Url.php     |   7 +-
 .../Model/Resource/Website/Collection.php     |  15 +-
 .../Resource/Website/Grid/Collection.php      |  47 ++++
 .../Model/System/Currencysymbol.php           |   2 +-
 .../Mage/Customer/etc/adminhtml/system.xml    |   4 +-
 app/code/core/Mage/Directory/Block/Data.php   |   8 +-
 app/code/core/Mage/Directory/Helper/Data.php  |   2 +-
 .../Mage/Directory/etc/adminhtml/system.xml   |   2 +-
 app/code/core/Mage/Eav/Model/Config.php       |  11 +-
 .../Entity/Attribute/Grid/Collection.php      |  64 ++++++
 .../GoogleCheckout/etc/adminhtml/system.xml   |   4 +-
 .../Model/Resource/Grid/Collection.php        |  49 +++++
 .../core/Mage/Ogone/etc/adminhtml/system.xml  |  42 ++--
 .../Mage/Paygate/etc/adminhtml/system.xml     |   2 +-
 .../view/adminhtml/form/cashondelivery.phtml  |   2 +-
 .../view/frontend/form/cashondelivery.phtml   |   2 +-
 .../core/Mage/Paypal/etc/adminhtml/system.xml |  54 ++---
 .../Resource/Review/Customer/Collection.php   |  14 +-
 .../Resource/Review/Product/Collection.php    |  13 +-
 .../Mage/Reports/view/adminhtml/layout.xml    | 206 ++++++++++++++++++
 .../Model/Resource/Quote/Item/Collection.php  |   2 +-
 .../core/Mage/Sales/etc/adminhtml/system.xml  |   4 +-
 app/code/core/Mage/Sitemap/etc/config.xml     |   7 +
 .../Mage/Sitemap/view/adminhtml/layout.xml    | 109 +++++++++
 .../Resource/Calculation/Grid/Collection.php  |  48 ++++
 .../Adminhtml/System/Design/Theme/Grid.php    |   2 +-
 app/code/core/Mage/User/Block/Role/Grid.php   |  82 -------
 app/code/core/Mage/User/Block/User/Grid.php   | 107 ---------
 .../Model/Resource/Role/Grid/Collection.php   |  48 ++++
 .../Model/Resource/User/Locked/Collection.php |  35 ++-
 app/code/core/Mage/User/Model/Statuses.php    |  62 ++++++
 .../Adminhtml/User/RoleController.php         |   2 +-
 .../controllers/Adminhtml/UserController.php  |   2 +-
 .../core/Mage/User/view/adminhtml/layout.xml  | 142 +++++++++++-
 .../Model/Resource/Item/Collection.php        |   2 +-
 dev/build/build.properties                    |   1 +
 dev/build/build.xml                           |   1 +
 dev/build/publication/extruder/common.txt     |   3 +
 dev/build/publication/sanity/ce.xml           |   1 +
 dev/build/publication/sanity/ee.xml           |   1 +
 .../Magento/Test/Profiler/OutputBamboo.php    |  16 +-
 dev/tests/integration/framework/bootstrap.php |  16 +-
 .../Test/Profiler/OutputBambooTest.php        |   8 +-
 .../Adminhtml/DashboardControllerTest.php     |   2 +-
 .../Catalog/CategoryControllerTest.php        |  23 +-
 .../Action/AttributeControllerTest.php        |   2 +-
 .../Product/AttributeControllerTest.php       |   2 +-
 .../Catalog/Product/ReviewControllerTest.php  |   2 +-
 .../Catalog/ProductControllerTest.php         |   2 +-
 .../Customer/GroupControllerTest.php          |   2 +-
 .../controllers/CustomerControllerTest.php    |   2 +-
 .../controllers/IndexControllerTest.php       |   2 +-
 .../NewsletterQueueControllerTest.php         |   2 +-
 .../NewsletterTemplateControllerTest.php      |   2 +-
 .../Sales/Order/CreateControllerTest.php      |   2 +-
 .../Sales/Order/CreditmemoControllerTest.php  |   2 +-
 .../controllers/Sales/OrderControllerTest.php |   2 +-
 .../System/DesignControllerTest.php           |   2 +-
 .../System/VariableControllerTest.php         |   2 +-
 .../Backend/Controller/ActionAbstractTest.php |   2 +-
 .../Model/Config/Source/Admin/PageTest.php    |   2 +-
 .../Utility/Controller.php                    |   6 +-
 .../Adminhtml/System/ConfigControllerTest.php |   2 +-
 .../Mage/Centinel/CreateOrderTest.php         |   2 +-
 .../Extension/LocalControllerTest.php         |   2 +-
 .../System/Design/EditorControllerTest.php    |   2 +-
 .../controllers/PageControllerTest.php        |   2 +-
 .../GoogleShopping/ItemsControllerTest.php    |   2 +-
 .../Adminhtml/ExportControllerTest.php        |   2 +-
 .../Adminhtml/ImportControllerTest.php        |   2 +-
 .../Adminhtml/User/RoleControllerTest.php     |   2 +-
 .../Adminhtml/UserControllerTest.php          |   2 +-
 .../Widget/InstanceControllerTest.php         |   2 +-
 .../Adminhtml/WidgetControllerTest.php        |   2 +-
 .../Driver/Standard/Output/CsvfileTest.php    |   8 +-
 .../testsuite/Magento/ProfilerTest.php        | 141 ++++++++++++
 .../Legacy/_files/obsolete_classes.php        |  15 ++
 .../Model/Layout/Argument/Handler/UrlTest.php |  15 ++
 .../unit/testsuite/Magento/Config/DomTest.php |   3 -
 .../testsuite/Magento/Config/ViewTest.php     |   4 +-
 .../unit/testsuite/Magento/Config/XsdTest.php |   2 +-
 .../Magento/Config/_files/view_invalid.xml    |   5 +-
 .../Magento/Profiler/Driver/FactoryTest.php   | 128 +++++++++++
 .../Driver/Standard/Output/CsvfileTest.php    |  68 ++++++
 .../Driver/Standard/Output/FactoryTest.php    | 131 +++++++++++
 .../Driver/Standard/Output/FirebugTest.php    |  53 +++++
 .../Driver/Standard/OutputAbstractTest.php    | 121 +++++++++-
 .../Magento/Profiler/Driver/StandardTest.php  | 105 +++++++--
 .../unit/testsuite/Magento/ProfilerTest.php   | 136 +++++++++++-
 lib/Magento/Config/Dom.php                    |  62 +++++-
 .../Config/Dom/ValidationException.php        |  30 ++-
 lib/Magento/Config/XmlAbstract.php            |  38 ++--
 lib/Magento/Profiler.php                      | 112 +++++++++-
 lib/Magento/Profiler/Driver/Factory.php       |  82 +++++++
 lib/Magento/Profiler/Driver/Standard.php      | 112 +++++++++-
 .../Driver/Standard/Output/Csvfile.php        |  41 +++-
 .../Driver/Standard/Output/Factory.php        |  85 ++++++++
 .../Driver/Standard/Output/Firebug.php        |  36 ++-
 .../Driver/Standard/OutputAbstract.php        |  37 ++++
 164 files changed, 3913 insertions(+), 2113 deletions(-)
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Backup/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php
 delete mode 100644 app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php
 create mode 100644 app/code/core/Mage/Adminhtml/Model/UrlRewriteOptions.php
 create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/backup.xml
 create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/system/design/design.xml
 create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template.xml
 create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/system/store/store.xml
 create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite.xml
 create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/variable.xml
 create mode 100644 app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Renderer/Download.php
 create mode 100644 app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Rollback.php
 create mode 100644 app/code/core/Mage/Backup/Model/Grid/Options.php
 create mode 100644 app/code/core/Mage/CatalogSearch/Model/Terms/Grid/OptionsArray.php
 create mode 100644 app/code/core/Mage/CatalogSearch/view/adminhtml/layout.xml
 create mode 100644 app/code/core/Mage/Core/Model/Resource/Website/Grid/Collection.php
 create mode 100644 app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php
 create mode 100644 app/code/core/Mage/Newsletter/Model/Resource/Grid/Collection.php
 create mode 100644 app/code/core/Mage/Sitemap/view/adminhtml/layout.xml
 create mode 100644 app/code/core/Mage/Tax/Model/Resource/Calculation/Grid/Collection.php
 delete mode 100644 app/code/core/Mage/User/Block/Role/Grid.php
 delete mode 100644 app/code/core/Mage/User/Block/User/Grid.php
 create mode 100644 app/code/core/Mage/User/Model/Resource/Role/Grid/Collection.php
 rename dev/tests/integration/testsuite/Mage/User/Block/Role/GridTest.php => app/code/core/Mage/User/Model/Resource/User/Locked/Collection.php (59%)
 create mode 100644 app/code/core/Mage/User/Model/Statuses.php
 rename dev/tests/integration/testsuite/Mage/{Adminhtml => Backend}/Utility/Controller.php (89%)
 create mode 100644 dev/tests/integration/testsuite/Magento/ProfilerTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php
 rename app/code/core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml => lib/Magento/Config/Dom/ValidationException.php (51%)
 create mode 100644 lib/Magento/Profiler/Driver/Factory.php
 create mode 100644 lib/Magento/Profiler/Driver/Standard/Output/Factory.php

diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
index 87699574449..0d02ff7bbfd 100644
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -1,3 +1,13 @@
+2.0.0.0-dev37
+=============
+* Refactored a variety of grids in backend (admin) to make them configurable through layout, rather than hard-coded. The following classes were affected (converted): `Mage_User_Block_User_Grid`, `Mage_User_Block_Role_Grid`, `Mage_Adminhtml_Block_System_Design_Grid`, `Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid`, `Mage_Adminhtml_Block_Newsletter_Problem_Grid`, `Mage_Adminhtml_Block_Backup_Grid`, `Mage_Adminhtml_Block_Tax_Rate_Grid`, `Mage_Adminhtml_Block_System_Store_Grid`, `Mage_Adminhtml_Block_System_Email_Template_Grid`, `Mage_Adminhtml_Block_Sitemap_Grid`, `Mage_Adminhtml_Block_Catalog_Search_Grid`, `Mage_Adminhtml_Block_Urlrewrite_Grid`, `Mage_Adminhtml_Block_System_Variable_Grid`, `Mage_Adminhtml_Block_Report_Review_Customer_Grid`, `Mage_Adminhtml_Block_Report_Review_Product_Grid`
+* Modified behavior of configuration merging. Each config file can be separately validated against DOM schema.
+* Moved `Mage_Adminhtml_Utility_Controller` to `Backend` and changed all child classes
+* Changes in Profiler system:
+  * Created separate component for handling Profiler Driver selection logic
+  * Extended `Magento_Profiler::start()` calls with tags as second argument
+* Bug fix - Added additional validation into `Mage_Adminhtml_Catalog_CategoryController` to prevent saving new category with any id using firebug
+
 2.0.0.0-dev36
 =============
 * Visual design editor refactored
diff --git a/app/Mage.php b/app/Mage.php
index bb77e546338..770b26b50ba 100644
--- a/app/Mage.php
+++ b/app/Mage.php
@@ -170,7 +170,7 @@ final class Mage
             'revision'  => '0',
             'patch'     => '0',
             'stability' => 'dev',
-            'number'    => '36',
+            'number'    => '37',
         );
     }
 
@@ -466,7 +466,7 @@ final class Mage
      */
     public static function dispatchEvent($name, array $data = array())
     {
-        Magento_Profiler::start('EVENT:' . $name);
+        Magento_Profiler::start('EVENT:' . $name, array('group' => 'EVENT', 'name' => $name));
         $result = self::app()->dispatchEvent($name, $data);
         Magento_Profiler::stop('EVENT:'.$name);
         return $result;
diff --git a/app/bootstrap.php b/app/bootstrap.php
index 2283f095dae..f1379de37ee 100644
--- a/app/bootstrap.php
+++ b/app/bootstrap.php
@@ -96,22 +96,20 @@ if (file_exists($definitionsFile)) {
     Mage::initializeObjectManager($definitionsFile);
 }
 
-$output = null;
-if (isset($_SERVER['MAGE_PROFILER'])) {
-    switch ($_SERVER['MAGE_PROFILER']) {
-        case 'firebug':
-            $output = new Magento_Profiler_Driver_Standard_Output_Firebug();
-            break;
-        case 'csv':
-            $output = new Magento_Profiler_Driver_Standard_Output_Csvfile(__DIR__ . '/../var/log/profiler.csv');
-            break;
-        default:
-            $output = new Magento_Profiler_Driver_Standard_Output_Html();
-    }
-}
+if (!empty($_SERVER['MAGE_PROFILER'])) {
+    $profilerConfigData = $_SERVER['MAGE_PROFILER'];
 
-if ($output) {
-    $driver = new Magento_Profiler_Driver_Standard();
-    $driver->registerOutput($output);
-    Magento_Profiler::add($driver);
+    $profilerConfig = array(
+        'baseDir' => dirname(__DIR__),
+        'tagFilters' => array()
+    );
+
+    if (is_scalar($profilerConfigData)) {
+        $profilerConfig['driver'] = array(
+            'output' => is_numeric($profilerConfigData) ? 'html' : $profilerConfigData
+        );
+    } elseif (is_array($profilerConfigData)) {
+        $profilerConfig = array_merge($profilerConfig, $profilerConfigData);
+    }
+    Magento_Profiler::applyConfig($profilerConfig);
 }
diff --git a/app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml b/app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml
index 181554ef9c5..74dcc9981bc 100644
--- a/app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml
+++ b/app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml
@@ -37,7 +37,7 @@
                     <label>Email Address of Your Moneybookers Account</label>
                     <comment>
                         <![CDATA[To have access to the international payment network of Moneybookers please register <a href="http://www.moneybookers.com/partners/magento/" target="_blank">here</a> for a free account if you don't have one yet.]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="customer_id" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Customer ID</label>
diff --git a/app/code/core/Mage/Adminhtml/Block/Backup.php b/app/code/core/Mage/Adminhtml/Block/Backup.php
index 533ddfcc26b..4a090bd8db5 100644
--- a/app/code/core/Mage/Adminhtml/Block/Backup.php
+++ b/app/code/core/Mage/Adminhtml/Block/Backup.php
@@ -58,7 +58,6 @@ class Mage_Adminhtml_Block_Backup extends Mage_Adminhtml_Block_Template
             'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_MEDIA . "')",
             'class'  => ''
         ));
-        $this->addChild('backupsGrid', 'Mage_Adminhtml_Block_Backup_Grid');
 
         $this->addChild('dialogs', 'Mage_Adminhtml_Block_Backup_Dialogs');
     }
diff --git a/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php b/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php
deleted file mode 100644
index e6915350f8b..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml backups grid block
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Backup_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        $this->setSaveParametersInSession(true);
-        $this->setId('backupsGrid');
-        $this->setDefaultSort('time', 'desc');
-    }
-
-    /**
-     * Init backups collection
-     */
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getSingleton('Mage_Backup_Model_Fs_Collection');
-        $this->setCollection($collection);
-        return parent::_prepareCollection();
-    }
-
-    /**
-     * Prepare mass action controls
-     *
-     * @return Mage_Adminhtml_Block_Backup_Grid
-     */
-    protected function _prepareMassaction()
-    {
-        $this->setMassactionIdField('id');
-        $this->getMassactionBlock()->setFormFieldName('ids');
-
-        $this->getMassactionBlock()->addItem('delete', array(
-             'label'=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete'),
-             'url'  => $this->getUrl('*/*/massDelete'),
-             'confirm' => Mage::helper('Mage_Backup_Helper_Data')->__('Are you sure you want to delete the selected backup(s)?')
-        ));
-
-        return $this;
-    }
-
-    /**
-     * Configuration of grid
-     *
-     * @return Mage_Adminhtml_Block_Backup_Grid
-     */
-    protected function _prepareColumns()
-    {
-        $url7zip = Mage::helper('Mage_Adminhtml_Helper_Data')->__('The archive can be uncompressed with <a href="%s">%s</a> on Windows systems', 'http://www.7-zip.org/', '7-Zip');
-
-        $this->addColumn('time', array(
-            'header'    => Mage::helper('Mage_Backup_Helper_Data')->__('Time'),
-            'index'     => 'date_object',
-            'type'      => 'datetime',
-            'width'     => 200
-        ));
-
-        $this->addColumn('display_name', array(
-            'header'    => Mage::helper('Mage_Backup_Helper_Data')->__('Name'),
-            'index'     => 'display_name',
-            'filter'    => false,
-            'sortable'  => true,
-            'width'     => 350
-        ));
-
-        $this->addColumn('size', array(
-            'header'    => Mage::helper('Mage_Backup_Helper_Data')->__('Size, Bytes'),
-            'index'     => 'size',
-            'type'      => 'number',
-            'sortable'  => true,
-            'filter'    => false
-        ));
-
-        $this->addColumn('type', array(
-            'header'    => Mage::helper('Mage_Backup_Helper_Data')->__('Type'),
-            'type'      => 'options',
-            'options'   => Mage::helper('Mage_Backup_Helper_Data')->getBackupTypes(),
-            'index'     => 'type',
-            'width'     => 300
-        ));
-
-        $this->addColumn('download', array(
-            'header'    => Mage::helper('Mage_Backup_Helper_Data')->__('Download'),
-            'format'    => '<a href="' . $this->getUrl('*/*/download', array('time' => '$time', 'type' => '$type'))
-                . '">$extension</a> &nbsp; <small>('.$url7zip.')</small>',
-            'index'     => 'type',
-            'sortable'  => false,
-            'filter'    => false
-        ));
-
-        if (Mage::helper('Mage_Backup_Helper_Data')->isRollbackAllowed()){
-            $this->addColumn('action', array(
-                    'header'   => Mage::helper('Mage_Backup_Helper_Data')->__('Action'),
-                    'type'     => 'action',
-                    'width'    => '80px',
-                    'filter'   => false,
-                    'sortable' => false,
-                    'actions'  => array(array(
-                        'url'     => '#',
-                        'caption' => Mage::helper('Mage_Backup_Helper_Data')->__('Rollback'),
-                        'onclick' => 'return backup.rollback(\'$type\', \'$time\');'
-                    )),
-                    'index'    => 'type',
-                    'sortable' => false
-            ));
-        }
-
-        return $this;
-    }
-
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php
deleted file mode 100644
index efc4b561a61..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * description
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('setGrid');
-        $this->setDefaultSort('set_name');
-        $this->setDefaultDir('ASC');
-        $this->setSaveParametersInSession(true);
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getResourceModel('Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection')
-            ->setEntityTypeFilter(Mage::registry('entityType'));
-
-        $this->setCollection($collection);
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-        /*$this->addColumn('set_id', array(
-            'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('ID'),
-            'align'     => 'right',
-            'sortable'  => true,
-            'width'     => '50px',
-            'index'     => 'attribute_set_id',
-        ));*/
-
-        $this->addColumn('set_name', array(
-            'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Set Name'),
-            'align'     => 'left',
-            'sortable'  => true,
-            'index'     => 'attribute_set_name',
-        ));
-    }
-
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('id'=>$row->getAttributeSetId()));
-    }
-
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php
deleted file mode 100644
index 14474d75092..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php
+++ /dev/null
@@ -1,178 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * description
- *
- * @category    Mage
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Catalog_Search_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-    /**
-     * Init Grid default properties
-     *
-     */
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('catalog_search_grid');
-        $this->setDefaultSort('name');
-        $this->setDefaultDir('ASC');
-        $this->setSaveParametersInSession(true);
-    }
-
-    /**
-     * Prepare collection for Grid
-     *
-     * @return Mage_Adminhtml_Block_Catalog_Search_Grid
-     */
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getModel('Mage_CatalogSearch_Model_Query')
-            ->getResourceCollection();
-        $this->setCollection($collection);
-        return parent::_prepareCollection();
-    }
-
-    /**
-     * Prepare Grid columns
-     *
-     * @return Mage_Adminhtml_Block_Catalog_Search_Grid
-     */
-    protected function _prepareColumns()
-    {
-        /*$this->addColumn('query_id', array(
-            'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('ID'),
-            'width'     => '50px',
-            'index'     => 'query_id',
-        ));*/
-
-        $this->addColumn('search_query', array(
-            'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Search Query'),
-            'index'     => 'query_text',
-        ));
-
-        if (!Mage::app()->isSingleStoreMode()) {
-            $this->addColumn('store_id', array(
-                'header'        => Mage::helper('Mage_Catalog_Helper_Data')->__('Store'),
-                'index'         => 'store_id',
-                'type'          => 'store',
-                'store_view'    => true,
-                'sortable'      => false
-            ));
-        }
-
-        $this->addColumn('num_results', array(
-            'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Results'),
-            'index'     => 'num_results',
-            'type'      => 'number'
-        ));
-
-        $this->addColumn('popularity', array(
-            'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of Uses'),
-            'index'     => 'popularity',
-            'type'      => 'number'
-        ));
-
-        $this->addColumn('synonym_for', array(
-            'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Synonym For'),
-            'align'     => 'left',
-            'index'     => 'synonym_for',
-            'width'     => '160px'
-        ));
-
-        $this->addColumn('redirect', array(
-            'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Redirect'),
-            'align'     => 'left',
-            'index'     => 'redirect',
-            'width'     => '200px'
-        ));
-
-        $this->addColumn('display_in_terms', array(
-            'header'=>Mage::helper('Mage_Catalog_Helper_Data')->__('Display in Suggested Terms'),
-            'sortable'=>true,
-            'index'=>'display_in_terms',
-            'type' => 'options',
-            'width' => '100px',
-            'options' => array(
-                '1' => Mage::helper('Mage_Catalog_Helper_Data')->__('Yes'),
-                '0' => Mage::helper('Mage_Catalog_Helper_Data')->__('No'),
-            ),
-            'align' => 'left',
-        ));
-        $this->addColumn('action',
-            array(
-                'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Action'),
-                'width'     => '100px',
-                'type'      => 'action',
-                'getter'    => 'getId',
-                'actions'   => array(array(
-                    'caption'   => Mage::helper('Mage_Catalog_Helper_Data')->__('Edit'),
-                    'url'       => array(
-                        'base'=>'*/*/edit'
-                    ),
-                    'field'   => 'id'
-                )),
-                'filter'    => false,
-                'sortable'  => false,
-                'index'     => 'catalog',
-        ));
-        return parent::_prepareColumns();
-    }
-
-    /**
-     * Prepare grid massaction actions
-     *
-     * @return Mage_Adminhtml_Block_Catalog_Search_Grid
-     */
-    protected function _prepareMassaction()
-    {
-        $this->setMassactionIdField('query_id');
-        $this->getMassactionBlock()->setFormFieldName('search');
-
-        $this->getMassactionBlock()->addItem('delete', array(
-             'label'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete'),
-             'url'      => $this->getUrl('*/*/massDelete'),
-             'confirm'  => Mage::helper('Mage_Catalog_Helper_Data')->__('Are you sure?')
-        ));
-
-        return parent::_prepareMassaction();
-    }
-
-    /**
-     * Retrieve Row Click callback URL
-     *
-     * @return string
-     */
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('id' => $row->getId()));
-    }
-
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php
index 933c5ddbb20..8648a7f9258 100644
--- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php
+++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php
@@ -49,10 +49,6 @@ class Mage_Adminhtml_Block_Newsletter_Problem extends Mage_Adminhtml_Block_Templ
 
     protected function _prepareLayout()
     {
-        $this->setChild('grid',
-            $this->getLayout()->createBlock('Mage_Adminhtml_Block_Newsletter_Problem_Grid','newsletter.problem.grid')
-        );
-
         $this->setChild('deleteButton',
             $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button','del.button')
                 ->setData(
diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php
deleted file mode 100644
index c0317c5e79a..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml newsletter problem grid block
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Newsletter_Problem_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('problemGrid');
-        $this->setSaveParametersInSession(true);
-        $this->setMessageBlockVisibility(true);
-        $this->setUseAjax(true);
-        $this->setEmptyText(Mage::helper('Mage_Newsletter_Helper_Data')->__('No problems found.'));
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getResourceModel('Mage_Newsletter_Model_Resource_Problem_Collection')
-            ->addSubscriberInfo()
-            ->addQueueInfo();
-
-        $this->setCollection($collection);
-
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-        $this->addColumn('checkbox', array(
-             'sortable' 	=> false,
-            'filter'	=> 'Mage_Adminhtml_Block_Newsletter_Problem_Grid_Filter_Checkbox',
-            'renderer'	=> 'Mage_Adminhtml_Block_Newsletter_Problem_Grid_Renderer_Checkbox',
-            'width'		=> '20px'
-        ));
-
-        $this->addColumn('problem_id', array(
-            'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('ID'),
-            'index'  => 'problem_id',
-            'width'	 => '50px'
-        ));
-
-        $this->addColumn('subscriber', array(
-            'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Subscriber'),
-            'index'  => 'subscriber_id',
-            'format' => '#$subscriber_id $customer_name ($subscriber_email)'
-        ));
-
-        $this->addColumn('queue_start', array(
-            'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Date Start'),
-            'index'  => 'queue_start_at',
-            'gmtoffset' => true,
-            'type'	 => 'datetime'
-        ));
-
-        $this->addColumn('queue', array(
-            'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Subject'),
-            'index'  => 'template_subject'
-        ));
-
-        $this->addColumn('problem_code', array(
-            'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Error Code'),
-            'index'  => 'problem_error_code',
-            'type'   => 'number'
-        ));
-
-        $this->addColumn('problem_text', array(
-            'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Error Text'),
-            'index'  => 'problem_error_text'
-        ));
-        return parent::_prepareColumns();
-    }
-}// Class Mage_Adminhtml_Block_Newsletter_Problem_Grid END
diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php
deleted file mode 100644
index fe56c84fd4f..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml reviews by customers report grid block
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Report_Review_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('customers_grid');
-        $this->setDefaultSort('review_cnt');
-        $this->setDefaultDir('desc');
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getResourceModel('Mage_Reports_Model_Resource_Review_Customer_Collection')
-            ->joinCustomers();
-
-        $this->setCollection($collection);
-
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-        $this->addColumn('customer_name', array(
-            'header'    => Mage::helper('Mage_Reports_Helper_Data')->__('Customer Name'),
-            'index'     => 'customer_name',
-            'default'   => Mage::helper('Mage_Reports_Helper_Data')->__('Guest'),
-        ));
-
-        $this->addColumn('review_cnt', array(
-            'header'    => Mage::helper('Mage_Reports_Helper_Data')->__('Number Of Reviews'),
-            'width'     => '40px',
-            'align'     => 'right',
-            'index'     => 'review_cnt'
-        ));
-
-        $this->addColumn('action', array(
-            'header'    => Mage::helper('Mage_Reports_Helper_Data')->__('Action'),
-            'width'     => '100px',
-            'align'     => 'center',
-            'filter'    => false,
-            'sortable'  => false,
-            'renderer'  => 'Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Customer',
-            'is_system' => true
-        ));
-
-        $this->setFilterVisibility(false);
-
-        $this->addExportType('*/*/exportCustomerCsv', Mage::helper('Mage_Reports_Helper_Data')->__('CSV'));
-        $this->addExportType('*/*/exportCustomerExcel', Mage::helper('Mage_Reports_Helper_Data')->__('Excel XML'));
-
-        return parent::_prepareColumns();
-    }
-
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/catalog_product_review', array('customerId' => $row->getCustomerId()));
-    }
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php
deleted file mode 100644
index 78d39cc9774..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml reviews by products report grid block
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Report_Review_Product_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('gridProducts');
-        $this->setDefaultSort('review_cnt');
-        $this->setDefaultDir('desc');
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getResourceModel('Mage_Reports_Model_Resource_Review_Product_Collection')
-            ->joinReview();
-
-        $this->setCollection($collection);
-
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-
-        $this->addColumn('entity_id', array(
-            'header'    =>Mage::helper('Mage_Reports_Helper_Data')->__('ID'),
-            'width'     =>'50px',
-            'index'     =>'entity_id'
-        ));
-
-        $this->addColumn('name', array(
-            'header'    => Mage::helper('Mage_Reports_Helper_Data')->__('Product Name'),
-            'index'     => 'name'
-        ));
-
-        $this->addColumn('review_cnt', array(
-            'header'    =>Mage::helper('Mage_Reports_Helper_Data')->__('Number of Reviews'),
-            'width'     =>'50px',
-            'align'     =>'right',
-            'index'     =>'review_cnt'
-        ));
-
-        $this->addColumn('avg_rating', array(
-            'header'    =>Mage::helper('Mage_Reports_Helper_Data')->__('Avg. Rating'),
-            'width'     =>'50px',
-            'align'     =>'right',
-            'index'     =>'avg_rating'
-        ));
-
-        $this->addColumn('avg_rating_approved', array(
-            'header'    =>Mage::helper('Mage_Reports_Helper_Data')->__('Avg. Approved Rating'),
-            'width'     =>'50px',
-            'align'     =>'right',
-            'index'     =>'avg_rating_approved'
-        ));
-
-        $this->addColumn('last_created', array(
-            'header'    =>Mage::helper('Mage_Reports_Helper_Data')->__('Last Review'),
-            'width'     =>'150px',
-            'index'     =>'last_created',
-            'type'      =>'datetime'
-        ));
-
-        $this->addColumn('action', array(
-            'header'    => Mage::helper('Mage_Reports_Helper_Data')->__('Action'),
-            'width'     => '100px',
-            'align'     => 'center',
-            'filter'    => false,
-            'sortable'  => false,
-            'renderer'  => 'Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Product',
-            'is_system' => true
-        ));
-
-        $this->setFilterVisibility(false);
-
-        $this->addExportType('*/*/exportProductCsv', Mage::helper('Mage_Reports_Helper_Data')->__('CSV'));
-        $this->addExportType('*/*/exportProductExcel', Mage::helper('Mage_Reports_Helper_Data')->__('Excel XML'));
-
-        return parent::_prepareColumns();
-    }
-
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/catalog_product_review/', array('productId' => $row->getId()));
-    }
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php
deleted file mode 100644
index b4b6bf55604..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-
-/**
- * Sitemaps grid
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- */
-class Mage_Adminhtml_Block_Sitemap_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('sitemapGrid');
-        $this->setDefaultSort('sitemap_id');
-
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getModel('Mage_Sitemap_Model_Sitemap')->getCollection();
-        /* @var $collection Mage_Sitemap_Model_Resource_Sitemap_Collection */
-        $this->setCollection($collection);
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-        $this->addColumn('sitemap_id', array(
-            'header'    => Mage::helper('Mage_Sitemap_Helper_Data')->__('ID'),
-            'width'     => '50px',
-            'index'     => 'sitemap_id'
-        ));
-
-        $this->addColumn('sitemap_filename', array(
-            'header'    => Mage::helper('Mage_Sitemap_Helper_Data')->__('Filename'),
-            'index'     => 'sitemap_filename'
-        ));
-
-        $this->addColumn('sitemap_path', array(
-            'header'    => Mage::helper('Mage_Sitemap_Helper_Data')->__('Path'),
-            'index'     => 'sitemap_path'
-        ));
-
-        $this->addColumn('link', array(
-            'header'    => Mage::helper('Mage_Sitemap_Helper_Data')->__('Link for Google'),
-            'index'     => 'concat(sitemap_path, sitemap_filename)',
-            'renderer'  => 'Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Link',
-        ));
-
-        $this->addColumn('sitemap_time', array(
-            'header'    => Mage::helper('Mage_Sitemap_Helper_Data')->__('Last Time Generated'),
-            'width'     => '150px',
-            'index'     => 'sitemap_time',
-            'type'      => 'datetime',
-        ));
-
-
-        if (!Mage::app()->isSingleStoreMode()) {
-            $this->addColumn('store_id', array(
-                'header'    => Mage::helper('Mage_Sitemap_Helper_Data')->__('Store View'),
-                'index'     => 'store_id',
-                'type'      => 'store',
-            ));
-        }
-
-        $this->addColumn('action', array(
-            'header'   => Mage::helper('Mage_Sitemap_Helper_Data')->__('Action'),
-            'filter'   => false,
-            'sortable' => false,
-            'width'    => '100',
-            'renderer' => 'Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Action'
-        ));
-
-        return parent::_prepareColumns();
-    }
-
-    /**
-     * Row click url
-     *
-     * @return string
-     */
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('sitemap_id' => $row->getId()));
-    }
-
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design.php b/app/code/core/Mage/Adminhtml/Block/System/Design.php
index 463e0ecb46f..28c0d8e98e7 100644
--- a/app/code/core/Mage/Adminhtml/Block/System/Design.php
+++ b/app/code/core/Mage/Adminhtml/Block/System/Design.php
@@ -37,10 +37,6 @@ class Mage_Adminhtml_Block_System_Design extends Mage_Adminhtml_Block_Template
             'class'   => 'add'
         ));
 
-        $this->setChild('grid', $this->getLayout()->createBlock(
-            'Mage_Adminhtml_Block_System_Design_Grid',
-            'design.grid'
-        ));
         return parent::_prepareLayout();
     }
 }
diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php
deleted file mode 100644
index 5dfeb0f184b..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php
+++ /dev/null
@@ -1,127 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Design changes grid
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_System_Design_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    /**
-     * Class constructor
-     */
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('designGrid');
-        $this->setSaveParametersInSession(true);
-        $this->setUseAjax(true);
-    }
-
-    /**
-     * Prepare grid data collection
-     *
-     * @return Mage_Adminhtml_Block_System_Design_Grid
-     */
-    protected function _prepareCollection()
-    {
-        $storeId = (int) $this->getRequest()->getParam('store', 0);
-
-        $collection = Mage::getResourceModel('Mage_Core_Model_Resource_Design_Collection');
-
-        $this->setCollection($collection);
-        parent::_prepareCollection();
-        return $this;
-    }
-
-    /**
-     * Define grid columns
-     *
-     * @return Mage_Adminhtml_Block_System_Design_Grid
-     */
-    protected function _prepareColumns()
-    {
-        if (!Mage::app()->isSingleStoreMode()) {
-            $this->addColumn('store_id', array(
-                'header'        => Mage::helper('Mage_Catalog_Helper_Data')->__('Store'),
-                'width'         => '100px',
-                'type'          => 'store',
-                'store_view'    => true,
-                'sortable'      => false,
-                'index'         => 'store_id',
-            ));
-        }
-
-        $this->addColumn('package', array(
-                'header'    => Mage::helper('Mage_Catalog_Helper_Data')->__('Design'),
-                'width'     => '150px',
-                'index'     => 'design',
-        ));
-        $this->addColumn('date_from', array(
-            'header'    => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Date From'),
-            'align'     => 'left',
-            'width'     => '100px',
-            'type'      => 'date',
-            'index'     => 'date_from',
-        ));
-
-        $this->addColumn('date_to', array(
-            'header'    => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Date To'),
-            'align'     => 'left',
-            'width'     => '100px',
-            'type'      => 'date',
-            'index'     => 'date_to',
-        ));
-
-        return parent::_prepareColumns();
-    }
-
-    /**
-     * Prepare row click url
-     *
-     * @param Varien_Object $row
-     * @return string
-     */
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('id' => $row->getId()));
-    }
-
-    /**
-     * Prepare grid url
-     *
-     * @return string
-     */
-    public function getGridUrl()
-    {
-        return $this->getUrl('*/*/grid', array('_current' => true));
-    }
-
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php
index cb66e13db22..ada70cdd74f 100644
--- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php
+++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php
@@ -49,10 +49,7 @@ class Mage_Adminhtml_Block_System_Email_Template extends Mage_Adminhtml_Block_Te
             'onclick'   => "window.location='" . $this->getCreateUrl() . "'",
             'class'     => 'add'
         ));
-        $this->setChild(
-            'grid',
-            $this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Email_Template_Grid', 'email.template.grid')
-        );
+
         return parent::_prepareLayout();
     }
 
diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php
deleted file mode 100644
index 9c5fbbf3aff..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml  system templates grid block
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_System_Email_Template_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setEmptyText(Mage::helper('Mage_Adminhtml_Helper_Data')->__('No Templates Found'));
-        $this->setId('systemEmailTemplateGrid');
-        $this->setUseAjax(true);
-        $this->setSaveParametersInSession(true);
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getResourceSingleton('Mage_Core_Model_Resource_Email_Template_Collection');
-
-        $this->setCollection($collection);
-
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-        $this->addColumn('template_id',
-            array(
-                  'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('ID'),
-                  'index'=>'template_id'
-            )
-        );
-
-        $this->addColumn('code',
-            array(
-                'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Template Name'),
-                'index'=>'template_code'
-        ));
-
-        $this->addColumn('added_at',
-            array(
-                'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Date Added'),
-                'index'=>'added_at',
-                'gmtoffset' => true,
-                'type'=>'datetime'
-        ));
-
-        $this->addColumn('modified_at',
-            array(
-                'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Date Updated'),
-                'index'=>'modified_at',
-                'gmtoffset' => true,
-                'type'=>'datetime'
-        ));
-
-        $this->addColumn('subject',
-            array(
-                'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Subject'),
-                'index'=>'template_subject'
-        ));
-        /*
-        $this->addColumn('sender',
-            array(
-                'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Sender'),
-                'index'=>'template_sender_email',
-                'renderer' => 'Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Sender'
-        ));
-        */
-        $this->addColumn('type',
-            array(
-                'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Template Type'),
-                'index'=>'template_type',
-                'filter' => 'Mage_Adminhtml_Block_System_Email_Template_Grid_Filter_Type',
-                'renderer' => 'Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Type'
-        ));
-
-        $this->addColumn('action',
-            array(
-                'header'	=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('Action'),
-                'index'		=> 'template_id',
-                'sortable'  => false,
-                'filter' 	=> false,
-                'width'		=> '100px',
-                'renderer'  => 'Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Action'
-        ));
-        return $this;
-    }
-
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
-    }
-
-}
-
diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php
deleted file mode 100644
index 9d26e554251..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-
-/**
- * Adminhtml store grid
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_System_Store_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('storeGrid');
-        $this->setSaveParametersInSession(true);
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getModel('Mage_Core_Model_Website')
-            ->getCollection()
-            ->joinGroupAndStore();
-        $this->setCollection($collection);
-        parent::_prepareCollection();
-        return $this;
-    }
-
-    protected function _prepareColumns()
-    {
-        $this->addColumn('website_title', array(
-            'header'        => Mage::helper('Mage_Core_Helper_Data')->__('Website Name'),
-            'align'         =>'left',
-            'index'         => 'name',
-            'filter_index'  => 'main_table.name',
-            'renderer'      => 'Mage_Adminhtml_Block_System_Store_Grid_Render_Website'
-        ));
-
-        $this->addColumn('group_title', array(
-            'header'        => Mage::helper('Mage_Core_Helper_Data')->__('Store Name'),
-            'align'         =>'left',
-            'index'         => 'group_title',
-            'filter_index'  => 'group_table.name',
-            'renderer'      => 'Mage_Adminhtml_Block_System_Store_Grid_Render_Group'
-        ));
-
-        $this->addColumn('store_title', array(
-            'header'        => Mage::helper('Mage_Core_Helper_Data')->__('Store View Name'),
-            'align'         =>'left',
-            'index'         => 'store_title',
-            'filter_index'  => 'store_table.name',
-            'renderer'      => 'Mage_Adminhtml_Block_System_Store_Grid_Render_Store'
-        ));
-
-        return parent::_prepareColumns();
-    }
-
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php
deleted file mode 100644
index 44ca97ca296..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Custom Variable Grid Container
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-
-class Mage_Adminhtml_Block_System_Variable_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-    /**
-     * Internal constructor
-     *
-     */
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('customVariablesGrid');
-        $this->setDefaultSort('variable_id');
-        $this->setDefaultDir('ASC');
-    }
-
-    /**
-     * Prepare grid collection object
-     *
-     * @return Mage_Adminhtml_Block_System_Variable_Grid
-     */
-    protected function _prepareCollection()
-    {
-        /* @var $collection Mage_Core_Model_Resource_Variable_Collection */
-        $collection = Mage::getModel('Mage_Core_Model_Variable')->getCollection();
-        $this->setCollection($collection);
-        return parent::_prepareCollection();
-    }
-
-    /**
-     * Prepare grid columns
-     *
-     * @return Mage_Adminhtml_Block_System_Variable_Grid
-     */
-    protected function _prepareColumns()
-    {
-        $this->addColumn('variable_id', array(
-            'header'    => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Variable ID'),
-            'width'     => '1',
-            'index'     => 'variable_id',
-        ));
-
-        $this->addColumn('code', array(
-            'header'    => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Variable Code'),
-            'index'     => 'code',
-        ));
-
-        $this->addColumn('name', array(
-            'header'    => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Name'),
-            'index'     => 'name',
-        ));
-
-        return parent::_prepareColumns();
-    }
-
-    /**
-     * Row click url
-     *
-     * @return string
-     */
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('variable_id' => $row->getId()));
-    }
-}
diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php
deleted file mode 100644
index 0b5f85169c5..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-class Mage_Adminhtml_Block_Tax_Rate_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setDefaultSort('region_name');
-        $this->setDefaultDir('asc');
-        $this->setId('tax_rate_grid');
-        $this->setSaveParametersInSession(true);
-    }
-
-    protected function _prepareCollection()
-    {
-        $rateCollection = Mage::getModel('Mage_Tax_Model_Calculation_Rate')->getCollection()
-            ->joinRegionTable();
-
-        $this->setCollection($rateCollection);
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-        $this->addColumn('code', array(
-            'header'        => Mage::helper('Mage_Tax_Helper_Data')->__('Tax Identifier'),
-            'header_export' => Mage::helper('Mage_Tax_Helper_Data')->__('Code'),
-            'align'         =>'left',
-            'index'         => 'code',
-            'filter_index'  => 'main_table.code',
-        ));
-
-        $this->addColumn('tax_country_id', array(
-            'header'        => Mage::helper('Mage_Tax_Helper_Data')->__('Country'),
-            'type'          => 'country',
-            'align'         => 'left',
-            'index'         => 'tax_country_id',
-            'filter_index'  => 'main_table.tax_country_id',
-            'renderer'      => 'Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Country',
-            'sortable'      => false
-        ));
-
-        $this->addColumn('region_name', array(
-            'header'        => Mage::helper('Mage_Tax_Helper_Data')->__('State/Region'),
-            'header_export' => Mage::helper('Mage_Tax_Helper_Data')->__('State'),
-            'align'         =>'left',
-            'index'         => 'region_name',
-            'filter_index'  => 'region_table.code',
-            'default'       => '*',
-        ));
-
-        $this->addColumn('tax_postcode', array(
-            'header'        => Mage::helper('Mage_Tax_Helper_Data')->__('Zip/Post Code'),
-            'align'         =>'left',
-            'index'         => 'tax_postcode',
-            'default'       => '*',
-        ));
-
-        $this->addColumn('rate', array(
-            'header'        => Mage::helper('Mage_Tax_Helper_Data')->__('Rate'),
-            'align'         =>'right',
-            'index'         => 'rate',
-            'type'          => 'number',
-            'default'       => '0.00',
-            'renderer'      => 'Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Data',
-        ));
-
-        $this->addExportType('*/*/exportCsv', Mage::helper('Mage_Tax_Helper_Data')->__('CSV'));
-        $this->addExportType('*/*/exportXml', Mage::helper('Mage_Tax_Helper_Data')->__('Excel XML'));
-
-        return parent::_prepareColumns();
-    }
-
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('rate' => $row->getTaxCalculationRateId()));
-    }
-
-}
-
diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php
deleted file mode 100644
index d04d451ff57..00000000000
--- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_Adminhtml
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml URL rewrite grid block
- *
- * @category   Mage
- * @package    Mage_Adminhtml
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Urlrewrite_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('urlrewriteGrid');
-        $this->setDefaultSort('url_rewrite_id');
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getResourceModel('Mage_Core_Model_Resource_Url_Rewrite_Collection');
-        $this->setCollection($collection);
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-        $this->addColumn('url_rewrite_id', array(
-            'header'    => $this->__('ID'),
-            'width'     => '50px',
-            'index'     => 'url_rewrite_id'
-        ));
-
-        if (!Mage::app()->isSingleStoreMode()) {
-            $this->addColumn('store_id', array(
-                'header'    => $this->__('Store View'),
-                'width'     => '200px',
-                'index'     => 'store_id',
-                'type'      => 'store',
-                'store_view' => true,
-            ));
-        }
-
-        $this->addColumn('is_system', array(
-            'header'    =>$this->__('Type'),
-            'width'     => '50px',
-            'index'     => 'is_system',
-            'type'      => 'options',
-            'options'   => array(
-                1 => $this->__('System'),
-                0 => $this->__('Custom')
-            ),
-        ));
-
-        $this->addColumn('id_path', array(
-            'header'    => $this->__('ID Path'),
-            'width'     => '50px',
-            'index'     => 'id_path'
-        ));
-        $this->addColumn('request_path', array(
-            'header'    => $this->__('Request Path'),
-            'width'     => '50px',
-            'index'     => 'request_path'
-        ));
-        $this->addColumn('target_path', array(
-            'header'    => $this->__('Target Path'),
-            'width'     => '50px',
-            'index'     => 'target_path'
-        ));
-        $this->addColumn('options', array(
-            'header'    => $this->__('Options'),
-            'width'     => '50px',
-            'index'     => 'options'
-        ));
-        $this->addColumn('actions', array(
-            'header'    => $this->__('Action'),
-            'width'     => '15px',
-            'sortable'  => false,
-            'filter'    => false,
-            'type'      => 'action',
-            'actions'   => array(
-                array(
-                    'url'       => $this->getUrl('*/*/edit') . 'id/$url_rewrite_id',
-                    'caption'   => $this->__('Edit'),
-                ),
-            )
-        ));
-        //$this->addExportType('*/*/exportCsv', $this->__('CSV'));
-        //$this->addExportType('*/*/exportXml', $this->__('XML'));
-        return parent::_prepareColumns();
-    }
-
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
-        //return $this->getUrl('*/*/view', array('id' => $row->getId()));
-    }
-
-}
-
diff --git a/app/code/core/Mage/Adminhtml/Model/UrlRewriteOptions.php b/app/code/core/Mage/Adminhtml/Model/UrlRewriteOptions.php
new file mode 100644
index 00000000000..a4bf4836021
--- /dev/null
+++ b/app/code/core/Mage/Adminhtml/Model/UrlRewriteOptions.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_Users
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * User statuses option array
+ *
+ * @category   Mage
+ * @package    Mage_Adminhtml
+ * @author     Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Adminhtml_Model_UrlRewriteOptions implements Mage_Core_Model_Option_ArrayInterface
+{
+    /**
+     * Backend Helper
+     *
+     * @var Mage_Adminhtml_Helper_Data
+     */
+    protected $_helper;
+
+    /**
+     * @param Mage_Adminhtml_Helper_Data $helper
+     */
+    public function __construct(Mage_Adminhtml_Helper_Data $helper)
+    {
+        $this->_helper = $helper;
+    }
+
+    /**
+     * Return statuses array
+     * @return array
+     */
+    public function toOptionArray()
+    {
+        return array('1' => $this->_helper->__('System'),
+                     '0' => $this->_helper->__('Custom'));
+    }
+}
\ No newline at end of file
diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
index ea2389c17c1..5e467fbcab6 100644
--- a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
@@ -349,6 +349,9 @@ class Mage_Adminhtml_Catalog_CategoryController extends Mage_Adminhtml_Controlle
                 }
 
                 $category->unsetData('use_post_data_config');
+                if (isset($data['general']['entity_id'])) {
+                    throw new Mage_Core_Exception($this->__('Unable to save the category'));
+                }
 
                 $category->save();
                 $this->_getSession()->addSuccess(Mage::helper('Mage_Catalog_Helper_Data')->__('The category has been saved.'));
diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
index 0f372a59168..fcb33e1896c 100644
--- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
@@ -50,13 +50,6 @@ class Mage_Adminhtml_Catalog_Product_SetController extends Mage_Adminhtml_Contro
             Mage::helper('Mage_Catalog_Helper_Data')->__('Manage Attribute Sets'),
             Mage::helper('Mage_Catalog_Helper_Data')->__('Manage Attribute Sets'));
 
-        $this->_addContent(
-            $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Toolbar_Main')
-        );
-        $this->_addContent(
-            $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid')
-        );
-
         $this->renderLayout();
     }
 
@@ -95,11 +88,10 @@ class Mage_Adminhtml_Catalog_Product_SetController extends Mage_Adminhtml_Contro
 
     public function setGridAction()
     {
-        $this->_setTypeId();
-        $this->getResponse()->setBody(
-            $this->getLayout()
-                ->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid')
-                ->toHtml());
+
+       $this->_setTypeId();
+        $this->loadLayout(false);
+        $this->renderLayout();
     }
 
     /**
diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php
index 0d724c57b38..807cfab3974 100644
--- a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php
@@ -41,9 +41,8 @@ class Mage_Adminhtml_Catalog_SearchController extends Mage_Adminhtml_Controller_
         $this->_title($this->__('Catalog'))->_title($this->__('Search Terms'));
 
         $this->_initAction()
-            ->_addBreadcrumb(Mage::helper('Mage_Catalog_Helper_Data')->__('Catalog'), Mage::helper('Mage_Catalog_Helper_Data')->__('Catalog'))
-            ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Search'))
-            ->renderLayout();
+            ->_addBreadcrumb(Mage::helper('Mage_Catalog_Helper_Data')->__('Catalog'), Mage::helper('Mage_Catalog_Helper_Data')->__('Catalog'));
+            $this->renderLayout();
     }
 
     public function newAction()
@@ -81,7 +80,7 @@ class Mage_Adminhtml_Catalog_SearchController extends Mage_Adminhtml_Controller_
 
         $this->getLayout()->getBlock('head')->setCanLoadRulesJs(true);
 
-        $this->getLayout()->getBlock('catalog_search_edit')
+        $this->getLayout()->getBlock('adminhtml.catalog.search.edit')
             ->setData('action', $this->getUrl('*/catalog_search/save'));
 
         $this
diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php
index 20c5ffda388..a916b3b4ed2 100644
--- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php
@@ -51,10 +51,6 @@ class Mage_Adminhtml_Newsletter_ProblemController extends Mage_Adminhtml_Control
 
         $this->_addBreadcrumb(Mage::helper('Mage_Newsletter_Helper_Data')->__('Newsletter Problem Reports'), Mage::helper('Mage_Newsletter_Helper_Data')->__('Newsletter Problem Reports'));
 
-        $this->_addContent(
-            $this->getLayout()->createBlock('Mage_Adminhtml_Block_Newsletter_Problem', 'problem')
-        );
-
         $this->renderLayout();
     }
 
@@ -93,8 +89,8 @@ class Mage_Adminhtml_Newsletter_ProblemController extends Mage_Adminhtml_Control
         }
                 $this->getLayout()->getMessagesBlock()->setMessages(Mage::getSingleton('Mage_Adminhtml_Model_Session')->getMessages(true));
 
-        $grid = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Newsletter_Problem_Grid');
-        $this->getResponse()->setBody($grid->toHtml());
+        $this->loadLayout(false);
+        $this->renderLayout();
     }
 
     protected function _isAllowed()
diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php
index d3051904760..a3e147891b1 100644
--- a/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php
@@ -35,13 +35,15 @@ class Mage_Adminhtml_Report_ReviewController extends Mage_Adminhtml_Controller_A
 {
     public function _initAction()
     {
-        $act = $this->getRequest()->getActionName();
-        if(!$act)
-            $act = 'default';
-
         $this->loadLayout()
-            ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Reports'), Mage::helper('Mage_Reports_Helper_Data')->__('Reports'))
-            ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Review'), Mage::helper('Mage_Reports_Helper_Data')->__('Reviews'));
+            ->_addBreadcrumb(
+                Mage::helper('Mage_Reports_Helper_Data')->__('Reports'),
+                Mage::helper('Mage_Reports_Helper_Data')->__('Reports')
+            )
+            ->_addBreadcrumb(
+                Mage::helper('Mage_Reports_Helper_Data')->__('Review'),
+                Mage::helper('Mage_Reports_Helper_Data')->__('Reviews')
+            );
         return $this;
     }
 
@@ -53,9 +55,11 @@ class Mage_Adminhtml_Report_ReviewController extends Mage_Adminhtml_Controller_A
 
         $this->_initAction()
             ->_setActiveMenu('Mage_Review::report_review_customer')
-            ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Customers Report'), Mage::helper('Mage_Reports_Helper_Data')->__('Customers Report'))
-            ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Review_Customer'))
-            ->renderLayout();
+            ->_addBreadcrumb(
+                Mage::helper('Mage_Reports_Helper_Data')->__('Customers Report'),
+                Mage::helper('Mage_Reports_Helper_Data')->__('Customers Report')
+            );
+         $this->renderLayout();
     }
 
     /**
@@ -63,11 +67,10 @@ class Mage_Adminhtml_Report_ReviewController extends Mage_Adminhtml_Controller_A
      */
     public function exportCustomerCsvAction()
     {
-        $fileName   = 'review_customer.csv';
-        $content    = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Review_Customer_Grid')
-            ->getCsv();
-
-        $this->_prepareDownloadResponse($fileName, $content);
+        $this->loadLayout(false);
+        $fileName = 'review_customer.csv';
+        $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export');
+        $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
     }
 
     /**
@@ -75,11 +78,11 @@ class Mage_Adminhtml_Report_ReviewController extends Mage_Adminhtml_Controller_A
      */
     public function exportCustomerExcelAction()
     {
-        $fileName   = 'review_customer.xml';
-        $content    = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Review_Customer_Grid')
-            ->getExcel($fileName);
+        $this->loadLayout(false);
+        $fileName = 'review_customer.xml';
+        $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export');
+        $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile());
 
-        $this->_prepareDownloadResponse($fileName, $content);
     }
 
     public function productAction()
@@ -90,9 +93,11 @@ class Mage_Adminhtml_Report_ReviewController extends Mage_Adminhtml_Controller_A
 
         $this->_initAction()
             ->_setActiveMenu('Mage_Review::report_review_product')
-            ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Products Report'), Mage::helper('Mage_Reports_Helper_Data')->__('Products Report'))
-            ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Review_Product'))
-            ->renderLayout();
+            ->_addBreadcrumb(
+            Mage::helper('Mage_Reports_Helper_Data')->__('Products Report'),
+            Mage::helper('Mage_Reports_Helper_Data')->__('Products Report')
+        );
+            $this->renderLayout();
     }
 
     /**
@@ -100,11 +105,10 @@ class Mage_Adminhtml_Report_ReviewController extends Mage_Adminhtml_Controller_A
      */
     public function exportProductCsvAction()
     {
-        $fileName   = 'review_product.csv';
-        $content    = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Review_Product_Grid')
-            ->getCsv();
-
-        $this->_prepareDownloadResponse($fileName, $content);
+        $this->loadLayout(false);
+        $fileName = 'review_product.csv';
+        $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export');
+        $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
     }
 
     /**
@@ -112,11 +116,10 @@ class Mage_Adminhtml_Report_ReviewController extends Mage_Adminhtml_Controller_A
      */
     public function exportProductExcelAction()
     {
-        $fileName   = 'review_product.xml';
-        $content    = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Review_Product_Grid')
-            ->getExcel($fileName);
-
-        $this->_prepareDownloadResponse($fileName, $content);
+        $this->loadLayout(false);
+        $fileName = 'review_product.xml';
+        $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export');
+        $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile());
     }
 
     public function productDetailAction()
diff --git a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php
index ba07d21bae8..a0d378133e8 100644
--- a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php
@@ -59,10 +59,8 @@ class Mage_Adminhtml_SitemapController extends  Mage_Adminhtml_Controller_Action
     public function indexAction()
     {
         $this->_title($this->__('Catalog'))->_title($this->__('XML Sitemaps'));
-
-        $this->_initAction()
-            ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Sitemap'))
-            ->renderLayout();
+        $this->_initAction();
+        $this->renderLayout();
     }
 
     /**
diff --git a/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php b/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
index 8fba8177bf2..34135e8d841 100644
--- a/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
@@ -51,8 +51,6 @@ class Mage_Adminhtml_System_BackupController extends Mage_Adminhtml_Controller_A
         $this->_addBreadcrumb(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Tools'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('Tools'));
         $this->_addBreadcrumb(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Backups'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('Backup'));
 
-        $this->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Backup', 'backup'));
-
         $this->renderLayout();
     }
 
@@ -61,7 +59,8 @@ class Mage_Adminhtml_System_BackupController extends Mage_Adminhtml_Controller_A
      */
     public function gridAction()
     {
-        $this->getResponse()->setBody($this->getLayout()->createBlock('Mage_Adminhtml_Block_Backup_Grid')->toHtml());
+        $this->renderLayot(false);
+        $this->renderLayout();
     }
 
     /**
diff --git a/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php b/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php
index 3ac8816a9cc..5d5c73ee135 100644
--- a/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php
@@ -30,18 +30,15 @@ class Mage_Adminhtml_System_DesignController extends Mage_Adminhtml_Controller_A
     public function indexAction()
     {
         $this->_title($this->__('System'))->_title($this->__('Design'));
-
         $this->loadLayout();
         $this->_setActiveMenu('Mage_Adminhtml::system');
-        $this->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Design'));
         $this->renderLayout();
     }
 
     public function gridAction()
     {
-        $this->getResponse()->setBody(
-            $this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Design_Grid')->toHtml()
-        );
+        $this->loadLayout(false);
+        $this->renderLayout();
     }
 
     public function newAction()
diff --git a/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php b/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
index 6d7a299eced..baebb670632 100644
--- a/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
@@ -45,16 +45,13 @@ class Mage_Adminhtml_System_Email_TemplateController extends Mage_Adminhtml_Cont
         $this->loadLayout();
         $this->_setActiveMenu('Mage_Adminhtml::system_email_template');
         $this->_addBreadcrumb(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Transactional Emails'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('Transactional Emails'));
-
-        $this->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Email_Template', 'template'));
         $this->renderLayout();
     }
 
     public function gridAction()
     {
-        $this->getResponse()->setBody(
-            $this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Email_Template_Grid')->toHtml()
-        );
+        $this->loadLayout(false);
+        $this->renderLayout();
     }
 
 
diff --git a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
index a04812a0263..561a30297ce 100644
--- a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
@@ -56,7 +56,6 @@ class Mage_Adminhtml_System_StoreController extends Mage_Adminhtml_Controller_Ac
              ->_title($this->__('Stores'));
 
         $this->_initAction()
-            ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Store_Store'))
             ->renderLayout();
     }
 
diff --git a/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php b/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php
index 4c663aff195..40fbb14e26e 100644
--- a/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php
@@ -75,9 +75,8 @@ class Mage_Adminhtml_System_VariableController extends Mage_Adminhtml_Controller
     {
         $this->_title($this->__('System'))->_title($this->__('Custom Variables'));
 
-        $this->_initLayout()
-            ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Variable'))
-            ->renderLayout();
+        $this->_initLayout();
+        $this->renderLayout();
     }
 
     /**
diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
index 96c954e68ae..b6f2aa23286 100644
--- a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
@@ -45,14 +45,8 @@ class Mage_Adminhtml_Tax_RateController extends Mage_Adminhtml_Controller_Action
              ->_title($this->__('Manage Tax Zones and Rates'));
 
         $this->_initAction()
-            ->_addBreadcrumb(Mage::helper('Mage_Tax_Helper_Data')->__('Manage Tax Rates'), Mage::helper('Mage_Tax_Helper_Data')->__('Manage Tax Rates'))
-            ->_addContent(
-                $this->getLayout()->createBlock('Mage_Adminhtml_Block_Tax_Rate_Toolbar_Add', 'tax_rate_toolbar')
-                    ->assign('createUrl', $this->getUrl('*/tax_rate/add'))
-                    ->assign('header', Mage::helper('Mage_Tax_Helper_Data')->__('Manage Tax Rates'))
-            )
-            ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Tax_Rate_Grid', 'tax_rate_grid'))
-            ->renderLayout();
+            ->_addBreadcrumb(Mage::helper('Mage_Tax_Helper_Data')->__('Manage Tax Rates'), Mage::helper('Mage_Tax_Helper_Data')->__('Manage Tax Rates'));
+        $this ->renderLayout();
     }
 
     /**
@@ -294,11 +288,9 @@ class Mage_Adminhtml_Tax_RateController extends Mage_Adminhtml_Controller_Action
      */
     public function exportCsvAction()
     {
-        $fileName   = 'rates.csv';
-        $content    = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Tax_Rate_Grid')
-            ->getCsvFile();
-
-        $this->_prepareDownloadResponse($fileName, $content);
+        $this->loadLayout(false);
+        $content = $this->getLayout()->getChildBlock('adminhtml.tax.rate.grid','grid.export');
+        $this->_prepareDownloadResponse('rates.csv', $content->getCsvFile());
     }
 
     /**
@@ -306,11 +298,9 @@ class Mage_Adminhtml_Tax_RateController extends Mage_Adminhtml_Controller_Action
      */
     public function exportXmlAction()
     {
-        $fileName   = 'rates.xml';
-        $content    = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Tax_Rate_Grid')
-            ->getExcelFile();
-
-        $this->_prepareDownloadResponse($fileName, $content);
+        $this->loadLayout(false);
+        $content = $this->getLayout()->getChildBlock('adminhtml.tax.rate.grid','grid.export');
+        $this->_prepareDownloadResponse('rates.xml', $content->getExcelFile());
     }
 
     /**
@@ -548,7 +538,7 @@ class Mage_Adminhtml_Tax_RateController extends Mage_Adminhtml_Controller_Action
 
             $content .= $rate->toString($template) . "\n";
         }
-
+        $this->loadLayout();
         $this->_prepareDownloadResponse('tax_rates.csv', $content);
     }
 
diff --git a/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php b/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php
index 0eced2324d8..ba5735e0947 100644
--- a/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php
@@ -67,9 +67,6 @@ class Mage_Adminhtml_UrlrewriteController extends Mage_Adminhtml_Controller_Acti
 
         $this->loadLayout();
         $this->_setActiveMenu('Mage_Catalog::catalog_urlrewrite');
-        $this->_addContent(
-            $this->getLayout()->createBlock('Mage_Adminhtml_Block_Urlrewrite')
-        );
         $this->renderLayout();
     }
 
diff --git a/app/code/core/Mage/Adminhtml/etc/config.xml b/app/code/core/Mage/Adminhtml/etc/config.xml
index 4ce0eb3c665..f07451dcd82 100644
--- a/app/code/core/Mage/Adminhtml/etc/config.xml
+++ b/app/code/core/Mage/Adminhtml/etc/config.xml
@@ -118,18 +118,21 @@
                 <adminnotification module="Mage_Adminhtml">
                     <file>adminnotification.xml</file>
                 </adminnotification>
+                <backup module="Mage_Adminhtml">
+                    <file>backup.xml</file>
+                </backup>
                 <catalog module="Mage_Adminhtml">
                     <file>catalog.xml</file>
                 </catalog>
-                <catalogsearch module="Mage_Adminhtml">
-                    <file>catalogsearch.xml</file>
-                </catalogsearch>
                 <cms module="Mage_Adminhtml">
                     <file>cms.xml</file>
                 </cms>
                 <customer module="Mage_Adminhtml">
                     <file>customer.xml</file>
                 </customer>
+                <design module="Mage_Adminhtml">
+                    <file>system/design/design.xml</file>
+                </design>
                 <newsletter module="Mage_Adminhtml">
                     <file>newsletter.xml</file>
                 </newsletter>
@@ -142,9 +145,21 @@
                 <sales module="Mage_Adminhtml">
                     <file>sales.xml</file>
                 </sales>
+                <store module="Mage_Adminhtml">
+                    <file>system/store/store.xml</file>
+                </store>
+                <system module="Mage_Adminhtml">
+                    <file>system/email/template.xml</file>
+                </system>
                 <tax module="Mage_Adminhtml">
                     <file>tax.xml</file>
                 </tax>
+                <urlrewrite module="Mage_Adminhtml">
+                    <file>urlrewrite.xml</file>
+                </urlrewrite>
+                <system_variable module="Mage_Adminhtml">
+                    <file>variable.xml</file>
+                </system_variable>
             </updates>
         </layout>
         <sales>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/backup.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/backup.xml
new file mode 100644
index 00000000000..03ab7e8dca1
--- /dev/null
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/backup.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    design
+ * @package     default_default
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+
+<layout>
+    <adminhtml_system_backup_index>
+        <update handle="formkey"/>
+        <update handle="adminhtml_system_backup_block"/>
+        <reference name="content">
+            <block type="Mage_Adminhtml_Block_Backup" name="adminhtml.system.backup.container"/>
+        </reference>
+    </adminhtml_system_backup_index>
+
+    <adminhtml_system_backup_grid>
+        <update handle="formkey"/>
+        <update handle="adminhtml_system_backup_block"/>
+        <container label="Mage Adminhtml Block Backup" name="adminhtml.system.backup.container" output='1'/>
+    </adminhtml_system_backup_grid>
+
+    <adminhtml_system_backup_block>
+        <reference name='adminhtml.system.backup.container'>
+            <block type="Mage_Backend_Block_Widget_Grid" name='adminhtml.system.backup.grid' as='grid'>
+                <arguments>
+                    <id>backupsGrid</id>
+                    <dataSource type="object">Mage_Backup_Model_Fs_Collection</dataSource>
+                    <default_sort>time</default_sort>
+                    <default_dir>desc</default_dir>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_Massaction'  name='adminhtml.system.backup.grid.massaction' as='grid.massaction'>
+                    <arguments>
+                        <massaction_id_field>id</massaction_id_field>
+                        <form_field_name>ids</form_field_name>
+                        <use_select_all>0</use_select_all>
+                        <options>
+                            <delete>
+                                <label translate='true' module='Mage_Adminhtml'>Delete</label>
+                                <url>*/*/massDelete</url>
+                                <confirm translate='true' module='Mage_Backup'>Are you sure you want to delete the selected backup(s)?</confirm>
+                            </delete>
+                        </options>
+                    </arguments>
+                </block>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.catalog.product.set.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <id>backupsGrid</id>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='time'>
+                        <arguments>
+                            <header translate='true' module='Mage_Backup'>Time</header>
+                            <index>date_object</index>
+                            <type>datetime</type>
+                            <width>200px</width>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='display_name'>
+                        <arguments>
+                            <header translate='true' module='Mage_Backup'>Name</header>
+                            <index>display_name</index>
+                            <filter>0</filter>
+                            <sortable>1</sortable>
+                            <width>350px</width>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='size'>
+                        <arguments>
+                            <header translate='true' module='Mage_Backup'>Size, Bytes</header>
+                            <index>size</index>
+                            <type>number</type>
+                            <filter>0</filter>
+                            <sortable>1</sortable>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='type'>
+                        <arguments>
+                            <header translate='true' module='Mage_Backup'>Type</header>
+                            <index>type</index>
+                            <type>options</type>
+                            <options type="options">Mage_Backup_Model_Grid_Options</options>
+                            <width>300px</width>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='download'>
+                        <arguments>
+                            <header translate='true' module='Mage_Backup'>Download</header>
+                            <index>type</index>
+                            <filter>0</filter>
+                            <sortable>0</sortable>
+                            <type>action</type>
+                            <renderer>Mage_Backup_Block_Adminhtml_Grid_Column_Renderer_Download</renderer>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backup_Block_Adminhtml_Grid_Column_Rollback' as='action'>
+                        <arguments>
+                            <header translate='true' module='Mage_Backup'>Action</header>
+                            <index>type</index>
+                            <width>80px</width>
+                            <filter>0</filter>
+                            <sortable>0</sortable>
+                            <type>action</type>
+                            <actions>
+                                <rollback_action>
+                                    <caption translate="true" module="Mage_Backup">Rollback</caption>
+                                    <url>
+                                        <base>#</base>
+                                    </url>
+                                    <onclick>return backup.rollback('$type', '$time')</onclick>
+                                </rollback_action>
+                            </actions>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_system_backup_block>
+</layout>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml
index 0d0162dbf70..222f7875e39 100644
--- a/app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml
@@ -36,5 +36,6 @@
     </tr>
 </table>
 </div>
+<?php echo $this->getChildHtml('grid') ?>
 <?php echo $this->getGridHtml() ?>
 <?php echo $this->getDialogsHtml() ?>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
index 635895b0b11..9f3f4041707 100644
--- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
@@ -477,4 +477,44 @@ Additional block in composite_fieldset block dependant on product type
         </container>
     </adminhtml_catalog_product_customoptions>
 
+    <adminhtml_catalog_product_set_index>
+        <update handle="formkey"/>
+        <update handle="adminhtml_catalog_product_set_block"/>
+        <reference name="content">
+            <block type="Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Toolbar_Main" name="adminhtml.catalog.product.set.container"/>
+        </reference>
+    </adminhtml_catalog_product_set_index>
+
+    <adminhtml_catalog_product_set_block>
+        <reference name='adminhtml.catalog.product.set.container'>
+            <block type="Mage_Backend_Block_Widget_Grid" name='adminhtml.catalog.product.set.grid' as='grid'>
+                <arguments>
+                    <id>setGrid</id>
+                    <dataSource type="object">Mage_Eav_Model_Resource_Entity_Attribute_Grid_Collection</dataSource>
+                    <default_sort>set_name</default_sort>
+                    <default_dir>ASC</default_dir>
+                    <save_parameters_in_session>1</save_parameters_in_session>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.catalog.product.set.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <id>setGrid</id>
+                        <rowUrl>
+                            <path>*/*/edit</path>
+                            <extraParamsTemplate>
+                                <id>getAttributeSetId</id>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='set_name'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Set Name</header>
+                            <align>left</align>
+                            <sortable>1</sortable>
+                            <index>attribute_set_name</index>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_catalog_product_set_block>
 </layout>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml
index 871810c2879..64080b3ca87 100644
--- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml
@@ -34,3 +34,6 @@
         </tr>
     </table>
 </div>
+<div>
+    <?php echo $this->getChildHtml('grid') ?>
+</div>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml
index 52a27da8090..90713f0bfe8 100644
--- a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml
@@ -74,4 +74,87 @@
     <newsletter_template_preview>
         <block type="Mage_Adminhtml_Block_Newsletter_Template_Preview" name="preview_template" />
     </newsletter_template_preview>
+
+    <adminhtml_newsletter_problem_index>
+        <update handle="formkey"/>
+        <update handle="adminhtml_newsletter_problem_block"/>
+        <reference name='content'>
+            <block type="Mage_Adminhtml_Block_Newsletter_Problem" name="adminhtml.newsletter.problem.container"/>
+        </reference>
+    </adminhtml_newsletter_problem_index>
+
+    <adminhtml_newsletter_problem_grid>
+        <update handle="formkey"/>
+        <update handle="adminhtml_newsletter_problem_block"/>
+        <container label="Newsletter Problem Block" name="adminhtml.newsletter.problem.container" output="1"/>
+    </adminhtml_newsletter_problem_grid>
+
+    <adminhtml_newsletter_problem_block>
+        <reference name="adminhtml.newsletter.problem.container">
+            <block type="Mage_Backend_Block_Widget_Grid" name='adminhtml.newslettrer.problem.grid' as='grid'>
+                <arguments>
+                    <id>problemGrid</id>
+                    <dataSource type="object">Mage_Newsletter_Model_Resource_Grid_Collection</dataSource>
+                    <message_block_visibility>true</message_block_visibility>
+                    <use_ajax>true</use_ajax>
+                    <save_parameters_in_session>1</save_parameters_in_session>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.newslettrer.problem.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <id>problemGrid</id>
+                        <empty_text translate="true" module="Mage_Newsletter">No problems found.</empty_text>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='checkbox'>
+                        <arguments>
+                            <sortable>0</sortable>
+                            <filter>Mage_Adminhtml_Block_Newsletter_Problem_Grid_Filter_Checkbox</filter>
+                            <renderer>Mage_Adminhtml_Block_Newsletter_Problem_Grid_Renderer_Checkbox</renderer>
+                            <width>20px</width>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='problem_id'>
+                        <arguments>
+                            <header translate='true' module='Mage_Newsletter'>ID</header>
+                            <width>50px</width>
+                            <index>problem_id</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='subscriber'>
+                        <arguments>
+                            <header translate='true' module='Mage_Newsletter'>Subscriber</header>
+                            <format>#$subscriber_id $customer_name ($subscriber_email)</format>
+                            <index>subscriber_id</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='queue_start'>
+                        <arguments>
+                            <header translate='true' module='Mage_Newsletter'>Queue Date Start</header>
+                            <index>queue_start_at</index>
+                            <gmtoffset>true</gmtoffset>
+                            <type>datetime</type>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='queue'>
+                        <arguments>
+                            <header translate='true' module='Mage_Newsletter'>Queue Subject</header>
+                            <index>template_subject</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='problem_code'>
+                        <arguments>
+                            <header translate='true' module='Mage_Newsletter'>Error Code</header>
+                            <index>problem_error_code</index>
+                            <type>number</type>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='problem_text'>
+                        <arguments>
+                            <header translate='true' module='Mage_Newsletter'>Error Text</header>
+                            <index>problem_error_text</index>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_newsletter_problem_block>
 </layout>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/design/design.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/design/design.xml
new file mode 100644
index 00000000000..7a09d96c883
--- /dev/null
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/design/design.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    design
+ * @package     default_default
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+ -->
+<layout>
+    <adminhtml_system_design_index>
+        <update handle="formkey"/>
+        <update handle="adminhtml_system_design_grid_block" />
+        <reference name='content'>
+            <block type='Mage_Adminhtml_Block_System_Design' name='adminhtml.system.design.container' />
+        </reference>
+    </adminhtml_system_design_index>
+
+    <adminhtml_system_design_grid>
+        <update handle="formkey"/>
+        <update handle="adminhtml_system_design_grid_block" />
+        <container label='System Design Block' name='adminhtml.system.design.container' output='1' />
+    </adminhtml_system_design_grid>
+
+    <adminhtml_system_design_grid_block>
+        <reference name='adminhtml.system.design.container'>
+            <block type="Mage_Backend_Block_Widget_Grid" name='adminhtml.system.design.grid' as='grid'>
+                <arguments>
+                    <id>designGrid</id>
+                    <dataSource type="object">Mage_Core_Model_Resource_Design_Collection</dataSource>
+                    <use_ajax>1</use_ajax>
+                    <save_parameters_in_session>1</save_parameters_in_session>
+                    <grid_url type="url">
+                        <path>*/*/grid</path>
+                        <params>
+                            <_current>1</_current>
+                        </params>
+                    </grid_url>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.system.design.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <id>designGrid</id>
+                        <rowUrl>
+                            <path>*/*/edit</path>
+                            <extraParamsTemplate>
+                                <id>getId</id>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column_Multistore' as='store_id'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Store</header>
+                            <width>100px</width>
+                            <type>store</type>
+                            <store_view>true</store_view>
+                            <sortable>false</sortable>
+                            <index>store_id</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='package'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Design</header>
+                            <width>150px</width>
+                            <index>design</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='date_from'>
+                        <arguments>
+                            <header translate='true' module='Mage_CatalogRule'>Date From</header>
+                            <align>left</align>
+                            <width>100px</width>
+                            <type>date</type>
+                            <index>date_from</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='date_to'>
+                        <arguments>
+                            <header translate='true' module='Mage_CatalogRule'>Date To</header>
+                            <align>left</align>
+                            <width>100px</width>
+                            <type>date</type>
+                            <index>date_to</index>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_system_design_grid_block>
+</layout>
\ No newline at end of file
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template.xml
new file mode 100644
index 00000000000..46ff194d741
--- /dev/null
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    design
+ * @package     default_default
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+ -->
+<layout>
+    <adminhtml_system_email_template_index>
+        <update handle="adminhtml_system_email_template_grid_block" />
+        <reference name='content'>
+            <block type='Mage_Adminhtml_Block_System_Email_Template' name='adminhtml.system.email.template.container' />
+        </reference>
+    </adminhtml_system_email_template_index>
+
+    <adminhtml_system_email_template_grid>
+        <update handle="formkey"/>
+        <update handle="adminhtml_system_email_template_grid_block" />
+        <container label='System Email Templates' name='adminhtml.system.email.template.container' output='1' />
+    </adminhtml_system_email_template_grid>
+
+    <adminhtml_system_email_template_grid_block>
+        <reference name='adminhtml.system.email.template.container'>
+            <block type="Mage_Backend_Block_Widget_Grid" name='adminhtml.system.email.template.grid' as='grid'>
+                <arguments>
+                    <id>systemEmailTemplateGrid</id>
+                    <dataSource type="object">Mage_Core_Model_Resource_Email_Template_Collection</dataSource>
+                    <use_ajax>1</use_ajax>
+                    <save_parameters_in_session>1</save_parameters_in_session>
+                    <grid_url type="url">
+                        <path>*/*/grid</path>
+                        <params>
+                            <_current>1</_current>
+                        </params>
+                    </grid_url>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.system.email.template.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <rowUrl>
+                            <path>*/*/edit</path>
+                            <extraParamsTemplate>
+                                <id>getId</id>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                        <empty_text translate='true' module='Mage_Adminhtml'>No Templates Found</empty_text>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='template_id'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>ID</header>
+                            <index>template_id</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='code'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Template Name</header>
+                            <index>template_code</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='added_at'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Date Added</header>
+                            <index>added_at</index>
+                            <gmtoffset>1</gmtoffset>
+                            <type>datetime</type>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='modified_at'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Date Updated</header>
+                            <index>modified_at</index>
+                            <gmtoffset>1</gmtoffset>
+                            <type>datetime</type>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='subject'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Subject</header>
+                            <index>template_subject</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='type'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Template Type</header>
+                            <index>template_type</index>
+                            <filter>Mage_Adminhtml_Block_System_Email_Template_Grid_Filter_Type</filter>
+                            <renderer>Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Type</renderer>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='action'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Action</header>
+                            <index>template_id</index>
+                            <sortable>0</sortable>
+                            <filter>0</filter>
+                            <width>100px</width>
+                            <renderer>Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Action</renderer>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_system_email_template_grid_block>
+</layout>
\ No newline at end of file
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/store/store.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/store/store.xml
new file mode 100644
index 00000000000..edce19a36ba
--- /dev/null
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/store/store.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    design
+ * @package     default_default
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+ -->
+<layout>
+    <adminhtml_system_store_index>
+        <update handle="formkey"/>
+        <update handle="adminhtml_system_store_grid_block" />
+        <reference name='content'>
+            <block type='Mage_Adminhtml_Block_System_Store_Store' name='adminhtml.system.store.container' />
+        </reference>
+    </adminhtml_system_store_index>
+
+    <adminhtml_system_store_grid_block>
+        <reference name='adminhtml.system.store.container'>
+            <block type="Mage_Backend_Block_Widget_Grid" name='adminhtml.system.store.grid' as='grid'>
+                <arguments>
+                    <id>storeGrid</id>
+                    <save_parameters_in_session>1</save_parameters_in_session>
+                    <dataSource type="object">Mage_Core_Model_Resource_Website_Grid_Collection</dataSource>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.system.store.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <id>storeGrid</id>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='website_title'>
+                        <arguments>
+                            <header translate='true' module='Mage_Core'>Website Name</header>
+                            <align>left</align>
+                            <index>name</index>
+                            <filter_index>main_table.name</filter_index>
+                            <renderer>Mage_Adminhtml_Block_System_Store_Grid_Render_Website</renderer>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='group_title'>
+                        <arguments>
+                            <header translate='true' module='Mage_Core'>Store Name</header>
+                            <align>left</align>
+                            <index>group_title</index>
+                            <filter_index>group_table.name</filter_index>
+                            <renderer>Mage_Adminhtml_Block_System_Store_Grid_Render_Group</renderer>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='store_title'>
+                        <arguments>
+                            <header translate='true' module='Mage_Core'>Store View Name</header>
+                            <align>left</align>
+                            <index>store_title</index>
+                            <filter_index>store_table.name</filter_index>
+                            <renderer>Mage_Adminhtml_Block_System_Store_Grid_Render_Store</renderer>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_system_store_grid_block>
+</layout>
\ No newline at end of file
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax.xml
index 0dc72443fdb..740c3cda3c8 100644
--- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax.xml
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax.xml
@@ -42,4 +42,109 @@
             <block type="Mage_Adminhtml_Block_Tax_Rate_ImportExport" name="tax-rate-importExport" template="tax/importExport.phtml"></block>
         </reference>
     </adminhtml_tax_rule_edit>
+
+    <adminhtml_tax_rate_index>
+        <update handle="formkey"/>
+        <update handle="adminhtml_tax_rate_block"/>
+        <reference name="content">
+            <block type="Mage_Adminhtml_Block_Tax_Rate_Toolbar_Add" name="adminhtml.tax.rate.container"/>
+        </reference>
+    </adminhtml_tax_rate_index>
+    
+    <adminhtml_tax_rate_exportcsv>
+        <update handle="adminhtml_tax_rate_block"/>
+        <container name="adminhtml.tax.rate.container" label="Tax Rate Container"/>
+    </adminhtml_tax_rate_exportcsv>
+
+    <adminhtml_tax_rate_exportxml>
+        <update handle="adminhtml_tax_rate_block"/>
+        <container name="adminhtml.tax.rate.container" label="Tax Rate Container"/>
+    </adminhtml_tax_rate_exportxml>
+
+    <adminhtml_tax_rate_block>
+        <reference name='adminhtml.tax.rate.container'>
+            <block type="Mage_Backend_Block_Widget_Grid" name='adminhtml.tax.rate.grid' as='grid'>
+                <arguments>
+                    <id>tax_rate_grid</id>
+                    <dataSource type="object">Mage_Tax_Model_Resource_Calculation_Grid_Collection</dataSource>
+                    <default_sort>region_name</default_sort>
+                    <default_dir>ASC</default_dir>
+                    <save_parameters_in_session>1</save_parameters_in_session>
+                </arguments>
+                <block type="Mage_Backend_Block_Widget_Grid_Export" name="adminhtml.tax.rate.grid.export" as="grid.export">
+                    <arguments>
+                        <exportTypes>
+                            <csv>
+                                <urlPath>*/*/exportCsv</urlPath>
+                                <label translate="true" module="Mage_Tax">CSV</label>
+                            </csv>
+                            <excel>
+                                <urlPath>*/*/exportXml</urlPath>
+                                <label translate="true" module="Mage_Tax">Excel XML</label>
+                            </excel>
+                        </exportTypes>
+                    </arguments>
+                </block>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.catalog.product.set.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <id>tax_rate_grid</id>
+                        <rowUrl>
+                            <path>*/*/edit</path>
+                            <extraParamsTemplate>
+                                <rate>getTaxCalculationRateId</rate>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='code'>
+                        <arguments>
+                            <header translate='true' module='Mage_Tax'>Tax Identifier</header>
+                            <header_export translate='true' module='Mage_Tax'>Code</header_export>
+                            <align>left</align>
+                            <filter_index>main_table.code</filter_index>
+                            <index>code</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='tax_country_id'>
+                        <arguments>
+                            <header translate='true' module='Mage_Tax'>Country</header>
+                            <type>country</type>
+                            <align>left</align>
+                            <filter_index>main_table.tax_country_id</filter_index>
+                            <index>tax_country_id</index>
+                            <renderer>Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Country</renderer>
+                            <sortable>0</sortable>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='region_name'>
+                        <arguments>
+                            <header translate='true' module='Mage_Tax'>State/Region</header>
+                            <header_export translate='true' module='Mage_Tax'>State</header_export>
+                            <align>left</align>
+                            <filter_index>region_table.code</filter_index>
+                            <index>region_name</index>
+                            <default>*</default>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='tax_postcode'>
+                        <arguments>
+                            <header translate='true' module='Mage_Tax'>Zip/Post Code</header>
+                            <align>left</align>
+                            <index>tax_postcode</index>
+                            <default>*</default>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='rate'>
+                        <arguments>
+                            <header translate='true' module='Mage_Tax'>Rate</header>
+                            <align>right</align>
+                            <index>rate</index>
+                            <type>number</type>
+                            <default>0.00</default>
+                            <renderer>Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Data</renderer>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_tax_rate_block>
 </layout>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml
index fd3af9ee133..50fb7074386 100644
--- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml
@@ -27,10 +27,11 @@
 <div class="content-header">
     <table cellspacing="0">
         <tr>
-            <td style="width:50%;"><h3 class="icon-head head-tax"><?php echo $header ?></h3></td>
+            <td style="width:50%;"><h3 class="icon-head head-tax"><?php echo Mage::helper('Mage_Tax_Helper_Data')->__('Manage Tax Rates') ?></h3></td>
             <td class="form-buttons">
                 <?php echo $this->getChildHtml('addButton') ?>
             </td>
         </tr>
     </table>
 </div>
+<?php echo $this->getChildhtml('grid') ?>
\ No newline at end of file
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite.xml
new file mode 100644
index 00000000000..e06558a8dd5
--- /dev/null
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    design
+ * @package     base_default
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+
+-->
+<layout version="0.1.0">
+    <adminhtml_urlrewrite_index>
+        <reference name="content">
+            <block type="Mage_Adminhtml_Block_Urlrewrite" name="adminhtml.block.urlrewrite.grid.container">
+                <block type="Mage_Backend_Block_Widget_Grid" name="adminhtml.block.urlrewrite.grid" as="grid">
+                    <arguments>
+                        <id>urlrewriteGrid</id>
+                        <dataSource type="object">Mage_Core_Model_Resource_Url_Rewrite_Collection</dataSource>
+                        <default_sort>url_rewrite_id</default_sort>
+                    </arguments>
+                    <block type="Mage_Backend_Block_Widget_Grid_ColumnSet" as="grid.columnSet" name="adminhtml.urlrewrite.grid.columnSet">
+                        <arguments>
+                            <rowUrl>
+                                <path>*/*/edit</path>
+                                <extraParamsTemplate>
+                                    <id>getId</id>
+                                </extraParamsTemplate>
+                            </rowUrl>
+                        </arguments>
+                        <block type="Mage_Backend_Block_Widget_Grid_Column" as="url_rewrite_id">
+                            <arguments>
+                                <header translate="true" module="Mage_Adminhtml">ID</header>
+                                <width>50px</width>
+                                <type>text</type>
+                                <id>url_rewrite_id</id>
+                                <index>url_rewrite_id</index>
+                            </arguments>
+                        </block>
+                        <block type="Mage_Backend_Block_Widget_Grid_Column_Multistore" as="store_id">
+                            <arguments>
+                                <header translate="true" module="Mage_Adminhtml">Store View</header>
+                                <width>200px</width>
+                                <type>store</type>
+                                <id>store_id</id>
+                                <index>store_id</index>
+                                <store_view>true</store_view>
+                            </arguments>
+                        </block>
+                        <block type="Mage_Backend_Block_Widget_Grid_Column" as="is_system">
+                            <arguments>
+                                <header translate="true" module="Mage_Adminhtml">Type</header>
+                                <width>50px</width>
+                                <type>options</type>
+                                <id>is_system</id>
+                                <index>is_system</index>
+                                <options type="options">Mage_Adminhtml_Model_UrlRewriteOptions</options>
+                            </arguments>
+                        </block>
+                        <block type="Mage_Backend_Block_Widget_Grid_Column" as="id_path">
+                            <arguments>
+                                <header translate="true" module="Mage_Adminhtml">ID Path</header>
+                                <width>50px</width>
+                                <type>text</type>
+                                <id>id_path</id>
+                                <index>id_path</index>
+                            </arguments>
+                        </block>
+                        <block type="Mage_Backend_Block_Widget_Grid_Column" as="request_path">
+                            <arguments>
+                                <header translate="true" module="Mage_Adminhtml">Request Path</header>
+                                <width>50px</width>
+                                <type>text</type>
+                                <id>request_path</id>
+                                <index>request_path</index>
+                            </arguments>
+                        </block>
+                        <block type="Mage_Backend_Block_Widget_Grid_Column" as="target_path">
+                            <arguments>
+                                <header translate="true" module="Mage_Adminhtml">Target Path</header>
+                                <width>50px</width>
+                                <type>text</type>
+                                <id>target_path</id>
+                                <index>target_path</index>
+                            </arguments>
+                        </block>
+                        <block type="Mage_Backend_Block_Widget_Grid_Column" as="options">
+                            <arguments>
+                                <header translate="true" module="Mage_Adminhtml">Options</header>
+                                <width>50px</width>
+                                <type>text</type>
+                                <id>options</id>
+                                <index>options</index>
+                            </arguments>
+                        </block>
+                        <block type="Mage_Backend_Block_Widget_Grid_Column" as="actions">
+                            <arguments>
+                                <header translate="true" module="Mage_Adminhtml">Action</header>
+                                <sortable>0</sortable>
+                                <filter>0</filter>
+                                <width>15px</width>
+                                <type>action</type>
+                                <id>actions</id>
+                                <index>url_rewrite_id</index>
+                                <actions>
+                                    <view_action>
+                                        <caption translate="true" module="Mage_Adminhtml">Edit</caption>
+                                        <url>
+                                            <base>*/*/edit</base>
+                                        </url>
+                                        <field>id</field>
+                                    </view_action>
+                                </actions>
+                            </arguments>
+                        </block>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_urlrewrite_index>
+</layout>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/variable.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/variable.xml
new file mode 100644
index 00000000000..3c9e22ecd37
--- /dev/null
+++ b/app/code/core/Mage/Adminhtml/view/adminhtml/variable.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    design
+ * @package     base_default
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+
+-->
+<layout version="0.1.0">
+    <adminhtml_system_variable_index>
+        <update handle='adminhtml_system_variable_grid_block' />
+        <reference name='content'>
+            <block type='Mage_Adminhtml_Block_System_Variable' name='adminhtml.system.variable.grid.container' />
+        </reference>
+    </adminhtml_system_variable_index>
+
+    <adminhtml_system_variable_grid_block>
+        <reference name='adminhtml.system.variable.grid.container'>
+            <block type='Mage_Backend_Block_Widget_Grid' name='adminhtml.system.variable.grid' as='grid'>
+                <arguments>
+                    <id>customVariablesGrid</id>
+                    <dataSource type='object'>Mage_Core_Model_Resource_Variable_Collection</dataSource>
+                    <default_sort>variable_id</default_sort>
+                    <default_dir>ASC</default_dir>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.system.variable.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <rowUrl>
+                            <path>*/*/edit</path>
+                            <extraParamsTemplate>
+                                <variable_id>getId</variable_id>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='variable_id'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Variable ID</header>
+                            <width>1px</width>
+                            <index>variable_id</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='code'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Variable Code</header>
+                            <index>code</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='name'>
+                        <arguments>
+                            <header translate='true' module='Mage_Adminhtml'>Name</header>
+                            <index>name</index>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_system_variable_grid_block>
+</layout>
\ No newline at end of file
diff --git a/app/code/core/Mage/Backend/etc/adminhtml/system.xml b/app/code/core/Mage/Backend/etc/adminhtml/system.xml
index df592ae623a..8c3c34a145f 100644
--- a/app/code/core/Mage/Backend/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Backend/etc/adminhtml/system.xml
@@ -133,7 +133,7 @@
                     <backend_model>Mage_Core_Model_Design_Backend_Exceptions</backend_model>
                     <comment>
                         <![CDATA[Search strings are either normal strings or regular exceptions (PCRE). They are matched in the same order as entered. Examples:<br /><span style="font-family:monospace">Firefox<br />/^mozilla/i</span>]]>
-</comment>
+                    </comment>
                     <tooltip>Find a string in client user-agent header and switch to specific design theme for that browser.</tooltip>
                 </field>
             </group>
@@ -482,7 +482,7 @@
                     <backend_model>Mage_Backend_Model_Config_Backend_Store</backend_model>
                     <comment>
                         <![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="redirect_to_base" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
                     <label>Auto-redirect to Base URL</label>
diff --git a/app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Renderer/Download.php b/app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Renderer/Download.php
new file mode 100644
index 00000000000..1ec5e4e8028
--- /dev/null
+++ b/app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Renderer/Download.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_Backup
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * Backup grid item renderer
+ *
+ * @category   Mage
+ * @package    Mage_Backup
+ * @author     Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Backup_Block_Adminhtml_Grid_Column_Renderer_Download
+    extends Mage_Backend_Block_Widget_Grid_Column_Renderer_Text
+{
+    /**
+     * Renders grid column
+     *
+     * @param Varien_Object $row
+     * @return mixed
+     */
+    public function _getValue(Varien_Object $row)
+    {
+        $url7zip = $this->helper('Mage_Adminhtml_Helper_Data')
+            ->__('The archive can be uncompressed with <a href="%s">%s</a> on Windows systems', 'http://www.7-zip.org/',
+            '7-Zip');
+
+        return '<a href="' . $this->getUrl('*/*/download',
+            array('time' => $row->getData('time'), 'type' => $row->getData('type'))) . '">' . $row->getData('extension')
+               . '</a> &nbsp; <small>(' . $url7zip . ')</small>';
+
+    }
+}
\ No newline at end of file
diff --git a/app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Rollback.php b/app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Rollback.php
new file mode 100644
index 00000000000..29bd93b243d
--- /dev/null
+++ b/app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Rollback.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_Backup
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * Grid column block that is displayed only if rollback allowed
+ *
+ * @category   Mage
+ * @package    Mage_Backup
+ * @author     Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Backup_Block_Adminhtml_Grid_Column_Rollback extends Mage_Backend_Block_Widget_Grid_Column
+{
+    /**
+     * Check permission for rollback
+     *
+     * @return bool
+     */
+    public function isDisplayed()
+    {
+        return $this->helper('Mage_Backup_Helper_Data')->isRollbackAllowed();
+    }
+}
\ No newline at end of file
diff --git a/app/code/core/Mage/Backup/Model/Grid/Options.php b/app/code/core/Mage/Backup/Model/Grid/Options.php
new file mode 100644
index 00000000000..41db8797bd4
--- /dev/null
+++ b/app/code/core/Mage/Backup/Model/Grid/Options.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_Adminhtml
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * Backup types option array
+ *
+ * @category   Mage
+ * @package    Mage_Adminhtml
+ * @author     Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Backup_Model_Grid_Options implements Mage_Core_Model_Option_ArrayInterface
+{
+
+    /**
+     * @var Mage_Backup_Helper_Data
+     */
+    protected $_helper;
+
+    /**
+     * @param Mage_Backup_Helper_Data $backupHelper
+     */
+    public function __construct(Mage_Backup_Helper_Data $backupHelper)
+    {
+        $this->_helper = $backupHelper;
+    }
+
+    /**
+     * Return backup types array
+     * @return array
+     */
+    public function toOptionArray()
+    {
+        return $this->_helper->getBackupTypes();
+    }
+}
diff --git a/app/code/core/Mage/Captcha/etc/adminhtml/system.xml b/app/code/core/Mage/Captcha/etc/adminhtml/system.xml
index 5a571e80c2a..1f60125dd68 100644
--- a/app/code/core/Mage/Captcha/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Captcha/etc/adminhtml/system.xml
@@ -83,7 +83,7 @@
                     <label>Symbols Used in CAPTCHA</label>
                     <comment>
                         <![CDATA[Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]>
-</comment>
+                    </comment>
                     <depends>
                         <field id="enable">1</field>
                     </depends>
@@ -155,7 +155,7 @@
                     <label>Symbols Used in CAPTCHA</label>
                     <comment>
                         <![CDATA[Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]>
-</comment>
+                    </comment>
                     <depends>
                         <field id="enable">1</field>
                     </depends>
diff --git a/app/code/core/Mage/Catalog/Model/Category.php b/app/code/core/Mage/Catalog/Model/Category.php
index 567bed721fd..d5369326f2c 100644
--- a/app/code/core/Mage/Catalog/Model/Category.php
+++ b/app/code/core/Mage/Catalog/Model/Category.php
@@ -405,7 +405,7 @@ class Mage_Catalog_Model_Category extends Mage_Catalog_Model_Abstract
     {
         $url = $this->_getData('url');
         if (is_null($url)) {
-            Magento_Profiler::start('REWRITE: '.__METHOD__);
+            Magento_Profiler::start('REWRITE: '.__METHOD__, array('group' => 'REWRITE', 'method' => __METHOD__));
 
             if ($this->hasData('request_path') && $this->getRequestPath() != '') {
                 $this->setData('url', $this->getUrlInstance()->getDirectUrl($this->getRequestPath()));
@@ -441,7 +441,7 @@ class Mage_Catalog_Model_Category extends Mage_Catalog_Model_Abstract
      */
     public function getCategoryIdUrl()
     {
-        Magento_Profiler::start('REGULAR: '.__METHOD__);
+        Magento_Profiler::start('REGULAR: '.__METHOD__, array('group' => 'REGULAR', 'method' => __METHOD__));
         $urlKey = $this->getUrlKey() ? $this->getUrlKey() : $this->formatUrlKey($this->getName());
         $url = $this->getUrlInstance()->getUrl('catalog/category/view', array(
             's'=>$urlKey,
diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php
index 2c9eb0ee321..cead6824081 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php
@@ -224,7 +224,7 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr
      */
     public function getConfigurableAttributes($product)
     {
-        Magento_Profiler::start('CONFIGURABLE:'.__METHOD__);
+        Magento_Profiler::start('CONFIGURABLE:'.__METHOD__, array('group' => 'CONFIGURABLE', 'method' => __METHOD__));
         if (!$product->hasData($this->_configurableAttributes)) {
             $configurableAttributes = $this->getConfigurableAttributeCollection($product)
                 ->orderByPosition()
@@ -301,7 +301,7 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr
      */
     public function getUsedProducts($product, $requiredAttributeIds = null)
     {
-        Magento_Profiler::start('CONFIGURABLE:'.__METHOD__);
+        Magento_Profiler::start('CONFIGURABLE:'.__METHOD__, array('group' => 'CONFIGURABLE', 'method' => __METHOD__));
         if (!$product->hasData($this->_usedProducts)) {
             if (is_null($requiredAttributeIds)
                 and is_null($product->getData($this->_configurableAttributes))) {
@@ -513,7 +513,7 @@ class Mage_Catalog_Model_Product_Type_Configurable extends Mage_Catalog_Model_Pr
     public function getSelectedAttributesInfo($product)
     {
         $attributes = array();
-        Magento_Profiler::start('CONFIGURABLE:'.__METHOD__);
+        Magento_Profiler::start('CONFIGURABLE:'.__METHOD__, array('group' => 'CONFIGURABLE', 'method' => __METHOD__));
         if ($attributesOption = $product->getCustomOption('attributes')) {
             $data = unserialize($attributesOption->getValue());
             $this->getUsedProductAttributeIds($product);
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php
index 1b2a014a36a..d63e7937613 100755
--- a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php
@@ -132,16 +132,16 @@ class Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection
     protected function _afterLoad()
     {
         parent::_afterLoad();
-        Magento_Profiler::start('TTT1:'.__METHOD__);
+        Magento_Profiler::start('TTT1:'.__METHOD__, array('group' => 'TTT1', 'method' => __METHOD__));
         $this->_addProductAttributes();
         Magento_Profiler::stop('TTT1:'.__METHOD__);
-        Magento_Profiler::start('TTT2:'.__METHOD__);
+        Magento_Profiler::start('TTT2:'.__METHOD__, array('group' => 'TTT2', 'method' => __METHOD__));
         $this->_addAssociatedProductFilters();
         Magento_Profiler::stop('TTT2:'.__METHOD__);
-        Magento_Profiler::start('TTT3:'.__METHOD__);
+        Magento_Profiler::start('TTT3:'.__METHOD__, array('group' => 'TTT3', 'method' => __METHOD__));
         $this->_loadLabels();
         Magento_Profiler::stop('TTT3:'.__METHOD__);
-        Magento_Profiler::start('TTT4:'.__METHOD__);
+        Magento_Profiler::start('TTT4:'.__METHOD__, array('group' => 'TTT4', 'method' => __METHOD__));
         $this->_loadPrices();
         Magento_Profiler::stop('TTT4:'.__METHOD__);
         return $this;
diff --git a/app/code/core/Mage/Catalog/etc/adminhtml/system.xml b/app/code/core/Mage/Catalog/etc/adminhtml/system.xml
index 551133811cb..46262aaf1cb 100644
--- a/app/code/core/Mage/Catalog/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Catalog/etc/adminhtml/system.xml
@@ -275,7 +275,7 @@
                     <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model>
                     <comment>
                         <![CDATA[<strong style="color:red">Warning!</strong> Applying MAP by default will hide all product prices on the frontend.]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="display_price_type" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Display Actual Price</label>
diff --git a/app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml b/app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml
index afffc09c109..b21481ade6b 100644
--- a/app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml
@@ -58,7 +58,7 @@
             <group id="item_options" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                 <comment>
                     <![CDATA[<strong>Note</strong> that these settings are applicable to cart line items, not the whole cart.]]>
-</comment>
+                </comment>
                 <label>Product Stock Options</label>
                 <field id="manage_stock" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                     <label>Manage Stock</label>
diff --git a/app/code/core/Mage/CatalogSearch/Model/Terms/Grid/OptionsArray.php b/app/code/core/Mage/CatalogSearch/Model/Terms/Grid/OptionsArray.php
new file mode 100644
index 00000000000..7f70d2a29bc
--- /dev/null
+++ b/app/code/core/Mage/CatalogSearch/Model/Terms/Grid/OptionsArray.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_CatalogSearch
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * CatalogSearch terms flag option array
+ *
+ * @category   Mage
+ * @package    Mage_CatalogSearch
+ * @author     Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_CatalogSearch_Model_Terms_Grid_OptionsArray implements Mage_Core_Model_Option_ArrayInterface
+{
+    /**
+     * Catalog Helper
+     *
+     * @var Mage_Catalog_Helper_Data
+     */
+    protected $_helper;
+
+    /**
+     * @param Mage_Catalog_Helper_Data $catalogHelper
+     */
+    public function __construct(Mage_Catalog_Helper_Data $catalogHelper)
+    {
+        $this->_helper = $catalogHelper;
+    }
+
+    /**
+     * Return statuses array
+     * @return array
+     */
+    public function toOptionArray()
+    {
+        return array(
+            '1' => $this->_helper->__('Yes'),
+            '0' => $this->_helper->__('No'),
+        );
+    }
+}
diff --git a/app/code/core/Mage/CatalogSearch/etc/config.xml b/app/code/core/Mage/CatalogSearch/etc/config.xml
index 8bf9d850a05..707d600c2c0 100644
--- a/app/code/core/Mage/CatalogSearch/etc/config.xml
+++ b/app/code/core/Mage/CatalogSearch/etc/config.xml
@@ -80,6 +80,13 @@
         </layout>
     </frontend>
     <adminhtml>
+        <layout>
+            <updates>
+                <catalogsearch module="Mage_CatalogSearch">
+                    <file>layout.xml</file>
+                </catalogsearch>
+            </updates>
+        </layout>
         <translate>
             <modules>
                 <Mage_CatalogSearch>
diff --git a/app/code/core/Mage/CatalogSearch/view/adminhtml/layout.xml b/app/code/core/Mage/CatalogSearch/view/adminhtml/layout.xml
new file mode 100644
index 00000000000..e5b2368aca5
--- /dev/null
+++ b/app/code/core/Mage/CatalogSearch/view/adminhtml/layout.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    design
+ * @package     default_default
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+
+<layout>
+    <adminhtml_catalog_search_edit>
+        <reference name="content">
+            <block type="Mage_Adminhtml_Block_Catalog_Search_Edit" name="adminhtml.catalog.search.edit" />
+        </reference>
+    </adminhtml_catalog_search_edit>
+
+    <adminhtml_catalog_search_index>
+        <update handle ='adminhtml_catalog_search_grid_block' />
+        <reference name='content'>
+            <block type='Mage_Adminhtml_Block_Catalog_Search' name='adminhtml.catalog.search.grid.container' />
+        </reference>
+    </adminhtml_catalog_search_index>
+
+
+
+    <adminhtml_catalog_search_grid_block>
+        <reference name='adminhtml.catalog.search.grid.container'>
+            <block type='Mage_Backend_Block_Widget_Grid' name='adminhtml.catalog.search.grid' as='grid'>
+                <arguments>
+                    <id>catalog_search_grid</id>
+                    <dataSource type='object'>Mage_CatalogSearch_Model_Resource_Query_Collection</dataSource>
+                    <default_sort>name</default_sort>
+                    <default_dir>ASC</default_dir>
+                    <save_parameters_in_session>1</save_parameters_in_session>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_Massaction'  name='adminhtml.catalog.search.grid.massaction' as='grid.massaction'>
+                    <arguments>
+                        <massaction_id_field>query_id</massaction_id_field>
+                        <form_field_name>search</form_field_name>
+                        <use_select_all>1</use_select_all>
+                            <options>
+                                <delete>
+                                    <label translate='true' module='Mage_Catalog'>Delete</label>
+                                    <url>*/*/massDelete</url>
+                                    <confirm translate='true' module='Mage_Catalog'>Are you sure?</confirm>
+                                </delete>
+                            </options>
+                    </arguments>
+                </block>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.catalog.search.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <rowUrl>
+                            <path>*/*/edit</path>
+                            <extraParamsTemplate>
+                                <id>getId</id>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='search_query'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Search Query</header>
+                            <index>query_text</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column_Multistore" as="store_id">
+                        <arguments>
+                            <header translate="true" module="Mage_Catalog">Store</header>
+                            <type>store</type>
+                            <id>store_id</id>
+                            <index>store_id</index>
+                            <store_view>1</store_view>
+                            <sortable>0</sortable>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='num_results'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Results</header>
+                            <index>num_results</index>
+                            <type>number</type>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='popularity'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Number of Uses</header>
+                            <index>popularity</index>
+                            <type>number</type>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='synonym_for'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Synonym For</header>
+                            <index>synonym_for</index>
+                            <align>left</align>
+                            <width>160px</width>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='redirect'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Redirect</header>
+                            <align>left</align>
+                            <index>redirect</index>
+                            <width>200px</width>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='display_in_terms'>
+                        <arguments>
+                            <header translate='true' module='Mage_Catalog'>Display in Suggested Terms</header>
+                            <sortable>1</sortable>
+                            <index>display_in_terms</index>
+                            <width>100px</width>
+                            <align>left</align>
+                            <type>options</type>
+                            <options type='options'>Mage_CatalogSearch_Model_Terms_Grid_OptionsArray</options>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='action'>
+                        <arguments>
+                            <type>action</type>
+                            <header translate="true" module="Mage_Catalog">Action</header>
+                            <width>100px</width>
+                            <filter>0</filter>
+                            <sortable>0</sortable>
+                            <index>query_id</index>
+                            <actions>
+                                <edit>
+                                    <caption translate="true" module="Mage_Catalog">Edit</caption>
+                                    <url>
+                                        <base>*/*/edit</base>
+                                    </url>
+                                    <field>id</field>
+                                </edit>
+                            </actions>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_catalog_search_grid_block>
+</layout>
diff --git a/app/code/core/Mage/Core/Block/Template.php b/app/code/core/Mage/Core/Block/Template.php
index aa2e4a3b172..a706acfbc38 100644
--- a/app/code/core/Mage/Core/Block/Template.php
+++ b/app/code/core/Mage/Core/Block/Template.php
@@ -211,7 +211,8 @@ class Mage_Core_Block_Template extends Mage_Core_Block_Abstract
      */
     public function fetchView($fileName)
     {
-        Magento_Profiler::start('TEMPLATE:' . $fileName);
+        $viewShortPath = str_replace(Mage::getBaseDir(), '', $fileName);
+        Magento_Profiler::start('TEMPLATE:' . $fileName, array('group' => 'TEMPLATE', 'file_name' => $viewShortPath));
 
         // EXTR_SKIP protects from overriding
         // already defined variables
diff --git a/app/code/core/Mage/Core/Model/App.php b/app/code/core/Mage/Core/Model/App.php
index 73e2e6ec76c..6786b20d5b4 100644
--- a/app/code/core/Mage/Core/Model/App.php
+++ b/app/code/core/Mage/Core/Model/App.php
@@ -1384,7 +1384,7 @@ class Mage_Core_Model_App
 
             foreach ($events[$eventName]['observers'] as $obsName => $obs) {
                 $observer->setData(array('event' => $event));
-                Magento_Profiler::start('OBSERVER:' . $obsName);
+                Magento_Profiler::start('OBSERVER:' . $obsName, array('group' => 'OBSERVER', 'observer' => $obsName));
                 switch ($obs['type']) {
                     case 'disabled':
                         break;
diff --git a/app/code/core/Mage/Core/Model/App/Area.php b/app/code/core/Mage/Core/Model/App/Area.php
index 5cece1a7d03..1b81e56b03b 100644
--- a/app/code/core/Mage/Core/Model/App/Area.php
+++ b/app/code/core/Mage/Core/Model/App/Area.php
@@ -158,7 +158,8 @@ class Mage_Core_Model_App_Area
         if (isset($this->_loadedParts[$part])) {
             return $this;
         }
-        Magento_Profiler::start('load_area:' . $this->_code . '.' . $part);
+        Magento_Profiler::start('load_area:' . $this->_code . '.' . $part,
+            array('group' => 'load_area', 'area_code' => $this->_code, 'part' => $part));
         switch ($part) {
             case self::PART_CONFIG:
                 $this->_initConfig();
diff --git a/app/code/core/Mage/Core/Model/Config.php b/app/code/core/Mage/Core/Model/Config.php
index eaa35a68cfe..fcd53e18113 100644
--- a/app/code/core/Mage/Core/Model/Config.php
+++ b/app/code/core/Mage/Core/Model/Config.php
@@ -668,7 +668,8 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base
         $sectionKey = implode('_', $sectionPath);
 
         if (!isset($this->_cacheLoadedSections[$sectionKey])) {
-            Magento_Profiler::start('init_config_section:' . $sectionKey);
+            Magento_Profiler::start('init_config_section:' . $sectionKey, array('group' => 'init_config_section',
+                'section_key' => $sectionKey));
             $this->_cacheLoadedSections[$sectionKey] = $this->_loadSectionCache($sectionKey);
             Magento_Profiler::stop('init_config_section:' . $sectionKey);
         }
@@ -1352,7 +1353,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base
     {
         $className = $this->getModelClassName($modelClass);
         if (class_exists($className)) {
-            Magento_Profiler::start('FACTORY:' . $className);
+            Magento_Profiler::start('FACTORY:' . $className, array('group' => 'FACTORY', 'class_name' => $className));
             $obj = $this->_objectManager->create($className, $constructArguments);
             Magento_Profiler::stop('FACTORY:' . $className);
             return $obj;
diff --git a/app/code/core/Mage/Core/Model/Layout/Argument/Handler/Url.php b/app/code/core/Mage/Core/Model/Layout/Argument/Handler/Url.php
index 55c7bd7d4b5..183c830a617 100644
--- a/app/code/core/Mage/Core/Model/Layout/Argument/Handler/Url.php
+++ b/app/code/core/Mage/Core/Model/Layout/Argument/Handler/Url.php
@@ -57,12 +57,11 @@ class Mage_Core_Model_Layout_Argument_Handler_Url extends Mage_Core_Model_Layout
      */
     public function process($value)
     {
-        if (false === is_array($value) || (!isset($value['path']) || !isset($value['params']))) {
+        if (false === is_array($value) || (!isset($value['path']))) {
             throw new InvalidArgumentException('Passed value has incorrect format');
         }
 
-        $path = $value['path'];
-        $params = $value['params'];
-        return $this->_urlModel->getUrl($path, $params);
+        $params = array_key_exists('params', $value) ? $value['params'] : null;
+        return $this->_urlModel->getUrl($value['path'], $params);
     }
 }
diff --git a/app/code/core/Mage/Core/Model/Resource/Website/Collection.php b/app/code/core/Mage/Core/Model/Resource/Website/Collection.php
index 232c51e4efb..96ee07d226e 100644
--- a/app/code/core/Mage/Core/Model/Resource/Website/Collection.php
+++ b/app/code/core/Mage/Core/Model/Resource/Website/Collection.php
@@ -51,6 +51,17 @@ class Mage_Core_Model_Resource_Website_Collection extends Mage_Core_Model_Resour
         $this->_init('Mage_Core_Model_Website', 'Mage_Core_Model_Resource_Website');
     }
 
+    /**
+     * Apply custom filtering
+     */
+    protected function _renderFiltersBefore()
+    {
+        if (!$this->getLoadDefault()) {
+            $this->getSelect()->where('main_table.website_id > ?', 0);
+        }
+        parent::_renderFiltersBefore();
+    }
+
     /**
      * Set flag for load default (admin) website
      *
@@ -123,14 +134,10 @@ class Mage_Core_Model_Resource_Website_Collection extends Mage_Core_Model_Resour
      */
     public function load($printQuery = false, $logQuery = false)
     {
-        if (!$this->getLoadDefault()) {
-            $this->getSelect()->where('main_table.website_id > ?', 0);
-        }
         $this->unshiftOrder('main_table.name', Varien_Db_Select::SQL_ASC)       // website name SECOND
              ->unshiftOrder('main_table.sort_order', Varien_Db_Select::SQL_ASC); // website sort order FIRST
 
         return parent::load($printQuery, $logQuery);
-
     }
 
     /**
diff --git a/app/code/core/Mage/Core/Model/Resource/Website/Grid/Collection.php b/app/code/core/Mage/Core/Model/Resource/Website/Grid/Collection.php
new file mode 100644
index 00000000000..0e6a37feffe
--- /dev/null
+++ b/app/code/core/Mage/Core/Model/Resource/Website/Grid/Collection.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_Core
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * Grid collection
+ *
+ * @category    Mage
+ * @package     Mage_Core
+ * @author      Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Core_Model_Resource_Website_Grid_Collection extends Mage_Core_Model_Resource_Website_Collection
+{
+    /**
+     * Join website and store names
+     *
+     * @return Mage_Core_Model_Resource_Db_Collection_Abstract|Mage_Core_Model_Resource_Website_Grid_Collection
+     */
+    protected function  _initSelect()
+    {
+        parent::_initSelect();
+        $this->joinGroupAndStore();
+        return $this;
+    }
+}
diff --git a/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php b/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php
index 450fbbf7bb4..a36cbdbecc6 100644
--- a/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php
+++ b/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php
@@ -251,7 +251,7 @@ class Mage_CurrencySymbol_Model_System_Currencysymbol
     /**
      * Clear translate cache
      *
-     * @return Saas_Translate_Helper_Data
+     * @return Mage_CurrencySymbol_Model_System_Currencysymbol
      */
     public function clearCache()
     {
diff --git a/app/code/core/Mage/Customer/etc/adminhtml/system.xml b/app/code/core/Mage/Customer/etc/adminhtml/system.xml
index 2f19094b5d1..b0205d099d1 100644
--- a/app/code/core/Mage/Customer/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Customer/etc/adminhtml/system.xml
@@ -179,7 +179,7 @@
                     <label>Prefix Dropdown Options</label>
                     <comment>
                         <![CDATA[Semicolon (;) separated values.<br/>Put semicolon in the beginning for empty first option.<br/>Leave empty for open text field.]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="middlename_show" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Show Middle Name (initial)</label>
@@ -197,7 +197,7 @@
                     <label>Suffix Dropdown Options</label>
                     <comment>
                         <![CDATA[Semicolon (;) separated values.<br/>Put semicolon in the beginning for empty first option.<br/>Leave empty for open text field.]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="dob_show" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Show Date of Birth</label>
diff --git a/app/code/core/Mage/Directory/Block/Data.php b/app/code/core/Mage/Directory/Block/Data.php
index 47f203d2730..a419810e239 100644
--- a/app/code/core/Mage/Directory/Block/Data.php
+++ b/app/code/core/Mage/Directory/Block/Data.php
@@ -52,7 +52,7 @@ class Mage_Directory_Block_Data extends Mage_Core_Block_Template
 
     public function getCountryHtmlSelect($defValue=null, $name='country_id', $id='country', $title='Country')
     {
-        Magento_Profiler::start('TEST: '.__METHOD__);
+        Magento_Profiler::start('TEST: '.__METHOD__, array('group' => 'TEST', 'method' => __METHOD__));
         if (is_null($defValue)) {
             $defValue = $this->getCountryId();
         }
@@ -94,7 +94,7 @@ class Mage_Directory_Block_Data extends Mage_Core_Block_Template
 
     public function getRegionHtmlSelect()
     {
-        Magento_Profiler::start('TEST: '.__METHOD__);
+        Magento_Profiler::start('TEST: '.__METHOD__, array('group' => 'TEST', 'method' => __METHOD__));
         $cacheKey = 'DIRECTORY_REGION_SELECT_STORE'.Mage::app()->getStore()->getId();
         if (Mage::app()->useCache('config') && $cache = Mage::app()->loadCache($cacheKey)) {
             $options = unserialize($cache);
@@ -112,7 +112,7 @@ class Mage_Directory_Block_Data extends Mage_Core_Block_Template
             ->setValue(intval($this->getRegionId()))
             ->setOptions($options)
             ->getHtml();
-        Magento_Profiler::start('TEST: '.__METHOD__);
+        Magento_Profiler::start('TEST: '.__METHOD__, array('group' => 'TEST', 'method' => __METHOD__));
         return $html;
     }
 
@@ -127,7 +127,7 @@ class Mage_Directory_Block_Data extends Mage_Core_Block_Template
 
     public function getRegionsJs()
     {
-        Magento_Profiler::start('TEST: '.__METHOD__);
+        Magento_Profiler::start('TEST: '.__METHOD__, array('group' => 'TEST', 'method' => __METHOD__));
         $regionsJs = $this->getData('regions_js');
         if (!$regionsJs) {
             $countryIds = array();
diff --git a/app/code/core/Mage/Directory/Helper/Data.php b/app/code/core/Mage/Directory/Helper/Data.php
index 0ec2868cae1..50e02da41f4 100644
--- a/app/code/core/Mage/Directory/Helper/Data.php
+++ b/app/code/core/Mage/Directory/Helper/Data.php
@@ -118,7 +118,7 @@ class Mage_Directory_Helper_Data extends Mage_Core_Helper_Abstract
     public function getRegionJson()
     {
 
-        Magento_Profiler::start('TEST: '.__METHOD__);
+        Magento_Profiler::start('TEST: '.__METHOD__, array('group' => 'TEST', 'method' => __METHOD__));
         if (!$this->_regionJson) {
             $cacheKey = 'DIRECTORY_REGIONS_JSON_STORE'.Mage::app()->getStore()->getId();
             if (Mage::app()->useCache('config')) {
diff --git a/app/code/core/Mage/Directory/etc/adminhtml/system.xml b/app/code/core/Mage/Directory/etc/adminhtml/system.xml
index 867111b9c48..765f996db13 100644
--- a/app/code/core/Mage/Directory/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Directory/etc/adminhtml/system.xml
@@ -40,7 +40,7 @@
                     <backend_model>Mage_Backend_Model_Config_Backend_Currency_Base</backend_model>
                     <comment>
                         <![CDATA[Base currency is used for all online payment transactions. If you have more than one store view, the base currency scope is defined by the catalog price scope ("Catalog" > "Price" > "Catalog Price Scope").]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="default" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Default Display Currency</label>
diff --git a/app/code/core/Mage/Eav/Model/Config.php b/app/code/core/Mage/Eav/Model/Config.php
index 9ef2db17df0..435a134f9a6 100644
--- a/app/code/core/Mage/Eav/Model/Config.php
+++ b/app/code/core/Mage/Eav/Model/Config.php
@@ -239,7 +239,7 @@ class Mage_Eav_Model_Config
         if (is_array($this->_entityData)) {
             return $this;
         }
-        Magento_Profiler::start('EAV: '.__METHOD__);
+        Magento_Profiler::start('EAV: '.__METHOD__, array('group' => 'EAV', 'method' => __METHOD__));
 
         /**
          * try load information about entity types from cache
@@ -296,7 +296,7 @@ class Mage_Eav_Model_Config
         if ($code instanceof Mage_Eav_Model_Entity_Type) {
             return $code;
         }
-        Magento_Profiler::start('EAV: '.__METHOD__);
+        Magento_Profiler::start('EAV: '.__METHOD__, array('group' => 'EAV', 'method' => __METHOD__));
 
         if (is_numeric($code)) {
             $entityCode = $this->_getEntityTypeReference($code);
@@ -348,7 +348,7 @@ class Mage_Eav_Model_Config
         if (isset($this->_initializedAttributes[$entityTypeCode])) {
             return $this;
         }
-        Magento_Profiler::start('EAV: '.__METHOD__);
+        Magento_Profiler::start('EAV: '.__METHOD__, array('group' => 'EAV', 'method' => __METHOD__));
 
         $attributesInfo = Mage::getResourceModel($entityType->getEntityAttributeCollection())
             ->setEntityTypeFilter($entityType)
@@ -380,7 +380,7 @@ class Mage_Eav_Model_Config
             return $code;
         }
 
-        Magento_Profiler::start('EAV: '.__METHOD__);
+        Magento_Profiler::start('EAV: '.__METHOD__, array('group' => 'EAV', 'method' => __METHOD__));
 
         $entityTypeCode = $this->getEntityType($entityType)->getEntityTypeCode();
         $entityType     = $this->getEntityType($entityType);
@@ -511,7 +511,8 @@ class Mage_Eav_Model_Config
         if (empty($attributes)) {
             return $this;
         }
-        Magento_Profiler::start('EAV: '.__METHOD__ . ':'.$entityTypeCode);
+        Magento_Profiler::start('EAV: '.__METHOD__ . ':'.$entityTypeCode,
+            array('group' => 'EAV', 'method' => __METHOD__, 'entity_type_code' => $entityTypeCode));
 
         $attributesInfo = Mage::getResourceModel($entityType->getEntityAttributeCollection())
             ->setEntityTypeFilter($entityType)
diff --git a/app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php b/app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php
new file mode 100644
index 00000000000..3c7c12f7ea4
--- /dev/null
+++ b/app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_Eav
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * Eav Resource Attribute Set Collection
+ *
+ * @category    Mage
+ * @package     Mage_Eav
+ * @author      Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Eav_Model_Resource_Entity_Attribute_Grid_Collection
+    extends Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection
+{
+    /**
+     * @var Mage_Core_Model_Registry
+     */
+    protected $_registryManager;
+
+    /**
+     * @param Mage_Core_Model_Resource_Db_Abstract $resource
+     * @param Mage_Core_Model_Registry $registry
+     */
+    public function __construct(
+        Mage_Core_Model_Registry $registry, Mage_Core_Model_Resource_Db_Abstract $resource = null
+    ) {
+        parent::__construct($resource);
+        $this->_registryManager = $registry;
+    }
+
+    /**
+     * Prepare select for load
+     *
+     * @param Varien_Db_select $select
+     * @return string
+     */
+    protected function _prepareSelect(Varien_Db_Select $select)
+    {
+        $this->setEntityTypeFilter($this->_registryManager->registry('entityType'));
+        return parent::_prepareSelect($select);
+    }
+}
diff --git a/app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml b/app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml
index 971352fa54b..50ea043d223 100644
--- a/app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml
@@ -35,7 +35,7 @@
                 <label>Google Checkout</label>
                 <comment>
                     <![CDATA[<a href="http://www.magentocommerce.com/redirect/google-checkout/" target="_blank">Signup for Google Checkout</a>]]>
-</comment>
+                </comment>
                 <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Enable</label>
                     <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model>
@@ -109,7 +109,7 @@
                     <label>Enable Carrier Calculated</label>
                     <comment>
                         <![CDATA[<strong style="color:red">Warning!</strong> This option disables the merchant calculated shipping. With this option, Google API ignores any attempt to affect shipping prices.]]>
-</comment>
+                    </comment>
                     <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model>
                 </field>
                 <field id="methods" translate="label" type="multiselect" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0">
diff --git a/app/code/core/Mage/Newsletter/Model/Resource/Grid/Collection.php b/app/code/core/Mage/Newsletter/Model/Resource/Grid/Collection.php
new file mode 100644
index 00000000000..471a420d5a2
--- /dev/null
+++ b/app/code/core/Mage/Newsletter/Model/Resource/Grid/Collection.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_Newsletter
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+
+/**
+ * Newsletter problems collection
+ *
+ * @category    Mage
+ * @package     Mage_Newsletter
+ * @author      Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Newsletter_Model_Resource_Grid_Collection extends Mage_Newsletter_Model_Resource_Problem_Collection
+{
+    /**
+     * Prepare select for load
+     *
+     * @param Varien_Db_Select $select
+     * @return string
+     */
+    protected function _prepareSelect(Varien_Db_Select $select)
+    {
+        $this->addSubscriberInfo()
+            ->addQueueInfo();
+        return parent::_prepareSelect($select);
+    }
+}
diff --git a/app/code/core/Mage/Ogone/etc/adminhtml/system.xml b/app/code/core/Mage/Ogone/etc/adminhtml/system.xml
index e97f9e109ce..d8f7bfeed39 100644
--- a/app/code/core/Mage/Ogone/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Ogone/etc/adminhtml/system.xml
@@ -32,16 +32,16 @@
                 <label>Ogone</label>
                 <comment>
                     <![CDATA[<br />
-<div class="custom-options">
-<div class="box">
-<p class="grand-total"><br /><b>Signing up with Ogone</b></p>
-<p>Please enter the correct post back url and offline processiong url in Ogone configuration</p>
-<p>post back url example: http://myMagentoStore.com/ogone/api/postBack</p>
-<p>offline processing url example: http://myMagentoStore.com/ogone/api/offlineProcess</p>
-</div>
-</div>
-]]>
-</comment>
+                    <div class="custom-options">
+                    <div class="box">
+                    <p class="grand-total"><br /><b>Signing up with Ogone</b></p>
+                    <p>Please enter the correct post back url and offline processiong url in Ogone configuration</p>
+                    <p>post back url example: http://myMagentoStore.com/ogone/api/postBack</p>
+                    <p>offline processing url example: http://myMagentoStore.com/ogone/api/offlineProcess</p>
+                    </div>
+                    </div>
+                    ]]>
+                </comment>
                 <field id="active" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Enabled</label>
                     <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model>
@@ -61,24 +61,24 @@
                     <label>SHA-IN Pass Phrase</label>
                     <comment>
                         <![CDATA[Use in posting data from Magento to Ogone.<br/>Use in data checking by Ogone before the payment.]]>
-</comment>
+                    </comment>
                     <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model>
                 </field>
                 <field id="secret_key_in" translate="label comment" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>SHA-OUT Pass Phrase</label>
                     <comment>
                         <![CDATA[Use in posting data from Ogone to Magento.<br/>Use in feedback data checking by Magento.]]>
-</comment>
+                    </comment>
                     <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model>
                 </field>
                 <field id="shamode" translate="label comment tooltip" type="select" sortOrder="35" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Hash All Parameters</label>
                     <comment>
                         <![CDATA[Enabling this feature needs adjusting "Technical information > Global security parameters" on merchant administration.]]>
-</comment>
+                    </comment>
                     <tooltip>
                         <![CDATA[To hash <strong>all parameters</strong>, select the following options in the "Global security parameters" fieldset: <ul><li>Each parameter followed by the pass phrase.</li><li>"Hash algorithm" same as "Hashing Algorithm" below</li><li>UTF-8</li></ul>]]>
-</tooltip>
+                    </tooltip>
                     <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model>
                 </field>
                 <field id="hashing_algorithm" translate="label" type="select" sortOrder="37" showInDefault="1" showInWebsite="1" showInStore="0">
@@ -109,25 +109,25 @@
                     <label>Background Color of Ogone Template</label>
                     <comment>
                         <![CDATA[E.g: "white".]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="txtcolor" translate="label comment" type="text" sortOrder="65" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Text Color of the Ogone Template</label>
                     <comment>
                         <![CDATA[E.g: "black".]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="tblbgcolor" translate="label comment" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Table Background Color of the Ogone Template</label>
                     <comment>
                         <![CDATA[E.g: "white".]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="tbltxtcolor" translate="label comment" type="text" sortOrder="75" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Table Text Color of the Ogone Template</label>
                     <comment>
                         <![CDATA[E.g: "black".]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="buttonbgcolor" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Button Background Color of the Ogone Template</label>
@@ -136,19 +136,19 @@
                     <label>Button Text Color of the Ogone Template</label>
                     <comment>
                         <![CDATA[E.g: "white".]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="fonttype" translate="label comment" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Font Family of the Ogone Template</label>
                     <comment>
                         <![CDATA[E.g: "Verdana".]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="logo" translate="label comment" type="text" sortOrder="95" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Logo of the Ogone Template</label>
                     <comment>
                         <![CDATA[URL/filename of the logo.<br />The URL must be absolute and stored on a secure server.]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="pmlist" translate="label comment" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Layout of Payment Methods</label>
diff --git a/app/code/core/Mage/Paygate/etc/adminhtml/system.xml b/app/code/core/Mage/Paygate/etc/adminhtml/system.xml
index 2eb7242a65f..60dc3a4267a 100644
--- a/app/code/core/Mage/Paygate/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Paygate/etc/adminhtml/system.xml
@@ -32,7 +32,7 @@
                 <label>Authorize.net</label>
                 <comment>
                     <![CDATA[<a href="http://celinks.magento.com/authorize_netRegistration" target="_blank">Click here to sign up for an Authorize.net account</a>]]>
-</comment>
+                </comment>
                 <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Enabled</label>
                     <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model>
diff --git a/app/code/core/Mage/Payment/view/adminhtml/form/cashondelivery.phtml b/app/code/core/Mage/Payment/view/adminhtml/form/cashondelivery.phtml
index a1af2f4dd68..dc4f2b69d50 100644
--- a/app/code/core/Mage/Payment/view/adminhtml/form/cashondelivery.phtml
+++ b/app/code/core/Mage/Payment/view/adminhtml/form/cashondelivery.phtml
@@ -25,7 +25,7 @@
  */
 
 /**
- * @see Saas_Payment_Block_Form_Cashondelivery
+ * @see Mage_Payment_Block_Form_Cashondelivery
  */
 ?>
 <?php if ($this->getInstructions()): ?>
diff --git a/app/code/core/Mage/Payment/view/frontend/form/cashondelivery.phtml b/app/code/core/Mage/Payment/view/frontend/form/cashondelivery.phtml
index a1af2f4dd68..dc4f2b69d50 100644
--- a/app/code/core/Mage/Payment/view/frontend/form/cashondelivery.phtml
+++ b/app/code/core/Mage/Payment/view/frontend/form/cashondelivery.phtml
@@ -25,7 +25,7 @@
  */
 
 /**
- * @see Saas_Payment_Block_Form_Cashondelivery
+ * @see Mage_Payment_Block_Form_Cashondelivery
  */
 ?>
 <?php if ($this->getInstructions()): ?>
diff --git a/app/code/core/Mage/Paypal/etc/adminhtml/system.xml b/app/code/core/Mage/Paypal/etc/adminhtml/system.xml
index 33fa8c1bde4..4514c9ea9ab 100644
--- a/app/code/core/Mage/Paypal/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Paypal/etc/adminhtml/system.xml
@@ -53,7 +53,7 @@
                     <label>Email Associated with PayPal Merchant Account</label>
                     <comment>
                         <![CDATA[<a href="http://www.magentocommerce.com/paypal">Start accepting payments via PayPal!</a>]]>
-</comment>
+                    </comment>
                     <tooltip>Don't have a PayPal account? Simply enter your email address.</tooltip>
                     <config_path>paypal/general/business_account</config_path>
                     <validate>validate-email</validate>
@@ -63,24 +63,24 @@
                 <label>Select a PayPal Solution</label>
                 <help_url>
                     <![CDATA[https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=merchant/home]]>
-</help_url>
+                </help_url>
                 <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Global</frontend_model>
                 <field id="express" translate="label comment" type="checkbox" sortOrder="10" showInDefault="1" showInWebsite="1">
                     <label>Express Checkout</label>
                     <comment>Add an Express Checkout button to your existing shopping cart for quick and easy credit card payments. PayPal handles all payment processing.</comment>
                     <demo_url>
                         <![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_express_checkout]]>
-</demo_url>
+                    </demo_url>
                     <more_url>
                         <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=ECA]]>
-</more_url>
+                    </more_url>
                     <attribute type="backend_congif">
                         <enable_for_countries>all</enable_for_countries>
                         <urls>
                             <JP translate="switcher fieldset">
                                 <more_url>
                                     <![CDATA[https://cms.paypal.com/jp/cgi-bin/marketingweb?cmd=_render-content&content_ID=marketing_jp/ExpressCheckout&nav=3.1.1]]>
-</more_url>
+                                </more_url>
                             </JP>
                         </urls>
                     </attribute>
@@ -91,17 +91,17 @@
                     <comment>PayPal processes all of your orders, and you get paid.</comment>
                     <demo_url>
                         <![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_WPS]]>
-</demo_url>
+                    </demo_url>
                     <more_url>
                         <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=WPSA]]>
-</more_url>
+                    </more_url>
                     <attribute type="backend_congif">
                         <enable_for_countries>all</enable_for_countries>
                         <urls>
                             <JP translate="switcher fieldset">
                                 <more_url>
                                     <![CDATA[https://cms.paypal.com/jp/cgi-bin/marketingweb?cmd=_render-content&content_ID=marketing_jp/WebsitePaymentsStandard&nav=3.1.2]]>
-</more_url>
+                                </more_url>
                             </JP>
                         </urls>
                     </attribute>
@@ -112,10 +112,10 @@
                     <comment>Process credit cards directly on your website with PayPal&#8217;s all-in-one online payment processing solution.</comment>
                     <demo_url>
                         <![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_wpp]]>
-</demo_url>
+                    </demo_url>
                     <more_url>
                         <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=WPPROA]]>
-</more_url>
+                    </more_url>
                     <attribute type="backend_congif">
                         <enable_for_countries>US, CA, GB</enable_for_countries>
                     </attribute>
@@ -134,7 +134,7 @@
                     <comment>Don&#8217;t have a PayPal merchant account? You can still accept credit card payments through the Payflow Pro Gateway.</comment>
                     <more_url>
                         <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=payflow_pro]]>
-</more_url>
+                    </more_url>
                     <attribute type="backend_congif">
                         <enable_for_countries>US, CA, AU, NZ</enable_for_countries>
                     </attribute>
@@ -147,14 +147,14 @@
                         <enable_for_countries>US, GB</enable_for_countries>
                     </attribute>
                     <config_path>payment/paypaluk_express/active</config_path>
-                    <attribute type="is_simplified" hello='sadfsdf'>1</attribute>
+                    <attribute type="is_simplified">1</attribute>
                 </field>
                 <field id="payflow_link" translate="label comment" type="checkbox" sortOrder="50" showInDefault="1" showInWebsite="1">
                     <label>Payflow Link (for USA and Canada)</label>
                     <comment>Accept payments with a PCI-compliant checkout that keeps customers on your site. For use with your own merchant account.</comment>
                     <more_url>
                         <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-link-overview-outside]]>
-</more_url>
+                    </more_url>
                     <attribute type="backend_congif">
                         <enable_for_countries>US, CA</enable_for_countries>
                     </attribute>
@@ -172,10 +172,10 @@
                     <label>Website Payments Pro Hosted Solution</label>
                     <comment>
                         <![CDATA[Payments by cards + seller protection - <strong style="color:red">Contact PayPal before activating</strong>]]>
-</comment>
+                    </comment>
                     <more_url>
                         <![CDATA[https://cms.paypal.com/cms_content/GB/en_GB/files/developer/HostedSolution.pdf]]>
-</more_url>
+                    </more_url>
                     <attribute type="backend_congif">
                         <enable_for_countries>all</enable_for_countries>
                         <disable_for_countries>US,CA</disable_for_countries>
@@ -201,7 +201,7 @@
                             <JP translate="switcher fieldset">
                                 <more_url>
                                     <![CDATA[https://www.paypal-japan.com/wpp/]]>
-</more_url>
+                                </more_url>
                             </JP>
                         </urls>
                     </attribute>
@@ -250,11 +250,11 @@
                     <button_label>Get Credentials from PayPal</button_label>
                     <button_url>
                         <![CDATA[https://www.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run]]>
-</button_url>
+                    </button_url>
                     <attribute type="sandbox_button_label">Sandbox Credentials</attribute>
                     <attribute type="sandbox_button_url">
                         <![CDATA[https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run]]>
-</attribute>
+                    </attribute>
                     <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_ApiWizard</frontend_model>
                 </field>
                 <field id="sandbox_flag" translate="label" type="select" sortOrder="25" showInDefault="1" showInWebsite="1">
@@ -366,7 +366,7 @@
                     <comment>Whether to create a billing agreement, if there are no active billing agreements available.</comment>
                     <tooltip>
                         <![CDATA[Merchants need to apply to PayPal for enabling billing agreements feature. Do not enable this option until PayPal confirms that billing agreements are enabled for your merchant account.]]>
-</tooltip>
+                    </tooltip>
                     <config_path>payment/paypal_express/allow_ba_signup</config_path>
                     <source_model>Mage_Paypal_Model_Config::getExpressCheckoutBASignupOptions</source_model>
                 </field>
@@ -490,7 +490,7 @@
                     <label>Allowed Credit Card Types</label>
                     <comment>
                         <![CDATA[3D Secure validation is required for Maestro cards. Supporting of American Express cards require additional agreement. Learn more at <a href="http://www.paypal.com/amexupdate">http://www.paypal.com/amexupdate</a>.]]>
-</comment>
+                    </comment>
                     <config_path>payment/paypal_direct/cctypes</config_path>
                     <source_model>Mage_Paypal_Model_Config::getWppCcTypesAsOptionArray</source_model>
                 </field>
@@ -533,7 +533,7 @@
                     <label>Enabled</label>
                     <comment>
                         <![CDATA[Will appear as a payment option only for customers who have at least one active billing agreement.]]>
-</comment>
+                    </comment>
                     <config_path>payment/paypal_billing_agreement/active</config_path>
                     <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model>
                 </field>
@@ -674,7 +674,7 @@
                     <label>Allowed Credit Card Types</label>
                     <comment>
                         <![CDATA[3D Secure validation is required for Maestro cards.]]>
-</comment>
+                    </comment>
                     <config_path>payment/paypaluk_direct/cctypes</config_path>
                     <source_model>Mage_Paypal_Model_Config::getWppPeCcTypesAsOptionArray</source_model>
                 </field>
@@ -800,7 +800,7 @@
                     <label>Allowed Credit Card Types</label>
                     <comment>
                         <![CDATA[Supporting of American Express cards require additional agreement. Learn more at <a href="http://www.paypal.com/amexupdate">http://www.paypal.com/amexupdate</a>.]]>
-</comment>
+                    </comment>
                     <config_path>payment/verisign/cctypes</config_path>
                     <source_model>Mage_Paypal_Model_Config::getPayflowproCcTypesAsOptionArray</source_model>
                 </field>
@@ -963,21 +963,21 @@
                     <config_path>paypal/style/page_style</config_path>
                     <tooltip>
                         <![CDATA[Allowable values: "paypal", "primary" (default), your_custom_value (a custom payment page style from your merchant account profile).]]>
-</tooltip>
+                    </tooltip>
                 </field>
                 <field id="paypal_hdrimg" translate="label tooltip" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Header Image URL</label>
                     <config_path>paypal/style/paypal_hdrimg</config_path>
                     <tooltip>
                         <![CDATA[The image at the top left of the checkout page. Max size is 750x90-pixel. <strong style="color:red">https</strong> is highly encouraged.]]>
-</tooltip>
+                    </tooltip>
                 </field>
                 <field id="paypal_hdrbackcolor" translate="label tooltip" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Header Background Color</label>
                     <config_path>paypal/style/paypal_hdrbackcolor</config_path>
                     <tooltip>
                         <![CDATA[The background color for the header of the checkout page. Case-insensitive six-character HTML hexadecimal color code in ASCII.]]>
-</tooltip>
+                    </tooltip>
                 </field>
                 <field id="paypal_hdrbordercolor" translate="label tooltip" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Header Border Color</label>
@@ -989,7 +989,7 @@
                     <config_path>paypal/style/paypal_payflowcolor</config_path>
                     <tooltip>
                         <![CDATA[The background color for the checkout page around the header and payment form.]]>
-</tooltip>
+                    </tooltip>
                 </field>
             </group>
             <group id="payflow_link" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1">
diff --git a/app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php
index 6434ca82ede..243d19e9d86 100755
--- a/app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php
+++ b/app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php
@@ -34,12 +34,24 @@
  */
 class Mage_Reports_Model_Resource_Review_Customer_Collection extends Mage_Review_Model_Resource_Review_Collection
 {
+    /**
+     * Init Select
+     *
+     * @return Mage_Reports_Model_Resource_Review_Customer_Collection
+     */
+    protected function _initSelect()
+    {
+        parent::_initSelect();
+        $this->_joinCustomers();
+        return $this;
+    }
+
     /**
      * Join customers
      *
      * @return Mage_Reports_Model_Resource_Review_Customer_Collection
      */
-    public function joinCustomers()
+    protected function _joinCustomers()
     {
         /**
          * Allow to use analytic function to result select
diff --git a/app/code/core/Mage/Reports/Model/Resource/Review/Product/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Review/Product/Collection.php
index 4136ec70f2f..ed183c6d58c 100755
--- a/app/code/core/Mage/Reports/Model/Resource/Review/Product/Collection.php
+++ b/app/code/core/Mage/Reports/Model/Resource/Review/Product/Collection.php
@@ -34,6 +34,17 @@
  */
 class Mage_Reports_Model_Resource_Review_Product_Collection extends Mage_Catalog_Model_Resource_Product_Collection
 {
+    /**
+     * Init Select
+     * @return Mage_Catalog_Model_Resource_Product_Collection
+     */
+    protected function _initSelect()
+    {
+        parent::_initSelect();
+        $this->_joinReview();
+        return $this;
+    }
+
     protected function _construct()
     {
         parent::_construct();
@@ -44,7 +55,7 @@ class Mage_Reports_Model_Resource_Review_Product_Collection extends Mage_Catalog
      *
      * @return Mage_Reports_Model_Resource_Review_Product_Collection
      */
-    public function joinReview()
+    protected function _joinReview()
     {
         $helper    = Mage::getResourceHelper('Mage_Core');
 
diff --git a/app/code/core/Mage/Reports/view/adminhtml/layout.xml b/app/code/core/Mage/Reports/view/adminhtml/layout.xml
index e0940cc3e6c..03e9042813b 100644
--- a/app/code/core/Mage/Reports/view/adminhtml/layout.xml
+++ b/app/code/core/Mage/Reports/view/adminhtml/layout.xml
@@ -334,4 +334,210 @@
         <update handle="adminhtml_report_customer_accounts_grid"/>
         <container name="adminhtml.report.grid.container" label="Report Customer Accounts Grid Container"/>
     </adminhtml_report_customer_exportaccountsexcel>
+
+    <adminhtml_report_review_customer>
+        <update handle="adminhtml_report_review_customer_grid" />
+        <reference name="content">
+            <block name='adminhtml.report.grid.container' type="Mage_Adminhtml_Block_Report_Review_Customer"/>
+        </reference>
+    </adminhtml_report_review_customer>
+
+    <adminhtml_report_review_customer_grid>
+        <reference name="adminhtml.report.grid.container">
+            <block type="Mage_Backend_Block_Widget_Grid" name="adminhtml.block.report.review.customer.grid" as='grid'>
+                <arguments>
+                    <id>customers_grid</id>
+                    <default_sort>review_cnt</default_sort>
+                    <default_dir>desc</default_dir>
+                    <dataSource type="object">Mage_Reports_Model_Resource_Review_Customer_Collection</dataSource>
+                </arguments>
+                <block type="Mage_Backend_Block_Widget_Grid_Export" name ="adminhtml.block.report.review.customer.export" as="grid.export">
+                    <arguments>
+                        <exportTypes>
+                            <csv>
+                                <urlPath>*/*/exportCustomerCsv</urlPath>
+                                <label translate="true" module="Mage_Reports">CSV</label>
+                            </csv>
+                            <excel>
+                                <urlPath>*/*/exportCustomerExcel</urlPath>
+                                <label translate="true" module="Mage_Reports">Excel XML</label>
+                            </excel>
+                        </exportTypes>
+                    </arguments>
+                </block>
+                <block type="Mage_Backend_Block_Widget_Grid_ColumnSet" as="grid.columnSet" name="adminhtml.block.report.review.customer.grid.columnSet">
+                    <arguments>
+                        <filter_visibility>0</filter_visibility>
+                        <id>customers_grid</id>
+                        <rowUrl>
+                            <path>*/catalog_product_review</path>
+                            <extraParamsTemplate>
+                                <customerid>getCustomerId</customerid>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="customer_name">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Customer Name</header>
+                            <index>customer_name</index>
+                            <type>text</type>
+                            <id>customer_name</id>
+                            <default translate="true" module="Mage_Reports">Guest</default>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="review_cnt">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Number Of Reviews</header>
+                            <width>40px</width>
+                            <align>right</align>
+                            <type>text</type>
+                            <index>review_cnt</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="action">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Action</header>
+                            <width>100px</width>
+                            <align>center</align>
+                            <filter>0</filter>
+                            <sortable>0</sortable>
+                            <is_system>1</is_system>
+                            <renderer>Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Customer</renderer>
+                            <id>action</id>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_report_review_customer_grid>
+
+    <adminhtml_report_review_exportcustomercsv>
+        <update handle="adminhtml_report_review_customer_grid"/>
+        <container name="adminhtml.report.review.customer.grid.container" label="Export CSV"/>
+    </adminhtml_report_review_exportcustomercsv>
+
+    <adminhtml_report_review_exportcustomerexcel>
+        <update handle="adminhtml_report_review_customer_grid"/>
+        <container name="adminhtml.report.review.customer.grid.container" label="Export Excel"/>
+    </adminhtml_report_review_exportcustomerexcel>
+
+    <adminhtml_report_review_product>
+        <update handle="adminhtml_report_review_product_grid" />
+        <reference name="content">
+            <block name='adminhtml.report.grid.container' type="Mage_Adminhtml_Block_Report_Review_Product"/>
+        </reference>
+    </adminhtml_report_review_product>
+
+    <adminhtml_report_review_product_grid>
+        <reference name="adminhtml.report.grid.container">
+            <block type="Mage_Backend_Block_Widget_Grid" name="adminhtml.block.report.review.product.grid" as='grid'>
+                <arguments>
+                    <id>gridProducts</id>
+                    <default_sort>review_cnt</default_sort>
+                    <default_dir>desc</default_dir>
+                    <dataSource type="object">Mage_Reports_Model_Resource_Review_Product_Collection</dataSource>
+                </arguments>
+                <block type="Mage_Backend_Block_Widget_Grid_Export" name ="adminhtml.block.report.review.product.export" as="grid.export">
+                    <arguments>
+                        <exportTypes>
+                            <csv>
+                                <urlPath>*/*/exportProductCsv</urlPath>
+                                <label translate="true" module="Mage_Reports">CSV</label>
+                            </csv>
+                            <excel>
+                                <urlPath>*/*/exportProductExcel</urlPath>
+                                <label translate="true" module="Mage_Reports">Excel XML</label>
+                            </excel>
+                        </exportTypes>
+                    </arguments>
+                </block>
+                <block type="Mage_Backend_Block_Widget_Grid_ColumnSet" as="grid.columnSet" name="adminhtml.block.report.review.product.grid.columnSet">
+                    <arguments>
+                        <filter_visibility>0</filter_visibility>
+                        <id>gridProducts</id>
+                        <rowUrl>
+                            <path>*/catalog_product_review</path>
+                            <extraParamsTemplate>
+                                <productId>getrId</productId>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="entity_id">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">ID</header>
+                            <width>50px</width>
+                            <index>entity_id</index>
+                            <type>text</type>
+                            <id>entity_id</id>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="name">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Product Name</header>
+                            <type>text</type>
+                            <index>name</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="review_cnt">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Number of Reviews</header>
+                            <width>50px</width>
+                            <align>right</align>
+                            <id>review_cnt</id>
+                            <index>review_cnt</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="avg_rating">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Avg. Rating</header>
+                            <width>50px</width>
+                            <align>right</align>
+                            <id>avg_rating</id>
+                            <index>avg_rating</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="avg_rating_approved">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Avg. Approved Rating</header>
+                            <width>50px</width>
+                            <align>right</align>
+                            <id>avg_rating_approved</id>
+                            <index>avg_rating_approved</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="last_created">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Last Review</header>
+                            <width>150px</width>
+                            <type>datetime</type>
+                            <id>last_created</id>
+                            <index>last_created</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="action">
+                        <arguments>
+                            <header translate="true" module="Mage_Reports">Action</header>
+                            <width>100px</width>
+                            <align>center</align>
+                            <filter>0</filter>
+                            <sortable>0</sortable>
+                            <renderer>Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Product</renderer>
+                            <id>action</id>
+                            <is_system>1</is_system>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_report_review_product_grid>
+
+    <adminhtml_report_review_exportproductcsv>
+        <update handle="adminhtml_report_review_product_grid"/>
+        <container name="adminhtml.report.review.product.grid.container" label="Export CSV"/>
+    </adminhtml_report_review_exportproductcsv>
+
+    <adminhtml_report_review_exportproductexcel>
+        <update handle="adminhtml_report_review_product_grid"/>
+        <container name="adminhtml.report.review.product.grid.container" label="Export Excel"/>
+    </adminhtml_report_review_exportproductexcel>
 </layout>
diff --git a/app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php b/app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php
index 757fd93134b..d40959601e1 100755
--- a/app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php
+++ b/app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php
@@ -168,7 +168,7 @@ class Mage_Sales_Model_Resource_Quote_Item_Collection extends Mage_Core_Model_Re
      */
     protected function _assignProducts()
     {
-        Magento_Profiler::start('QUOTE:'.__METHOD__);
+        Magento_Profiler::start('QUOTE:'.__METHOD__, array('group' => 'QUOTE', 'method' => __METHOD__));
         $productIds = array();
         foreach ($this as $item) {
             $productIds[] = (int)$item->getProductId();
diff --git a/app/code/core/Mage/Sales/etc/adminhtml/system.xml b/app/code/core/Mage/Sales/etc/adminhtml/system.xml
index f79e1f3b746..19fd8e4f9bc 100644
--- a/app/code/core/Mage/Sales/etc/adminhtml/system.xml
+++ b/app/code/core/Mage/Sales/etc/adminhtml/system.xml
@@ -77,7 +77,7 @@
                     <base_url type="media" scope_info="1">sales/store/logo</base_url>
                     <comment>
                         <![CDATA[Default logo, will be used in PDF and HTML documents.<br />(jpeg, tiff, png) If you see image distortion in PDF, try to use larger image]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="logo_html" translate="label comment" type="image" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Logo for HTML Print View</label>
@@ -86,7 +86,7 @@
                     <base_url type="media" scope_info="1">sales/store/logo_html</base_url>
                     <comment>
                         <![CDATA[Logo for HTML documents only. If empty, default will be used.<br />(jpeg, gif, png)]]>
-</comment>
+                    </comment>
                 </field>
                 <field id="address" translate="label" type="textarea" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Address</label>
diff --git a/app/code/core/Mage/Sitemap/etc/config.xml b/app/code/core/Mage/Sitemap/etc/config.xml
index 5b01a4b5567..cfebd36b58b 100644
--- a/app/code/core/Mage/Sitemap/etc/config.xml
+++ b/app/code/core/Mage/Sitemap/etc/config.xml
@@ -64,6 +64,13 @@
                 </Mage_Sitemap>
             </modules>
         </translate>
+        <layout>
+            <updates>
+                <sitemap module="Mage_Sitemap">
+                    <file>layout.xml</file>
+                </sitemap>
+            </updates>
+        </layout>
     </adminhtml>
     <default>
         <sitemap>
diff --git a/app/code/core/Mage/Sitemap/view/adminhtml/layout.xml b/app/code/core/Mage/Sitemap/view/adminhtml/layout.xml
new file mode 100644
index 00000000000..60b13c5ccbb
--- /dev/null
+++ b/app/code/core/Mage/Sitemap/view/adminhtml/layout.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    design
+ * @package     default_default
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+ -->
+<layout>
+    <adminhtml_sitemap_index>
+        <update handle='adminhtml_sitemap_index_grid_block' />
+        <reference name ='content'>
+            <block type='Mage_Adminhtml_Block_Sitemap' name='adminhtml.sitemap.container' />
+        </reference>
+    </adminhtml_sitemap_index>
+
+    <adminhtml_sitemap_index_grid_block>
+        <reference name='adminhtml.sitemap.container'>
+            <block type='Mage_Backend_Block_Widget_Grid' name='adminhtml.sitemap.container.grid' as='grid'>
+                <arguments>
+                    <id>sitemapGrid</id>
+                    <dataSource type='object'>Mage_Sitemap_Model_Resource_Sitemap_Collection</dataSource>
+                    <default_sort>sitemap_id</default_sort>
+                </arguments>
+                <block type='Mage_Backend_Block_Widget_Grid_ColumnSet' name='adminhtml.sitemap.container.grid.columnSet' as='grid.columnSet'>
+                    <arguments>
+                        <id>sitemapGrid</id>
+                        <rowUrl>
+                            <path>*/*/edit</path>
+                            <extraParamsTemplate>
+                                <sitemap_id>getId</sitemap_id>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='sitemap_id'>
+                        <arguments>
+                            <header translate='true' module='Mage_Sitemap'>ID</header>
+                            <width>50px</width>
+                            <index>sitemap_id</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='sitemap_filename'>
+                        <arguments>
+                            <header translate='true' module='Mage_Sitemap'>Filename</header>
+                            <index>sitemap_filename</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='sitemap_path'>
+                        <arguments>
+                            <header translate='true' module='Mage_Sitemap'>Path</header>
+                            <index>sitemap_path</index>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='link'>
+                        <arguments>
+                            <header translate='true' module='Mage_Sitemap'>Link for Google</header>
+                            <renderer>Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Link</renderer>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='sitemap_time'>
+                        <arguments>
+                            <header translate='true' module='Mage_Sitemap'>Last Time Generated</header>
+                            <width>150px</width>
+                            <index>sitemap_time</index>
+                            <type>datetime</type>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column_Multistore" as="store_id">
+                        <arguments>
+                            <header translate="true" module="Mage_Sitemap">Store View</header>
+                            <type>store</type>
+                            <id>store_id</id>
+                            <index>store_id</index>
+                            <store_view>true</store_view>
+                        </arguments>
+                    </block>
+                    <block type='Mage_Backend_Block_Widget_Grid_Column' as='action'>
+                        <arguments>
+                            <header translate='true' module='Mage_Sitemap'>Action</header>
+                            <filter>0</filter>
+                            <sortable>0</sortable>
+                            <width>100px</width>
+                            <renderer>Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Action</renderer>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_sitemap_index_grid_block>
+</layout>
\ No newline at end of file
diff --git a/app/code/core/Mage/Tax/Model/Resource/Calculation/Grid/Collection.php b/app/code/core/Mage/Tax/Model/Resource/Calculation/Grid/Collection.php
new file mode 100644
index 00000000000..e2c75b66773
--- /dev/null
+++ b/app/code/core/Mage/Tax/Model/Resource/Calculation/Grid/Collection.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_Tax
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+
+/**
+ * Tax Calculation Collection
+ *
+ * @category    Mage
+ * @package     Mage_Tax
+ * @author      Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Tax_Model_Resource_Calculation_Grid_Collection extends Mage_Tax_Model_Resource_Calculation_Rate_Collection
+{
+    /**
+     * Join Region Table
+     *
+     * @return string
+     */
+    protected function _initSelect()
+    {
+        parent::_initSelect();
+        $this->joinRegionTable();
+        return $this;
+    }
+}
diff --git a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php
index 431ecab5e94..97e2bb512b8 100644
--- a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php
+++ b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php
@@ -58,7 +58,7 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Grid extends Mage_Adminhtml
     /**
      * Define grid columns
      *
-     * @return Mage_Adminhtml_Block_System_Design_Grid|Mage_Backend_Block_Widget_Grid
+     * @return Mage_Backend_Block_Widget_Grid
      */
     protected function _prepareColumns()
     {
diff --git a/app/code/core/Mage/User/Block/Role/Grid.php b/app/code/core/Mage/User/Block/Role/Grid.php
deleted file mode 100644
index 8ede751544d..00000000000
--- a/app/code/core/Mage/User/Block/Role/Grid.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_User
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * roles grid
- *
- * @category   Mage
- * @package    Mage_User
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Mage_User_Block_Role_Grid extends Mage_Backend_Block_Widget_Grid_Extended
-{
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('roleGrid');
-        $this->setSaveParametersInSession(true);
-        $this->setDefaultSort('role_id');
-        $this->setDefaultDir('asc');
-        $this->setUseAjax(true);
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection =  Mage::getModel('Mage_User_Model_Role')->getCollection()
-            ->setRolesFilter();
-        $this->setCollection($collection);
-
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-
-        $this->addColumn('role_id', array(
-            'header'    =>Mage::helper('Mage_User_Helper_Data')->__('ID'),
-            'index'     =>'role_id',
-            'align'     => 'right',
-            'width'    => '50px'
-        ));
-
-        $this->addColumn('role_name', array(
-            'header'    =>Mage::helper('Mage_User_Helper_Data')->__('Role Name'),
-            'index'     =>'role_name'
-        ));
-
-        return parent::_prepareColumns();
-    }
-
-    public function getGridUrl()
-    {
-        return $this->getUrl('*/*/roleGrid', array('_current'=>true));
-    }
-
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/editrole', array('rid' => $row->getRoleId()));
-    }
-}
diff --git a/app/code/core/Mage/User/Block/User/Grid.php b/app/code/core/Mage/User/Block/User/Grid.php
deleted file mode 100644
index 1e3299af509..00000000000
--- a/app/code/core/Mage/User/Block/User/Grid.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Mage
- * @package     Mage_User
- * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * User permissions user grid
- *
- * @category   Mage
- * @package    Mage_User
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-class Mage_User_Block_User_Grid extends Mage_Backend_Block_Widget_Grid_Extended
-{
-
-    protected function _construct()
-    {
-        parent::_construct();
-        $this->setId('permissionsUserGrid');
-        $this->setDefaultSort('username');
-        $this->setDefaultDir('asc');
-        $this->setUseAjax(true);
-    }
-
-    protected function _prepareCollection()
-    {
-        $collection = Mage::getResourceModel('Mage_User_Model_Resource_User_Collection');
-        $this->setCollection($collection);
-        return parent::_prepareCollection();
-    }
-
-    protected function _prepareColumns()
-    {
-        $this->addColumn('user_id', array(
-            'header'    => Mage::helper('Mage_User_Helper_Data')->__('ID'),
-            'width'     => 5,
-            'align'     => 'right',
-            'sortable'  => true,
-            'index'     => 'user_id'
-        ));
-
-        $this->addColumn('username', array(
-            'header'    => Mage::helper('Mage_User_Helper_Data')->__('User Name'),
-            'index'     => 'username'
-        ));
-
-        $this->addColumn('firstname', array(
-            'header'    => Mage::helper('Mage_User_Helper_Data')->__('First Name'),
-            'index'     => 'firstname'
-        ));
-
-        $this->addColumn('lastname', array(
-            'header'    => Mage::helper('Mage_User_Helper_Data')->__('Last Name'),
-            'index'     => 'lastname'
-        ));
-
-        $this->addColumn('email', array(
-            'header'    => Mage::helper('Mage_User_Helper_Data')->__('Email'),
-            'width'     => 40,
-            'align'     => 'left',
-            'index'     => 'email'
-        ));
-
-        $this->addColumn('is_active', array(
-            'header'    => Mage::helper('Mage_User_Helper_Data')->__('Status'),
-            'index'     => 'is_active',
-            'type'      => 'options',
-            'options'   => array(
-                '1' => Mage::helper('Mage_User_Helper_Data')->__('Active'),
-                '0' => Mage::helper('Mage_User_Helper_Data')->__('Inactive')
-            ),
-        ));
-
-        return parent::_prepareColumns();
-    }
-
-    public function getRowUrl($row)
-    {
-        return $this->getUrl('*/*/edit', array('user_id' => $row->getId()));
-    }
-
-    public function getGridUrl()
-    {
-        return $this->getUrl('*/*/roleGrid', array());
-    }
-}
diff --git a/app/code/core/Mage/User/Model/Resource/Role/Grid/Collection.php b/app/code/core/Mage/User/Model/Resource/Role/Grid/Collection.php
new file mode 100644
index 00000000000..5ed6af83547
--- /dev/null
+++ b/app/code/core/Mage/User/Model/Resource/Role/Grid/Collection.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_User
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+
+/**
+ * Admin role data grid collection
+ *
+ * @category    Mage
+ * @package     Mage_User
+ * @author      Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_User_Model_Resource_Role_Grid_Collection extends Mage_User_Model_Resource_Role_Collection
+{
+    /**
+     * Prepare select for load
+     *
+     * @param Varien_Db_Select $select
+     * @return string
+     */
+    protected function _prepareSelect(Varien_Db_Select $select)
+    {
+        $this->addFieldToFilter('role_type', 'G');
+        return parent::_prepareSelect($select);
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/integration/testsuite/Mage/User/Block/Role/GridTest.php b/app/code/core/Mage/User/Model/Resource/User/Locked/Collection.php
similarity index 59%
rename from dev/tests/integration/testsuite/Mage/User/Block/Role/GridTest.php
rename to app/code/core/Mage/User/Model/Resource/User/Locked/Collection.php
index 791b4c1709f..3649f016d47 100644
--- a/dev/tests/integration/testsuite/Mage/User/Block/Role/GridTest.php
+++ b/app/code/core/Mage/User/Model/Resource/User/Locked/Collection.php
@@ -18,37 +18,30 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
+ * @category    Mage
  * @package     Mage_User
- * @subpackage  integration_tests
  * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+
 /**
- * @group module:Mage_User
+ * Admin user collection
+ *
+ * @category    Mage
+ * @package     Mage_User
+ * @author      Magento Core Team <core@magentocommerce.com>
  */
-class Mage_User_Block_Role_GridTest extends PHPUnit_Framework_TestCase
+class Mage_User_Model_Resource_User_Locked_Collection extends Mage_User_Model_Resource_User_Collection
 {
     /**
-     * @var Mage_User_Block_Role_Grid
+     * Collection Init Select
+     *
+     * @param Mage_Core_Model_Resource_Db_Abstract $resource
      */
-    protected $_block;
-
-    public function setUp()
-    {
-        $layout = Mage::getModel('Mage_Core_Model_Layout');
-        $this->_block = $layout->createBlock('Mage_User_Block_Role_Grid');
-    }
-
-    protected function tearDown()
-    {
-        $this->_block = null;
-    }
-
-    public function testPreparedCollection()
+    protected function _initSelect()
     {
-        $this->_block->toHtml();
-        $this->assertInstanceOf('Mage_User_Model_Resource_Role_Collection', $this->_block->getCollection());
+        parent::_initSelect();
+        $this->addFieldToFilter('lock_expires', array('notnull' => true));
     }
 }
diff --git a/app/code/core/Mage/User/Model/Statuses.php b/app/code/core/Mage/User/Model/Statuses.php
new file mode 100644
index 00000000000..7915c6006bd
--- /dev/null
+++ b/app/code/core/Mage/User/Model/Statuses.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Mage
+ * @package     Mage_User
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * User statuses option array
+ *
+ * @category   Mage
+ * @package    Mage_User
+ * @author     Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_User_Model_Statuses implements Mage_Core_Model_Option_ArrayInterface
+{
+    /**
+     * User Helper
+     *
+     * @var Mage_User_Helper_Data
+     */
+    protected $_helper;
+
+    /**
+     * @param Mage_User_Helper_Data $userHelper
+     */
+    public function __construct(Mage_User_Helper_Data $userHelper)
+    {
+        $this->_helper = $userHelper;
+    }
+
+    /**
+     * Return statuses array
+     * @return array
+     */
+    public function toOptionArray()
+    {
+        return array(
+            '1' => $this->_helper->__('Active'),
+            '0' => $this->_helper->__('Inactive'),
+        );
+    }
+}
diff --git a/app/code/core/Mage/User/controllers/Adminhtml/User/RoleController.php b/app/code/core/Mage/User/controllers/Adminhtml/User/RoleController.php
index a5ca4c95607..d2300390962 100644
--- a/app/code/core/Mage/User/controllers/Adminhtml/User/RoleController.php
+++ b/app/code/core/Mage/User/controllers/Adminhtml/User/RoleController.php
@@ -91,7 +91,7 @@ class Mage_User_Adminhtml_User_RoleController extends Mage_Backend_Controller_Ac
      */
     public function roleGridAction()
     {
-        $this->loadLayout();
+        $this->loadLayout(false);
         $this->renderLayout();
     }
 
diff --git a/app/code/core/Mage/User/controllers/Adminhtml/UserController.php b/app/code/core/Mage/User/controllers/Adminhtml/UserController.php
index d46dcd740ff..aacbff3b4fe 100644
--- a/app/code/core/Mage/User/controllers/Adminhtml/UserController.php
+++ b/app/code/core/Mage/User/controllers/Adminhtml/UserController.php
@@ -208,7 +208,7 @@ class Mage_User_Adminhtml_UserController extends Mage_Backend_Controller_ActionA
 
     public function roleGridAction()
     {
-        $this->loadLayout();
+        $this->loadLayout(false);
         $this->renderLayout();
     }
 
diff --git a/app/code/core/Mage/User/view/adminhtml/layout.xml b/app/code/core/Mage/User/view/adminhtml/layout.xml
index 6754d7f2365..45d50381898 100644
--- a/app/code/core/Mage/User/view/adminhtml/layout.xml
+++ b/app/code/core/Mage/User/view/adminhtml/layout.xml
@@ -48,16 +48,65 @@
     </adminhtml_auth_resetpassword>
 
     <!-- admin acl roles grid page -->
+    <adminhtml_user_role_grid_block>
+        <reference name="adminhtml.user.role.container">
+            <block type="Mage_Backend_Block_Widget_Grid" name="adminhtml.role.grid" as="grid">
+                <arguments>
+                    <id>roleGrid</id>
+                    <dataSource type="object">Mage_User_Model_Resource_Role_Grid_Collection</dataSource>
+                    <save_parameters_in_session>1</save_parameters_in_session>
+                    <default_sort>role_id</default_sort>
+                    <default_dir>asc</default_dir>
+                    <use_ajax>1</use_ajax>
+                    <grid_url type="url">
+                        <path>*/*/roleGrid</path>
+                        <params>
+                            <_current>1</_current>
+                        </params>
+                    </grid_url>
+                </arguments>
+                <block type="Mage_Backend_Block_Widget_Grid_ColumnSet" as="grid.columnSet" name="permission.role.grid.columnSet">
+                    <arguments>
+                        <id>roleGrid</id>
+                        <rowUrl>
+                            <path>*/*/editrole</path>
+                            <extraParamsTemplate>
+                                <rid>getId</rid>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="role_id">
+                        <arguments>
+                            <header translate="true" module="Mage_User">ID</header>
+                            <width>50px</width>
+                            <align>right</align>
+                            <index>role_id</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="role_name">
+                        <arguments>
+                            <header translate="true" module="Mage_User">Role Name</header>
+                            <type>text</type>
+                            <index>role_name</index>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_user_role_grid_block>
+
     <adminhtml_user_role_index>
+        <update handle="formkey"/>
+        <update handle="adminhtml_user_role_grid_block"/>
         <reference name="content">
-            <block type="Mage_User_Block_Role" name="adminhtml.user.role.index" />
+            <block type="Mage_User_Block_Role" name="adminhtml.user.role.container" />
         </reference>
     </adminhtml_user_role_index>
 
     <adminhtml_user_role_rolegrid>
-        <container name="root" label="Root" output="1">
-            <block type="Mage_User_Block_Role_Grid" name="adminhtml.user.role.grid"/>
-        </container>
+        <update handle="formkey"/>
+        <update handle="adminhtml_user_role_grid_block" />
+        <container label="User Role Grid Container"  name="adminhtml.user.role.container" output="1" />
     </adminhtml_user_role_rolegrid>
 
     <!-- admin acl roles edit page -->
@@ -82,8 +131,9 @@
     </adminhtml_user_role_editrolegrid>
 
     <adminhtml_user_index>
+        <update handle="adminhtml_user_grid_block"/>
         <reference name="content">
-            <block type="Mage_User_Block_User" name="adminhtml.user.index"/>
+            <block type="Mage_User_Block_User" name="adminhtml.user.grid.container"/>
         </reference>
     </adminhtml_user_index>
 
@@ -100,9 +150,9 @@
     </adminhtml_user_edit>
 
     <adminhtml_user_rolegrid>
-        <container name="root" label="Root" output="1">
-            <block type="Mage_User_Block_User_Grid" name="adminhtml.user.rolegrid"/>
-        </container>
+        <update handle="formkey"/>
+        <update handle="adminhtml_user_grid_block"/>
+        <container label='Admin User Container' name="adminhtml.user.grid.container" output="1"/>
     </adminhtml_user_rolegrid>
 
     <adminhtml_user_rolesgrid>
@@ -110,4 +160,80 @@
             <block type="Mage_User_Block_User_Edit_Tab_Roles" name="adminhtml.user.rolesgrid"/>
         </container>
     </adminhtml_user_rolesgrid>
+
+    <adminhtml_user_grid_block>
+        <reference name="adminhtml.user.grid.container">
+            <block type="Mage_Backend_Block_Widget_Grid" name="adminhtml.user.grid" as="grid">
+                <arguments>
+                    <id>permissionsUserGrid</id>
+                    <dataSource type="object">Mage_User_Model_Resource_User_Collection</dataSource>
+                    <use_ajax>1</use_ajax>
+                    <default_sort>username</default_sort>
+                    <default_dir>asc</default_dir>
+                    <grid_url type="url">
+                        <path>*/*/roleGrid</path>
+                    </grid_url>
+                </arguments>
+                <block type="Mage_Backend_Block_Widget_Grid_ColumnSet" as="grid.columnSet" name="permission.user.grid.columnSet">
+                    <arguments>
+                        <id>permissionsUserGrid</id>
+                        <rowUrl>
+                            <generatorClass>Mage_Backend_Model_Widget_Grid_Row_UrlGenerator</generatorClass>
+                            <path>*/*/edit</path>
+                            <extraParamsTemplate>
+                                <user_id>getId</user_id>
+                            </extraParamsTemplate>
+                        </rowUrl>
+                    </arguments>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="user_id">
+                        <arguments>
+                            <header translate="true" module="Mage_User">ID</header>
+                            <width>5px</width>
+                            <align>right</align>
+                            <sortable>true</sortable>
+                            <index>user_id</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="username">
+                        <arguments>
+                            <header translate="true" module="Mage_User">User Name</header>
+                            <type>text</type>
+                            <index>username</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="firstname">
+                        <arguments>
+                            <header translate="true" module="Mage_User">First Name</header>
+                            <type>text</type>
+                            <index>firstname</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="lastname">
+                        <arguments>
+                            <header translate="true" module="Mage_User">Last Name</header>
+                            <type>text</type>
+                            <index>lastname</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="email">
+                        <arguments>
+                            <header translate="true" module="Mage_User">Email</header>
+                            <type>text</type>
+                            <width>40px</width>
+                            <align>left</align>
+                            <index>email</index>
+                        </arguments>
+                    </block>
+                    <block type="Mage_Backend_Block_Widget_Grid_Column" as="is_active">
+                        <arguments>
+                            <header translate="true" module="Mage_User">Status</header>
+                            <type>options</type>
+                            <options type="options">Mage_User_Model_Statuses</options>
+                            <index>is_active</index>
+                        </arguments>
+                    </block>
+                </block>
+            </block>
+        </reference>
+    </adminhtml_user_grid_block>
  </layout>
diff --git a/app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php b/app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php
index 492c06a6caa..eb0e6333b95 100755
--- a/app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php
+++ b/app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php
@@ -151,7 +151,7 @@ class Mage_Wishlist_Model_Resource_Item_Collection extends Mage_Core_Model_Resou
      */
     protected function _assignProducts()
     {
-        Magento_Profiler::start('WISHLIST:'.__METHOD__);
+        Magento_Profiler::start('WISHLIST:'.__METHOD__, array('group' => 'WISHLIST', 'method' => __METHOD__));
         $productIds = array();
 
         $isStoreAdmin = Mage::app()->getStore()->isAdmin();
diff --git a/dev/build/build.properties b/dev/build/build.properties
index eb36838fab8..5038c27af66 100644
--- a/dev/build/build.properties
+++ b/dev/build/build.properties
@@ -1,3 +1,4 @@
 file.phpunit_xdebug = dev/build/bin/phpunit-with-xdebug.sh
 extruder.dir = dev/build
 enterprise-enabler.file = app/etc/modules/XEnterprise_Enabler.xml
+saas-enabler.file = app/etc/modules/XSaas_Enabler.xml
\ No newline at end of file
diff --git a/dev/build/build.xml b/dev/build/build.xml
index 8a84f61efb7..584cfa97979 100644
--- a/dev/build/build.xml
+++ b/dev/build/build.xml
@@ -86,6 +86,7 @@
 
     <target name="prepare-ee" depends="prepare-build-properties">
         <copy file="${dir.build_directory}/${enterprise-enabler.file}.dist" tofile="${dir.build_directory}/${enterprise-enabler.file}"/>
+        <copy file="${dir.build_directory}/${saas-enabler.file}.dist" tofile="${dir.build_directory}/${saas-enabler.file}"/>
 
         <replace file="${dir.build_directory}/downloader/config.ini" token="community" value="enterprise"/>
         <replace file="${dir.build_directory}/app/Mage.php" token="self::EDITION_COMMUNITY" value="self::EDITION_ENTERPRISE"/>
diff --git a/dev/build/publication/extruder/common.txt b/dev/build/publication/extruder/common.txt
index 999e5dca7f9..20ffb7c254b 100644
--- a/dev/build/publication/extruder/common.txt
+++ b/dev/build/publication/extruder/common.txt
@@ -25,3 +25,6 @@ lib/Varien/Db/Adapter/Pdo/Mssql.php
 lib/Varien/Db/Statement/Oracle.php
 lib/Varien/Db/Statement/Pdo/Mssql.php
 lib/Varien/Db/Statement/Sqlsrv.php
+app/code/core/Saas
+dev/tests/unit/testsuite/Saas
+dev/tests/js/testsuite/saas
diff --git a/dev/build/publication/sanity/ce.xml b/dev/build/publication/sanity/ce.xml
index 9860ab3a100..ca22eae07d0 100644
--- a/dev/build/publication/sanity/ce.xml
+++ b/dev/build/publication/sanity/ce.xml
@@ -38,6 +38,7 @@
         <word>sqlsrv</word>
         <word>ukpromerchant</word>
         <word>pinba</word>
+        <word>saas</word>
     </words>
     <whitelist>
         <item>
diff --git a/dev/build/publication/sanity/ee.xml b/dev/build/publication/sanity/ee.xml
index d67846802d0..174ccdc7dfd 100644
--- a/dev/build/publication/sanity/ee.xml
+++ b/dev/build/publication/sanity/ee.xml
@@ -33,6 +33,7 @@
         <word>biz@magento.com</word>
         <word>petervarien</word>
         <word>ukpromerchant</word>
+        <word>saas</word>
     </words>
     <whitelist>
         <item>
diff --git a/dev/tests/integration/framework/Magento/Test/Profiler/OutputBamboo.php b/dev/tests/integration/framework/Magento/Test/Profiler/OutputBamboo.php
index ac966a9781a..05fa0c2a12e 100644
--- a/dev/tests/integration/framework/Magento/Test/Profiler/OutputBamboo.php
+++ b/dev/tests/integration/framework/Magento/Test/Profiler/OutputBamboo.php
@@ -38,20 +38,12 @@ class Magento_Test_Profiler_OutputBamboo extends Magento_Profiler_Driver_Standar
     /**
      * Constructor
      *
-     * @param string $filename  Filename of the target file to write results to
-     * @param array  $metrics   Metrics to be included into result.
-     *                          Supported format: array(
-     *                              'metric name 1' => array(
-     *                                  'profiler key 1', ...
-     *                              ), ...
-     *                          );
-     * @param string $delimiter
-     * @param string $enclosure
+     * @param array|null $config
      */
-    public function __construct($filename, array $metrics, $delimiter = ',', $enclosure = '"')
+    public function __construct(array $config = null)
     {
-        parent::__construct($filename, $delimiter, $enclosure);
-        $this->_metrics = $metrics;
+        parent::__construct($config);
+        $this->_metrics = isset($config['metrics']) ? (array)$config['metrics'] : array();
     }
 
     /**
diff --git a/dev/tests/integration/framework/bootstrap.php b/dev/tests/integration/framework/bootstrap.php
index f4f8f1399fb..9f20f5bf23c 100644
--- a/dev/tests/integration/framework/bootstrap.php
+++ b/dev/tests/integration/framework/bootstrap.php
@@ -73,19 +73,21 @@ $isDeveloperMode = (defined('TESTS_MAGENTO_DEVELOPER_MODE') && TESTS_MAGENTO_DEV
 /* Enable profiler if necessary */
 if (defined('TESTS_PROFILER_FILE') && TESTS_PROFILER_FILE) {
     $driver = new Magento_Profiler_Driver_Standard();
-    $driver->registerOutput(new Magento_Profiler_Driver_Standard_Output_Csvfile(
-        $testsBaseDir . DIRECTORY_SEPARATOR . TESTS_PROFILER_FILE
-    ));
+    $driver->registerOutput(new Magento_Profiler_Driver_Standard_Output_Csvfile(array(
+        'baseDir' => $testsBaseDir,
+        'filePath' => TESTS_PROFILER_FILE
+    )));
     Magento_Profiler::add($driver);
 }
 
 /* Enable profiler with bamboo friendly output format */
 if (defined('TESTS_BAMBOO_PROFILER_FILE') && defined('TESTS_BAMBOO_PROFILER_METRICS_FILE')) {
     $driver = new Magento_Profiler_Driver_Standard();
-    $driver->registerOutput(new Magento_Test_Profiler_OutputBamboo(
-        $testsBaseDir . DIRECTORY_SEPARATOR . TESTS_BAMBOO_PROFILER_FILE,
-        require($testsBaseDir . DIRECTORY_SEPARATOR . TESTS_BAMBOO_PROFILER_METRICS_FILE)
-    ));
+    $driver->registerOutput(new Magento_Test_Profiler_OutputBamboo(array(
+        'baseDir' => $testsBaseDir,
+        'filePath' => TESTS_BAMBOO_PROFILER_FILE,
+        'metrics' => require($testsBaseDir . DIRECTORY_SEPARATOR . TESTS_BAMBOO_PROFILER_METRICS_FILE)
+    )));
     Magento_Profiler::add($driver);
 }
 
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Profiler/OutputBambooTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Profiler/OutputBambooTest.php
index 16d9239adf2..9fd232dbec4 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Profiler/OutputBambooTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Profiler/OutputBambooTest.php
@@ -101,10 +101,10 @@ class Magento_Test_Profiler_OutputBambooTest extends PHPUnit_Framework_TestCase
         /**
          * @link http://php.net/manual/en/wrappers.php.php
          */
-        $this->_output = new Magento_Test_Profiler_OutputBamboo(
-            'php://filter/write=dataCollectorFilter/resource=php://memory',
-            array('sample metric (ms)' => array('profiler_key_for_sample_metric'))
-        );
+        $this->_output = new Magento_Test_Profiler_OutputBamboo(array(
+            'filePath' => 'php://filter/write=dataCollectorFilter/resource=php://memory',
+            'metrics' => array('sample metric (ms)' => array('profiler_key_for_sample_metric'))
+        ));
     }
 
     public function testDisplay()
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/DashboardControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/DashboardControllerTest.php
index 764f665d38a..a731067321c 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/DashboardControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/DashboardControllerTest.php
@@ -21,7 +21,7 @@
  * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
-class Mage_Adminhtml_DashboardControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_DashboardControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testTunnelAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php
index 290a6544207..54b72bab586 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Catalog_CategoryControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Catalog_CategoryControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @magentoDataFixture Mage/Core/_files/store.php
@@ -281,4 +281,25 @@ class Mage_Adminhtml_Catalog_CategoryControllerTest extends Mage_Adminhtml_Utili
             ),
         );
     }
+
+    public function testSaveActionCategoryWithDangerRequest()
+    {
+        $this->getRequest()->setPost(array(
+            'general' => array(
+                'path' => '1',
+                'name' => 'test',
+                'is_active' => '1',
+                'entity_id' => 1500,
+                'include_in_menu' => '1',
+                'available_sort_by' => 'name',
+                'default_sort_by' => 'name',
+            ),
+        ));
+        $this->dispatch('backend/admin/catalog_category/save');
+        /** @var Mage_Backend_Model_Session $session */
+        $session = Mage::getSingleton('Mage_Backend_Model_Session');
+        $errorMessages = $session->getMessages()->getErrors();
+        $this->assertCount(1, $errorMessages);
+        $this->assertEquals('Unable to save the category', $errorMessages[0]->getCode());
+    }
 }
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeControllerTest.php
index f5d512eaf18..54aad594f45 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Catalog_Product_Action_AttributeControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Catalog_Product_Action_AttributeControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @covers Mage_Adminhtml_Catalog_Product_Action_AttributeController::saveAction
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/AttributeControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/AttributeControllerTest.php
index eec96c1210f..1dd1cf29dcd 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/AttributeControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/AttributeControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Catalog_Product_AttributeControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Catalog_Product_AttributeControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @magentoDataFixture Mage/Catalog/controllers/_files/attribute_system.php
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/ReviewControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/ReviewControllerTest.php
index 9ee37cff34b..a7305fc5cb7 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/ReviewControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/ReviewControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Catalog_Product_ReviewControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Catalog_Product_ReviewControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @magentoDataFixture Mage/Review/_files/review_xss.php
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php
index c65a9c1fc04..e8940331717 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Catalog_ProductControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Catalog_ProductControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @magentoDataFixture Mage/Catalog/_files/product_configurable.php
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Customer/GroupControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Customer/GroupControllerTest.php
index 95292ae41c4..31faf724336 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Customer/GroupControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Customer/GroupControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Customer_GroupControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Customer_GroupControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testNewAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/CustomerControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/CustomerControllerTest.php
index f97f3d67986..9425413c809 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/CustomerControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/CustomerControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_CustomerControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_CustomerControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * Base controller URL
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/IndexControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/IndexControllerTest.php
index ee79f34ec2a..b63c77099c4 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/IndexControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/IndexControllerTest.php
@@ -28,7 +28,7 @@
 /**
  * @group module:Mage_Adminhtml
  */
-class Mage_Adminhtml_IndexControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_IndexControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @covers Mage_Adminhtml_IndexController::changeLocaleAction
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterQueueControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterQueueControllerTest.php
index df4569147c9..8f556935f3b 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterQueueControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterQueueControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Newsletter_QueueControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Newsletter_QueueControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @var Mage_Newsletter_Model_Template
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterTemplateControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterTemplateControllerTest.php
index a2e27e2723d..528b6d9b669 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterTemplateControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterTemplateControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Newsletter_TemplateControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Newsletter_TemplateControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @var Mage_Newsletter_Model_Template
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreateControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreateControllerTest.php
index ea207955642..6555ed9c073 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreateControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreateControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Sales_Order_CreateControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Sales_Order_CreateControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testLoadBlockAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreditmemoControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreditmemoControllerTest.php
index 03fe35167b5..0e718be9af5 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreditmemoControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreditmemoControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Sales_Order_CreditmemoControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Sales_Order_CreditmemoControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @magentoConfigFixture current_store cataloginventory/item_options/auto_return 1
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/OrderControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/OrderControllerTest.php
index 533563771b0..0411d9b902a 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/OrderControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/OrderControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_Sales_OrderControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_Sales_OrderControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testIndexAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/DesignControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/DesignControllerTest.php
index df2761b1437..8ad83ee21b3 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/DesignControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/DesignControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_System_DesignControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_System_DesignControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @covers Mage_Adminhtml_Controller_Action::_addLeft
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/VariableControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/VariableControllerTest.php
index a6c327402df..67b045e0fcb 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/VariableControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/VariableControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Adminhtml_System_VariableControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Adminhtml_System_VariableControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @covers Mage_Adminhtml_Controller_Action::_addLeft
diff --git a/dev/tests/integration/testsuite/Mage/Backend/Controller/ActionAbstractTest.php b/dev/tests/integration/testsuite/Mage/Backend/Controller/ActionAbstractTest.php
index 86df3199c4d..f9344a0ea48 100644
--- a/dev/tests/integration/testsuite/Mage/Backend/Controller/ActionAbstractTest.php
+++ b/dev/tests/integration/testsuite/Mage/Backend/Controller/ActionAbstractTest.php
@@ -28,7 +28,7 @@
 /**
  * Test class for Mage_Backend_Controller_ActionAbstract.
  */
-class Mage_Backend_Controller_ActionAbstractTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Backend_Controller_ActionAbstractTest extends Mage_Backend_Utility_Controller
 {
     /**
      * Check redirection to startup page for logged user
diff --git a/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php b/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php
index b9080e05314..9be94154009 100644
--- a/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php
+++ b/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php
@@ -28,7 +28,7 @@
 /**
  * Test Mage_Backend_Model_Config_Source_Admin_Page
  */
-class Mage_Backend_Model_Config_Source_Admin_PageTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Backend_Model_Config_Source_Admin_PageTest extends Mage_Backend_Utility_Controller
 {
     public function testToOptionArray()
     {
diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Utility/Controller.php b/dev/tests/integration/testsuite/Mage/Backend/Utility/Controller.php
similarity index 89%
rename from dev/tests/integration/testsuite/Mage/Adminhtml/Utility/Controller.php
rename to dev/tests/integration/testsuite/Mage/Backend/Utility/Controller.php
index 6170cab2ad0..3c287f896d1 100644
--- a/dev/tests/integration/testsuite/Mage/Adminhtml/Utility/Controller.php
+++ b/dev/tests/integration/testsuite/Mage/Backend/Utility/Controller.php
@@ -19,18 +19,18 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Mage
- * @package     Mage_Adminhtml
+ * @package     Mage_Backend
  * @subpackage  integration_tests
  * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
 /**
- * A parent class for adminhtml controllers - contains directives for admin user creation and logging in
+ * A parent class for backend controllers - contains directives for admin user creation and authentication
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  * @SuppressWarnings(PHPMD.numberOfChildren)
  */
-class Mage_Adminhtml_Utility_Controller extends Magento_Test_TestCase_ControllerAbstract
+class Mage_Backend_Utility_Controller extends Magento_Test_TestCase_ControllerAbstract
 {
     /**
      * @var Mage_Backend_Model_Auth_Session
diff --git a/dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php b/dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php
index 01122e50a0c..494086c2188 100644
--- a/dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Backend_Adminhtml_System_ConfigControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Backend_Adminhtml_System_ConfigControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testEditAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/Centinel/CreateOrderTest.php b/dev/tests/integration/testsuite/Mage/Centinel/CreateOrderTest.php
index 84d4be29dea..57e41a57ed1 100644
--- a/dev/tests/integration/testsuite/Mage/Centinel/CreateOrderTest.php
+++ b/dev/tests/integration/testsuite/Mage/Centinel/CreateOrderTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Centinel_CreateOrderTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Centinel_CreateOrderTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @magentoConfigFixture admin_store payment/ccsave/centinel 1
diff --git a/dev/tests/integration/testsuite/Mage/Connect/controllers/Adminhtml/Extension/LocalControllerTest.php b/dev/tests/integration/testsuite/Mage/Connect/controllers/Adminhtml/Extension/LocalControllerTest.php
index 726bf463360..095876217d5 100644
--- a/dev/tests/integration/testsuite/Mage/Connect/controllers/Adminhtml/Extension/LocalControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Connect/controllers/Adminhtml/Extension/LocalControllerTest.php
@@ -28,7 +28,7 @@
 /**
  * Test Mage_Connect_Adminhtml_Extension_LocalController
  */
-class Mage_Connect_Adminhtml_Extension_LocalControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Connect_Adminhtml_Extension_LocalControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testIndexAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php
index 2ca9788cf21..d846071b821 100644
--- a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_DesignEditor_Adminhtml_System_Design_EditorControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_DesignEditor_Adminhtml_System_Design_EditorControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * Identifier theme
diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php
index fe360e7f66d..74ffd234c0f 100644
--- a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php
@@ -28,7 +28,7 @@
 /**
  * All controller actions must be run with logged in admin user
  */
-class Mage_DesignEditor_PageControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_DesignEditor_PageControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * Default page type url
diff --git a/dev/tests/integration/testsuite/Mage/GoogleShopping/controllers/Adminhtml/GoogleShopping/ItemsControllerTest.php b/dev/tests/integration/testsuite/Mage/GoogleShopping/controllers/Adminhtml/GoogleShopping/ItemsControllerTest.php
index 9c2b16ee419..679add76c75 100644
--- a/dev/tests/integration/testsuite/Mage/GoogleShopping/controllers/Adminhtml/GoogleShopping/ItemsControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/GoogleShopping/controllers/Adminhtml/GoogleShopping/ItemsControllerTest.php
@@ -24,7 +24,7 @@
  * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
-class Mage_GoogleShopping_Adminhtml_GoogleShopping_ItemsControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_GoogleShopping_Adminhtml_GoogleShopping_ItemsControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testIndexAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ExportControllerTest.php b/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ExportControllerTest.php
index aab4e3e0d51..d17b2b617ff 100644
--- a/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ExportControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ExportControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_ImportExport_Adminhtml_ExportControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_ImportExport_Adminhtml_ExportControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * Set value of $_SERVER['HTTP_X_REQUESTED_WITH'] parameter here
diff --git a/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php b/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php
index 78f847960b4..be2fc4cbb75 100644
--- a/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_ImportExport_Adminhtml_ImportControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_ImportExport_Adminhtml_ImportControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testGetFilterAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/User/RoleControllerTest.php b/dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/User/RoleControllerTest.php
index 76c76dcf94b..4407dcca480 100644
--- a/dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/User/RoleControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/User/RoleControllerTest.php
@@ -30,7 +30,7 @@
  *
  * @group module:Mage_User
  */
-class Mage_User_Adminhtml_User_RoleControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_User_Adminhtml_User_RoleControllerTest extends Mage_Backend_Utility_Controller
 {
     public function testEditRoleAction()
     {
diff --git a/dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/UserControllerTest.php b/dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/UserControllerTest.php
index e7f345dea23..8f31a7bcf0e 100644
--- a/dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/UserControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/UserControllerTest.php
@@ -28,7 +28,7 @@
 /**
  * @group module:Mage_User
  */
-class Mage_User_Adminhtml_UserControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_User_Adminhtml_UserControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * @covers Mage_User_Adminhtml_UserController::indexAction
diff --git a/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php b/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php
index 104f47556c2..ec1d82a37b7 100644
--- a/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Widget_Adminhtml_Widget_InstanceControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Widget_Adminhtml_Widget_InstanceControllerTest extends Mage_Backend_Utility_Controller
 {
     protected function setUp()
     {
diff --git a/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/WidgetControllerTest.php b/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/WidgetControllerTest.php
index 085568c2595..a5db6c17fc3 100644
--- a/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/WidgetControllerTest.php
+++ b/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/WidgetControllerTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-class Mage_Widget_Adminhtml_WidgetControllerTest extends Mage_Adminhtml_Utility_Controller
+class Mage_Widget_Adminhtml_WidgetControllerTest extends Mage_Backend_Utility_Controller
 {
     /**
      * Partially covers Mage_Widget_Block_Adminhtml_Widget_Options::_addField()
diff --git a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php b/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
index c8c1a381262..290e59fb182 100644
--- a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
+++ b/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
@@ -51,9 +51,11 @@ class Magento_Profiler_Driver_Standard_Output_CsvfileTest extends PHPUnit_Framew
      */
     public function testDisplay($statFile, $expectedFile, $delimiter = ',', $enclosure = '"')
     {
-        $this->_output = new Magento_Profiler_Driver_Standard_Output_Csvfile(
-            $this->_outputFile, $delimiter, $enclosure
-        );
+        $this->_output = new Magento_Profiler_Driver_Standard_Output_Csvfile(array(
+            'filePath' => $this->_outputFile,
+            'delimiter' => $delimiter,
+            'enclosure' => $enclosure
+        ));
         $stat = include $statFile;
         $this->_output->display($stat);
         $this->assertFileEquals($expectedFile, $this->_outputFile);
diff --git a/dev/tests/integration/testsuite/Magento/ProfilerTest.php b/dev/tests/integration/testsuite/Magento/ProfilerTest.php
new file mode 100644
index 00000000000..45e78b99836
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/ProfilerTest.php
@@ -0,0 +1,141 @@
+<?php
+/**
+ * Test case for Magento_Profiler
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+class Magento_ProfilerTest extends PHPUnit_Framework_TestCase
+{
+    protected function tearDown()
+    {
+        Magento_Profiler::reset();
+    }
+
+    /**
+     * @dataProvider applyConfigDataProvider
+     * @param array $config
+     * @param array $expectedDrivers
+     */
+    public function testApplyConfigWithDrivers(array $config, array $expectedDrivers)
+    {
+        Magento_Profiler::applyConfig($config);
+        $this->assertAttributeEquals($expectedDrivers, '_drivers', 'Magento_Profiler');
+    }
+
+    /**
+     * @return array
+     */
+    public function applyConfigDataProvider()
+    {
+        return array(
+            'Empty config does not create any driver' => array(
+                'config' => array(),
+                'drivers' => array()
+            ),
+            'Integer 0 does not create any driver' => array(
+                'config' => array('drivers' => array(0)),
+                'drivers' => array()
+            ),
+            'Integer 1 does creates standard driver' => array(
+                'config' => array('drivers' => array(1)),
+                'drivers' => array(new Magento_Profiler_Driver_Standard())
+            ),
+            'Config array key sets driver type' => array(
+                'configs' => array('drivers' => array('standard' => 1)),
+                'drivers' => array(new Magento_Profiler_Driver_Standard())
+            ),
+            'Config array key ignored when type set' => array(
+                'config' => array(
+                    'drivers' => array('custom' => array('type' => 'standard'))
+                ),
+                'drivers' => array(new Magento_Profiler_Driver_Standard())
+            ),
+            'Config with outputs element as integer 1 creates output' => array(
+                'config' => array(
+                    'drivers' => array(array('outputs' => array('html' => 1))),
+                    'baseDir' => '/some/base/dir'
+                ),
+                'drivers' => array(
+                    new Magento_Profiler_Driver_Standard(array(
+                        'outputs' => array(array(
+                            'type' => 'html',
+                            'baseDir' => '/some/base/dir'
+                        ))
+                    ))
+                )
+            ),
+            'Config with outputs element as integer 0 does not create output' => array(
+                'config' => array(
+                    'drivers' => array(array('outputs' => array('html' => 0)))
+                ),
+                'drivers' => array(new Magento_Profiler_Driver_Standard())
+            ),
+            'Config with shortly defined outputs element' => array(
+                'config' => array(
+                    'drivers' => array(
+                        array('outputs' => array('foo' => 'html'))
+                    ),
+                ),
+                'drivers' => array(new Magento_Profiler_Driver_Standard(array(
+                        'outputs' => array(array('type' => 'html'))
+                    ))
+                )
+            ),
+            'Config with fully defined outputs element options' => array(
+                'config' => array(
+                    'drivers' => array(
+                        array(
+                            'outputs' => array(
+                                'foo' => array(
+                                    'type' => 'html',
+                                    'filterName' => '/someFilter/',
+                                    'thresholds' => array('someKey' => 123),
+                                    'baseDir' => '/custom/dir'
+                                )
+                            )
+                        )
+                    )
+                ),
+                'drivers' => array(
+                    new Magento_Profiler_Driver_Standard(array(
+                        'outputs' => array(array(
+                            'type' => 'html',
+                            'filterName' => '/someFilter/',
+                            'thresholds' => array('someKey' => 123),
+                            'baseDir' => '/custom/dir'
+                        ))
+                    )
+                ))
+            ),
+            'Config with shortly defined output' => array(
+                'config' => array('driver' => array('output' => 'html'),),
+                'drivers' => array(
+                    new Magento_Profiler_Driver_Standard(array(
+                        'outputs' => array(array(
+                            'type' => 'html'
+                        ))
+                    ))
+                )
+            )
+        );
+    }
+}
diff --git a/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php
index 41c1166c5b2..cb06b62b94d 100644
--- a/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php
+++ b/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php
@@ -57,8 +57,12 @@ return array(
         'Mage_User_Model_Resource_Permissions_Collection'),
     $this->_getClassRule('Mage_Adminhtml_Block_Api_Edituser'),
     $this->_getClassRule('Mage_Adminhtml_Block_Api_Tab_Userroles'),
+    $this->_getClassRule('Mage_Adminhtml_Block_Backup_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Catalog'),
+    $this->_getClassRule('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid'),
+    $this->_getClassRule('Mage_Adminhtml_Block_Catalog_Search_Grid'),
+    $this->_getClassRule('Mage_Adminhtml_Block_Newsletter_Problem_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Page_Menu', 'Mage_Backend_Block_Menu'),
     $this->_getClassRule('Mage_Adminhtml_Block_Permissions_User'),
     $this->_getClassRule('Mage_Adminhtml_Block_Permissions_User_Grid'),
@@ -82,6 +86,7 @@ return array(
     $this->_getClassRule('Mage_Adminhtml_Block_Permissions_Edituser'),
     $this->_getClassRule('Mage_Adminhtml_Block_Permissions_Tab_Userroles'),
     $this->_getClassRule('Mage_Adminhtml_Block_Permissions_Usernroles'),
+    $this->_getClassRule('Mage_Adminhtml_Block_System_Store_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Permissions_UserController'),
     $this->_getClassRule('Mage_Adminhtml_Permissions_RoleController'),
     $this->_getClassRule('Mage_Adminhtml_Block_Report_Grid', 'Mage_Reports_Block_Adminhtml_Grid'),
@@ -92,6 +97,8 @@ return array(
     $this->_getClassRule('Mage_Adminhtml_Block_Report_Customer_Totals_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Report_Product_Sold', 'Mage_Reports_Block_Adminhtml_Product_Sold'),
     $this->_getClassRule('Mage_Adminhtml_Block_Report_Product_Sold_Grid'),
+    $this->_getClassRule('Mage_Adminhtml_Block_Report_Review_Customer_Grid'),
+    $this->_getClassRule('Mage_Adminhtml_Block_Report_Review_Product_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Report_Customer_Orders', 'Mage_Reports_Block_Adminhtml_Customer_Orders'),
     $this->_getClassRule('Mage_Adminhtml_Block_Report_Customer_Orders_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Report_Product_Ordered'),
@@ -154,6 +161,8 @@ return array(
     ),
     $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Dwstree', 'Mage_Backend_Block_System_Config_Dwstree'),
     $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Switcher', 'Mage_Backend_Block_System_Config_Switcher'),
+    $this->_getClassRule('Mage_Adminhtml_Block_System_Design_Grid'),
+    $this->_getClassRule('Mage_Adminhtml_Block_System_Email_Template_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Store_Switcher', 'Mage_Backend_Block_Store_Switcher'),
     $this->_getClassRule('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset',
         'Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset'
@@ -161,9 +170,13 @@ return array(
     $this->_getClassRule('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element',
         'Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'
     ),
+    $this->_getClassRule('Mage_Adminhtml_Block_Sitemap_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Tag_Tag_Edit'),
     $this->_getClassRule('Mage_Adminhtml_Block_Tag_Tag_Edit_Form'),
+    $this->_getClassRule('Mage_Adminhtml_Block_Tax_Rate_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Block_Tree'),
+    $this->_getClassRule('Mage_Adminhtml_Block_Urlrewrite_Grid'),
+    $this->_getClassRule('Mage_Adminhtml_Block_System_Variable_Grid'),
     $this->_getClassRule('Mage_Adminhtml_Helper_Rss'),
     $this->_getClassRule('Mage_Adminhtml_Model_Config', 'Mage_Backend_Model_Config_Structure'),
     $this->_getClassRule('Mage_Adminhtml_Model_Config_Data', 'Mage_Backend_Model_Config'),
@@ -659,6 +672,8 @@ return array(
     $this->_getClassRule('Mage_Sales_Model_Entity_Setup'),
     $this->_getClassRule('Mage_Shipping_ShippingController'),
     $this->_getClassRule('Mage_Tag_Block_Customer_Edit'),
+    $this->_getClassRule('Mage_User_Block_Role_Grid'),
+    $this->_getClassRule('Mage_User_Block_User_Grid'),
     $this->_getClassRule('Mage_User_Model_Roles'),
     $this->_getClassRule('Mage_User_Model_Resource_Roles'),
     $this->_getClassRule('Mage_User_Model_Resource_Roles_Collection'),
diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/UrlTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/UrlTest.php
index 5fd60823071..d16c1708dad 100644
--- a/dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/UrlTest.php
+++ b/dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/UrlTest.php
@@ -76,6 +76,21 @@ class Mage_Core_Model_Layout_Argument_Handler_UrlTest extends PHPUnit_Framework_
         $this->assertEquals($expectedUrl, $this->_model->process(array('path' => $path, 'params' => $params)));
     }
 
+    public function testProcessWithoutUrlParams()
+    {
+        $expectedUrl = "http://generated-url.com";
+
+        $path = 'module/controller/action';
+        $params = null;
+
+        $this->_urlModelMock->expects($this->once())
+            ->method('getUrl')
+            ->with($this->equalTo($path), $this->equalTo($params))
+            ->will($this->returnValue($expectedUrl));
+
+        $this->assertEquals($expectedUrl, $this->_model->process(array('path' => $path)));
+    }
+
     /**
      * @expectedException InvalidArgumentException
      * @expectedExceptionMessage Passed value has incorrect format
diff --git a/dev/tests/unit/testsuite/Magento/Config/DomTest.php b/dev/tests/unit/testsuite/Magento/Config/DomTest.php
index 1b58fce37df..60d6840f462 100644
--- a/dev/tests/unit/testsuite/Magento/Config/DomTest.php
+++ b/dev/tests/unit/testsuite/Magento/Config/DomTest.php
@@ -102,9 +102,6 @@ class Magento_Config_DomTest extends PHPUnit_Framework_TestCase
             $errors = array();
             $this->assertFalse($config->validate($schema, $errors));
             $this->assertNotEmpty($errors);
-            foreach ($errors as $error) {
-                $this->assertInstanceOf('libXMLError', $error);
-            }
         }
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Config/ViewTest.php b/dev/tests/unit/testsuite/Magento/Config/ViewTest.php
index 418a7ded84a..2de55901cc9 100644
--- a/dev/tests/unit/testsuite/Magento/Config/ViewTest.php
+++ b/dev/tests/unit/testsuite/Magento/Config/ViewTest.php
@@ -65,9 +65,11 @@ class Magento_Config_ViewTest extends PHPUnit_Framework_TestCase
         $this->assertEquals('Value Three', $this->_model->getVarValue('Three', 'three'));
     }
 
+    /**
+     * @expectedException Magento_Exception
+     */
     public function testInvalidXml()
     {
-        $this->markTestIncomplete('Bug: invalid XML-document is bypassed in Magento_Config_Dom::_mergeNode()');
         new Magento_Config_View(array(__DIR__ . '/_files/view_invalid.xml'));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Config/XsdTest.php
index d5aa3c2835e..bec0c3f66e9 100644
--- a/dev/tests/unit/testsuite/Magento/Config/XsdTest.php
+++ b/dev/tests/unit/testsuite/Magento/Config/XsdTest.php
@@ -51,7 +51,7 @@ class Magento_Config_XsdTest extends PHPUnit_Framework_TestCase
     public function invalidXmlFileDataProvider()
     {
         return array(
-            array('view.xsd', 'view_invalid.xml', 2),
+            array('view.xsd', 'view_invalid.xml', 1),
             array('theme.xsd', 'theme_invalid.xml', 2),
         );
     }
diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml b/dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml
index 733c4edbd31..f2e62076cc3 100644
--- a/dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml
+++ b/dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml
@@ -27,10 +27,7 @@
  */
 -->
 <view>
-    <vars module="Namespace_Module">
-        <var name="var1">Value1</var>
-    </vars>
-    <vars module="Namespace_Module"><!-- duplicate vars module -->
+   <vars module="Namespace_Module1">
         <var name="var1">Value1</var>
         <var name="var1">Value1</var><!-- duplicate var name -->
     </vars>
diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php
new file mode 100644
index 00000000000..a08455a2ae0
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php
@@ -0,0 +1,128 @@
+<?php
+/**
+ * Test class for Magento_Profiler_Driver_Factory
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+class Magento_Profiler_Driver_FactoryTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Magento_Profiler_Driver_Factory
+     */
+    protected $_factory;
+
+    /**
+     * @var string
+     */
+    protected $_defaultDriverPrefix = 'Magento_Profiler_Driver_Test_';
+
+    /**
+     * @var string
+     */
+    protected $_defaultDriverType = 'default';
+
+    protected function setUp()
+    {
+        $this->_factory = new Magento_Profiler_Driver_Factory(
+            $this->_defaultDriverPrefix,
+            $this->_defaultDriverType
+        );
+    }
+
+    public function testConstructor()
+    {
+        $this->assertAttributeEquals($this->_defaultDriverPrefix, '_defaultDriverPrefix', $this->_factory);
+        $this->assertAttributeEquals($this->_defaultDriverType, '_defaultDriverType', $this->_factory);
+    }
+
+    public function testDefaultConstructor()
+    {
+        $factory = new Magento_Profiler_Driver_Factory();
+        $this->assertAttributeNotEmpty('_defaultDriverPrefix', $factory);
+        $this->assertAttributeNotEmpty('_defaultDriverType', $factory);
+    }
+
+    /**
+     * @dataProvider createDataProvider
+     * @param array $config
+     * @param string $expectedClass
+     */
+    public function testCreate($config, $expectedClass)
+    {
+        $driver = $this->_factory->create($config);
+        $this->assertInstanceOf($expectedClass, $driver);
+        $this->assertInstanceOf('Magento_Profiler_DriverInterface', $driver);
+    }
+
+    /**
+     * @return array
+     */
+    public function createDataProvider()
+    {
+        $defaultDriverClass = $this->getMockClass(
+            'Magento_Profiler_DriverInterface', array(), array(), 'Magento_Profiler_Driver_Test_Default'
+        );
+        $testDriverClass = $this->getMockClass(
+            'Magento_Profiler_DriverInterface', array(), array(), 'Magento_Profiler_Driver_Test_Test'
+        );
+        return array(
+            'Prefix and concrete type' => array(
+                array(
+                    'type' => 'test'
+                ),
+                $testDriverClass
+            ),
+            'Prefix and default type' => array(
+                array(),
+                $defaultDriverClass
+            ),
+            'Concrete class' => array(
+                array(
+                    'type' => $testDriverClass
+                ),
+                $testDriverClass
+            )
+        );
+    }
+
+    /**
+     * @expectedException InvalidArgumentException
+     * @expectedExceptionMessage Cannot create profiler driver, class "Magento_Profiler_Driver_Test_Baz" doesn't exist.
+     */
+    public function testCreateUndefinedClass()
+    {
+        $this->_factory->create(array(
+            'type' => 'baz'
+        ));
+    }
+
+    /**
+     * @expectedException InvalidArgumentException
+     * @expectedExceptionMessage Driver class "stdClass" must implement Magento_Profiler_DriverInterface.
+     */
+    public function testCreateInvalidClass()
+    {
+        $this->_factory->create(array(
+            'type' => 'stdClass'
+        ));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php b/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
new file mode 100644
index 00000000000..bb5c70ff090
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Test class for Magento_Profiler_Driver_Standard_Output_Csvfile
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+class Magento_Profiler_Driver_Standard_Output_CsvfileTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @dataProvider constructorProvider
+     * @param array $config
+     * @param string $expectedFilePath
+     * @param string $expectedDelimiter
+     * @param string $expectedEnclosure
+     */
+    public function testConstructor($config, $expectedFilePath, $expectedDelimiter, $expectedEnclosure)
+    {
+        $output = new Magento_Profiler_Driver_Standard_Output_Csvfile($config);
+        $this->assertAttributeEquals($expectedFilePath, '_filePath', $output);
+        $this->assertAttributeEquals($expectedDelimiter, '_delimiter', $output);
+        $this->assertAttributeEquals($expectedEnclosure, '_enclosure', $output);
+    }
+
+    /**
+     * @return array
+     */
+    public function constructorProvider()
+    {
+        return array(
+            'Default config' => array(
+                'config' => array(),
+                'filePath' => str_replace('/', DIRECTORY_SEPARATOR, '/var/log/profiler.csv'),
+                'delimiter' => ',',
+                'enclosure' => '"'
+            ),
+            'Custom config' => array(
+                'config' => array(
+                    'baseDir' => str_replace('/', DIRECTORY_SEPARATOR, '/var/www/project/'),
+                    'filePath' => str_replace('/', DIRECTORY_SEPARATOR, '/log/example.csv'),
+                    'delimiter' => "\t",
+                    'enclosure' => '"'
+                ),
+                'filePath' => str_replace('/', DIRECTORY_SEPARATOR, '/var/www/project/log/example.csv'),
+                'delimiter' => "\t",
+                'enclosure' => '"'
+            ),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php
new file mode 100644
index 00000000000..44e4373a6e3
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php
@@ -0,0 +1,131 @@
+<?php
+/**
+ * Test class for Magento_Profiler_Driver_Standard_Output_Factory
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+class Magento_Profiler_Driver_Standard_Output_FactoryTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Magento_Profiler_Driver_Standard_Output_Factory
+     */
+    protected $_factory;
+
+    /**
+     * @var string
+     */
+    protected $_defaultOutputPrefix = 'Magento_Profiler_Driver_Standard_Output_Test_';
+
+    /**
+     * @var string
+     */
+    protected $_defaultOutputType = 'default';
+
+    protected function setUp()
+    {
+        $this->_factory = new Magento_Profiler_Driver_Standard_Output_Factory(
+            $this->_defaultOutputPrefix,
+            $this->_defaultOutputType
+        );
+    }
+
+    public function testConstructor()
+    {
+        $this->assertAttributeEquals($this->_defaultOutputPrefix, '_defaultOutputPrefix', $this->_factory);
+        $this->assertAttributeEquals($this->_defaultOutputType, '_defaultOutputType', $this->_factory);
+    }
+
+    public function testDefaultConstructor()
+    {
+        $factory = new Magento_Profiler_Driver_Standard_Output_Factory();
+        $this->assertAttributeNotEmpty('_defaultOutputPrefix', $factory);
+        $this->assertAttributeNotEmpty('_defaultOutputType', $factory);
+    }
+
+    /**
+     * @dataProvider createDataProvider
+     * @param array $configData
+     * @param string $expectedClass
+     */
+    public function testCreate($configData, $expectedClass)
+    {
+        $driver = $this->_factory->create($configData);
+        $this->assertInstanceOf($expectedClass, $driver);
+        $this->assertInstanceOf('Magento_Profiler_Driver_Standard_OutputInterface', $driver);
+    }
+
+    /**
+     * @return array
+     */
+    public function createDataProvider()
+    {
+        $defaultOutputClass = $this->getMockClass('Magento_Profiler_Driver_Standard_OutputInterface',
+            array(), array(), 'Magento_Profiler_Driver_Standard_Output_Test_Default'
+        );
+        $testOutputClass = $this->getMockClass('Magento_Profiler_Driver_Standard_OutputInterface',
+            array(), array(), 'Magento_Profiler_Driver_Standard_Output_Test_Test'
+        );
+        return array(
+            'Prefix and concrete type' => array(
+                array(
+                    'type' => 'test'
+                ),
+                $testOutputClass
+            ),
+            'Prefix and default type' => array(
+                array(),
+                $defaultOutputClass
+            ),
+            'Concrete class' => array(
+                array(
+                    'type' => $testOutputClass
+                ),
+                $testOutputClass
+            )
+        );
+    }
+
+    public function testCreateUndefinedClass()
+    {
+        $this->setExpectedException(
+            'InvalidArgumentException',
+            sprintf(
+                'Cannot create standard driver output, class "%s" doesn\'t exist.',
+                'Magento_Profiler_Driver_Standard_Output_Test_Baz'
+            )
+        );
+        $this->_factory->create(array(
+            'type' => 'baz'
+        ));
+    }
+
+    public function testCreateInvalidClass()
+    {
+        $this->setExpectedException(
+            'InvalidArgumentException',
+            'Output class "stdClass" must implement Magento_Profiler_Driver_Standard_OutputInterface.'
+        );
+        $this->_factory->create(array(
+            'type' => 'stdClass'
+        ));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php b/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php
new file mode 100644
index 00000000000..c8bc0ccacf2
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Test class for Magento_Profiler_Driver_Standard_Output_Firebug
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+class Magento_Profiler_Driver_Standard_Output_FirebugTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Magento_Profiler_Driver_Standard_Output_Firebug
+     */
+    protected $_output;
+
+    protected function setUp()
+    {
+        $this->_output = new Magento_Profiler_Driver_Standard_Output_Firebug();
+    }
+
+    public function testGetAndSetRequest()
+    {
+        $this->assertInstanceOf('Zend_Controller_Request_Abstract', $this->_output->getRequest());
+        $request = $this->getMock('Zend_Controller_Request_Abstract');
+        $this->_output->setRequest($request);
+        $this->assertSame($request, $this->_output->getRequest());
+    }
+
+    public function testGetAndSetResponse()
+    {
+        $this->assertInstanceOf('Zend_Controller_Response_Abstract', $this->_output->getResponse());
+        $response = $this->getMock('Zend_Controller_Response_Abstract');
+        $this->_output->setResponse($response);
+        $this->assertSame($response, $this->_output->getResponse());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php b/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php
index 26a085db046..32ea6f4a1bf 100644
--- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php
@@ -23,10 +23,10 @@
  * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
-class Magento_Profiler_Driver_Standard_OutputAbstractStatTest extends PHPUnit_Framework_TestCase
+class Magento_Profiler_Driver_Standard_OutputAbstractTest extends PHPUnit_Framework_TestCase
 {
     /**
-     * @var Magento_Profiler_Driver_Standard_OutputAbstract
+     * @var Magento_Profiler_Driver_Standard_OutputAbstract|PHPUnit_Framework_MockObject_MockObject
      */
     protected $_output;
 
@@ -43,7 +43,7 @@ class Magento_Profiler_Driver_Standard_OutputAbstractStatTest extends PHPUnit_Fr
         $this->assertAttributeEmpty('_filterPattern', $this->_output);
         $filterPattern = '/test/';
         $this->_output->setFilterPattern($filterPattern);
-        $this->assertAttributeEquals($filterPattern, '_filterPattern', $this->_output);
+        $this->assertEquals($filterPattern, $this->_output->getFilterPattern());
     }
 
     /**
@@ -58,7 +58,118 @@ class Magento_Profiler_Driver_Standard_OutputAbstractStatTest extends PHPUnit_Fr
         $this->assertEquals(100, $thresholds[$thresholdKey]);
 
         $this->_output->setThreshold($thresholdKey, null);
-        $thresholds = PHPUnit_Util_Class::getObjectAttribute($this->_output, '_thresholds');
-        $this->assertArrayNotHasKey($thresholdKey, $thresholds);
+        $this->assertArrayNotHasKey($thresholdKey, $this->_output->getThresholds());
+    }
+
+    /**
+     * Test __construct method
+     */
+    public function testConstructor()
+    {
+        $configuration = array(
+            'filterPattern' => '/filter pattern/',
+            'thresholds' => array(
+                'fetchKey' => 100
+            )
+        );
+        /** @var Magento_Profiler_Driver_Standard_OutputAbstract|PHPUnit_Framework_MockObject_MockObject $output  */
+        $output = $this->getMockForAbstractClass('Magento_Profiler_Driver_Standard_OutputAbstract', array(
+            $configuration
+        ));
+        $this->assertEquals('/filter pattern/', $output->getFilterPattern());
+        $thresholds = $output->getThresholds();
+        $this->assertArrayHasKey('fetchKey', $thresholds);
+        $this->assertEquals(100, $thresholds['fetchKey']);
+    }
+
+    /**
+     * Test _renderColumnValue method
+     *
+     * @dataProvider renderColumnValueDataProvider
+     * @param mixed $value
+     * @param string $columnKey
+     * @param mixed $expectedValue
+     */
+    public function testRenderColumnValue($value, $columnKey, $expectedValue)
+    {
+        $method = new ReflectionMethod($this->_output, '_renderColumnValue');
+        $method->setAccessible(true);
+        $this->assertEquals($expectedValue, $method->invoke($this->_output, $value, $columnKey));
+    }
+
+    /**
+     * @return array
+     */
+    public function renderColumnValueDataProvider()
+    {
+        return array(
+            array(
+                'someTimerId',
+                Magento_Profiler_Driver_Standard_Stat::ID,
+                'someTimerId'
+            ),
+            array(
+                10000.123,
+                Magento_Profiler_Driver_Standard_Stat::TIME,
+                '10,000.123000'
+            ),
+            array(
+                200000.123456789,
+                Magento_Profiler_Driver_Standard_Stat::AVG,
+                '200,000.123457'
+            ),
+            array(
+                1000000000.12345678,
+                Magento_Profiler_Driver_Standard_Stat::EMALLOC,
+                '1,000,000,000'
+            ),
+            array(
+                2000000000.12345678,
+                Magento_Profiler_Driver_Standard_Stat::REALMEM,
+                '2,000,000,000'
+            ),
+        );
+    }
+
+    /**
+     * Test _renderCaption method
+     */
+    public function testRenderCaption()
+    {
+        $method = new ReflectionMethod($this->_output, '_renderCaption');
+        $method->setAccessible(true);
+        $this->assertRegExp(
+            '/Code Profiler \(Memory usage: real - \d+, emalloc - \d+\)/',
+            $method->invoke($this->_output)
+        );
+    }
+
+    /**
+     * Test _getTimerIds method
+     */
+    public function testGetTimerIds()
+    {
+        $this->_output->setFilterPattern('/filter pattern/');
+
+        $mockStat = $this->getMock('Magento_Profiler_Driver_Standard_Stat');
+        $expectedTimerIds = array('test');
+        $mockStat->expects($this->once())
+            ->method('getFilteredTimerIds')
+            ->with($this->_output->getThresholds(), $this->_output->getFilterPattern())
+            ->will($this->returnValue($expectedTimerIds));
+
+        $method = new ReflectionMethod($this->_output, '_getTimerIds');
+        $method->setAccessible(true);
+        $this->assertEquals($expectedTimerIds, $method->invoke($this->_output, $mockStat));
+    }
+
+    /**
+     * Test _renderTimerId method
+     */
+    public function testRenderTimerId()
+    {
+        $method = new ReflectionMethod($this->_output, '_renderTimerId');
+        $method->setAccessible(true);
+        $this->assertEquals('someTimerId', $method->invoke($this->_output, 'someTimerId'));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php b/dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php
index a281c7983cb..d552164419e 100644
--- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php
+++ b/dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php
@@ -38,7 +38,9 @@ class Magento_Profiler_Driver_StandardTest extends PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_stat = $this->getMock('Magento_Profiler_Driver_Standard_Stat');
-        $this->_driver = new Magento_Profiler_Driver_Standard($this->_stat);
+        $this->_driver = new Magento_Profiler_Driver_Standard(array(
+            'stat' => $this->_stat
+        ));
     }
 
     protected function tearDown()
@@ -47,31 +49,12 @@ class Magento_Profiler_Driver_StandardTest extends PHPUnit_Framework_TestCase
     }
 
     /**
-     * Test __construct method
+     * Test __construct method with no arguments
      */
-    public function testConstructor()
+    public function testDefaultConstructor()
     {
-        $this->assertAttributeEquals($this->_stat, '_stat', $this->_driver);
-        $this->_driver = new Magento_Profiler_Driver_Standard();
-        $this->assertAttributeInstanceOf('Magento_Profiler_Driver_Standard_Stat', '_stat', $this->_driver);
-    }
-
-    /**
-     * Test display method
-     */
-    public function testDisplayAndRegisterOutput()
-    {
-        $outputOne = $this->getMock('Magento_Profiler_Driver_Standard_OutputInterface');
-        $outputOne->expects($this->once())->method('display')->with($this->_stat);
-        $outputTwo = $this->getMock('Magento_Profiler_Driver_Standard_OutputInterface');
-        $outputTwo->expects($this->once())->method('display')->with($this->_stat);
-
-        $this->_driver->registerOutput($outputOne);
-        $this->_driver->registerOutput($outputTwo);
-        Magento_Profiler::enable();
-        $this->_driver->display();
-        Magento_Profiler::disable();
-        $this->_driver->display();
+        $driver = new Magento_Profiler_Driver_Standard();
+        $this->assertAttributeInstanceOf('Magento_Profiler_Driver_Standard_Stat', '_stat', $driver);
     }
 
     /**
@@ -110,4 +93,78 @@ class Magento_Profiler_Driver_StandardTest extends PHPUnit_Framework_TestCase
         );
         $this->_driver->stop('timer_id');
     }
+
+    /**
+     * Test _initOutputs method
+     */
+    public function testInitOutputs()
+    {
+        $outputFactory = $this->getMock('Magento_Profiler_Driver_Standard_Output_Factory');
+        $config = array(
+            'outputs' => array(
+                'outputTypeOne' => array(
+                    'baseDir' => '/custom/base/dir'
+                ),
+                'outputTypeTwo' => array(
+                    'type' => 'specificOutputTypeTwo'
+                ),
+            ),
+            'baseDir' => '/base/dir',
+            'outputFactory' => $outputFactory
+        );
+
+        $outputOne = $this->getMock('Magento_Profiler_Driver_Standard_OutputInterface');
+        $outputTwo = $this->getMock('Magento_Profiler_Driver_Standard_OutputInterface');
+
+        $outputFactory->expects($this->at(0))
+            ->method('create')
+            ->with(array(
+                'baseDir' => '/custom/base/dir',
+                'type' => 'outputTypeOne'
+            ))
+            ->will($this->returnValue($outputOne));
+
+        $outputFactory->expects($this->at(1))
+            ->method('create')
+            ->with(array(
+                'type' => 'specificOutputTypeTwo',
+                'baseDir' => '/base/dir'
+            ))
+            ->will($this->returnValue($outputTwo));
+
+        $driver = new Magento_Profiler_Driver_Standard($config);
+        $this->assertAttributeCount(2, '_outputs', $driver);
+        $this->assertAttributeEquals(array($outputOne, $outputTwo), '_outputs', $driver);
+    }
+
+    /**
+     * Test display method
+     */
+    public function testDisplayAndRegisterOutput()
+    {
+        $outputOne = $this->getMock('Magento_Profiler_Driver_Standard_OutputInterface');
+        $outputOne->expects($this->once())->method('display')->with($this->_stat);
+        $outputTwo = $this->getMock('Magento_Profiler_Driver_Standard_OutputInterface');
+        $outputTwo->expects($this->once())->method('display')->with($this->_stat);
+
+        $this->_driver->registerOutput($outputOne);
+        $this->_driver->registerOutput($outputTwo);
+        Magento_Profiler::enable();
+        $this->_driver->display();
+        Magento_Profiler::disable();
+        $this->_driver->display();
+    }
+
+    /**
+     * Test _getOutputFactory method creating new object by default
+     */
+    public function testDefaultOutputFactory()
+    {
+        $method = new ReflectionMethod($this->_driver, '_getOutputFactory');
+        $method->setAccessible(true);
+        $this->assertInstanceOf(
+            'Magento_Profiler_Driver_Standard_Output_Factory',
+            $method->invoke($this->_driver)
+        );
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/ProfilerTest.php b/dev/tests/unit/testsuite/Magento/ProfilerTest.php
index ec2c3cb5209..c66eb57a33d 100644
--- a/dev/tests/unit/testsuite/Magento/ProfilerTest.php
+++ b/dev/tests/unit/testsuite/Magento/ProfilerTest.php
@@ -70,9 +70,7 @@ class Magento_ProfilerTest extends PHPUnit_Framework_TestCase
 
         $this->assertTrue(Magento_Profiler::isEnabled());
 
-        $expected = array(
-            get_class($mock) => $mock
-        );
+        $expected = array($mock);
         $this->assertAttributeEquals($expected, '_drivers', 'Magento_Profiler');
     }
 
@@ -347,4 +345,136 @@ class Magento_ProfilerTest extends PHPUnit_Framework_TestCase
             'more than one tag with expected' => array('timer', array('tag' => 'value', 'type' => 'test')),
         );
     }
+
+    public function testApplyConfig()
+    {
+        $mockDriver = $this->getMock('Magento_Profiler_DriverInterface');
+        $driverConfig = array(
+            'type' => 'foo'
+        );
+        $mockDriverFactory = $this->getMockBuilder('Magento_Profiler_Driver_Factory')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $config = array(
+            'drivers' => array($driverConfig),
+            'driverFactory' => $mockDriverFactory,
+            'tagFilters' => array(
+                'tagName' => 'tagValue'
+            )
+        );
+
+        $mockDriverFactory->expects($this->once())
+            ->method('create')
+            ->with($driverConfig)
+            ->will($this->returnValue($mockDriver));
+
+        Magento_Profiler::applyConfig($config);
+        $this->assertAttributeEquals(array(
+            $mockDriver
+        ), '_drivers', 'Magento_Profiler');
+        $this->assertAttributeEquals(array(
+            'tagName' => array(
+                'tagValue'
+            )
+        ), '_tagFilters', 'Magento_Profiler');
+        $this->assertAttributeEquals(true, '_enabled', 'Magento_Profiler');
+    }
+
+    /**
+     * @dataProvider parseConfigDataProvider
+     * @param array $data
+     * @param array $expected
+     */
+    public function testParseConfig(array $data, array $expected)
+    {
+        $method = new ReflectionMethod('Magento_Profiler', '_parseConfig');
+        $method->setAccessible(true);
+        $this->assertEquals($expected, $method->invoke(null, $data));
+    }
+
+    /**
+     * @return array
+     */
+    public function parseConfigDataProvider()
+    {
+        $driverFactory = new Magento_Profiler_Driver_Factory();
+        $otherDriverFactory = $this->getMock('Magento_Profiler_Driver_Factory');
+        return array(
+            'Empty configuration' => array(
+                array(),
+                array(
+                    'driverConfigs' => array(),
+                    'driverFactory' => $driverFactory,
+                    'tagFilters' => array(),
+                    'baseDir' => null,
+                )
+            ),
+            'Full configuration' => array(
+                array(
+                    'drivers' => array(
+                        array(
+                            'type' => 'foo'
+                        )
+                    ),
+                    'driverFactory' => $otherDriverFactory,
+                    'tagFilters' => array('key' => 'value'),
+                    'baseDir' => '/custom/base/dir'
+                ),
+                array(
+                    'driverConfigs' => array(
+                        array(
+                            'type' => 'foo',
+                            'baseDir' => '/custom/base/dir'
+                        )
+                    ),
+                    'driverFactory' => $otherDriverFactory,
+                    'tagFilters' => array('key' => 'value'),
+                    'baseDir' => '/custom/base/dir',
+                )
+            ),
+            'Driver configuration with type in index' => array(
+                array(
+                    'drivers' => array(
+                        'foo' => 1
+                    )
+                ),
+                array(
+                    'driverConfigs' => array(array(
+                        'type' => 'foo'
+                    )),
+                    'driverFactory' => $driverFactory,
+                    'tagFilters' => array(),
+                    'baseDir' => null,
+                )
+            ),
+            'Driver configuration with type in value' => array(
+                array(
+                    'drivers' => array(
+                        'foo'
+                    )
+                ),
+                array(
+                    'driverConfigs' => array(array(
+                        'type' => 'foo'
+                    )),
+                    'driverFactory' => $driverFactory,
+                    'tagFilters' => array(),
+                    'baseDir' => null,
+                )
+            ),
+            'Driver ignored configuration' => array(
+                array(
+                    'drivers' => array(
+                        'foo' => 0
+                    )
+                ),
+                array(
+                    'driverConfigs' => array(),
+                    'driverFactory' => $driverFactory,
+                    'tagFilters' => array(),
+                    'baseDir' => null,
+                )
+            )
+        );
+    }
 }
diff --git a/lib/Magento/Config/Dom.php b/lib/Magento/Config/Dom.php
index 7938e80a223..2b0fb770bbc 100644
--- a/lib/Magento/Config/Dom.php
+++ b/lib/Magento/Config/Dom.php
@@ -31,15 +31,26 @@
 class Magento_Config_Dom
 {
     /**
+     * Dom document
+     *
      * @var DOMDocument
      */
     protected $_dom;
 
     /**
+     * List of id attributes for merge
+     *
      * @var array
      */
     protected $_idAttributes;
 
+    /**
+     * Schema validation file
+     *
+     * @var string
+     */
+    protected $_schemaFile;
+
     /**
      * Build DOM with initial XML contents and specifying identifier attributes for merging
      *
@@ -48,9 +59,12 @@ class Magento_Config_Dom
      *
      * @param string $xml
      * @param array $idAttributes
+     * @param string $schemaFile
+     * @throws Magento_Config_Dom_ValidationException
      */
-    public function __construct($xml, array $idAttributes = array())
+    public function __construct($xml, array $idAttributes = array(), $schemaFile = null)
     {
+        $this->_schemaFile   = $schemaFile;
         $this->_dom          = $this->_initDom($xml);
         $this->_idAttributes = $idAttributes;
     }
@@ -60,6 +74,7 @@ class Magento_Config_Dom
      *
      * @param string $xml
      * @return void
+     * @throws Magento_Config_Dom_ValidationException
      */
     public function merge($xml)
     {
@@ -147,6 +162,32 @@ class Magento_Config_Dom
         return $node;
     }
 
+    /**
+     * Validate dom document
+     *
+     * @param DOMDocument $dom
+     * @param string $schemaFileName
+     * @return array
+     */
+    protected function _validateDomDocument(DOMDocument $dom, $schemaFileName)
+    {
+        libxml_use_internal_errors(true);
+        $result = $dom->schemaValidate($schemaFileName);
+        $errors = array();
+        if (!$result) {
+            $validationErrors = libxml_get_errors();
+            if (count($validationErrors)) {
+                foreach ($validationErrors as $error) {
+                    $errors[] = "{$error->message} Line: {$error->line}\n";
+                }
+            } else {
+                $errors[] = 'Unknown validation error';
+            }
+        }
+        libxml_use_internal_errors(false);
+        return $errors;
+    }
+
     /**
      * DOM document getter
      *
@@ -162,28 +203,31 @@ class Magento_Config_Dom
      *
      * @param string $xml
      * @return DOMDocument
+     * @throws Magento_Config_Dom_ValidationException
      */
     protected function _initDom($xml)
     {
         $dom = new DOMDocument();
         $dom->loadXML($xml);
-        $rr = $dom->saveXML();
+        if ($this->_schemaFile) {
+            $errors = $this->_validateDomDocument($dom, $this->_schemaFile);
+            if (count($errors)) {
+                throw new Magento_Config_Dom_ValidationException(implode("\n", $errors));
+            }
+        }
         return $dom;
     }
 
     /**
      * Validate self contents towards to specified schema
      *
-     * @param string $schemaFile absolute path to schema file
+     * @param string $schemaFileName absolute path to schema file
      * @param array &$errors
      * @return bool
      */
-    public function validate($schemaFile, &$errors = array())
+    public function validate($schemaFileName, &$errors = array())
     {
-        libxml_use_internal_errors(true);
-        $result = $this->_dom->schemaValidate($schemaFile);
-        $errors = libxml_get_errors();
-        libxml_use_internal_errors(false);
-        return $result;
+        $errors = $this->_validateDomDocument($this->_dom, $schemaFileName);
+        return !count($errors);
     }
 }
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml b/lib/Magento/Config/Dom/ValidationException.php
similarity index 51%
rename from app/code/core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml
rename to lib/Magento/Config/Dom/ValidationException.php
index fd58867c828..ffd381a0dd0 100644
--- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml
+++ b/lib/Magento/Config/Dom/ValidationException.php
@@ -1,14 +1,13 @@
-<?xml version="1.0"?>
-<!--
+<?php
 /**
  * Magento
  *
  * NOTICE OF LICENSE
  *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
+ * http://opensource.org/licenses/osl-3.0.php
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to license@magentocommerce.com so we can send you a copy immediately.
@@ -19,17 +18,16 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    design
- * @package     default_default
+ * @category    Magento
+ * @package     Framework
+ * @subpackage  Config
  * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
--->
 
-<layout>
-    <adminhtml_catalog_search_edit>
-        <reference name="content">
-            <block type="Mage_Adminhtml_Block_Catalog_Search_Edit" name="catalog_search_edit" />
-        </reference>
-    </adminhtml_catalog_search_edit>
-</layout>
+/**
+ * Exception that should be thrown by DOM model when incoming xml is not valid.
+ */
+class Magento_Config_Dom_ValidationException extends InvalidArgumentException
+{
+}
\ No newline at end of file
diff --git a/lib/Magento/Config/XmlAbstract.php b/lib/Magento/Config/XmlAbstract.php
index 2ce7c93fbba..ac61814535a 100644
--- a/lib/Magento/Config/XmlAbstract.php
+++ b/lib/Magento/Config/XmlAbstract.php
@@ -95,9 +95,10 @@ abstract class Magento_Config_XmlAbstract
             if (!file_exists($file)) {
                 throw new Magento_Exception("File does not exist: {$file}");
             }
-            $this->_getDomConfigModel()->merge(file_get_contents($file));
-            if ($this->_isRuntimeValidated()) {
-                $this->_performValidate($file);
+            try {
+                $this->_getDomConfigModel()->merge(file_get_contents($file));
+            } catch (Magento_Config_Dom_ValidationException $e) {
+                throw new Magento_Exception("Invalid XML in file " . $file . ":\n" . $e->getMessage());
             }
         }
         if ($this->_isRuntimeValidated()) {
@@ -108,29 +109,23 @@ abstract class Magento_Config_XmlAbstract
 
     /**
      * Perform xml validation
+     *
      * @param string $file
      * @return Magento_Config_XmlAbstract
      * @throws Magento_Exception if invalid XML-file passed
      */
     protected function _performValidate($file = null)
     {
-        $schemaFile = $this->getSchemaFile();
-        if ($file) {
-            $schemaFile = $this->getPerFileSchemaFile() ? $this->getPerFileSchemaFile() : $schemaFile;
-        }
-        if (!$this->_getDomConfigModel()->validate($schemaFile, $errors)) {
+        if (!$this->_getDomConfigModel()->validate($this->getSchemaFile(), $errors)) {
             $message = is_null($file) ?  "Invalid Document \n" : "Invalid XML-file: {$file}\n";
-            /** @var libXMLError $error */
-            foreach ($errors as $error) {
-                $message .= "{$error->message} Line: {$error->line}\n";
-            }
-            throw new Magento_Exception($message);
+            throw new Magento_Exception($message . implode("\n", $errors));
         }
         return $this;
     }
 
     /**
      * Get if xml files must be runtime validated
+     *
      * @return boolean
      */
     protected function _isRuntimeValidated()
@@ -140,12 +135,17 @@ abstract class Magento_Config_XmlAbstract
 
     /**
      * Get Dom configuration model
+     *
      * @return Magento_Config_Dom
+     * @throws Magento_Config_Dom_ValidationException
      */
     protected function _getDomConfigModel()
     {
         if (is_null($this->_domConfig)) {
-            $this->_domConfig = new Magento_Config_Dom($this->_getInitialXml(), $this->_getIdAttributes());
+            $schemaFile = $this->getPerFileSchemaFile() && $this->_isRuntimeValidated()
+                ? $this->getPerFileSchemaFile()
+                : null;
+            $this->_domConfig = new Magento_Config_Dom($this->_getInitialXml(), $this->_getIdAttributes(), $schemaFile);
         }
         return $this->_domConfig;
     }
@@ -163,14 +163,4 @@ abstract class Magento_Config_XmlAbstract
      * @return array
      */
     abstract protected function _getIdAttributes();
-
-    /**
-     * Serialize configuration data
-     *
-     * @return array
-     */
-    public function __sleep()
-    {
-        return array('_data');
-    }
 }
diff --git a/lib/Magento/Profiler.php b/lib/Magento/Profiler.php
index ab1cc7769af..004e9c72406 100644
--- a/lib/Magento/Profiler.php
+++ b/lib/Magento/Profiler.php
@@ -142,7 +142,7 @@ class Magento_Profiler
      */
     public static function add(Magento_Profiler_DriverInterface $driver)
     {
-        self::$_drivers[get_class($driver)] = $driver;
+        self::$_drivers[] = $driver;
         self::enable();
     }
 
@@ -317,4 +317,114 @@ class Magento_Profiler
             self::$_pathCount--;
         }
     }
+
+    /**
+     * Init profiler
+     *
+     * @param array $config
+     */
+    public static function applyConfig(array $config)
+    {
+        $config = self::_parseConfig($config);
+        if ($config['driverConfigs']) {
+            foreach ($config['driverConfigs'] as $driverConfig) {
+                self::add($config['driverFactory']->create($driverConfig));
+            }
+        }
+        foreach ($config['tagFilters'] as $tagName => $tagValue) {
+            self::addTagFilter($tagName, $tagValue);
+        }
+    }
+
+    /**
+     * Parses config
+     *
+     * @param array $config
+     * @return array
+     */
+    protected static function _parseConfig(array $config)
+    {
+        if (isset($config['drivers']) && is_array($config['drivers'])) {
+            $driverConfigs = $config['drivers'];
+        } elseif (isset($config['driver'])) {
+            $driverConfigs = array($config['driver']);
+        } else {
+            $driverConfigs = array();
+        }
+
+        if (isset($config['driverFactory'])) {
+            $driverFactory = $config['driverFactory'];
+        } else {
+            $driverFactory = new Magento_Profiler_Driver_Factory();
+        }
+
+        if (isset($config['tagFilters']) && is_array($config['tagFilters'])) {
+            $tagFilters = $config['tagFilters'];
+        } else {
+            $tagFilters = array();
+        }
+
+        if (isset($config['baseDir'])) {
+            $baseDir = $config['baseDir'];
+        } else {
+            $baseDir = null;
+        }
+
+        $result = array(
+            'driverConfigs' => self::_parseDriverConfigs($driverConfigs, $baseDir),
+            'driverFactory' => $driverFactory,
+            'tagFilters' => $tagFilters,
+            'baseDir' => $baseDir
+        );
+        return $result;
+    }
+
+    /**
+     * Parses list of driver configurations
+     *
+     * @param array $driverConfigs
+     * @param string $baseDir
+     * @return array
+     */
+    protected static function _parseDriverConfigs(array $driverConfigs, $baseDir)
+    {
+        $result = array();
+        foreach ($driverConfigs as $code => $driverConfig) {
+            $driverConfig = self::_parseDriverConfig($driverConfig);
+            if ($driverConfig === false) {
+                continue;
+            }
+            if (!isset($driverConfig['type']) && !is_numeric($code)) {
+                $driverConfig['type'] = $code;
+            }
+            if (!isset($driverConfig['baseDir']) && $baseDir) {
+                $driverConfig['baseDir'] = $baseDir;
+            }
+            $result[] = $driverConfig;
+        }
+        return $result;
+    }
+
+    /**
+     * Parses driver config
+     *
+     * @param mixed $driverConfig
+     * @return array|bool
+     */
+    protected static function _parseDriverConfig($driverConfig)
+    {
+        $result = false;
+        if (is_array($driverConfig)) {
+            $result = $driverConfig;
+        } elseif (is_scalar($driverConfig) && $driverConfig) {
+            if (is_numeric($driverConfig)) {
+                $result = array();
+            } else {
+                $result = array(
+                    'type' => $driverConfig
+                );
+            }
+        }
+        return $result;
+    }
 }
diff --git a/lib/Magento/Profiler/Driver/Factory.php b/lib/Magento/Profiler/Driver/Factory.php
new file mode 100644
index 00000000000..ccd8f75663c
--- /dev/null
+++ b/lib/Magento/Profiler/Driver/Factory.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Profiler driver factory
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+class Magento_Profiler_Driver_Factory
+{
+    /**
+     * Default driver type
+     *
+     * @var string
+     */
+    protected $_defaultDriverType;
+
+    /**
+     * Default driver class prefix
+     *
+     * @var string
+     */
+    protected $_defaultDriverPrefix;
+
+    /**
+     * Constructor
+     *
+     * @param string $defaultDriverPrefix
+     * @param string $defaultDriverType
+     */
+    public function __construct($defaultDriverPrefix = 'Magento_Profiler_Driver_', $defaultDriverType = 'standard')
+    {
+        $this->_defaultDriverPrefix = $defaultDriverPrefix;
+        $this->_defaultDriverType = $defaultDriverType;
+    }
+
+    /**
+     * Create instance of profiler driver
+     *
+     * @param array $config|null
+     * @return Magento_Profiler_DriverInterface
+     * @throws InvalidArgumentException
+     */
+    public function create(array $config = null)
+    {
+        $type = isset($config['type']) ? $config['type'] : $this->_defaultDriverType;
+        if (class_exists($type)) {
+            $class = $type;
+        } else {
+            $class = $this->_defaultDriverPrefix . ucfirst($type);
+            if (!class_exists($class)) {
+                throw new InvalidArgumentException(
+                    sprintf("Cannot create profiler driver, class \"%s\" doesn't exist.", $class
+                ));
+            }
+        }
+        $driver = new $class($config);
+        if (!$driver instanceof Magento_Profiler_DriverInterface) {
+            throw new InvalidArgumentException(sprintf(
+                "Driver class \"%s\" must implement Magento_Profiler_DriverInterface.", get_class($driver)
+            ));
+        }
+        return $driver;
+    }
+}
diff --git a/lib/Magento/Profiler/Driver/Standard.php b/lib/Magento/Profiler/Driver/Standard.php
index 8aad62a2c07..4cad7991aad 100644
--- a/lib/Magento/Profiler/Driver/Standard.php
+++ b/lib/Magento/Profiler/Driver/Standard.php
@@ -42,17 +42,116 @@ class Magento_Profiler_Driver_Standard implements Magento_Profiler_DriverInterfa
     /**
      * Constructor
      *
-     * @param Magento_Profiler_Driver_Standard_Stat|null $stat
+     * @param array|null $config
      */
-    public function __construct(Magento_Profiler_Driver_Standard_Stat $stat = null)
+    public function __construct(array $config = null)
     {
-        if (!$stat) {
-            $stat = new Magento_Profiler_Driver_Standard_Stat();
-        }
-        $this->_stat = $stat;
+        $this->_initOutputs($config);
+        $this->_initStat($config);
         register_shutdown_function(array($this, 'display'));
     }
 
+    /**
+     * Init outputs by configuration
+     *
+     * @param array|null $config
+     */
+    protected function _initOutputs(array $config = null)
+    {
+        if (!$config) {
+            return;
+        }
+
+        $outputFactory = $this->_getOutputFactory($config);
+        foreach ($this->_getOutputConfigs($config) as $code => $outputConfig) {
+            $outputConfig = $this->_parseOutputConfig($outputConfig);
+            if (false === $outputConfig) {
+                continue;
+            }
+            if (!isset($outputConfig['type']) && !is_numeric($code)) {
+                $outputConfig['type'] = $code;
+            }
+            if (!isset($outputConfig['baseDir']) && isset($config['baseDir'])) {
+                $outputConfig['baseDir'] = $config['baseDir'];
+            }
+            $this->registerOutput($outputFactory->create($outputConfig));
+        }
+    }
+
+    /**
+     * Parses output config
+     *
+     * @param mixed $outputConfig
+     * @return array|bool
+     */
+    protected function _parseOutputConfig($outputConfig)
+    {
+        $result = false;
+        if (is_array($outputConfig)) {
+            $result = $outputConfig;
+        } elseif (is_scalar($outputConfig) && $outputConfig) {
+            if (is_numeric($outputConfig)) {
+                $result = array();
+            } else {
+                $result = array(
+                    'type' => $outputConfig
+                );
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * Get output configs
+     *
+     * @param array $config
+     * @return array
+     */
+    protected function _getOutputConfigs(array $config = null)
+    {
+        $result = array();
+        if (isset($config['outputs'])) {
+            $result = $config['outputs'];
+        } elseif (isset($config['output'])) {
+            $result[] = $config['output'];
+        }
+        return $result;
+    }
+
+    /**
+     * Gets output factory from configuration or create new one
+     *
+     * @param array|null $config
+     * @return Magento_Profiler_Driver_Standard_Output_Factory
+     */
+    protected function _getOutputFactory(array $config = null)
+    {
+        if (isset($config['outputFactory'])
+            && $config['outputFactory'] instanceof Magento_Profiler_Driver_Standard_Output_Factory
+        ) {
+            $result = $config['outputFactory'];
+        } else {
+            $result = new Magento_Profiler_Driver_Standard_Output_Factory();
+        }
+        return $result;
+    }
+
+    /**
+     * Init timers statistics object from configuration or create new one
+     *
+     * @param array $config|null
+     */
+    protected function _initStat(array $config = null)
+    {
+        if (isset($config['stat'])
+            && $config['stat'] instanceof Magento_Profiler_Driver_Standard_Stat
+        ) {
+            $this->_stat = $config['stat'];
+        } else {
+            $this->_stat = new Magento_Profiler_Driver_Standard_Stat();
+        }
+    }
+
     /**
      * Clear collected statistics for specified timer or for whole profiler if timer id is omitted
      *
@@ -68,7 +167,6 @@ class Magento_Profiler_Driver_Standard implements Magento_Profiler_DriverInterfa
      *
      * @param string $timerId
      * @param array|null $tags
-     * @return void
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function start($timerId, array $tags = null)
diff --git a/lib/Magento/Profiler/Driver/Standard/Output/Csvfile.php b/lib/Magento/Profiler/Driver/Standard/Output/Csvfile.php
index 81041a56ccb..e98a82b148d 100644
--- a/lib/Magento/Profiler/Driver/Standard/Output/Csvfile.php
+++ b/lib/Magento/Profiler/Driver/Standard/Output/Csvfile.php
@@ -25,11 +25,13 @@
  */
 class Magento_Profiler_Driver_Standard_Output_Csvfile extends Magento_Profiler_Driver_Standard_OutputAbstract
 {
+    const DEFAULT_FILEPATH = '/var/log/profiler.csv';
+
     /**
      *
      * @var string
      */
-    protected $_filename;
+    protected $_filePath;
 
     /**
      * @var string
@@ -44,15 +46,32 @@ class Magento_Profiler_Driver_Standard_Output_Csvfile extends Magento_Profiler_D
     /**
      * Constructor
      *
-     * @param string $filename Target file to save CSV data
-     * @param string $delimiter Delimiter for CSV format
-     * @param string $enclosure Enclosure for CSV format
+     * @param array|null $config
      */
-    public function __construct($filename, $delimiter = ',', $enclosure = '"')
+    public function __construct(array $config = null)
     {
-        $this->_filename = $filename;
-        $this->_delimiter = $delimiter;
-        $this->_enclosure = $enclosure;
+        parent::__construct($config);
+        $this->_filePath = $this->_parseFilePath($config);
+        $this->_delimiter = isset($config['delimiter']) ? $config['delimiter'] : ',';
+        $this->_enclosure = isset($config['enclosure']) ? $config['enclosure'] : '"';
+    }
+
+    /**
+     * Parses file path
+     *
+     * @param array|null $config
+     * @return string
+     */
+    protected function _parseFilePath(array $config = null)
+    {
+        $result = isset($config['filePath']) ? $config['filePath'] : self::DEFAULT_FILEPATH;
+
+        if (isset($config['baseDir'])) {
+            $result = rtrim($config['baseDir'], DIRECTORY_SEPARATOR)
+                . DIRECTORY_SEPARATOR
+                . ltrim($result, DIRECTORY_SEPARATOR);
+        }
+        return $result;
     }
 
     /**
@@ -63,12 +82,12 @@ class Magento_Profiler_Driver_Standard_Output_Csvfile extends Magento_Profiler_D
      */
     public function display(Magento_Profiler_Driver_Standard_Stat $stat)
     {
-        $fileHandle = fopen($this->_filename, 'w');
+        $fileHandle = fopen($this->_filePath, 'w');
         if (!$fileHandle) {
-            throw new RuntimeException(sprintf('Can not open a file "%s".', $this->_filename));
+            throw new RuntimeException(sprintf('Can not open a file "%s".', $this->_filePath));
         }
 
-        $lockRequired = (strpos($this->_filename, 'php://') !== 0);
+        $lockRequired = (strpos($this->_filePath, 'php://') !== 0);
         $isLocked = false;
         while ($lockRequired && !$isLocked) {
             $isLocked = flock($fileHandle, LOCK_EX);
diff --git a/lib/Magento/Profiler/Driver/Standard/Output/Factory.php b/lib/Magento/Profiler/Driver/Standard/Output/Factory.php
new file mode 100644
index 00000000000..a9cc92d55e3
--- /dev/null
+++ b/lib/Magento/Profiler/Driver/Standard/Output/Factory.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Standard profiler driver output factory
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+class Magento_Profiler_Driver_Standard_Output_Factory
+{
+    /**
+     * Default output type
+     *
+     * @var string
+     */
+    protected $_defaultOutputType;
+
+    /**
+     * Default output class prefix
+     *
+     * @var string
+     */
+    protected $_defaultOutputPrefix;
+
+    /**
+     * Constructor
+     *
+     * @param string $defaultOutputPrefix
+     * @param string $defaultOutputType
+     */
+    public function __construct(
+        $defaultOutputPrefix = 'Magento_Profiler_Driver_Standard_Output_',
+        $defaultOutputType = 'html'
+    ) {
+        $this->_defaultOutputPrefix = $defaultOutputPrefix;
+        $this->_defaultOutputType = $defaultOutputType;
+    }
+
+    /**
+     * Create instance of standard profiler driver output
+     *
+     * @param array $config
+     * @return Magento_Profiler_Driver_Standard_OutputInterface
+     * @throws InvalidArgumentException If driver cannot be created
+     */
+    public function create(array $config)
+    {
+        $type = isset($config['type']) ? $config['type'] : $this->_defaultOutputType;
+        if (class_exists($type)) {
+            $class = $type;
+        } else {
+            $class = $this->_defaultOutputPrefix . ucfirst($type);
+            if (!class_exists($class)) {
+                throw new InvalidArgumentException(
+                    sprintf("Cannot create standard driver output, class \"%s\" doesn't exist.", $class
+                ));
+            }
+        }
+        $output = new $class($config);
+        if (!$output instanceof Magento_Profiler_Driver_Standard_OutputInterface) {
+            throw new InvalidArgumentException(sprintf(
+                "Output class \"%s\" must implement Magento_Profiler_Driver_Standard_OutputInterface.",
+                get_class($output)
+            ));
+        }
+        return $output;
+    }
+}
diff --git a/lib/Magento/Profiler/Driver/Standard/Output/Firebug.php b/lib/Magento/Profiler/Driver/Standard/Output/Firebug.php
index aef5952b582..0a8ecb1c111 100644
--- a/lib/Magento/Profiler/Driver/Standard/Output/Firebug.php
+++ b/lib/Magento/Profiler/Driver/Standard/Output/Firebug.php
@@ -37,9 +37,12 @@ class Magento_Profiler_Driver_Standard_Output_Firebug extends Magento_Profiler_D
 
     /**
      * Start output buffering
+     *
+     * @param array $config
      */
-    public function __construct()
+    public function __construct(array $config = null)
     {
+        parent::__construct($config);
         ob_start();
     }
 
@@ -65,8 +68,8 @@ class Magento_Profiler_Driver_Standard_Output_Firebug extends Magento_Profiler_D
 
         // setup the wildfire channel
         $firebugChannel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
-        $firebugChannel->setRequest($this->_request ? $this->_request : new Zend_Controller_Request_Http());
-        $firebugChannel->setResponse($this->_response ? $this->_response : new Zend_Controller_Response_Http());
+        $firebugChannel->setRequest($this->getRequest());
+        $firebugChannel->setResponse($this->getResponse());
 
         // flush the wildfire headers into the response object
         $firebugChannel->flush();
@@ -99,6 +102,19 @@ class Magento_Profiler_Driver_Standard_Output_Firebug extends Magento_Profiler_D
         $this->_request = $request;
     }
 
+    /**
+     * Request getter
+     *
+     * @return Zend_Controller_Request_Abstract
+     */
+    public function getRequest()
+    {
+        if (!$this->_request) {
+            $this->_request = new Zend_Controller_Request_Http();
+        }
+        return $this->_request;
+    }
+
     /**
      * Response setter
      *
@@ -108,4 +124,18 @@ class Magento_Profiler_Driver_Standard_Output_Firebug extends Magento_Profiler_D
     {
         $this->_response = $response;
     }
+
+    /**
+     * Request getter
+     *
+     * @return Zend_Controller_Response_Abstract
+     */
+    public function getResponse()
+    {
+        if (!$this->_response) {
+            $this->_response = new Zend_Controller_Response_Http();
+        }
+        return $this->_response;
+    }
+
 }
diff --git a/lib/Magento/Profiler/Driver/Standard/OutputAbstract.php b/lib/Magento/Profiler/Driver/Standard/OutputAbstract.php
index c6d9d9bb97c..14bf8872019 100644
--- a/lib/Magento/Profiler/Driver/Standard/OutputAbstract.php
+++ b/lib/Magento/Profiler/Driver/Standard/OutputAbstract.php
@@ -58,6 +58,23 @@ abstract class Magento_Profiler_Driver_Standard_OutputAbstract
         'RealMem'  => Magento_Profiler_Driver_Standard_Stat::REALMEM,
     );
 
+    /**
+     * Constructor
+     *
+     * @param array|null $config
+     */
+    public function __construct(array $config = null)
+    {
+        if (!empty($config['filterPattern'])) {
+            $this->setFilterPattern($config['filterPattern']);
+        }
+        if (!empty($config['thresholds']) && is_array($config['thresholds'])) {
+            foreach ($config['thresholds'] as $fetchKey => $minAllowedValue) {
+                $this->setThreshold($fetchKey, (int)$minAllowedValue);
+            }
+        }
+    }
+
     /**
      * Set profiler output with timer identifiers filter.
      *
@@ -68,6 +85,16 @@ abstract class Magento_Profiler_Driver_Standard_OutputAbstract
         $this->_filterPattern = $filterPattern;
     }
 
+    /**
+     * Get profiler output timer identifiers filter.
+     *
+     * @return string|null
+     */
+    public function getFilterPattern()
+    {
+        return $this->_filterPattern;
+    }
+
     /**
      * Set threshold (minimal allowed) value for timer column.
      *
@@ -85,6 +112,16 @@ abstract class Magento_Profiler_Driver_Standard_OutputAbstract
         }
     }
 
+    /**
+     * Get list of thresholds.
+     *
+     * @return array
+     */
+    public function getThresholds()
+    {
+        return $this->_thresholds;
+    }
+
     /**
      * Render statistics column value for specified timer
      *
-- 
GitLab