diff --git a/CHANGELOG.markdown b/CHANGELOG.md
similarity index 96%
rename from CHANGELOG.markdown
rename to CHANGELOG.md
index a6a069b1ccb4cb5828ae8d5d45e91a60dd348cc0..1ac4b53c083e2c1f9a441d267aab4a7040fa7c06 100644
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.md
@@ -1,3 +1,37 @@
+2.0.0.0-dev47
+=============
+* Fixed bugs:
+  * Fixed compilation of DI definitions
+  * Fixed direct injection of auto-generated proxy classes
+  * Fixed usages of auto-generated factories on the library level
+  * Fixed fatal error after saving customer address with VAT number
+  * Fixed fatal error caused by USPS shipping method with debug
+  * Fixed url to Tax Class controller
+  * Fixed incorrect subtotal displayed on the Order page
+  * Fixed incorrect arguments for shipping xml elements factory
+  * Fixed theme editing in developer mode (PHP 5.4)
+  * Fixed absent conditions during New Shopping Cart Price Rule creation
+  * Fixed fatal error while try to edit created configurable product while Dev Mode enabled (PHP 5.4)
+  * Fixed frontend error when persistent shopping cart functionality is enabled
+  * Fixed Tax tab
+  * Fixed broken link "Orders and returns" on frontend
+  * Fixed placing order within OnePageCheckout using online payment methods
+  * Fixed error when product is being added to order from backend if Gift Messages are enabled
+  * Fixed error when product is being added to cart if MAP is enabled
+  * Fixed error when product attribute template is being edited
+  * Fixed error when setting configuration for Google API
+  * Fixed backend issue when Stores>Configuration>System>Advanced page was not displayed and did not allow to save changes
+  * Fixed not executable button "Continue shopping" on Multi-shipping process
+  * Fixed error on adding product to shopping cart from cross-sells block
+  * Fixed fatal error on Recurring Billing Profiles page
+  * Fixed error on setting configuration for Catalog
+  * Fixed error on placing order with Configurable product
+  * Fixed issue with downloadable product creation
+  * Fixed error on update configuration for payment methods
+  * Fixed blank page on shopping cart if FedEx shipping method is enabled
+  * Fixed fatal error when SID presents in URL
+  * Fixed absence of selection of a role assigned to an admin user
+
 2.0.0.0-dev46
 =============
 * Translation mechanism improvements:
@@ -24,53 +58,53 @@
      * Deprecated prototype.js based method removed from app/code/Magento/Weee/view/frontend/tax-toggle.js
      * Removed deprecated prototype.js based file: app/code/Magento/Checkout/view/frontend/opcheckout.js
      * Updated to use jQuery redirectUrl widget vs prototype based solution:
-       * app/code/Magento/Oauth/view/adminhtml/authorize/form/login.phtml
-       * app/code/Magento/Oauth/view/frontend/authorize/form/login.phtml
-       * app/code/Magento/Catalog/view/frontend/product/list.phtml
+         * app/code/Magento/Oauth/view/adminhtml/authorize/form/login.phtml
+         * app/code/Magento/Oauth/view/frontend/authorize/form/login.phtml
+         * app/code/Magento/Catalog/view/frontend/product/list.phtml
   * Removed file containing jQuery that did not meet the Magento 2 coding standard. Replaced with redirect-url widget
      * app/code/Magento/Catalog/view/frontend/js/mage-attributes-processing.js
   * Updated to meet Magento 2 coding standard: app/code/Magento/Checkout/view/frontend/cart/item/default.phtml
   * Added jQuery widgets:
-    * mage.deletableItem - Widget to tag DOM element as deletable, by default on click
-    * mage.fieldsetControls & mage.fieldsetResetControl - Widget to easily reset a subset of form fields with a reset ui control
-    * mage.itemTable  - Widget to easily add a data template block dynamically on an event, by default click.
-    * mage.redirectUrl - Simple widget to allow for consistent javascript based redirects that meet the Magento 2 coding standard
-    * Added new validation rules for validation widget: 'required-if-not-specified', 'required-if-specified', and 'validate-item-quantity'
+     * mage.deletableItem - Widget to tag DOM element as deletable, by default on click
+     * mage.fieldsetControls & mage.fieldsetResetControl - Widget to easily reset a subset of form fields with a reset ui control
+     * mage.itemTable  - Widget to easily add a data template block dynamically on an event, by default click.
+     * mage.redirectUrl - Simple widget to allow for consistent javascript based redirects that meet the Magento 2 coding standard
+     * Added new validation rules for validation widget: 'required-if-not-specified', 'required-if-specified', and 'validate-item-quantity'
 * Various improvements:
   * Changed VendorName from Mage to Magento
   * Implemented PSR-0 and PSR-1 Coding Standards
-    * All Magento source code has been converted.
-    * Tests have been written to enforce PSR-0 and PSR-1 coding standards.
+     * All Magento source code has been converted.
+     * Tests have been written to enforce PSR-0 and PSR-1 coding standards.
   * Removed empty module setup models. Core resource setup model is used as a default setup model now. Custom setup model must be injected via DI configuration
   * Removed some events (plugins must be used instead):
-    * adminhtml_widget_container_html_before
-    * admin_session_user_logout
-    * model_config_data_save_before
-    * admin_system_config_section_save_after
-    * backend_menu_load_after
-    * catalog_controller_category_init_before
-    * catalog_helper_output_construct
-    * catalog_controller_product_init
-    * catalog_category_tree_move_before
-    * catalog_category_tree_move_after
-    * catalog_product_website_update_before
-    * catalog_product_website_update
-    * catalog_product_media_save_before
-    * catalog_product_media_add_image
-    * catalog_product_type_grouped_price
-    * catalog_product_collection_load_before
-    * catalogsearch_index_process_start
-    * catalogsearch_index_process_complete
-    * cms_page_get_available_statuses
-    * cms_wysiwyg_config_prepare
-    * application_clean_cache
-    * theme_copy_after
-    * customer_registration_is_allowed
-    * log_log_clean_before
-    * log_log_clean_after
-    * sales_convert_quote_payment_to_order_payment
-    * sales_convert_quote_item_to_order_item
-    * sales_quote_config_get_product_attributes
+     * adminhtml_widget_container_html_before
+     * admin_session_user_logout
+     * model_config_data_save_before
+     * admin_system_config_section_save_after
+     * backend_menu_load_after
+     * catalog_controller_category_init_before
+     * catalog_helper_output_construct
+     * catalog_controller_product_init
+     * catalog_category_tree_move_before
+     * catalog_category_tree_move_after
+     * catalog_product_website_update_before
+     * catalog_product_website_update
+     * catalog_product_media_save_before
+     * catalog_product_media_add_image
+     * catalog_product_type_grouped_price
+     * catalog_product_collection_load_before
+     * catalogsearch_index_process_start
+     * catalogsearch_index_process_complete
+     * cms_page_get_available_statuses
+     * cms_wysiwyg_config_prepare
+     * application_clean_cache
+     * theme_copy_after
+     * customer_registration_is_allowed
+     * log_log_clean_before
+     * log_log_clean_after
+     * sales_convert_quote_payment_to_order_payment
+     * sales_convert_quote_item_to_order_item
+     * sales_quote_config_get_product_attributes
   * Removed the Poll module including references and dependencies to/on it.
 * Redesign and reimplementation of web services framework
   * Removed the Api module and all existing SOAP V1, SOAP V2, and XML-RPC web services code
diff --git a/app/code/Magento/AdminNotification/etc/module.xml b/app/code/Magento/AdminNotification/etc/module.xml
index 8d82da5135eab525f2a092df112ce609d6f2284e..8181e408161f81e7d132b9e25f1d5c67a30be801 100755
--- a/app/code/Magento/AdminNotification/etc/module.xml
+++ b/app/code/Magento/AdminNotification/etc/module.xml
@@ -33,6 +33,7 @@
             <module name="Magento_Core"/>
             <module name="Magento_Adminhtml"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php b/app/code/Magento/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php
index 0fe333da43f03259ba3a5ecd0a13bbba2763b313..d3dd283845255eeaa7a4ec88e607e022a379c990 100644
--- a/app/code/Magento/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php
+++ b/app/code/Magento/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php
@@ -57,7 +57,7 @@ class Main extends \Magento\Backend\Block\Template
     protected $_collectionFactory;
 
     /**
-     * @var \Magento\Eav\Model\Entity\Type
+     * @var \Magento\Eav\Model\Entity\TypeFactory
      */
     protected $_typeFactory;
 
@@ -72,7 +72,7 @@ class Main extends \Magento\Backend\Block\Template
     protected $_attributeFactory;
 
     /**
-     * @param \Magento\Eav\Model\Entity\Type $typeFactory
+     * @param \Magento\Eav\Model\Entity\TypeFactory $typeFactory
      * @param \Magento\Eav\Model\Entity\Attribute\GroupFactory $groupFactory
      * @param \Magento\Catalog\Model\Resource\Product\Type\Configurable\AttributeFactory $attributeFactory
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory
@@ -83,7 +83,7 @@ class Main extends \Magento\Backend\Block\Template
      * @param array $data
      */
     public function __construct(
-        \Magento\Eav\Model\Entity\Type $typeFactory,
+        \Magento\Eav\Model\Entity\TypeFactory $typeFactory,
         \Magento\Eav\Model\Entity\Attribute\GroupFactory $groupFactory,
         \Magento\Catalog\Model\Resource\Product\Type\Configurable\AttributeFactory $attributeFactory,
         \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory,
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php b/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php
index e6aaf44c1bc304faa749a9d6d40ff27651b66240..c5a65cf9cb223de916bf22fa837e5bcab4599253 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php
+++ b/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php
@@ -183,7 +183,7 @@ class Actions
         ));
 
         $renderer = $this->_rendererFieldset
-            ->setTemplate('promo/fieldset.phtml')
+            ->setTemplate('Magento_Adminhtml::promo/fieldset.phtml')
             ->setNewChildUrl($this->getUrl('*/promo_quote/newActionHtml/form/rule_actions_fieldset'));
 
         $fieldset = $form->addFieldset('actions_fieldset', array(
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php b/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php
index ddb31497dbe4421e1eeb66c4b9e9c58bdb812fce..c169b45f54d48609ed25a42f2df861296cead793 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php
+++ b/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php
@@ -114,7 +114,7 @@ class Conditions
         $form->setHtmlIdPrefix('rule_');
 
         $renderer = $this->_rendererFieldset
-            ->setTemplate('promo/fieldset.phtml')
+            ->setTemplate('Magento_Adminhtml::promo/fieldset.phtml')
             ->setNewChildUrl($this->getUrl('*/promo_quote/newConditionHtml/form/rule_conditions_fieldset'));
 
         $fieldset = $form->addFieldset('conditions_fieldset', array(
diff --git a/app/code/Magento/Adminhtml/Block/Tax/Rule/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Tax/Rule/Edit/Form.php
index 3188d10bb6053afd847790bfb24cd692c074012c..5e23ffab5898e711727493515a3be09812a564b5 100644
--- a/app/code/Magento/Adminhtml/Block/Tax/Rule/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Tax/Rule/Edit/Form.php
@@ -217,9 +217,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     public function getTaxClassSelectConfig($classType)
     {
         $config = array(
-            'new_url' => $this->getUrl('adminhtml/tax_class/ajaxSave/'),
-            'save_url' => $this->getUrl('adminhtml/tax_class/ajaxSave/'),
-            'delete_url' => $this->getUrl('adminhtml/tax_class/ajaxDelete/'),
+            'new_url' => $this->getUrl('adminhtml/tax_tax/ajaxSave/'),
+            'save_url' => $this->getUrl('adminhtml/tax_tax/ajaxSave/'),
+            'delete_url' => $this->getUrl('adminhtml/tax_tax/ajaxDelete/'),
             'delete_confirm_message' => __('Do you really want to delete this tax class?'),
             'target_select_id' => $this->getTaxClassSelectHtmlId($classType),
             'add_button_caption' => __('Add New Tax Class'),
diff --git a/app/code/Magento/Adminhtml/Controller/System/Backup.php b/app/code/Magento/Adminhtml/Controller/System/Backup.php
index 369f527d5d5d4dccace0c5b907cc9f0559f361b6..4a9e2a024655904aa0478823052d1df46a4f07e7 100644
--- a/app/code/Magento/Adminhtml/Controller/System/Backup.php
+++ b/app/code/Magento/Adminhtml/Controller/System/Backup.php
@@ -42,15 +42,23 @@ class Backup extends \Magento\Adminhtml\Controller\Action
      */
     protected $_coreRegistry = null;
 
+    /**
+     * @var \Magento\Backup\Factory
+     */
+    protected $_backupFactory;
+
     /**
      * @param \Magento\Backend\Controller\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
+     * @param \Magento\Backup\Factory $backupFactory
      */
     public function __construct(
         \Magento\Backend\Controller\Context $context,
-        \Magento\Core\Model\Registry $coreRegistry
+        \Magento\Core\Model\Registry $coreRegistry,
+        \Magento\Backup\Factory $backupFactory
     ) {
         $this->_coreRegistry = $coreRegistry;
+        $this->_backupFactory = $backupFactory;
         parent::__construct($context);
     }
 
@@ -111,7 +119,7 @@ class Backup extends \Magento\Adminhtml\Controller\Action
                 $type = \Magento\Backup\Helper\Data::TYPE_SNAPSHOT_WITHOUT_MEDIA;
             }
 
-            $backupManager = \Magento\Backup::getBackupInstance($type)
+            $backupManager = $this->_backupFactory->create($type)
                 ->setBackupExtension($helper->getExtensionByType($type))
                 ->setTime(time())
                 ->setBackupsDir($helper->getBackupsDir());
@@ -231,7 +239,7 @@ class Backup extends \Magento\Adminhtml\Controller\Action
 
             $type = $backup->getType();
 
-            $backupManager = \Magento\Backup::getBackupInstance($type)
+            $backupManager = $this->_backupFactory->create($type)
                 ->setBackupExtension($helper->getExtensionByType($type))
                 ->setTime($backup->getTime())
                 ->setBackupsDir($helper->getBackupsDir())
diff --git a/app/code/Magento/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php b/app/code/Magento/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php
index d6a5c6306f509e992f7998c31771b8f10e1b3d4a..a3a4cb0b83a08404166f2bfc6d02f6039ea5214a 100644
--- a/app/code/Magento/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php
+++ b/app/code/Magento/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php
@@ -76,9 +76,9 @@ class Attribute extends \Magento\Backend\Helper\Data
      * @param \Magento\Core\Model\ConfigInterface $applicationConfig
      * @param \Magento\Core\Model\Config\Primary $primaryConfig
      * @param \Magento\Core\Model\RouterList $routerList
-     * @param \Magento\Core\Model\AppProxy $app
-     * @param \Magento\Backend\Model\UrlProxy $backendUrl
-     * @param \Magento\Backend\Model\AuthProxy $auth
+     * @param \Magento\Core\Model\App $app
+     * @param \Magento\Backend\Model\Url $backendUrl
+     * @param \Magento\Backend\Model\Auth $auth
      * @param string $defaultAreaFrontName
      * @param string $backendFrontName
      */
@@ -91,9 +91,9 @@ class Attribute extends \Magento\Backend\Helper\Data
         \Magento\Core\Model\ConfigInterface $applicationConfig,
         \Magento\Core\Model\Config\Primary $primaryConfig,
         \Magento\Core\Model\RouterList $routerList,
-        \Magento\Core\Model\AppProxy $app,
-        \Magento\Backend\Model\UrlProxy $backendUrl,
-        \Magento\Backend\Model\AuthProxy $auth,
+        \Magento\Core\Model\App $app,
+        \Magento\Backend\Model\Url $backendUrl,
+        \Magento\Backend\Model\Auth $auth,
         $defaultAreaFrontName,
         $backendFrontName
     ) {
diff --git a/app/code/Magento/Adminhtml/Model/Giftmessage/Save.php b/app/code/Magento/Adminhtml/Model/Giftmessage/Save.php
index 9c66bee94d13722d19c568aa8a32e6735173f1cb..22a9bfe8aa9bcb4c106bdcc0d5b6625831821a70 100644
--- a/app/code/Magento/Adminhtml/Model/Giftmessage/Save.php
+++ b/app/code/Magento/Adminhtml/Model/Giftmessage/Save.php
@@ -141,9 +141,6 @@ class Save extends \Magento\Object
                 break;
 
             default:
-                /**
-                 * @todo fix required parameter for `load` method
-                 */
                 $entityModel = $giftmessageModel->getEntityModelByType($entityType)
                     ->load($entityId);
                 break;
@@ -202,7 +199,7 @@ class Save extends \Magento\Object
      */
     public function setAllowQuoteItems($items)
     {
-        $this->_getSession()->setAllowQuoteItemsGiftMessage($items);
+        $this->_session->setAllowQuoteItemsGiftMessage($items);
         return $this;
     }
 
@@ -230,11 +227,11 @@ class Save extends \Magento\Object
      */
     public function getAllowQuoteItems()
     {
-        if (!is_array($this->_getSession()->getAllowQuoteItemsGiftMessage())) {
+        if (!is_array($this->_session->getAllowQuoteItemsGiftMessage())) {
             $this->setAllowQuoteItems(array());
         }
 
-        return $this->_getSession()->getAllowQuoteItemsGiftMessage();
+        return $this->_session->getAllowQuoteItemsGiftMessage();
     }
 
     /**
@@ -297,7 +294,7 @@ class Save extends \Magento\Object
         $deleteAllowedItems = array();
         foreach ($products as $productId=>$data) {
             $product = $this->_productFactory->create()
-                ->setStore($this->_getSession()->getStore())
+                ->setStore($this->_session->getStore())
                 ->load($productId);
             $item = $this->_getQuote()->getItemByProduct($product);
 
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_block.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_block.xml
index 78f2e2ad0233550002f64433767cbb22ffd5501a..09bb5eb8c1574bc94cfb2e0f387a9459f6a5d592 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_block.xml
+++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_block.xml
@@ -106,9 +106,7 @@
                         <argument name="actions" xsi:type="array">
                             <item name="rollback_action" xsi:type="array">
                                 <item name="caption" xsi:type="string" translate="true">Rollback</item>
-                                <item name="url" xsi:type="array">
-                                    <item name="base" xsi:type="string">#</item>
-                                </item>
+                                <item name="href" xsi:type="string">#</item>
                                 <item name="onclick" xsi:type="string">return backup.rollback('$type', '$time')</item>
                             </item>
                         </argument>
diff --git a/app/code/Magento/Authorizenet/etc/module.xml b/app/code/Magento/Authorizenet/etc/module.xml
index 1b4c255aceb40fb6a14c14fcfff48793c034ef43..2258e1dbfd3818efd3d9f77f57f6da811c92f94f 100755
--- a/app/code/Magento/Authorizenet/etc/module.xml
+++ b/app/code/Magento/Authorizenet/etc/module.xml
@@ -38,6 +38,7 @@
             <module name="Magento_Backend"/>
             <module name="Magento_Core"/>
             <module name="Magento_Payment"/>
+            <module name="Magento_Page"/>
             <module name="Magento_Centinel"/>
         </depends>
     </module>
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio.php
index 14ec531fddbe4128da9acd2b634a49bd69d3aa60..f75ecedd4246ed6adda5d88bacc27b49ad9634a1 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio.php
@@ -63,7 +63,7 @@ class Radio
      *
      * @return array
      */
-    protected function _getSimpleValue()
+    protected function _getValues()
     {
         $values = $this->getColumn()->getValues();
         return $this->_converter->toFlatArray($values);
@@ -89,7 +89,7 @@ class Radio
      */
     public function render(\Magento\Object $row)
     {
-        $values = $this->_getSimpleValue();
+        $values = $this->_getValues();
         $value  = $row->getData($this->getColumn()->getIndex());
         if (is_array($values)) {
             $checked = in_array($value, $values) ? ' checked="checked"' : '';
diff --git a/app/code/Magento/Backend/Helper/Data.php b/app/code/Magento/Backend/Helper/Data.php
index 345f4ec5840bc8c8b26b67d9d9abff8ec48abd15..49c592ab83ac990d112becb61217a588b8d13efc 100644
--- a/app/code/Magento/Backend/Helper/Data.php
+++ b/app/code/Magento/Backend/Helper/Data.php
@@ -75,17 +75,17 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     protected $_coreData = null;
 
     /**
-     * @var \Magento\Core\Model\AppProxy
+     * @var \Magento\Core\Model\App
      */
     protected $_app;
 
     /**
-     * @var \Magento\Backend\Model\UrlProxy
+     * @var \Magento\Backend\Model\Url
      */
     protected $_backendUrl;
 
     /**
-     * @var \Magento\Backend\Model\AuthProxy
+     * @var \Magento\Backend\Model\Auth
      */
     protected $_auth;
 
@@ -102,9 +102,9 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      * @param \Magento\Core\Model\ConfigInterface $applicationConfig
      * @param \Magento\Core\Model\Config\Primary $primaryConfig
      * @param \Magento\Core\Model\RouterList $routerList
-     * @param \Magento\Core\Model\AppProxy $app
-     * @param \Magento\Backend\Model\UrlProxy $backendUrl
-     * @param \Magento\Backend\Model\AuthProxy $auth
+     * @param \Magento\Core\Model\App $app
+     * @param \Magento\Backend\Model\Url $backendUrl
+     * @param \Magento\Backend\Model\Auth $auth
      * @param string $defaultAreaFrontName
      * @param string $backendFrontName
      *
@@ -116,9 +116,9 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         \Magento\Core\Model\ConfigInterface $applicationConfig,
         \Magento\Core\Model\Config\Primary $primaryConfig,
         \Magento\Core\Model\RouterList $routerList,
-        \Magento\Core\Model\AppProxy $app,
-        \Magento\Backend\Model\UrlProxy $backendUrl,
-        \Magento\Backend\Model\AuthProxy $auth,
+        \Magento\Core\Model\App $app,
+        \Magento\Backend\Model\Url $backendUrl,
+        \Magento\Backend\Model\Auth $auth,
         $defaultAreaFrontName,
         $backendFrontName
     ) {
diff --git a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php
index 7aa0643b32304049279738d0f15ad4643e408d5f..0b3ff65473d0080251a71f1dfd108b7ed695d9cd 100644
--- a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php
+++ b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php
@@ -102,16 +102,6 @@ class Encrypted
         }
     }
 
-    /**
-     * Get & decrypt old value from configuration
-     *
-     * @return string
-     */
-    public function getOldValue()
-    {
-        return $this->_coreData->decrypt(parent::getOldValue());
-    }
-
     /**
      * Process config value
      *
diff --git a/app/code/Magento/Backend/Model/Config/Source/Storage/Media/Database.php b/app/code/Magento/Backend/Model/Config/Source/Storage/Media/Database.php
index e1eb8bfd9e60f098c8b6b44c14385fa0f063d623..811b888c7c2cee4164088b7e7ac73dc8deeefbea 100644
--- a/app/code/Magento/Backend/Model/Config/Source/Storage/Media/Database.php
+++ b/app/code/Magento/Backend/Model/Config/Source/Storage/Media/Database.php
@@ -32,18 +32,18 @@ namespace Magento\Backend\Model\Config\Source\Storage\Media;
 class Database implements \Magento\Core\Model\Option\ArrayInterface
 {
     /**
-     * @var \Magento\Core\Model\ConfigInterface
+     * @var \Magento\Core\Model\Config\Local
      */
     protected $_config;
 
     /**
-     * @param \Magento\Core\Model\ConfigInterface $config
+     * @param \Magento\Core\Model\Config\Local
      */
-    public function __construct(\Magento\Core\Model\ConfigInterface $config)
+    public function __construct(\Magento\Core\Model\Config\Local $config)
     {
         $this->_config = $config;
     }
-    
+
     /**
      * Options getter
      *
diff --git a/app/code/Magento/Backend/Model/Url.php b/app/code/Magento/Backend/Model/Url.php
index f4a38f7b98c4343658ac1393688990e519ed6059..418429b123fb0eda0db80f2dd3ea8569d6bab16f 100644
--- a/app/code/Magento/Backend/Model/Url.php
+++ b/app/code/Magento/Backend/Model/Url.php
@@ -92,7 +92,7 @@ class Url extends \Magento\Core\Model\Url
      * @param \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Backend\Helper\Data $backendHelper
-     * @param \Magento\Core\Model\Session $coreSession
+     * @param \Magento\Core\Model\SessionProxy $coreSession
      * @param \Magento\Backend\Model\Menu\Config $menuConfig
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\App $app
@@ -107,7 +107,7 @@ class Url extends \Magento\Core\Model\Url
         \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Backend\Helper\Data $backendHelper,
-        \Magento\Core\Model\Session $coreSession,
+        \Magento\Core\Model\SessionProxy $coreSession,
         \Magento\Backend\Model\Menu\Config $menuConfig,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\App $app,
diff --git a/app/code/Magento/Backend/Model/Widget/Grid/Row/UrlGenerator.php b/app/code/Magento/Backend/Model/Widget/Grid/Row/UrlGenerator.php
index 237bf8cb0f70d72f15c0bd24557efa92cbc71471..bfdd5717455b6f09e7d68c5e63ed1944c9e8b385 100644
--- a/app/code/Magento/Backend/Model/Widget/Grid/Row/UrlGenerator.php
+++ b/app/code/Magento/Backend/Model/Widget/Grid/Row/UrlGenerator.php
@@ -29,8 +29,7 @@
  */
 namespace Magento\Backend\Model\Widget\Grid\Row;
 
-class UrlGenerator
-    implements \Magento\Backend\Model\Widget\Grid\Row\GeneratorInterface
+class UrlGenerator implements \Magento\Backend\Model\Widget\Grid\Row\GeneratorInterface
 {
     /**
      * @var \Magento\Backend\Model\Url
@@ -53,11 +52,11 @@ class UrlGenerator
     protected $_extraParamsTemplate = array();
 
     /**
-     * @param \Magento\Backend\Model\UrlProxy $backendUrl
+     * @param \Magento\Backend\Model\Url $backendUrl
      * @param array $args
      * @throws \InvalidArgumentException
      */
-    public function __construct(\Magento\Backend\Model\UrlProxy $backendUrl, array $args = array())
+    public function __construct(\Magento\Backend\Model\Url $backendUrl, array $args = array())
     {
         if (!isset($args['path'])) {
             throw new \InvalidArgumentException('Not all required parameters passed');
diff --git a/app/code/Magento/Backend/etc/di.xml b/app/code/Magento/Backend/etc/di.xml
index b205bd558e609ccb472d5a6dd7f7bdf3b0dbb650..8dce71cd371e70c2a6e420b5239d7b8f9eb4bdfc 100644
--- a/app/code/Magento/Backend/etc/di.xml
+++ b/app/code/Magento/Backend/etc/di.xml
@@ -66,7 +66,6 @@
             </value>
         </param>
     </type>
-
     <type name="Magento\Backend\Helper\Data">
         <param name="defaultAreaFrontName">
             <value>backend</value>
@@ -74,6 +73,15 @@
         <param name="backendFrontName">
             <value type="argument">Magento\Backend\Helper\Data::PARAM_BACKEND_FRONT_NAME</value>
         </param>
+        <param name="app">
+            <instance type="Magento\Core\Model\App\Proxy" />
+        </param>
+        <param name="backendUrl">
+            <instance type="Magento\Backend\Model\Url\Proxy" />
+        </param>
+        <param name="auth">
+            <instance type="Magento\Backend\Model\Auth\Proxy" />
+        </param>
     </type>
     <type name="Magento\Core\Model\NoRouteHandlerList">
         <param name="handlerClassesList">
@@ -85,4 +93,9 @@
             </value>
         </param>
     </type>
+    <type name="Magento\Backend\Model\Widget\Grid\Row\UrlGenerator">
+        <param name="backendUrl">
+            <instance type="Magento\Backend\Model\Url\Proxy" />
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Backend/etc/module.xml b/app/code/Magento/Backend/etc/module.xml
index 844e040ac752117bf1b4e472474659cd0759da51..aef7d360109c2a553d46b2060d9fdb8a8e6ec489 100755
--- a/app/code/Magento/Backend/etc/module.xml
+++ b/app/code/Magento/Backend/etc/module.xml
@@ -36,7 +36,7 @@
             <module name="Magento_AdminNotification"/>
             <module name="Magento_Cron"/>
             <module name="Magento_Sendfriend"/>
-            <module name="Magento_Page" type="soft"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Backup/Model/Backup.php b/app/code/Magento/Backup/Model/Backup.php
index e88e26f1b34d5d064b387843b69ac1ed44e7f2a3..cb54b4202543f8d40b1594a9f158240a2800ddc7 100644
--- a/app/code/Magento/Backup/Model/Backup.php
+++ b/app/code/Magento/Backup/Model/Backup.php
@@ -34,7 +34,7 @@
  */
 namespace Magento\Backup\Model;
 
-class Backup extends \Magento\Object
+class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterface
 {
     /* internal constants */
     const COMPRESS_RATE     = 9;
@@ -111,6 +111,43 @@ class Backup extends \Magento\Object
         $this->_backendAuthSession = $authSession;
     }
 
+    /**
+     * Set backup time
+     *
+     * @param int $time
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function setTime($time)
+    {
+        $this->setData('time', $time);
+        return $this;
+    }
+
+    /**
+     * Set backup path
+     *
+     * @param string $path
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function setPath($path)
+    {
+        $this->setData('path', $path);
+        return $this;
+    }
+
+    /**
+     * Set backup name
+     *
+     * @param string $name
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function setName($name)
+    {
+        $this->setData('name', $name);
+        return $this;
+    }
+
+
     /**
      * Load backup file info
      *
diff --git a/app/code/Magento/Backup/Model/Db.php b/app/code/Magento/Backup/Model/Db.php
index 459fe40340d8f7ac08caf7b8cc537bfd7ce0da8c..1c5a9ac85f744f795f4e4571e3f74b4f320274d5 100644
--- a/app/code/Magento/Backup/Model/Db.php
+++ b/app/code/Magento/Backup/Model/Db.php
@@ -34,7 +34,7 @@
  */
 namespace Magento\Backup\Model;
 
-class Db
+class Db implements \Magento\Backup\Db\BackupDbInterface
 {
 
     /**
@@ -130,10 +130,10 @@ class Db
     /**
      * Create backup and stream write to adapter
      *
-     * @param \Magento\Backup\Model\Backup $backup
+     * @param \Magento\Backup\Db\BackupInterface $backup
      * @return \Magento\Backup\Model\Db
      */
-    public function createBackup(\Magento\Backup\Model\Backup $backup)
+    public function createBackup(\Magento\Backup\Db\BackupInterface $backup)
     {
         $backup->open(true);
 
diff --git a/app/code/Magento/Backup/Model/Observer.php b/app/code/Magento/Backup/Model/Observer.php
index 8d8f3105618aaec7597f5f43cd7ef2c32dc0f4a2..cb865b6d935137fe287b1f12a8b7af38a1fc1f8b 100644
--- a/app/code/Magento/Backup/Model/Observer.php
+++ b/app/code/Magento/Backup/Model/Observer.php
@@ -80,26 +80,32 @@ class Observer
     protected $_dir;
 
     /**
-     * Construct
-     * 
+     * @var \Magento\Backup\Factory
+     */
+    protected $_backupFactory;
+
+    /**
      * @param \Magento\Backup\Helper\Data $backupData
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Core\Model\Logger $logger
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\Dir $dir
+     * @param \Magento\Backup\Factory $backupFactory
      */
     public function __construct(
         \Magento\Backup\Helper\Data $backupData,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Core\Model\Logger $logger,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Model\Dir $dir
+        \Magento\Core\Model\Dir $dir,
+        \Magento\Backup\Factory $backupFactory
     ) {
         $this->_backupData = $backupData;
         $this->_coreRegistry = $coreRegistry;
         $this->_logger = $logger;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_dir = $dir;
+        $this->_backupFactory = $backupFactory;
     }
 
     /**
@@ -121,7 +127,7 @@ class Observer
 
         $this->_errors = array();
         try {
-            $backupManager = \Magento\Backup::getBackupInstance($type)
+            $backupManager = $this->_backupFactory->create($type)
                 ->setBackupExtension($this->_backupData->getExtensionByType($type))
                 ->setTime(time())
                 ->setBackupsDir($this->_backupData->getBackupsDir());
diff --git a/app/code/Magento/Backup/Model/Resource/Db.php b/app/code/Magento/Backup/Model/Resource/Db.php
index 28a3c35089e092173132e5c97f7da5030ffb59fd..86129fda31866373cfcacb07a81762044b060d0d 100644
--- a/app/code/Magento/Backup/Model/Resource/Db.php
+++ b/app/code/Magento/Backup/Model/Resource/Db.php
@@ -47,7 +47,7 @@ class Db
     /**
      * Backup resource helper
      *
-     * @var \Magento\Backup\Model\Resource\HelperFactory
+     * @var \Magento\Backup\Model\Resource\Helper
      */
     protected $_resourceHelper;
 
@@ -257,7 +257,7 @@ class Db
      */
     public function beginTransaction()
     {
-        $this->_resourceHelper->turnOnSerializableMode();
+        $this->_resourceHelper->prepareTransactionIsolationLevel();
         $this->_write->beginTransaction();
         return $this;
     }
@@ -270,7 +270,7 @@ class Db
     public function commitTransaction()
     {
         $this->_write->commit();
-        $this->_resourceHelper->turnOnReadCommittedMode();
+        $this->_resourceHelper->restoreTransactionIsolationLevel();
         return $this;
     }
 
@@ -282,6 +282,7 @@ class Db
     public function rollBackTransaction()
     {
         $this->_write->rollBack();
+        $this->_resourceHelper->restoreTransactionIsolationLevel();
         return $this;
     }
 
diff --git a/app/code/Magento/Backup/Model/Resource/Helper.php b/app/code/Magento/Backup/Model/Resource/Helper.php
index 82d4a6f4f502aba97dcb2848ea8dad3089a30a38..edf243edd901078ed36a609a46e480dba6ee7b6f 100644
--- a/app/code/Magento/Backup/Model/Resource/Helper.php
+++ b/app/code/Magento/Backup/Model/Resource/Helper.php
@@ -330,18 +330,18 @@ class Helper extends \Magento\Core\Model\Resource\Helper
     }
 
     /**
-     * Turn on serializable mode
+     * Prepare transaction isolation level for backup process
      */
-    public function turnOnSerializableMode()
+    public function prepareTransactionIsolationLevel()
     {
-        $this->_getReadAdapter()->query("SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE");
+        $this->_getWriteAdapter()->query('SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE');
     }
 
     /**
-     * Turn on read committed mode
+     * Restore transaction isolation level after backup
      */
-    public function turnOnReadCommittedMode()
+    public function restoreTransactionIsolationLevel()
     {
-        $this->_getReadAdapter()->query("SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED");
+        $this->_getWriteAdapter()->query('SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ');
     }
 }
diff --git a/app/code/Magento/Backup/etc/di.xml b/app/code/Magento/Backup/etc/di.xml
new file mode 100644
index 0000000000000000000000000000000000000000..559ece9be751584ec2aa6767035cedfe6b0810f6
--- /dev/null
+++ b/app/code/Magento/Backup/etc/di.xml
@@ -0,0 +1,35 @@
+<?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.
+ *
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<config>
+    <type name="Magento\Backup\Db\BackupFactory">
+        <param name="backupInstanceName">
+            <value>\Magento\Backup\Model\Backup</value>
+        </param>
+        <param name="backupDbInstanceName">
+            <value>\Magento\Backup\Model\Db</value>
+        </param>
+    </type>
+</config>
\ No newline at end of file
diff --git a/app/code/Magento/Bundle/etc/module.xml b/app/code/Magento/Bundle/etc/module.xml
index dce9ef270fe9c0a6ee2975e94b0a90708d9ffa69..47d84bbd3e20dd503c0f12c8b9416f7155b75b10 100755
--- a/app/code/Magento/Bundle/etc/module.xml
+++ b/app/code/Magento/Bundle/etc/module.xml
@@ -42,6 +42,7 @@
             <module name="Magento_Eav"/>
             <module name="Magento_Weee"/>
             <module name="Magento_GiftMessage"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Captcha/etc/module.xml b/app/code/Magento/Captcha/etc/module.xml
index add1716478c39493ddb09f31183e9c1cec5b0a89..1e83a3261deacf7f860ff7e88513bcb8b73de856 100755
--- a/app/code/Magento/Captcha/etc/module.xml
+++ b/app/code/Magento/Captcha/etc/module.xml
@@ -36,6 +36,7 @@
             <module name="Magento_Adminhtml"/>
             <module name="Magento_Core"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Captcha/view/frontend/onepage.js b/app/code/Magento/Captcha/view/frontend/onepage.js
index 885de30031cfadb9232a92658e684215e1b46194..a771c1e248da9c270f7a58147feec219cece1e76 100644
--- a/app/code/Magento/Captcha/view/frontend/onepage.js
+++ b/app/code/Magento/Captcha/view/frontend/onepage.js
@@ -27,8 +27,9 @@
     "use strict";
     $(document).on("login",function() {
         $("[data-captcha='guest_checkout'], [data-captcha='register_during_checkout']").hide();
+        $("[role='guest_checkout'], [role='register_during_checkout']").hide();
         var type = ($("#login\\:guest").is(':checked')) ? 'guest_checkout' : 'register_during_checkout';
-        $("[role='" + type + "']").show();
+        $("[role='" + type + "'], [data-captcha='" + type + "']").show();
     }).on('billingSave', function() {
             $(".captcha-reload:visible").trigger("click");
         });
diff --git a/app/code/Magento/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php b/app/code/Magento/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php
index 5d7dc2b865513e84dad1266c63837f62f16da020..c2dbc46494e8439e2e5e4237ac7bb267d13fe5ad 100644
--- a/app/code/Magento/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php
+++ b/app/code/Magento/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php
@@ -131,7 +131,7 @@ class ColumnSet
         $result = array();
         foreach ($sourceModel->getAllOptions() as $option) {
             if ($option['value'] != '') {
-                $result[$option['value']] = $option['label'];
+                $result[] = $option;
             }
         }
         return $result;
diff --git a/app/code/Magento/Catalog/Helper/Data.php b/app/code/Magento/Catalog/Helper/Data.php
index 349369950b2f6f623105eb9f21ded41a6fc0773e..ecadc54f73e5b87642b99127cbed16e5ce35aeda 100644
--- a/app/code/Magento/Catalog/Helper/Data.php
+++ b/app/code/Magento/Catalog/Helper/Data.php
@@ -485,8 +485,8 @@ class Data extends \Magento\Core\Helper\AbstractHelper
 
         if (is_numeric($product)) {
             /** @var \Magento\Catalog\Model\Product $product */
-            $product = $this->_productFactory->create();
-            $product->setStoreId($this->_storeManager->getStore()->getId())
+            $product = $this->_productFactory->create()
+                ->setStoreId($this->_storeManager->getStore()->getId())
                 ->load($product);
         }
 
diff --git a/app/code/Magento/Catalog/view/frontend/js/price-option.js b/app/code/Magento/Catalog/view/frontend/js/price-option.js
index 96d1045061ff8cc81049b4ab584c97a4dcfec4aa..2fb28b821774f47bcfd3f277c42e21faf79f5435 100644
--- a/app/code/Magento/Catalog/view/frontend/js/price-option.js
+++ b/app/code/Magento/Catalog/view/frontend/js/price-option.js
@@ -31,7 +31,8 @@
             productCustomSelector: '.product-custom-option',
             mapPopupPrice: '#map-popup-price',
             prices: {},
-            priceTemplate: '<span class="price">${formattedPrice}</span>'
+            priceTemplate: '<span class="price">${formattedPrice}</span>',
+            controlContainer: 'dd'
         },
         _create: function() {
 
@@ -167,7 +168,9 @@
                                     configOptions.includeTax, configOptions.oldPrice);
                             }
                         } else if (element.is(":file")) {
-                            if (element.val() || element.parent('div').siblings().length > 0) {
+                            var controlContainer = element.closest(this.options.controlContainer);
+
+                            if (element.val() || controlContainer.find('[id*="change-"]').length > 0) {
                                 optionPrice.update(configOptions.price, configOptions.excludeTax,
                                     configOptions.includeTax, configOptions.oldPrice);
                             }
diff --git a/app/code/Magento/CatalogInventory/etc/product_types.xml b/app/code/Magento/CatalogInventory/etc/product_types.xml
index eec6f1811f7284b41d63aacc841723a33dfcb9ee..b49825cf0bfdcd538b7b689cfb9262e9ea912c8f 100644
--- a/app/code/Magento/CatalogInventory/etc/product_types.xml
+++ b/app/code/Magento/CatalogInventory/etc/product_types.xml
@@ -26,10 +26,10 @@
 <config>
     <type name="simple" isQty="true" />
     <type name="virtual" isQty="true" />
-    <type name="configurable" isQty="true">
+    <type name="configurable">
         <stockIndexerModel instance="Magento\CatalogInventory\Model\Resource\Indexer\Stock\Configurable" />
     </type>
-    <type name="grouped" isQty="true">
+    <type name="grouped">
         <stockIndexerModel instance="Magento\CatalogInventory\Model\Resource\Indexer\Stock\Grouped" />
     </type>
 </config>
diff --git a/app/code/Magento/CatalogSearch/Controller/Advanced.php b/app/code/Magento/CatalogSearch/Controller/Advanced.php
index 1c903503e97ec467b16955b959f2e2b80ca6e4e9..2885540a810dec832b914226d4e1d179885afbe9 100644
--- a/app/code/Magento/CatalogSearch/Controller/Advanced.php
+++ b/app/code/Magento/CatalogSearch/Controller/Advanced.php
@@ -53,7 +53,7 @@ class Advanced extends \Magento\Core\Controller\Front\Action
     /**
      * Catalog search session
      *
-     * @var \Magento\CatalogSearch\Model\Session
+     * @var \Magento\Core\Model\Session\Generic
      */
     protected $_catalogSearchSession;
 
@@ -61,13 +61,13 @@ class Advanced extends \Magento\Core\Controller\Front\Action
      * Construct
      *
      * @param \Magento\Core\Controller\Varien\Action\Context $context
-     * @param \Magento\CatalogSearch\Model\Session $catalogSearchSession
+     * @param \Magento\Core\Model\Session\Generic $catalogSearchSession
      * @param \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced
      * @param \Magento\Core\Model\UrlFactory $urlFactory
      */
     public function __construct(
         \Magento\Core\Controller\Varien\Action\Context $context,
-        \Magento\CatalogSearch\Model\Session $catalogSearchSession,
+        \Magento\Core\Model\Session\Generic $catalogSearchSession,
         \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced,
         \Magento\Core\Model\UrlFactory $urlFactory
     ) {
diff --git a/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php b/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php
index 5e4b85f94cd2611e1265112590fc535d6ae85a46..c029880c65d6bd65e1eaf84ab10d7ac67fecaa1d 100644
--- a/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php
+++ b/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php
@@ -56,13 +56,13 @@ class Type extends \Magento\Core\Model\Config\Value
      * @param array $data
      */
     public function __construct(
+        \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
-        \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext,
         array $data = array()
     ) {
         $this->_catalogSearchFulltext = $catalogSearchFulltext;
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
index 2b3ca31854a49adbd5ce19968cf302ad6987f094..715a44feda9dbf4b07d95caf1bea31f2ba581f01 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
@@ -71,13 +71,6 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected $_productEmulators         = array();
 
-    /**
-     * Store search engine instance
-     *
-     * @var \Magento\CatalogSearch\Model\Resource\EngineInterface
-     */
-    protected $_engine;
-
     /**
      * @var \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory
      */
@@ -146,6 +139,11 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected $_resourceHelper;
 
+    /**
+     * @var \Magento\CatalogSearch\Model\Resource\EngineProvider
+     */
+    protected $_engineProvider;
+
     /**
      * Construct
      *
@@ -180,13 +178,13 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
         $this->_eavConfig = $eavConfig;
         $this->_catalogProductStatus = $catalogProductStatus;
         $this->_productAttributeCollFactory = $productAttributeCollFactory;
-        $this->_engine = $engineProvider->get();
         $this->_eventManager = $eventManager;
         $this->_coreString = $coreString;
         $this->_catalogSearchData = $catalogSearchData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_storeManager = $storeManager;
         $this->_resourceHelper = $resourceHelper;
+        $this->_engineProvider = $engineProvider;
         parent::__construct($resource);
     }
 
@@ -258,7 +256,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
         $visibility     = $this->_getSearchableAttribute('visibility');
         $status         = $this->_getSearchableAttribute('status');
         $statusVals     = $this->_catalogProductStatus->getVisibleStatusIds();
-        $allowedVisibility = $this->_engine->getAllowedVisibility();
+        $allowedVisibility = $this->_engineProvider->get()->getAllowedVisibility();
 
         $lastProductId = 0;
         while (true) {
@@ -442,8 +440,8 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function cleanIndex($storeId = null, $productId = null)
     {
-        if ($this->_engine) {
-            $this->_engine->cleanIndex($storeId, $productId);
+        if ($this->_engineProvider->get()) {
+            $this->_engineProvider->get()->cleanIndex($storeId, $productId);
         }
 
         return $this;
@@ -545,7 +543,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
 
             $productAttributes = $this->_productAttributeCollFactory->create();
 
-            if ($this->_engine && $this->_engine->allowAdvancedIndex()) {
+            if ($this->_engineProvider->get() && $this->_engineProvider->get()->allowAdvancedIndex()) {
                 $productAttributes->addToIndexFilter(true);
             } else {
                 $productAttributes->addSearchableAttributeFilter();
@@ -553,7 +551,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
             $attributes = $productAttributes->getItems();
 
             $this->_eventManager->dispatch('catelogsearch_searchable_attributes_load_after', array(
-                'engine' => $this->_engine,
+                'engine' => $this->_engineProvider->get(),
                 'attributes' => $attributes
             ));
 
@@ -778,7 +776,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
             }
         }
 
-        if (!$this->_engine->allowAdvancedIndex()) {
+        if (!$this->_engineProvider->get()->allowAdvancedIndex()) {
             $product = $this->_getProductEmulator($productData['type_id'])
                 ->setId($productData['entity_id'])
                 ->setStoreId($storeId);
@@ -793,8 +791,8 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
             $index['in_stock'] = $productData['in_stock'];
         }
 
-        if ($this->_engine) {
-            return $this->_engine->prepareEntityIndex($index, $this->_separator);
+        if ($this->_engineProvider->get()) {
+            return $this->_engineProvider->get()->prepareEntityIndex($index, $this->_separator);
         }
 
         return $this->_catalogSearchData->prepareIndexdata($index, $this->_separator);
@@ -812,7 +810,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
     {
         $attribute = $this->_getSearchableAttribute($attributeId);
         if (!$attribute->getIsSearchable()) {
-            if ($this->_engine->allowAdvancedIndex()) {
+            if ($this->_engineProvider->get()->allowAdvancedIndex()) {
                 if ($attribute->getAttributeCode() == 'visibility') {
                     return $value;
                 } elseif (!($attribute->getIsVisibleInAdvancedSearch()
@@ -828,7 +826,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
         }
 
         if ($attribute->usesSource()) {
-            if ($this->_engine->allowAdvancedIndex()) {
+            if ($this->_engineProvider->get()->allowAdvancedIndex()) {
                 return $value;
             }
 
@@ -867,8 +865,8 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected function _saveProductIndex($productId, $storeId, $index)
     {
-        if ($this->_engine) {
-            $this->_engine->saveEntityIndex($productId, $storeId, $index);
+        if ($this->_engineProvider->get()) {
+            $this->_engineProvider->get()->saveEntityIndex($productId, $storeId, $index);
         }
 
         return $this;
@@ -883,8 +881,8 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected function _saveProductIndexes($storeId, $productIndexes)
     {
-        if ($this->_engine) {
-            $this->_engine->saveEntityIndexes($storeId, $productIndexes);
+        if ($this->_engineProvider->get()) {
+            $this->_engineProvider->get()->saveEntityIndexes($storeId, $productIndexes);
         }
 
         return $this;
@@ -900,8 +898,12 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected function _getStoreDate($storeId, $date = null)
     {
         if (!isset($this->_dates[$storeId])) {
-            $timezone = $this->_coreStoreConfig->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_TIMEZONE, $storeId);
-            $locale   = $this->_coreStoreConfig->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_LOCALE, $storeId);
+            $timezone = $this->_coreStoreConfig->getConfig(
+                \Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_TIMEZONE, $storeId
+            );
+            $locale   = $this->_coreStoreConfig->getConfig(
+                \Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_LOCALE, $storeId
+            );
             $locale   = new \Zend_Locale($locale);
 
             $dateObj = new \Zend_Date(null, null, $locale);
diff --git a/app/code/Magento/CatalogSearch/etc/module.xml b/app/code/Magento/CatalogSearch/etc/module.xml
index bd6e7aff447885bd468cc051e8a1b596421e05dc..d34272a458721ba8123dc3b69ac26651cbfd6af7 100755
--- a/app/code/Magento/CatalogSearch/etc/module.xml
+++ b/app/code/Magento/CatalogSearch/etc/module.xml
@@ -37,7 +37,8 @@
             <module name="Magento_Index"/>
             <module name="Magento_Eav"/>
             <module name="Magento_Backend"/>
-            <module name="Magento_Page" type="soft"/>
+            <module name="Magento_Adminhtml"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Centinel/etc/module.xml b/app/code/Magento/Centinel/etc/module.xml
index 8fc99843afb2edf7ae9edb351dc4a09dc9725f02..191c9d3f22bdd88ad7f27d400f13d1cf6cffc81d 100755
--- a/app/code/Magento/Centinel/etc/module.xml
+++ b/app/code/Magento/Centinel/etc/module.xml
@@ -34,6 +34,7 @@
             <module name="Magento_Core"/>
             <module name="Magento_Adminhtml"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Checkout/Helper/Data.php b/app/code/Magento/Checkout/Helper/Data.php
index c17e2d07cc06447e35d31ed08edeb493ece6a5fc..25f70cec378f9facf08be96a53920a84b84b4ccb 100644
--- a/app/code/Magento/Checkout/Helper/Data.php
+++ b/app/code/Magento/Checkout/Helper/Data.php
@@ -295,7 +295,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
                 );
         }
 
-        $translate->setTranslateInline(true);
+        $this->_translator->setTranslateInline(true);
 
         return $this;
     }
diff --git a/app/code/Magento/Checkout/view/frontend/cart/crosssell.phtml b/app/code/Magento/Checkout/view/frontend/cart/crosssell.phtml
index 4ffda5ac21c48aa903e173d7a72ad6a58e91fb08..18ca99909fb98eaf4ca024e14d2954805f476fd8 100644
--- a/app/code/Magento/Checkout/view/frontend/cart/crosssell.phtml
+++ b/app/code/Magento/Checkout/view/frontend/cart/crosssell.phtml
@@ -41,7 +41,7 @@
             <div class="product-details">
                 <h3 class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->escapeHtml($_item->getName()) ?></a></h3>
                 <?php echo $this->getPriceHtml($_item, true) ?>
-                <button type="button" title="<?php echo __('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo __('Add to Cart') ?></span></span></button>
+                <button type="button" title="<?php echo __('Add to Cart') ?>" class="button btn-cart" onclick="window.location.href='<?php echo $this->getAddToCartUrl($_item) ?>'"><span><span><?php echo __('Add to Cart') ?></span></span></button>
                 <ul class="add-to-links" data-role="add-to-links">
                     <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
                         <li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist" data-action="add-to-wishlist"><?php echo __('Add to Wish List') ?></a></li>
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml
index f639629172f58975ff2b2882d911c2f144438839..d666ec7ca0aa75422584ac4bf86972a3dd8451b2 100644
--- a/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml
+++ b/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml
@@ -45,6 +45,6 @@
     <?php endif; ?>
     <?php echo $this->getChildHtml() ?>
     <div class="buttons-set">
-        <button type="button" title="<?php echo __('Continue Shopping') ?>" class="button" onclick="setLocation('<?php echo $this->getContinueUrl() ?>')"><span><span><?php echo __('Continue Shopping') ?></span></span></button>
+        <button type="button" title="<?php echo __('Continue Shopping') ?>" class="button" onclick="window.location = '<?php echo $this->getContinueUrl() ?>';"><span><span><?php echo __('Continue Shopping') ?></span></span></button>
     </div>
 </div>
diff --git a/app/code/Magento/Contacts/etc/module.xml b/app/code/Magento/Contacts/etc/module.xml
index 4604f1c853b12ad09d6d5c02796bd9ea1e50a131..4a8b8e7c1c603e08532efea416cff879cf8ce1ab 100755
--- a/app/code/Magento/Contacts/etc/module.xml
+++ b/app/code/Magento/Contacts/etc/module.xml
@@ -33,6 +33,7 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Cms"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Core/Model/AbstractModel.php b/app/code/Magento/Core/Model/AbstractModel.php
index 173069338fb437f1ef73d29a5694dc4219b12931..6674a3be097d4861c26ff422badbcb73ad0c7b0d 100644
--- a/app/code/Magento/Core/Model/AbstractModel.php
+++ b/app/code/Magento/Core/Model/AbstractModel.php
@@ -153,7 +153,8 @@ abstract class AbstractModel extends \Magento\Object
         $this->_resource = $resource;
         $this->_resourceCollection = $resourceCollection;
         $this->_logger = $context->getLogger();
-        if ($this->_resource) {
+
+        if (method_exists($this->_resource, 'getIdFieldName') || $this->_resource instanceof \Magento\Object) {
             $this->_idFieldName = $this->_getResource()->getIdFieldName();
         }
 
diff --git a/app/code/Magento/Core/Model/App.php b/app/code/Magento/Core/Model/App.php
index f3f5de5e4652f46248fa3064a6ddc60afcc008b0..39c028e3389172b78892bb500c0970fdd3aa0c08 100644
--- a/app/code/Magento/Core/Model/App.php
+++ b/app/code/Magento/Core/Model/App.php
@@ -51,7 +51,7 @@ class App implements \Magento\Core\Model\AppInterface
     /**
      * Magento version
      */
-    const VERSION = '2.0.0.0-dev46';
+    const VERSION = '2.0.0.0-dev47';
 
     /**
      * Custom application dirs
@@ -921,7 +921,7 @@ class App implements \Magento\Core\Model\AppInterface
             'revision'  => '0',
             'patch'     => '0',
             'stability' => 'dev',
-            'number'    => '46',
+            'number'    => '47',
         );
     }
 }
diff --git a/app/code/Magento/Core/Model/Config/Data.php b/app/code/Magento/Core/Model/Config/Data.php
index 48badb1d838ba6d32276729b74a8235d6c9a1a07..86949fda0091c2d8ac7c8ed304f1e6415cda482a 100644
--- a/app/code/Magento/Core/Model/Config/Data.php
+++ b/app/code/Magento/Core/Model/Config/Data.php
@@ -34,6 +34,13 @@ class Data implements \Magento\Core\Model\Config\DataInterface
      */
     protected $_data = array();
 
+    /**
+     * Config source data
+     *
+     * @var array
+     */
+    protected $_source = array();
+
     /**
      * @param \Magento\Core\Model\Config\MetadataProcessor $processor
      * @param array $data
@@ -41,6 +48,15 @@ class Data implements \Magento\Core\Model\Config\DataInterface
     public function __construct(\Magento\Core\Model\Config\MetadataProcessor $processor, array $data)
     {
         $this->_data = $processor->process($data);
+        $this->_source = $data;
+    }
+
+    /**
+     * @return array
+     */
+    public function getSource()
+    {
+        return $this->_source;
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Config/Resource.php b/app/code/Magento/Core/Model/Config/Resource.php
index e2bdd97669fb9d9bfed0c63904d62a699b600efb..3cc04e5fe67f188a94012084cb79b7f8f7723638 100644
--- a/app/code/Magento/Core/Model/Config/Resource.php
+++ b/app/code/Magento/Core/Model/Config/Resource.php
@@ -28,8 +28,6 @@ namespace Magento\Core\Model\Config;
 class Resource extends \Magento\Config\Data\Scoped
     implements \Magento\Core\Model\Config\ResourceInterface
 {
-    const DEFAULT_READ_CONNECTION  = 'read';
-    const DEFAULT_WRITE_CONNECTION = 'write';
     const DEFAULT_SETUP_CONNECTION = 'default';
 
     /**
diff --git a/app/code/Magento/Core/Model/Config/Section/Reader/Store.php b/app/code/Magento/Core/Model/Config/Section/Reader/Store.php
index f274c2a6d1c6efdada832ad786097390ff2690fb..c8cb7551283dedd73ac590d2522dfe839456bdf5 100644
--- a/app/code/Magento/Core/Model/Config/Section/Reader/Store.php
+++ b/app/code/Magento/Core/Model/Config/Section/Reader/Store.php
@@ -90,7 +90,7 @@ class Store
         if ($this->_appState->isInstalled()) {
             $store = $this->_storeFactory->create();
             $store->load($code);
-            $websiteConfig = $this->_sectionPool->getSection('website', $store->getWebsite()->getCode())->getValue();
+            $websiteConfig = $this->_sectionPool->getSection('website', $store->getWebsite()->getCode())->getSource();
             $config = array_replace_recursive($websiteConfig, $this->_initialConfig->getStore($code));
 
             $collection = $this->_collectionFactory->create(array('scope' => 'stores', 'scopeId' => $store->getId()));
@@ -100,7 +100,7 @@ class Store
             }
             $config = $this->_converter->convert($dbStoreConfig, $config);
         } else {
-            $websiteConfig = $this->_sectionPool->getSection('website', 'default')->getValue();
+            $websiteConfig = $this->_sectionPool->getSection('website', 'default')->getSource();
             $config = $this->_converter->convert($websiteConfig, $this->_initialConfig->getStore($code));
         }
         return $config;
diff --git a/app/code/Magento/Core/Model/Config/Section/Reader/Website.php b/app/code/Magento/Core/Model/Config/Section/Reader/Website.php
index d79364035c0643602b9c7cc435c3340b107070b6..3680d3387d0efa248d99b920e57401dc2f51f713 100644
--- a/app/code/Magento/Core/Model/Config/Section/Reader/Website.php
+++ b/app/code/Magento/Core/Model/Config/Section/Reader/Website.php
@@ -88,7 +88,7 @@ class Website
     public function read($code)
     {
         $config = array_replace_recursive(
-            $this->_sectionPool->getSection('default')->getValue(), $this->_initialConfig->getWebsite($code)
+            $this->_sectionPool->getSection('default')->getSource(), $this->_initialConfig->getWebsite($code)
         );
 
         if ($this->_appState->isInstalled()) {
diff --git a/app/code/Magento/Core/Model/Db/Updater.php b/app/code/Magento/Core/Model/Db/Updater.php
index 9d057a8f0bd6e0a58ab434c13e7014e56fc4e858..909ae75faea80643f304b0ecd8463bcbc539b320 100644
--- a/app/code/Magento/Core/Model/Db/Updater.php
+++ b/app/code/Magento/Core/Model/Db/Updater.php
@@ -26,13 +26,6 @@ namespace Magento\Core\Model\Db;
 
 class Updater implements \Magento\Core\Model\Db\UpdaterInterface
 {
-    /**
-     * Modules configuration
-     *
-     * @var \Magento\Core\Model\Config
-     */
-    protected $_config;
-
     /**
      * Default setup class name
      *
@@ -86,7 +79,6 @@ class Updater implements \Magento\Core\Model\Db\UpdaterInterface
     protected $_resourceResolver;
 
     /**
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Resource\SetupFactory $factory
      * @param \Magento\Core\Model\App\State $appState
      * @param \Magento\Core\Model\ModuleListInterface $moduleList
@@ -95,7 +87,6 @@ class Updater implements \Magento\Core\Model\Db\UpdaterInterface
      * @param bool $skipModuleUpdate
      */
     public function __construct(
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Resource\SetupFactory $factory,
         \Magento\Core\Model\App\State $appState,
         \Magento\Core\Model\ModuleListInterface $moduleList,
@@ -103,7 +94,6 @@ class Updater implements \Magento\Core\Model\Db\UpdaterInterface
         array $resourceList,
         $skipModuleUpdate = false
     ) {
-        $this->_config = $config;
         $this->_factory = $factory;
         $this->_appState = $appState;
         $this->_moduleList = $moduleList;
diff --git a/app/code/Magento/Core/Model/File/Storage/File.php b/app/code/Magento/Core/Model/File/Storage/File.php
index d88e979c822eff28f6963f72b723bdb9f2fdda48..eea5d0782f4c5223913227d5f68fe5d57e41e47e 100644
--- a/app/code/Magento/Core/Model/File/Storage/File.php
+++ b/app/code/Magento/Core/Model/File/Storage/File.php
@@ -69,9 +69,7 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Core\Model\Date $dateModel
-     * @param \Magento\Core\Model\Resource\AbstractResource|\Magento\Core\Model\Resource\File\Storage\File $resource
-     * @param \Magento\Core\Model\Resource\File\Storage\File $fileResource
+     * @param \Magento\Core\Model\Resource\File\Storage\File $resource
      * @param \Magento\Data\Collection\Db|null $resourceCollection
      * @param array $data
      */
@@ -80,14 +78,11 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Core\Model\Date $dateModel,
-        \Magento\Core\Model\Resource\AbstractResource $resource,
-        \Magento\Core\Model\Resource\File\Storage\File $fileResource,
+        \Magento\Core\Model\Resource\File\Storage\File $resource,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        parent::__construct($coreFileStorageDb, $context, $registry, $dateModel, $resource,
-            $fileResource, $resourceCollection, $data);
+        parent::__construct($coreFileStorageDb, $context, $registry, $resource, $resourceCollection, $data);
         $this->_setResourceModel('Magento\Core\Model\Resource\File\Storage\File');
         $this->_logger = $logger;
     }
diff --git a/app/code/Magento/Core/Model/Layout.php b/app/code/Magento/Core/Model/Layout.php
index d9022ea9433fad43a4c23a29774bac164e236cb9..392352d6a01a68d96a396323061225847cfc2e65 100644
--- a/app/code/Magento/Core/Model/Layout.php
+++ b/app/code/Magento/Core/Model/Layout.php
@@ -949,7 +949,7 @@ class Layout extends \Magento\Simplexml\Config
         unset($options[self::CONTAINER_OPT_LABEL]);
         unset($options['type']);
         $allowedTags = array(
-            'dd', 'div', 'dl', 'fieldset', 'header', 'hgroup', 'ol', 'p', 'section','table', 'tfoot', 'ul'
+            'dd', 'div', 'dl', 'fieldset', 'header', 'footer', 'hgroup', 'ol', 'p', 'section','table', 'tfoot', 'ul'
         );
         if (!empty($options[self::CONTAINER_OPT_HTML_TAG])
             && !in_array($options[self::CONTAINER_OPT_HTML_TAG], $allowedTags)
diff --git a/app/code/Magento/Core/Model/Resource.php b/app/code/Magento/Core/Model/Resource.php
index 843b935495a04cc35ddf960cd2e9e07d87f16719..00484ecb40dcc9e1593ef748efad3c3b064ad3b9 100644
--- a/app/code/Magento/Core/Model/Resource.php
+++ b/app/code/Magento/Core/Model/Resource.php
@@ -181,7 +181,7 @@ class Resource
         if ($tableSuffix) {
             $tableName .= '_' . $tableSuffix;
         }
-        return $this->getConnection(\Magento\Core\Model\Config\Resource::DEFAULT_READ_CONNECTION)
+        return $this->getConnection('core_read')
             ->getTableName($tableName);
     }
 
@@ -237,7 +237,7 @@ class Resource
      */
     public function getIdxName($tableName, $fields, $indexType = \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX)
     {
-        return $this->getConnection(\Magento\Core\Model\Config\Resource::DEFAULT_READ_CONNECTION)
+        return $this->getConnection('core_read')
             ->getIndexName($this->getTableName($tableName), $fields, $indexType);
     }
 
@@ -252,7 +252,7 @@ class Resource
      */
     public function getFkName($priTableName, $priColumnName, $refTableName, $refColumnName)
     {
-        return $this->getConnection(\Magento\Core\Model\Config\Resource::DEFAULT_READ_CONNECTION)
+        return $this->getConnection('core_read')
             ->getForeignKeyName($this->getTableName($priTableName), $priColumnName,
                 $this->getTableName($refTableName), $refColumnName);
     }
diff --git a/app/code/Magento/Core/Model/Resource/File/Storage/File.php b/app/code/Magento/Core/Model/Resource/File/Storage/File.php
index a4407ee988497b5b1a3ba03582745842da90ed51..ee13ca750ad4f06019105240f9ae9f532ba3dc56 100644
--- a/app/code/Magento/Core/Model/Resource/File/Storage/File.php
+++ b/app/code/Magento/Core/Model/Resource/File/Storage/File.php
@@ -34,7 +34,7 @@
  */
 namespace Magento\Core\Model\Resource\File\Storage;
 
-class File
+class File extends \Magento\Core\Model\Resource\AbstractResource
 {
     /**
      * Prefix of model events names
@@ -202,6 +202,30 @@ class File
         return false;
     }
 
+    /**
+     * @inheritDoc
+     */
+    protected function _construct()
+    {
+        return $this;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    protected function _getReadAdapter()
+    {
+        return false;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    protected function _getWriteAdapter()
+    {
+        return false;
+    }
+
     /**
      * Get path relative to media base directory
      *
diff --git a/app/code/Magento/Core/Model/Resource/Setup/Context.php b/app/code/Magento/Core/Model/Resource/Setup/Context.php
index 7b9e43ca2819da657cbc9810c3fcead6b6fac247..c839388a5ffbb47931d9480a89dabf0c944fe9e7 100644
--- a/app/code/Magento/Core/Model/Resource/Setup/Context.php
+++ b/app/code/Magento/Core/Model/Resource/Setup/Context.php
@@ -23,7 +23,7 @@
  */
 namespace Magento\Core\Model\Resource\Setup;
 
-class Context
+class Context implements \Magento\ObjectManager\ContextInterface
 {
     /**
      * @var \Magento\Core\Model\Logger
diff --git a/app/code/Magento/Core/Model/Resource/Setup/Migration.php b/app/code/Magento/Core/Model/Resource/Setup/Migration.php
index ef8810a8a22087f6b6a6732a0e5ad68f8995b514..5da16eb9e80deb7c045c44e38218ca0b7c0a1c36 100644
--- a/app/code/Magento/Core/Model/Resource/Setup/Migration.php
+++ b/app/code/Magento/Core/Model/Resource/Setup/Migration.php
@@ -159,8 +159,8 @@ class Migration extends \Magento\Core\Model\Resource\Setup
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Helper\Data $helper
      * @param \Magento\Core\Model\Dir $dir
-     * @param $resourceName
-     * @param $confPathToMapFile
+     * @param string $resourceName
+     * @param string $confPathToMapFile
      * @param string $moduleName
      * @param string $connectionName
      */
diff --git a/app/code/Magento/Core/Model/Translate.php b/app/code/Magento/Core/Model/Translate.php
index e1056fce84b224b0cd659406aa8dbbe5b689f576..30338a4be86c6521219d01c6dac23d4799d93454 100644
--- a/app/code/Magento/Core/Model/Translate.php
+++ b/app/code/Magento/Core/Model/Translate.php
@@ -585,7 +585,7 @@ class Translate
         }
 
         if (!empty($_REQUEST['theme'])) {
-            $module = self::CONFIG_KEY_DESIGN_THEME . $_REQUEST['theme'];
+            $module = self::CONFIG_KEY_DESIGN_THEME . $_REQUEST['theme']['theme_title'];
         } else {
             $module = self::CONFIG_KEY_DESIGN_THEME . $this->_config[self::CONFIG_KEY_DESIGN_THEME];
         }
diff --git a/app/code/Magento/Core/Model/Url.php b/app/code/Magento/Core/Model/Url.php
index a2ded0ca1fccddc8179fde5c02a4ab45c35f8a12..de7b1f6b73d5516c413ea76f331478d74e6f746f 100644
--- a/app/code/Magento/Core/Model/Url.php
+++ b/app/code/Magento/Core/Model/Url.php
@@ -133,6 +133,26 @@ class Url extends \Magento\Object implements \Magento\Core\Model\UrlInterface
      */
     protected $_coreData = null;
 
+    /**
+     * @var \Magento\Core\Model\Store\Config
+     */
+    protected $_coreStoreConfig;
+
+    /**
+     * @var \Magento\Core\Model\App
+     */
+    protected $_app;
+
+    /**
+     * @var \Magento\Core\Model\StoreManager
+     */
+    protected $_storeManager;
+
+    /**
+     * @var \Magento\Core\Model\SessionProxy
+     */
+    protected $_session;
+
     /**
      * Constructor
      *
@@ -144,7 +164,7 @@ class Url extends \Magento\Object implements \Magento\Core\Model\UrlInterface
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param \Magento\Core\Model\Session $session
+     * @param \Magento\Core\Model\SessionProxy $session
      * @param array $data
      */
     public function __construct(
@@ -153,7 +173,7 @@ class Url extends \Magento\Object implements \Magento\Core\Model\UrlInterface
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\App $app,
         \Magento\Core\Model\StoreManager $storeManager,
-        \Magento\Core\Model\Session $session,
+        \Magento\Core\Model\SessionProxy $session,
         array $data = array()
     ) {
         $this->_urlSecurityInfo = $urlSecurityInfo;
diff --git a/app/code/Magento/Core/Model/Url/SecurityInfo.php b/app/code/Magento/Core/Model/Url/SecurityInfo.php
index 0f2b2a356b2ca0a0d10d1ccef9372138566656ee..dcebcf8d26fc55473b577e53482a1e69d6c588b8 100644
--- a/app/code/Magento/Core/Model/Url/SecurityInfo.php
+++ b/app/code/Magento/Core/Model/Url/SecurityInfo.php
@@ -25,7 +25,7 @@
  */
 namespace Magento\Core\Model\Url;
 
-class SecurityInfo implements \Magento\Core\model\Url\SecurityInfoInterface
+class SecurityInfo implements \Magento\Core\Model\Url\SecurityInfoInterface
 {
     /**
      * Store manager
diff --git a/app/code/Magento/Core/etc/layouts.xsd b/app/code/Magento/Core/etc/layouts.xsd
index 08c8c6cde22729005e94e971b9060febfa5a25a5..420274c049488c187943eb8d0b8304f5730efcaa 100644
--- a/app/code/Magento/Core/etc/layouts.xsd
+++ b/app/code/Magento/Core/etc/layouts.xsd
@@ -324,6 +324,7 @@
             <xs:enumeration value="dl"/>
             <xs:enumeration value="fieldset"/>
             <xs:enumeration value="header"/>
+            <xs:enumeration value="footer"/>
             <xs:enumeration value="hgroup"/>
             <xs:enumeration value="ol"/>
             <xs:enumeration value="p"/>
diff --git a/app/code/Magento/Core/etc/resources.xml b/app/code/Magento/Core/etc/resources.xml
index b03be61aec7aa5c1e7a7ae1f45fe76a7adb64287..dc94c91292be3ea1e130d73cd55a696a824f86fa 100644
--- a/app/code/Magento/Core/etc/resources.xml
+++ b/app/code/Magento/Core/etc/resources.xml
@@ -24,7 +24,5 @@
  */
 -->
 <config>
-    <resource  name="core_read" extends="default_read" />
-    <resource name="core_write" extends="default_write" />
     <resource name="core_setup" extends="default_setup" />
 </config>
diff --git a/app/code/Magento/Cron/Model/Config/Converter/Xml.php b/app/code/Magento/Cron/Model/Config/Converter/Xml.php
index 8b7b65c9bfaf9b8cfa67802e1ae56bb5d6b66e5d..4803c133895e8a550d1d5e860cb161434f0f501e 100644
--- a/app/code/Magento/Cron/Model/Config/Converter/Xml.php
+++ b/app/code/Magento/Cron/Model/Config/Converter/Xml.php
@@ -36,7 +36,7 @@ class Xml implements \Magento\Config\ConverterInterface
      *
      * @param mixed $source
      * @return array
-     * @throws LogicException
+     * @throws \InvalidArgumentException
      */
     public function convert($source)
     {
@@ -46,19 +46,20 @@ class Xml implements \Magento\Config\ConverterInterface
             return $output;
         }
 
-        /** @var DOMNodeList $jobs */
+        /** @var \DOMNodeList $jobs */
         $jobs = $source->getElementsByTagName('job');
-        /** @var DOMElement $jobConfig */
+        /** @var \DOMElement $jobConfig */
         foreach ($jobs as $jobConfig) {
             $jobName = $jobConfig->getAttribute('name');
 
             if (!$jobName) {
                 throw new \InvalidArgumentException('Attribute "name" does not exist');
             }
+            $config = array();
             $config['name'] = $jobName;
             $config += $this->_convertCronConfig($jobConfig);
 
-            /** @var DOMText $schedules */
+            /** @var \DOMText $schedules */
             foreach ($jobConfig->childNodes as $schedules) {
                 if ($schedules->nodeName == 'schedule') {
                     if (!empty($schedules->nodeValue)) {
@@ -76,7 +77,7 @@ class Xml implements \Magento\Config\ConverterInterface
     /**
      * Convert specific cron configurations
      *
-     * @param DOMElement $jobConfig
+     * @param \DOMElement $jobConfig
      * @return array
      * @throws \InvalidArgumentException
      */
diff --git a/app/code/Magento/Customer/Block/Account/Customer.php b/app/code/Magento/Customer/Block/Account/Customer.php
new file mode 100644
index 0000000000000000000000000000000000000000..779950799c00cf889b24486b549f97cd06359977
--- /dev/null
+++ b/app/code/Magento/Customer/Block/Account/Customer.php
@@ -0,0 +1,70 @@
+<?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.
+ *
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Customer\Block\Account;
+
+class Customer extends \Magento\Core\Block\Template
+{
+    /**
+     * Customer session
+     *
+     * @var \Magento\Customer\Model\Session
+     */
+    protected $_customerSession;
+
+    /**
+     * @param \Magento\Core\Block\Template\Context $context
+     * @param \Magento\Customer\Model\Session $session
+     * @param \Magento\Core\Helper\Data $coreData
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Core\Block\Template\Context $context,
+        \Magento\Customer\Model\Session $session,
+        \Magento\Core\Helper\Data $coreData,
+        array $data = array()
+    ) {
+        parent::__construct($coreData, $context, $data);
+        $this->_customerSession = $session;
+    }
+
+    /**
+     * Checking customer login status
+     *
+     * @return bool
+     */
+
+    public function customerLoggedIn()
+    {
+        return (bool)$this->_customerSession->isLoggedIn();
+    }
+
+    /**
+     * @return string
+     */
+    public function getCustomerName()
+    {
+        return $this->_helperFactory->get('Magento_Customer_Helper_Data')->getCustomerName();
+    }
+}
diff --git a/app/code/Magento/Customer/Helper/Address.php b/app/code/Magento/Customer/Helper/Address.php
index 6d6350c09dd3e98435560f0e2f501f37986d3c8f..a35462a3158f4068fd85cb588df441cbc68e80a3 100644
--- a/app/code/Magento/Customer/Helper/Address.php
+++ b/app/code/Magento/Customer/Helper/Address.php
@@ -98,7 +98,7 @@ class Address extends \Magento\Core\Helper\AbstractHelper
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Customer\Model\Address\Config|\Magento\Customer\Model\Address\ConfigProxy $addressConfig
+     * @param \Magento\Customer\Model\Address\Config|\Magento\Customer\Model\Address\Config $addressConfig
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
@@ -106,7 +106,7 @@ class Address extends \Magento\Core\Helper\AbstractHelper
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Customer\Model\Address\ConfigProxy $addressConfig
+        \Magento\Customer\Model\Address\Config $addressConfig
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_blockFactory = $blockFactory;
diff --git a/app/code/Magento/Customer/Helper/Data.php b/app/code/Magento/Customer/Helper/Data.php
index 204255f6a42422255ef9f20adffceb28d449770a..5fd02ca5c258dd0fec40b482f927f650070fe720 100644
--- a/app/code/Magento/Customer/Helper/Data.php
+++ b/app/code/Magento/Customer/Helper/Data.php
@@ -698,7 +698,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     protected function _createVatNumberValidationSoapClient($trace = false)
     {
-        return new SoapClient(self::VAT_VALIDATION_WSDL_URL, array('trace' => $trace));
+        return new \SoapClient(self::VAT_VALIDATION_WSDL_URL, array('trace' => $trace));
     }
 
     /**
diff --git a/app/code/Magento/Customer/Model/Config/Share.php b/app/code/Magento/Customer/Model/Config/Share.php
index b32b46b524f23d05d46639a328a46fba93c0e556..18736ccf383f21ddd6023a23a0213b52e3011042 100644
--- a/app/code/Magento/Customer/Model/Config/Share.php
+++ b/app/code/Magento/Customer/Model/Config/Share.php
@@ -69,7 +69,7 @@ class Share extends \Magento\Core\Model\Config\Value
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Customer\Model\Resource\CustomerProxy $customerResource
+     * @param \Magento\Customer\Model\Resource\Customer $customerResource
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -80,7 +80,7 @@ class Share extends \Magento\Core\Model\Config\Value
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Customer\Model\Resource\CustomerProxy $customerResource,
+        \Magento\Customer\Model\Resource\Customer $customerResource,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
diff --git a/app/code/Magento/Customer/Model/Observer.php b/app/code/Magento/Customer/Model/Observer.php
index 18868ca3f7595960f49e577b2d098e3312c17f80..e02831d4ebe6be584d173e4f1a8f297c8eca5c49 100644
--- a/app/code/Magento/Customer/Model/Observer.php
+++ b/app/code/Magento/Customer/Model/Observer.php
@@ -262,7 +262,7 @@ class Observer
         }
 
         $customer->setGroupId(
-            $customer->getOrigData('group_id')
+            (int)$customer->getOrigData('group_id')
         );
         $customer->save();
     }
diff --git a/app/code/Magento/Customer/Model/Session.php b/app/code/Magento/Customer/Model/Session.php
index 6bc0da9033e50f022116cc7e8bdab304fb61974c..e7dda5830824662887bceaca02370a135127a4ec 100644
--- a/app/code/Magento/Customer/Model/Session.php
+++ b/app/code/Magento/Customer/Model/Session.php
@@ -94,9 +94,9 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Customer\Model\Config\Share $configShare
      * @param \Magento\Core\Helper\Url $coreUrl
-     * @param \Magento\Customer\Helper\DataProxy $customerData
+     * @param \Magento\Customer\Helper\Data $customerData
      * @param \Magento\Core\Model\Session $session
-     * @param \Magento\Customer\Model\Resource\CustomerProxy $customerResource
+     * @param \Magento\Customer\Model\Resource\Customer $customerResource
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Core\Model\UrlFactory $urlFactory
      * @param array $data
@@ -107,9 +107,9 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Customer\Model\Config\Share $configShare,
         \Magento\Core\Helper\Url $coreUrl,
-        \Magento\Customer\Helper\DataProxy $customerData,
+        \Magento\Customer\Helper\Data $customerData,
         \Magento\Core\Model\Session $session,
-        \Magento\Customer\Model\Resource\CustomerProxy $customerResource,
+        \Magento\Customer\Model\Resource\Customer $customerResource,
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Core\Model\UrlFactory $urlFactory,
         array $data = array(),
diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml
index 178e810d3f9bc26242017d0432ec0a4cedb9b231..b369f18220fc175f74c41895168d1b4d6810b666 100644
--- a/app/code/Magento/Customer/etc/di.xml
+++ b/app/code/Magento/Customer/etc/di.xml
@@ -46,6 +46,12 @@
         <param name="configShare">
             <instance type="Magento\Customer\Model\Config\Share\Proxy" />
         </param>
+        <param name="customerData">
+            <instance type="Magento\Customer\Helper\Data\Proxy" />
+        </param>
+        <param name="customerResource">
+            <instance type="Magento\Customer\Model\Resource\Customer\Proxy" />
+        </param>
     </type>
     <type name="Magento\Core\Model\Db\Updater">
         <param name="resourceList">
@@ -54,4 +60,14 @@
             </value>
         </param>
     </type>
+    <type name="Magento\Customer\Helper\Address">
+        <param name="addressConfig">
+            <instance type="Magento\Customer\Model\Address\Config\Proxy" />
+        </param>
+    </type>
+    <type name="Magento\Customer\Model\Config\Share">
+        <param name="customerResource">
+            <instance type="Magento\Customer\Model\Resource\Customer\Proxy" />
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php
index d00a0222100f8dfb64d98fac84fd30834fb51ff0..c4017c29eb9b45690713e00bffdc010ada162fd0 100644
--- a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php
+++ b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php
@@ -61,7 +61,7 @@ class NavigationMode extends \Magento\Core\Model\Url
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param \Magento\Core\Model\Session $session
+     * @param \Magento\Core\Model\SessionProxy $session
      * @param array $data
      */
     public function __construct(
@@ -71,7 +71,7 @@ class NavigationMode extends \Magento\Core\Model\Url
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\App $app,
         \Magento\Core\Model\StoreManager $storeManager,
-        \Magento\Core\Model\Session $session,
+        \Magento\Core\Model\SessionProxy $session,
         array $data = array()
     ) {
         $this->_helper = $helper;
diff --git a/app/code/Magento/DesignEditor/etc/module.xml b/app/code/Magento/DesignEditor/etc/module.xml
index d85093c186b44b9f9bffb5cbf9b50b5ef76f251d..64a58d4fb1938281588d8dec8e699872ded33a70 100755
--- a/app/code/Magento/DesignEditor/etc/module.xml
+++ b/app/code/Magento/DesignEditor/etc/module.xml
@@ -36,6 +36,7 @@
             <module name="Magento_Backend"/>
             <module name="Magento_Core"/>
             <module name="Magento_Eav"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php
index 1648598afb7399a70af39ae4aae0d94d6e10b4ed..39dbcda120b4220a586299325ba5511bdf9463ad 100644
--- a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php
+++ b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php
@@ -76,7 +76,7 @@ class File extends \Magento\Adminhtml\Controller\Action
         }
         $result = array();
         try {
-            $uploader = $this->_objectManager->create('Magento\Core\Model\File\Uploader', array('type' => $type));
+            $uploader = $this->_objectManager->create('Magento\Core\Model\File\Uploader', array('fileId' => $type));
             $uploader->setAllowRenameFiles(true);
             $uploader->setFilesDispersion(true);
             $result = $uploader->save($tmpPath);
diff --git a/app/code/Magento/Downloadable/etc/module.xml b/app/code/Magento/Downloadable/etc/module.xml
index da6509a12fbb45913c928ab1f37a77846321bd9b..46791af98683dc1690ce407d5714be07f728e9e8 100755
--- a/app/code/Magento/Downloadable/etc/module.xml
+++ b/app/code/Magento/Downloadable/etc/module.xml
@@ -43,6 +43,7 @@
             <module name="Magento_Weee"/>
             <module name="Magento_Wishlist"/>
             <module name="Magento_GiftMessage"/>
+            <module name="Magento_CatalogInventory"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Config.php b/app/code/Magento/Eav/Model/Entity/Attribute/Config.php
index 4293502fdca26b4cbcf0750c3f407201eb01e34e..51c51c5ba6486a330f28f559d1fd93ad885a9328 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Config.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Config.php
@@ -41,15 +41,18 @@ class Config extends \Magento\Config\Data
     /**
      * Retrieve list of locked fields for attribute
      *
-     * @param \Magento\Catalog\Model\Resource\Eav\Attribute $attribute
+     * @param AbstractAttribute $attribute
      * @return array
      */
-    public function getLockedFields(\Magento\Catalog\Model\Resource\Eav\Attribute $attribute)
+    public function getLockedFields(AbstractAttribute $attribute)
     {
         $allFields = $this->get(
             $attribute->getEntityType()->getEntityTypeCode() . '/attributes/' . $attribute->getAttributeCode()
         );
 
+        if (!is_array($allFields)) {
+            return array();
+        }
         $lockedFields = array();
         foreach (array_keys($allFields) as $fieldCode) {
             $lockedFields[$fieldCode] = $fieldCode;
diff --git a/app/code/Magento/GiftMessage/Model/Message.php b/app/code/Magento/GiftMessage/Model/Message.php
index ba5280100cbbb011d6e1530cf630b1f737609799..865a0fea84766fe204109cbfd8e4eff3b818204b 100644
--- a/app/code/Magento/GiftMessage/Model/Message.php
+++ b/app/code/Magento/GiftMessage/Model/Message.php
@@ -82,7 +82,7 @@ class Message extends \Magento\Core\Model\AbstractModel
      *
      * @param string $type
      *
-     * @return \Magento\Eav\Model\Entity\AbstractEntity
+     * @return \Magento\Eav\Model\Entity\AbstractModel
      */
     public function getEntityModelByType($type)
     {
diff --git a/app/code/Magento/GiftMessage/Model/TypeFactory.php b/app/code/Magento/GiftMessage/Model/TypeFactory.php
index 52baae74f34ee33a2d34171f5c67e18bfad1e04d..ca8e6fd4eb40f16509a6fcfe2136354853bd52a7 100644
--- a/app/code/Magento/GiftMessage/Model/TypeFactory.php
+++ b/app/code/Magento/GiftMessage/Model/TypeFactory.php
@@ -39,7 +39,7 @@ class TypeFactory
     protected $_allowedEntityTypes = array(
         'order'         => 'Magento\Sales\Model\Order',
         'order_item'    => 'Magento\Sales\Model\Order\Item',
-        'order_address' => 'Magento\Sales\Model\Order_Address',
+        'order_address' => 'Magento\Sales\Model\Order\Address',
         'quote'         => 'Magento\Sales\Model\Quote',
         'quote_item'    => 'Magento\Sales\Model\Quote\Item',
         'quote_address' => 'Magento\Sales\Model\Quote\Address',
diff --git a/app/code/Magento/GiftMessage/etc/module.xml b/app/code/Magento/GiftMessage/etc/module.xml
index 2aff0b92f07bbee3e9d414090577c9e79bf32986..4118d75e80498d117999d6cfd84ffd79131f3e82 100644
--- a/app/code/Magento/GiftMessage/etc/module.xml
+++ b/app/code/Magento/GiftMessage/etc/module.xml
@@ -37,6 +37,7 @@
             <module name="Magento_Core"/>
             <module name="Magento_Customer"/>
             <module name="Magento_Eav"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/GoogleCheckout/Model/Observer.php b/app/code/Magento/GoogleCheckout/Model/Observer.php
index 25485b3066487b42c249159d3a2fc466c7a07e6d..a1e25444c715cde8cd2a2b6b358a132b1695c814 100644
--- a/app/code/Magento/GoogleCheckout/Model/Observer.php
+++ b/app/code/Magento/GoogleCheckout/Model/Observer.php
@@ -50,8 +50,8 @@ class Observer
      * @param ApiFactory $apiFactory
      */
     public function __construct(
-        ShippingFactory $shippingFactory,
-        ApiFactory $apiFactory
+        \Magento\GoogleCheckout\Model\ShippingFactory $shippingFactory,
+        \Magento\GoogleCheckout\Model\ApiFactory $apiFactory
     ) {
         $this->shippingFactory = $shippingFactory;
         $this->apiFactory = $apiFactory;
diff --git a/app/code/Magento/GoogleCheckout/etc/adminhtml/system.xml b/app/code/Magento/GoogleCheckout/etc/adminhtml/system.xml
index 04cd3c1238c1fee9f2f9c61a4c0c220ea676411b..0be88909ac21781b892566f476fb949a10f05055 100644
--- a/app/code/Magento/GoogleCheckout/etc/adminhtml/system.xml
+++ b/app/code/Magento/GoogleCheckout/etc/adminhtml/system.xml
@@ -74,7 +74,7 @@
                 </field>
                 <field id="order_status" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>New Order Status</label>
-                    <source_model>Magento\Sales\Model\Config\Source\Order\Status\New</source_model>
+                    <source_model>Magento\Sales\Model\Config\Source\Order\Status\NewStatus</source_model>
                 </field>
                 <field id="continue_shopping_url" translate="label comment" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Continue Shopping URL</label>
diff --git a/app/code/Magento/GoogleShopping/etc/module.xml b/app/code/Magento/GoogleShopping/etc/module.xml
index 2d5f3552356fa73564cc54d4b7569dcb1a08c307..e3e84bdf2293e9ca4d2a8a06ced8d62b514cc054 100755
--- a/app/code/Magento/GoogleShopping/etc/module.xml
+++ b/app/code/Magento/GoogleShopping/etc/module.xml
@@ -37,6 +37,7 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Eav"/>
             <module name="Magento_Tax"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Install/Model/Installer/AbstractInstaller.php b/app/code/Magento/Install/Model/Installer/AbstractInstaller.php
index 5e5be4455cd1d120224dfd748f93143bec48d562..eea3caef4f7e730e1f97a16a5c86f644685e2965 100644
--- a/app/code/Magento/Install/Model/Installer/AbstractInstaller.php
+++ b/app/code/Magento/Install/Model/Installer/AbstractInstaller.php
@@ -44,11 +44,10 @@ class AbstractInstaller
     protected $installer;
 
     /**
-     * @param \Magento\Install\Model\InstallerProxy $installer
+     * @param \Magento\Install\Model\Installer $installer
      */
-    public function __construct(
-        \Magento\Install\Model\InstallerProxy $installer
-    ) {
+    public function __construct(\Magento\Install\Model\Installer $installer)
+    {
         $this->_installer = $installer;
     }
 
diff --git a/app/code/Magento/Install/Model/Installer/Config.php b/app/code/Magento/Install/Model/Installer/Config.php
index 20652fbd6d8c383c7fdfd75b8ee16f62709ac91f..afcd2ab5d629899b6222632a33eafef1794d1ce6 100644
--- a/app/code/Magento/Install/Model/Installer/Config.php
+++ b/app/code/Magento/Install/Model/Installer/Config.php
@@ -69,14 +69,14 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller
     protected $_storeManager;
 
     /**
-     * @param \Magento\Install\Model\InstallerProxy $installer
+     * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\Core\Controller\Request\Http $request
      * @param \Magento\Core\Model\Dir $dirs
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      */
     public function __construct(
-        \Magento\Install\Model\InstallerProxy $installer,
+        \Magento\Install\Model\Installer $installer,
         \Magento\Core\Controller\Request\Http $request,
         \Magento\Core\Model\Dir $dirs,
         \Magento\Filesystem $filesystem,
diff --git a/app/code/Magento/Install/Model/Installer/Console.php b/app/code/Magento/Install/Model/Installer/Console.php
index 7010894886cd4d8e14e3c46c799e2da9424d8542..fb0d59ee3d9eb64b402ad0728c2fb1f6ee3b23c5 100644
--- a/app/code/Magento/Install/Model/Installer/Console.php
+++ b/app/code/Magento/Install/Model/Installer/Console.php
@@ -136,7 +136,7 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
     protected $_objectManager;
 
     /**
-     * @param \Magento\Install\Model\InstallerProxy $installer
+     * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\Core\Model\Config\Resource $resourceConfig
      * @param \Magento\Core\Model\Db\UpdaterInterface $dbUpdater
      * @param \Magento\Filesystem $filesystem
@@ -147,7 +147,7 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
      * @param \Magento\ObjectManager $objectManager
      */
     public function __construct(
-        \Magento\Install\Model\InstallerProxy $installer,
+        \Magento\Install\Model\Installer $installer,
         \Magento\Core\Model\Config\Resource $resourceConfig,
         \Magento\Core\Model\Db\UpdaterInterface $dbUpdater,
         \Magento\Filesystem $filesystem,
diff --git a/app/code/Magento/Install/Model/Installer/Db.php b/app/code/Magento/Install/Model/Installer/Db.php
index dc7207759e1a79ab2f3639e06e168380c340d490..07d32156e2aea944cf02adbfbb348093a3fa016b 100644
--- a/app/code/Magento/Install/Model/Installer/Db.php
+++ b/app/code/Magento/Install/Model/Installer/Db.php
@@ -58,13 +58,13 @@ class Db extends \Magento\Install\Model\Installer\AbstractInstaller
     protected $_dbConfig;
 
     /**
-     * @param \Magento\Install\Model\InstallerProxy $installer
+     * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\Core\Model\Logger $logger
      * @param \Magento\Install\Model\Installer\Db\Factory $dbFactory
      * @param array $dbConfig
      */
     public function __construct(
-        \Magento\Install\Model\InstallerProxy $installer,
+        \Magento\Install\Model\Installer $installer,
         \Magento\Core\Model\Logger $logger,
         \Magento\Install\Model\Installer\Db\Factory $dbFactory,
         array $dbConfig
diff --git a/app/code/Magento/Install/Model/Installer/Filesystem.php b/app/code/Magento/Install/Model/Installer/Filesystem.php
index 56a43c0475459e584f4f594b9273dab3192efaec..a8554112e431a69019f48463b214c6a48dd74eda 100644
--- a/app/code/Magento/Install/Model/Installer/Filesystem.php
+++ b/app/code/Magento/Install/Model/Installer/Filesystem.php
@@ -67,13 +67,13 @@ class Filesystem extends \Magento\Install\Model\Installer\AbstractInstaller
     protected $_appRootDir;
 
     /**
-     * @param \Magento\Install\Model\InstallerProxy $installer
+     * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Install\Model\Config $installConfig
      * @param \Magento\Core\Model\Dir $dir
      */
     public function __construct(
-        \Magento\Install\Model\InstallerProxy $installer,
+        \Magento\Install\Model\Installer $installer,
         \Magento\Filesystem $filesystem,
         \Magento\Install\Model\Config $installConfig,
         \Magento\Core\Model\Dir $dir
diff --git a/app/code/Magento/Install/Model/Installer/Pear.php b/app/code/Magento/Install/Model/Installer/Pear.php
index 43f5d78659d8db2ca59474951f26242ab52cf480..d57b3672da0a31912b0daafd5fc21bd7e992f46f 100644
--- a/app/code/Magento/Install/Model/Installer/Pear.php
+++ b/app/code/Magento/Install/Model/Installer/Pear.php
@@ -39,11 +39,11 @@ class Pear extends \Magento\Install\Model\Installer\AbstractInstaller
     protected $_session;
 
     /**
-     * @param \Magento\Install\Model\InstallerProxy $installer
+     * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\Core\Model\Session\Generic $session
      */
     public function __construct(
-        \Magento\Install\Model\InstallerProxy $installer,
+        \Magento\Install\Model\Installer $installer,
         \Magento\Core\Model\Session\Generic $session
     ) {
         parent::__construct($installer);
diff --git a/app/code/Magento/Install/etc/di.xml b/app/code/Magento/Install/etc/di.xml
index 98b1a2f16a16433064396648ad98484de1869d95..aeb6d1ac7f58eebe23df94dce26a0474a6c5eef8 100644
--- a/app/code/Magento/Install/etc/di.xml
+++ b/app/code/Magento/Install/etc/di.xml
@@ -129,4 +129,9 @@
             <instance type="Magento\Install\Model\Session" />
         </param>
     </type>
+    <type name="Magento\Install\Model\Installer\AbstractInstaller">
+        <param name="installer">
+            <instance type="Magento\Install\Model\Installer\Proxy" />
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Row/UrlGenerator.php b/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Row/UrlGenerator.php
index a742e146213824832879b8bc0a35fc5c93be5ed5..5ccaf96508b9421b931efb1c326cfc6c0b3f2065 100644
--- a/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Row/UrlGenerator.php
+++ b/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Row/UrlGenerator.php
@@ -35,12 +35,12 @@ class UrlGenerator
     protected $_authorization;
 
     /**
-     * @param \Magento\Backend\Model\UrlProxy $backendUrl
+     * @param \Magento\Backend\Model\Url $backendUrl
      * @param \Magento\AuthorizationInterface $authorization
      * @param array $args
      */
     public function __construct(
-        \Magento\Backend\Model\UrlProxy $backendUrl,
+        \Magento\Backend\Model\Url $backendUrl,
         \Magento\AuthorizationInterface $authorization,
         array $args = array()
     ) {
diff --git a/app/code/Magento/Newsletter/etc/module.xml b/app/code/Magento/Newsletter/etc/module.xml
index 9022042c1337335237b9104707847abb6b394048..9e3e41fdad1219626dc5014f49688c2123621fd3 100755
--- a/app/code/Magento/Newsletter/etc/module.xml
+++ b/app/code/Magento/Newsletter/etc/module.xml
@@ -32,11 +32,12 @@
             <module name="Magento_Widget"/>
         </sequence>
         <depends>
-            <module name="Magento_Backend" type="soft"/>
             <module name="Magento_Core"/>
             <module name="Magento_Customer"/>
             <module name="Magento_Widget"/>
             <module name="Magento_Catalog"/>
+            <module name="Magento_Backend"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Ogone/Controller/Api.php b/app/code/Magento/Ogone/Controller/Api.php
index cdfb49c012505447494b2da03544116f0c9500b2..499170d62eb62837cdafe52296556fceecd73c90 100644
--- a/app/code/Magento/Ogone/Controller/Api.php
+++ b/app/code/Magento/Ogone/Controller/Api.php
@@ -49,12 +49,12 @@ class Api extends \Magento\Core\Controller\Front\Action
     /**
      * @param \Magento\Core\Model\Resource\TransactionFactory $transactionFactory
      * @param \Magento\Sales\Model\OrderFactory $salesOrderFactory
-     * @param \Magento\Core\Controller\Varien\Action_Context $context
+     * @param \Magento\Core\Controller\Varien\Action\Context $context
      */
     public function __construct(
         \Magento\Core\Model\Resource\TransactionFactory $transactionFactory,
         \Magento\Sales\Model\OrderFactory $salesOrderFactory,
-        \Magento\Core\Controller\Varien\Action_Context $context
+        \Magento\Core\Controller\Varien\Action\Context $context
     ) {
         parent::__construct($context);
         $this->_transactionFactory = $transactionFactory;
diff --git a/app/code/Magento/Page/Block/Link.php b/app/code/Magento/Page/Block/Link.php
index e7f64a34610e9b87fb42527dfdea61dba0ad17b5..eb93641abab365937b2cbdd1022ae5d9122a5836 100644
--- a/app/code/Magento/Page/Block/Link.php
+++ b/app/code/Magento/Page/Block/Link.php
@@ -21,17 +21,26 @@
  * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+
+namespace Magento\Page\Block;
+
 /**
  * Block representing link
  *
- * @method string getHref()
  * @method string getLabel()
+ * @method string getPath()
  * @method string getTitle()
  */
-namespace Magento\Page\Block;
-
 class Link extends \Magento\Core\Block\Template
 {
     /** @var string */
     protected $_template = 'Magento_Page::link.phtml';
+
+    /**
+     * @return string
+     */
+    public function getHref()
+    {
+        return $this->getUrl($this->getPath());
+    }
 }
diff --git a/app/code/Magento/PageCache/Model/CacheControlFactory.php b/app/code/Magento/PageCache/Model/CacheControlFactory.php
index 103ad1ad5d3c46cfb796eee2024d27a49d0ce961..756bd2fbf678532650e1779edf332fbeb75be1d9 100644
--- a/app/code/Magento/PageCache/Model/CacheControlFactory.php
+++ b/app/code/Magento/PageCache/Model/CacheControlFactory.php
@@ -85,7 +85,7 @@ class CacheControlFactory
     public function getCacheControls()
     {
         $controls = $this->_config->getNode(self::XML_PATH_EXTERNAL_CACHE_CONTROLS);
-        return $controls->asCanonicalArray();
+        return $controls instanceof \Magento\Simplexml\Element ? $controls->asCanonicalArray() : array();
     }
 
     /**
diff --git a/app/code/Magento/Paypal/etc/module.xml b/app/code/Magento/Paypal/etc/module.xml
index 8aeb9bb01764f61e67e27cf82d472c26153c5e6d..ddab4ebe5d13ef1a4f48856d6414e021d2212c63 100755
--- a/app/code/Magento/Paypal/etc/module.xml
+++ b/app/code/Magento/Paypal/etc/module.xml
@@ -40,6 +40,7 @@
             <module name="Magento_Backend"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Directory"/>
+            <module name="Magento_Page"/>
             <module name="Magento_Centinel"/>
         </depends>
     </module>
diff --git a/app/code/Magento/PaypalUk/etc/module.xml b/app/code/Magento/PaypalUk/etc/module.xml
index ebd04dece59b22a5f274f65568e8f40088b7847c..0ae081388813e653f642514bb8341d582075b88c 100755
--- a/app/code/Magento/PaypalUk/etc/module.xml
+++ b/app/code/Magento/PaypalUk/etc/module.xml
@@ -32,11 +32,13 @@
             <module name="Magento_Paypal"/>
         </sequence>
         <depends>
+            <module name="Magento_Checkout"/>
             <module name="Magento_Directory"/>
             <module name="Magento_Paypal"/>
             <module name="Magento_Payment"/>
             <module name="Magento_Core"/>
             <module name="Magento_Customer"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Persistent/Helper/Data.php b/app/code/Magento/Persistent/Helper/Data.php
index 84a1e6c8086f559bfbdfd94e9404d7942b1d1e5e..1d5dd26675f8efe644b5daeba0ea33e09287411f 100644
--- a/app/code/Magento/Persistent/Helper/Data.php
+++ b/app/code/Magento/Persistent/Helper/Data.php
@@ -200,7 +200,7 @@ class Data extends \Magento\Core\Helper\Data
      */
     public function getPersistentConfigFilePath()
     {
-        return $this->_coreConfig->getModuleDir('etc', $this->_getModuleName()) . DS . $this->_configFileName;
+        return $this->_config->getModuleDir('etc', $this->_getModuleName()) . DS . $this->_configFileName;
     }
 
     /**
diff --git a/app/code/Magento/Reports/etc/module.xml b/app/code/Magento/Reports/etc/module.xml
index 22077d218384c98d3e1e20220a72a05ce3705c7d..efac588845218ea39621f7daa5c9745c385c5f8b 100755
--- a/app/code/Magento/Reports/etc/module.xml
+++ b/app/code/Magento/Reports/etc/module.xml
@@ -46,6 +46,7 @@
             <module name="Magento_Review"/>
             <module name="Magento_Adminhtml"/>
             <module name="Magento_CatalogInventory"/>
+            <module name="Magento_Page"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Rating"/>
         </depends>
diff --git a/app/code/Magento/Review/etc/module.xml b/app/code/Magento/Review/etc/module.xml
index 20fe49545c8f723f012f834ab9d5a6d45e2268b1..3a3d42c9552226baae402c684fcff1762098815d 100755
--- a/app/code/Magento/Review/etc/module.xml
+++ b/app/code/Magento/Review/etc/module.xml
@@ -37,6 +37,7 @@
             <module name="Magento_Rating"/>
             <module name="Magento_Page"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Paypal"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Newsletter"/>
         </depends>
diff --git a/app/code/Magento/Rss/etc/module.xml b/app/code/Magento/Rss/etc/module.xml
index d23b1856edc7d586fd156c2fb8a8852b36cb22d5..72869146b27f36dc9c8f075f4681bb6e10c7ff9b 100755
--- a/app/code/Magento/Rss/etc/module.xml
+++ b/app/code/Magento/Rss/etc/module.xml
@@ -44,6 +44,7 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Backend"/>
             <module name="Magento_GiftMessage"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Grid.php
index a3f84d9f1b28458e0e7c1029ddabafe20f1baf67..48cbd32b0b8a38115c24fbf6af59e5a63b7b41c3 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Grid.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Grid.php
@@ -29,7 +29,7 @@
  */
 namespace Magento\Sales\Block\Adminhtml\Recurring\Profile;
 
-class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
+class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 {
     /**
      * Set ajax/session parameters
@@ -88,7 +88,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
     /**
      * Prepare grid collection object
      *
-     * @return \Magento\Sales\Block\Adminhtml\Recurring\Profile\Grid
+     * @return \Magento\Backend\Block\Widget\Grid
      */
     protected function _prepareCollection()
     {
diff --git a/app/code/Magento/Sales/Model/Order/Grid/Row/UrlGenerator.php b/app/code/Magento/Sales/Model/Order/Grid/Row/UrlGenerator.php
index d84e559668c43f76ac81cdd02c3c32711b7cbcc9..a7f3dd6c5b9e60d330b9b995d9acab68d0a6c441 100644
--- a/app/code/Magento/Sales/Model/Order/Grid/Row/UrlGenerator.php
+++ b/app/code/Magento/Sales/Model/Order/Grid/Row/UrlGenerator.php
@@ -37,12 +37,12 @@ class UrlGenerator extends \Magento\Backend\Model\Widget\Grid\Row\UrlGenerator
     protected $_authorization;
 
     /**
-     * @param \Magento\Backend\Model\UrlProxy $backendUrl
+     * @param \Magento\Backend\Model\Url $backendUrl
      * @param \Magento\AuthorizationInterface $authorization
      * @param array $args
      */
     public function __construct(
-        \Magento\Backend\Model\UrlProxy $backendUrl,
+        \Magento\Backend\Model\Url $backendUrl,
         \Magento\AuthorizationInterface $authorization,
         array $args = array()
     ) {
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Attribute/Backend/Parent.php b/app/code/Magento/Sales/Model/Resource/Order/Attribute/Backend/Parent.php
deleted file mode 100644
index 1be0049c012f0146a404dc346f56f57a53369bc3..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/Model/Resource/Order/Attribute/Backend/Parent.php
+++ /dev/null
@@ -1,66 +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    Magento
- * @package     Magento_Sales
- * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-
-/**
- * Invoice backend model for parent attribute
- *
- * @category    Magento
- * @package     Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Sales\Model\Resource\Order\Attribute\Backend;
-
-class Parent extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
-{
-    /**
-     * Perform operation after save
-     *
-     * @param \Magento\Object $object
-     * @return \Magento\Sales\Model\Resource\Order\Attribute\Backend\Parent
-     */
-    public function afterSave($object)
-    {
-        parent::afterSave($object);
-
-        foreach ($object->getAddressesCollection() as $item) {
-            $item->save();
-        }
-        foreach ($object->getItemsCollection() as $item) {
-            $item->save();
-        }
-        foreach ($object->getPaymentsCollection() as $item) {
-            $item->save();
-        }
-        foreach ($object->getStatusHistoryCollection() as $item) {
-            $item->save();
-        }
-        foreach ($object->getRelatedObjects() as $object) {
-            $object->save();
-        }
-        return $this;
-    }
-}
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Creditmemo/Attribute/Backend/Parent.php b/app/code/Magento/Sales/Model/Resource/Order/Creditmemo/Attribute/Backend/Parent.php
deleted file mode 100644
index 5dc10c87f2affde802d3da13997024be28b023eb..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/Model/Resource/Order/Creditmemo/Attribute/Backend/Parent.php
+++ /dev/null
@@ -1,63 +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    Magento
- * @package     Magento_Sales
- * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-
-/**
- * Invoice backend model for parent attribute
- *
- * @category    Magento
- * @package     Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Sales\Model\Resource\Order\Creditmemo\Attribute\Backend;
-
-class Parent
-    extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
-{
-    /**
-     * Method is invoked after save
-     *
-     * @param \Magento\Object $object
-     * @return \Magento\Sales\Model\Resource\Order\Creditmemo\Attribute\Backend\Parent
-     */
-    public function afterSave($object)
-    {
-        parent::afterSave($object);
-
-        /**
-         * Save creditmemo items
-         */
-        foreach ($object->getAllItems() as $item) {
-            $item->save();
-        }
-
-        foreach ($object->getCommentsCollection() as $comment) {
-            $comment->save();
-        }
-
-        return $this;
-    }
-}
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Invoice/Attribute/Backend/Parent.php b/app/code/Magento/Sales/Model/Resource/Order/Invoice/Attribute/Backend/Parent.php
deleted file mode 100644
index 7847788320022c060aa779ead6d10e0fea2c67f5..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/Model/Resource/Order/Invoice/Attribute/Backend/Parent.php
+++ /dev/null
@@ -1,64 +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    Magento
- * @package     Magento_Sales
- * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-
-/**
- * Invoice backend model for parent attribute
- *
- * @category    Magento
- * @package     Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Sales\Model\Resource\Order\Invoice\Attribute\Backend;
-
-class Parent
-    extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
-{
-    /**
-     * Method is invoked after save
-     *
-     * @param \Magento\Object $object
-     * @return \Magento\Sales\Model\Resource\Order\Invoice\Attribute\Backend\Parent
-     */
-    public function afterSave($object)
-    {
-        parent::afterSave($object);
-
-        /**
-         * Save invoice items
-         */
-        foreach ($object->getAllItems() as $item) {
-            $item->setOrderItem($item->getOrderItem());
-            $item->save();
-        }
-
-        foreach ($object->getCommentsCollection() as $comment) {
-            $comment->save();
-        }
-
-        return $this;
-    }
-}
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Shipment/Attribute/Backend/Parent.php b/app/code/Magento/Sales/Model/Resource/Order/Shipment/Attribute/Backend/Parent.php
deleted file mode 100644
index 7a5c93b3f5ff888accce7899d74213b53870b5b2..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/Model/Resource/Order/Shipment/Attribute/Backend/Parent.php
+++ /dev/null
@@ -1,69 +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    Magento
- * @package     Magento_Sales
- * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-
-/**
- * Invoice backend model for parent attribute
- *
- * @category    Magento
- * @package     Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Sales\Model\Resource\Order\Shipment\Attribute\Backend;
-
-class Parent
-    extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
-{
-    /**
-     * Performed after data is saved
-     *
-     * @param \Magento\Object $object
-     * @return \Magento\Sales\Model\Resource\Order\Shipment\Attribute\Backend\Parent
-     */
-    public function afterSave($object)
-    {
-        parent::afterSave($object);
-
-        /**
-         * Save Shipment items
-         */
-        foreach ($object->getAllItems() as $item) {
-            $item->save();
-        }
-
-        /**
-         * Save Shipment tracks
-         */
-        foreach ($object->getAllTracks() as $track) {
-            $track->save();
-        }
-
-        foreach ($object->getCommentsCollection() as $comment) {
-            $comment->save();
-        }
-        return $this;
-    }
-}
diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend/Parent.php b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend/Parent.php
deleted file mode 100644
index 974364a519e51cea654fa14d2b7d3bdcd734743d..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend/Parent.php
+++ /dev/null
@@ -1,55 +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    Magento
- * @package     Magento_Sales
- * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-
-/**
- *Quote address attribute backend parent resource model
- *
- * @category    Magento
- * @package     Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Sales\Model\Resource\Quote\Address\Attribute\Backend;
-
-class Parent
-    extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
-{
-    /**
-     * Save items collection and shipping rates collection
-     *
-     * @param \Magento\Object $object
-     * @return \Magento\Sales\Model\Resource\Quote\Address\Attribute\Backend\Parent
-     */
-    public function afterSave($object)
-    {
-        parent::afterSave($object);
-        
-        $object->getItemsCollection()->save();
-        $object->getShippingRatesCollection()->save();
-        
-        return $this;
-    }
-}
diff --git a/app/code/Magento/Sales/Model/Resource/Sale/Collection.php b/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
index d80cf699f6437ec5d86bf8e16c9e5e5c8c779bc7..3663ec9150f6523eeb465bc70841ff4fc8e54427 100644
--- a/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
@@ -96,7 +96,6 @@ class Collection extends \Magento\Data\Collection\Db
      * @param \Magento\Sales\Model\Resource\Order $resource
      * @param \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @todo: incorrect constructor
      */
     public function __construct(
         \Magento\Core\Model\Event\Manager $eventManager,
@@ -105,6 +104,7 @@ class Collection extends \Magento\Data\Collection\Db
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Order $resource,
         \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollFactory,
+        \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
         $this->_eventManager = $eventManager;
diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
index ca0de2980876f7dee7eced907e0a361a2d037d2e..fc07e46749591a2b323cce8ad514a8b2baf40af5 100644
--- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
+++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
@@ -578,7 +578,7 @@ abstract class AbstractCarrier extends \Magento\Object
     protected function _debug($debugData)
     {
         if ($this->getDebugFlag()) {
-            $this->_logAdapterFactory->creaye(array('fileName' => 'shipping_' . $this->getCarrierCode() . '.log'))
+            $this->_logAdapterFactory->create(array('fileName' => 'shipping_' . $this->getCarrierCode() . '.log'))
                ->setFilterDataKeys($this->_debugReplacePrivateDataKeys)
                ->log($debugData);
         }
diff --git a/app/code/Magento/Sitemap/etc/module.xml b/app/code/Magento/Sitemap/etc/module.xml
index f5a5fb01d2e8b20d9b112f08b2a43b2d0097cd8d..82b24e7ad4e8546ccd993f0fdcf2f0104318344e 100755
--- a/app/code/Magento/Sitemap/etc/module.xml
+++ b/app/code/Magento/Sitemap/etc/module.xml
@@ -33,6 +33,8 @@
             <module name="Magento_Core"/>
             <module name="Magento_Eav"/>
             <module name="Magento_Cms"/>
+            <module name="Magento_Adminhtml"/>
+            <module name="Magento_Backend"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Tax/Model/Config/Source/TaxClass/Customer.php b/app/code/Magento/Tax/Model/Config/Source/TaxClass/Customer.php
index 5c2de68e174f465cdca1394b7c0d70dcdbaebbf3..dd9643b19a1b821edd62a65e0a2b8d4af6dde9a9 100644
--- a/app/code/Magento/Tax/Model/Config/Source/TaxClass/Customer.php
+++ b/app/code/Magento/Tax/Model/Config/Source/TaxClass/Customer.php
@@ -28,6 +28,11 @@ namespace Magento\Tax\Model\Config\Source\TaxClass;
 
 class Customer implements \Magento\Core\Model\Option\ArrayInterface
 {
+    /**
+     * @var \Magento\Tax\Model\TaxClass\Source\CustomerFactory
+     */
+    protected $_taxCustomerFactory;
+
     /**
      * @param \Magento\Tax\Model\TaxClass\Source\CustomerFactory $taxCustomerFactory
      */
diff --git a/app/code/Magento/Tax/Model/Resource/Calculation.php b/app/code/Magento/Tax/Model/Resource/Calculation.php
index 583e55c4afe710819f944f5e35e2ec4b6fec36ae..9569ab79a6e638fb24046e189b9373db440b1a3f 100644
--- a/app/code/Magento/Tax/Model/Resource/Calculation.php
+++ b/app/code/Magento/Tax/Model/Resource/Calculation.php
@@ -35,12 +35,12 @@ class Calculation extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Rates cache
      *
-     * @var unknown
+     * @var array
      */
     protected $_ratesCache              = array();
 
     /**
-     * Primery key auto increment flag
+     * Primary key auto increment flag
      *
      * @var bool
      */
@@ -61,12 +61,12 @@ class Calculation extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Class constructor
      *
-     * @param \Magento\Tax\Helper\DataProxy $taxData
+     * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Resource $resource
      */
     public function __construct(
-        \Magento\Tax\Helper\DataProxy $taxData,
+        \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Resource $resource
     ) {
diff --git a/app/code/Magento/Tax/etc/di.xml b/app/code/Magento/Tax/etc/di.xml
index b8255580f38e9ba83836d2c996de29f0eccd03dd..6d801af8a74778fcff00bd6f344333fc9a298f26 100644
--- a/app/code/Magento/Tax/etc/di.xml
+++ b/app/code/Magento/Tax/etc/di.xml
@@ -46,4 +46,9 @@
             </value>
         </param>
     </type>
+    <type name="Magento\Tax\Model\Resource\Calculation">
+        <param name="taxData">
+            <instance type="Magento\Tax\Helper\Data\Proxy" />
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Theme/etc/module.xml b/app/code/Magento/Theme/etc/module.xml
index 9bdb5676bb4829adb04c2bc85504880fc7e25f65..1078e7550e87b4722f3e235aa394e9bfb40d4c23 100755
--- a/app/code/Magento/Theme/etc/module.xml
+++ b/app/code/Magento/Theme/etc/module.xml
@@ -29,6 +29,7 @@
             <module name="Magento_Adminhtml"/>
             <module name="Magento_Core"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
index b5d156e0a967b725f0a9ce42aec037cd6f5596fc..be0ce2b8ee4e284af167c5479487967ce1989a18 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
@@ -537,7 +537,7 @@ class Dhl
     {
         $r = $this->_rawRequest;
 
-        $xml = $this->_xmlElFactory->create(array('<?xml version = "1.0" encoding = "UTF-8"?><eCommerce/>'));
+        $xml = $this->_xmlElFactory->create(array('data' => '<?xml version = "1.0" encoding = "UTF-8"?><eCommerce/>'));
         $xml->addAttribute('action', 'Request');
         $xml->addAttribute('version', '1.1');
 
@@ -1105,7 +1105,7 @@ class Dhl
     {
         $r = $this->_rawTrackRequest;
 
-        $xml = $this->_xmlElFactory->create(array('<?xml version = "1.0" encoding = "UTF-8"?><eCommerce/>'));
+        $xml = $this->_xmlElFactory->create(array('data' => '<?xml version = "1.0" encoding = "UTF-8"?><eCommerce/>'));
         $xml->addAttribute('action', 'Request');
         $xml->addAttribute('version', '1.1');
 
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php
index cc3b7dd7a40707c6dff51f32d74b75438a18551c..2b3e4bbeb9f32680c54b1c8aa01aba75a17e59e9 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php
@@ -889,7 +889,7 @@ class International
                 . 'xmlns:p2="http://www.dhl.com/DCTRequestdatatypes" '
                 . 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '
                 . 'xsi:schemaLocation="http://www.dhl.com DCT-req.xsd "/>';
-        $xml = $this->_xmlElFactory->create(array($xmlStr));
+        $xml = $this->_xmlElFactory->create(array('data' => $xmlStr));
         $nodeGetQuote = $xml->addChild('GetQuote', '', '');
         $nodeRequest = $nodeGetQuote->addChild('Request');
 
@@ -1332,7 +1332,7 @@ class International
             . ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
             . ' xsi:schemaLocation="http://www.dhl.com ship-val-req'
             . ($originRegion ? '_' . $originRegion : '') . '.xsd" />';
-        $xml = $this->_xmlElFactory->create(array($xmlStr));
+        $xml = $this->_xmlElFactory->create(array('data' => $xmlStr));
 
         $nodeRequest = $xml->addChild('Request', '', '');
         $nodeServiceHeader = $nodeRequest->addChild('ServiceHeader');
@@ -1615,7 +1615,7 @@ class International
             . ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
             . ' xsi:schemaLocation="http://www.dhl.com TrackingRequestKnown.xsd" />';
 
-        $xml = $this->_xmlElFactory->create(array($xmlStr));
+        $xml = $this->_xmlElFactory->create(array('data' => $xmlStr));
 
         $requestNode = $xml->addChild('Request', '', '');
         $serviceHeaderNode = $requestNode->addChild('ServiceHeader', '', '');
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
index d5ce02e989996c3aeb0b1311bb79a1c5f38aaea2..99311e7cf46fbf094021ce7f62cff05757a72db4 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
@@ -194,7 +194,7 @@ class Fedex
      */
     protected function _createSoapClient($wsdl, $trace = false)
     {
-        $client = new SoapClient($wsdl, array('trace' => $trace));
+        $client = new \SoapClient($wsdl, array('trace' => $trace));
         $client->__setLocation($this->getConfigFlag('sandbox_mode')
             ? 'https://wsbeta.fedex.com:443/web-services/rate'
             : 'https://ws.fedex.com:443/web-services/rate'
@@ -632,7 +632,7 @@ class Fedex
     {
         $r = $this->_rawRequest;
         $xml = $this->_xmlElFactory->create(
-            array('<?xml version = "1.0" encoding = "UTF-8"?><FDXRateAvailableServicesRequest/>')
+            array('data' => '<?xml version = "1.0" encoding = "UTF-8"?><FDXRateAvailableServicesRequest/>')
         );
 
         $xml->addAttribute('xmlns:api', 'http://www.fedex.com/fsmapi');
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
index eb1d0bb17acf78cd863b6aaeca8d1c32fba9b447..d2d6c912936d8b7bd15331cf2132634d460dc479 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
@@ -1440,7 +1440,7 @@ XMLAuth;
         }
 
         $xmlRequest = $this->_xmlElFactory->create(
-            array('<?xml version = "1.0" ?><ShipmentConfirmRequest xml:lang="en-US"/>')
+            array('data' => '<?xml version = "1.0" ?><ShipmentConfirmRequest xml:lang="en-US"/>')
         );
         $requestPart = $xmlRequest->addChild('Request');
         $requestPart->addChild('RequestAction', 'ShipConfirm');
@@ -1627,7 +1627,7 @@ XMLAuth;
     protected function _sendShipmentAcceptRequest(\Magento\Usa\Model\Simplexml\Element $shipmentConfirmResponse)
     {
         $xmlRequest = $this->_xmlElFactory->create(
-            array('<?xml version = "1.0" ?><ShipmentAcceptRequest/>')
+            array('data' => '<?xml version = "1.0" ?><ShipmentAcceptRequest/>')
         );
         $request = $xmlRequest->addChild('Request');
             $request->addChild('RequestAction', 'ShipAccept');
@@ -1652,7 +1652,7 @@ XMLAuth;
         }
 
         try {
-            $response = $this->_xmlElFactory->create(array($xmlResponse));
+            $response = $this->_xmlElFactory->create(array('data' => $xmlResponse));
         } catch (\Exception $e) {
             $debugData['result'] = array('error' => $e->getMessage(), 'code' => $e->getCode());
         }
@@ -1723,7 +1723,7 @@ XMLAuth;
         }
 
         try {
-            $response = $this->_xmlElFactory->create(array($xmlResponse));
+            $response = $this->_xmlElFactory->create(array('data' => $xmlResponse));
         } catch (\Exception $e) {
             $debugData['result'] = array('error' => $e->getMessage(), 'code' => $e->getCode());
             $result->setErrors($e->getMessage());
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups/Source/Mode.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups/Source/Mode.php
index 7227bbb88e37e141116f1d284f4b8328894e8442..b943623f688959bec12f870c876e6f88f7d9cc99 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups/Source/Mode.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups/Source/Mode.php
@@ -34,8 +34,11 @@
  */
 namespace Magento\Usa\Model\Shipping\Carrier\Ups\Source;
 
-class Mode extends \Magento\Core\Model\Option\ArrayInterface
+class Mode implements \Magento\Core\Model\Option\ArrayInterface
 {
+    /**
+     * @return array
+     */
     public function toOptionArray()
     {
         return array(
diff --git a/app/code/Magento/Usa/etc/adminhtml/system.xml b/app/code/Magento/Usa/etc/adminhtml/system.xml
index ebb11831a4e91d1296a983a55f219a6ccbf73b28..5819375f473d29629134238b59224fb861addcdd 100644
--- a/app/code/Magento/Usa/etc/adminhtml/system.xml
+++ b/app/code/Magento/Usa/etc/adminhtml/system.xml
@@ -95,7 +95,7 @@
                 </field>
                 <field id="shipment_requesttype" translate="label" type="select" sortOrder="85" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Packages Request Type</label>
-                    <source_model>Magento\Usa\Model\Shipping\Carrier\CarrierAbstract\Source\Requesttype</source_model>
+                    <source_model>Magento\Usa\Model\Shipping\Carrier\AbstractCarrier\Source\Requesttype</source_model>
                 </field>
                 <field id="shipment_type" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Shipment Type</label>
@@ -213,7 +213,7 @@
                 </field>
                 <field id="shipment_requesttype" translate="label" type="select" sortOrder="77" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Packages Request Type</label>
-                    <source_model>Magento\Usa\Model\Shipping\Carrier\CarrierAbstract\Source\Requesttype</source_model>
+                    <source_model>Magento\Usa\Model\Shipping\Carrier\AbstractCarrier\Source\Requesttype</source_model>
                 </field>
                 <field id="packaging" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Packaging</label>
@@ -308,7 +308,7 @@
                 </field>
                 <field id="shipment_requesttype" translate="label" type="select" sortOrder="47" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Packages Request Type</label>
-                    <source_model>Magento\Usa\Model\Shipping\Carrier\CarrierAbstract\Source\Requesttype</source_model>
+                    <source_model>Magento\Usa\Model\Shipping\Carrier\AbstractCarrier\Source\Requesttype</source_model>
                 </field>
                 <field id="container" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Container</label>
@@ -423,7 +423,7 @@
                 <field id="mode_xml" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Mode</label>
                     <comment>This enables or disables SSL verification of the Magento server by UPS.</comment>
-                    <source_model>Magento\Usa\Model\Shipping\Carrier\CarrierAbstract\Source\Mode</source_model>
+                    <source_model>Magento\Usa\Model\Shipping\Carrier\AbstractCarrier\Source\Mode</source_model>
                 </field>
                 <field id="debug" translate="label" type="select" sortOrder="920" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Debug</label>
@@ -455,11 +455,11 @@
                 </field>
                 <field id="mode" translate="label" type="select" sortOrder="54" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Mode</label>
-                    <source_model>Magento\Usa\Model\Shipping\Carrier\CarrierAbstract\Source\Mode</source_model>
+                    <source_model>Magento\Usa\Model\Shipping\Carrier\AbstractCarrier\Source\Mode</source_model>
                 </field>
                 <field id="shipment_requesttype" translate="label" type="select" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Packages Request Type</label>
-                    <source_model>Magento\Usa\Model\Shipping\Carrier\CarrierAbstract\Source\Requesttype</source_model>
+                    <source_model>Magento\Usa\Model\Shipping\Carrier\AbstractCarrier\Source\Requesttype</source_model>
                 </field>
                 <field id="container" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Container</label>
diff --git a/app/code/Magento/User/Model/User.php b/app/code/Magento/User/Model/User.php
index a57564aa8d19635aed9577984e59c1e527d3e319..04ce6a8df5020c37cf7ef38c38557e862c2aaa0b 100644
--- a/app/code/Magento/User/Model/User.php
+++ b/app/code/Magento/User/Model/User.php
@@ -226,7 +226,6 @@ class User
             '_emailInfoFactory',
             '_mailer',
         ));
-        return $properties;
     }
 
     public function __wakeup()
diff --git a/app/code/Magento/Webapi/etc/di.xml b/app/code/Magento/Webapi/etc/di.xml
index 9613f5019e87bc2f2ac730eb0c3073720fbda199..6272d448a15426002977c4d2ca61dc2233e7b306 100644
--- a/app/code/Magento/Webapi/etc/di.xml
+++ b/app/code/Magento/Webapi/etc/di.xml
@@ -140,13 +140,13 @@
             <value>
                 <webapi_rest>
                     <frontName>rest</frontName>
-                    <front_controller>Mage_Webapi_Controller_Rest</front_controller>
-                    <request_object>Mage_Webapi_Controller_Rest_Request</request_object>
+                    <front_controller>Magento\Webapi\Controller\Rest</front_controller>
+                    <request_object>Magento\Webapi\Controller\Rest\Request</request_object>
                 </webapi_rest>
                 <webapi_soap>
                     <frontName>soap</frontName>
-                    <front_controller>Mage_Webapi_Controller_Soap</front_controller>
-                    <request_object>Mage_Webapi_Controller_Soap_Request</request_object>
+                    <front_controller>Magento\Webapi\Controller\Soap</front_controller>
+                    <request_object>Magento\Webapi\Controller\Soap\Request</request_object>
                 </webapi_soap>
             </value>
         </param>
diff --git a/app/code/Magento/Webhook/etc/module.xml b/app/code/Magento/Webhook/etc/module.xml
index 4c84ad215b82b456ee26d5e719fbe3ebfbdb7a23..d935fd4b674ac0ce3fb6a350135456d73833387a 100755
--- a/app/code/Magento/Webhook/etc/module.xml
+++ b/app/code/Magento/Webhook/etc/module.xml
@@ -33,6 +33,8 @@
             <module name="Magento_Core"/>
             <module name="Magento_Webapi"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Page"/>
+            <module name="Magento_Adminhtml"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Weee/etc/module.xml b/app/code/Magento/Weee/etc/module.xml
index 4df44d2becb8ff74c799bb7d16d7b3c35f81a5a7..1d8ed69830ee4f0a56baeb19be85901fdb06e5ba 100644
--- a/app/code/Magento/Weee/etc/module.xml
+++ b/app/code/Magento/Weee/etc/module.xml
@@ -41,6 +41,7 @@
             <module name="Magento_Eav"/>
             <module name="Magento_Customer"/>
             <module name="Magento_Bundle"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Widget/etc/module.xml b/app/code/Magento/Widget/etc/module.xml
index c0d257757707a199925f94a3e2048fe4b10662ec..9122cc760288e7499d393ff41f4e6907b9036a72 100755
--- a/app/code/Magento/Widget/etc/module.xml
+++ b/app/code/Magento/Widget/etc/module.xml
@@ -34,6 +34,7 @@
             <module name="Magento_Core"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Catalog"/>
+            <module name="Magento_Page"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Wishlist/Model/Item.php b/app/code/Magento/Wishlist/Model/Item.php
index 02fda5e05c269c4470ef6912c2d44e3c66fca5ae..e38005e80c8f8ef84e5acb7ec1209f228161ae07 100644
--- a/app/code/Magento/Wishlist/Model/Item.php
+++ b/app/code/Magento/Wishlist/Model/Item.php
@@ -775,7 +775,7 @@ class Item extends \Magento\Core\Model\AbstractModel
             return $this;
         }
 
-        $options = $this->_wishlOptCollFactory->addItemFilter($this);
+        $options = $this->_wishlOptCollFactory->create()->addItemFilter($this);
         if ($optionsFilter) {
             $options->addFieldToFilter('code', $optionsFilter);
         }
diff --git a/app/code/Magento/Wishlist/etc/module.xml b/app/code/Magento/Wishlist/etc/module.xml
index 480e39c67c9887cb34ec32976d7f2192692d7112..f4ad413aaea3cabf6b1e1a310f3bce0e8d951d66 100755
--- a/app/code/Magento/Wishlist/etc/module.xml
+++ b/app/code/Magento/Wishlist/etc/module.xml
@@ -38,6 +38,7 @@
             <module name="Magento_Adminhtml"/>
             <module name="Magento_CatalogInventory"/>
             <module name="Magento_Tax"/>
+            <module name="Magento_Backend"/>
             <module name="Magento_Bundle" type="soft"/>
         </depends>
     </module>
diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/ResultTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/ResultTest.php
index 388746350826d56e70372a5c9cf70a18fef24333..9990ef1a1878d6050793db6a9f0c02901c5128a5 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/ResultTest.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/ResultTest.php
@@ -40,9 +40,8 @@ class ResultTest extends \Magento\TestFramework\TestCase\AbstractController
         $this->dispatch('catalogsearch/result');
 
         $responseBody = $this->getResponse()->getBody();
-
-        $this->assertNotContains('Search:', $responseBody);
-        $this->assertStringMatchesFormat('%aSuche%S:%a', $responseBody);
+        $this->assertNotContains('for="search">Search', $responseBody);
+        $this->assertStringMatchesFormat('%aSuche%S%a', $responseBody);
 
         $this->assertNotContains('Search entire store here...', $responseBody);
         $this->assertContains('Den gesamten Shop durchsuchen...', $responseBody);
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php
index dd328427aaca27121e9adff5e8256d02e81cb612..25af4cba213ed50de4916038e58fde859b3f637e 100644
--- a/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php
+++ b/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php
@@ -55,7 +55,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController
             'Magento\Checkout\Model\Session'
         );
 
-        $this->assertSelectCount('button.button.btn-cart[type="button"][title="Update Cart"]', 1, $response->getBody(),
+        $this->assertSelectCount('button[type="button"][title="Update Cart"]', 1, $response->getBody(),
             'Response for simple product doesn\'t contain "Update Cart" button');
     }
 
@@ -82,7 +82,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController
             'Magento\Checkout\Model\Session'
         );
 
-        $this->assertSelectCount('button.button.btn-cart[type="button"][title="Update Cart"]', 1, $response->getBody(),
+        $this->assertSelectCount('button[type="button"][title="Update Cart"]', 1, $response->getBody(),
             'Response for simple product with custom option doesn\'t contain "Update Cart" button');
 
         $this->assertSelectCount('input.product-custom-option[type="text"]', 1, $response->getBody(),
@@ -112,7 +112,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController
             'Magento\Checkout\Model\Session'
         );
 
-        $this->assertSelectCount('button.button.btn-cart[type="button"][title="Update Cart"]', 1, $response->getBody(),
+        $this->assertSelectCount('button[type="button"][title="Update Cart"]', 1, $response->getBody(),
             'Response for bundle product doesn\'t contain "Update Cart" button');
     }
 
@@ -139,10 +139,10 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController
             'Magento\Checkout\Model\Session'
         );
 
-        $this->assertSelectCount('button.button.btn-cart[type="button"][title="Update Cart"]', 1, $response->getBody(),
+        $this->assertSelectCount('button[type="button"][title="Update Cart"]', 1, $response->getBody(),
             'Response for downloadable product doesn\'t contain "Update Cart" button');
 
-        $this->assertSelectCount('ul#downloadable-links-list.options-list', 1, $response->getBody(),
+        $this->assertSelectCount('#downloadable-links-list', 1, $response->getBody(),
             'Response for downloadable product doesn\'t contain links for download');
     }
 
@@ -169,7 +169,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController
             'Magento\Checkout\Model\Session'
         );
 
-        $this->assertSelectCount('button.button.btn-cart[type="button"][title="Update Cart"]', 1, $response->getBody(),
+        $this->assertSelectCount('button[type="button"][title="Update Cart"]', 1, $response->getBody(),
             'Response for configurable product doesn\'t contain "Update Cart" button');
 
         $this->assertSelectCount('select.super-attribute-select', 1, $response->getBody(),
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php
index 2b5ef3710d28811596bb7804a7b28221955447b7..cca25c92aee51bfdbf2b0064ef9683ef27146bf7 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php
@@ -295,8 +295,8 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
     public function testAddContainerInvalidHtmlTag()
     {
         $msg = 'Html tag "span" is forbidden for usage in containers. ' .
-               'Consider to use one of the allowed: dd, div, dl, fieldset, header, hgroup, ol, p, section, table, ' .
-               'tfoot, ul.';
+               'Consider to use one of the allowed: dd, div, dl, fieldset, header, ' .
+               'footer, hgroup, ol, p, section, table, tfoot, ul.';
         $this->setExpectedException('Magento\Exception', $msg);
         $this->_layout->addContainer('container', 'Container', array('htmlTag' => 'span'));
     }
diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/Controller/Adminhtml/Downloadable/FileTest.php b/dev/tests/integration/testsuite/Magento/Downloadable/Controller/Adminhtml/Downloadable/FileTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..1cd8c927bbb22525d59afaf5a470e540b975290c
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Downloadable/Controller/Adminhtml/Downloadable/FileTest.php
@@ -0,0 +1,49 @@
+<?php
+namespace Magento\Downloadable\Controller\Adminhtml\Downloadable;
+/**
+ * Magento\Downloadable\Controller\Adminhtml\Downloadable\File
+ *
+ * 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) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @magentoAppArea adminhtml
+ */
+class FileTest extends \Magento\Backend\Utility\Controller
+{
+    public function testUploadAction()
+    {
+        copy(dirname(__DIR__) . '/_files/sample.txt', dirname(__DIR__) . '/_files/sample.tmp');
+        $_FILES = array(
+            'samples' => array(
+                'name' => 'sample.txt',
+                'type' => 'text/plain',
+                'tmp_name' => dirname(__DIR__) . '/_files/sample.tmp',
+                'error' => 0,
+                'size' => 0
+            )
+        );
+        
+        $this->dispatch('backend/admin/downloadable_file/upload/type/samples');
+        $body = $this->getResponse()->getBody();
+        $result = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Data')
+            ->jsonDecode($body);
+        $this->assertEquals(0, $result['error']);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/Controller/Adminhtml/_files/sample.txt b/dev/tests/integration/testsuite/Magento/Downloadable/Controller/Adminhtml/_files/sample.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php
index 2801e0dbdb6a6fbfc5fd2106490add65ef54c314..5eaa00a677e05022dbc606fbfaba3f2247d1fd0d 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php
@@ -39,15 +39,10 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
      */
     protected static $_tmpConfigFile = '';
 
-    /**
-     * @var \Magento\Install\Model\Installer
-     */
-    protected $_model;
-
     public static function setUpBeforeClass()
     {
         self::$_tmpDir = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Dir')
-            ->getDir(\Magento\Core\Model\Dir::VAR_DIR) . DIRECTORY_SEPARATOR . __CLASS__;
+            ->getDir(\Magento\Core\Model\Dir::VAR_DIR) . DIRECTORY_SEPARATOR . 'InstallerTest';
         self::$_tmpConfigFile = self::$_tmpDir . DIRECTORY_SEPARATOR . 'local.xml';
         mkdir(self::$_tmpDir);
     }
@@ -57,30 +52,27 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
         \Magento\Io\File::rmdirRecursive(self::$_tmpDir);
     }
 
-    protected function setUp()
-    {
-        $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Install\Model\Installer');
-    }
-
     /**
      * Emulate configuration directory for the installer config model.
      * Method usage should be accompanied with '@magentoAppIsolation enabled' because of the object manager pollution.
      *
-     * @param string $dir
+     * @param bool $emulateConfig
+     * @return \Magento\Install\Model\Installer
      */
-    protected function _emulateInstallerConfigDir($dir)
+    protected function _getModel($emulateConfig = false)
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $installerConfig = new \Magento\Install\Model\Installer\Config(
-            $objectManager->get('Magento\Install\Model\InstallerProxy'),
-            $objectManager->get('Magento\Core\Controller\Request\Http'),
-            new \Magento\Core\Model\Dir(__DIR__, array(), array(\Magento\Core\Model\Dir::CONFIG => $dir)),
-            $objectManager->get('Magento\Core\Model\Config\Resource'),
-            new \Magento\Filesystem(new \Magento\Filesystem\Adapter\Local()),
-            $objectManager->get('Magento\Core\Model\StoreManager')
-        );
-        $objectManager->addSharedInstance($installerConfig, 'Magento\Install\Model\Installer\Config');
+        if ($emulateConfig) {
+            $installerConfig = new \Magento\Install\Model\Installer\Config(
+                $objectManager->get('Magento\Install\Model\InstallerProxy'),
+                $objectManager->get('Magento\Core\Controller\Request\Http'),
+                new \Magento\Core\Model\Dir(__DIR__, array(), array(\Magento\Core\Model\Dir::CONFIG => self::$_tmpDir)),
+                new \Magento\Filesystem(new \Magento\Filesystem\Adapter\Local()),
+                $objectManager->get('Magento\Core\Model\StoreManager')
+            );
+            $objectManager->addSharedInstance($installerConfig, 'Magento\Install\Model\Installer\Config');
+        }
+        return $objectManager->create('Magento\Install\Model\Installer');
     }
 
     /**
@@ -103,7 +95,7 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
         $user->loadByUsername($userName);
         $this->assertEmpty($user->getId());
 
-        $this->_model->createAdministrator($userData + array('password' => $userPassword));
+        $this->_getModel()->createAdministrator($userData + array('password' => $userPassword));
 
         $user->loadByUsername($userName);
         $this->assertNotEmpty($user->getId());
@@ -122,16 +114,13 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
      */
     public function testInstallEncryptionKey()
     {
-        $this->_emulateInstallerConfigDir(self::$_tmpDir);
-
         $keyPlaceholder = \Magento\Install\Model\Installer\Config::TMP_ENCRYPT_KEY_VALUE;
         $fixtureConfigData = "<key>$keyPlaceholder</key>";
         $expectedConfigData = '<key>d41d8cd98f00b204e9800998ecf8427e</key>';
 
         file_put_contents(self::$_tmpConfigFile, $fixtureConfigData);
         $this->assertEquals($fixtureConfigData, file_get_contents(self::$_tmpConfigFile));
-        $this->markTestIncomplete('MAGETWO-13717');
-        $this->_model->installEncryptionKey('d41d8cd98f00b204e9800998ecf8427e');
+        $this->_getModel(true)->installEncryptionKey('d41d8cd98f00b204e9800998ecf8427e');
         $this->assertEquals($expectedConfigData, file_get_contents(self::$_tmpConfigFile));
     }
 
@@ -142,11 +131,7 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
      */
     public function testInstallEncryptionKeySizeViolation()
     {
-        $this->markTestIncomplete('MAGETWO-13717');
-        // isolate the application from the configuration pollution, if the test fails
-        $this->_emulateInstallerConfigDir(self::$_tmpDir);
-
-        $this->_model->installEncryptionKey(str_repeat('a', 57));
+        $this->_getModel(true)->installEncryptionKey(str_repeat('a', 57));
     }
 
     /**
@@ -155,7 +140,7 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
     public function testGetValidEncryptionKey()
     {
         $validKey = 'abcdef1234567890';
-        $this->assertEquals($validKey, $this->_model->getValidEncryptionKey($validKey));
+        $this->assertEquals($validKey, $this->_getModel()->getValidEncryptionKey($validKey));
     }
 
     /**
@@ -165,8 +150,7 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetValidEncryptionKeySizeViolation()
     {
-        $this->markTestIncomplete('MAGETWO-13717');
-        $this->_model->getValidEncryptionKey(str_repeat('1', 57));
+        $this->_getModel()->getValidEncryptionKey(str_repeat('1', 57));
     }
 
     /**
@@ -174,9 +158,10 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetValidEncryptionKeyRandom()
     {
-        $actualKey = $this->_model->getValidEncryptionKey();
+        $model = $this->_getModel();
+        $actualKey = $model->getValidEncryptionKey();
         $this->assertRegExp('/^[a-f0-9]{32}$/', $actualKey);
-        $this->assertNotEquals($actualKey, $this->_model->getValidEncryptionKey());
+        $this->assertNotEquals($actualKey, $model->getValidEncryptionKey());
     }
 
     /**
@@ -185,11 +170,10 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
      */
     public function testFinish()
     {
-        $this->_emulateInstallerConfigDir(self::$_tmpDir);
         $configFile = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir() . '/etc/local.xml';
         copy($configFile, self::$_tmpConfigFile);
 
-        $this->_model->finish();
+        $this->_getModel(true)->finish();
 
         /** @var $cacheState \Magento\Core\Model\Cache\StateInterface */
         $cacheState = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php
index f5fcd15bc89214c466fd09c16084d390182c7fd1..f6a360bd8acba8965f4b0bc67a7ba0c8fb63f7a2 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php
@@ -163,7 +163,8 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
         $errors = array();
         foreach ($handles as $node) {
             if (!$node->xpath('@label')) {
-                $errors[] = $node->getName();
+                $nodeId = $node->getAttribute('id') ? ' id=' . $node->getAttribute('id') : '';
+                $errors[] = $node->getName() . $nodeId;
             }
         }
         if ($errors) {
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/UsaConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/UsaConfigFilesTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..6a40895fee7a25cf4657d0b77c87d4cc17a6bf4b
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/UsaConfigFilesTest.php
@@ -0,0 +1,67 @@
+<?php
+namespace Magento\Test\Integrity\Modular;
+
+/**
+ * Test configuration of Usa shipping carriers
+ *
+ * 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) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+class UsaConfigFilesTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Backend\Model\Config\Structure\Reader
+     */
+    protected $_reader;
+
+    protected function setUp()
+    {
+        $moduleReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->create('Magento\Core\Model\Config\Modules\Reader');
+        $schemaFile = $moduleReader->getModuleDir('etc', 'Magento_Backend') . '/system.xsd';
+        $this->_reader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->create(
+                'Magento\Backend\Model\Config\Structure\Reader',
+                array(
+                    'perFileSchema' => $schemaFile,
+                    'isValidated' => true,
+                )
+            );
+    }
+
+    /**
+     * Tests that all source_models used in shipping are valid
+     */
+    public function testValidateShippingSourceModels()
+    {
+        $config = $this->_reader->read('adminhtml');
+
+        $carriers = $config['config']['system']['sections']['carriers']['children'];
+        foreach ($carriers as $carrier) {
+            foreach ($carrier['children'] as $field) {
+                if (isset($field['source_model'])) {
+                    $model = $field['source_model'];
+                    \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($model);
+                }
+            }
+        }
+    }
+}
diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php
index 1f631b584305e18bd3375a18468dbd9d1b62f766..beb8d5f0a172e9d3a4ca40e430ca37aa461e6d5f 100644
--- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php
+++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer.php
@@ -79,6 +79,16 @@ class CodeSniffer
         return class_exists('PHP_CodeSniffer_CLI');
     }
 
+    /**
+     * Return the version of code sniffer found
+     *
+     * @return string
+     */
+    public function version()
+    {
+        return $this->_wrapper->version();
+    }
+
     /**
      * Run tool for files cpecified
      *
diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer/Wrapper.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer/Wrapper.php
index ccca152f91f996d1de592ed8337049cead9f4237..9d56d3615410b0acafe08f541c838d6fa3be5395 100644
--- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer/Wrapper.php
+++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer/Wrapper.php
@@ -43,4 +43,19 @@ class Wrapper extends \PHP_CodeSniffer_CLI
         $this->values = $values;
         return $this;
     }
+
+    /**
+     * Return the current version of php code sniffer
+     *
+     * @return string
+     */
+    public function version()
+    {
+        $version = '0.0.0';
+        if (defined('\PHP_CodeSniffer::VERSION')) {
+            $phpcs = new \PHP_CodeSniffer();
+            $version = $phpcs::VERSION;
+        }
+        return $version;
+    }
 }
diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php
index 5cbf0f19a63c74b669f19b691bc261dbb6822222..06b09396f00d9647fedb60be97f44565b3b0c09d 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php
@@ -232,7 +232,7 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
     /**
      * Check dependencies for <block> element
      *
-     * Ex.: <block type="{name}">
+     * Ex.: <block class="{name}">
      *      <block template="{path}">
      *
      * @param $currentModule
@@ -247,7 +247,7 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
     {
         $patterns = array(
             \Magento\Test\Integrity\DependencyTest::TYPE_HARD =>
-            '/(?<source><block.*type\s*=\s*[\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
+            '/(?<source><block.*class\s*=\s*[\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
                 . '(?<module>[A-Z][a-zA-Z]+)[_\\\\](?:[A-Z][a-zA-Z]+[_\\\\]?){1,}[\'"].*>)/',
             \Magento\Test\Integrity\DependencyTest::TYPE_SOFT =>
             '/(?<source><block.*template\s*=\s*[\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
index cf6ecae8fcebe4f9d37194f2003e16e431da5dfc..7b216e89a8b5b8618dace521dffb46c8741313a7 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
@@ -153,15 +153,15 @@ class Files
     /**
      * Returns list of files, where expected to have class declarations
      *
+     * @param bool $asDataSet
      * @return array
      */
-    public function getClassFiles()
+    public function getClassFiles($asDataSet = true)
     {
         $key = __METHOD__ . $this->_path;
         if (isset(self::$_cache[$key])) {
-            return self::$_cache[$key];
-        }
-        if (!isset(self::$_cache[$key])) {
+            $files =  self::$_cache[$key];
+        } elseif (!isset(self::$_cache[$key])) {
             $files = array_merge(
                 self::_getFiles(array("{$this->_path}/app/code/Magento"), '*.php'),
                 self::_getFiles(array("{$this->_path}/dev/tests"), '*.php'),
@@ -170,10 +170,12 @@ class Files
                 self::_getFiles(array("{$this->_path}/downloader/lib/Magento"), '*.php'),
                 self::_getFiles(array("{$this->_path}/lib/Magento"), '*.php')
             );
+            self::$_cache[$key] = $files;
         }
-        $result = self::composeDataSets($files);
-        self::$_cache[$key] = $result;
-        return $result;
+        if ($asDataSet) {
+            return self::composeDataSets($files);
+        }
+        return $files;
     }
 
     /**
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
index 9359200e15b5b6d7b17e046fa3e256e1d46f481d..c1809ec194fdb3ab033345a44f54eb8eee9c4891 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
@@ -530,13 +530,19 @@ class ObsoleteCodeTest extends \PHPUnit_Framework_TestCase
      */
     public function mageObsoleteDataProvider()
     {
-        $modules = include(__DIR__ . '/_files/' . 'mage_cleaned_modules.php');
-        $result = array();
-        foreach ($modules as $module) {
-            $result = array_merge_recursive(
-                $result, \Magento\TestFramework\Utility\Files::init()->getModulePhpFiles($module)
-            );
+        $blackList = include(
+            __DIR__ . DIRECTORY_SEPARATOR .'_files'
+            . DIRECTORY_SEPARATOR . 'blacklist'
+            . DIRECTORY_SEPARATOR . 'obsolete_mage.php'
+        );
+        $ignored = array();
+        $appPath = \Magento\TestFramework\Utility\Files::init()->getPathToSource();
+        foreach ($blackList as $file) {
+            $ignored[] = realpath($appPath . DIRECTORY_SEPARATOR . $file);
         }
-        return $result;
+        $files = \Magento\TestFramework\Utility\Files::init()->getClassFiles(false);
+        $files = array_map('realpath', $files);
+        $files = array_diff($files, $ignored);
+        return \Magento\TestFramework\Utility\Files::composeDataSets($files);
     }
 }
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/mage_cleaned_modules.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/blacklist/obsolete_mage.php
similarity index 66%
rename from dev/tests/static/testsuite/Magento/Test/Legacy/_files/mage_cleaned_modules.php
rename to dev/tests/static/testsuite/Magento/Test/Legacy/_files/blacklist/obsolete_mage.php
index ad0e9b1b41447619253b0b0e20bf0ab512987ecb..fbaf6c6624015db1ddc8bcde12a91ece6a9dd34d 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/mage_cleaned_modules.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/blacklist/obsolete_mage.php
@@ -22,15 +22,12 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 return array(
-    'Invitation',
-    'GiftCardAccount',
-    'FullPageCache',
-    'Authorizenet',
-    'Backup',
-    //'Banner', Banner is commented because of ResourceHelper usage, which would be delivered later
-    'GiftRegistry',
-    'Reports',
-    'Invitation',
-    //'Reminder' commented because of ResourceHelper usage, which would be delivered later
-    'Install',
+    'downloader/app/Magento/Downloader/Controller.php',
+    'dev/tools/Magento/Tools/Translate/TranslateTool.php',
+    'dev/tools/Magento/Tools/Translate/generate.php',
+    'dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php',
+    'dev/tests/static/framework/Magento/TestFramework/Dependency/TemplateRule.php',
+    'downloader/app/Magento/Downloader/Model/Session.php',
+    'downloader/lib/Magento/Backup/Db.php',
+    'downloader/lib/Magento/Backup/Snapshot.php',
 );
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php
index c5c9424390400ebbb5e8d737a9821791f2643ea9..d77cc99e43a8c531f3915e19a6c05bda0a900d94 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php
@@ -1006,4 +1006,10 @@ return array(
     array('Magento\Poll\Model\Resource\Poll\Collection'),
     array('Magento\Poll\Model\Resource\Poll\Vote'),
     array('Mage:'),
+    array('Magento\Backup', 'Magento\Backup\Factory'),
+    array('Magento\Sales\Model\Resource\Order\Attribute\Backend\Parent'),
+    array('Magento\Sales\Model\Resource\Order\Creditmemo\Attribute\Backend\Parent'),
+    array('Magento\Sales\Model\Resource\Order\Invoice\Attribute\Backend\Parent'),
+    array('Magento\Sales\Model\Resource\Order\Shipment\Attribute\Backend\Parent'),
+    array('Magento\Sales\Model\Resource\Quote\Address\Attribute\Backend\Parent'),
 );
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php
index 1f9d85db7a19da3b8bd4c6afdfdc1d68c40e9c51..8932969888c0707dc74a8f1391ef52294d621eeb 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php
@@ -61,6 +61,9 @@ return array(
     ),
     array('DEFAULT_CURRENCY', 'Magento\Core\Model\Locale', 'Magento_Core_Model_LocaleInterface::DEFAULT_CURRENCY'),
     array('DEFAULT_ERROR_HANDLER', 'Magento\Core\Model\App'),
+    array('DEFAULT_READ_CONNECTION', 'Magento\Core\Model\Config\Resource'),
+    array('DEFAULT_WRITE_CONNECTION', 'Magento\Core\Model\Config\Resource'),
+    array('DEFAULT_ERROR_HANDLER', 'Mage'),
     array('DEFAULT_LOCALE', 'Magento\Core\Model\Locale', 'Magento_Core_Model_LocaleInterface::DEFAULT_LOCALE'),
     array('DEFAULT_THEME_NAME', 'Magento\Core\Model\Design\PackageInterface'),
     array('DEFAULT_THEME_NAME', 'Magento\Core\Model\Design\Package'),
@@ -136,6 +139,7 @@ return array(
     array('XML_PATH_BACKEND_FRONTNAME', 'Mage_Backend_Helper_Data'),
     array('XML_PATH_CACHE_BETA_TYPES'),
     array('XML_PATH_CHECK_EXTENSIONS', 'Magento\Install\Model\Config'),
+    array('XML_PATH_CONNECTION_TYPE', 'Magento\Core\Model\Config\Resource'),
     array('XML_PATH_CONTEXT_MENU_LAYOUTS', 'Magento\VersionsCms\Model\Hierarchy\Config'),
     array('XML_PATH_COUNTRY_DEFAULT', 'Magento\Paypal\Model\System\Config\Backend\MerchantCountry'),
     array('XML_PATH_DEFAULT_COUNTRY', 'Magento\Core\Model\Locale'),
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
index a1430b77beedc5f957ef48026b3a3356bd1f339f..5156892402480fedc8d0141eaf4b52519f41a50a 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
@@ -739,7 +739,10 @@ return array(
     array('_prepareOptionValues', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
     array('_getOptionValuesCollection', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
     array(' _prepareSystemAttributeOptionValues', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
-    array('_prepareUserDefinedAttributeOptionValues', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
+    array(
+        '_prepareUserDefinedAttributeOptionValues',
+        'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'
+    ),
     array('getLabelValues', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
     array('getStoreOptionValues', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
     array('getAttributeObject', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
@@ -781,7 +784,11 @@ return array(
     array('_getProduct', 'Magento\Adminhtml\Block\Catalog\Product\Edit\Tab\Crosssell', 'getProduct'),
     array('_getProduct', 'Magento\Adminhtml\Block\Catalog\Product\Edit\Tab\Related', 'getProduct'),
     array('_getProduct', 'Magento\Adminhtml\Block\Catalog\Product\Edit\Tab\Upsell', 'getProduct'),
-    array('_renderCellTemplate', 'Magento\Backend\Block\System\Config\Form\Field\Array\AbstractArray', 'renderCellTemplate'),
+    array(
+        '_renderCellTemplate',
+        'Magento\Backend\Block\System\Config\Form\Field\Array\AbstractArray',
+        'renderCellTemplate'
+    ),
     array('_showSingle', 'Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option', 'showSingle'),
     array('_getDefaultValues', 'Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option', 'getDefaultValues'),
     array('_isSelected', 'Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option', 'isSelected'),
@@ -864,5 +871,8 @@ return array(
     array('getIsSerializable', 'Magento\Core\Model\App\State'),
     array('_getInventoryItemResource', 'Magento\Reports\Model\Resource\Product\Lowstock\Collection'),
     array('getMigrationInstance', 'Magento\Customer\Model\Resource\Setup', '$this->_migrationFactory->create()'),
+    array('turnOnReadCommittedMode', 'Magento\Backup\Model\Resource\Db'),
+    array('turnOnSerializableMode', 'Magento\Backup\Model\Resource\Db', 'prepareTransactionIsolationLevel'),
     array('_getResourceModel', '\Magento\Webapi\Model\Source\Acl\Role', '$this->_resource'),
+    array('_getSession', '\Magento\Adminhtml\Model\Giftmessage\Save', '$this->_session'),
 );
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php
index ae22674417b89af3e04a25de16349be2e525a6f5..e2a46c7a08874ff4c170df112e82990907b815f3 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php
@@ -100,4 +100,5 @@ return array(
     array('static', 'Magento\Core\Model\Email\Template\Filter'),
     array('_useAnalyticFunction'),
     array('_defaultIndexer', 'Magento\CatalogInventory\Model\Resource\Indexer\Stock'),
+    array('_engine', 'Magento\CatalogSearch\Model\Resource\Fulltext'),
 );
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml
index ee195ccf54cde075c99d515b237f773383178346..b62dfb5e8c88005b85c8c759ce58c48799d0218e 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml
@@ -46,7 +46,7 @@
     </words>
     <whitelist>
         <item>
-            <path>CHANGELOG.markdown</path>
+            <path>CHANGELOG.md</path>
         </item>
         <item>
             <path>app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php</path>
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest.php b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest.php
index d98fb38e74ac240136aea4f0a04a17a099400fd6..62a0318f787a8f491e5c501242d17d001adc6b58 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest.php
@@ -48,7 +48,7 @@ class CodeStyleTest extends \PHPUnit_Framework_TestCase
         self::$_reportFile = __DIR__ . '/../../../tmp/phpcs_report.xml';
         $wrapper = new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer\Wrapper();
         self::$_cmd = new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer(
-            realpath(__DIR__ . '/../CodeStyleTest/phpcs'), self::$_reportFile, $wrapper
+            realpath(__DIR__ . '/../_files/phpcs'), self::$_reportFile, $wrapper
         );
     }
 
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php
index 72733fd91ade58eea05ec4afe23e7ad180996208..250a4e001012b9740582ab5ce59cef64b3880367 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php
@@ -46,28 +46,74 @@ class LiveCodeTest extends \PHPUnit_Framework_TestCase
      */
     protected static $_blackList = array();
 
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass() 
     {
         self::$_reportDir = \Magento\TestFramework\Utility\Files::init()->getPathToSource()
             . '/dev/tests/static/report';
         if (!is_dir(self::$_reportDir)) {
             mkdir(self::$_reportDir, 0777);
         }
-        self::$_whiteList = self::_readLists(__DIR__ . '/_files/whitelist/*.txt');
-        self::$_blackList = self::_readLists(__DIR__ . '/_files/blacklist/*.txt');
+        self::setupFileLists();
+    }
+
+    public static function setupFileLists($type = '')
+    {
+        if ($type != '' && !preg_match('/\/$/', $type)) {
+            $type = $type . '/';
+        }
+        self::$_whiteList = self::_readLists(__DIR__ . '/_files/'.$type.'whitelist/*.txt');
+        self::$_blackList = self::_readLists(__DIR__ . '/_files/'.$type.'blacklist/*.txt');
+    }
+
+    public function testCodeStylePsr2()
+    {
+        $this->markTestSkipped('Skipped');
+        $reportFile = self::$_reportDir . '/phpcs_psr2_report.xml';
+        $wrapper = new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer\Wrapper();
+        $codeSniffer = new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer(
+            'PSR2',
+            $reportFile,
+            $wrapper
+        );
+        if (!$codeSniffer->canRun()) {
+            $this->markTestSkipped('PHP Code Sniffer is not installed.');
+        }
+        if (version_compare($codeSniffer->version(), '1.4.7') === -1) {
+            $this->markTestSkipped('PHP Code Sniffer Build Too Old.');
+        }
+        self::setupFileLists('phpcs');
+        $result = $codeSniffer->run(self::$_whiteList, self::$_blackList, array('php'));
+        $this->assertFileExists($reportFile, 'Expected '.$reportFile.' to be created by phpcs run with PSR2 standard');
+        // disabling the assertEquals below to allow the test to not fail but just report PSR2 violations to everyone.
+        // It should be uncommented once compliance is required.
+        /*
+        $this->assertEquals(
+            0,
+            $result,
+            "PHP Code Sniffer has found $result error(s): See detailed report in $reportFile"
+        );
+         */
+        // Remove this echo when the assert can be uncommented out.
+        echo "PHP Code Sniffer has found $result error(s): See detailed report in $reportFile";
     }
 
     public function testCodeStyle()
     {
         $reportFile = self::$_reportDir . '/phpcs_report.xml';
         $wrapper = new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer\Wrapper();
-        $codeSniffer = new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer(realpath(__DIR__ . '/_files/phpcs'),
-            $reportFile, $wrapper);
+        $codeSniffer = new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer(
+            realpath(__DIR__ . '/_files/phpcs'),
+            $reportFile,
+            $wrapper
+        );
         if (!$codeSniffer->canRun()) {
             $this->markTestSkipped('PHP Code Sniffer is not installed.');
         }
-        $result = $codeSniffer->run(self::$_whiteList, self::$_blackList, array('php', 'phtml'));
-        $this->assertEquals(0, $result,
+        self::setupFileLists();
+        $result = $codeSniffer->run(self::$_whiteList, self::$_blackList, array('php','phtml'));
+        $this->assertEquals(
+            0,
+            $result,
             "PHP Code Sniffer has found $result error(s): See detailed report in $reportFile"
         );
     }
@@ -76,15 +122,18 @@ class LiveCodeTest extends \PHPUnit_Framework_TestCase
     {
         $reportFile = self::$_reportDir . '/phpmd_report.xml';
         $codeMessDetector = new \Magento\TestFramework\CodingStandard\Tool\CodeMessDetector(
-            realpath(__DIR__ . '/_files/phpmd/ruleset.xml'), $reportFile
+            realpath(__DIR__ . '/_files/phpmd/ruleset.xml'),
+            $reportFile
         );
 
         if (!$codeMessDetector->canRun()) {
             $this->markTestSkipped('PHP Mess Detector is not available.');
         }
 
+        self::setupFileLists();
         $this->assertEquals(
-            \PHP_PMD_TextUI_Command::EXIT_SUCCESS, $codeMessDetector->run(self::$_whiteList, self::$_blackList),
+            \PHP_PMD_TextUI_Command::EXIT_SUCCESS,
+            $codeMessDetector->run(self::$_whiteList, self::$_blackList),
             "PHP Code Mess has found error(s): See detailed report in $reportFile"
         );
     }
@@ -99,12 +148,14 @@ class LiveCodeTest extends \PHPUnit_Framework_TestCase
             $this->markTestSkipped('PHP Copy/Paste Detector is not available.');
         }
 
+        self::setupFileLists();
         $blackList = array();
         foreach (glob(__DIR__ . '/_files/phpcpd/blacklist/*.txt') as $list) {
             $blackList = array_merge($blackList, file($list, FILE_IGNORE_NEW_LINES));
         }
 
-        $this->assertTrue($copyPasteDetector->run(array(), $blackList),
+        $this->assertTrue(
+            $copyPasteDetector->run(array(), $blackList),
             "PHP Copy/Paste Detector has found error(s): See detailed report in $reportFile"
         );
     }
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt
index 81ec9c9c993b8f613bd44a75d9bed930aa946331..fa947c421f394c9a9241d37c4d1cca792e0e830c 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt
@@ -31,13 +31,18 @@ dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
 dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/_files
 lib/Magento/Archive
 lib/Magento/Autoload/Simple.php
-lib/Magento/Backup.php
 lib/Magento/Backup
 lib/Magento/Cache/Backend/Database.php
 lib/Magento/Cache/Backend/Eaccelerator.php
 lib/Magento/Cache/Backend/Memcached.php
 lib/Magento/Cache/Core.php
+lib/Magento/Code/Generator.php
+lib/Magento/Code/Generator/EntityAbstract.php
+lib/Magento/Code/Generator/Io.php
 lib/Magento/Connect
+lib/Magento/Convert/ConvertException.php
+lib/Magento/Convert/Mapper/Column.php
+lib/Magento/Convert/Mapper/MapperInterface.php
 lib/Magento/DB
 lib/Magento/Data/Collection.php
 lib/Magento/Data/Collection/Db.php
@@ -89,7 +94,6 @@ lib/Magento/Data/Tree/Node.php
 lib/Magento/Data/Tree/Node/Collection.php
 lib/Magento/Date.php
 lib/Magento/Debug.php
-lib/Magento/Event.php
 lib/Magento/Event
 lib/Magento/File/Csv.php
 lib/Magento/File/CsvMulty.php
@@ -105,16 +109,14 @@ lib/Magento/HTTP/Handler/Composite.php
 lib/Magento/HTTP/HandlerFactory.php
 lib/Magento/HTTP/HandlerInterface.php
 lib/Magento/HTTP/IClient.php
-lib/Magento/Image.php
 lib/Magento/Image
 lib/Magento/Io
-lib/Magento/Object.php
 lib/Magento/Object
-lib/Magento/Pear.php
 lib/Magento/Pear
 lib/Magento/Simplexml
 lib/Magento/System
 lib/Magento/Util.php
 lib/Magento/Validator
 lib/Magento/Xml
-dev/tools/Magento/Tools/I18n/Zend
\ No newline at end of file
+dev/tests/unit/testsuite/Magento/Code/Plugin/GeneratorTest/SimpleObjectManager.php
+dev/tools/Magento/Tools/I18n/Zend
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b08b6286eb5c1f86c7296a514eab1ab5bda4ff1c
--- /dev/null
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt
@@ -0,0 +1,40 @@
+# Files or directories that are excluded from static code analysis for any reason
+# Glob patterns are supported
+# Overrides the white list
+#
+# Formatter intorduces long line
+app/bootstrap.php
+# Formatter intorduces long line
+app/code/Magento/Adminhtml/Block/Catalog/Product/Edit/NewCategory.php
+# Formatter intorduces long line
+app/code/Magento/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Search.php
+# Formatter intorduces long line
+app/code/Magento/Adminhtml/Block/Catalog/Product/Helper/Form/Category.php
+# Formatter intorduces long line
+app/code/Magento/Adminhtml/Block/Catalog/Product/Helper/Form/Weight.php
+# Formatter intorduces long line
+app/code/Magento/Adminhtml/Block/Catalog/Product/Options/Ajax.php
+# Formatter intorduces long line
+app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
+# Formatter intorduces long line
+app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php
+# Formatter intorduces long line
+app/code/Magento/Adminhtml/Block/System/Store/Edit.php
+# Not magento code
+app/code/Zend
+# Not magento code
+dev/tools/Magento/Tools/I18n/Zend
+# Not required to scan build director
+dev/build
+# Not magento code
+dev/tools/layout
+# Not magento code
+dev/tools/xml
+# PSR-1 not applied to
+dev/tests/functional
+# PSR-1 not applied to
+dev/tests/js
+# Example files that are expected to fail code sniffer
+dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input
+# Example files that are expected to fail code mess detector
+dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt
new file mode 100644
index 0000000000000000000000000000000000000000..899db1d40995b37966795f0b45b220f372a50d20
--- /dev/null
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt
@@ -0,0 +1,9 @@
+# Files or directories that are included into php code sniffer analysis
+# Glob patterns are supported
+#
+app/
+dev/
+index.php
+lib/Magento
+downloader/lib/Magento
+downloader/app/Magento
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
index bf5beb02090a46370e15a100f107011edad4f9d8..b3699045d21975722479b1c6d95a083e89904ac8 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
@@ -158,7 +158,9 @@ dev/tests/performance
 dev/tests/static
 dev/tests/unit
 dev/tools
+lib/Magento/Backup/Db
+lib/Magento/Backup/Factory.php
+lib/Magento/Cache/Core.php
 lib/Magento/Convert
 lib/Magento/Date.php
 lib/Magento/Object.php
-lib/Magento/Cache/Core.php
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..7e109704e46603aa210117da68872d59f8844fbf
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php
@@ -0,0 +1,88 @@
+<?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.
+ *
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Backend\Block\Widget\Grid\Column\Renderer\Radio;
+
+class ExtendedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Extended
+     */
+    protected $_object;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_converter;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_column;
+
+    protected function setUp()
+    {
+        $context = $this->getMock('\Magento\Backend\Block\Context', array(), array(), '', false);
+        $this->_converter = $this->getMock(
+            '\Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Converter',
+            array('toFlatArray'), array(), '', false
+        );
+        $this->_column = $this->getMock(
+            'Magento\Backend\Block\Widget\Grid\Column',
+            array('getValues', 'getIndex', 'getHtmlName'), array(), '', false
+        );
+        $this->_object = new Extended($context, $this->_converter);
+        $this->_object->setColumn($this->_column);
+    }
+
+    /**
+     * @param array $rowData
+     * @param string $expectedResult
+     * @dataProvider renderDataProvider
+     */
+    public function testRender(array $rowData, $expectedResult)
+    {
+        $selectedFlatArray = array(
+            1 => 'One',
+        );
+        $this->_column->expects($this->once())->method('getValues')->will($this->returnValue($selectedFlatArray));
+        $this->_column->expects($this->once())->method('getIndex')->will($this->returnValue('label'));
+        $this->_column->expects($this->once())->method('getHtmlName')->will($this->returnValue('test[]'));
+        $this->_converter->expects($this->never())->method('toFlatArray');
+        $this->assertEquals($expectedResult, $this->_object->render(new \Magento\Object($rowData)));
+    }
+
+    public function renderDataProvider()
+    {
+        return array(
+            'checked' => array(
+                array('id' => 1, 'label' => 'One'),
+                '<input type="radio" name="test[]" value="1" class="radio" checked="checked"/>'
+            ),
+            'not checked' => array(
+                array('id' => 2, 'label' => 'Two'),
+                '<input type="radio" name="test[]" value="2" class="radio"/>'
+            ),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/RadioTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/RadioTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d0830ac837964771c3d22f27a146fc789952b9a7
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/RadioTest.php
@@ -0,0 +1,96 @@
+<?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.
+ *
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Backend\Block\Widget\Grid\Column\Renderer;
+
+class RadioTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Radio
+     */
+    protected $_object;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_converter;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_column;
+
+    protected function setUp()
+    {
+        $context = $this->getMock('\Magento\Backend\Block\Context', array(), array(), '', false);
+        $this->_converter = $this->getMock(
+            '\Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Converter',
+            array('toFlatArray'), array(), '', false
+        );
+        $this->_column = $this->getMock(
+            'Magento\Backend\Block\Widget\Grid\Column',
+            array('getValues', 'getIndex', 'getHtmlName'), array(), '', false
+        );
+        $this->_object = new Radio($context, $this->_converter);
+        $this->_object->setColumn($this->_column);
+    }
+
+    /**
+     * @param array $rowData
+     * @param string $expectedResult
+     * @dataProvider renderDataProvider
+     */
+    public function testRender(array $rowData, $expectedResult)
+    {
+        $selectedTreeArray = array(
+            array('value' => 1, 'label' => 'One')
+        );
+        $selectedFlatArray = array(
+            1 => 'One',
+        );
+        $this->_column->expects($this->once())->method('getValues')->will($this->returnValue($selectedTreeArray));
+        $this->_column->expects($this->once())->method('getIndex')->will($this->returnValue('label'));
+        $this->_column->expects($this->once())->method('getHtmlName')->will($this->returnValue('test[]'));
+        $this->_converter
+            ->expects($this->once())
+            ->method('toFlatArray')
+            ->with($selectedTreeArray)
+            ->will($this->returnValue($selectedFlatArray))
+        ;
+        $this->assertEquals($expectedResult, $this->_object->render(new \Magento\Object($rowData)));
+    }
+
+    public function renderDataProvider()
+    {
+        return array(
+            'checked' => array(
+                array('id' => 1, 'label' => 'One'),
+                '<input type="radio" name="test[]" value="1" class="radio" checked="checked"/>'
+            ),
+            'not checked' => array(
+                array('id' => 2, 'label' => 'Two'),
+                '<input type="radio" name="test[]" value="2" class="radio"/>'
+            ),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php
index 1ea2e63b040bec28f65f8ec80ed923319d48fa21..4090b7091b8ad7b36e871c9a8db0330588f7ecf8 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php
@@ -56,9 +56,9 @@ class DataTest extends \PHPUnit_Framework_TestCase
             $this->_configMock,
             $this->_primaryConfigMock,
             $this->getMock('Magento\Core\Model\RouterList', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\AppProxy', array(), array(), '', false),
-            $this->getMock('Magento\Backend\Model\UrlProxy', array(), array(), '', false),
-            $this->getMock('Magento\Backend\Model\AuthProxy', array(), array(), '', false),
+            $this->getMock('Magento\Core\Model\App', array(), array(), '', false),
+            $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false),
+            $this->getMock('Magento\Backend\Model\Auth', array(), array(), '', false),
             'backend',
             'custom_backend'
         );
@@ -72,9 +72,9 @@ class DataTest extends \PHPUnit_Framework_TestCase
             $this->_configMock,
             $this->_primaryConfigMock,
             $this->getMock('Magento\Core\Model\RouterList', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\AppProxy', array(), array(), '', false),
-            $this->getMock('Magento\Backend\Model\UrlProxy', array(), array(), '', false),
-            $this->getMock('Magento\Backend\Model\AuthProxy', array(), array(), '', false),
+            $this->getMock('Magento\Core\Model\App', array(), array(), '', false),
+            $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false),
+            $this->getMock('Magento\Backend\Model\Auth', array(), array(), '', false),
             'backend',
             ''
         );
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php
index 8ad86f23b7283180be29714e1b9babe9d686dc0a..52424a4e5b554498446e6c2b2cea7cb22731f584 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php
@@ -28,23 +28,40 @@ class EncryptedTest extends \PHPUnit_Framework_TestCase
     /** @var \PHPUnit_Framework_MockObject_MockObject */
     protected $_helperMock;
 
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_configMock;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_resourceMock;
+
     /** @var \Magento\Backend\Model\Config\Backend\Encrypted */
     protected $_model;
 
     protected function setUp()
     {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $eventDispatcherMock = $this->getMock('Magento\Core\Model\Event\Manager', array(), array(), '', false);
         $contextMock = $this->getMock('Magento\Core\Model\Context', array(), array(), '', false);
-        $this->_helperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $resourceMock = $this->getMock('Magento\Core\Model\Resource\AbstractResource',
-            array('_construct', '_getReadAdapter', '_getWriteAdapter', 'getIdFieldName'),
-            array(), '', false);
-        $collectionMock = $this->getMock('Magento\Data\Collection\Db', array(), array(), '', false);
-        $registry = $this->getMock('Magento\Core\Model\Registry');
-        $storeManager = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false);
-        $coreConfig = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false);
-        $this->_model = new \Magento\Backend\Model\Config\Backend\Encrypted(
-            $this->_helperMock, $contextMock, $registry, $storeManager, $coreConfig, $resourceMock, $collectionMock
+        $contextMock->expects($this->any())
+            ->method('getEventDispatcher')
+            ->will($this->returnValue($eventDispatcherMock));
+        $this->_resourceMock = $this->getMock(
+            'Magento\Core\Model\Resource\AbstractResource',
+            array(
+                '_construct', '_getReadAdapter', '_getWriteAdapter', 'getIdFieldName',
+                'beginTransaction', 'save', 'commit', 'addCommitCallback'
+            ),
+            array(), '', false
         );
+        $this->_configMock = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false);
+        $this->_helperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
+        $this->_model = $helper->getObject('Magento\Backend\Model\Config\Backend\Encrypted', array(
+            'coreData' => $this->_helperMock,
+            'config' => $this->_configMock,
+            'context' => $contextMock,
+            'resource' => $this->_resourceMock,
+        ));
 
     }
 
@@ -55,4 +72,46 @@ class EncryptedTest extends \PHPUnit_Framework_TestCase
         $this->_helperMock->expects($this->once())->method('decrypt')->with($value)->will($this->returnValue($result));
         $this->assertEquals($result, $this->_model->processValue($value));
     }
+
+    /**
+     * @covers \Magento\Backend\Model\Config\Backend\Encrypted::_beforeSave
+     * @dataProvider beforeSaveDataProvider
+     *
+     * @param $value
+     * @param $valueToSave
+     */
+    public function testBeforeSave($value, $valueToSave)
+    {
+        $this->_resourceMock->expects($this->any())
+            ->method('addCommitCallback')
+            ->will($this->returnSelf());
+        $this->_resourceMock->expects($this->any())
+            ->method('commit')
+            ->will($this->returnSelf());
+
+        $this->_configMock->expects($this->any())
+            ->method('getValue')
+            ->with('some/path')
+            ->will($this->returnValue('oldValue'));
+        $this->_helperMock->expects($this->once())
+            ->method('encrypt')
+            ->with($valueToSave)
+            ->will($this->returnValue('encrypted'));
+
+        $this->_model->setValue($value);
+        $this->_model->setPath('some/path');
+        $this->_model->save();
+        $this->assertEquals($this->_model->getValue(), 'encrypted');
+    }
+
+    /**
+     * @return array
+     */
+    public function beforeSaveDataProvider()
+    {
+        return array(
+            array('****', 'oldValue'),
+            array('newValue', 'newValue'),
+        );
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php
index 105d03eb15d0ef27d420ad1815625bd89616402c..a40d54bcd843fab491bc954af203d20f05af6ee3 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php
@@ -46,7 +46,7 @@ class UrlTest extends \PHPUnit_Framework_TestCase
     protected $_areaFrontName = 'backendArea';
 
     /**
-     * @var \Magento\Core\Model\Session|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Core\Model\SessionProxy|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_coreSessionMock;
 
@@ -87,7 +87,9 @@ class UrlTest extends \PHPUnit_Framework_TestCase
         $this->_menuConfigMock = $this->getMock('Magento\Backend\Model\Menu\Config', array(), array(), '', false);
         $this->_menuConfigMock->expects($this->any())->method('getMenu')->will($this->returnValue($this->_menuMock));
 
-        $this->_coreSessionMock = $this->getMock('Magento\Core\Model\Session', array('getFormKey'), array(), '', false);
+        $this->_coreSessionMock = $this->getMock(
+            'Magento\Core\Model\SessionProxy', array('getFormKey'), array(), '', false
+        );
         $this->_coreSessionMock->expects($this->any())->method('getFormKey')->will($this->returnValue('salt'));
 
         $mockItem = $this->getMock('Magento\Backend\Model\Menu\Item', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Backup/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Backup/FactoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..17b87ef5bb3ed7cf08f99f2140eb002e353ca20a
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Backup/FactoryTest.php
@@ -0,0 +1,81 @@
+<?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    Magento
+ * @package     Magento_Backup
+ * @subpackage  unit_tests
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Backup;
+
+class FactoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Backup\Factory
+     */
+    protected $_model;
+
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager;
+
+    protected function setUp()
+    {
+        $this->_objectManager = $this->getMock('Magento\ObjectManager');
+        $this->_model = new \Magento\Backup\Factory($this->_objectManager);
+    }
+
+    /**
+     * @expectedException \Magento\Exception
+     */
+    public function testCreateWrongType()
+    {
+        $this->_model->create('WRONG_TYPE');
+    }
+
+    /**
+     * @param string $type
+     * @dataProvider allowedTypesDataProvider
+     */
+    public function testCreate($type)
+    {
+        $this->_objectManager->expects($this->once())
+            ->method('create')
+            ->will($this->returnValue('ModelInstance'));
+
+        $this->assertEquals('ModelInstance', $this->_model->create($type));
+    }
+
+    /**
+     * @return array
+     */
+    public function allowedTypesDataProvider()
+    {
+        return array(
+            array('db'),
+            array('snapshot'),
+            array('filesystem'),
+            array('media'),
+            array('nomedia'),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php b/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php
index 7e5cbbfca062108d3d7118683618c6cd9bac999d..311c7cfb4aa9bd85dfca5e2f05ca2c12ef089d77 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php
@@ -29,17 +29,31 @@ namespace Magento\Backup;
 
 class MediaTest extends \PHPUnit_Framework_TestCase
 {
+    /**
+     * @var \Magento\Core\Model\Dir
+     */
+    protected $_dirMock;
+
+    /**
+     * @var \Magento\Backup\Factory
+     */
+    protected $_backupFactoryMock;
+
+    protected function setUp()
+    {
+        $this->_dirMock = $this->getMock('Magento\Core\Model\Dir', array(), array(), '', false);
+        $this->_backupFactoryMock = $this->getMock('Magento\Backup\Factory', array(), array(), '', false);
+    }
     /**
      * @param string $action
      * @dataProvider actionProvider
      */
     public function testAction($action)
     {
-        $dir = $this->getMock('Magento\Core\Model\Dir', array(), array(), '', false);
         $snapshot = $this->getMock(
             'Magento\Backup\Snapshot',
             array('create', 'rollback', 'getDbBackupFilename'),
-            array($dir)
+            array($this->_dirMock, $this->_backupFactoryMock)
         );
         $snapshot->expects($this->any())
             ->method('create')
@@ -85,8 +99,9 @@ class MediaTest extends \PHPUnit_Framework_TestCase
      */
     public function testProxyMethod($method, $parameter)
     {
-        $dir = $this->getMock('Magento\Core\Model\Dir', array(), array(), '', false);
-        $snapshot = $this->getMock('Magento\Backup\Snapshot', array($method), array($dir));
+        $snapshot = $this->getMock('Magento\Backup\Snapshot',
+            array($method),
+            array($this->_dirMock, $this->_backupFactoryMock));
         $snapshot->expects($this->once())
             ->method($method)
             ->with($parameter)
diff --git a/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php b/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php
index 3d08bdfdfdc5d6e661bb9e03f1879425b64f28e5..a4cdfd888d958823e8a7e6ef24f78c4f57a507f4 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php
@@ -32,7 +32,8 @@ class NomediaTest extends \PHPUnit_Framework_TestCase
     public function testCreate()
     {
         $dir = $this->getMock('Magento\Core\Model\Dir', array(), array(), '', false);
-        $snapshot = $this->getMock('Magento\Backup\Snapshot', array('create'), array($dir));
+        $backupFactory = $this->getMock('Magento\Backup\Factory', array(), array(), '', false);
+        $snapshot = $this->getMock('Magento\Backup\Snapshot', array('create'), array($dir, $backupFactory));
         $snapshot->expects($this->any())
             ->method('create')
             ->will($this->returnValue(true));
diff --git a/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php b/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php
index 808ce0d2d2bc01b9eb7d876a484844971bc498fc..b7a2074e93f72c748b80220ec9918def2bd04667 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php
@@ -32,14 +32,15 @@ class SnapshotTest extends \PHPUnit_Framework_TestCase
     public function testGetDbBackupFilename()
     {
         $dir = $this->getMock('Magento\Core\Model\Dir', array(), array(), '', false);
-        $manager = $this->getMock('Magento\Backup\Snapshot', array('getBackupFilename'), array($dir));
+        $backupFactory = $this->getMock('Magento\Backup\Factory', array(), array(), '', false);
+        $manager = $this->getMock('Magento\Backup\Snapshot', array('getBackupFilename'), array($dir, $backupFactory));
 
         $file = 'var/backup/2.gz';
         $manager->expects($this->once())
             ->method('getBackupFilename')
             ->will($this->returnValue($file));
 
-        $model = new \Magento\Backup\Snapshot($dir);
+        $model = new \Magento\Backup\Snapshot($dir, $backupFactory);
         $model->setDbBackupManager($manager);
         $this->assertEquals($file, $model->getDbBackupFilename());
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Section/Reader/StoreTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Section/Reader/StoreTest.php
index 49627f537e547d7db34e541b311b7009991b0cf6..470e0c3b88448a504d4d0fa5e01c05ea092d8c12 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Section/Reader/StoreTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Section/Reader/StoreTest.php
@@ -113,7 +113,10 @@ class StoreTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($storeId));
 
         $sectionMock = $this->getMock('Magento\Core\Model\Config\Data', array(), array(), '', false);
-        $sectionMock->expects($this->once())->method('getValue')->will($this->returnValue(array(
+        $sectionMock->expects($this->any())->method('getValue')->will($this->returnValue(array(
+            'config' => array('key0' => 'website_value0', 'key1' => 'website_value1'),
+        )));
+        $sectionMock->expects($this->once())->method('getSource')->will($this->returnValue(array(
             'config' => array('key0' => 'website_value0', 'key1' => 'website_value1'),
         )));
         $this->_sectionPullMock->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Section/Reader/WebsiteTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Section/Reader/WebsiteTest.php
index 6c22a12241879d1f6fcbcc2e9e83f25d21206707..2c89033c1589c7d490a9da4fe90622f572d8a147 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Section/Reader/WebsiteTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Section/Reader/WebsiteTest.php
@@ -93,11 +93,16 @@ class WebsiteTest extends \PHPUnit_Framework_TestCase
         $websiteId = 1;
 
         $sectionMock = $this->getMock('Magento\Core\Model\Config\Data', array(), array(), '', false);
-        $sectionMock->expects($this->once())
+        $sectionMock->expects($this->any())
             ->method('getValue')
             ->will($this->returnValue(array(
-                'config' => array('key0' => 'default_value0', 'key1' => 'default_value1'),
-            )));
+            'config' => array('key0' => 'default_value0', 'key1' => 'default_value1'),
+        )));
+        $sectionMock->expects($this->once())
+            ->method('getSource')
+            ->will($this->returnValue(array(
+            'config' => array('key0' => 'default_value0', 'key1' => 'default_value1'),
+        )));
         $this->_sectionPullMock->expects($this->once())
             ->method('getSection')
             ->with('default', null)
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Db/UpdaterTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Db/UpdaterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..e15a7b6fedc8c876302d476e94dd20a46ad691c1
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Db/UpdaterTest.php
@@ -0,0 +1,149 @@
+<?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.
+ *
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Core\Model\Db;
+
+class UpdaterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_factoryMock;
+
+    /**
+     * @var PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_appStateMock;
+
+    /**
+     * @var PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_resourceResolver;
+
+    /**
+     * @var PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_moduleListMock;
+
+    /**
+     * @var PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_resourceSetupMock;
+
+    /**
+     * @var \Magento\Core\Model\Db\Updater
+     */
+    protected $_model;
+
+    protected function setUp()
+    {
+        $this->_factoryMock = $this->getMock('Magento\Core\Model\Resource\SetupFactory', array(), array(), '', false);
+        $this->_appStateMock = $this->getMock('Magento\Core\Model\App\State', array(), array(), '', false);
+        $this->_resourceResolver = $this->getMock('Magento\Core\Model\Module\ResourceResolverInterface');
+        $this->_moduleListMock = $this->getMock('Magento\Core\Model\ModuleListInterface');
+        $this->_resourceSetupMock = $this->getMock('Magento\Catalog\Model\Resource\Setup', array(), array(), '', false);
+
+        $moduleList = array('Test_Module' => array());
+        $this->_moduleListMock->expects($this->any())
+            ->method('getModules')
+            ->will($this->returnValue($moduleList));
+
+        $resourceList = array('catalog_setup');
+        $this->_resourceResolver->expects($this->any())
+            ->method('getResourceList')
+            ->with('Test_Module')
+            ->will($this->returnValue($resourceList));
+
+        $createData = array(
+            'resourceName' => 'catalog_setup',
+            'moduleName' => 'Test_Module',
+        );
+        $this->_factoryMock->expects($this->any())
+            ->method('create')
+            ->with('Magento\Catalog\Model\Resource\Setup', $createData)
+            ->will($this->returnValue($this->_resourceSetupMock));
+
+        $this->_model = new \Magento\Core\Model\Db\Updater(
+            $this->_factoryMock,
+            $this->_appStateMock,
+            $this->_moduleListMock,
+            $this->_resourceResolver,
+            array('catalog_setup' => 'Magento\Catalog\Model\Resource\Setup'),
+            true
+        );
+    }
+
+    /**
+     * @covers \Magento\Core\Model\Db\Updater::updateScheme
+     */
+    public function testUpdateSchemeWithUpdateSkip()
+    {
+        $this->_appStateMock->expects($this->once())
+            ->method('isInstalled')
+            ->will($this->returnValue(true));
+
+        $this->_appStateMock->expects($this->never())
+            ->method('setUpdateMode');
+
+        $this->_model->updateScheme();
+    }
+
+    /**
+     * @covers \Magento\Core\Model\Db\Updater::updateScheme
+     */
+    public function testUpdateScheme()
+    {
+        $this->_appStateMock->expects($this->once())
+            ->method('isInstalled')
+            ->will($this->returnValue(false));
+
+        $this->_appStateMock->expects($this->at(1))
+            ->method('setUpdateMode')
+            ->with(true);
+
+        $this->_appStateMock->expects($this->at(2))
+            ->method('setUpdateMode')
+            ->with(false);
+
+        $this->_resourceSetupMock->expects($this->once())
+            ->method('applyUpdates');
+        $this->_resourceSetupMock->expects($this->once())
+            ->method('getCallAfterApplyAllUpdates')
+            ->will($this->returnValue(true));
+        $this->_resourceSetupMock->expects($this->once())
+            ->method('afterApplyAllUpdates');
+
+        $this->_model->updateScheme();
+    }
+
+    /**
+     * @covers \Magento\Core\Model\Db\Updater::updateData
+     */
+    public function testUpdateData()
+    {
+        $this->_resourceSetupMock->expects($this->never())
+            ->method('applyDataUpdates');
+
+        $this->_model->updateData();
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Setup/MigrationTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Setup/MigrationTest.php
index 97db444089faad2c317d7f5ca19aa35a6573c004..f5c467a82716adbc46b321475246a3f3016b63c5 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Setup/MigrationTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Setup/MigrationTest.php
@@ -151,7 +151,6 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
      */
     public function testAppendClassAliasReplace()
     {
-        $this->markTestIncomplete('Not merged');
         $moduleListMock = $this->getMock('Magento\Core\Model\ModuleListInterface');
         $moduleListMock->expects($this->once())
             ->method('getModule')
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/UrlTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/UrlTest.php
index 510805f8c9208b0b4436c54c3c61a4467800da2c..4a1d9da6a78fb75b2765d19405a686169a5f1519 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/UrlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/UrlTest.php
@@ -53,7 +53,7 @@ class UrlTest extends \PHPUnit_Framework_TestCase
             $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false, false),
             $this->getMock('Magento\Core\Model\App', array(), array(), '', false, false),
             $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false, false),
-            $this->getMock('Magento\Core\Model\Session', array(), array(), '', false, false)
+            $this->getMock('Magento\Core\Model\SessionProxy', array(), array(), '', false, false)
         );
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Converter/XmlTest.php b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Converter/XmlTest.php
index 01e4d448f246262ca4bf830219948c3d2d3bf843..d04cf25080b42d279a215429aa799c27be20bd60 100644
--- a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Converter/XmlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Converter/XmlTest.php
@@ -76,7 +76,7 @@ class XmlTest extends \PHPUnit_Framework_TestCase
                 'schedule' => '* * * * *',
                 'instance' => 'Model2',
                 'method' => 'method2'
-            )
+            ),
         );
 
         $xmlFile = __DIR__ . '/../_files/crontab_valid.xml';
@@ -84,10 +84,7 @@ class XmlTest extends \PHPUnit_Framework_TestCase
         $dom->loadXML(file_get_contents($xmlFile));
         $result = $this->_converter->convert($dom);
 
-        $this->assertEquals($expected['job1']['schedule'], $result['job1']['schedule']);
-        $this->assertEquals($expected['job1']['name'], $result['job1']['name']);
-        $this->assertEquals($expected['job1']['instance'], $result['job1']['instance']);
-        $this->assertEquals($expected['job1']['method'], $result['job1']['method']);
+        $this->assertEquals($expected, $result);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/_files/crontab_valid.xml b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/_files/crontab_valid.xml
index 56c2ce7ae47bedf660d2efd454977943d417241e..59cc71074e5aa68b6ff3d55d972453a9fb11cb1b 100644
--- a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/_files/crontab_valid.xml
+++ b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/_files/crontab_valid.xml
@@ -27,4 +27,7 @@
     <job name="job1" instance="Model1" method="method1">
         <schedule>30 2 * * *</schedule>
     </job>
+    <job name="job2" instance="Model2" method="method2">
+        <schedule>* * * * *</schedule>
+    </job>
 </config>
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php
index ca652ac5f2c3b66280e97f59ac6669abc36f0b57..665afcf89e4fb59525fb37a11e93db69192d8f90 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php
@@ -70,7 +70,7 @@ class NavigationModeTest extends \PHPUnit_Framework_TestCase
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
         $app = $this->getMock('Magento\Core\Model\App', array(), array(), '', false);
         $storeManager = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false);
-        $session = $this->getMock('Magento\Core\Model\Session', array(), array(), '', false);
+        $session = $this->getMock('Magento\Core\Model\SessionProxy', array(), array(), '', false);
 
         $this->_model = new \Magento\DesignEditor\Model\Url\NavigationMode(
             $this->getMock('Magento\Core\Model\Url\SecurityInfoInterface'),
diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/ConfigTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..773943fd472c217db09c31c34c7cf42b4bf251f6
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/ConfigTest.php
@@ -0,0 +1,147 @@
+<?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    Magento
+ * @package     Magento_Eav
+ * @subpackage  unit_tests
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/**
+ * Test class for \Magento\Eav\Model\Entity\Attribute\Config
+ */
+namespace Magento\Eav\Model\Entity\Attribute;
+
+class ConfigTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Eav\Model\Entity\Attribute\Config
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_readerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_cacheMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_cacheId;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_attribute;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_entityType;
+
+    protected function setUp()
+    {
+        $this->_attribute = $this->getMock('Magento\Eav\Model\Entity\Attribute', array(), array(), '', false);
+        $this->_entityType = $this->getMock('Magento\Eav\Model\Entity\Type', array(), array(), '', false);
+        $this->_readerMock =
+            $this->getMock('Magento\Eav\Model\Entity\Attribute\Config\Reader', array(), array(), '', false);
+        $this->_cacheMock = $this->getMock('Magento\Core\Model\Cache\Type\Config', array(), array(), '', false);
+        $this->_cacheId = 'eav_attributes';
+        $this->_cacheMock->expects($this->once())
+            ->method('load')
+            ->with($this->equalTo($this->_cacheId))
+            ->will($this->returnValue(serialize(array())));
+
+        $this->_model = new \Magento\Eav\Model\Entity\Attribute\Config(
+            $this->_readerMock,
+            $this->_cacheMock,
+            $this->_cacheId
+        );
+    }
+
+    public function testGetLockedFieldsEmpty()
+    {
+        $this->_entityType->expects($this->once())
+            ->method('getEntityTypeCode')
+            ->will($this->returnValue('test_code'));
+        $this->_attribute->expects($this->once())
+            ->method('getEntityType')
+            ->will($this->returnValue($this->_entityType));
+
+        $this->_attribute->expects($this->once())
+            ->method('getAttributeCode')
+            ->will($this->returnValue('attribute_code'));
+        $result = $this->_model->getLockedFields($this->_attribute);
+        $this->assertEquals(array(), $result);
+    }
+
+    public function testGetLockedFields()
+    {
+        $this->_entityType->expects($this->once())
+            ->method('getEntityTypeCode')
+            ->will($this->returnValue('test_code1/test_code2'));
+        $this->_attribute->expects($this->once())
+            ->method('getEntityType')
+            ->will($this->returnValue($this->_entityType));
+
+        $this->_attribute->expects($this->once())
+            ->method('getAttributeCode')
+            ->will($this->returnValue('test_code'));
+        $data = array(
+            'test_code1' => array(
+                'test_code2' => array(
+                    'attributes' => array(
+                        'test_code' => array(
+                            'test_code1' => 'test_code1'
+                        )
+                    )
+                )
+            )
+        );
+        $this->_model->merge($data);
+        $result = $this->_model->getLockedFields($this->_attribute);
+        $this->assertEquals(array('test_code1' => 'test_code1'), $result);
+    }
+
+    public function testGetEntityAttributesLockedFields()
+    {
+        $data = array(
+            'entity_code' => array(
+                'attributes' => array(
+                    'attribute_code' => array(
+                        'attribute_data' => array(
+                            'locked' => 'locked_field',
+                            'code' => 'code_test'
+                        )
+                    )
+                )
+            )
+        );
+        $this->_model->merge($data);
+        $result = $this->_model->getEntityAttributesLockedFields('entity_code');
+        $this->assertEquals(array('attribute_code' => array('code_test')), $result);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/Installer/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Install/Model/Installer/ConfigTest.php
index 135031d24e36c25ef0fa3b086e98f7c93e2b5851..8b1912674604ff7fd9202a9289d0a0b7943b7db8 100644
--- a/dev/tests/unit/testsuite/Magento/Install/Model/Installer/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Install/Model/Installer/ConfigTest.php
@@ -49,7 +49,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $this->_tmpConfigFile = TESTS_TEMP_DIR . DIRECTORY_SEPARATOR . 'local.xml';
         $this->_filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
         $this->_model = new \Magento\Install\Model\Installer\Config(
-            $this->getMock('Magento\Install\Model\InstallerProxy', array(), array(),
+            $this->getMock('Magento\Install\Model\Installer', array(), array(),
                 '', false),
             $this->getMock('Magento\Core\Controller\Request\Http', array(), array(), '', false),
             new \Magento\Core\Model\Dir(__DIR__, array(), array(\Magento\Core\Model\Dir::CONFIG => TESTS_TEMP_DIR)),
diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Helper/DataTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..37934711f36df022da7f5a7147c4e3a1f7521a76
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Persistent/Helper/DataTest.php
@@ -0,0 +1,55 @@
+<?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.
+ *
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Persistent\Helper;
+
+class DataTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var  \Magento\Core\Model\Config|PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_configMock;
+
+    /**
+     * @var  \Magento\Persistent\Helper\Data
+     */
+    protected $_helper;
+
+    protected function setUp()
+    {
+        $this->_configMock = $this->getMock('\Magento\Core\Model\Config', array(), array(), '', false);
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_helper = $objectManager->getObject('\Magento\Persistent\Helper\Data', array(
+            'config' => $this->_configMock,
+        ));
+    }
+
+    public function testGetPersistentConfigFilePath()
+    {
+        $this->_configMock->expects($this->once())->method('getModuleDir')
+            ->with('etc', 'Magento_Persistent')
+            ->will($this->returnValue('path123'));
+        $this->assertEquals('path123'. DS . 'persistent.xml', $this->_helper->getPersistentConfigFilePath());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/I18n/Code/Parser/Adapter/JsTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/I18n/Code/Parser/Adapter/JsTest.php
index 458fa6c5b8d3cc2dfff0b40ecb10e1b2d169f572..e929c30263cb053915769c17c65b9649520f8ef1 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/I18n/Code/Parser/Adapter/JsTest.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/I18n/Code/Parser/Adapter/JsTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Test\Tools\I18n\Code\Parser\Adapter;
 
+use Magento\TestFramework\Helper\ObjectManager;
+
 class JsTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -31,6 +33,11 @@ class JsTest extends \PHPUnit_Framework_TestCase
      */
     protected $_testFile;
 
+    /**
+     * @var int
+     */
+    protected $_stringsCount;
+
     /**
      * @var \Magento\Tools\I18n\Code\Parser\Adapter\Js
      */
@@ -40,24 +47,23 @@ class JsTest extends \PHPUnit_Framework_TestCase
     {
         // dev/tests/unit/testsuite/tools/I18n/Parser/Adapter/_files/file.js
         $this->_testFile = str_replace('\\', '/', realpath(dirname(__FILE__))) . '/_files/file.js';
+        $this->_stringsCount = count(file($this->_testFile));
 
-        $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_adapter = $objectManagerHelper->getObject('Magento\Tools\I18n\Code\Parser\Adapter\Js');
+        $this->_adapter = (new ObjectManager($this))->getObject('Magento\Tools\I18n\Code\Parser\Adapter\Js');
     }
 
     public function testParse()
     {
-        $this->markTestSkipped('Lines move depending on license size in JS file');
         $expectedResult = array(
             array(
                 'phrase' => 'Phrase 1',
                 'file' => $this->_testFile,
-                'line' => 10,
+                'line' => $this->_stringsCount - 2,
             ),
             array(
                 'phrase' => 'Phrase 2 %1',
                 'file' => $this->_testFile,
-                'line' => 11,
+                'line' => $this->_stringsCount - 1,
             ),
         );
 
diff --git a/dev/tools/Magento/Tools/Di/Code/Scanner/PhpScanner.php b/dev/tools/Magento/Tools/Di/Code/Scanner/PhpScanner.php
index b7aad0f43872c48969d466f8cfb33093c1609ba8..ec6bc166fda1ede55ca696c504d8697c6e9847ff 100644
--- a/dev/tools/Magento/Tools/Di/Code/Scanner/PhpScanner.php
+++ b/dev/tools/Magento/Tools/Di/Code/Scanner/PhpScanner.php
@@ -34,7 +34,7 @@ class PhpScanner extends FileScanner
      * @var string
      */
     protected $_pattern =
-        '/[ \\b\n\'"\(\\\\]{1}([A-Z]{1}[a-zA-Z0-9]*\\\\[A-Z]{1}[a-zA-Z0-9\\\\]*(Factory))[ \\b\n\'"]{1}/';
+        '/[ \\b\n\'"\(\\\\]{1}([A-Z]{1}[a-zA-Z0-9]*(\\\\|_)[A-Z]{1}[a-zA-Z0-9\\\\_]*(Factory))[ \\b\n\'"]{1}/';
 
     /**
      * Prepare file content
diff --git a/dev/tools/Magento/Tools/Di/compiler.php b/dev/tools/Magento/Tools/Di/compiler.php
index 6ef22bf1d588d052cb60fdde5626a1494c2306cc..7d5aa886024bb78850c36a7542b9392d359e1f12 100644
--- a/dev/tools/Magento/Tools/Di/compiler.php
+++ b/dev/tools/Magento/Tools/Di/compiler.php
@@ -35,8 +35,7 @@ use Magento\Tools\Di\Compiler\Log\Log,
 $filePatterns = array(
     'php' => '/.*\.php$/',
     'etc' => '/\/app\/etc\/[a-z0-9\.]*\.xml$/',
-    'config' => '/\/etc\/(config([a-z0-9\.]*)?|adminhtml\/system)\.xml$/',
-    'di' => '/\/etc\/(di\/.*|adminhtml\/di|frontend\/di|di)\.xml$/',
+    'di' => '/\/etc\/([a-zA-Z_]*\/di|di)\.xml$/',
     'view' => '/\/view\/[a-z0-9A-Z\/\.]*\.xml$/',
     'design' => '/\/app\/design\/[a-z0-9A-Z\/\._]*\.xml$/',
 );
@@ -79,7 +78,6 @@ try {
     $scanner = new Scanner\CompositeScanner();
     $scanner->addChild(new Scanner\PhpScanner(), 'php');
     $scanner->addChild(new Scanner\XmlScanner(), 'etc');
-    $scanner->addChild(new Scanner\XmlScanner(), 'config');
     $scanner->addChild(new Scanner\XmlScanner(), 'di');
     $scanner->addChild(new Scanner\XmlScanner(), 'view');
     $scanner->addChild(new Scanner\XmlScanner(), 'design');
diff --git a/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php b/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php
index 0871abc7119fd118280814e73808b4cdee81e0d8..db10f86e6dd29320159477428884a02dd74f70b2 100644
--- a/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php
+++ b/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Zend\Console\Getopt is a class to parse options for command-line
+ * Zend_Console_Getopt is a class to parse options for command-line
  * applications.
  *
  * LICENSE
@@ -21,7 +21,7 @@
  */
 
 /**
- * Zend\Console\Getopt is a class to parse options for command-line
+ * Zend_Console_Getopt is a class to parse options for command-line
  * applications.
  *
  * Terminology:
@@ -124,9 +124,7 @@
  * @todo  Feature request to implement callbacks.
  *        e.g. if -a is specified, run function 'handleOptionA'().
  */
-namespace Magento\Tools\I18n\Zend\Console;
-
-class Getopt
+class Zend_Console_Getopt
 {
 
     /**
diff --git a/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php b/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php
index b0cd96a4323a7d12f8b8103325f992a0e28bea7d..84904318692fdd23ab18165592ffd82a3108d4d3 100644
--- a/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php
+++ b/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php
@@ -32,9 +32,7 @@
  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-namespace Magento\Tools\I18n\Zend\Console\GetOpt;
-
-class Exception extends \Zend_Exception
+class Zend_Console_Getopt_Exception extends Zend_Exception
 {
     /**
      * Usage
diff --git a/dev/tools/Magento/Tools/I18n/Zend/Exception.php b/dev/tools/Magento/Tools/I18n/Zend/Exception.php
index b5b8ea3420b720e653ab141084567e66d7682d0d..b5f648158aec937df36e82625834ea0355da27ce 100644
--- a/dev/tools/Magento/Tools/I18n/Zend/Exception.php
+++ b/dev/tools/Magento/Tools/I18n/Zend/Exception.php
@@ -25,9 +25,7 @@
 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
-namespace Magento\Tools\I18n\Zend;
-
-class Exception extends \Exception
+class Zend_Exception extends Exception
 {
     /**
      * @var null|Exception
diff --git a/lib/Magento/Backup/AbstractBackup.php b/lib/Magento/Backup/AbstractBackup.php
index cae25a70114d6fd1d6f5f1f57a316a45eb710601..43455adea386b9c7eab723ca101b59d5e5c55bfd 100644
--- a/lib/Magento/Backup/AbstractBackup.php
+++ b/lib/Magento/Backup/AbstractBackup.php
@@ -32,7 +32,7 @@
  */
 namespace Magento\Backup;
 
-abstract class AbstractBackup implements  \Magento\Backup\BackupInterface
+abstract class AbstractBackup implements \Magento\Backup\BackupInterface
 {
     /**
      * Backup name
diff --git a/lib/Magento/Backup/Db.php b/lib/Magento/Backup/Db.php
index 4d9ac6e05dc062e25c37c8d1b0aa0236ce20cee2..879d9e01e8a5182104170407f7022ef8f171b520 100644
--- a/lib/Magento/Backup/Db.php
+++ b/lib/Magento/Backup/Db.php
@@ -36,25 +36,16 @@ namespace Magento\Backup;
 class Db extends \Magento\Backup\AbstractBackup
 {
     /**
-     * @var \Magento\Backup\Model\BackupFactory
+     * @var \Magento\Backup\Db\BackupFactory
      */
     protected $_backupFactory;
 
     /**
-     * @var \Magento\Backup\Model\DbFactory
+     * @param \Magento\Backup\Db\BackupFactory $backupFactory
      */
-    protected $_backupDbFactory;
-
-    /**
-     * @param \Magento\Backup\Model\BackupFactory $backupFactory
-     * @param \Magento\Backup\Model\DbFactory $backupDbFactory
-     */
-    public function __construct(
-        \Magento\Backup\Model\BackupFactory $backupFactory,
-        \Magento\Backup\Model\DbFactory $backupDbFactory
-    ) {
+    public function __construct(\Magento\Backup\Db\BackupFactory $backupFactory)
+    {
         $this->_backupFactory = $backupFactory;
-        $this->_backupDbFactory = $backupDbFactory;
     }
 
     /**
@@ -117,14 +108,13 @@ class Db extends \Magento\Backup\AbstractBackup
 
         $this->_lastOperationSucceed = false;
 
-        $backup = $this->_backupFactory
-            ->create()
+        $backup = $this->_backupFactory->createBackupModel()
             ->setTime($this->getTime())
             ->setType($this->getType())
             ->setPath($this->getBackupsDir())
             ->setName($this->getName());
 
-        $backupDb = $this->_backupDbFactory->create();
+        $backupDb = $this->_backupFactory->createBackupDbModel();
         $backupDb->createBackup($backup);
 
         $this->_lastOperationSucceed = true;
diff --git a/app/code/Magento/Customer/Model/Attribute/Data.php b/lib/Magento/Backup/Db/BackupDbInterface.php
similarity index 72%
rename from app/code/Magento/Customer/Model/Attribute/Data.php
rename to lib/Magento/Backup/Db/BackupDbInterface.php
index 0b032f8a61d5ef36eede385ceb3d2368cee36bb5..fd18033fa6e9feefee005cfaf44240bd5947ef8e 100644
--- a/app/code/Magento/Customer/Model/Attribute/Data.php
+++ b/lib/Magento/Backup/Db/BackupDbInterface.php
@@ -18,23 +18,18 @@
  * 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
- * @package     Magento_Customer
  * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+namespace Magento\Backup\Db;
 
-
-/**
- * Customer Attribute Data Factory
- * Left for compatibility issues
- *
- * @category    Magento
- * @package     Magento_Customer
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Customer\Model\Attribute;
-
-class Data extends \Magento\Eav\Model\Attribute\Data
+interface BackupDbInterface
 {
+    /**
+     * Create DB backup
+     *
+     * @param BackupInterface $backup
+     * @return void
+     */
+    public function createBackup(\Magento\Backup\Db\BackupInterface $backup);
 }
diff --git a/lib/Magento/Backup/Db/BackupFactory.php b/lib/Magento/Backup/Db/BackupFactory.php
new file mode 100644
index 0000000000000000000000000000000000000000..b2ebaf3cf0774b29cf30fb307701e4d554258c44
--- /dev/null
+++ b/lib/Magento/Backup/Db/BackupFactory.php
@@ -0,0 +1,81 @@
+<?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.
+ *
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Backup\Db;
+
+class BackupFactory
+{
+    /**
+     * Object manager
+     *
+     * @var \Magento\ObjectManager
+     */
+    private $_objectManager;
+
+    /**
+     * @var string
+     */
+    private $_backupInstanceName;
+
+    /**
+     * @var string
+     */
+    private $_backupDbInstanceName;
+
+    /**
+     * @param \Magento\ObjectManager $objectManager
+     * @param string $backupInstanceName
+     * @param string $backupDbInstanceName
+     */
+    public function __construct(
+        \Magento\ObjectManager $objectManager,
+        $backupInstanceName,
+        $backupDbInstanceName
+    ) {
+        $this->_objectManager = $objectManager;
+        $this->_backupInstanceName = $backupInstanceName;
+        $this->_backupDbInstanceName = $backupDbInstanceName;
+    }
+
+    /**
+     * Create backup model
+     *
+     * @param array $arguments
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function createBackupModel(array $arguments = array())
+    {
+        return $this->_objectManager->create($this->_backupInstanceName, $arguments);
+    }
+
+    /**
+     * Create backup Db model
+     *
+     * @param array $arguments
+     * @return \Magento\Backup\Db\BackupDbInterface
+     */
+    public function createBackupDbModel(array $arguments = array())
+    {
+        return $this->_objectManager->create($this->_backupDbInstanceName, $arguments);
+    }
+}
diff --git a/lib/Magento/Backup/Db/BackupInterface.php b/lib/Magento/Backup/Db/BackupInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..4c1e0ba5f2a2bbdefd440509a789dd2c31a6827c
--- /dev/null
+++ b/lib/Magento/Backup/Db/BackupInterface.php
@@ -0,0 +1,82 @@
+<?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.
+ *
+ * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Backup\Db;
+
+interface BackupInterface
+{
+    /**
+     * Set backup time
+     *
+     * @param int $time
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function setTime($time);
+
+    /**
+     * Set backup type
+     *
+     * @param string $type
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function setType($type);
+
+    /**
+     * Set backup path
+     *
+     * @param string $path
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function setPath($path);
+
+    /**
+     * Set backup name
+     *
+     * @param string $name
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function setName($name);
+
+    /**
+     * Open backup file (write or read mode)
+     *
+     * @param bool $write
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function open($write = false);
+
+    /**
+     * Write to backup file
+     *
+     * @param string $data
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function write($data);
+
+    /**
+     * Close open backup file
+     *
+     * @return \Magento\Backup\Db\BackupInterface
+     */
+    public function close();
+}
diff --git a/lib/Magento/Backup.php b/lib/Magento/Backup/Factory.php
similarity index 52%
rename from lib/Magento/Backup.php
rename to lib/Magento/Backup/Factory.php
index 6eb90f1ff81856ea76593a2f1a928e258804092e..4001ecf1d8059b9d5fd14ae909ac3fa1da13231d 100644
--- a/lib/Magento/Backup.php
+++ b/lib/Magento/Backup/Factory.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Backup object factory.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,44 +20,48 @@
  * 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
- * @package      \Magento\Backup
- * @copyright   Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Class to work with backups
- *
- * @category    Magento
- * @package     \Magento\Backup
- * @author      Magento Core Team <core@magentocommerce.com>
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
-namespace Magento;
+namespace Magento\Backup;
 
-class Backup
+class Factory
 {
+    /**
+     * Object manager
+     *
+     * @var \Magento\ObjectManager
+     */
+    private $_objectManager;
+
     /**
      * List of supported a backup types
      *
      * @var array
      */
-    static protected $_allowedBackupTypes = array('db', 'snapshot', 'filesystem', 'media', 'nomedia');
+    private $_allowedTypes = array('db', 'snapshot', 'filesystem', 'media', 'nomedia');
+
+    /**
+     * @param \Magento\ObjectManager $objectManager
+     */
+    public function __construct(\Magento\ObjectManager $objectManager)
+    {
+        $this->_objectManager = $objectManager;
+    }
 
     /**
-     * get Backup Instance By File Name
+     * Create new backup instance
      *
-     * @param  string $type
+     * @param string $type
      * @return \Magento\Backup\BackupInterface
+     * @throws \Magento\Exception
      */
-    static public function getBackupInstance($type)
+    public function create($type)
     {
-        $class = '\\Magento\Backup_' . ucfirst($type);
-
-        if (!in_array($type, self::$_allowedBackupTypes) || !class_exists($class, true)){
+        if (!in_array($type, $this->_allowedTypes)) {
             throw new \Magento\Exception('Current implementation not supported this type (' . $type . ') of backup.');
         }
-
-        return new $class();
+        $class = 'Magento\Backup\\' . ucfirst($type);
+        return $this->_objectManager->create($class);
     }
 }
diff --git a/lib/Magento/Backup/Snapshot.php b/lib/Magento/Backup/Snapshot.php
index 9f8403e88a5ecbd22aa3e3a6b26cce0d642d0256..33dc089bd3ae38d884f869d3f65156606e32a2bb 100644
--- a/lib/Magento/Backup/Snapshot.php
+++ b/lib/Magento/Backup/Snapshot.php
@@ -49,13 +49,21 @@ class Snapshot extends \Magento\Backup\Filesystem
      */
     protected $_dirs;
 
+    /**
+     * @var \Magento\Backup\Factory
+     */
+    protected $_backupFactory;
+
     /**
      * @param \Magento\Core\Model\Dir $dirs
+     * @param \Magento\Backup\Factory $backupFactory
      */
     public function __construct(
-        \Magento\Core\Model\Dir $dirs
+        \Magento\Core\Model\Dir $dirs,
+        \Magento\Backup\Factory $backupFactory
     ) {
         $this->_dirs = $dirs;
+        $this->_backupFactory = $backupFactory;
     }
 
     /**
@@ -125,7 +133,7 @@ class Snapshot extends \Magento\Backup\Filesystem
      */
     protected function _createDbBackupInstance()
     {
-        return \Magento\Backup::getBackupInstance(\Magento\Backup\Helper\Data::TYPE_DB)
+        return $this->_backupFactory->create(\Magento\Backup\Helper\Data::TYPE_DB)
             ->setBackupExtension('gz')
             ->setTime($this->getTime())
             ->setBackupsDir($this->_dirs->getDir('var'))
diff --git a/lib/Magento/DB/Tree.php b/lib/Magento/DB/Tree.php
index 2a951ef59920e25100b0d270e373e352dc7d50e2..02ce4f3b87a349de86872b047def01ae8f8b0c95 100644
--- a/lib/Magento/DB/Tree.php
+++ b/lib/Magento/DB/Tree.php
@@ -30,7 +30,7 @@ namespace Magento\DB;
 /**
  * Magento Library
  */
-require_once 'Magento/Db/Tree/Exception.php';
+require_once 'Magento/DB/Tree/TreeException.php';
 class Tree
 {
     private $_id;
diff --git a/pub/cron.php b/pub/cron.php
index 5d40a46e99160af0d100b34ed11a8702f3055065..93925197fa082dc3c659dcf49ab58167f8dc020e 100644
--- a/pub/cron.php
+++ b/pub/cron.php
@@ -27,7 +27,7 @@
  */
 
 require dirname(__DIR__) . '/app/bootstrap.php';
-Magento_Profiler::start('magento');
+\Magento\Profiler::start('magento');
 umask(0);
 
 try {
@@ -42,4 +42,4 @@ try {
     print $e->getMessage() . "\n\n";
     print $e->getTraceAsString();
 }
-Magento_Profiler::stop('magento');
+\Magento\Profiler::stop('magento');
diff --git a/pub/get.php b/pub/get.php
index f195304f07bab63d62b0a012bc7fdec26a4af210..e38e5587ded7d9eea7e275e84a023204f76bd68d 100644
--- a/pub/get.php
+++ b/pub/get.php
@@ -76,8 +76,8 @@ if ($mediaDirectory) {
 // Materialize file in application
 $params = $_SERVER;
 if (empty($mediaDirectory)) {
-    $params[Magento_Core_Model_App::PARAM_ALLOWED_MODULES] = array('Magento_Core');
-    $params[Magento_Core_Model_App::PARAM_CACHE_OPTIONS]['frontend_options']['disable_save'] = true;
+    $params[\Magento\Core\Model\App::PARAM_ALLOWED_MODULES] = array('Magento_Core');
+    $params[\Magento\Core\Model\App::PARAM_CACHE_OPTIONS]['frontend_options']['disable_save'] = true;
 }
 
 $config = new \Magento\Core\Model\Config\Primary(dirname(__DIR__), $params);
diff --git a/pub/index.php b/pub/index.php
index 7501a91e36994f9c0cbb145a354c0b98c95e84a4..056fd41c018085d9f2570f5dd5b7f75ba9606bfc 100644
--- a/pub/index.php
+++ b/pub/index.php
@@ -24,9 +24,9 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 require __DIR__ . '/../app/bootstrap.php';
-Magento_Profiler::start('magento');
+\Magento\Profiler::start('magento');
 $params = $_SERVER;
 $params[\Magento\Core\Model\App::PARAM_APP_URIS][\Magento\Core\Model\Dir::PUB] = '';
 $entryPoint = new \Magento\Core\Model\EntryPoint\Http(new \Magento\Core\Model\Config\Primary(BP, $params));
 $entryPoint->processRequest();
-Magento_Profiler::stop('magento');
+\Magento\Profiler::stop('magento');
diff --git a/pub/lib/mage/validation/dob-rule.js b/pub/lib/mage/validation/dob-rule.js
index a7b1898b83a12ef83cf1aea10b4d7d35caae7379..6e8fe43ea74b5e2f5ef825c5c9c00f2e8225865c 100644
--- a/pub/lib/mage/validation/dob-rule.js
+++ b/pub/lib/mage/validation/dob-rule.js
@@ -28,10 +28,11 @@
     $.validator.addMethod(
         'validate-dob',
         function (val, element, params) {
-            $('.customer-dob').find('.' + this.settings.errorClass).removeClass(this.settings.errorClass);
-            var dayVal = $(params[0]).find('input:text').val(),
-                monthVal = $(params[1]).find('input:text').val(),
-                yearVal = $(params[2]).find('input:text').val(),
+            var dob = $(element).parents('.customer-dob');
+            $(dob).find('.' + this.settings.errorClass).removeClass(this.settings.errorClass);
+            var dayVal = $(dob).find(params[0]).find('input:text').val(),
+                monthVal = $(dob).find(params[1]).find('input:text').val(),
+                yearVal = $(dob).find(params[2]).find('input:text').val(),
                 dobLength = dayVal.length + monthVal.length + yearVal.length;
             if (params[3] && dobLength === 0) {
                 this.dobErrorMessage = 'This is a required field.';
@@ -53,12 +54,14 @@
                 return false;
             }
             if (year < 1900 || year > curYear) {
-                this.dobErrorMessage = $.mage.__('Please enter a valid year (1900-%d).').replace('%d', curYear);
+                this.dobErrorMessage =
+                    $.mage.__('Please enter a valid year (1900-%d).').replace('%d', curYear.toString());
                 return false;
             }
             var validateDayInMonth = new Date(year, month, 0).getDate();
             if (day < 1 || day > validateDayInMonth) {
-                this.dobErrorMessage = $.mage.__('Please enter a valid day (1-%d).').replace('%d', validateDayInMonth);
+                this.dobErrorMessage =
+                    $.mage.__('Please enter a valid day (1-%d).').replace('%d', validateDayInMonth.toString());
                 return false;
             }
             var today = new Date(),